query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Registers dynamic metrics sources that collect metrics in each metrics collection cycle.
void registerDynamicMetricsProvider(DynamicMetricsProvider metricsProvider);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RefreshScope\n @Bean\n public MetricRegistry metrics() {\n final MetricRegistry metrics = new MetricRegistry();\n metrics.register(\"jvm.gc\", new GarbageCollectorMetricSet());\n metrics.register(\"jvm.memory\", new MemoryUsageGaugeSet());\n metrics.register(\"thread-states\", new ThreadStatesGaugeSet());\n metrics.register(\"jvm.fd.usage\", new FileDescriptorRatioGauge());\n return metrics;\n }", "public synchronized static void addTraceMetricsSource() {\n try {\n QueryServicesOptions options = QueryServicesOptions.withDefaults();\n if (!initialized && options.isTracingEnabled()) {\n traceSpanReceiver = new TraceSpanReceiver();\n Trace.addReceiver(traceSpanReceiver);\n TraceWriter traceWriter = new TraceWriter(options.getTableName(), options.getTracingThreadPoolSize(), options.getTracingBatchSize());\n traceWriter.start();\n }\n } catch (RuntimeException e) {\n LOGGER.warn(\"Tracing will outputs will not be written to any metrics sink! No \"\n + \"TraceMetricsSink found on the classpath\", e);\n } catch (IllegalAccessError e) {\n // This is an issue when we have a class incompatibility error, such as when running\n // within SquirrelSQL which uses an older incompatible version of commons-collections.\n // Seeing as this only results in disabling tracing, we swallow this exception and just\n // continue on without tracing.\n LOGGER.warn(\"Class incompatibility while initializing metrics, metrics will be disabled\", e);\n }\n initialized = true;\n }", "private void addMetrics(Map<MetricName, KafkaMetric> kafkaMetrics) {\n Set<MetricName> metricKeys = kafkaMetrics.keySet();\n for (MetricName key : metricKeys) {\n KafkaMetric metric = kafkaMetrics.get(key);\n String metricName = getMetricName(metric.metricName());\n if (metrics.getNames().contains(metricName)) {\n metrics.remove(metricName);\n }\n metrics.register(metricName, new Gauge<Double>() {\n @Override\n public Double getValue() {\n return metric.value();\n }\n });\n }\n }", "private void collectMetricsInfo() {\n // Retrieve a list of all references to registered metric services\n ServiceReference[] metricsList = null;\n try {\n metricsList = bc.getServiceReferences(null, SREF_FILTER_METRIC);\n } catch (InvalidSyntaxException e) {\n logError(INVALID_FILTER_SYNTAX);\n }\n \n // Retrieve information about all registered metrics found\n if ((metricsList != null) && (metricsList.length > 0)) {\n \n for (int nextMetric = 0;\n nextMetric < metricsList.length;\n nextMetric++) {\n \n ServiceReference sref_metric = metricsList[nextMetric];\n MetricInfo metric_info = getMetricInfo(sref_metric);\n \n // Add this metric's info to the list\n if (metric_info != null) {\n registeredMetrics.put(\n metric_info.getServiceID(),\n metric_info);\n }\n }\n }\n else {\n logInfo(\"No pre-existing metrics were found!\");\n }\n }", "public void createMBeanProxies() {\n createMBeanProxy(EngineMetricMBean.class, getObjectName(EngineMetric.class));\n createMBeanProxy(StatementMetricMBean.class, getObjectName(StatementMetric.class));\n }", "@Override\r\n\tpublic void addRuleInstances(Digester digester) {\n\t\t digester.addRule(prefix+\"/data-source\",new ObjectCreateRule(\"com.cup.sample.digester.bean.DataSource\", \"className\"));\r\n\t\t digester.addSetProperties(prefix+\"/data-source\");\r\n\t\t\r\n\t}", "private void metricRegistered (ServiceReference srefMetric) {\n // Retrieve the service ID\n Long serviceId =\n (Long) srefMetric.getProperty(Constants.SERVICE_ID);\n logInfo(\"A metric service was registered with ID \" + serviceId);\n \n // Dispose from the list of available metric any old metric, that\n // uses the same ID. Should not be required, as long as metric\n // services got properly unregistered.\n if (registeredMetrics.containsKey(serviceId)) {\n registeredMetrics.remove(serviceId);\n }\n \n // Retrieve information about this metric and add this metric to the\n // list of registered/available metrics\n MetricInfo metricInfo = getMetricInfo(srefMetric);\n registeredMetrics.put(serviceId, metricInfo);\n \n // Search for an applicable configuration set and apply it\n Iterator<String> configSets =\n metricConfigurations.keySet().iterator();\n while (configSets.hasNext()) {\n // Match is performed against the metric's class name(s)\n String className = configSets.next();\n // TODO: It could happen that a service get registered with more\n // than one class. In this case a situation can arise where\n // two or more matching configuration sets exists.\n if (metricInfo.usesClassName(className)) {\n // Apply the current configuration set to this metric\n logInfo(\n \"A configuration set was found for metric with\"\n + \" object class name \" + className\n + \" and service ID \" + serviceId);\n MetricConfig configSet =\n metricConfigurations.get(className);\n \n // Execute the necessary post-registration actions\n if (configSet != null) {\n // Checks if this metric has to be automatically\n // installed upon registration\n if ((configSet.containsKey(MetricConfig.KEY_AUTOINSTALL)\n && (configSet.getString(MetricConfig.KEY_AUTOINSTALL)\n .equalsIgnoreCase(\"true\")))) {\n if (installMetric(serviceId)) {\n logInfo (\n \"The install method of metric with\"\n + \" service ID \" + serviceId\n + \" was successfully executed.\");\n }\n else {\n logError (\n \"The install method of metric with\"\n + \" service ID \" + serviceId\n + \" failed.\");\n }\n }\n }\n }\n }\n }", "void collect(MetricsCollector collector);", "void registerMetricsServlet(final ServletContext servletContext) {\n final ServletRegistration.Dynamic metricsServlet = servletContext.addServlet(\"metricsServlet\", new MetricsServlet());\n metricsServlet.setLoadOnStartup(1);\n metricsServlet.addMapping(\"/metrics/*\");\n }", "public interface MetricsFactoryService {\n\n /**\n * Load MetricsFactory implementation\n *\n * @return load a given MetricsFactory implementation\n */\n MetricsFactory load();\n}", "private void loadManager() {\n LOGGER.info(\"Load metricManager, type: {}\", METRIC_CONFIG.getMetricFrameType());\n ServiceLoader<AbstractMetricManager> metricManagers =\n ServiceLoader.load(AbstractMetricManager.class);\n int size = 0;\n for (AbstractMetricManager mf : metricManagers) {\n size++;\n if (mf.getClass()\n .getName()\n .toLowerCase()\n .contains(METRIC_CONFIG.getMetricFrameType().name().toLowerCase())) {\n metricManager = mf;\n break;\n }\n }\n\n // if no more implementations, we use nothingManager.\n if (size == 0 || metricManager == null) {\n metricManager = new DoNothingMetricManager();\n } else if (size > 1) {\n LOGGER.info(\n \"Detect more than one MetricManager, will use {}\", metricManager.getClass().getName());\n }\n }", "protected void loadReporter() {\n LOGGER.info(\"Load metric reporters, type: {}\", METRIC_CONFIG.getMetricReporterList());\n compositeReporter.clearReporter();\n if (METRIC_CONFIG.getMetricReporterList() == null) {\n return;\n }\n for (ReporterType reporterType : METRIC_CONFIG.getMetricReporterList()) {\n Reporter reporter = null;\n switch (reporterType) {\n case JMX:\n ServiceLoader<JmxReporter> reporters = ServiceLoader.load(JmxReporter.class);\n for (JmxReporter jmxReporter : reporters) {\n if (jmxReporter\n .getClass()\n .getName()\n .toLowerCase()\n .contains(METRIC_CONFIG.getMetricFrameType().name().toLowerCase())) {\n jmxReporter.setMetricManager(metricManager);\n reporter = jmxReporter;\n }\n }\n break;\n case PROMETHEUS:\n reporter = new PrometheusReporter(metricManager);\n break;\n case IOTDB:\n reporter = new IoTDBSessionReporter(metricManager);\n break;\n default:\n break;\n }\n if (reporter == null) {\n LOGGER.warn(\"Failed to load reporter which type is {}\", reporterType);\n continue;\n }\n compositeReporter.addReporter(reporter);\n }\n }", "void deregisterDynamicMetricsProvider(DynamicMetricsProvider metricsProvider);", "@PostConstruct\n\tprivate void registerAllAnalyser() {\n\n\t\t// Get configuration for analysers\n\t\tMap<String, Map<String, String>> analyserProperties = analysisConfiguration.getAnalyserConfig();\n\n\t\t//get all analyser class\n\t\tReflections reflections = new Reflections(\"eu.ill.puma.analysis.analyser\");\n\n\t\t//iterate\n\t\tfor (Class analyserClass : reflections.getTypesAnnotatedWith(Analyser.class)) {\n\n\t\t\t//get annotation\n\t\t\tAnalyser analyser = (Analyser) analyserClass.getAnnotation(Analyser.class);\n\n\t\t\t// create new pool for analyser\n\t\t\tif (analyser != null) {\n\t\t\t\tthis.analyserPools.put(analyser.name(), new AnalyserPool(analyser, analyserClass, analyserProperties.get(analyser.name())));\n\n\t\t\t\tif (analyser.enabled()) {\n\t\t\t\t\tthis.enabledAnalysers.add(analyser.name());\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tlog.error(\"Failed to get instance of analyser with class \" + analyserClass);\n\t\t\t}\n\t\t}\n\t}", "public void register(MetricRegistry registry) {\n timer = registry.timer(\"life.catalogue.parser.name\");\n }", "public interface MetricRegistry {\n\n /**\n * An enumeration representing the scopes of the MetricRegistry\n */\n enum Type {\n /**\n * The Application (default) scoped MetricRegistry. Any metric registered/accessed via CDI will use this\n * MetricRegistry.\n */\n APPLICATION(\"application\"),\n\n /**\n * The Base scoped MetricRegistry. This MetricRegistry will contain required metrics specified in the\n * MicroProfile Metrics specification.\n */\n BASE(\"base\"),\n\n /**\n * The Vendor scoped MetricRegistry. This MetricRegistry will contain vendor provided metrics which may vary\n * between different vendors.\n */\n VENDOR(\"vendor\");\n\n private final String name;\n\n Type(String name) {\n this.name = name;\n }\n\n /**\n * Returns the name of the MetricRegistry scope.\n *\n * @return the scope\n */\n public String getName() {\n return name;\n }\n }\n\n /**\n * Concatenates elements to form a dotted name, eliding any null values or empty strings.\n *\n * @param name\n * the first element of the name\n * @param names\n * the remaining elements of the name\n * @return {@code name} and {@code names} concatenated by periods\n */\n static String name(String name, String... names) {\n List<String> ns = new ArrayList<>();\n ns.add(name);\n ns.addAll(asList(names));\n return ns.stream().filter(part -> part != null && !part.isEmpty()).collect(joining(\".\"));\n }\n\n /**\n * Concatenates a class name and elements to form a dotted name, eliding any null values or empty strings.\n *\n * @param klass\n * the first element of the name\n * @param names\n * the remaining elements of the name\n * @return {@code klass} and {@code names} concatenated by periods\n */\n static String name(Class<?> klass, String... names) {\n return name(klass.getCanonicalName(), names);\n }\n\n /**\n * Given a {@link Metric}, registers it under a {@link MetricID} with the given name and with no tags. A\n * {@link Metadata} object will be registered with the name and type. However, if a {@link Metadata} object is\n * already registered with this metric name and is not equal to the created {@link Metadata} object then an\n * exception will be thrown.\n *\n * @param name\n * the name of the metric\n * @param metric\n * the metric\n * @param <T>\n * the type of the metric\n * @return {@code metric}\n * @throws IllegalArgumentException\n * if the name is already registered or if Metadata with different values has already been registered\n * with the name\n */\n <T extends Metric> T register(String name, T metric) throws IllegalArgumentException;\n\n /**\n * Given a {@link Metric} and {@link Metadata}, registers the metric with a {@link MetricID} with the name provided\n * by the {@link Metadata} and with no tags.\n * <p>\n * Note: If a {@link Metadata} object is already registered under this metric name and is not equal to the provided\n * {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the metadata\n * @param metric\n * the metric\n * @param <T>\n * the type of the metric\n * @return {@code metric}\n * @throws IllegalArgumentException\n * if the name is already registered or if Metadata with different values has already been registered\n * with the name\n *\n * @since 1.1\n */\n <T extends Metric> T register(Metadata metadata, T metric) throws IllegalArgumentException;\n\n /**\n * Given a {@link Metric} and {@link Metadata}, registers both under a {@link MetricID} with the name provided by\n * the {@link Metadata} and with the provided {@link Tag}s.\n * <p>\n * Note: If a {@link Metadata} object is already registered under this metric name and is not equal to the provided\n * {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the metadata\n * @param metric\n * the metric\n * @param <T>\n * the type of the metric\n * @param tags\n * the tags of the metric\n * @return {@code metric}\n * @throws IllegalArgumentException\n * if the name is already registered or if Metadata with different values has already been registered\n * with the name\n *\n * @since 2.0\n */\n <T extends Metric> T register(Metadata metadata, T metric, Tag... tags) throws IllegalArgumentException;\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID} with this name and with no tags; or create and\n * register a new {@link Counter} if none is registered.\n *\n * If a {@link Counter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link Counter}\n */\n Counter counter(String name);\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID} with this name and with the provided\n * {@link Tag}s; or create and register a new {@link Counter} if none is registered.\n *\n * If a {@link Counter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Counter}\n *\n * @since 2.0\n */\n Counter counter(String name, Tag... tags);\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID}; or create and register a new {@link Counter} if\n * none is registered.\n *\n * If a {@link Counter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link Counter}\n *\n * @since 3.0\n */\n Counter counter(MetricID metricID);\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID} with the {@link Metadata}'s name and with no\n * tags; or create and register a new {@link Counter} if none is registered. If a {@link Counter} was created, the\n * provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link Counter}\n */\n Counter counter(Metadata metadata);\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID} with the {@link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register a new {@link Counter} if none is registered. If a {@link Counter}\n * was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Counter}\n *\n * @since 2.0\n */\n Counter counter(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID} with this name; or create and register a\n * new {@link ConcurrentGauge} if none is registered. If a {@link ConcurrentGauge} was created, a {@link Metadata}\n * object will be registered with the name and type.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n */\n ConcurrentGauge concurrentGauge(String name);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID} with this name and with the provided\n * {@link Tag}s; or create and register a new {@link ConcurrentGauge} if none is registered. If a\n * {@link ConcurrentGauge} was created, a {@link Metadata} object will be registered with the name and type.\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n */\n ConcurrentGauge concurrentGauge(String name, Tag... tags);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID}; or create and register a new\n * {@link ConcurrentGauge} if none is registered. If a {@link ConcurrentGauge} was created, a {@link Metadata}\n * object will be registered with the name and type.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n *\n * @since 3.0\n */\n ConcurrentGauge concurrentGauge(MetricID metricID);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID} with the {@link Metadata}'s name; or\n * create and register a new {@link ConcurrentGauge} if none is registered. If a {@link ConcurrentGauge} was\n * created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n */\n ConcurrentGauge concurrentGauge(Metadata metadata);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID} with the {@link Metadata}'s name and\n * with the provided {@link Tag}s; or create and register a new {@link ConcurrentGauge} if none is registered. If a\n * {@link ConcurrentGauge} was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n */\n ConcurrentGauge concurrentGauge(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link Gauge} of type {@link java.lang.Number Number} registered under the {@link MetricID} with this\n * name and with the provided {@link Tag}s; or create and register this gauge if none is registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will apply a {@link java.util.function.Function Function} to the provided object to\n * resolve a {@link java.lang.Number Number} value.\n *\n * @param <T>\n * The Type of the Object of which the function <code>func</code> is applied to\n * @param <R>\n * A {@link java.lang.Number Number}\n * @param name\n * The name of the Gauge metric\n * @param object\n * The object that the {@link java.util.function.Function Function} <code>func</code> will be applied to\n * @param func\n * The {@link java.util.function.Function Function} that will be applied to <code>object</code>\n * @param tags\n * The tags of the metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T, R extends Number> Gauge<R> gauge(String name, T object, Function<T, R> func, Tag... tags);\n\n /**\n * Return the {@link Gauge} of type {@link java.lang.Number Number} registered under the {@link MetricID}; or create\n * and register this gauge if none is registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will apply a {@link java.util.function.Function Function} to the provided object to\n * resolve a {@link java.lang.Number Number} value.\n *\n * @param <T>\n * The Type of the Object of which the function <code>func</code> is applied to\n * @param <R>\n * A {@link java.lang.Number Number}\n * @param metricID\n * The MetricID of the Gauge metric\n * @param object\n * The object that the {@link java.util.function.Function Function} <code>func</code> will be applied to\n * @param func\n * The {@link java.util.function.Function Function} that will be applied to <code>object</code>\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T, R extends Number> Gauge<R> gauge(MetricID metricID, T object, Function<T, R> func);\n\n /**\n * Return the {@link Gauge} of type {@link java.lang.Number Number} registered under the {@link MetricID} with\n * the @{link Metadata}'s name and with the provided {@link Tag}s; or create and register this gauge if none is\n * registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will apply a {@link java.util.function.Function Function} to the provided object to\n * resolve a {@link java.lang.Number Number} value.\n *\n * @param <T>\n * The Type of the Object of which the function <code>func</code> is applied to\n * @param <R>\n * A {@link java.lang.Number Number}\n * @param metadata\n * The Metadata of the Gauge\n * @param object\n * The object that the {@link java.util.function.Function Function} <code>func</code> will be applied to\n * @param func\n * The {@link java.util.function.Function Function} that will be applied to <code>object</code>\n * @param tags\n * The tags of the metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T, R extends Number> Gauge<R> gauge(Metadata metadata, T object, Function<T, R> func, Tag... tags);\n\n /**\n * Return the {@link Gauge} registered under the {@link MetricID} with this name and with the provided {@link Tag}s;\n * or create and register this gauge if none is registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will return the value that the {@link java.util.function.Supplier Supplier} will\n * provide.\n *\n * @param <T>\n * A {@link java.lang.Number Number}\n * @param name\n * The name of the Gauge\n * @param supplier\n * The {@link java.util.function.Supplier Supplier} function that will return the value for the Gauge\n * metric\n * @param tags\n * The tags of the metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T extends Number> Gauge<T> gauge(String name, Supplier<T> supplier, Tag... tags);\n\n /**\n * Return the {@link Gauge} registered under the {@link MetricID}; or create and register this gauge if none is\n * registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will return the value that the {@link java.util.function.Supplier Supplier} will\n * provide.\n *\n * @param <T>\n * A {@link java.lang.Number Number}\n * @param metricID\n * The {@link MetricID}\n * @param supplier\n * The {@link java.util.function.Supplier Supplier} function that will return the value for the Gauge\n * metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T extends Number> Gauge<T> gauge(MetricID metricID, Supplier<T> supplier);\n\n /**\n * Return the {@link Gauge} registered under the {@link MetricID} with the @{link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register this gauge if none is registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will return the value that the {@link java.util.function.Supplier Supplier} will\n * provide.\n *\n * @param <T>\n * A {@link java.lang.Number Number}\n * @param metadata\n * The metadata of the gauge\n * @param supplier\n * The {@link java.util.function.Supplier Supplier} function that will return the value for the Gauge\n * metric\n * @param tags\n * The tags of the metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T extends Number> Gauge<T> gauge(Metadata metadata, Supplier<T> supplier, Tag... tags);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID} with this name and with no tags; or create and\n * register a new {@link Histogram} if none is registered.\n *\n * If a {@link Histogram} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link Histogram}\n */\n Histogram histogram(String name);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID} with this name and with the provided\n * {@link Tag}s; or create and register a new {@link Histogram} if none is registered.\n *\n * If a {@link Histogram} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Histogram}\n *\n * @since 2.0\n */\n Histogram histogram(String name, Tag... tags);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID}; or create and register a new\n * {@link Histogram} if none is registered.\n *\n * If a {@link Histogram} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link Histogram}\n *\n * @since 3.0\n */\n Histogram histogram(MetricID metricID);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID} with the {@link Metadata}'s name and with no\n * tags; or create and register a new {@link Histogram} if none is registered. If a {@link Histogram} was created,\n * the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link Histogram}\n */\n Histogram histogram(Metadata metadata);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID} with the {@link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register a new {@link Histogram} if none is registered. If a\n * {@link Histogram} was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Histogram}\n *\n * @since 2.0\n */\n Histogram histogram(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID} with this name and with no tags; or create and\n * register a new {@link Meter} if none is registered.\n *\n * If a {@link Meter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link Meter}\n */\n Meter meter(String name);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID} with this name and with the provided {@link Tag}s;\n * or create and register a new {@link Meter} if none is registered.\n *\n * If a {@link Meter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Meter}\n *\n * @since 2.0\n */\n Meter meter(String name, Tag... tags);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID}; or create and register a new {@link Meter} if\n * none is registered.\n *\n * If a {@link Meter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link Meter}\n *\n * @since 3.0\n */\n Meter meter(MetricID metricID);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID} with the {@link Metadata}'s name and with no tags;\n * or create and register a new {@link Meter} if none is registered. If a {@link Meter} was created, the provided\n * {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link Meter}\n */\n Meter meter(Metadata metadata);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID} with the {@link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register a new {@link Meter} if none is registered. If a {@link Meter} was\n * created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Meter}\n *\n * @since 2.0\n */\n Meter meter(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link Timer} registered under the {@link MetricID} with this name and with no tags; or create and\n * register a new {@link Timer} if none is registered.\n *\n * If a {@link Timer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link Timer}\n */\n Timer timer(String name);\n\n /**\n * Return the {@link Timer} registered under the {@link MetricID} with this name and with the provided {@link Tag}s;\n * or create and register a new {@link Timer} if none is registered.\n *\n * If a {@link Timer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Timer}\n *\n * @since 2.0\n */\n Timer timer(String name, Tag... tags);\n\n /**\n * Return the {@link Timer} registered under the {@link MetricID}; or create and register a new {@link Timer} if\n * none is registered.\n *\n * If a {@link Timer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link Timer}\n *\n * @since 3.0\n */\n Timer timer(MetricID metricID);\n\n /**\n * Return the {@link Timer} registered under the the {@link MetricID} with the {@link Metadata}'s name and with no\n * tags; or create and register a new {@link Timer} if none is registered. If a {@link Timer} was created, the\n * provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link Timer}\n */\n Timer timer(Metadata metadata);\n\n /**\n * Return the {@link Timer} registered under the the {@link MetricID} with the {@link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register a new {@link Timer} if none is registered. If a {@link Timer} was\n * created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Timer}\n *\n * @since 2.0\n */\n Timer timer(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link SimpleTimer} registered under the {@link MetricID} with this name and with no tags; or create\n * and register a new {@link SimpleTimer} if none is registered.\n *\n * If a {@link SimpleTimer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 2.3\n */\n SimpleTimer simpleTimer(String name);\n\n /**\n * Return the {@link SimpleTimer} registered under the {@link MetricID} with this name and with the provided\n * {@link Tag}s; or create and register a new {@link SimpleTimer} if none is registered.\n *\n * If a {@link SimpleTimer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 2.3\n */\n SimpleTimer simpleTimer(String name, Tag... tags);\n\n /**\n * Return the {@link SimpleTimer} registered under the {@link MetricID}; or create and register a new\n * {@link SimpleTimer} if none is registered.\n *\n * If a {@link SimpleTimer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 3.0\n */\n SimpleTimer simpleTimer(MetricID metricID);\n\n /**\n * Return the {@link SimpleTimer} registered under the the {@link MetricID} with the {@link Metadata}'s name and\n * with no tags; or create and register a new {@link SimpleTimer} if none is registered. If a {@link SimpleTimer}\n * was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 2.3\n */\n SimpleTimer simpleTimer(Metadata metadata);\n\n /**\n * Return the {@link SimpleTimer} registered under the the {@link MetricID} with the {@link Metadata}'s name and\n * with the provided {@link Tag}s; or create and register a new {@link SimpleTimer} if none is registered. If a\n * {@link SimpleTimer} was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 2.3\n */\n SimpleTimer simpleTimer(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link Metric} registered for a provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Metric} registered for the provided {@link MetricID} or {@code null} if none has been\n * registered so far\n *\n * @since 3.0\n */\n Metric getMetric(MetricID metricID);\n\n /**\n * Return the {@link Metric} registered for the provided {@link MetricID} as the provided type.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @param asType\n * the return type which is expected to be compatible with the actual type of the registered metric\n * @return the {@link Metric} registered for the provided {@link MetricID} or {@code null} if none has been\n * registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to the provided type\n *\n * @since 3.0\n */\n <T extends Metric> T getMetric(MetricID metricID, Class<T> asType);\n\n /**\n * Return the {@link Counter} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Counter} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Counter}\n *\n * @since 3.0\n */\n Counter getCounter(MetricID metricID);\n\n /**\n * Return the {@link ConcurrentGauge} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link ConcurrentGauge} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link ConcurrentGauge}\n *\n * @since 3.0\n */\n ConcurrentGauge getConcurrentGauge(MetricID metricID);\n\n /**\n * Return the {@link Gauge} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Gauge} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Gauge}\n *\n * @since 3.0\n */\n Gauge<?> getGauge(MetricID metricID);\n\n /**\n * Return the {@link Histogram} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Histogram} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Histogram}\n *\n * @since 3.0\n */\n Histogram getHistogram(MetricID metricID);\n\n /**\n * Return the {@link Meter} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Meter} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Meter}\n *\n * @since 3.0\n */\n Meter getMeter(MetricID metricID);\n\n /**\n * Return the {@link Timer} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Timer} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Timer}\n *\n * @since 3.0\n */\n Timer getTimer(MetricID metricID);\n\n /**\n * Return the {@link SimpleTimer} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link SimpleTimer} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link SimpleTimer}\n *\n * @since 3.0\n */\n SimpleTimer getSimpleTimer(MetricID metricID);\n\n /**\n * Return the {@link Metadata} for the provided name.\n *\n * @param name\n * the name of the metric\n * @return the {@link Metadata} for the provided name of {@code null} if none has been registered for that name\n *\n * @since 3.0\n */\n Metadata getMetadata(String name);\n\n /**\n * Removes all metrics with the given name.\n *\n * @param name\n * the name of the metric\n * @return whether or not the metric was removed\n */\n boolean remove(String name);\n\n /**\n * Removes the metric with the given MetricID\n *\n * @param metricID\n * the MetricID of the metric\n * @return whether or not the metric was removed\n *\n * @since 2.0\n */\n boolean remove(MetricID metricID);\n\n /**\n * Removes all metrics which match the given filter.\n *\n * @param filter\n * a filter\n */\n void removeMatching(MetricFilter filter);\n\n /**\n * Returns a set of the names of all the metrics in the registry.\n *\n * @return the names of all the metrics\n */\n SortedSet<String> getNames();\n\n /**\n * Returns a set of the {@link MetricID}s of all the metrics in the registry.\n *\n * @return the MetricIDs of all the metrics\n */\n SortedSet<MetricID> getMetricIDs();\n\n /**\n * Returns a map of all the gauges in the registry and their {@link MetricID}s.\n *\n * @return all the gauges in the registry\n */\n SortedMap<MetricID, Gauge> getGauges();\n\n /**\n * Returns a map of all the gauges in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the gauges in the registry\n */\n SortedMap<MetricID, Gauge> getGauges(MetricFilter filter);\n\n /**\n * Returns a map of all the counters in the registry and their {@link MetricID}s.\n *\n * @return all the counters in the registry\n */\n SortedMap<MetricID, Counter> getCounters();\n\n /**\n * Returns a map of all the counters in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the counters in the registry\n */\n SortedMap<MetricID, Counter> getCounters(MetricFilter filter);\n\n /**\n * Returns a map of all the concurrent gauges in the registry and their {@link MetricID}s.\n *\n * @return all the concurrent gauges in the registry\n */\n SortedMap<MetricID, ConcurrentGauge> getConcurrentGauges();\n\n /**\n * Returns a map of all the concurrent gauges in the registry and their {@link MetricID}s which match the given\n * filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the concurrent gauges in the registry\n */\n SortedMap<MetricID, ConcurrentGauge> getConcurrentGauges(MetricFilter filter);\n\n /**\n * Returns a map of all the histograms in the registry and their {@link MetricID}s.\n *\n * @return all the histograms in the registry\n */\n SortedMap<MetricID, Histogram> getHistograms();\n\n /**\n * Returns a map of all the histograms in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the histograms in the registry\n */\n SortedMap<MetricID, Histogram> getHistograms(MetricFilter filter);\n\n /**\n * Returns a map of all the meters in the registry and their {@link MetricID}s.\n *\n * @return all the meters in the registry\n */\n SortedMap<MetricID, Meter> getMeters();\n\n /**\n * Returns a map of all the meters in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the meters in the registry\n */\n SortedMap<MetricID, Meter> getMeters(MetricFilter filter);\n\n /**\n * Returns a map of all the timers in the registry and their {@link MetricID}s.\n *\n * @return all the timers in the registry\n */\n SortedMap<MetricID, Timer> getTimers();\n\n /**\n * Returns a map of all the timers in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the timers in the registry\n */\n SortedMap<MetricID, Timer> getTimers(MetricFilter filter);\n\n /**\n * Returns a map of all the simple timers in the registry and their {@link MetricID}s.\n *\n * @return all the timers in the registry\n */\n SortedMap<MetricID, SimpleTimer> getSimpleTimers();\n\n /**\n * Returns a map of all the simple timers in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the timers in the registry\n */\n SortedMap<MetricID, SimpleTimer> getSimpleTimers(MetricFilter filter);\n\n /**\n * Returns a map of all the metrics in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the metrics in the registry\n *\n * @since 3.0\n */\n SortedMap<MetricID, Metric> getMetrics(MetricFilter filter);\n\n /**\n * Returns a map of all the metrics in the registry and their {@link MetricID}s which match the given filter and\n * which are assignable to the provided type.\n * \n * @param ofType\n * the type to which all returned metrics should be assignable\n * @param filter\n * the metric filter to match\n *\n * @return all the metrics in the registry\n *\n * @since 3.0\n */\n @SuppressWarnings(\"unchecked\")\n <T extends Metric> SortedMap<MetricID, T> getMetrics(Class<T> ofType, MetricFilter filter);\n\n /**\n * Returns a map of all the metrics in the registry and their {@link MetricID}s at query time. The only guarantee\n * about this method is that any key has a value (compared to using {@link #getMetric(MetricID)} and\n * {@link #getMetricIDs()} together).\n *\n * It is <b>only</b> intended for bulk querying, if you need a single or a few entries, always prefer\n * {@link #getMetric(MetricID)} or {@link #getMetrics(MetricFilter)}.\n *\n * @return all the metrics in the registry\n */\n Map<MetricID, Metric> getMetrics();\n\n /**\n * Returns a map of all the metadata in the registry and their names. The only guarantee about this method is that\n * any key has a value (compared to using {@link #getMetadata(String)}.\n *\n * It is <b>only</b> intended for bulk querying, if you need a single or a few metadata, always prefer\n * {@link #getMetadata(String)}}.\n *\n * @return all the metadata in the registry\n */\n Map<String, Metadata> getMetadata();\n\n /**\n * Returns the type of this metric registry.\n *\n * @return Type of this registry (VENDOR, BASE, APPLICATION)\n */\n Type getType();\n\n}", "@Override\n protected void validateConfig() {\n super.validateConfig();\n final int iterations = commonConfig.getIterations();\n queryInstancesAggregates = new MetricAggregates(iterations);\n firstResponseAggregates = new MetricAggregates(iterations);\n firstFrameAggregates = new MetricAggregates(iterations);\n totalAggregates = new MetricAggregates(iterations);\n transferRateAggregates = new MetricAggregates(iterations);\n frameRateAggregates = new MetricAggregates(iterations);\n }", "MetricsFactory getMetricsFactory();", "void reportCustomMetrics(final List<DynatraceCustomMetric> dynatraceCustomMetrics) throws Exception;", "public void registerJMX() {\n Hashtable<String, String> tb = new Hashtable<String, String>();\n tb.put(\"type\", \"statistics\");\n tb.put(\"sessionFactory\", \"HibernateSessionFactory\");\n try {\n ObjectName on = new ObjectName(\"hibernate\", tb);\n MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();\n if (!mbs.isRegistered(on)) {\n StatisticsService stats = new StatisticsService();\n stats.setSessionFactory(getSessionFactory());\n mbs.registerMBean(stats, on);\n ManagementService.registerMBeans(CacheManager.getInstance(),\n mbs, true, true, true, true);\n }\n } catch (Exception e) {\n logger.warn(\"Unable to register Hibernate and EHCache with JMX\");\n }\n\n }", "public MetricRegistry getMetricRegistry();", "private void addDefaultMonitoredPools() {\n\t\tfor (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) {\n\t\t\tif (pool.isUsageThresholdSupported()) {\n\t\t\t\tmonitoredPools.add(pool);\n\t\t\t\tif (CoreMoSyncPlugin.getDefault().isDebugging()) {\n\t\t\t\t\tCoreMoSyncPlugin.trace(\"Monitoring memory pool {0}\", pool.getName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void prepare(Map<String, Object> config, StormMetricsRegistry metricsRegistry) throws MetricException;", "public void addMetric(Set<M> m){\r\n\t\tmetrics.addAll(m);\r\n\t}", "private void registerCaches(){\n // Initialize region arraylist\n prisoners = new HashMap<>();\n regions = QueryManager.getRegions();\n prisonBlocks = QueryManager.getPrisonBlocks();\n portals = QueryManager.getPortals();\n }", "private void registerDevice(MeasurementDevice inDevice) {\r\n\r\n\t\tfor (String lCurrMeasureId : inDevice.getSupportedMeasureIds()) {\r\n\r\n\t\t\tList<Measure> lDeviceMeasures = measures.get(inDevice.getId());\r\n\t\t\tif (lDeviceMeasures == null) {\r\n\t\t\t\tlDeviceMeasures = new ArrayList<>();\r\n\t\t\t\tmeasures.put(inDevice.getId(), lDeviceMeasures);\r\n\t\t\t} // if\r\n\t\t\tlDeviceMeasures.add(MeasureFactory.createMeasure(inDevice, lCurrMeasureId));\r\n\t\t} // for\r\n\r\n\t\tMeasureCacheAdapter lCacheAdapter = new MeasureCacheAdapterImpl(measures.get(inDevice.getId()));\r\n\t\tmeasureListeners.forEach(l -> lCacheAdapter.addMeasureListener(l));\r\n\t\tinDevice.setMeasureCacheAdapter(lCacheAdapter);\r\n\t}", "private void registerListeners(){\n\n //!!!Sensor delay can also be expressed as an int in microseconds, and can use an extra int to give max queue time\n //sampling period is considered a suggestion, and must be in microseconds\n //IMPORTANT TO USE QUEUE. drastically reduced battery consumption\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY );\n\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY);\n\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY);\n\n\n /* //This is for raw PPG data on Polar watches, not implemented\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(65545),\n SensorManager.SENSOR_DELAY_NORMAL);\n */\n }", "private void initReporter() {\n String reporterType = getConfigValue(\"type\", DEFAULT_REPORTER_TYPE);\n // System.getProperty(\"com.argo.metrics.reporter.type\", DEFAULT_REPORTER_TYPE);\n String reporterInterval = getConfigValue(\"interval\", DEFAULT_REPORTER_INTERVAL);\n //System.getProperty(\"com.argo.metrics.reporter.interval\", DEFAULT_REPORTER_INTERVAL);\n String reporterDir = getConfigValue(\"outdir\", DEFAULT_REPORTER_OUTDIR);\n //System.getProperty(\"com.argo.metrics.reporter.outdir\", DEFAULT_REPORTER_OUTDIR);\n\n if(reporterType.equals(\"console\")) {\n final ConsoleReporter reporter = ConsoleReporter.forRegistry(registry)\n .convertRatesTo(TimeUnit.SECONDS)\n .convertDurationsTo(TimeUnit.SECONDS)\n .build();\n reporter.start(Integer.parseInt(reporterInterval), TimeUnit.SECONDS);\n } else if (reporterType.equals(\"jmx\")) {\n final JmxReporter reporter = JmxReporter.forRegistry(registry)\n .convertRatesTo(TimeUnit.SECONDS)\n .convertDurationsTo(TimeUnit.SECONDS)\n .build();\n reporter.start();\n } else if (reporterType.equals(\"csv\")) {\n final CsvReporter reporter = CsvReporter.forRegistry(registry)\n .convertRatesTo(TimeUnit.SECONDS)\n .convertDurationsTo(TimeUnit.SECONDS)\n .build(new File(reporterDir));\n reporter.start(Integer.parseInt(reporterInterval), TimeUnit.SECONDS);\n } else if (reporterType.equals(\"slf4j\")) {\n final Slf4jReporter reporter = Slf4jReporter.forRegistry(registry)\n .convertRatesTo(TimeUnit.SECONDS)\n .convertDurationsTo(TimeUnit.SECONDS)\n .outputTo(LoggerFactory.getLogger(MetricCollector.class))\n .build();\n reporter.start(Integer.parseInt(reporterInterval), TimeUnit.SECONDS);\n } else {\n throw new IllegalStateException(\"Unknown Metrics Reporter Type: \" + reporterType);\n }\n }", "public BasicServerMetricsListener() {\n myServerMetrics = new ConcurrentHashMap<String, BasicServerMetrics>();\n }", "MetricsRegistry getMetrics2Registry() {\n return metrics2Registry;\n }", "private void scanAndRegisterTypes() throws Exception {\n ScannedClassLoader scl = ScannedClassLoader.getSystemScannedClassLoader();\n // search annotations\n Iterator<Metadata> it = scl.getAll(MetadataType.class, Metadata.class); //CellFactorySPI.class);\n logger.log(Level.INFO, \"[Metadata Service] about to search classloader\");\n while (it.hasNext()) {\n Metadata metadata = it.next();\n logger.log(Level.INFO, \"[Metadata Service] using system scl, scanned type:\" + metadata.simpleName());\n registerMetadataType(metadata);\n }\n }", "@Override\n public void onStart() {\n if (SystemMetricsService.getProvider() == null)\n throw new IllegalStateException(\"SystemMetricsRecorderJob will not start as no SystemMetricsServiceProvider is registered for this platform\");\n\n DataSourceModel dataSourceModel = DataSourceModelService.getDefaultDataSourceModel();\n // Starting a periodic timer to capture metrics every seconds and record it in the database\n metricsCapturePeriodicTimer = Scheduler.schedulePeriodic(1000, () -> {\n // Creating an update store for metrics entity\n UpdateStore store = UpdateStore.create(dataSourceModel);\n // Instantiating a new system metrics entity and asking the system metrics service to fill that entity\n SystemMetricsService.takeSystemMetricsSnapshot(store.insertEntity(SystemMetricsEntity.class));\n // Submitting this new record into the database\n store.submitChanges().setHandler(asyncResult -> {\n if (asyncResult.failed())\n Logger.log(\"Inserting metrics in database failed!\", asyncResult.cause());\n });\n });\n\n // Deleting old metrics records (older than 1 day) regularly (every 12h)\n metricsCleaningPeriodicTimer = Scheduler.schedulePeriodic(12 * 3600 * 1000, () ->\n SubmitService.executeSubmit(SubmitArgument.builder()\n .setLanguage(\"DQL\")\n .setStatement(\"delete Metrics where LtTestSet is null and date < ?\")\n .setParameters(Instant.now().minus(1, ChronoUnit.DAYS))\n .setDataSourceId(dataSourceModel.getDataSourceId())\n .build()\n ).setHandler(ar -> {\n if (ar.failed())\n Logger.log(\"Deleting metrics in database failed!\", ar.cause());\n else\n Logger.log(\"\" + ar.result().getRowCount() + \" metrics records have been deleted from the database\");\n }));\n }", "@Override\n\tpublic void addResourceHandlers(ResourceHandlerRegistry registry) {\n\t\t// add a cache period of one week to static resources returned by Tomcat\n\t\tregistry.addResourceHandler(\"/resources/**\")\n\t\t\t\t.addResourceLocations(\"/resources/\")\n\t\t\t\t.setCachePeriod( 604800 ); // one week in seconds\n\t}", "@Override\n public void configureReporters(MetricRegistry metricRegistry) {\n\n\n registerReporter(ConsoleReporter\n .forRegistry(metricRegistry)\n .outputTo(System.out)\n .filter(MetricFilter.ALL)\n .build())\n .start(300, TimeUnit.SECONDS);\n\n }", "protected final void registerMeasure(String inId) {\r\n\t\tmeasureIds.add(inId);\r\n\t}", "void initialize() {\n for (Map.Entry<String, Gauge<Long>> entry : gaugeList.entrySet()) {\n registerWithSuffix(entry.getKey(), 0, entry.getValue());\n }\n }", "boolean registerMetric(Class<? extends Metric> metricType);", "@SneakyThrows\n protected void addSourceResource() {\n if (databaseType instanceof MySQLDatabaseType) {\n try (Connection connection = DriverManager.getConnection(getComposedContainer().getProxyJdbcUrl(\"\"), \"root\", \"root\")) {\n connection.createStatement().execute(\"USE sharding_db\");\n addSourceResource0(connection);\n }\n } else {\n Properties queryProps = ScalingCaseHelper.getPostgreSQLQueryProperties();\n try (Connection connection = DriverManager.getConnection(JDBC_URL_APPENDER.appendQueryProperties(getComposedContainer().getProxyJdbcUrl(\"sharding_db\"), queryProps), \"root\", \"root\")) {\n addSourceResource0(connection);\n }\n }\n List<Map<String, Object>> resources = queryForListWithLog(\"SHOW DATABASE RESOURCES FROM sharding_db\");\n assertThat(resources.size(), is(2));\n }", "void addSinks(McastRoute route, Set<ConnectPoint> sinks);", "public void addPreferredDataSources(Collection<DataSource> sources) {\n if (containsDataSource(sources)) { // there are duplicates so trim the collection\n removeIdenticalDataSources(sources);\n } \n datasources.addAll(0,sources);\n }", "@PostConstruct\n public void init() {\n for (final Entry<String, Set<String>> aggregateEntry : processor.getTaskIndex().entrySet()) {\n final AggregateStopwatch stopwatchEntry = new AggregateStopwatch();\n\n aggregatedTasks.put(aggregateEntry.getKey(), stopwatchEntry);\n\n for (final String nameEntry : aggregateEntry.getValue()) {\n logger.info(\"adding stopwatchEntry - aggregate: \" + aggregateEntry.getKey() + \" task: \" + nameEntry);\n stopwatchEntry.getTimedTasks().put(nameEntry, new TaskStopwatch());\n }\n }\n }", "static private void populateCache() {\n if (cacheIsPopulated) {\n return;\n }\n cacheIsPopulated = true;\n\n /* Schema:\n *\n * units{\n * duration{\n * day{\n * one{\"{0} ден\"}\n * other{\"{0} дена\"}\n * }\n */\n\n // Load the unit types. Use English, since we know that that is a superset.\n ICUResourceBundle rb1 = (ICUResourceBundle) UResourceBundle.getBundleInstance(\n ICUData.ICU_UNIT_BASE_NAME,\n \"en\");\n rb1.getAllItemsWithFallback(\"units\", new MeasureUnitSink());\n\n // Load the currencies\n ICUResourceBundle rb2 = (ICUResourceBundle) UResourceBundle.getBundleInstance(\n ICUData.ICU_BASE_NAME,\n \"currencyNumericCodes\",\n ICUResourceBundle.ICU_DATA_CLASS_LOADER);\n rb2.getAllItemsWithFallback(\"codeMap\", new CurrencyNumericCodeSink());\n }", "private synchronized void loadProcessors() {\n if (loaded)\n return;\n\n // Get the processor service declarations\n Set<ServiceDeclaration> processorDeclarations; \n try {\n processorDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(URLArtifactProcessor.class);\n } catch (IOException e) {\n \tIllegalStateException ie = new IllegalStateException(e);\n \terror(\"IllegalStateException\", staxProcessor, ie);\n throw ie;\n }\n \n for (ServiceDeclaration processorDeclaration: processorDeclarations) {\n Map<String, String> attributes = processorDeclaration.getAttributes();\n // Load a URL artifact processor\n String artifactType = attributes.get(\"type\");\n String modelTypeName = attributes.get(\"model\");\n \n // Create a processor wrapper and register it\n URLArtifactProcessor processor = new LazyURLArtifactProcessor(artifactType, modelTypeName, \n \t\tprocessorDeclaration, extensionPoints, staxProcessor, monitor);\n addArtifactProcessor(processor);\n }\n \n loaded = true;\n }", "public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry registry)\n/* */ {\n/* 48 */ if (!ADFRuntime.getRuntime().isClientSide())\n/* */ {\n/* 50 */ return;\n/* */ }\n/* */ \n/* 53 */ ADFConfigHelper.initConfig();\n/* 54 */ ADFConfigHelper.initLog4j();\n/* 55 */ ADFBeanDefinitionRegistryRegister scanner = new ADFBeanDefinitionRegistryRegister(registry);\n/* 56 */ Class[] typeClasses = { InternalBeanInstantiationAwareBeanPostProcessor.class, InternalBeanPosterProcessor.class, ApplicationStartedListener.class, ApplicationContextBeansAware.class };\n/* */ \n/* 58 */ scanner.register(typeClasses);\n/* */ \n/* */ \n/* 61 */ scanner.register(new Class[] { BeanAdditionalPropertyGenerator.class });\n/* */ \n/* */ \n/* 64 */ ADFClassPathBeanDefinitionScanner classPathBeanDefinitionScanner = new ADFClassPathBeanDefinitionScanner(registry, true);\n/* */ \n/* 66 */ if (StringUtils.isNotEmpty(\"com.jnj.adf.grid,com.jnj.adf.client.api\"))\n/* */ {\n/* 68 */ String[] basePackages = \"com.jnj.adf.grid,com.jnj.adf.client.api\".split(\",\");\n/* 69 */ classPathBeanDefinitionScanner.scan(basePackages);\n/* */ }\n/* */ }", "@SuppressWarnings(\"unused\")\n @CalledByNative\n private void onMetricsCollected(long requestStartMs, long dnsStartMs, long dnsEndMs,\n long connectStartMs, long connectEndMs, long sslStartMs, long sslEndMs,\n long sendingStartMs, long sendingEndMs, long pushStartMs, long pushEndMs,\n long responseStartMs, long requestEndMs, boolean socketReused, long sentByteCount,\n long receivedByteCount) {\n synchronized (mNativeStreamLock) {\n try {\n if (mMetrics != null) {\n throw new IllegalStateException(\"Metrics collection should only happen once.\");\n }\n mMetrics = new CronetMetrics(requestStartMs, dnsStartMs, dnsEndMs, connectStartMs,\n connectEndMs, sslStartMs, sslEndMs, sendingStartMs, sendingEndMs,\n pushStartMs, pushEndMs, responseStartMs, requestEndMs, socketReused,\n sentByteCount, receivedByteCount);\n assert mReadState == mWriteState;\n assert (mReadState == State.SUCCESS) || (mReadState == State.ERROR)\n || (mReadState == State.CANCELED);\n int finishedReason;\n if (mReadState == State.SUCCESS) {\n finishedReason = RequestFinishedInfo.SUCCEEDED;\n } else if (mReadState == State.CANCELED) {\n finishedReason = RequestFinishedInfo.CANCELED;\n } else {\n finishedReason = RequestFinishedInfo.FAILED;\n }\n final RequestFinishedInfo requestFinishedInfo =\n new RequestFinishedInfoImpl(mInitialUrl, mRequestAnnotations, mMetrics,\n finishedReason, mResponseInfo, mException);\n mRequestContext.reportRequestFinished(\n requestFinishedInfo, mInflightDoneCallbackCount);\n } finally {\n mInflightDoneCallbackCount.decrement();\n }\n }\n }", "private void loadRules2() {\n\t\t\r\n\t\tint type = Integer.valueOf(env.getProperty(\"sentinel.server.type\")) ;\r\n\t\t\r\n String appId = \"sentinel-demo\";\r\n String apolloMetaServerAddress = \"http://10.1.77.106:8080\";\r\n System.setProperty(\"app.id\", appId);\r\n System.setProperty(\"apollo.meta\", apolloMetaServerAddress);\r\n\r\n String namespaceName = \"application\";\r\n String flowRuleKey = \"flowRules\";\r\n // It's better to provide a meaningful default value.\r\n String defaultFlowRules = \"[]\";\r\n\r\n ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new ApolloDataSource<>(namespaceName,\r\n flowRuleKey, defaultFlowRules, source -> JSON.parseObject(source, new TypeReference<List<FlowRule>>() {\r\n }));\r\n FlowRuleManager.register2Property(flowRuleDataSource.getProperty());\r\n ClusterFlowRuleManager.setPropertySupplier(namespace ->flowRuleDataSource.getProperty());\r\n \r\n\r\n\t\tif (ClusterStateManager.CLUSTER_SERVER == type) \r\n\t\t{\r\n\t\t\tClusterStateManager.applyState(ClusterStateManager.CLUSTER_SERVER);\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tClusterStateManager.applyState(ClusterStateManager.CLUSTER_CLIENT);\r\n\t\t\tinitClientConfigProperty(namespaceName);\r\n\t\t\tinitClientServerAssignProperty(namespaceName);\r\n\t\t}\r\n \r\n \r\n \r\n \r\n }", "public static void initializeMetrics()\n {\n // Get the Java runtime\n Runtime runtime = Runtime.getRuntime();\n // Run the garbage collector\n runtime.gc();\n \tstartingMemory = runtime.totalMemory() - runtime.freeMemory();\n }", "private void initConfigServices() {\n List<ServiceDTO> customizedConfigServices = getCustomizedConfigService();\n\n if (customizedConfigServices != null) {\n setConfigServices(customizedConfigServices);\n return;\n }\n\n // update from meta service\n this.tryUpdateConfigServices();\n this.schedulePeriodicRefresh();\n }", "public void addMetric(M wm){\r\n\t\tmetrics.add(wm);\r\n\t}", "public Builder metrics(Collection<Metric> metrics) {\n this.metrics = metrics;\n return this;\n }", "public void addDataSources(Collection<DataSource> sources) {\n if (containsDataSource(sources)) { // there are duplicates so trim the collection\n removeIdenticalDataSources(sources);\n }\n datasources.addAll(sources);\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n DoubleProbeFunction<S> probe);", "MetricRegistry scope(String name);", "public HazelcastMetricsExports(final HazelcastInstance hazelcastInstance) {\n// new HazelcastInfoExports(hazelcastInstance).register();\n// new HazelcastClusterInfoExports(hazelcastInstance).register();\n// hazelcastStateExporters = new HazelcastStateExporters(hazelcastInstance);\n //new HazelcastInternalsExporters(hazelcastInstance);\n }", "private void scan() {\n final ClassGraph classGraph = new ClassGraph();\n classGraph.enableAnnotationInfo().ignoreClassVisibility().blacklistLibOrExtJars()\n .removeTemporaryFilesAfterScan();\n if (whitelistedPackagesList.size() > 0) {\n classGraph.whitelistPackages(whitelistedPackagesList.toArray(new String[0]));\n }\n if (blacklistedPackagesList.size() > 0) {\n classGraph.blacklistPackages(blacklistedPackagesList.toArray(new String[0]));\n }\n final ScanResult scanResult = classGraph.scan();\n final ClassInfoList classInfoList = scanResult.getClassesWithAnnotation(MetricClass.class.getName());\n final Set<Class<?>> monitorClasses = new HashSet<>();\n monitorClasses.addAll(classInfoList.loadClasses(true));\n final List<CompositeData> metricClassCompositesList = new ArrayList<>();\n for (Class<?> monitorClass : monitorClasses) {\n try {\n final CompositeData metricClassComposite = new MonitorCompositeDataBuilder(monitorClass).getMetricClassData();\n metricClassCompositesList.add(metricClassComposite);\n } catch (OpenDataException ox) {\n logger.error(\"Build monitor metricaAnnotation failed: \" + monitorClass.getName());\n }\n }\n\n final int monitorCount = metricClassCompositesList.size();\n final String[] monitorKey = new String[monitorCount];\n final String[] monitorKeyDescription = new String[monitorCount];\n @SuppressWarnings(\"rawtypes\")\n final OpenType[] monitorType = new OpenType[monitorCount];\n final CompositeData[] metricClassComposites = metricClassCompositesList.toArray(new CompositeData[0]);\n for (int j = 0; j < metricClassComposites.length; j++) {\n final CompositeData metricClassComposite = metricClassComposites[j];\n monitorKey[j] = metricClassComposite.getCompositeType().getTypeName();\n monitorKeyDescription[j] = metricClassComposite.getCompositeType().getDescription();\n monitorType[j] = metricClassComposite.getCompositeType();\n }\n\n try {\n final CompositeType allMonitorCompositeType = new CompositeType(\"Monitor Metric\", \"Monitor Metric Info\", monitorKey,\n monitorKeyDescription, monitorType);\n allMonitorCompositeData = new CompositeDataSupport(allMonitorCompositeType, monitorKey, metricClassComposites);\n } catch (final OpenDataException ox) {\n logger.error(\"Creating CompositeData failed\", ox);\n }\n }", "private void registerAvailableSerializers() {\r\n LOG.info(\"Registering available serializer object\");\r\n mSerializers.put(XML, new XmlObjectBaseSerializer());\r\n mSerializers.put(PHP, new PHPObjectBaseSerializer());\r\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n ProbeFunction function);", "@Override\n\tpublic void addResourceHandlers(final ResourceHandlerRegistry registry) {\n\n\t\tSystem.out.println(\"execution is reaching addResourceHandlers()\");\n\t\tsuper.addResourceHandlers(registry);\n\t\tregistry.addResourceHandler(\"/images/**\").addResourceLocations(\"/resources/images/\").setCachePeriod(0);\n\t\tregistry.addResourceHandler(\"/js/**\").addResourceLocations(\"/resources/js/\").setCachePeriod(0);\n\t\tregistry.addResourceHandler(\"/css/**\").addResourceLocations(\"/resources/css/\").setCachePeriod(0);\n\t\tregistry.addResourceHandler(\"/fonts/**\").addResourceLocations(\"/resources/fonts/\").setCachePeriod(0);\n\t\t// this is one year cache period 31556926\n\t}", "public void addMetrics(String value) {\n value.getClass();\n ensureMetricsIsMutable();\n this.metrics_.add(value);\n }", "@Override\n public void addResourceHandlers(final ResourceHandlerRegistry registry) {\n registry.addResourceHandler(\"/resources/**\").addResourceLocations(\"/resources/\").setCachePeriod(31556926);\n }", "private void addConverter() {\n Map<String, String> ruleRegistry = (Map<String, String>) context.getObject(CoreConstants.PATTERN_RULE_REGISTRY);\n if (ruleRegistry == null) {\n ruleRegistry = new HashMap<String, String>();\n context.putObject(CoreConstants.PATTERN_RULE_REGISTRY, ruleRegistry);\n }\n ruleRegistry.putIfAbsent(CensorConstants.CENSOR_RULE_NAME, CensorConverter.class.getName());\n }", "void storeSources(McastRoute route, Set<ConnectPoint> sources);", "public static void registerMeters(StormMetricsRegistry registry) {\n \n registry.registerMeter(NUM_FILE_OPEN_EXCEPTIONS);\n registry.registerMeter(NUM_FILE_READ_EXCEPTIONS);\n registry.registerMeter(NUM_FILE_REMOVAL_EXCEPTIONS);\n registry.registerMeter(NUM_FILE_DOWNLOAD_EXCEPTIONS);\n registry.registerMeter(NUM_SET_PERMISSION_EXCEPTIONS);\n registry.registerMeter(NUM_CLEANUP_EXCEPTIONS);\n registry.registerMeter(NUM_READ_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_READ_DAEMON_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_LIST_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_LIST_DUMP_EXCEPTIONS);\n registry.registerMeter(NUM_DOWNLOAD_DUMP_EXCEPTIONS);\n registry.registerMeter(NUM_DOWNLOAD_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_DOWNLOAD_DAEMON_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_SEARCH_EXCEPTIONS);\n }", "private void scanJsonResponseforMetrics(JSONObject jsonObject, List<MetricConfig> actualMetricConfigs) {\n JSONArray metricDefinitions = jsonObject.getJSONArray(\"value\");\n for (int i = 0; i < metricDefinitions.length(); i++) {\n MetricConfig newConfig = new MetricConfig();\n String name = ((JSONObject) ((JSONObject) metricDefinitions.get(i)).get(\"name\")).getString(\"value\");\n newConfig.setAttr(name);\n newConfig.setAlias(name);\n newConfig.setAggregationType(((JSONObject) metricDefinitions.get(i)).getString(\"primaryAggregationType\"));\n String timespan = ((JSONObject) ((JSONArray) (((JSONObject) metricDefinitions.get(i)).get(\"metricAvailabilities\"))).get(0)).getString(\"timeGrain\");\n newConfig.setTimeSpan(timespan);\n actualMetricConfigs.add(newConfig);\n }\n }", "@Override\n\tprotected void customizeRegistration(Dynamic registration) {\n\tsuper.customizeRegistration(registration);\n\t}", "protected void addedServer(final BasicServerMetrics metrics) {\n // Nothing - Extension point.\n }", "public interface CacheProviders {\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Topic>>> getTopics(Observable<List<Topic>> topics, DynamicKeyGroup nodeIdAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Topic>>> getUserCreateTopics(Observable<List<Topic>> topics, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Topic>>> getUserFavorites(Observable<List<Topic>> topics, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<TopicDetail>> getTopicDetail(Observable<TopicDetail> topic, DynamicKey id, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<UserDetailInfo>> getUserInfo(Observable<UserDetailInfo> user, DynamicKey id, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<News>>> getNews(Observable<List<News>> news, DynamicKeyGroup nodeIdAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Notification>>> getNotifications (Observable<List<Notification>> notifications, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Site>>> getSite(Observable<List<Site>> sites, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<UserInfo>>> getUserFollowing(Observable<List<UserInfo>> users, DynamicKeyGroup usernameAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<com.example.bill.epsilon.bean.topic.Reply>>> getUserReplies(Observable<List<com.example.bill.epsilon.bean.topic.Reply>> replies, DynamicKeyGroup usernameAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<TopicReply>>> getReplies(Observable<List<TopicReply>> replies, DynamicKeyGroup idAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Node>>> readNodes(Observable<List<Node>> nodes, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<NewsNode>>> readNewsNodes(Observable<List<NewsNode>> nodes, EvictProvider evictProvider);\n}", "public synchronized void addMetricSet(IMetricSet metricSet) {\n if (!metricSets.contains(metricSet)) {\n metricSet.bindTo(this);\n metricSets.add(metricSet);\n }\n }", "public abstract CustomMetric[] getCustomMetrics();", "private void setupCharts(Metrics metrics) {\n // language in config\n metrics.addCustomChart(new SimplePie(\"used_language\", () ->\n getConfig().getString(\"language\", \"auto\")));\n\n metrics.addCustomChart(new SimplePie(\"default_locale\", () ->\n Locale.getDefault().toLanguageTag()));\n\n // encoding in config\n metrics.addCustomChart(new SimplePie(\"encoding\", () ->\n getConfig().getString(\"encoding\", \"UTF-8\")));\n\n // tradeWithMoney in config\n metrics.addCustomChart(new SimplePie(\"money_enabled\", () ->\n getConfig().getBoolean(\"tradeWithMoney\", true) ? \"enabled\" : \"disabled\"));\n\n // noDebts in config\n metrics.addCustomChart(new SimplePie(\"no_debts_enabled\", () ->\n getConfig().getBoolean(\"noDebts\", true) ? \"enabled\" : \"disabled\"));\n\n // maxTradingDistance in config\n metrics.addCustomChart(new SimplePie(\"max_trading_distance\", () ->\n String.valueOf(getConfig().getInt(\"maxTradingDistance\", 15))));\n\n // tradeThroughWorlds in config\n metrics.addCustomChart(new SimplePie(\"trade_through_worlds_enabled\", () ->\n getConfig().getBoolean(\"tradeThroughWorlds\", false) ? \"enabled\" : \"disabled\"));\n\n // fastTrade in config\n metrics.addCustomChart(new SimplePie(\"fast_trade_enabled\", () ->\n getConfig().getBoolean(\"fastTrade\", false) ? \"enabled\" : \"disabled\"));\n\n // successful trades\n metrics.addCustomChart(new SingleLineChart(\"successful_trades\", () -> successfulTrades));\n\n // aborted trades\n metrics.addCustomChart(new SingleLineChart(\"aborted_trades\", () -> abortedTrades));\n\n // Is Vault used?\n metrics.addCustomChart(new SimplePie(\"vault_used\", () -> hasVault ? \"Used\" : \"Not used\"));\n\n // The used economy plugin\n metrics.addCustomChart(new SimplePie(\"economy_plugin\", () -> economyName));\n\n // Download source\n metrics.addCustomChart(new SimplePie(\"download_source\", () -> {\n // Now the only source.\n return \"spigotmc.org\";\n }));\n }", "public void visit(ASTNode[] nodes, SourceUnit source) {\n checkNodesForAnnotationAndType(nodes[0], nodes[1]);\n addDataSourceHandlerIfNeeded(source, (AnnotationNode) nodes[0], (ClassNode) nodes[1]);\n }", "void generateDataSourceAttributeDefsByDataSourceType(String serverId, String dataSourceType, String pathToDataSourceAttrDefs, String pathToServersXML) throws CompositeException;", "private void populateCharts() {\n\t\tpopulatePieChart1();\n\t\tpopulatePieChart2();\n\t\tpopulateBarChart1();\n\t\tpopulateBarChart2();\n\t}", "@Override\n public void afterPropertiesSet() throws Exception {\n GuavaCacheMetrics.monitor(\n registry,\n cache,\n \"serialLookupCache\",\n Collections.singleton(Tag.of(StoreMetrics.TAG_STORE_KEY, StoreMetrics.TAG_STORE_VALUE)));\n }", "private void fillMonitorsMetricsMap() {\n\t\tmonitorsMetricsMap=new HashMap<>();\n\t\tmonitorsMetricsMap.put(\"RR<sub>TOT</sub>\", new String[] {rosetta.MDC_RESP_RATE.VALUE, \"MDC_DIM_RESP_PER_MIN\"});\n\t\tmonitorsMetricsMap.put(\"EtCO<sub>2</sub>\", new String[] {rosetta.MDC_AWAY_CO2_ET.VALUE, rosetta.MDC_DIM_MMHG.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PEAK</sub>\", new String[] {rosetta.MDC_PRESS_AWAY_INSP_PEAK.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PLAT</sub>\", new String[] {rosetta.MDC_PRESS_RESP_PLAT.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"PEEP\", new String[] {\"ICE_PEEP\", rosetta.MDC_DIM_CM_H2O.VALUE});\t//TODO: Confirm there is no MDC_ for PEEP\n\t\tmonitorsMetricsMap.put(\"FiO<sub>2</sub>%\", new String[] {\"ICE_FIO2\", rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\tmonitorsMetricsMap.put(\"Leak %\", new String[] {rosetta.MDC_VENT_VOL_LEAK.VALUE, rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\t\n\t\t//Leak %\n\t}", "public interface RateLimiterRegistry extends Registry<RateLimiter, RateLimiterConfig> {\n\n /**\n * Creates a RateLimiterRegistry with a custom RateLimiter configuration.\n *\n * @param defaultRateLimiterConfig a custom RateLimiter configuration\n * @return a RateLimiterRegistry instance backed by a custom RateLimiter configuration\n */\n static RateLimiterRegistry of(RateLimiterConfig defaultRateLimiterConfig) {\n return new InMemoryRateLimiterRegistry(defaultRateLimiterConfig);\n }\n\n /**\n * Creates a RateLimiterRegistry with a custom default RateLimiter configuration and a\n * RateLimiter registry event consumer.\n *\n * @param defaultRateLimiterConfig a custom default RateLimiter configuration.\n * @param registryEventConsumer a RateLimiter registry event consumer.\n * @return a RateLimiterRegistry with a custom RateLimiter configuration and a RateLimiter\n * registry event consumer.\n */\n static RateLimiterRegistry of(RateLimiterConfig defaultRateLimiterConfig,\n RegistryEventConsumer<RateLimiter> registryEventConsumer) {\n return new InMemoryRateLimiterRegistry(defaultRateLimiterConfig, registryEventConsumer);\n }\n\n /**\n * Creates a RateLimiterRegistry with a custom default RateLimiter configuration and a list of\n * RateLimiter registry event consumers.\n *\n * @param defaultRateLimiterConfig a custom default RateLimiter configuration.\n * @param registryEventConsumers a list of RateLimiter registry event consumers.\n * @return a RateLimiterRegistry with a custom RateLimiter configuration and a list of\n * RateLimiter registry event consumers.\n */\n static RateLimiterRegistry of(RateLimiterConfig defaultRateLimiterConfig,\n List<RegistryEventConsumer<RateLimiter>> registryEventConsumers) {\n return new InMemoryRateLimiterRegistry(defaultRateLimiterConfig, registryEventConsumers);\n }\n\n /**\n * Returns a managed {@link RateLimiterConfig} or creates a new one with a default RateLimiter\n * configuration.\n *\n * @return The {@link RateLimiterConfig}\n */\n static RateLimiterRegistry ofDefaults() {\n return new InMemoryRateLimiterRegistry(RateLimiterConfig.ofDefaults());\n }\n\n /**\n * Creates a ThreadPoolBulkheadRegistry with a Map of shared RateLimiter configurations.\n *\n * @param configs a Map of shared RateLimiter configurations\n * @return a ThreadPoolBulkheadRegistry with a Map of shared RateLimiter configurations.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs) {\n return new InMemoryRateLimiterRegistry(configs);\n }\n\n /**\n * Creates a ThreadPoolBulkheadRegistry with a Map of shared RateLimiter configurations.\n * <p>\n * Tags added to the registry will be added to every instance created by this registry.\n *\n * @param configs a Map of shared RateLimiter configurations\n * @param tags default tags to add to the registry\n * @return a ThreadPoolBulkheadRegistry with a Map of shared RateLimiter configurations.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs, Map<String, String> tags) {\n return new InMemoryRateLimiterRegistry(configs, tags);\n }\n\n /**\n * Creates a RateLimiterRegistry with a Map of shared RateLimiter configurations and a\n * RateLimiter registry event consumer.\n *\n * @param configs a Map of shared RateLimiter configurations.\n * @param registryEventConsumer a RateLimiter registry event consumer.\n * @return a RateLimiterRegistry with a Map of shared RateLimiter configurations and a\n * RateLimiter registry event consumer.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs,\n RegistryEventConsumer<RateLimiter> registryEventConsumer) {\n return new InMemoryRateLimiterRegistry(configs, registryEventConsumer);\n }\n\n /**\n * Creates a RateLimiterRegistry with a Map of shared RateLimiter configurations and a\n * RateLimiter registry event consumer.\n *\n * @param configs a Map of shared RateLimiter configurations.\n * @param registryEventConsumer a RateLimiter registry event consumer.\n * @param tags default tags to add to the registry\n * @return a RateLimiterRegistry with a Map of shared RateLimiter configurations and a\n * RateLimiter registry event consumer.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs,\n RegistryEventConsumer<RateLimiter> registryEventConsumer, Map<String, String> tags) {\n return new InMemoryRateLimiterRegistry(configs, registryEventConsumer, tags);\n }\n\n /**\n * Creates a RateLimiterRegistry with a Map of shared RateLimiter configurations and a list of\n * RateLimiter registry event consumers.\n *\n * @param configs a Map of shared RateLimiter configurations.\n * @param registryEventConsumers a list of RateLimiter registry event consumers.\n * @return a RateLimiterRegistry with a Map of shared RateLimiter configurations and a list of\n * RateLimiter registry event consumers.\n */\n static RateLimiterRegistry of(Map<String, RateLimiterConfig> configs,\n List<RegistryEventConsumer<RateLimiter>> registryEventConsumers) {\n return new InMemoryRateLimiterRegistry(configs, registryEventConsumers);\n }\n\n /**\n * Returns all managed {@link RateLimiter} instances.\n *\n * @return all managed {@link RateLimiter} instances.\n */\n Set<RateLimiter> getAllRateLimiters();\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one with the default RateLimiter\n * configuration.\n *\n * @param name the name of the RateLimiter\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one with the default RateLimiter\n * configuration.\n * <p>\n * The {@code tags} passed will be appended to the tags already configured for the registry.\n * When tags (keys) of the two collide the tags passed with this method will override the tags\n * of the registry.\n *\n * @param name the name of the RateLimiter\n * @param tags tags added to the RateLimiter\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, Map<String, String> tags);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one with a custom RateLimiter\n * configuration.\n *\n * @param name the name of the RateLimiter\n * @param rateLimiterConfig a custom RateLimiter configuration\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, RateLimiterConfig rateLimiterConfig);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one with a custom RateLimiter\n * configuration.\n * <p>\n * The {@code tags} passed will be appended to the tags already configured for the registry.\n * When tags (keys) of the two collide the tags passed with this method will override the tags\n * of the registry.\n *\n * @param name the name of the RateLimiter\n * @param rateLimiterConfig a custom RateLimiter configuration\n * @param tags tags added to the RateLimiter\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, RateLimiterConfig rateLimiterConfig, Map<String, String> tags);\n\n /**\n * Returns a managed {@link RateLimiterConfig} or creates a new one with a custom\n * RateLimiterConfig configuration.\n *\n * @param name the name of the RateLimiterConfig\n * @param rateLimiterConfigSupplier a supplier of a custom RateLimiterConfig configuration\n * @return The {@link RateLimiterConfig}\n */\n RateLimiter rateLimiter(String name, Supplier<RateLimiterConfig> rateLimiterConfigSupplier);\n\n /**\n * Returns a managed {@link RateLimiterConfig} or creates a new one with a custom\n * RateLimiterConfig configuration.\n * <p>\n * The {@code tags} passed will be appended to the tags already configured for the registry.\n * When tags (keys) of the two collide the tags passed with this method will override the tags\n * of the registry.\n *\n * @param name the name of the RateLimiterConfig\n * @param rateLimiterConfigSupplier a supplier of a custom RateLimiterConfig configuration\n * @param tags tags added to the RateLimiter\n * @return The {@link RateLimiterConfig}\n */\n RateLimiter rateLimiter(String name, Supplier<RateLimiterConfig> rateLimiterConfigSupplier, Map<String, String> tags);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one.\n * The configuration must have been added upfront via {@link #addConfiguration(String, Object)}.\n *\n * @param name the name of the RateLimiter\n * @param configName the name of the shared configuration\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, String configName);\n\n /**\n * Returns a managed {@link RateLimiter} or creates a new one.\n * The configuration must have been added upfront via {@link #addConfiguration(String, Object)}.\n *\n * @param name the name of the RateLimiter\n * @param configName the name of the shared configuration\n * @return The {@link RateLimiter}\n */\n RateLimiter rateLimiter(String name, String configName, Map<String, String> tags);\n\n /**\n * Returns a builder to create a custom RateLimiterRegistry.\n *\n * @return a {@link RateLimiterRegistry.Builder}\n */\n static Builder custom() {\n return new Builder();\n }\n\n class Builder {\n\n private static final String DEFAULT_CONFIG = \"default\";\n private RegistryStore<RateLimiter> registryStore;\n private Map<String, RateLimiterConfig> rateLimiterConfigsMap;\n private List<RegistryEventConsumer<RateLimiter>> registryEventConsumers;\n private Map<String, String> tags;\n\n public Builder() {\n this.rateLimiterConfigsMap = new java.util.HashMap<>();\n this.registryEventConsumers = new ArrayList<>();\n }\n\n public Builder withRegistryStore(RegistryStore<RateLimiter> registryStore) {\n this.registryStore = registryStore;\n return this;\n }\n\n /**\n * Configures a RateLimiterRegistry with a custom default RateLimiter configuration.\n *\n * @param rateLimiterConfig a custom default RateLimiter configuration\n * @return a {@link RateLimiterRegistry.Builder}\n */\n public Builder withRateLimiterConfig(RateLimiterConfig rateLimiterConfig) {\n rateLimiterConfigsMap.put(DEFAULT_CONFIG, rateLimiterConfig);\n return this;\n }\n\n /**\n * Configures a RateLimiterRegistry with a custom RateLimiter configuration.\n *\n * @param configName configName for a custom shared RateLimiter configuration\n * @param configuration a custom shared RateLimiter configuration\n * @return a {@link RateLimiterRegistry.Builder}\n * @throws IllegalArgumentException if {@code configName.equals(\"default\")}\n */\n public Builder addRateLimiterConfig(String configName, RateLimiterConfig configuration) {\n if (configName.equals(DEFAULT_CONFIG)) {\n throw new IllegalArgumentException(\n \"You cannot add another configuration with name 'default' as it is preserved for default configuration\");\n }\n rateLimiterConfigsMap.put(configName, configuration);\n return this;\n }\n\n /**\n * Configures a RateLimiterRegistry with a RateLimiter registry event consumer.\n *\n * @param registryEventConsumer a RateLimiter registry event consumer.\n * @return a {@link RateLimiterRegistry.Builder}\n */\n public Builder addRegistryEventConsumer(RegistryEventConsumer<RateLimiter> registryEventConsumer) {\n this.registryEventConsumers.add(registryEventConsumer);\n return this;\n }\n\n /**\n * Configures a RateLimiterRegistry with Tags.\n * <p>\n * Tags added to the registry will be added to every instance created by this registry.\n *\n * @param tags default tags to add to the registry.\n * @return a {@link RateLimiterRegistry.Builder}\n */\n public Builder withTags(Map<String, String> tags) {\n this.tags = tags;\n return this;\n }\n\n /**\n * Builds a RateLimiterRegistry\n *\n * @return the RateLimiterRegistry\n */\n public RateLimiterRegistry build() {\n return new InMemoryRateLimiterRegistry(rateLimiterConfigsMap, registryEventConsumers, tags,\n registryStore);\n }\n }\n}", "public ServiceReference[] listMetricProviders(Class<?> o) {\n if (!registeredMetrics.isEmpty()) {\n // All registered metrics\n Iterator<MetricInfo> metrics =\n registeredMetrics.values().iterator();\n // Metrics matching this search\n Vector<ServiceReference> matching =\n new Vector<ServiceReference>();\n // Search for metric of compatible type\n while (metrics.hasNext()) {\n MetricInfo nextMetric = metrics.next();\n if ((nextMetric.isType(o.getName()))\n && (nextMetric.getServiceRef() != null)) {\n matching.add(nextMetric.getServiceRef());\n }\n }\n // Return the matching ones\n if (matching.size() > 0) {\n ServiceReference[] metricsList =\n new ServiceReference[matching.size()];\n metricsList = matching.toArray(metricsList);\n return metricsList;\n }\n }\n return null;\n }", "private static void registerAllViews() {\n Aggregation latencyDistribution =\n Aggregation.Distribution.create(BucketBoundaries.create(Arrays.asList(0.0, 5.0, 10.0, 15.0, 20.0)));\n\n // Define the views\n List<TagKey> noKeys = new ArrayList<TagKey>();\n View[] views =\n new View[]{\n View.create(\n Name.create(\"ocjavaexporter/latency\"),\n \"The distribution of latencies\",\n M_LATENCY_MS,\n latencyDistribution,\n noKeys)\n };\n\n // Create the view manager\n ViewManager vmgr = Stats.getViewManager();\n\n // Then finally register the views\n for (View view : views) {\n vmgr.registerView(view);\n }\n }", "protected void registerPlatformBeans() {\n Set<String> platformDomains = new HashSet<String>(Arrays.asList(mBeanServer.getDomains()));\n for (Map.Entry<ObjectName, ObjectNode> beanEntry : settings.beans.entrySet()) {\n // check if mBean is registered\n MBeanInfo mBeanInfo = null;\n ObjectName objectName = beanEntry.getKey();\n if (!platformDomains.contains(objectName.getDomain())) {\n continue;\n }\n try {\n mBeanInfo = mBeanServer.getMBeanInfo(objectName);\n } catch (Exception e) {\n log.warn(\"Exception while looking up mbean name {} - {}\",objectName.toString(),e.getMessage());\n continue;\n }\n\n handleAttributes(mBeanInfo, objectName, beanEntry.getValue());\n }\n if (settings.logIgnoredAttributes) {\n Set<ObjectName> objectNames = mBeanServer.queryNames(null, null);\n for (ObjectName objectName : objectNames) {\n ObjectNode jsonNodes = settings.beans.get(objectName);\n if (jsonNodes==null) {\n try {\n logAllAttributes(objectName, mBeanServer.getMBeanInfo(objectName));\n } catch (JMException e) {\n log.warn(\"\",e);\n }\n }\n }\n }\n }", "public abstract List<Metric> getMetrics();", "public void initDevices() {\n for (Device device: deviceList) {\n device.init(getCpu().getTime());\n }\n }", "public interface MetricsVisitor {\n\n /**\n * Callback for int value gauges\n * \n * @param metric the metric object\n * @param value of the metric\n */\n public void gauge(MetricGauge<Integer> metric, int value);\n\n /**\n * Callback for long value gauges\n * \n * @param metric the metric object\n * @param value of the metric\n */\n public void gauge(MetricGauge<Long> metric, long value);\n\n /**\n * Callback for float value gauges\n * \n * @param metric the metric object\n * @param value of the metric\n */\n public void gauge(MetricGauge<Float> metric, float value);\n\n /**\n * Callback for double value gauges\n * \n * @param metric the metric object\n * @param value of the metric\n */\n public void gauge(MetricGauge<Double> metric, double value);\n\n /**\n * Callback for integer value counters\n * \n * @param metric the metric object\n * @param value of the metric\n */\n public void counter(MetricCounter<Integer> metric, int value);\n\n /**\n * Callback for long value counters\n * \n * @param metric the metric object\n * @param value of the metric\n */\n public void counter(MetricCounter<Long> metric, long value);\n\n /**\n * Callback for integer value delta\n * \n * @param metric the metric object\n * @param value of the metric\n */\n public void delta(MetricDelta<Integer> metric, int value);\n\n /**\n * Callback for long value delta\n * \n * @param metric the metric object\n * @param value of the metric\n */\n public void delta(MetricDelta<Long> metric, long value);\n}", "@Override\n void collectRelatedFormats(Catalog catalog,\n Map<String, Format> newFormats) {\n assert proxyClassName != null;\n catalog.createFormat(proxyClassName, newFormats);\n }", "public void initProviders(@Observes AfterDeploymentValidation afterValid, final BeanManager manager,\n final CronQueueInstaller cronQueueInstaller, final CronSchedulingInstaller cronSchedInstaller) {\n log.debug(\"Initializing service providers\");\n // process queue observers if queue provider exists\n final CronQueueProvider queueProvider = CdiUtils.getInstanceByType(manager, CronQueueProvider.class);\n if (queueProvider != null) {\n this.queueProvider = queueProvider;\n handleLifecycleInit(queueProvider);\n cronQueueInstaller.initProviderQueue(manager, queueProvider, allObservers);\n }\n // process scheduling observers if scheduling provider exists\n final CronSchedulingProvider schedProvider = CdiUtils.getInstanceByType(manager, CronSchedulingProvider.class);\n if (schedProvider != null) {\n this.schedulingProvider = schedProvider;\n handleLifecycleInit(schedProvider);\n cronSchedInstaller.initProviderScheduling(manager, schedProvider, allObservers);\n }\n // process aynchronous observers if aynchronous provider exists\n final CronAsynchronousProvider asyncProvider = CdiUtils.getInstanceByType(manager, CronAsynchronousProvider.class);\n if (asyncProvider != null) {\n this.asynchronousProvider = asyncProvider;\n handleLifecycleInit(asyncProvider);\n }\n\n// TODO: (PR): If there's an asynch provider present, check if the interceptor is enabled. See https://jira.jboss.org/jira/browse/WELDX-91\n// final CronAsynchronousProvider asyncProvider = CdiUtils.getInstanceByType(manager, CronAsynchronousProvider.class);\n// if (asyncProvider != null) {\n// assert interceptors.isInterceptorEnabled(AsynchronousInterceptor.class);\n// } \n\n }", "void generateDataSourceTypes(String serverId, String pathToDataSourceTypesXML, String pathToServersXML) throws CompositeException;", "public void addEngineSinks(int totalSinks, String sinkName) {\n int toAllocate = Math.min(totalSinks, getEngine().integralHeatSinkCapacity());\n addEngineSinks(sinkName, toAllocate);\n }", "private void populateAvailableProviders() {\n allAvailableProviders = new HashSet<Provider>();\n\n DataType dataType = DataType.valueOfIgnoreCase(this.dataType);\n try {\n for (Provider provider : DataDeliveryHandlers.getProviderHandler()\n .getAll()) {\n\n ProviderType providerType = provider.getProviderType(dataType);\n if (providerType != null) {\n allAvailableProviders.add(provider);\n }\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the list of providers.\", e);\n }\n }", "private void populateServerUrls(Map<String, String> urls, OGCServerSource source)\n {\n if (StringUtils.isNotEmpty(source.getWMSServerURL()))\n {\n urls.put(OGCServerSource.WMS_SERVICE, source.getWMSServerURL());\n }\n\n if (StringUtils.isNotEmpty(source.getWMSGetMapServerUrlOverride()))\n {\n urls.put(OGCServerSource.WMS_GETMAP_SERVICE, source.getWMSGetMapServerUrlOverride());\n }\n\n if (StringUtils.isNotEmpty(source.getWFSServerURL()))\n {\n urls.put(OGCServerSource.WFS_SERVICE, source.getWFSServerURL());\n }\n\n if (StringUtils.isNotEmpty(source.getWPSServerURL()))\n {\n urls.put(OGCServerSource.WPS_SERVICE, source.getWPSServerURL());\n }\n }", "Map<String,DataSource> load(Set<String> existsDataSourceNames) throws Exception;", "static HashSet startDataManagers(Properties config)\n {\n log.info(\"Begin startDataManagers(config)\");\n HashSet processorHash = new HashSet();\n\n String instancesProp = config.getProperty(\"instances\");\n try\n {\n RE r = new RE(\",\\\\s*\");\n String [] instances = r.split(instancesProp);\n if (0 < instances.length)\n {\n for (int i = 0; i < instances.length; i++)\n {\n String instance = instances[i];\n log.info(\"Starting instance: \" + instance);\n\n // String inputUrl = config.getProperty(\"input.\" + instance + \".url\");\n // SsmDataManager processor;\n // if (inputUrl.startsWith(\"dir:\"))\n // processor = new SsmMsgQueueDirProcessor(instance, config);\n // else\n // processor = new SsmMsgQueueDbProcessor(instance, config);\n\n SsmDataManager processor = new SsmDataManager(instance, config);\n\n ProcessorThread pt = new ProcessorThread(processor,\n config.getProperty(\"min.duration.in.millis\"));\n pt.start();\n processorHash.add(pt);\n }\n }\n else\n {\n log.fatal(\"No processor instances found in configuration file\");\n System.exit(BAD_RUN);\n }\n } \n catch (RESyntaxException e)\n {\n log.fatal(\"Bad regexp syntax: \" + e.getMessage());\n System.exit(BAD_RUN);\n }\n \n log.info(\"End startDataManagers(config)\");\n return processorHash;\n }", "private void addSources() {\n FeatureCollection emptyFeature = FeatureCollection.fromFeatures(new Feature[] {});\n\n if (mapboxMap.getSourceAs(LocationLayerConstants.LOCATION_SOURCE) == null) {\n mapboxMap.addSource(new GeoJsonSource(\n LocationLayerConstants.LOCATION_SOURCE,\n emptyFeature,\n new GeoJsonOptions().withMaxZoom(16))\n );\n }\n\n if (mapboxMap.getSourceAs(LocationLayerConstants.LOCATION_ACCURACY_SOURCE) == null) {\n mapboxMap.addSource(new GeoJsonSource(\n LocationLayerConstants.LOCATION_ACCURACY_SOURCE,\n emptyFeature,\n new GeoJsonOptions().withMaxZoom(16))\n );\n }\n }", "private void registerManagers() {\n registerProviders();\n\n // Cast Managers\n if (worldGuardManager.isEnabled()) castManagers.add(worldGuardManager);\n if (preciousStonesManager.isEnabled()) castManagers.add(preciousStonesManager);\n if (redProtectManager != null && redProtectManager.isFlagsEnabled()) castManagers.add(redProtectManager);\n\n // Entity Targeting Managers\n if (preciousStonesManager.isEnabled()) targetingProviders.add(preciousStonesManager);\n if (townyManager.isEnabled()) targetingProviders.add(townyManager);\n if (residenceManager != null) targetingProviders.add(residenceManager);\n if (redProtectManager != null) targetingProviders.add(redProtectManager);\n\n // PVP Managers\n if (worldGuardManager.isEnabled()) pvpManagers.add(worldGuardManager);\n if (pvpManager.isEnabled()) pvpManagers.add(pvpManager);\n if (multiverseManager.isEnabled()) pvpManagers.add(multiverseManager);\n if (preciousStonesManager.isEnabled()) pvpManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) pvpManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) pvpManagers.add(griefPreventionManager);\n if (factionsManager.isEnabled()) pvpManagers.add(factionsManager);\n if (residenceManager != null) pvpManagers.add(residenceManager);\n if (redProtectManager != null) pvpManagers.add(redProtectManager);\n\n // Build Managers\n if (worldGuardManager.isEnabled()) blockBuildManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBuildManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBuildManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBuildManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBuildManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBuildManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBuildManagers.add(mobArenaManager);\n if (residenceManager != null) blockBuildManagers.add(residenceManager);\n if (redProtectManager != null) blockBuildManagers.add(redProtectManager);\n if (landsManager != null) blockBuildManagers.add(landsManager);\n\n // Break Managers\n if (worldGuardManager.isEnabled()) blockBreakManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBreakManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBreakManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBreakManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBreakManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBreakManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBreakManagers.add(mobArenaManager);\n if (citadelManager != null) blockBreakManagers.add(citadelManager);\n if (residenceManager != null) blockBreakManagers.add(residenceManager);\n if (redProtectManager != null) blockBreakManagers.add(redProtectManager);\n if (landsManager != null) blockBreakManagers.add(landsManager);\n\n // Team providers\n if (heroesManager != null && heroesManager.useParties()) teamProviders.add(heroesManager);\n if (skillAPIManager != null && skillAPIManager.usesAllies()) teamProviders.add(skillAPIManager);\n if (useScoreboardTeams) teamProviders.add(new ScoreboardTeamProvider());\n if (permissionTeams != null && !permissionTeams.isEmpty()) {\n teamProviders.add(new PermissionsTeamProvider(permissionTeams));\n }\n if (factionsManager != null) teamProviders.add(factionsManager);\n if (battleArenaManager != null && useBattleArenaTeams) teamProviders.add(battleArenaManager);\n if (ultimateClansManager != null) teamProviders.add(ultimateClansManager);\n\n // Player warp providers\n if (preciousStonesManager != null && preciousStonesManager.isEnabled()) {\n playerWarpManagers.put(\"fields\", preciousStonesManager);\n }\n if (redProtectManager != null) playerWarpManagers.put(\"redprotect\", redProtectManager);\n if (residenceManager != null) playerWarpManagers.put(\"residence\", residenceManager);\n }", "public static void install(final TaskInputOutputContext context) {\n\n if (handlerInstalled) {\n LOG.debug(\"GC handler already installed\");\n return;\n }\n\n synchronized (GCMonitoring.class) {\n\n if (handlerInstalled) {\n return;\n }\n\n LOG.debug(\"installing GC handler\");\n\n handlerInstalled = true;\n GCMonitoring instance = new GCMonitoring();\n\n List<GarbageCollectorMXBean> gcbeans =\n java.lang.management.ManagementFactory.getGarbageCollectorMXBeans();\n\n for (GarbageCollectorMXBean gcbean : gcbeans) {\n LOG.debug(\"Registering to GC bean:\" + gcbean);\n NotificationEmitter emitter = (NotificationEmitter) gcbean;\n\n NotificationListener listener = makeListener(instance, context);\n\n emitter.addNotificationListener(listener, null, null);\n }\n }\n }", "@Override\n public DataStoreMetricsReporter getMetrics()\n {\n return metrics;\n }", "protected void registerSensors() {\n\n Handler handler = new Handler();\n\n SensorManager sm = (SensorManager) getSystemService(SENSOR_SERVICE);\n List<Sensor> sensorList = sm.getSensorList(Sensor.TYPE_ALL);\n for (int i = 0; i < sensorList.size(); i++) {\n int type = sensorList.get(i).getType();\n if (type == Sensor.TYPE_ACCELEROMETER) {\n accelerometerResultReceiver = new SensorResultReceiver(handler);\n accelerometerResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_GYROSCOPE) {\n gyroscopeResultReceiver = new SensorResultReceiver(handler);\n gyroscopeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_MAGNETIC_FIELD) {\n magnitudeResultReceiver = new SensorResultReceiver(handler);\n magnitudeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_ROTATION_VECTOR) {\n rotationVectorResultReceiver = new SensorResultReceiver(handler);\n rotationVectorResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_LIGHT) {\n lightResultReceiver = new LightResultReceiver(handler);\n lightResultReceiver.setReceiver(new LightReceiver());\n\n } else if (type == Sensor.TYPE_GRAVITY) {\n gravityResultReceiver = new SensorResultReceiver(handler);\n gravityResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_PRESSURE) {\n pressureResultReceiver = new PressureResultReceiver(handler);\n pressureResultReceiver.setReceiver(new PressureReceiver());\n\n }\n }\n /*if(magnitudeResultReceiver!= null && gyroscopeResultReceiver!=null) {\n orientationResultReceiver = new SensorResultReceiver(handler);\n orientationResultReceiver.setReceiver(new SensorDataReceiver());\n }*/\n }", "@Override\n public DynamicTableSource createDynamicTableSource(Context context) {\n FactoryUtil.TableFactoryHelper helper = FactoryUtil.createTableFactoryHelper(this, context);\n\n final ReadableConfig config = helper.getOptions();\n\n // validate all options\n helper.validate();\n\n // get jdbc options\n JdbcOptions jdbcOptions = getJdbcOptions(config);\n\n // get resovled table schema\n ResolvedSchema resolvedSchema = context.getCatalogTable().getResolvedSchema();\n\n // create the table source\n return new ClickHouseDynamicTableSource(jdbcOptions, resolvedSchema);\n\n }", "private void registerSensorListeners(){\n\n // Get the accelerometer and gyroscope sensors if they exist\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null){\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n }\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null){\n mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n }\n\n // Acquire the wake lock to sample with the screen off\n mPowerManager = (PowerManager)getApplicationContext().getSystemService(Context.POWER_SERVICE);\n\n mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);\n mWakeLock.acquire();\n\n // Register sensor listener after delay to compensate for user putting phone in pocket\n\n long delay = 5;\n\n Log.d(TAG, \"Before start: \" + System.currentTimeMillis());\n\n exec.schedule(new Runnable() {\n @Override\n public void run() {\n mSensorManager.registerListener(PhoneSensorLogService.this, mAccelerometer, SAMPLE_RATE);\n mSensorManager.registerListener(PhoneSensorLogService.this, mGyroscope, SAMPLE_RATE);\n Log.d(TAG, \"Start: \" + System.currentTimeMillis());\n if (timedMode) {\n scheduleLogStop();\n }\n }\n }, delay, TimeUnit.SECONDS);\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n LongProbeFunction<S> probe);", "public void addAllMetrics(Iterable<String> values) {\n ensureMetricsIsMutable();\n AbstractMessageLite.addAll(values, this.metrics_);\n }", "private void initializeMaps(Set<ActionProvider> actionProviders,\n\t\t\tSet<ActionHandlerProvider> registeredHandlerProviders) {\n\t\tSet<ActionHandlerProvider> sportedHandlerProviders = registeredHandlerProviders.stream()\n\t\t\t\t.sorted(Comparator.comparing(ActionHandlerProvider::getPriority)).collect(Collectors.toSet());\n\t\tSet<ActionProvider> sortedActionProvider = actionProviders = actionProviders.stream()\n\t\t\t\t.sorted(Comparator.comparing(ActionProvider::getPriority)).collect(Collectors.toSet());\n\n\t\tsortedActionProvider.forEach(aProv -> {\n\t\t\taProv.getActions().forEach(action -> {\n\t\t\t\tif (!actionKinds.containsKey(action.getKind())) {\n\t\t\t\t\tactionKinds.put(action.getKind(), action.getClass());\n\t\t\t\t\tregisteredActions.add(action);\n\n\t\t\t\t\tOptional<ActionHandler> handlerOpt = getActionHandler(action, sportedHandlerProviders);\n\t\t\t\t\tif (handlerOpt.isPresent()) {\n\t\t\t\t\t\tactionHandlers.put(action.getKind(), handlerOpt.get());\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t}" ]
[ "0.55436873", "0.55184567", "0.5461645", "0.54273015", "0.5370312", "0.52429014", "0.520336", "0.50914913", "0.5053112", "0.5029102", "0.501772", "0.5010736", "0.50086033", "0.49872833", "0.49747908", "0.4954576", "0.4889185", "0.48823902", "0.48113513", "0.48060358", "0.47877574", "0.47641146", "0.47465464", "0.47054538", "0.47050163", "0.46838772", "0.4655105", "0.46381724", "0.4583151", "0.4572658", "0.45691717", "0.45224252", "0.45097512", "0.4479491", "0.44755462", "0.4468004", "0.44363528", "0.44348735", "0.4426359", "0.44231606", "0.44113722", "0.44073522", "0.44065535", "0.43864888", "0.4377735", "0.43768173", "0.43657866", "0.43562743", "0.43494815", "0.4315327", "0.43149516", "0.43143573", "0.4299174", "0.42890018", "0.42741814", "0.42724356", "0.42680562", "0.42624167", "0.42620933", "0.42590842", "0.42530215", "0.4249844", "0.42481092", "0.42433557", "0.42369124", "0.4235103", "0.42347455", "0.4231467", "0.4227029", "0.42182288", "0.42172208", "0.42147326", "0.42126167", "0.42102048", "0.4209435", "0.420886", "0.42044657", "0.4203507", "0.41983008", "0.41895875", "0.41880456", "0.41856802", "0.41852775", "0.41829634", "0.41803744", "0.41799694", "0.4179578", "0.4175252", "0.41665494", "0.41649967", "0.41530275", "0.41477466", "0.41423383", "0.41408026", "0.41362938", "0.41246432", "0.4103671", "0.4102853", "0.40941718", "0.4091081" ]
0.69791794
0
Deregisters the given dynamic metrics provider. The metrics collection cycles after this call will not call the given metrics provider until it is registered again.
void deregisterDynamicMetricsProvider(DynamicMetricsProvider metricsProvider);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void registerDynamicMetricsProvider(DynamicMetricsProvider metricsProvider);", "private void metricUnregistering (ServiceReference srefMetric) {\n // Retrieve the service ID\n Long serviceId =\n (Long) srefMetric.getProperty(Constants.SERVICE_ID);\n logInfo(\n \"A metric service with ID \"\n + serviceId + \" is unregistering.\");\n \n // Remove this service from the list of available metric services\n if (registeredMetrics.containsKey(serviceId)) {\n registeredMetrics.remove(serviceId);\n }\n }", "public void removeProvider(EvaluatorProvider provider) {\n\t\tregistry.remove(provider);\n\t}", "void shutdown() {\n if (metricRegistry != null) {\n for (String metricName : gaugeMetricNames) {\n try {\n metricRegistry.remove(metricName);\n } catch (RuntimeException e) {\n // ignore\n }\n }\n }\n }", "public void unregisterAdapters(IAdapterFactory factory, Class<?> adaptable);", "boolean unregister(Gauge<?> gauge);", "public void unregisterAdapters(IAdapterFactory factory);", "private void unRegisterLoggingMBean() throws Exception {\n MBeanServer server = ManagementFactory.getPlatformMBeanServer();\n ObjectName loggerObjectName = new ObjectName(\"com.yammer:type=Logging\");\n if (server.isRegistered(loggerObjectName)) {\n server.unregisterMBean(loggerObjectName);\n }\n }", "@After\n public void clearMeters() {\n Search.in(registry)\n .name(name -> name.startsWith(\"org.drools.metric\"))\n .meters()\n .forEach(registry::remove);\n MicrometerUtils.INSTANCE.clear();\n registry = null;\n }", "public synchronized void endUpdates() {\n checkState(_recentlyTouched != null, \"The beginUpdates method has not been called.\");\n Iterator<String> iter = _metrics.keySet().iterator();\n while (iter.hasNext()) {\n String metric = iter.next();\n if (!_recentlyTouched.contains(metric)) {\n _registry.remove(metric);\n iter.remove();\n }\n }\n _recentlyTouched = null;\n }", "private void onUnregistered() {\n setUnregisteringInProcess(false);\n C2DMSettings.clearC2DMRegistrationId(context);\n for (C2DMObserver observer : observers) {\n onUnregisteredSingleObserver(observer);\n }\n }", "public void unregisterService(Registrant r) {\n namingService.unregisterService(r);\n }", "protected abstract void unregisterObserver();", "public abstract void unregister();", "@Override\n public void removeFromCache(String sensorID) {\n }", "private void unRegisterSensors()\n {\n // Double check that the device has the required sensor capabilities\n // If not then we can simply return as nothing will have been already\n // registered\n if(!HasGotSensorCaps()){\n return;\n }\n\n // Perform un-registration of the sensor listeners\n\n sensorManager.unregisterListener(this, sensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER));\n sensorManager.unregisterListener(this, sensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR));\n sensorManager.unregisterListener(this, sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER));\n }", "void removeDeviceAgentListener(DeviceId deviceId, ProviderId providerId);", "public synchronized void postDeregister() {\n if (timer != null) {\n try {\n timer.cancel();\n } catch (Exception x) {\n if (LOG.isLoggable(Level.FINEST))\n LOG.log(Level.FINEST,\"Failed to cancel timer\",x);\n else if (LOG.isLoggable(Level.FINE))\n LOG.fine(\"Failed to cancel timer: \"+x);\n } finally {\n timer = null;\n }\n }\n }", "public void deregister(SvcInfo svcInfo);", "@Override\n\tprotected void onDestroy()\n\t{\n\t\tif (mAnnotatedGeometriesGroup != null)\n\t\t{\n\t\t\tmAnnotatedGeometriesGroup.registerCallback(null);\n\t\t}\n\t\t\n\t\tif (mAnnotatedGeometriesGroupCallback != null)\n\t\t{\n\t\t\tmAnnotatedGeometriesGroupCallback.delete();\n\t\t\tmAnnotatedGeometriesGroupCallback = null;\n\t\t}\n\n\t\tsuper.onDestroy();\n\t\tSystem.gc();\n\t}", "public static void destroy() {\n if (functionProvider == null) {\n return;\n }\n\n caps = null;\n\n if (functionProvider instanceof NativeResource) {\n ((NativeResource)functionProvider).free();\n }\n functionProvider = null;\n }", "public abstract void unregisterListeners();", "public final void onDeregistration()\n {\n onObjectDeregistration();\n this.container = null;\n }", "private void unregisterConfigs() throws JMException {\n unregisterMBeans(configmap);\n }", "public void unregister() {\n unregistered = true;\n }", "@Override\n public void removedService(final ServiceReference<ComponentFactory> reference, final ComponentFactory service)\n {\n final String productType = (String)reference.getProperty(ComponentConstants.COMPONENT_NAME);\n \n m_Logging.info(\"Unregistering factory for: %s\", productType);\n \n final FactoryInternal factory = m_Factories.get(productType);\n \n //make unavailable via framework\n tryMakeFactoryUnavailable(factory);\n \n // allow proxy services to do clean up first\n tryProxyOnRemoveFactory(factory);\n \n //remove all associated factory objects\n tryRemoveAllFactoryObjects(factory);\n //unreg the rest of the services and other cleanup\n tryCleanupFactory(factory);\n \n //make unavailable to management services\n tryRemoveFactory(productType);\n \n //dispose of the factory instance\n tryDisposeFactory(productType);\n \n //remove reference to service\n tryUngetService(reference);\n }", "void unregister(String methodName);", "public abstract void unregisterDataReceiverToAndroid(Context context);", "protected void unregisterObserver(Observer.GraphAttributeChanges observer) {\n observers.remove(observer);\n }", "void deregister() {\n Thread patientLoaderThread = new Thread(new RegistrationRunnable(false));\n patientLoaderThread.start();\n }", "@Override\n\tpublic void unregister(MicroService m) {\n\t\tint i = registeredMicroservice.indexOf(m);\n\t\tregisteredMicroservice.remove(i);\n\n\t\t//remove queue\n\t\tmicroserviceMessageQueue.remove(i);\n\t\tSet keys = registrationHashMap.keySet();\n\t\tIterator iter = keys.iterator();\n\t\twhile(iter.hasNext()){\n\t\t\t// TRY to remove casting\n\t\t\tClass<? extends Message> key = (Class<? extends Message>)iter.next();\n\t\t\t//Object key = iterator.next(); ***OPTIONAL***\n\t\t\tif(registrationHashMap.get(key).contains(m)){\n\t\t\t\tregistrationHashMap.get(key).remove(m);\n\t\t\t\tif(registrationHashMap.get(key).isEmpty()){\n\t\t\t\t\t// if no microservices are subscribed to message remove key reference from hashmap\n\t\t\t\t\tregistrationHashMap.remove(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void unregisterCrashWatcher() {\n mDevice.removeWatcher(\"GoogleCamera-crash-watcher\");\n }", "public void unregister(Observer deleteObserver) {\n int observerIndex = observers.indexOf(deleteObserver);\n // Print out message (Have to increment index to match)\n System.out.println(\"Observer \" + (observerIndex+1) + \" deleted\");\n // Removes observer from the ArrayList\n observers.remove(observerIndex);\n\t}", "private void addMetrics(Map<MetricName, KafkaMetric> kafkaMetrics) {\n Set<MetricName> metricKeys = kafkaMetrics.keySet();\n for (MetricName key : metricKeys) {\n KafkaMetric metric = kafkaMetrics.get(key);\n String metricName = getMetricName(metric.metricName());\n if (metrics.getNames().contains(metricName)) {\n metrics.remove(metricName);\n }\n metrics.register(metricName, new Gauge<Double>() {\n @Override\n public Double getValue() {\n return metric.value();\n }\n });\n }\n }", "void unregister(String uuid);", "private void removeEvaluator(Object key)\n {\n this.evaluators.remove(key);\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public void unexport() {\n String protocolKey = null;\n String ipPort = url.getServerPortStr();\n\n Exporter<T> exporter = (Exporter<T>) exporterMap.remove(protocolKey);\n\n if (exporter != null) {\n exporter.destroy();\n }\n ProviderMessageRouter requestRouter = ipPort2RequestRouter.get(ipPort);\n\n if (requestRouter != null) {\n requestRouter.removeProvider(provider);\n }\n }", "void disposeLocked() {\n ArrayList<UpdateRecord> records = mRecordsByProvider.get(this.mProvider);\n records.remove(this);\n }", "public synchronized void clear() {\n synchronized (this.factories) {\n for (Map.Entry<String, CachedAnnotator> entry : new HashSet<>(this.factories.entrySet())) {\n // Unmount the annotator\n Optional.ofNullable(entry.getValue()).flatMap(ann -> Optional.ofNullable(ann.annotator.getIfDefined())).ifPresent(Annotator::unmount);\n // Remove the annotator\n this.factories.remove(entry.getKey());\n }\n }\n }", "public final void unregister(ConsoleCmd cmd) {\n cmdList.remove(cmd.name);\n }", "boolean remove(MetricID metricID);", "public void unregister(Observer deleteObserver) {\n\r\n int observerIndex = observers.indexOf(deleteObserver);\r\n\r\n // Print out message (Have to increment index to match)\r\n\r\n System.out.println(\"Observer \" + (observerIndex + 1) + \" deleted\");\r\n\r\n // Removes observer from the ArrayList\r\n\r\n observers.remove(observerIndex);\r\n\r\n }", "private void deregisterBroadcastReceiver(){\n activity.unregisterReceiver(hceNotificationsReceiver);\n }", "public void removeRenderer(Integer idGCodeProvider) throws GkException{\n\t\tRS274GCodeRenderer renderer = getRendererByGCodeProvider(idGCodeProvider);\n\t\texecutionService.removeExecutionListener(renderer);\n\t\tcacheRenderer.remove(renderer);\n\t\trenderer.destroy();\n\t}", "@Override\n protected void onUnregister() {\n Core.unregister(this);\n }", "public void clearMetrics() {\n this.metrics_ = GeneratedMessageLite.emptyProtobufList();\n }", "@Override\n\t\tpublic void unregisterDataSetObserver(DataSetObserver arg0) {\n\n\t\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\tunregisterReceiver(getServerSetting);\n\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private void unregisterScanners() throws JMException {\n unregisterMBeans(scanmap);\n }", "@Override\n\tpublic void unregisterServices(AgentIdentifier agent) {\n\t\tassert(agent!=null);\n\t\tsuper.unregisterServices(agent);\n\t\t// Informs the other kernels about this registration\n\t\tKernel<?,?,?,?> kernel = Kernel.getSingleton();\n\t\tif (!kernel.isOnThisKernel(agent)) {\n\t\t\tgetMTS(NetworkMessageTransportService.class).broadcast(new KernelMessage(YellowPages.class,KernelMessage.Type.YELLOW_PAGE_UNREGISTERING,null,agent));\n\t\t}\t\t\n\t}", "private void removeProvider(MarketDataProvider inProvider)\n {\n activeProvidersByName.remove(inProvider.getProviderName());\n providersByPriority.remove(inProvider);\n }", "@Override\n public void deregisterForMessage(CommReceiver recClass) {\n commSender.deregisterForMessage(recClass);\n }", "public synchronized void deRegister()\n {\n // stop the thread running...\n logger.debug(\"deregister called - invalidating session\");\n\n // remove from registered listeners and then invalidate the ScriptSession\n clients.remove(wctx.getScriptSession().getId());\n wctx.getScriptSession().invalidate();\n\n if (clients.size() == 0)\n {\n // might as well stop thread since we have no registered listeners\n this.active = false;\n }\n\n }", "@Override\n public void unregisterDataSetObserver(final DataSetObserver observer) {\n mCursorAdapter.unregisterDataSetObserver(observer);\n mArrayAdapter .unregisterDataSetObserver(observer);\n }", "public void unregisterForUpdates(CtxAttributeIdentifier attrId);", "@Override\n public void onUnregistered(Context context) {\n SharedPreferences prefs = Util.getSharedPreferences(context);\n String deviceRegistrationID = prefs.getString(Util.DEVICE_REGISTRATION_ID, null);\n DeviceRegistrar.registerOrUnregister(context, deviceRegistrationID, false);\n }", "void unregisterListeners();", "boolean unregister(Counter counter);", "@Override\n\tprotected void onDestroy() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\tunregisterReceiver(mHandleMessageReceiver);\n\t\t\tGCMRegistrar.onDestroy(this);\n\t\t} catch (Exception e) {\n\n\t\t\tLog.e(\"UnRegister Receiver Error\", \"> \" + e.getMessage());\n\t\t}\n\t}", "@Override\n public void onDestroy() {\n if (pushSensorMgr != null) {\n pushSensorMgr.unsubscribe();\n pushSensorMgr = null;\n }\n\n if (envSensorMgr != null) {\n envSensorMgr.unsubscribe();\n envSensorMgr = null;\n }\n\n if (pullSensorMgr != null) {\n pullSensorMgr.unsubscribe();\n pullSensorMgr = null;\n }\n\n// if (pullSensorTimer != null) {\n// pullSensorTimer.cancel();\n// pullSensorTimer.purge();\n// pullSensorTimer = null;\n// }\n }", "@Test\n public void testRemoveConfigurationProvider()\n {\n assertNull(\"Removing unknown provider\", factory\n .removeConfigurationProvider(\"test\"));\n assertNull(\"Removing provider for null tag\", factory\n .removeConfigurationProvider(null));\n DefaultConfigurationBuilder.ConfigurationProvider provider = new DefaultConfigurationBuilder.ConfigurationProvider();\n factory.addConfigurationProvider(\"test\", provider);\n assertSame(\"Failed to remove provider\", provider, factory\n .removeConfigurationProvider(\"test\"));\n assertNull(\"Provider still registered\", factory.providerForTag(\"test\"));\n }", "public void unregisterListeners(){\n listeners.clear();\n }", "private void unregisterReceivers() {\n \t\t\n\t\tunregisterReceiver(newReadingsReceiver);\n\t\tunregisterReceiver(sensorStatusReceiver);\n\t\tunregisterReceiver(servalMeshStatusReceiver);\n \t}", "private void unregister( Class<?> clazz )\r\n {\r\n\t if ( cachedDependencies.containsKey( clazz ) )\r\n\t\t return;\r\n\t Set<Class<?>> inProgress = cycleDetect.get();\r\n\t if ( inProgress != null )\r\n\t inProgress.remove( clazz );\r\n }", "private void metricRegistered (ServiceReference srefMetric) {\n // Retrieve the service ID\n Long serviceId =\n (Long) srefMetric.getProperty(Constants.SERVICE_ID);\n logInfo(\"A metric service was registered with ID \" + serviceId);\n \n // Dispose from the list of available metric any old metric, that\n // uses the same ID. Should not be required, as long as metric\n // services got properly unregistered.\n if (registeredMetrics.containsKey(serviceId)) {\n registeredMetrics.remove(serviceId);\n }\n \n // Retrieve information about this metric and add this metric to the\n // list of registered/available metrics\n MetricInfo metricInfo = getMetricInfo(srefMetric);\n registeredMetrics.put(serviceId, metricInfo);\n \n // Search for an applicable configuration set and apply it\n Iterator<String> configSets =\n metricConfigurations.keySet().iterator();\n while (configSets.hasNext()) {\n // Match is performed against the metric's class name(s)\n String className = configSets.next();\n // TODO: It could happen that a service get registered with more\n // than one class. In this case a situation can arise where\n // two or more matching configuration sets exists.\n if (metricInfo.usesClassName(className)) {\n // Apply the current configuration set to this metric\n logInfo(\n \"A configuration set was found for metric with\"\n + \" object class name \" + className\n + \" and service ID \" + serviceId);\n MetricConfig configSet =\n metricConfigurations.get(className);\n \n // Execute the necessary post-registration actions\n if (configSet != null) {\n // Checks if this metric has to be automatically\n // installed upon registration\n if ((configSet.containsKey(MetricConfig.KEY_AUTOINSTALL)\n && (configSet.getString(MetricConfig.KEY_AUTOINSTALL)\n .equalsIgnoreCase(\"true\")))) {\n if (installMetric(serviceId)) {\n logInfo (\n \"The install method of metric with\"\n + \" service ID \" + serviceId\n + \" was successfully executed.\");\n }\n else {\n logError (\n \"The install method of metric with\"\n + \" service ID \" + serviceId\n + \" failed.\");\n }\n }\n }\n }\n }\n }", "void unregister(String policyId);", "private void unregisterMBeans(Map<ObjectName,?> map) throws JMException {\n for (ObjectName key : map.keySet()) {\n if (mbeanServer.isRegistered(key))\n mbeanServer.unregisterMBean(key);\n map.remove(key);\n }\n }", "protected void cleanupJMXObjects() throws IOException {\n for (ObjectName mbean : _server.queryNames(null, null)) {\n try {\n _server.unregisterMBean(mbean);\n } catch (Exception e) {\n // OK\n }\n }\n }", "public void onServiceUnregistered() {\r\n \t// Update the list of sessions\r\n\t\tupdateList();\r\n }", "public void stopAutomaticRefresh() {\n try {\n dnsService.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "boolean unregister(String name);", "@Override\n\tpublic void unregisterDataSetObserver(DataSetObserver observer) {\n\n\t}", "@Override\r\n\tpublic void shutdown() {\n\t\tunRigisterMBean();\r\n\t}", "public void unregister(T o);", "public void shutdown() {\n if (configurations.isRegisterMXBeans()) {\n JmxConfigurator.get().removeMXBean(this);\n }\n configurations.shutdown();\n }", "public void unegisterListener(BioSensorEventListener listener, BioSensor sensor, int sampleRate) {\n\t\tLog.d(TAG, \"unregister\");\n\t\tfor(int i = 0; i < mRegisterdListeners.size(); i++) {\n\t\t\tif(sensor.getSensorId() == mRegisterdListeners.get(i).getSensor().getSensorId()) { \n\t\t\t\tif(sampleRate == mRegisterdListeners.get(i).getSampleRate()) {\n\t\t\t\t\tmRegisterdListeners.remove(i);\n//\t\t\t\t\tmArduinoTasks.get(i).cancel();\n//\t\t\t\t\tmArduinoTasks.remove(i);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tmScheduler.cancel();\n\t}", "@Override public void unregister(@NonNull DTOKeyType key, @Nullable Listener<DTOKeyType, DTOType> callback)\n {\n CacheValue<DTOKeyType, DTOType> cacheValue = getCacheValue(key);\n if (callback != null && cacheValue != null)\n {\n cacheValue.unregisterListener(callback);\n }\n }", "public synchronized void unregisterDeviceId(String deviceId) {\n\t\tInetSocketAddress remoteAddress = websocketRemoteAddressByDeviceId.get(deviceId);\n\t\tdeviceIdsByWebsocketRemoteAttdress.remove(remoteAddress);\n\t\twebsocketRemoteAddressByDeviceId.remove(deviceId);\n\t}", "public void destroy() {\n\t\tfor (ANodeAttributeRenderer attributeRenderer : attributeRenderers) {\n\t\t\tattributeRenderer.unregisterPickingListeners();\n\t\t}\n\t}", "public synchronized void deleteMonitoringDevice(int uniqueID)\n\t{\n\t\tsuper.configuationObjects.remove(uniqueID);\n\t}", "public void unregisterObserver(Observer oldObserver) {\r\n\t\tint indexToRemove = observers.indexOf(oldObserver);\r\n\t\tobservers.remove(indexToRemove);\r\n\t}", "public static void unregister(ProcessEngine processEngine) {\n processEngines.remove(processEngine.getName());\n }", "@Override\r\n public void unregisterMonitor(String name, ProfileMonitor monitor) {\n\r\n }", "@Override\n public void unregisterDataSetObserver(DataSetObserver observer) {\n\n }", "@Override\n public void unregister(Object subscriber) {\n }", "public void unregisterHandler(Object handler)\n {\n\n }", "@Override\n protected void onDestroy() {\n stopService(collectDataService);\n super.onDestroy();\n }", "private void deRegister() {\n\t\ttry {\n\t\t\tOverlayNodeSendsDeregistration deregister = new OverlayNodeSendsDeregistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum, this.myAssignedID);\n\t\t\tthis.registry.getSender().sendData(deregister.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending DEregistration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending DEregistration event.\");\n\t\t}\n\t}", "public void unregister(Observer obj);", "@Deprecated\n@ConsumerType\npublic interface DynamicClassLoaderProvider {\n\n /**\n * Return the class loader used for dynamic class loading.\n * The returned class loader should use the provided parent class loader\n * as one of its parent class loaders. This ensures that the returned\n * class loader has access to all dynamically loaded classes that\n * are not part of this class loader.\n * When the class loader is not needed anymore, it is released by\n * calling the {@link #release(ClassLoader)} method.\n * @param parent The parent class loader for this dynamic class loader.\n * @return The class loader.\n * @see #release(ClassLoader)\n */\n ClassLoader getClassLoader(ClassLoader parent);\n\n /**\n * Release the provided class loader.\n * When the class loader is not needed anymore, e.g. when the dynamic class\n * loader is shutdown, it is released with this method.\n * The implementation can use this hook to free any allocated resources etc.\n * @param classLoader The class loader.\n * @see #getClassLoader(ClassLoader)\n * @since 2.0\n */\n void release(ClassLoader classLoader);\n}", "boolean unregister(HistogramInterface histogram);", "@Override\n public void onDestroy() {\n this.unregisterReceiver(mReceiver);\n }", "public void unregisterNotify( Notify notify );", "boolean unregister(String identity);", "public void unRegisterSensor(String id) {\n if (sensorCatalog.hasSensor(id)) {\n updateManager.sensorChange(Constants.Updates.REMOVED, id);\n sensorCatalog.removeSensor(id);\n \n registry.unRegisterSensor(id);\n \n } else {\n handleException(\"Failed to unregister the sensor, non existing sensor\");\n }\n }", "@Override\n public void onDestroy() {\n BusProvider.getInstance().unregister(this);\n super.onDestroy();\n }", "void unregisterAll();", "public final void removeCatalog(CatalogReader provider) {\n synchronized (this) {\n mountedCatalogs.remove(provider);\n }\n firePropertyChange(PROP_MOUNTED_CATALOGS, null, null);\n \n // remove listener to the catalog\n try {\n provider.removeCatalogListener(catalogListener);\n } catch (UnsupportedOperationException ex) {\n // ignore it\n }\n \n }", "protected synchronized void removeUserProvider(UserProvider userProvider) {\n logger.debug(\"Removing {} from the list of user providers\", userProvider);\n roleProviders.remove(userProvider);\n }", "public interface MetricRegistry {\n\n /**\n * Returns or creates a sub-scope of this metric registry.\n *\n * @param name Name for the sub-scope.\n * @return A possibly-new metric registry, whose metrics will be 'children' of this scope.\n */\n MetricRegistry scope(String name);\n\n /**\n * Registers a new gauge.\n *\n * @deprecated Please use registerGauge instead.\n * @param gauge Gauge to register.\n * @param <T> Number type of the gauge's values.\n */\n @Deprecated\n <T extends Number> void register(Gauge<T> gauge);\n\n /**\n * Registers a new gauge.\n *\n * @param gauge Gauge to register.\n * @param <T> Number type of the gauge's values.\n * @return the Gauge created.\n */\n <T extends Number> Gauge<T> registerGauge(Gauge<T> gauge);\n\n /**\n * Unregisters a gauge from the registry.\n *\n * @param gauge Gauge to unregister.\n * @return true if the gauge was successfully unregistered, false otherwise.\n */\n boolean unregister(Gauge<?> gauge);\n\n /**\n * Creates and returns a {@link Counter} that can be incremented.\n *\n * @param name Name to associate with the counter.\n * @return Counter (initialized to zero) to increment the value.\n */\n Counter createCounter(String name);\n\n /**\n * Creates a counter and returns an {@link Counter} that can be incremented.\n * @deprecated Please use createCounter instead.\n * @param name Name to associate with the gauge.\n * @return Counter (initialized to zero) to increment the value.\n */\n @Deprecated\n Counter registerCounter(String name);\n\n /**\n * Unregisters a counter from the registry.\n * @param counter Counter to unregister.\n * @return true if the counter was successfully unregistered, false otherwise.\n */\n boolean unregister(Counter counter);\n\n /**\n * Create a HistogramInterface (with default parameters).\n * @return the newly created histogram.\n */\n HistogramInterface createHistogram(String name);\n\n /**\n * Register an HistogramInterface into the Metrics registry.\n * Useful when you want to create custom histogram (e.g. with better precision).\n * @return the Histogram you registered for chaining purposes.\n */\n HistogramInterface registerHistogram(HistogramInterface histogram);\n\n /**\n * Unregisters an histogram from the registry.\n * @param histogram Histogram to unregister.\n * @return true if the histogram was successfully unregistered, false otherwise.\n */\n boolean unregister(HistogramInterface histogram);\n\n /**\n * Convenient method that unregister any metric (identified by its name) from the registry.\n * @param name Name of metric to unregister.\n * @return true if the metric was successfully unregistered, false otherwise.\n */\n boolean unregister(String name);\n}" ]
[ "0.65925914", "0.6286833", "0.5847112", "0.55177337", "0.5371794", "0.5203837", "0.5143103", "0.5111942", "0.5046652", "0.49941134", "0.4979351", "0.49665987", "0.49543938", "0.49235937", "0.49128512", "0.49117503", "0.4865559", "0.4861426", "0.48588753", "0.4833708", "0.47865376", "0.4781442", "0.475685", "0.47548777", "0.47391963", "0.4713347", "0.46437165", "0.46406516", "0.4630385", "0.46158487", "0.46120363", "0.46030006", "0.459545", "0.4594615", "0.45876938", "0.45850536", "0.458415", "0.4561441", "0.45552135", "0.45548022", "0.45547068", "0.45539147", "0.4548935", "0.45472595", "0.45382467", "0.45257393", "0.45246595", "0.4518844", "0.45098948", "0.44996873", "0.44957322", "0.44846728", "0.447976", "0.44757473", "0.44721192", "0.4470407", "0.44612947", "0.4459647", "0.44590673", "0.4458371", "0.4438899", "0.44276336", "0.44270507", "0.44250488", "0.4424223", "0.4424052", "0.44230768", "0.4422807", "0.4411779", "0.4404837", "0.4389747", "0.43857646", "0.43802226", "0.43773773", "0.43711698", "0.4369549", "0.43684956", "0.43586215", "0.43495905", "0.43439484", "0.43429995", "0.43388247", "0.43287328", "0.43152258", "0.4303258", "0.42927894", "0.42924434", "0.42892215", "0.42830554", "0.42762378", "0.42689124", "0.4263028", "0.42602026", "0.42600682", "0.42555654", "0.42519122", "0.4250871", "0.42488933", "0.42417955", "0.42365015" ]
0.8796114
0
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit, ProbeFunction function);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);", "public void probe(String event) {\n profile.add(event);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, LongProbeFunction<S> function);", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n DoubleProbeFunction<S> probe);", "protected void setProbe(Probe<?, ?> probe) {\n this.probe = probe;\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n LongProbeFunction<S> probe);", "protected void setProbe(Probe<?,?> probe) {\n this.probe = probe;\n }", "public void registerHook(PluginHook name, Hook hook)\n\t{\n\t\tif (!checkHook(name))\n\t\t\tthis.hooks.put(name, hook);\n\t}", "@Override\r\n public void registerMonitor(String name, ProfileMonitor monitor) {\n\r\n }", "void register(String name, K key, V value);", "public void registerInput( String pinName ) {\n\t//Bug: all we do is prevent inputs from being used twice, more later\n\tfor (String s: inputs) {\n\t if (s.equals( pinName )) {\n\t\tErrors.warn( \"Input reused: \" + name + \" \" + pinName );\n\t }\n\t}\n\tinputs.add( pinName );\n }", "void register(String name, Object bean);", "public void registerOutput( String pinName ) {\n\t//Bug: we do nothing about this here, it'll get more fun later\n }", "public String registerNewProducer(Producer producer);", "@Override\n public void register(Remote registerObj, String name) throws RemoteException\n {\n synchronized (supervisors)\n {\n Logger.getGlobal().log(Level.INFO, String.format(\"Register Supervisor: %s.\", name));\n addSupervisor(name);\n registry.rebind(name, registerObj);\n }\n }", "@Override\n public void registerGauge(String name, Gauge gauge) {\n Objects.requireNonNull(name);\n gauges.compute(name, (id, prev) ->\n new PrometheusGaugeWrapper(id, gauge, prev != null ? prev.inner : null));\n }", "public void registerTexture(Texture texture, String filename)\n {\n textureMap.put(filename, texture);\n \n try {\n ImageComponent component = texture.getImage(0);\n componentMap.put(filename, component);\n }\n catch (CapabilityNotSetException cnse) {\n }\n }", "public static void registerDriver( String driverName )\n throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n Class.forName( driverName ).newInstance();\n }", "public void register(T t);", "public void registerForSimNameChange(Handler h, int what, Object obj) {\n Registrant r = new Registrant (h, what, obj);\n\n synchronized (INSTANCE_LOCK) {\n mMultiSimNamesRegistrants.add(r);\n }\n }", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "public static void registerNameInLoading(Object oo, String name) {\n\t\t\n\t\tobject2name.put(oo, name);\n\t}", "public int register(String fileName, IPv4 peer) {\n try {\n // check if this file has been registered before\n if (this.registry.containsKey(fileName)) {\n // it exists, acquire its known peer list and add this peer to it\n HashSet<IPv4> filePeerList = this.registry.get(fileName);\n filePeerList.add(peer);\n } else {\n // does not exist, create a new entry with this peer associated to it\n HashSet<IPv4> filePeerList = new HashSet<IPv4>();\n filePeerList.add(peer);\n this.registry.put(fileName, filePeerList);\n }\n this.log(String.format(\"-> registered '%s' to (leaf %s).\", fileName, peer));\n return 0;\n } catch (Exception e) {\n e.printStackTrace();\n return 1;\n }\n }", "public static void regist(String name, AbstractBridgeHandler handler) {\n if (handler != null) handlers.put(name, handler);\n }", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "void putInstrument(String vendorCode, Instrument instrument);", "public void registerHit(boolean alive) {\n\t\tSystem.out.println(\"Player \" + self + \" registered a hit\");\r\n\t}", "public void register(String name, Pipe pipe) throws Exception {\n pool.put(name, pipe);\n }", "public synchronized void registerObject(String name, Object object)\r\n throws IllegalArgumentException,\r\n NullPointerException\r\n {\r\n if (containsSubString(name, TIGHT_BINDING))\r\n {\r\n // user has used the wrong method to register this object.\r\n registerObject(object, name);\r\n }\r\n else\r\n {\r\n // check that name doesn't contain illegal characters\r\n if (!isValidName(name))\r\n {\r\n throw new IllegalArgumentException(\"ResourceManager.registerObject(): \"+\r\n \"name '\" +name+ \"' can not contain \"+\r\n \"the whitespace, or the characters \" +\r\n \" '\"+LOOSE_BINDING+\"', '\"+\r\n SINGLE_MATCH+ \"'\");\r\n }\r\n\r\n if (object == null)\r\n {\r\n throw new NullPointerException(\"ResourceManager.registerObject(): \"+\r\n \"object is null\");\r\n }\r\n\r\n // store this mapping\r\n storeObject(name, object);\r\n }\r\n }", "public static void registerDriver(String className) throws Exception {\n // The newInstance() call is a work around for some \n // broken Java implementations (?)\n Class.forName(className).newInstance(); \n }", "public Builder addProbeFields(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureProbeFieldsIsMutable();\n probeFields_.add(value);\n onChanged();\n return this;\n }", "public void removeProbeByName(String probeName) throws CatascopiaException{\n\t\tif (this.probes.containsKey(probeName)){\n\t\t\tIProbe probe = this.probes.get(probeName);\n\t\t\tprobe.removeQueue();\n\t\t\tprobe.terminate();\n\t\t\tthis.probes.remove(probeName);\n\t\t}\n\t\telse\n\t\t\tthrow new CatascopiaException(\"Remove Probe Failed, probe name given does not exist: \"+probeName, \n\t\t\t\t\t\t\t\t\t\t CatascopiaException.ExceptionType.KEY);\n\t}", "public boolean registerPlayer(Player p);", "public void registerSound(String soundName, String filename) {\r\n\r\n URL soundURL = getClass().getResource(mediaRoot + filename);\r\n MediaPlayer player = new MediaPlayer(new Media(soundURL.toExternalForm()));\r\n\r\n sounds.put(soundName, player);\r\n }", "org.hl7.fhir.ResourceReference addNewSpecimen();", "public void register(T o);", "public void addSpecialization(String Special, double Gpa) {\n\t\thMap.put(Special, Gpa);\n\t}", "public void register(RegistrationData d) {}", "void register(final SimpleHack<?> hack) {\n\t\tthis.hacks.add(hack);\n\t}", "void registerPlayer() throws IOException;", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "public void registerResource(final Resource resource) {\n if (resource != null && resource.getName() != null)\n resourceRegistry.putEntry(resource.getName(), resource);\n }", "public void addDriver(Driver driver) {\n drivers.put(driver);\n }", "void register(RegisterData data) throws Exception;", "HistogramInterface registerHistogram(HistogramInterface histogram);", "public interface Probe {\n\n String MSG_OK = \"OK\";\n int DEFAULT_CONN_TIMEOUT = 2000;\n int DEFAULT_READ_TIMEOUT = 2000;\n\n /**\n * Name of probe.\n * @return\n */\n String getName();\n\n /**\n * Executes the probe and returns result of the check.\n * @return\n */\n ProbeResult run();\n}", "public Endpoint registerProducer(NodeName nodeName, String name, String type, String path)\n throws IOTException {\n NodeInformation nodeInformation = nodeCatalog.getNode(nodeName);\n if (nodeInformation == null) {\n handleError(\"Cannot find the specified node: \" + nodeName);\n return null;\n }\n \n Endpoint endpoint = endpointAllocator.allocate(nodeName, name, type, path);\n nodeInformation.addProducer(endpoint);\n \n return endpoint;\n }", "public void registerMaid(String maidName, MyMaid maid){\n //add maid to registry\n mMaidRegistry.put(maidName, maid);\n }", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public int registerInput( Wire w, String pinName ) {\n\tErrors.warn( \"Illegal input pin: \" + name + \" \" + pinName );\n\treturn -1;\n }", "public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }", "public void registerService(String serviceName, Object service);", "public static void registerType(String name, Class<?> type) {\n if (dbTypes.containsKey(name)) {\n log.warn(\"Type %s already registered!\", name);\n return;\n }\n dbTypes.put(name, type);\n }", "public abstract void register();", "public void register(GameObject gameObject) {\r\n\t\tsuper.register((Object)gameObject);\r\n\t}", "protected void register(String data){\n }", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public void registerObserver(DriverObserver driver);", "private void instantiateProbes() {\n\t\tString probe_str = this.config.getProperty(\"probes.include\", \"all\");\n\t\tString probe_exclude_str = this.config.getProperty(\"probes.exclude\", \"\");\n\t\tString probe_external = this.config.getProperty(\"probes.external\", \"\");\n\t\t\t\t\n\t\ttry {\n\t\t\tArrayList<String> availableProbeList = this.listAvailableProbeClasses();\n\t\t\t//user wants to instantiate all available probes with default params\n\t\t\t//TODO - allow user to parameterize probes when selecting to add all probes\n\t\t\tif (probe_str.equals(\"all\")) {\n\t\t\t\tfor(String s : availableProbeList) \n\t\t\t\t\tthis.probes.put(s, null);\n\t\t\t\t\n\t\t\t\t//user wants to instantiate all available probes except the ones specified for exclusion\n\t\t\t\tif (!probe_exclude_str.equals(\"\")) {\n\t\t\t\t\tString[] probe_list = probe_exclude_str.split(\";\");\n\t\t\t\t\tfor(String s:probe_list)\n\t\t\t\t\t\tthis.probes.remove(s.split(\",\")[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//instantiate\n\t\t\t\tfor(Entry<String,IProbe> p:this.probes.entrySet()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH, p.getKey());\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tp.setValue(tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user wants to instantiate specific probes (and may set custom params)\n\t\t\telse{\n\t\t\t\tString[] probe_list = probe_str.split(\";\");\n\t\t\t\tfor(String s:probe_list) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH,params[0]);\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tif(params.length > 1) //user wants to define custom collecting period\n\t\t\t\t\t\t\ttempProbe.setCollectPeriod(Integer.parseInt(params[1]));\n\t\t\t\t\t\tthis.probes.put(params[0], tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//activate Agent probes\n\t\t\tthis.activateAllProbes();\n\t\t\t\n\t\t\t//deploy external probes located in a custom user-defined path\n\t\t\tif (!probe_external.equals(\"\")) {\n\t\t\t\tString[] probe_list = probe_external.split(\";\");\n\t\t\t\tfor(String s:probe_list){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tString pclass = params[0];\n\t\t\t\t\t\tString ppath = params[1];\n\t\t\t\t\t\tthis.deployProbeAtRuntime(ppath, pclass);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, \"External Probe deployment error. Either the probe class name of classpath are not correctly provided\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t//log probe list added to Agent\n\t\t\tString l = \" \";\n\t\t\tfor(Entry<String,IProbe> entry:this.probes.entrySet())\n\t\t\t\tl += entry.getKey() + \",\";\n\t\t\tthis.writeToLog(Level.INFO,\"Probes Activated: \"+l.substring(0, l.length()-1));\n\t\t}\n\t\tcatch (CatascopiaException e){\n\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t}\n\t}", "protected void register() {\r\n\t\tif ((audioFile != null) && (audioFile instanceof AudioFileURL)) {\r\n\t\t\t((AudioFileURL) audioFile).addListener(this);\r\n\t\t}\r\n\t}", "public void register(){\n }", "protected void registerAppMap(String mapname, ApplicationMap map){\n\t\tappmaps.put(mapname.toUpperCase(), map);\n\t}", "public void put(ResourceLocation name, Tag nbt) {\n data.put(name.toString(), nbt);\n }", "private void addProvider(\n String elementName,\n String namespace,\n Class<?> provider)\n {\n // Attempt to load the provider class and then create\n // a new instance if it's an IQProvider. Otherwise, if it's\n // an IQ class, add the class object itself, then we'll use\n // reflection later to create instances of the class.\n try\n {\n // Add the provider to the map.\n if (IQProvider.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider.newInstance());\n }\n else if (IQ.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider);\n }\n }\n catch (Throwable t)\n {\n logger.error(\"Error adding iq provider.\", t);\n }\n }", "private void register(Path dir) {\n WatchKey key = null;\n\t\t\n try {\n key = dir.register(watcherService, STANDARD_EVENTS, FILE_TREE);\n } catch (UnsupportedOperationException ex) {\n LOG.warn(\"File watching not supported: {}\", ex.getMessage());\n LOG.trace(\"Exception:\", ex);\n } catch (IOException ex) {\n LOG.error(\"IO Error:\", ex);\n }\n\n if (key != null) {\n if (trace) {\n Path prev = keys.get(key);\n if (prev == null) {\n LOG.info(\"Register Watcher for: {}\", dir);\n } else if (!dir.equals(prev)) {\n LOG.info(\"Update Watcher for: {} -> {}\", prev, dir);\n }\n }\n keys.put(key, dir);\n }\n }", "public void registerPatientMethod1(Patient p);", "public static <T extends Item> T registerItem(T item, String name) {\n return registerItem(item, name, null);\n }", "@Override\n\tpublic final void register(final Agent agent) {\n\t\tsynchronized (this.agents) {\n\t\t\tthis.agents.put(agent.getAID(), agent);\n\t\t}\n\t}", "@ProbeBuilder\n public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {\n probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, \"*\");\n return probe;\n }", "public void register(Observer or);", "public void removeProbe(RadioProbe p) {\n probes.remove(p);\n }", "private static SoundEvent registerSound(String soundName)\r\n\t{\n\t\tResourceLocation location = new ResourceLocation(Reference.MODID, soundName);\r\n\t\tSoundEvent e = new SoundEvent(location);\r\n\t\tSoundEvent.REGISTRY.register(size, location, e);\r\n\t\tsize++;\r\n\t\treturn e;\r\n\t\t//return GameRegistry.register(new SoundEvent(soundID).setRegistryName(soundID));\r\n\t\t\t\t\t\t\r\n\t}", "void register();", "@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}", "static synchronized void register(Tool tool) {\n\t\tValid.checkBoolean(!isRegistered(tool), \"Tool with itemstack \" + tool.getItem() + \" already registered\");\n\n\t\ttools.add(tool);\n\t}", "public interface Probe {\n void start();\n\n void stop();\n}", "public void registerImageComponent(ImageComponent component, String filename)\n {\n componentMap.put(filename, component);\n }", "private static RegistryKey<World> register(String name){\n return RegistryKey.of(Registry.WORLD_KEY, new Identifier(Shurlin.MODID, name));\n }", "public void registerService(Registrant r) {\n namingService.registerService(r);\n }", "public void register(NPC npc) {\n\t\tnpcs.add(npc);\n\t}", "public void addAlert(String alert) {\n\t\talertsList.add(alert);\n\t\t// now call alertFound()\n\t\t// alertFound();\n\t}", "@Override\n\tpublic void registerPet(PetVO vo) {\n\t\t\n\t}", "private void addRegionToSpriteProviders(final Region region, final String name) {\n for (final SpriteProvider sp : spriteProviders) {\n sp.addRegion(region, name);\n }\n }", "private void register(Path dir) throws IOException {\n\t\tWatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n\t\tif (trace) {\n\t\t\tPath prev = keys.get(key);\n\t\t\tif (prev == null) {\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(String.format(\"register: %s\\n\", dir));\n\t\t\t} else {\n\t\t\t\tif (!dir.equals(prev)) {\n\t\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\t\tlogger.debug(String.format(\"update: %s -> %s\\n\", prev, dir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tkeys.put(key, dir);\n\t}", "public int register(String name) {\n\t\tint ticketNumber = nextTicketNumber;\n\t\tnextTicketNumber++;\n\t\tallowedPassengers.put(ticketNumber, name);\n\t\treturn ticketNumber;\n\t}", "void register(Opcode opcode);", "public void registerService(String serviceName){\n jmc.registerService(serviceName);\n }", "public static void registerListener(AltResource resource, Object listener){\n Set<Object> resourceListeners;\n if(listeners.containsKey(resource))\n resourceListeners = listeners.get(resource);\n else\n resourceListeners = new HashSet<>();\n resourceListeners.add(listener);\n listeners.put(resource, resourceListeners);\n }", "public void store(String name, String val, String register, int i) {\r\n registerName.add(name);\r\n registerValues.add(val);\r\n registerRegister.add(register);\r\n }", "@ProbeBuilder\n\tpublic TestProbeBuilder probeConfiguration( TestProbeBuilder probe ) {\n\t\tprobe.addTest( DmTest.class );\n\t\tprobe.addTest( TestUtils.class );\n\n\t\tprobe.addTest( AbstractIntegrationTest.class );\n\t\tprobe.addTest( IMessagingConfiguration.class );\n\t\tprobe.addTest( ItConfigurationBean.class );\n\n\t\treturn probe;\n\t}", "<T extends EventDetector> void addEventDetector(T detector);", "static public int register(Calibration cal_in) {\r\n int ret_val = 0;\r\n if (registeredCals.contains(cal_in)) {\r\n CrashTracker.logAndPrint(\"[CalWrangler] WARNING: Calibration Wrangler: \" + cal_in.name\r\n + \" has already been added to the cal wrangler. Nothing done.\");\r\n ret_val = -1;\r\n } else {\r\n registeredCals.add(cal_in);\r\n ret_val = 0;\r\n }\r\n return ret_val;\r\n }", "public NodeInformation registerNode(NodeName nodeName) throws IOTException {\n if (nodeCatalog.hasNode(nodeName)) {\n handleError(\"Cannot register node.. node already exists: \" + nodeName);\n return null;\n }\n \n NodeInformation nodeInformation = new NodeInformation(nodeName);\n nodeCatalog.addNode(nodeInformation);\n \n return nodeInformation;\n }", "public static void registerExternal(External hooks) { external = hooks; }", "public void register(FHIRPersistence fhirPersistence, String provider) {\n this.fhirPersistence = fhirPersistence;\n this.provider = provider;\n }", "public boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException;" ]
[ "0.64716804", "0.63866746", "0.635722", "0.6300919", "0.6253267", "0.59713084", "0.5791431", "0.5788306", "0.5646523", "0.5638123", "0.5453322", "0.5205911", "0.515622", "0.5141216", "0.51320237", "0.5113913", "0.5111678", "0.50694585", "0.50520885", "0.504041", "0.49419662", "0.4920949", "0.4920882", "0.48700237", "0.4848965", "0.48319408", "0.4819349", "0.47971022", "0.4796766", "0.47823206", "0.47575673", "0.47538668", "0.47203153", "0.46686372", "0.46611157", "0.46541888", "0.46217358", "0.46177915", "0.46041822", "0.46032408", "0.45994473", "0.45982382", "0.45819792", "0.4578978", "0.45690447", "0.4564167", "0.4550212", "0.45473656", "0.45472613", "0.45355633", "0.45337176", "0.45279625", "0.45219472", "0.45215484", "0.45083684", "0.45077777", "0.45012212", "0.44979113", "0.44892204", "0.4466597", "0.44631818", "0.4463084", "0.44610813", "0.44574597", "0.4456384", "0.44496915", "0.4448858", "0.44299152", "0.4422995", "0.44215178", "0.44195774", "0.44143894", "0.44137457", "0.4406386", "0.43947232", "0.43922153", "0.43795186", "0.43726414", "0.43709564", "0.43661976", "0.43603116", "0.4339231", "0.4339152", "0.43372157", "0.4333174", "0.43260175", "0.43222913", "0.43149066", "0.42973387", "0.4290667", "0.42865837", "0.42847705", "0.42812738", "0.4279859", "0.4277438", "0.42759255", "0.42731437", "0.42635128", "0.42623514", "0.4249233" ]
0.58107
6
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, String name, ProbeLevel level, LongProbeFunction<S> function);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);", "public void probe(String event) {\n profile.add(event);\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n ProbeFunction function);", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n DoubleProbeFunction<S> probe);", "protected void setProbe(Probe<?, ?> probe) {\n this.probe = probe;\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n LongProbeFunction<S> probe);", "protected void setProbe(Probe<?,?> probe) {\n this.probe = probe;\n }", "public void registerHook(PluginHook name, Hook hook)\n\t{\n\t\tif (!checkHook(name))\n\t\t\tthis.hooks.put(name, hook);\n\t}", "@Override\r\n public void registerMonitor(String name, ProfileMonitor monitor) {\n\r\n }", "void register(String name, K key, V value);", "public void registerInput( String pinName ) {\n\t//Bug: all we do is prevent inputs from being used twice, more later\n\tfor (String s: inputs) {\n\t if (s.equals( pinName )) {\n\t\tErrors.warn( \"Input reused: \" + name + \" \" + pinName );\n\t }\n\t}\n\tinputs.add( pinName );\n }", "void register(String name, Object bean);", "public void registerOutput( String pinName ) {\n\t//Bug: we do nothing about this here, it'll get more fun later\n }", "public String registerNewProducer(Producer producer);", "@Override\n public void register(Remote registerObj, String name) throws RemoteException\n {\n synchronized (supervisors)\n {\n Logger.getGlobal().log(Level.INFO, String.format(\"Register Supervisor: %s.\", name));\n addSupervisor(name);\n registry.rebind(name, registerObj);\n }\n }", "@Override\n public void registerGauge(String name, Gauge gauge) {\n Objects.requireNonNull(name);\n gauges.compute(name, (id, prev) ->\n new PrometheusGaugeWrapper(id, gauge, prev != null ? prev.inner : null));\n }", "public void registerTexture(Texture texture, String filename)\n {\n textureMap.put(filename, texture);\n \n try {\n ImageComponent component = texture.getImage(0);\n componentMap.put(filename, component);\n }\n catch (CapabilityNotSetException cnse) {\n }\n }", "public static void registerDriver( String driverName )\n throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n Class.forName( driverName ).newInstance();\n }", "public void register(T t);", "public void registerForSimNameChange(Handler h, int what, Object obj) {\n Registrant r = new Registrant (h, what, obj);\n\n synchronized (INSTANCE_LOCK) {\n mMultiSimNamesRegistrants.add(r);\n }\n }", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "public static void registerNameInLoading(Object oo, String name) {\n\t\t\n\t\tobject2name.put(oo, name);\n\t}", "public int register(String fileName, IPv4 peer) {\n try {\n // check if this file has been registered before\n if (this.registry.containsKey(fileName)) {\n // it exists, acquire its known peer list and add this peer to it\n HashSet<IPv4> filePeerList = this.registry.get(fileName);\n filePeerList.add(peer);\n } else {\n // does not exist, create a new entry with this peer associated to it\n HashSet<IPv4> filePeerList = new HashSet<IPv4>();\n filePeerList.add(peer);\n this.registry.put(fileName, filePeerList);\n }\n this.log(String.format(\"-> registered '%s' to (leaf %s).\", fileName, peer));\n return 0;\n } catch (Exception e) {\n e.printStackTrace();\n return 1;\n }\n }", "public static void regist(String name, AbstractBridgeHandler handler) {\n if (handler != null) handlers.put(name, handler);\n }", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "void putInstrument(String vendorCode, Instrument instrument);", "public void registerHit(boolean alive) {\n\t\tSystem.out.println(\"Player \" + self + \" registered a hit\");\r\n\t}", "public void register(String name, Pipe pipe) throws Exception {\n pool.put(name, pipe);\n }", "public synchronized void registerObject(String name, Object object)\r\n throws IllegalArgumentException,\r\n NullPointerException\r\n {\r\n if (containsSubString(name, TIGHT_BINDING))\r\n {\r\n // user has used the wrong method to register this object.\r\n registerObject(object, name);\r\n }\r\n else\r\n {\r\n // check that name doesn't contain illegal characters\r\n if (!isValidName(name))\r\n {\r\n throw new IllegalArgumentException(\"ResourceManager.registerObject(): \"+\r\n \"name '\" +name+ \"' can not contain \"+\r\n \"the whitespace, or the characters \" +\r\n \" '\"+LOOSE_BINDING+\"', '\"+\r\n SINGLE_MATCH+ \"'\");\r\n }\r\n\r\n if (object == null)\r\n {\r\n throw new NullPointerException(\"ResourceManager.registerObject(): \"+\r\n \"object is null\");\r\n }\r\n\r\n // store this mapping\r\n storeObject(name, object);\r\n }\r\n }", "public static void registerDriver(String className) throws Exception {\n // The newInstance() call is a work around for some \n // broken Java implementations (?)\n Class.forName(className).newInstance(); \n }", "public Builder addProbeFields(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureProbeFieldsIsMutable();\n probeFields_.add(value);\n onChanged();\n return this;\n }", "public void removeProbeByName(String probeName) throws CatascopiaException{\n\t\tif (this.probes.containsKey(probeName)){\n\t\t\tIProbe probe = this.probes.get(probeName);\n\t\t\tprobe.removeQueue();\n\t\t\tprobe.terminate();\n\t\t\tthis.probes.remove(probeName);\n\t\t}\n\t\telse\n\t\t\tthrow new CatascopiaException(\"Remove Probe Failed, probe name given does not exist: \"+probeName, \n\t\t\t\t\t\t\t\t\t\t CatascopiaException.ExceptionType.KEY);\n\t}", "public boolean registerPlayer(Player p);", "public void registerSound(String soundName, String filename) {\r\n\r\n URL soundURL = getClass().getResource(mediaRoot + filename);\r\n MediaPlayer player = new MediaPlayer(new Media(soundURL.toExternalForm()));\r\n\r\n sounds.put(soundName, player);\r\n }", "org.hl7.fhir.ResourceReference addNewSpecimen();", "public void register(T o);", "public void addSpecialization(String Special, double Gpa) {\n\t\thMap.put(Special, Gpa);\n\t}", "public void register(RegistrationData d) {}", "void register(final SimpleHack<?> hack) {\n\t\tthis.hacks.add(hack);\n\t}", "void registerPlayer() throws IOException;", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "public void registerResource(final Resource resource) {\n if (resource != null && resource.getName() != null)\n resourceRegistry.putEntry(resource.getName(), resource);\n }", "public void addDriver(Driver driver) {\n drivers.put(driver);\n }", "void register(RegisterData data) throws Exception;", "HistogramInterface registerHistogram(HistogramInterface histogram);", "public interface Probe {\n\n String MSG_OK = \"OK\";\n int DEFAULT_CONN_TIMEOUT = 2000;\n int DEFAULT_READ_TIMEOUT = 2000;\n\n /**\n * Name of probe.\n * @return\n */\n String getName();\n\n /**\n * Executes the probe and returns result of the check.\n * @return\n */\n ProbeResult run();\n}", "public Endpoint registerProducer(NodeName nodeName, String name, String type, String path)\n throws IOTException {\n NodeInformation nodeInformation = nodeCatalog.getNode(nodeName);\n if (nodeInformation == null) {\n handleError(\"Cannot find the specified node: \" + nodeName);\n return null;\n }\n \n Endpoint endpoint = endpointAllocator.allocate(nodeName, name, type, path);\n nodeInformation.addProducer(endpoint);\n \n return endpoint;\n }", "public void registerMaid(String maidName, MyMaid maid){\n //add maid to registry\n mMaidRegistry.put(maidName, maid);\n }", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public int registerInput( Wire w, String pinName ) {\n\tErrors.warn( \"Illegal input pin: \" + name + \" \" + pinName );\n\treturn -1;\n }", "public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }", "public void registerService(String serviceName, Object service);", "public static void registerType(String name, Class<?> type) {\n if (dbTypes.containsKey(name)) {\n log.warn(\"Type %s already registered!\", name);\n return;\n }\n dbTypes.put(name, type);\n }", "public abstract void register();", "public void register(GameObject gameObject) {\r\n\t\tsuper.register((Object)gameObject);\r\n\t}", "protected void register(String data){\n }", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public void registerObserver(DriverObserver driver);", "private void instantiateProbes() {\n\t\tString probe_str = this.config.getProperty(\"probes.include\", \"all\");\n\t\tString probe_exclude_str = this.config.getProperty(\"probes.exclude\", \"\");\n\t\tString probe_external = this.config.getProperty(\"probes.external\", \"\");\n\t\t\t\t\n\t\ttry {\n\t\t\tArrayList<String> availableProbeList = this.listAvailableProbeClasses();\n\t\t\t//user wants to instantiate all available probes with default params\n\t\t\t//TODO - allow user to parameterize probes when selecting to add all probes\n\t\t\tif (probe_str.equals(\"all\")) {\n\t\t\t\tfor(String s : availableProbeList) \n\t\t\t\t\tthis.probes.put(s, null);\n\t\t\t\t\n\t\t\t\t//user wants to instantiate all available probes except the ones specified for exclusion\n\t\t\t\tif (!probe_exclude_str.equals(\"\")) {\n\t\t\t\t\tString[] probe_list = probe_exclude_str.split(\";\");\n\t\t\t\t\tfor(String s:probe_list)\n\t\t\t\t\t\tthis.probes.remove(s.split(\",\")[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//instantiate\n\t\t\t\tfor(Entry<String,IProbe> p:this.probes.entrySet()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH, p.getKey());\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tp.setValue(tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user wants to instantiate specific probes (and may set custom params)\n\t\t\telse{\n\t\t\t\tString[] probe_list = probe_str.split(\";\");\n\t\t\t\tfor(String s:probe_list) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH,params[0]);\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tif(params.length > 1) //user wants to define custom collecting period\n\t\t\t\t\t\t\ttempProbe.setCollectPeriod(Integer.parseInt(params[1]));\n\t\t\t\t\t\tthis.probes.put(params[0], tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//activate Agent probes\n\t\t\tthis.activateAllProbes();\n\t\t\t\n\t\t\t//deploy external probes located in a custom user-defined path\n\t\t\tif (!probe_external.equals(\"\")) {\n\t\t\t\tString[] probe_list = probe_external.split(\";\");\n\t\t\t\tfor(String s:probe_list){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tString pclass = params[0];\n\t\t\t\t\t\tString ppath = params[1];\n\t\t\t\t\t\tthis.deployProbeAtRuntime(ppath, pclass);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, \"External Probe deployment error. Either the probe class name of classpath are not correctly provided\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t//log probe list added to Agent\n\t\t\tString l = \" \";\n\t\t\tfor(Entry<String,IProbe> entry:this.probes.entrySet())\n\t\t\t\tl += entry.getKey() + \",\";\n\t\t\tthis.writeToLog(Level.INFO,\"Probes Activated: \"+l.substring(0, l.length()-1));\n\t\t}\n\t\tcatch (CatascopiaException e){\n\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t}\n\t}", "protected void register() {\r\n\t\tif ((audioFile != null) && (audioFile instanceof AudioFileURL)) {\r\n\t\t\t((AudioFileURL) audioFile).addListener(this);\r\n\t\t}\r\n\t}", "public void register(){\n }", "protected void registerAppMap(String mapname, ApplicationMap map){\n\t\tappmaps.put(mapname.toUpperCase(), map);\n\t}", "public void put(ResourceLocation name, Tag nbt) {\n data.put(name.toString(), nbt);\n }", "private void addProvider(\n String elementName,\n String namespace,\n Class<?> provider)\n {\n // Attempt to load the provider class and then create\n // a new instance if it's an IQProvider. Otherwise, if it's\n // an IQ class, add the class object itself, then we'll use\n // reflection later to create instances of the class.\n try\n {\n // Add the provider to the map.\n if (IQProvider.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider.newInstance());\n }\n else if (IQ.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider);\n }\n }\n catch (Throwable t)\n {\n logger.error(\"Error adding iq provider.\", t);\n }\n }", "private void register(Path dir) {\n WatchKey key = null;\n\t\t\n try {\n key = dir.register(watcherService, STANDARD_EVENTS, FILE_TREE);\n } catch (UnsupportedOperationException ex) {\n LOG.warn(\"File watching not supported: {}\", ex.getMessage());\n LOG.trace(\"Exception:\", ex);\n } catch (IOException ex) {\n LOG.error(\"IO Error:\", ex);\n }\n\n if (key != null) {\n if (trace) {\n Path prev = keys.get(key);\n if (prev == null) {\n LOG.info(\"Register Watcher for: {}\", dir);\n } else if (!dir.equals(prev)) {\n LOG.info(\"Update Watcher for: {} -> {}\", prev, dir);\n }\n }\n keys.put(key, dir);\n }\n }", "public void registerPatientMethod1(Patient p);", "public static <T extends Item> T registerItem(T item, String name) {\n return registerItem(item, name, null);\n }", "@Override\n\tpublic final void register(final Agent agent) {\n\t\tsynchronized (this.agents) {\n\t\t\tthis.agents.put(agent.getAID(), agent);\n\t\t}\n\t}", "@ProbeBuilder\n public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {\n probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, \"*\");\n return probe;\n }", "public void register(Observer or);", "public void removeProbe(RadioProbe p) {\n probes.remove(p);\n }", "private static SoundEvent registerSound(String soundName)\r\n\t{\n\t\tResourceLocation location = new ResourceLocation(Reference.MODID, soundName);\r\n\t\tSoundEvent e = new SoundEvent(location);\r\n\t\tSoundEvent.REGISTRY.register(size, location, e);\r\n\t\tsize++;\r\n\t\treturn e;\r\n\t\t//return GameRegistry.register(new SoundEvent(soundID).setRegistryName(soundID));\r\n\t\t\t\t\t\t\r\n\t}", "void register();", "@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}", "static synchronized void register(Tool tool) {\n\t\tValid.checkBoolean(!isRegistered(tool), \"Tool with itemstack \" + tool.getItem() + \" already registered\");\n\n\t\ttools.add(tool);\n\t}", "public interface Probe {\n void start();\n\n void stop();\n}", "public void registerImageComponent(ImageComponent component, String filename)\n {\n componentMap.put(filename, component);\n }", "private static RegistryKey<World> register(String name){\n return RegistryKey.of(Registry.WORLD_KEY, new Identifier(Shurlin.MODID, name));\n }", "public void registerService(Registrant r) {\n namingService.registerService(r);\n }", "public void register(NPC npc) {\n\t\tnpcs.add(npc);\n\t}", "public void addAlert(String alert) {\n\t\talertsList.add(alert);\n\t\t// now call alertFound()\n\t\t// alertFound();\n\t}", "@Override\n\tpublic void registerPet(PetVO vo) {\n\t\t\n\t}", "private void addRegionToSpriteProviders(final Region region, final String name) {\n for (final SpriteProvider sp : spriteProviders) {\n sp.addRegion(region, name);\n }\n }", "private void register(Path dir) throws IOException {\n\t\tWatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n\t\tif (trace) {\n\t\t\tPath prev = keys.get(key);\n\t\t\tif (prev == null) {\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(String.format(\"register: %s\\n\", dir));\n\t\t\t} else {\n\t\t\t\tif (!dir.equals(prev)) {\n\t\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\t\tlogger.debug(String.format(\"update: %s -> %s\\n\", prev, dir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tkeys.put(key, dir);\n\t}", "public int register(String name) {\n\t\tint ticketNumber = nextTicketNumber;\n\t\tnextTicketNumber++;\n\t\tallowedPassengers.put(ticketNumber, name);\n\t\treturn ticketNumber;\n\t}", "void register(Opcode opcode);", "public void registerService(String serviceName){\n jmc.registerService(serviceName);\n }", "public static void registerListener(AltResource resource, Object listener){\n Set<Object> resourceListeners;\n if(listeners.containsKey(resource))\n resourceListeners = listeners.get(resource);\n else\n resourceListeners = new HashSet<>();\n resourceListeners.add(listener);\n listeners.put(resource, resourceListeners);\n }", "public void store(String name, String val, String register, int i) {\r\n registerName.add(name);\r\n registerValues.add(val);\r\n registerRegister.add(register);\r\n }", "@ProbeBuilder\n\tpublic TestProbeBuilder probeConfiguration( TestProbeBuilder probe ) {\n\t\tprobe.addTest( DmTest.class );\n\t\tprobe.addTest( TestUtils.class );\n\n\t\tprobe.addTest( AbstractIntegrationTest.class );\n\t\tprobe.addTest( IMessagingConfiguration.class );\n\t\tprobe.addTest( ItConfigurationBean.class );\n\n\t\treturn probe;\n\t}", "<T extends EventDetector> void addEventDetector(T detector);", "static public int register(Calibration cal_in) {\r\n int ret_val = 0;\r\n if (registeredCals.contains(cal_in)) {\r\n CrashTracker.logAndPrint(\"[CalWrangler] WARNING: Calibration Wrangler: \" + cal_in.name\r\n + \" has already been added to the cal wrangler. Nothing done.\");\r\n ret_val = -1;\r\n } else {\r\n registeredCals.add(cal_in);\r\n ret_val = 0;\r\n }\r\n return ret_val;\r\n }", "public NodeInformation registerNode(NodeName nodeName) throws IOTException {\n if (nodeCatalog.hasNode(nodeName)) {\n handleError(\"Cannot register node.. node already exists: \" + nodeName);\n return null;\n }\n \n NodeInformation nodeInformation = new NodeInformation(nodeName);\n nodeCatalog.addNode(nodeInformation);\n \n return nodeInformation;\n }", "public static void registerExternal(External hooks) { external = hooks; }", "public void register(FHIRPersistence fhirPersistence, String provider) {\n this.fhirPersistence = fhirPersistence;\n this.provider = provider;\n }", "public boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException;" ]
[ "0.64716804", "0.63866746", "0.635722", "0.6300919", "0.6253267", "0.59713084", "0.58107", "0.5788306", "0.5646523", "0.5638123", "0.5453322", "0.5205911", "0.515622", "0.5141216", "0.51320237", "0.5113913", "0.5111678", "0.50694585", "0.50520885", "0.504041", "0.49419662", "0.4920949", "0.4920882", "0.48700237", "0.4848965", "0.48319408", "0.4819349", "0.47971022", "0.4796766", "0.47823206", "0.47575673", "0.47538668", "0.47203153", "0.46686372", "0.46611157", "0.46541888", "0.46217358", "0.46177915", "0.46041822", "0.46032408", "0.45994473", "0.45982382", "0.45819792", "0.4578978", "0.45690447", "0.4564167", "0.4550212", "0.45473656", "0.45472613", "0.45355633", "0.45337176", "0.45279625", "0.45219472", "0.45215484", "0.45083684", "0.45077777", "0.45012212", "0.44979113", "0.44892204", "0.4466597", "0.44631818", "0.4463084", "0.44610813", "0.44574597", "0.4456384", "0.44496915", "0.4448858", "0.44299152", "0.4422995", "0.44215178", "0.44195774", "0.44143894", "0.44137457", "0.4406386", "0.43947232", "0.43922153", "0.43795186", "0.43726414", "0.43709564", "0.43661976", "0.43603116", "0.4339231", "0.4339152", "0.43372157", "0.4333174", "0.43260175", "0.43222913", "0.43149066", "0.42973387", "0.4290667", "0.42865837", "0.42847705", "0.42812738", "0.4279859", "0.4277438", "0.42759255", "0.42731437", "0.42635128", "0.42623514", "0.4249233" ]
0.5791431
7
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, DoubleProbeFunction<S> probe);", "public void probe(String event) {\n profile.add(event);\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n ProbeFunction function);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, LongProbeFunction<S> function);", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n DoubleProbeFunction<S> probe);", "protected void setProbe(Probe<?, ?> probe) {\n this.probe = probe;\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n LongProbeFunction<S> probe);", "protected void setProbe(Probe<?,?> probe) {\n this.probe = probe;\n }", "public void registerHook(PluginHook name, Hook hook)\n\t{\n\t\tif (!checkHook(name))\n\t\t\tthis.hooks.put(name, hook);\n\t}", "@Override\r\n public void registerMonitor(String name, ProfileMonitor monitor) {\n\r\n }", "void register(String name, K key, V value);", "public void registerInput( String pinName ) {\n\t//Bug: all we do is prevent inputs from being used twice, more later\n\tfor (String s: inputs) {\n\t if (s.equals( pinName )) {\n\t\tErrors.warn( \"Input reused: \" + name + \" \" + pinName );\n\t }\n\t}\n\tinputs.add( pinName );\n }", "void register(String name, Object bean);", "public void registerOutput( String pinName ) {\n\t//Bug: we do nothing about this here, it'll get more fun later\n }", "public String registerNewProducer(Producer producer);", "@Override\n public void register(Remote registerObj, String name) throws RemoteException\n {\n synchronized (supervisors)\n {\n Logger.getGlobal().log(Level.INFO, String.format(\"Register Supervisor: %s.\", name));\n addSupervisor(name);\n registry.rebind(name, registerObj);\n }\n }", "@Override\n public void registerGauge(String name, Gauge gauge) {\n Objects.requireNonNull(name);\n gauges.compute(name, (id, prev) ->\n new PrometheusGaugeWrapper(id, gauge, prev != null ? prev.inner : null));\n }", "public void registerTexture(Texture texture, String filename)\n {\n textureMap.put(filename, texture);\n \n try {\n ImageComponent component = texture.getImage(0);\n componentMap.put(filename, component);\n }\n catch (CapabilityNotSetException cnse) {\n }\n }", "public static void registerDriver( String driverName )\n throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n Class.forName( driverName ).newInstance();\n }", "public void register(T t);", "public void registerForSimNameChange(Handler h, int what, Object obj) {\n Registrant r = new Registrant (h, what, obj);\n\n synchronized (INSTANCE_LOCK) {\n mMultiSimNamesRegistrants.add(r);\n }\n }", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "public static void registerNameInLoading(Object oo, String name) {\n\t\t\n\t\tobject2name.put(oo, name);\n\t}", "public int register(String fileName, IPv4 peer) {\n try {\n // check if this file has been registered before\n if (this.registry.containsKey(fileName)) {\n // it exists, acquire its known peer list and add this peer to it\n HashSet<IPv4> filePeerList = this.registry.get(fileName);\n filePeerList.add(peer);\n } else {\n // does not exist, create a new entry with this peer associated to it\n HashSet<IPv4> filePeerList = new HashSet<IPv4>();\n filePeerList.add(peer);\n this.registry.put(fileName, filePeerList);\n }\n this.log(String.format(\"-> registered '%s' to (leaf %s).\", fileName, peer));\n return 0;\n } catch (Exception e) {\n e.printStackTrace();\n return 1;\n }\n }", "public static void regist(String name, AbstractBridgeHandler handler) {\n if (handler != null) handlers.put(name, handler);\n }", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "void putInstrument(String vendorCode, Instrument instrument);", "public void registerHit(boolean alive) {\n\t\tSystem.out.println(\"Player \" + self + \" registered a hit\");\r\n\t}", "public void register(String name, Pipe pipe) throws Exception {\n pool.put(name, pipe);\n }", "public synchronized void registerObject(String name, Object object)\r\n throws IllegalArgumentException,\r\n NullPointerException\r\n {\r\n if (containsSubString(name, TIGHT_BINDING))\r\n {\r\n // user has used the wrong method to register this object.\r\n registerObject(object, name);\r\n }\r\n else\r\n {\r\n // check that name doesn't contain illegal characters\r\n if (!isValidName(name))\r\n {\r\n throw new IllegalArgumentException(\"ResourceManager.registerObject(): \"+\r\n \"name '\" +name+ \"' can not contain \"+\r\n \"the whitespace, or the characters \" +\r\n \" '\"+LOOSE_BINDING+\"', '\"+\r\n SINGLE_MATCH+ \"'\");\r\n }\r\n\r\n if (object == null)\r\n {\r\n throw new NullPointerException(\"ResourceManager.registerObject(): \"+\r\n \"object is null\");\r\n }\r\n\r\n // store this mapping\r\n storeObject(name, object);\r\n }\r\n }", "public static void registerDriver(String className) throws Exception {\n // The newInstance() call is a work around for some \n // broken Java implementations (?)\n Class.forName(className).newInstance(); \n }", "public Builder addProbeFields(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureProbeFieldsIsMutable();\n probeFields_.add(value);\n onChanged();\n return this;\n }", "public void removeProbeByName(String probeName) throws CatascopiaException{\n\t\tif (this.probes.containsKey(probeName)){\n\t\t\tIProbe probe = this.probes.get(probeName);\n\t\t\tprobe.removeQueue();\n\t\t\tprobe.terminate();\n\t\t\tthis.probes.remove(probeName);\n\t\t}\n\t\telse\n\t\t\tthrow new CatascopiaException(\"Remove Probe Failed, probe name given does not exist: \"+probeName, \n\t\t\t\t\t\t\t\t\t\t CatascopiaException.ExceptionType.KEY);\n\t}", "public boolean registerPlayer(Player p);", "public void registerSound(String soundName, String filename) {\r\n\r\n URL soundURL = getClass().getResource(mediaRoot + filename);\r\n MediaPlayer player = new MediaPlayer(new Media(soundURL.toExternalForm()));\r\n\r\n sounds.put(soundName, player);\r\n }", "public void register(T o);", "org.hl7.fhir.ResourceReference addNewSpecimen();", "public void addSpecialization(String Special, double Gpa) {\n\t\thMap.put(Special, Gpa);\n\t}", "public void register(RegistrationData d) {}", "void register(final SimpleHack<?> hack) {\n\t\tthis.hacks.add(hack);\n\t}", "void registerPlayer() throws IOException;", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "public void registerResource(final Resource resource) {\n if (resource != null && resource.getName() != null)\n resourceRegistry.putEntry(resource.getName(), resource);\n }", "public void addDriver(Driver driver) {\n drivers.put(driver);\n }", "void register(RegisterData data) throws Exception;", "HistogramInterface registerHistogram(HistogramInterface histogram);", "public interface Probe {\n\n String MSG_OK = \"OK\";\n int DEFAULT_CONN_TIMEOUT = 2000;\n int DEFAULT_READ_TIMEOUT = 2000;\n\n /**\n * Name of probe.\n * @return\n */\n String getName();\n\n /**\n * Executes the probe and returns result of the check.\n * @return\n */\n ProbeResult run();\n}", "public Endpoint registerProducer(NodeName nodeName, String name, String type, String path)\n throws IOTException {\n NodeInformation nodeInformation = nodeCatalog.getNode(nodeName);\n if (nodeInformation == null) {\n handleError(\"Cannot find the specified node: \" + nodeName);\n return null;\n }\n \n Endpoint endpoint = endpointAllocator.allocate(nodeName, name, type, path);\n nodeInformation.addProducer(endpoint);\n \n return endpoint;\n }", "public void registerMaid(String maidName, MyMaid maid){\n //add maid to registry\n mMaidRegistry.put(maidName, maid);\n }", "public int registerInput( Wire w, String pinName ) {\n\tErrors.warn( \"Illegal input pin: \" + name + \" \" + pinName );\n\treturn -1;\n }", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void registerService(String serviceName, Object service);", "public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }", "public static void registerType(String name, Class<?> type) {\n if (dbTypes.containsKey(name)) {\n log.warn(\"Type %s already registered!\", name);\n return;\n }\n dbTypes.put(name, type);\n }", "public abstract void register();", "public void register(GameObject gameObject) {\r\n\t\tsuper.register((Object)gameObject);\r\n\t}", "protected void register(String data){\n }", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public void registerObserver(DriverObserver driver);", "private void instantiateProbes() {\n\t\tString probe_str = this.config.getProperty(\"probes.include\", \"all\");\n\t\tString probe_exclude_str = this.config.getProperty(\"probes.exclude\", \"\");\n\t\tString probe_external = this.config.getProperty(\"probes.external\", \"\");\n\t\t\t\t\n\t\ttry {\n\t\t\tArrayList<String> availableProbeList = this.listAvailableProbeClasses();\n\t\t\t//user wants to instantiate all available probes with default params\n\t\t\t//TODO - allow user to parameterize probes when selecting to add all probes\n\t\t\tif (probe_str.equals(\"all\")) {\n\t\t\t\tfor(String s : availableProbeList) \n\t\t\t\t\tthis.probes.put(s, null);\n\t\t\t\t\n\t\t\t\t//user wants to instantiate all available probes except the ones specified for exclusion\n\t\t\t\tif (!probe_exclude_str.equals(\"\")) {\n\t\t\t\t\tString[] probe_list = probe_exclude_str.split(\";\");\n\t\t\t\t\tfor(String s:probe_list)\n\t\t\t\t\t\tthis.probes.remove(s.split(\",\")[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//instantiate\n\t\t\t\tfor(Entry<String,IProbe> p:this.probes.entrySet()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH, p.getKey());\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tp.setValue(tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user wants to instantiate specific probes (and may set custom params)\n\t\t\telse{\n\t\t\t\tString[] probe_list = probe_str.split(\";\");\n\t\t\t\tfor(String s:probe_list) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH,params[0]);\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tif(params.length > 1) //user wants to define custom collecting period\n\t\t\t\t\t\t\ttempProbe.setCollectPeriod(Integer.parseInt(params[1]));\n\t\t\t\t\t\tthis.probes.put(params[0], tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//activate Agent probes\n\t\t\tthis.activateAllProbes();\n\t\t\t\n\t\t\t//deploy external probes located in a custom user-defined path\n\t\t\tif (!probe_external.equals(\"\")) {\n\t\t\t\tString[] probe_list = probe_external.split(\";\");\n\t\t\t\tfor(String s:probe_list){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tString pclass = params[0];\n\t\t\t\t\t\tString ppath = params[1];\n\t\t\t\t\t\tthis.deployProbeAtRuntime(ppath, pclass);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, \"External Probe deployment error. Either the probe class name of classpath are not correctly provided\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t//log probe list added to Agent\n\t\t\tString l = \" \";\n\t\t\tfor(Entry<String,IProbe> entry:this.probes.entrySet())\n\t\t\t\tl += entry.getKey() + \",\";\n\t\t\tthis.writeToLog(Level.INFO,\"Probes Activated: \"+l.substring(0, l.length()-1));\n\t\t}\n\t\tcatch (CatascopiaException e){\n\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t}\n\t}", "protected void register() {\r\n\t\tif ((audioFile != null) && (audioFile instanceof AudioFileURL)) {\r\n\t\t\t((AudioFileURL) audioFile).addListener(this);\r\n\t\t}\r\n\t}", "public void register(){\n }", "protected void registerAppMap(String mapname, ApplicationMap map){\n\t\tappmaps.put(mapname.toUpperCase(), map);\n\t}", "public void put(ResourceLocation name, Tag nbt) {\n data.put(name.toString(), nbt);\n }", "private void addProvider(\n String elementName,\n String namespace,\n Class<?> provider)\n {\n // Attempt to load the provider class and then create\n // a new instance if it's an IQProvider. Otherwise, if it's\n // an IQ class, add the class object itself, then we'll use\n // reflection later to create instances of the class.\n try\n {\n // Add the provider to the map.\n if (IQProvider.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider.newInstance());\n }\n else if (IQ.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider);\n }\n }\n catch (Throwable t)\n {\n logger.error(\"Error adding iq provider.\", t);\n }\n }", "private void register(Path dir) {\n WatchKey key = null;\n\t\t\n try {\n key = dir.register(watcherService, STANDARD_EVENTS, FILE_TREE);\n } catch (UnsupportedOperationException ex) {\n LOG.warn(\"File watching not supported: {}\", ex.getMessage());\n LOG.trace(\"Exception:\", ex);\n } catch (IOException ex) {\n LOG.error(\"IO Error:\", ex);\n }\n\n if (key != null) {\n if (trace) {\n Path prev = keys.get(key);\n if (prev == null) {\n LOG.info(\"Register Watcher for: {}\", dir);\n } else if (!dir.equals(prev)) {\n LOG.info(\"Update Watcher for: {} -> {}\", prev, dir);\n }\n }\n keys.put(key, dir);\n }\n }", "public void registerPatientMethod1(Patient p);", "public static <T extends Item> T registerItem(T item, String name) {\n return registerItem(item, name, null);\n }", "@Override\n\tpublic final void register(final Agent agent) {\n\t\tsynchronized (this.agents) {\n\t\t\tthis.agents.put(agent.getAID(), agent);\n\t\t}\n\t}", "@ProbeBuilder\n public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {\n probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, \"*\");\n return probe;\n }", "public void register(Observer or);", "public void removeProbe(RadioProbe p) {\n probes.remove(p);\n }", "private static SoundEvent registerSound(String soundName)\r\n\t{\n\t\tResourceLocation location = new ResourceLocation(Reference.MODID, soundName);\r\n\t\tSoundEvent e = new SoundEvent(location);\r\n\t\tSoundEvent.REGISTRY.register(size, location, e);\r\n\t\tsize++;\r\n\t\treturn e;\r\n\t\t//return GameRegistry.register(new SoundEvent(soundID).setRegistryName(soundID));\r\n\t\t\t\t\t\t\r\n\t}", "void register();", "@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}", "static synchronized void register(Tool tool) {\n\t\tValid.checkBoolean(!isRegistered(tool), \"Tool with itemstack \" + tool.getItem() + \" already registered\");\n\n\t\ttools.add(tool);\n\t}", "public interface Probe {\n void start();\n\n void stop();\n}", "public void registerImageComponent(ImageComponent component, String filename)\n {\n componentMap.put(filename, component);\n }", "public void registerService(Registrant r) {\n namingService.registerService(r);\n }", "private static RegistryKey<World> register(String name){\n return RegistryKey.of(Registry.WORLD_KEY, new Identifier(Shurlin.MODID, name));\n }", "public void register(NPC npc) {\n\t\tnpcs.add(npc);\n\t}", "public void addAlert(String alert) {\n\t\talertsList.add(alert);\n\t\t// now call alertFound()\n\t\t// alertFound();\n\t}", "@Override\n\tpublic void registerPet(PetVO vo) {\n\t\t\n\t}", "private void addRegionToSpriteProviders(final Region region, final String name) {\n for (final SpriteProvider sp : spriteProviders) {\n sp.addRegion(region, name);\n }\n }", "private void register(Path dir) throws IOException {\n\t\tWatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n\t\tif (trace) {\n\t\t\tPath prev = keys.get(key);\n\t\t\tif (prev == null) {\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(String.format(\"register: %s\\n\", dir));\n\t\t\t} else {\n\t\t\t\tif (!dir.equals(prev)) {\n\t\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\t\tlogger.debug(String.format(\"update: %s -> %s\\n\", prev, dir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tkeys.put(key, dir);\n\t}", "public int register(String name) {\n\t\tint ticketNumber = nextTicketNumber;\n\t\tnextTicketNumber++;\n\t\tallowedPassengers.put(ticketNumber, name);\n\t\treturn ticketNumber;\n\t}", "void register(Opcode opcode);", "public void registerService(String serviceName){\n jmc.registerService(serviceName);\n }", "public static void registerListener(AltResource resource, Object listener){\n Set<Object> resourceListeners;\n if(listeners.containsKey(resource))\n resourceListeners = listeners.get(resource);\n else\n resourceListeners = new HashSet<>();\n resourceListeners.add(listener);\n listeners.put(resource, resourceListeners);\n }", "public void store(String name, String val, String register, int i) {\r\n registerName.add(name);\r\n registerValues.add(val);\r\n registerRegister.add(register);\r\n }", "<T extends EventDetector> void addEventDetector(T detector);", "@ProbeBuilder\n\tpublic TestProbeBuilder probeConfiguration( TestProbeBuilder probe ) {\n\t\tprobe.addTest( DmTest.class );\n\t\tprobe.addTest( TestUtils.class );\n\n\t\tprobe.addTest( AbstractIntegrationTest.class );\n\t\tprobe.addTest( IMessagingConfiguration.class );\n\t\tprobe.addTest( ItConfigurationBean.class );\n\n\t\treturn probe;\n\t}", "static public int register(Calibration cal_in) {\r\n int ret_val = 0;\r\n if (registeredCals.contains(cal_in)) {\r\n CrashTracker.logAndPrint(\"[CalWrangler] WARNING: Calibration Wrangler: \" + cal_in.name\r\n + \" has already been added to the cal wrangler. Nothing done.\");\r\n ret_val = -1;\r\n } else {\r\n registeredCals.add(cal_in);\r\n ret_val = 0;\r\n }\r\n return ret_val;\r\n }", "public NodeInformation registerNode(NodeName nodeName) throws IOTException {\n if (nodeCatalog.hasNode(nodeName)) {\n handleError(\"Cannot register node.. node already exists: \" + nodeName);\n return null;\n }\n \n NodeInformation nodeInformation = new NodeInformation(nodeName);\n nodeCatalog.addNode(nodeInformation);\n \n return nodeInformation;\n }", "public static void registerExternal(External hooks) { external = hooks; }", "public void register(FHIRPersistence fhirPersistence, String provider) {\n this.fhirPersistence = fhirPersistence;\n this.provider = provider;\n }", "public boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException;" ]
[ "0.64694697", "0.6383709", "0.635662", "0.63004285", "0.5970581", "0.5809895", "0.5791225", "0.57872796", "0.5644602", "0.56369996", "0.54512376", "0.5205304", "0.5154759", "0.51416445", "0.5132631", "0.51143885", "0.51119363", "0.50675154", "0.5053072", "0.5039661", "0.49421126", "0.49216372", "0.49211428", "0.48701742", "0.48492453", "0.48325697", "0.4819036", "0.47984916", "0.4796457", "0.47813", "0.47568727", "0.4753233", "0.47212717", "0.46683863", "0.46599755", "0.4652464", "0.46207455", "0.46181294", "0.4603652", "0.4602476", "0.45988277", "0.45978427", "0.4581219", "0.45778805", "0.45679837", "0.45641097", "0.45494723", "0.4547076", "0.4545701", "0.45341945", "0.45332137", "0.4527926", "0.45217496", "0.45202687", "0.4509437", "0.45058388", "0.45017177", "0.4498325", "0.44894776", "0.446647", "0.44643992", "0.44627294", "0.44596687", "0.44588265", "0.44562423", "0.4449637", "0.44490084", "0.44293126", "0.4422471", "0.4420686", "0.4419273", "0.4414212", "0.4411773", "0.4406412", "0.4391925", "0.43916246", "0.43791533", "0.4372632", "0.4369482", "0.43653718", "0.43609902", "0.43393704", "0.43390363", "0.43362793", "0.43327653", "0.4325409", "0.43224433", "0.43139702", "0.42972603", "0.42904222", "0.4287933", "0.42846367", "0.42815423", "0.42780456", "0.42774904", "0.42752188", "0.4273281", "0.42634103", "0.42615867", "0.424947" ]
0.62526625
4
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);", "public void probe(String event) {\n profile.add(event);\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n ProbeFunction function);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, LongProbeFunction<S> function);", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n DoubleProbeFunction<S> probe);", "protected void setProbe(Probe<?, ?> probe) {\n this.probe = probe;\n }", "protected void setProbe(Probe<?,?> probe) {\n this.probe = probe;\n }", "public void registerHook(PluginHook name, Hook hook)\n\t{\n\t\tif (!checkHook(name))\n\t\t\tthis.hooks.put(name, hook);\n\t}", "@Override\r\n public void registerMonitor(String name, ProfileMonitor monitor) {\n\r\n }", "void register(String name, K key, V value);", "public void registerInput( String pinName ) {\n\t//Bug: all we do is prevent inputs from being used twice, more later\n\tfor (String s: inputs) {\n\t if (s.equals( pinName )) {\n\t\tErrors.warn( \"Input reused: \" + name + \" \" + pinName );\n\t }\n\t}\n\tinputs.add( pinName );\n }", "void register(String name, Object bean);", "public void registerOutput( String pinName ) {\n\t//Bug: we do nothing about this here, it'll get more fun later\n }", "public String registerNewProducer(Producer producer);", "@Override\n public void register(Remote registerObj, String name) throws RemoteException\n {\n synchronized (supervisors)\n {\n Logger.getGlobal().log(Level.INFO, String.format(\"Register Supervisor: %s.\", name));\n addSupervisor(name);\n registry.rebind(name, registerObj);\n }\n }", "@Override\n public void registerGauge(String name, Gauge gauge) {\n Objects.requireNonNull(name);\n gauges.compute(name, (id, prev) ->\n new PrometheusGaugeWrapper(id, gauge, prev != null ? prev.inner : null));\n }", "public void registerTexture(Texture texture, String filename)\n {\n textureMap.put(filename, texture);\n \n try {\n ImageComponent component = texture.getImage(0);\n componentMap.put(filename, component);\n }\n catch (CapabilityNotSetException cnse) {\n }\n }", "public static void registerDriver( String driverName )\n throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n Class.forName( driverName ).newInstance();\n }", "public void register(T t);", "public void registerForSimNameChange(Handler h, int what, Object obj) {\n Registrant r = new Registrant (h, what, obj);\n\n synchronized (INSTANCE_LOCK) {\n mMultiSimNamesRegistrants.add(r);\n }\n }", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "public static void registerNameInLoading(Object oo, String name) {\n\t\t\n\t\tobject2name.put(oo, name);\n\t}", "public int register(String fileName, IPv4 peer) {\n try {\n // check if this file has been registered before\n if (this.registry.containsKey(fileName)) {\n // it exists, acquire its known peer list and add this peer to it\n HashSet<IPv4> filePeerList = this.registry.get(fileName);\n filePeerList.add(peer);\n } else {\n // does not exist, create a new entry with this peer associated to it\n HashSet<IPv4> filePeerList = new HashSet<IPv4>();\n filePeerList.add(peer);\n this.registry.put(fileName, filePeerList);\n }\n this.log(String.format(\"-> registered '%s' to (leaf %s).\", fileName, peer));\n return 0;\n } catch (Exception e) {\n e.printStackTrace();\n return 1;\n }\n }", "public static void regist(String name, AbstractBridgeHandler handler) {\n if (handler != null) handlers.put(name, handler);\n }", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "void putInstrument(String vendorCode, Instrument instrument);", "public void registerHit(boolean alive) {\n\t\tSystem.out.println(\"Player \" + self + \" registered a hit\");\r\n\t}", "public void register(String name, Pipe pipe) throws Exception {\n pool.put(name, pipe);\n }", "public synchronized void registerObject(String name, Object object)\r\n throws IllegalArgumentException,\r\n NullPointerException\r\n {\r\n if (containsSubString(name, TIGHT_BINDING))\r\n {\r\n // user has used the wrong method to register this object.\r\n registerObject(object, name);\r\n }\r\n else\r\n {\r\n // check that name doesn't contain illegal characters\r\n if (!isValidName(name))\r\n {\r\n throw new IllegalArgumentException(\"ResourceManager.registerObject(): \"+\r\n \"name '\" +name+ \"' can not contain \"+\r\n \"the whitespace, or the characters \" +\r\n \" '\"+LOOSE_BINDING+\"', '\"+\r\n SINGLE_MATCH+ \"'\");\r\n }\r\n\r\n if (object == null)\r\n {\r\n throw new NullPointerException(\"ResourceManager.registerObject(): \"+\r\n \"object is null\");\r\n }\r\n\r\n // store this mapping\r\n storeObject(name, object);\r\n }\r\n }", "public static void registerDriver(String className) throws Exception {\n // The newInstance() call is a work around for some \n // broken Java implementations (?)\n Class.forName(className).newInstance(); \n }", "public Builder addProbeFields(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureProbeFieldsIsMutable();\n probeFields_.add(value);\n onChanged();\n return this;\n }", "public void removeProbeByName(String probeName) throws CatascopiaException{\n\t\tif (this.probes.containsKey(probeName)){\n\t\t\tIProbe probe = this.probes.get(probeName);\n\t\t\tprobe.removeQueue();\n\t\t\tprobe.terminate();\n\t\t\tthis.probes.remove(probeName);\n\t\t}\n\t\telse\n\t\t\tthrow new CatascopiaException(\"Remove Probe Failed, probe name given does not exist: \"+probeName, \n\t\t\t\t\t\t\t\t\t\t CatascopiaException.ExceptionType.KEY);\n\t}", "public boolean registerPlayer(Player p);", "public void registerSound(String soundName, String filename) {\r\n\r\n URL soundURL = getClass().getResource(mediaRoot + filename);\r\n MediaPlayer player = new MediaPlayer(new Media(soundURL.toExternalForm()));\r\n\r\n sounds.put(soundName, player);\r\n }", "public void register(T o);", "org.hl7.fhir.ResourceReference addNewSpecimen();", "public void addSpecialization(String Special, double Gpa) {\n\t\thMap.put(Special, Gpa);\n\t}", "public void register(RegistrationData d) {}", "void register(final SimpleHack<?> hack) {\n\t\tthis.hacks.add(hack);\n\t}", "void registerPlayer() throws IOException;", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "public void registerResource(final Resource resource) {\n if (resource != null && resource.getName() != null)\n resourceRegistry.putEntry(resource.getName(), resource);\n }", "public void addDriver(Driver driver) {\n drivers.put(driver);\n }", "void register(RegisterData data) throws Exception;", "HistogramInterface registerHistogram(HistogramInterface histogram);", "public interface Probe {\n\n String MSG_OK = \"OK\";\n int DEFAULT_CONN_TIMEOUT = 2000;\n int DEFAULT_READ_TIMEOUT = 2000;\n\n /**\n * Name of probe.\n * @return\n */\n String getName();\n\n /**\n * Executes the probe and returns result of the check.\n * @return\n */\n ProbeResult run();\n}", "public Endpoint registerProducer(NodeName nodeName, String name, String type, String path)\n throws IOTException {\n NodeInformation nodeInformation = nodeCatalog.getNode(nodeName);\n if (nodeInformation == null) {\n handleError(\"Cannot find the specified node: \" + nodeName);\n return null;\n }\n \n Endpoint endpoint = endpointAllocator.allocate(nodeName, name, type, path);\n nodeInformation.addProducer(endpoint);\n \n return endpoint;\n }", "public void registerMaid(String maidName, MyMaid maid){\n //add maid to registry\n mMaidRegistry.put(maidName, maid);\n }", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public int registerInput( Wire w, String pinName ) {\n\tErrors.warn( \"Illegal input pin: \" + name + \" \" + pinName );\n\treturn -1;\n }", "public void registerService(String serviceName, Object service);", "public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }", "public static void registerType(String name, Class<?> type) {\n if (dbTypes.containsKey(name)) {\n log.warn(\"Type %s already registered!\", name);\n return;\n }\n dbTypes.put(name, type);\n }", "public abstract void register();", "public void register(GameObject gameObject) {\r\n\t\tsuper.register((Object)gameObject);\r\n\t}", "protected void register(String data){\n }", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public void registerObserver(DriverObserver driver);", "private void instantiateProbes() {\n\t\tString probe_str = this.config.getProperty(\"probes.include\", \"all\");\n\t\tString probe_exclude_str = this.config.getProperty(\"probes.exclude\", \"\");\n\t\tString probe_external = this.config.getProperty(\"probes.external\", \"\");\n\t\t\t\t\n\t\ttry {\n\t\t\tArrayList<String> availableProbeList = this.listAvailableProbeClasses();\n\t\t\t//user wants to instantiate all available probes with default params\n\t\t\t//TODO - allow user to parameterize probes when selecting to add all probes\n\t\t\tif (probe_str.equals(\"all\")) {\n\t\t\t\tfor(String s : availableProbeList) \n\t\t\t\t\tthis.probes.put(s, null);\n\t\t\t\t\n\t\t\t\t//user wants to instantiate all available probes except the ones specified for exclusion\n\t\t\t\tif (!probe_exclude_str.equals(\"\")) {\n\t\t\t\t\tString[] probe_list = probe_exclude_str.split(\";\");\n\t\t\t\t\tfor(String s:probe_list)\n\t\t\t\t\t\tthis.probes.remove(s.split(\",\")[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//instantiate\n\t\t\t\tfor(Entry<String,IProbe> p:this.probes.entrySet()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH, p.getKey());\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tp.setValue(tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user wants to instantiate specific probes (and may set custom params)\n\t\t\telse{\n\t\t\t\tString[] probe_list = probe_str.split(\";\");\n\t\t\t\tfor(String s:probe_list) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH,params[0]);\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tif(params.length > 1) //user wants to define custom collecting period\n\t\t\t\t\t\t\ttempProbe.setCollectPeriod(Integer.parseInt(params[1]));\n\t\t\t\t\t\tthis.probes.put(params[0], tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//activate Agent probes\n\t\t\tthis.activateAllProbes();\n\t\t\t\n\t\t\t//deploy external probes located in a custom user-defined path\n\t\t\tif (!probe_external.equals(\"\")) {\n\t\t\t\tString[] probe_list = probe_external.split(\";\");\n\t\t\t\tfor(String s:probe_list){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tString pclass = params[0];\n\t\t\t\t\t\tString ppath = params[1];\n\t\t\t\t\t\tthis.deployProbeAtRuntime(ppath, pclass);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, \"External Probe deployment error. Either the probe class name of classpath are not correctly provided\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t//log probe list added to Agent\n\t\t\tString l = \" \";\n\t\t\tfor(Entry<String,IProbe> entry:this.probes.entrySet())\n\t\t\t\tl += entry.getKey() + \",\";\n\t\t\tthis.writeToLog(Level.INFO,\"Probes Activated: \"+l.substring(0, l.length()-1));\n\t\t}\n\t\tcatch (CatascopiaException e){\n\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t}\n\t}", "protected void register() {\r\n\t\tif ((audioFile != null) && (audioFile instanceof AudioFileURL)) {\r\n\t\t\t((AudioFileURL) audioFile).addListener(this);\r\n\t\t}\r\n\t}", "public void register(){\n }", "protected void registerAppMap(String mapname, ApplicationMap map){\n\t\tappmaps.put(mapname.toUpperCase(), map);\n\t}", "public void put(ResourceLocation name, Tag nbt) {\n data.put(name.toString(), nbt);\n }", "private void addProvider(\n String elementName,\n String namespace,\n Class<?> provider)\n {\n // Attempt to load the provider class and then create\n // a new instance if it's an IQProvider. Otherwise, if it's\n // an IQ class, add the class object itself, then we'll use\n // reflection later to create instances of the class.\n try\n {\n // Add the provider to the map.\n if (IQProvider.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider.newInstance());\n }\n else if (IQ.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider);\n }\n }\n catch (Throwable t)\n {\n logger.error(\"Error adding iq provider.\", t);\n }\n }", "private void register(Path dir) {\n WatchKey key = null;\n\t\t\n try {\n key = dir.register(watcherService, STANDARD_EVENTS, FILE_TREE);\n } catch (UnsupportedOperationException ex) {\n LOG.warn(\"File watching not supported: {}\", ex.getMessage());\n LOG.trace(\"Exception:\", ex);\n } catch (IOException ex) {\n LOG.error(\"IO Error:\", ex);\n }\n\n if (key != null) {\n if (trace) {\n Path prev = keys.get(key);\n if (prev == null) {\n LOG.info(\"Register Watcher for: {}\", dir);\n } else if (!dir.equals(prev)) {\n LOG.info(\"Update Watcher for: {} -> {}\", prev, dir);\n }\n }\n keys.put(key, dir);\n }\n }", "public void registerPatientMethod1(Patient p);", "public static <T extends Item> T registerItem(T item, String name) {\n return registerItem(item, name, null);\n }", "@Override\n\tpublic final void register(final Agent agent) {\n\t\tsynchronized (this.agents) {\n\t\t\tthis.agents.put(agent.getAID(), agent);\n\t\t}\n\t}", "@ProbeBuilder\n public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {\n probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, \"*\");\n return probe;\n }", "public void register(Observer or);", "public void removeProbe(RadioProbe p) {\n probes.remove(p);\n }", "private static SoundEvent registerSound(String soundName)\r\n\t{\n\t\tResourceLocation location = new ResourceLocation(Reference.MODID, soundName);\r\n\t\tSoundEvent e = new SoundEvent(location);\r\n\t\tSoundEvent.REGISTRY.register(size, location, e);\r\n\t\tsize++;\r\n\t\treturn e;\r\n\t\t//return GameRegistry.register(new SoundEvent(soundID).setRegistryName(soundID));\r\n\t\t\t\t\t\t\r\n\t}", "void register();", "@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}", "static synchronized void register(Tool tool) {\n\t\tValid.checkBoolean(!isRegistered(tool), \"Tool with itemstack \" + tool.getItem() + \" already registered\");\n\n\t\ttools.add(tool);\n\t}", "public interface Probe {\n void start();\n\n void stop();\n}", "public void registerImageComponent(ImageComponent component, String filename)\n {\n componentMap.put(filename, component);\n }", "public void registerService(Registrant r) {\n namingService.registerService(r);\n }", "private static RegistryKey<World> register(String name){\n return RegistryKey.of(Registry.WORLD_KEY, new Identifier(Shurlin.MODID, name));\n }", "public void register(NPC npc) {\n\t\tnpcs.add(npc);\n\t}", "public void addAlert(String alert) {\n\t\talertsList.add(alert);\n\t\t// now call alertFound()\n\t\t// alertFound();\n\t}", "@Override\n\tpublic void registerPet(PetVO vo) {\n\t\t\n\t}", "private void addRegionToSpriteProviders(final Region region, final String name) {\n for (final SpriteProvider sp : spriteProviders) {\n sp.addRegion(region, name);\n }\n }", "private void register(Path dir) throws IOException {\n\t\tWatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n\t\tif (trace) {\n\t\t\tPath prev = keys.get(key);\n\t\t\tif (prev == null) {\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(String.format(\"register: %s\\n\", dir));\n\t\t\t} else {\n\t\t\t\tif (!dir.equals(prev)) {\n\t\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\t\tlogger.debug(String.format(\"update: %s -> %s\\n\", prev, dir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tkeys.put(key, dir);\n\t}", "public int register(String name) {\n\t\tint ticketNumber = nextTicketNumber;\n\t\tnextTicketNumber++;\n\t\tallowedPassengers.put(ticketNumber, name);\n\t\treturn ticketNumber;\n\t}", "void register(Opcode opcode);", "public void registerService(String serviceName){\n jmc.registerService(serviceName);\n }", "public static void registerListener(AltResource resource, Object listener){\n Set<Object> resourceListeners;\n if(listeners.containsKey(resource))\n resourceListeners = listeners.get(resource);\n else\n resourceListeners = new HashSet<>();\n resourceListeners.add(listener);\n listeners.put(resource, resourceListeners);\n }", "public void store(String name, String val, String register, int i) {\r\n registerName.add(name);\r\n registerValues.add(val);\r\n registerRegister.add(register);\r\n }", "@ProbeBuilder\n\tpublic TestProbeBuilder probeConfiguration( TestProbeBuilder probe ) {\n\t\tprobe.addTest( DmTest.class );\n\t\tprobe.addTest( TestUtils.class );\n\n\t\tprobe.addTest( AbstractIntegrationTest.class );\n\t\tprobe.addTest( IMessagingConfiguration.class );\n\t\tprobe.addTest( ItConfigurationBean.class );\n\n\t\treturn probe;\n\t}", "<T extends EventDetector> void addEventDetector(T detector);", "static public int register(Calibration cal_in) {\r\n int ret_val = 0;\r\n if (registeredCals.contains(cal_in)) {\r\n CrashTracker.logAndPrint(\"[CalWrangler] WARNING: Calibration Wrangler: \" + cal_in.name\r\n + \" has already been added to the cal wrangler. Nothing done.\");\r\n ret_val = -1;\r\n } else {\r\n registeredCals.add(cal_in);\r\n ret_val = 0;\r\n }\r\n return ret_val;\r\n }", "public NodeInformation registerNode(NodeName nodeName) throws IOTException {\n if (nodeCatalog.hasNode(nodeName)) {\n handleError(\"Cannot register node.. node already exists: \" + nodeName);\n return null;\n }\n \n NodeInformation nodeInformation = new NodeInformation(nodeName);\n nodeCatalog.addNode(nodeInformation);\n \n return nodeInformation;\n }", "public void register(FHIRPersistence fhirPersistence, String provider) {\n this.fhirPersistence = fhirPersistence;\n this.provider = provider;\n }", "public static void registerExternal(External hooks) { external = hooks; }", "public boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException;" ]
[ "0.6471445", "0.63856804", "0.6356063", "0.6299321", "0.6252032", "0.5971004", "0.5809581", "0.579003", "0.57865727", "0.5644672", "0.5451244", "0.52044034", "0.5155135", "0.5141603", "0.51306", "0.51142603", "0.51110566", "0.50674903", "0.5053046", "0.503988", "0.49432695", "0.49231002", "0.4921799", "0.48698992", "0.48491204", "0.48323768", "0.48195472", "0.47973716", "0.47944912", "0.4782235", "0.47565854", "0.47548768", "0.47213677", "0.46699283", "0.46606556", "0.46525523", "0.46213004", "0.46178904", "0.4603967", "0.46022752", "0.46004683", "0.4597949", "0.45807028", "0.4578867", "0.45683822", "0.456443", "0.45506546", "0.45468724", "0.45458868", "0.453396", "0.45337", "0.45279437", "0.45205957", "0.45203805", "0.45089278", "0.4506622", "0.45018566", "0.4498284", "0.44893786", "0.4466068", "0.44632322", "0.44628578", "0.4461286", "0.44583246", "0.4456698", "0.44497845", "0.4448987", "0.4429868", "0.44223288", "0.4420216", "0.44195795", "0.4413987", "0.4411267", "0.44066113", "0.43923652", "0.43907022", "0.43796548", "0.43730435", "0.43697748", "0.4366163", "0.43611643", "0.434021", "0.433861", "0.43372938", "0.43315", "0.432598", "0.43233514", "0.43136936", "0.42972592", "0.42909575", "0.42873845", "0.4284137", "0.428192", "0.4278094", "0.427778", "0.42746773", "0.42725673", "0.42627946", "0.42621684", "0.42485732" ]
0.56362104
10
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, String name, ProbeLevel level, DoubleProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);", "public void probe(String event) {\n profile.add(event);\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n ProbeFunction function);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, LongProbeFunction<S> function);", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n DoubleProbeFunction<S> probe);", "protected void setProbe(Probe<?, ?> probe) {\n this.probe = probe;\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n LongProbeFunction<S> probe);", "protected void setProbe(Probe<?,?> probe) {\n this.probe = probe;\n }", "public void registerHook(PluginHook name, Hook hook)\n\t{\n\t\tif (!checkHook(name))\n\t\t\tthis.hooks.put(name, hook);\n\t}", "@Override\r\n public void registerMonitor(String name, ProfileMonitor monitor) {\n\r\n }", "void register(String name, K key, V value);", "public void registerInput( String pinName ) {\n\t//Bug: all we do is prevent inputs from being used twice, more later\n\tfor (String s: inputs) {\n\t if (s.equals( pinName )) {\n\t\tErrors.warn( \"Input reused: \" + name + \" \" + pinName );\n\t }\n\t}\n\tinputs.add( pinName );\n }", "void register(String name, Object bean);", "public void registerOutput( String pinName ) {\n\t//Bug: we do nothing about this here, it'll get more fun later\n }", "public String registerNewProducer(Producer producer);", "@Override\n public void register(Remote registerObj, String name) throws RemoteException\n {\n synchronized (supervisors)\n {\n Logger.getGlobal().log(Level.INFO, String.format(\"Register Supervisor: %s.\", name));\n addSupervisor(name);\n registry.rebind(name, registerObj);\n }\n }", "@Override\n public void registerGauge(String name, Gauge gauge) {\n Objects.requireNonNull(name);\n gauges.compute(name, (id, prev) ->\n new PrometheusGaugeWrapper(id, gauge, prev != null ? prev.inner : null));\n }", "public void registerTexture(Texture texture, String filename)\n {\n textureMap.put(filename, texture);\n \n try {\n ImageComponent component = texture.getImage(0);\n componentMap.put(filename, component);\n }\n catch (CapabilityNotSetException cnse) {\n }\n }", "public static void registerDriver( String driverName )\n throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n Class.forName( driverName ).newInstance();\n }", "public void register(T t);", "public void registerForSimNameChange(Handler h, int what, Object obj) {\n Registrant r = new Registrant (h, what, obj);\n\n synchronized (INSTANCE_LOCK) {\n mMultiSimNamesRegistrants.add(r);\n }\n }", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "public static void registerNameInLoading(Object oo, String name) {\n\t\t\n\t\tobject2name.put(oo, name);\n\t}", "public int register(String fileName, IPv4 peer) {\n try {\n // check if this file has been registered before\n if (this.registry.containsKey(fileName)) {\n // it exists, acquire its known peer list and add this peer to it\n HashSet<IPv4> filePeerList = this.registry.get(fileName);\n filePeerList.add(peer);\n } else {\n // does not exist, create a new entry with this peer associated to it\n HashSet<IPv4> filePeerList = new HashSet<IPv4>();\n filePeerList.add(peer);\n this.registry.put(fileName, filePeerList);\n }\n this.log(String.format(\"-> registered '%s' to (leaf %s).\", fileName, peer));\n return 0;\n } catch (Exception e) {\n e.printStackTrace();\n return 1;\n }\n }", "public static void regist(String name, AbstractBridgeHandler handler) {\n if (handler != null) handlers.put(name, handler);\n }", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "void putInstrument(String vendorCode, Instrument instrument);", "public void registerHit(boolean alive) {\n\t\tSystem.out.println(\"Player \" + self + \" registered a hit\");\r\n\t}", "public void register(String name, Pipe pipe) throws Exception {\n pool.put(name, pipe);\n }", "public synchronized void registerObject(String name, Object object)\r\n throws IllegalArgumentException,\r\n NullPointerException\r\n {\r\n if (containsSubString(name, TIGHT_BINDING))\r\n {\r\n // user has used the wrong method to register this object.\r\n registerObject(object, name);\r\n }\r\n else\r\n {\r\n // check that name doesn't contain illegal characters\r\n if (!isValidName(name))\r\n {\r\n throw new IllegalArgumentException(\"ResourceManager.registerObject(): \"+\r\n \"name '\" +name+ \"' can not contain \"+\r\n \"the whitespace, or the characters \" +\r\n \" '\"+LOOSE_BINDING+\"', '\"+\r\n SINGLE_MATCH+ \"'\");\r\n }\r\n\r\n if (object == null)\r\n {\r\n throw new NullPointerException(\"ResourceManager.registerObject(): \"+\r\n \"object is null\");\r\n }\r\n\r\n // store this mapping\r\n storeObject(name, object);\r\n }\r\n }", "public static void registerDriver(String className) throws Exception {\n // The newInstance() call is a work around for some \n // broken Java implementations (?)\n Class.forName(className).newInstance(); \n }", "public Builder addProbeFields(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureProbeFieldsIsMutable();\n probeFields_.add(value);\n onChanged();\n return this;\n }", "public void removeProbeByName(String probeName) throws CatascopiaException{\n\t\tif (this.probes.containsKey(probeName)){\n\t\t\tIProbe probe = this.probes.get(probeName);\n\t\t\tprobe.removeQueue();\n\t\t\tprobe.terminate();\n\t\t\tthis.probes.remove(probeName);\n\t\t}\n\t\telse\n\t\t\tthrow new CatascopiaException(\"Remove Probe Failed, probe name given does not exist: \"+probeName, \n\t\t\t\t\t\t\t\t\t\t CatascopiaException.ExceptionType.KEY);\n\t}", "public boolean registerPlayer(Player p);", "public void registerSound(String soundName, String filename) {\r\n\r\n URL soundURL = getClass().getResource(mediaRoot + filename);\r\n MediaPlayer player = new MediaPlayer(new Media(soundURL.toExternalForm()));\r\n\r\n sounds.put(soundName, player);\r\n }", "org.hl7.fhir.ResourceReference addNewSpecimen();", "public void register(T o);", "public void addSpecialization(String Special, double Gpa) {\n\t\thMap.put(Special, Gpa);\n\t}", "public void register(RegistrationData d) {}", "void register(final SimpleHack<?> hack) {\n\t\tthis.hacks.add(hack);\n\t}", "void registerPlayer() throws IOException;", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "public void registerResource(final Resource resource) {\n if (resource != null && resource.getName() != null)\n resourceRegistry.putEntry(resource.getName(), resource);\n }", "public void addDriver(Driver driver) {\n drivers.put(driver);\n }", "void register(RegisterData data) throws Exception;", "HistogramInterface registerHistogram(HistogramInterface histogram);", "public interface Probe {\n\n String MSG_OK = \"OK\";\n int DEFAULT_CONN_TIMEOUT = 2000;\n int DEFAULT_READ_TIMEOUT = 2000;\n\n /**\n * Name of probe.\n * @return\n */\n String getName();\n\n /**\n * Executes the probe and returns result of the check.\n * @return\n */\n ProbeResult run();\n}", "public Endpoint registerProducer(NodeName nodeName, String name, String type, String path)\n throws IOTException {\n NodeInformation nodeInformation = nodeCatalog.getNode(nodeName);\n if (nodeInformation == null) {\n handleError(\"Cannot find the specified node: \" + nodeName);\n return null;\n }\n \n Endpoint endpoint = endpointAllocator.allocate(nodeName, name, type, path);\n nodeInformation.addProducer(endpoint);\n \n return endpoint;\n }", "public void registerMaid(String maidName, MyMaid maid){\n //add maid to registry\n mMaidRegistry.put(maidName, maid);\n }", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public int registerInput( Wire w, String pinName ) {\n\tErrors.warn( \"Illegal input pin: \" + name + \" \" + pinName );\n\treturn -1;\n }", "public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }", "public void registerService(String serviceName, Object service);", "public static void registerType(String name, Class<?> type) {\n if (dbTypes.containsKey(name)) {\n log.warn(\"Type %s already registered!\", name);\n return;\n }\n dbTypes.put(name, type);\n }", "public abstract void register();", "public void register(GameObject gameObject) {\r\n\t\tsuper.register((Object)gameObject);\r\n\t}", "protected void register(String data){\n }", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public void registerObserver(DriverObserver driver);", "private void instantiateProbes() {\n\t\tString probe_str = this.config.getProperty(\"probes.include\", \"all\");\n\t\tString probe_exclude_str = this.config.getProperty(\"probes.exclude\", \"\");\n\t\tString probe_external = this.config.getProperty(\"probes.external\", \"\");\n\t\t\t\t\n\t\ttry {\n\t\t\tArrayList<String> availableProbeList = this.listAvailableProbeClasses();\n\t\t\t//user wants to instantiate all available probes with default params\n\t\t\t//TODO - allow user to parameterize probes when selecting to add all probes\n\t\t\tif (probe_str.equals(\"all\")) {\n\t\t\t\tfor(String s : availableProbeList) \n\t\t\t\t\tthis.probes.put(s, null);\n\t\t\t\t\n\t\t\t\t//user wants to instantiate all available probes except the ones specified for exclusion\n\t\t\t\tif (!probe_exclude_str.equals(\"\")) {\n\t\t\t\t\tString[] probe_list = probe_exclude_str.split(\";\");\n\t\t\t\t\tfor(String s:probe_list)\n\t\t\t\t\t\tthis.probes.remove(s.split(\",\")[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//instantiate\n\t\t\t\tfor(Entry<String,IProbe> p:this.probes.entrySet()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH, p.getKey());\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tp.setValue(tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user wants to instantiate specific probes (and may set custom params)\n\t\t\telse{\n\t\t\t\tString[] probe_list = probe_str.split(\";\");\n\t\t\t\tfor(String s:probe_list) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH,params[0]);\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tif(params.length > 1) //user wants to define custom collecting period\n\t\t\t\t\t\t\ttempProbe.setCollectPeriod(Integer.parseInt(params[1]));\n\t\t\t\t\t\tthis.probes.put(params[0], tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//activate Agent probes\n\t\t\tthis.activateAllProbes();\n\t\t\t\n\t\t\t//deploy external probes located in a custom user-defined path\n\t\t\tif (!probe_external.equals(\"\")) {\n\t\t\t\tString[] probe_list = probe_external.split(\";\");\n\t\t\t\tfor(String s:probe_list){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tString pclass = params[0];\n\t\t\t\t\t\tString ppath = params[1];\n\t\t\t\t\t\tthis.deployProbeAtRuntime(ppath, pclass);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, \"External Probe deployment error. Either the probe class name of classpath are not correctly provided\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t//log probe list added to Agent\n\t\t\tString l = \" \";\n\t\t\tfor(Entry<String,IProbe> entry:this.probes.entrySet())\n\t\t\t\tl += entry.getKey() + \",\";\n\t\t\tthis.writeToLog(Level.INFO,\"Probes Activated: \"+l.substring(0, l.length()-1));\n\t\t}\n\t\tcatch (CatascopiaException e){\n\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t}\n\t}", "protected void register() {\r\n\t\tif ((audioFile != null) && (audioFile instanceof AudioFileURL)) {\r\n\t\t\t((AudioFileURL) audioFile).addListener(this);\r\n\t\t}\r\n\t}", "public void register(){\n }", "protected void registerAppMap(String mapname, ApplicationMap map){\n\t\tappmaps.put(mapname.toUpperCase(), map);\n\t}", "public void put(ResourceLocation name, Tag nbt) {\n data.put(name.toString(), nbt);\n }", "private void addProvider(\n String elementName,\n String namespace,\n Class<?> provider)\n {\n // Attempt to load the provider class and then create\n // a new instance if it's an IQProvider. Otherwise, if it's\n // an IQ class, add the class object itself, then we'll use\n // reflection later to create instances of the class.\n try\n {\n // Add the provider to the map.\n if (IQProvider.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider.newInstance());\n }\n else if (IQ.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider);\n }\n }\n catch (Throwable t)\n {\n logger.error(\"Error adding iq provider.\", t);\n }\n }", "private void register(Path dir) {\n WatchKey key = null;\n\t\t\n try {\n key = dir.register(watcherService, STANDARD_EVENTS, FILE_TREE);\n } catch (UnsupportedOperationException ex) {\n LOG.warn(\"File watching not supported: {}\", ex.getMessage());\n LOG.trace(\"Exception:\", ex);\n } catch (IOException ex) {\n LOG.error(\"IO Error:\", ex);\n }\n\n if (key != null) {\n if (trace) {\n Path prev = keys.get(key);\n if (prev == null) {\n LOG.info(\"Register Watcher for: {}\", dir);\n } else if (!dir.equals(prev)) {\n LOG.info(\"Update Watcher for: {} -> {}\", prev, dir);\n }\n }\n keys.put(key, dir);\n }\n }", "public void registerPatientMethod1(Patient p);", "public static <T extends Item> T registerItem(T item, String name) {\n return registerItem(item, name, null);\n }", "@Override\n\tpublic final void register(final Agent agent) {\n\t\tsynchronized (this.agents) {\n\t\t\tthis.agents.put(agent.getAID(), agent);\n\t\t}\n\t}", "@ProbeBuilder\n public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {\n probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, \"*\");\n return probe;\n }", "public void register(Observer or);", "public void removeProbe(RadioProbe p) {\n probes.remove(p);\n }", "private static SoundEvent registerSound(String soundName)\r\n\t{\n\t\tResourceLocation location = new ResourceLocation(Reference.MODID, soundName);\r\n\t\tSoundEvent e = new SoundEvent(location);\r\n\t\tSoundEvent.REGISTRY.register(size, location, e);\r\n\t\tsize++;\r\n\t\treturn e;\r\n\t\t//return GameRegistry.register(new SoundEvent(soundID).setRegistryName(soundID));\r\n\t\t\t\t\t\t\r\n\t}", "void register();", "@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}", "static synchronized void register(Tool tool) {\n\t\tValid.checkBoolean(!isRegistered(tool), \"Tool with itemstack \" + tool.getItem() + \" already registered\");\n\n\t\ttools.add(tool);\n\t}", "public interface Probe {\n void start();\n\n void stop();\n}", "public void registerImageComponent(ImageComponent component, String filename)\n {\n componentMap.put(filename, component);\n }", "private static RegistryKey<World> register(String name){\n return RegistryKey.of(Registry.WORLD_KEY, new Identifier(Shurlin.MODID, name));\n }", "public void registerService(Registrant r) {\n namingService.registerService(r);\n }", "public void register(NPC npc) {\n\t\tnpcs.add(npc);\n\t}", "public void addAlert(String alert) {\n\t\talertsList.add(alert);\n\t\t// now call alertFound()\n\t\t// alertFound();\n\t}", "@Override\n\tpublic void registerPet(PetVO vo) {\n\t\t\n\t}", "private void addRegionToSpriteProviders(final Region region, final String name) {\n for (final SpriteProvider sp : spriteProviders) {\n sp.addRegion(region, name);\n }\n }", "private void register(Path dir) throws IOException {\n\t\tWatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n\t\tif (trace) {\n\t\t\tPath prev = keys.get(key);\n\t\t\tif (prev == null) {\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(String.format(\"register: %s\\n\", dir));\n\t\t\t} else {\n\t\t\t\tif (!dir.equals(prev)) {\n\t\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\t\tlogger.debug(String.format(\"update: %s -> %s\\n\", prev, dir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tkeys.put(key, dir);\n\t}", "public int register(String name) {\n\t\tint ticketNumber = nextTicketNumber;\n\t\tnextTicketNumber++;\n\t\tallowedPassengers.put(ticketNumber, name);\n\t\treturn ticketNumber;\n\t}", "void register(Opcode opcode);", "public void registerService(String serviceName){\n jmc.registerService(serviceName);\n }", "public static void registerListener(AltResource resource, Object listener){\n Set<Object> resourceListeners;\n if(listeners.containsKey(resource))\n resourceListeners = listeners.get(resource);\n else\n resourceListeners = new HashSet<>();\n resourceListeners.add(listener);\n listeners.put(resource, resourceListeners);\n }", "public void store(String name, String val, String register, int i) {\r\n registerName.add(name);\r\n registerValues.add(val);\r\n registerRegister.add(register);\r\n }", "@ProbeBuilder\n\tpublic TestProbeBuilder probeConfiguration( TestProbeBuilder probe ) {\n\t\tprobe.addTest( DmTest.class );\n\t\tprobe.addTest( TestUtils.class );\n\n\t\tprobe.addTest( AbstractIntegrationTest.class );\n\t\tprobe.addTest( IMessagingConfiguration.class );\n\t\tprobe.addTest( ItConfigurationBean.class );\n\n\t\treturn probe;\n\t}", "<T extends EventDetector> void addEventDetector(T detector);", "static public int register(Calibration cal_in) {\r\n int ret_val = 0;\r\n if (registeredCals.contains(cal_in)) {\r\n CrashTracker.logAndPrint(\"[CalWrangler] WARNING: Calibration Wrangler: \" + cal_in.name\r\n + \" has already been added to the cal wrangler. Nothing done.\");\r\n ret_val = -1;\r\n } else {\r\n registeredCals.add(cal_in);\r\n ret_val = 0;\r\n }\r\n return ret_val;\r\n }", "public NodeInformation registerNode(NodeName nodeName) throws IOTException {\n if (nodeCatalog.hasNode(nodeName)) {\n handleError(\"Cannot register node.. node already exists: \" + nodeName);\n return null;\n }\n \n NodeInformation nodeInformation = new NodeInformation(nodeName);\n nodeCatalog.addNode(nodeInformation);\n \n return nodeInformation;\n }", "public static void registerExternal(External hooks) { external = hooks; }", "public void register(FHIRPersistence fhirPersistence, String provider) {\n this.fhirPersistence = fhirPersistence;\n this.provider = provider;\n }", "public boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException;" ]
[ "0.64716804", "0.63866746", "0.635722", "0.6253267", "0.59713084", "0.58107", "0.5791431", "0.5788306", "0.5646523", "0.5638123", "0.5453322", "0.5205911", "0.515622", "0.5141216", "0.51320237", "0.5113913", "0.5111678", "0.50694585", "0.50520885", "0.504041", "0.49419662", "0.4920949", "0.4920882", "0.48700237", "0.4848965", "0.48319408", "0.4819349", "0.47971022", "0.4796766", "0.47823206", "0.47575673", "0.47538668", "0.47203153", "0.46686372", "0.46611157", "0.46541888", "0.46217358", "0.46177915", "0.46041822", "0.46032408", "0.45994473", "0.45982382", "0.45819792", "0.4578978", "0.45690447", "0.4564167", "0.4550212", "0.45473656", "0.45472613", "0.45355633", "0.45337176", "0.45279625", "0.45219472", "0.45215484", "0.45083684", "0.45077777", "0.45012212", "0.44979113", "0.44892204", "0.4466597", "0.44631818", "0.4463084", "0.44610813", "0.44574597", "0.4456384", "0.44496915", "0.4448858", "0.44299152", "0.4422995", "0.44215178", "0.44195774", "0.44143894", "0.44137457", "0.4406386", "0.43947232", "0.43922153", "0.43795186", "0.43726414", "0.43709564", "0.43661976", "0.43603116", "0.4339231", "0.4339152", "0.43372157", "0.4333174", "0.43260175", "0.43222913", "0.43149066", "0.42973387", "0.4290667", "0.42865837", "0.42847705", "0.42812738", "0.4279859", "0.4277438", "0.42759255", "0.42731437", "0.42635128", "0.42623514", "0.4249233" ]
0.6300919
3
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);", "public void probe(String event) {\n profile.add(event);\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n ProbeFunction function);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, LongProbeFunction<S> function);", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n DoubleProbeFunction<S> probe);", "protected void setProbe(Probe<?, ?> probe) {\n this.probe = probe;\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n LongProbeFunction<S> probe);", "protected void setProbe(Probe<?,?> probe) {\n this.probe = probe;\n }", "public void registerHook(PluginHook name, Hook hook)\n\t{\n\t\tif (!checkHook(name))\n\t\t\tthis.hooks.put(name, hook);\n\t}", "@Override\r\n public void registerMonitor(String name, ProfileMonitor monitor) {\n\r\n }", "void register(String name, K key, V value);", "public void registerInput( String pinName ) {\n\t//Bug: all we do is prevent inputs from being used twice, more later\n\tfor (String s: inputs) {\n\t if (s.equals( pinName )) {\n\t\tErrors.warn( \"Input reused: \" + name + \" \" + pinName );\n\t }\n\t}\n\tinputs.add( pinName );\n }", "void register(String name, Object bean);", "public void registerOutput( String pinName ) {\n\t//Bug: we do nothing about this here, it'll get more fun later\n }", "public String registerNewProducer(Producer producer);", "@Override\n public void register(Remote registerObj, String name) throws RemoteException\n {\n synchronized (supervisors)\n {\n Logger.getGlobal().log(Level.INFO, String.format(\"Register Supervisor: %s.\", name));\n addSupervisor(name);\n registry.rebind(name, registerObj);\n }\n }", "@Override\n public void registerGauge(String name, Gauge gauge) {\n Objects.requireNonNull(name);\n gauges.compute(name, (id, prev) ->\n new PrometheusGaugeWrapper(id, gauge, prev != null ? prev.inner : null));\n }", "public void registerTexture(Texture texture, String filename)\n {\n textureMap.put(filename, texture);\n \n try {\n ImageComponent component = texture.getImage(0);\n componentMap.put(filename, component);\n }\n catch (CapabilityNotSetException cnse) {\n }\n }", "public static void registerDriver( String driverName )\n throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n Class.forName( driverName ).newInstance();\n }", "public void register(T t);", "public void registerForSimNameChange(Handler h, int what, Object obj) {\n Registrant r = new Registrant (h, what, obj);\n\n synchronized (INSTANCE_LOCK) {\n mMultiSimNamesRegistrants.add(r);\n }\n }", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "public static void registerNameInLoading(Object oo, String name) {\n\t\t\n\t\tobject2name.put(oo, name);\n\t}", "public int register(String fileName, IPv4 peer) {\n try {\n // check if this file has been registered before\n if (this.registry.containsKey(fileName)) {\n // it exists, acquire its known peer list and add this peer to it\n HashSet<IPv4> filePeerList = this.registry.get(fileName);\n filePeerList.add(peer);\n } else {\n // does not exist, create a new entry with this peer associated to it\n HashSet<IPv4> filePeerList = new HashSet<IPv4>();\n filePeerList.add(peer);\n this.registry.put(fileName, filePeerList);\n }\n this.log(String.format(\"-> registered '%s' to (leaf %s).\", fileName, peer));\n return 0;\n } catch (Exception e) {\n e.printStackTrace();\n return 1;\n }\n }", "public static void regist(String name, AbstractBridgeHandler handler) {\n if (handler != null) handlers.put(name, handler);\n }", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "void putInstrument(String vendorCode, Instrument instrument);", "public void registerHit(boolean alive) {\n\t\tSystem.out.println(\"Player \" + self + \" registered a hit\");\r\n\t}", "public void register(String name, Pipe pipe) throws Exception {\n pool.put(name, pipe);\n }", "public synchronized void registerObject(String name, Object object)\r\n throws IllegalArgumentException,\r\n NullPointerException\r\n {\r\n if (containsSubString(name, TIGHT_BINDING))\r\n {\r\n // user has used the wrong method to register this object.\r\n registerObject(object, name);\r\n }\r\n else\r\n {\r\n // check that name doesn't contain illegal characters\r\n if (!isValidName(name))\r\n {\r\n throw new IllegalArgumentException(\"ResourceManager.registerObject(): \"+\r\n \"name '\" +name+ \"' can not contain \"+\r\n \"the whitespace, or the characters \" +\r\n \" '\"+LOOSE_BINDING+\"', '\"+\r\n SINGLE_MATCH+ \"'\");\r\n }\r\n\r\n if (object == null)\r\n {\r\n throw new NullPointerException(\"ResourceManager.registerObject(): \"+\r\n \"object is null\");\r\n }\r\n\r\n // store this mapping\r\n storeObject(name, object);\r\n }\r\n }", "public static void registerDriver(String className) throws Exception {\n // The newInstance() call is a work around for some \n // broken Java implementations (?)\n Class.forName(className).newInstance(); \n }", "public Builder addProbeFields(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureProbeFieldsIsMutable();\n probeFields_.add(value);\n onChanged();\n return this;\n }", "public void removeProbeByName(String probeName) throws CatascopiaException{\n\t\tif (this.probes.containsKey(probeName)){\n\t\t\tIProbe probe = this.probes.get(probeName);\n\t\t\tprobe.removeQueue();\n\t\t\tprobe.terminate();\n\t\t\tthis.probes.remove(probeName);\n\t\t}\n\t\telse\n\t\t\tthrow new CatascopiaException(\"Remove Probe Failed, probe name given does not exist: \"+probeName, \n\t\t\t\t\t\t\t\t\t\t CatascopiaException.ExceptionType.KEY);\n\t}", "public boolean registerPlayer(Player p);", "public void registerSound(String soundName, String filename) {\r\n\r\n URL soundURL = getClass().getResource(mediaRoot + filename);\r\n MediaPlayer player = new MediaPlayer(new Media(soundURL.toExternalForm()));\r\n\r\n sounds.put(soundName, player);\r\n }", "org.hl7.fhir.ResourceReference addNewSpecimen();", "public void register(T o);", "public void addSpecialization(String Special, double Gpa) {\n\t\thMap.put(Special, Gpa);\n\t}", "public void register(RegistrationData d) {}", "void register(final SimpleHack<?> hack) {\n\t\tthis.hacks.add(hack);\n\t}", "void registerPlayer() throws IOException;", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "public void registerResource(final Resource resource) {\n if (resource != null && resource.getName() != null)\n resourceRegistry.putEntry(resource.getName(), resource);\n }", "public void addDriver(Driver driver) {\n drivers.put(driver);\n }", "void register(RegisterData data) throws Exception;", "HistogramInterface registerHistogram(HistogramInterface histogram);", "public interface Probe {\n\n String MSG_OK = \"OK\";\n int DEFAULT_CONN_TIMEOUT = 2000;\n int DEFAULT_READ_TIMEOUT = 2000;\n\n /**\n * Name of probe.\n * @return\n */\n String getName();\n\n /**\n * Executes the probe and returns result of the check.\n * @return\n */\n ProbeResult run();\n}", "public Endpoint registerProducer(NodeName nodeName, String name, String type, String path)\n throws IOTException {\n NodeInformation nodeInformation = nodeCatalog.getNode(nodeName);\n if (nodeInformation == null) {\n handleError(\"Cannot find the specified node: \" + nodeName);\n return null;\n }\n \n Endpoint endpoint = endpointAllocator.allocate(nodeName, name, type, path);\n nodeInformation.addProducer(endpoint);\n \n return endpoint;\n }", "public void registerMaid(String maidName, MyMaid maid){\n //add maid to registry\n mMaidRegistry.put(maidName, maid);\n }", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public int registerInput( Wire w, String pinName ) {\n\tErrors.warn( \"Illegal input pin: \" + name + \" \" + pinName );\n\treturn -1;\n }", "public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }", "public void registerService(String serviceName, Object service);", "public static void registerType(String name, Class<?> type) {\n if (dbTypes.containsKey(name)) {\n log.warn(\"Type %s already registered!\", name);\n return;\n }\n dbTypes.put(name, type);\n }", "public abstract void register();", "public void register(GameObject gameObject) {\r\n\t\tsuper.register((Object)gameObject);\r\n\t}", "protected void register(String data){\n }", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public void registerObserver(DriverObserver driver);", "private void instantiateProbes() {\n\t\tString probe_str = this.config.getProperty(\"probes.include\", \"all\");\n\t\tString probe_exclude_str = this.config.getProperty(\"probes.exclude\", \"\");\n\t\tString probe_external = this.config.getProperty(\"probes.external\", \"\");\n\t\t\t\t\n\t\ttry {\n\t\t\tArrayList<String> availableProbeList = this.listAvailableProbeClasses();\n\t\t\t//user wants to instantiate all available probes with default params\n\t\t\t//TODO - allow user to parameterize probes when selecting to add all probes\n\t\t\tif (probe_str.equals(\"all\")) {\n\t\t\t\tfor(String s : availableProbeList) \n\t\t\t\t\tthis.probes.put(s, null);\n\t\t\t\t\n\t\t\t\t//user wants to instantiate all available probes except the ones specified for exclusion\n\t\t\t\tif (!probe_exclude_str.equals(\"\")) {\n\t\t\t\t\tString[] probe_list = probe_exclude_str.split(\";\");\n\t\t\t\t\tfor(String s:probe_list)\n\t\t\t\t\t\tthis.probes.remove(s.split(\",\")[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//instantiate\n\t\t\t\tfor(Entry<String,IProbe> p:this.probes.entrySet()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH, p.getKey());\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tp.setValue(tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user wants to instantiate specific probes (and may set custom params)\n\t\t\telse{\n\t\t\t\tString[] probe_list = probe_str.split(\";\");\n\t\t\t\tfor(String s:probe_list) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH,params[0]);\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tif(params.length > 1) //user wants to define custom collecting period\n\t\t\t\t\t\t\ttempProbe.setCollectPeriod(Integer.parseInt(params[1]));\n\t\t\t\t\t\tthis.probes.put(params[0], tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//activate Agent probes\n\t\t\tthis.activateAllProbes();\n\t\t\t\n\t\t\t//deploy external probes located in a custom user-defined path\n\t\t\tif (!probe_external.equals(\"\")) {\n\t\t\t\tString[] probe_list = probe_external.split(\";\");\n\t\t\t\tfor(String s:probe_list){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tString pclass = params[0];\n\t\t\t\t\t\tString ppath = params[1];\n\t\t\t\t\t\tthis.deployProbeAtRuntime(ppath, pclass);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, \"External Probe deployment error. Either the probe class name of classpath are not correctly provided\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t//log probe list added to Agent\n\t\t\tString l = \" \";\n\t\t\tfor(Entry<String,IProbe> entry:this.probes.entrySet())\n\t\t\t\tl += entry.getKey() + \",\";\n\t\t\tthis.writeToLog(Level.INFO,\"Probes Activated: \"+l.substring(0, l.length()-1));\n\t\t}\n\t\tcatch (CatascopiaException e){\n\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t}\n\t}", "protected void register() {\r\n\t\tif ((audioFile != null) && (audioFile instanceof AudioFileURL)) {\r\n\t\t\t((AudioFileURL) audioFile).addListener(this);\r\n\t\t}\r\n\t}", "public void register(){\n }", "protected void registerAppMap(String mapname, ApplicationMap map){\n\t\tappmaps.put(mapname.toUpperCase(), map);\n\t}", "public void put(ResourceLocation name, Tag nbt) {\n data.put(name.toString(), nbt);\n }", "private void addProvider(\n String elementName,\n String namespace,\n Class<?> provider)\n {\n // Attempt to load the provider class and then create\n // a new instance if it's an IQProvider. Otherwise, if it's\n // an IQ class, add the class object itself, then we'll use\n // reflection later to create instances of the class.\n try\n {\n // Add the provider to the map.\n if (IQProvider.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider.newInstance());\n }\n else if (IQ.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider);\n }\n }\n catch (Throwable t)\n {\n logger.error(\"Error adding iq provider.\", t);\n }\n }", "private void register(Path dir) {\n WatchKey key = null;\n\t\t\n try {\n key = dir.register(watcherService, STANDARD_EVENTS, FILE_TREE);\n } catch (UnsupportedOperationException ex) {\n LOG.warn(\"File watching not supported: {}\", ex.getMessage());\n LOG.trace(\"Exception:\", ex);\n } catch (IOException ex) {\n LOG.error(\"IO Error:\", ex);\n }\n\n if (key != null) {\n if (trace) {\n Path prev = keys.get(key);\n if (prev == null) {\n LOG.info(\"Register Watcher for: {}\", dir);\n } else if (!dir.equals(prev)) {\n LOG.info(\"Update Watcher for: {} -> {}\", prev, dir);\n }\n }\n keys.put(key, dir);\n }\n }", "public void registerPatientMethod1(Patient p);", "public static <T extends Item> T registerItem(T item, String name) {\n return registerItem(item, name, null);\n }", "@Override\n\tpublic final void register(final Agent agent) {\n\t\tsynchronized (this.agents) {\n\t\t\tthis.agents.put(agent.getAID(), agent);\n\t\t}\n\t}", "@ProbeBuilder\n public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {\n probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, \"*\");\n return probe;\n }", "public void register(Observer or);", "public void removeProbe(RadioProbe p) {\n probes.remove(p);\n }", "private static SoundEvent registerSound(String soundName)\r\n\t{\n\t\tResourceLocation location = new ResourceLocation(Reference.MODID, soundName);\r\n\t\tSoundEvent e = new SoundEvent(location);\r\n\t\tSoundEvent.REGISTRY.register(size, location, e);\r\n\t\tsize++;\r\n\t\treturn e;\r\n\t\t//return GameRegistry.register(new SoundEvent(soundID).setRegistryName(soundID));\r\n\t\t\t\t\t\t\r\n\t}", "void register();", "@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}", "static synchronized void register(Tool tool) {\n\t\tValid.checkBoolean(!isRegistered(tool), \"Tool with itemstack \" + tool.getItem() + \" already registered\");\n\n\t\ttools.add(tool);\n\t}", "public interface Probe {\n void start();\n\n void stop();\n}", "public void registerImageComponent(ImageComponent component, String filename)\n {\n componentMap.put(filename, component);\n }", "private static RegistryKey<World> register(String name){\n return RegistryKey.of(Registry.WORLD_KEY, new Identifier(Shurlin.MODID, name));\n }", "public void registerService(Registrant r) {\n namingService.registerService(r);\n }", "public void register(NPC npc) {\n\t\tnpcs.add(npc);\n\t}", "public void addAlert(String alert) {\n\t\talertsList.add(alert);\n\t\t// now call alertFound()\n\t\t// alertFound();\n\t}", "@Override\n\tpublic void registerPet(PetVO vo) {\n\t\t\n\t}", "private void addRegionToSpriteProviders(final Region region, final String name) {\n for (final SpriteProvider sp : spriteProviders) {\n sp.addRegion(region, name);\n }\n }", "private void register(Path dir) throws IOException {\n\t\tWatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n\t\tif (trace) {\n\t\t\tPath prev = keys.get(key);\n\t\t\tif (prev == null) {\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(String.format(\"register: %s\\n\", dir));\n\t\t\t} else {\n\t\t\t\tif (!dir.equals(prev)) {\n\t\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\t\tlogger.debug(String.format(\"update: %s -> %s\\n\", prev, dir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tkeys.put(key, dir);\n\t}", "public int register(String name) {\n\t\tint ticketNumber = nextTicketNumber;\n\t\tnextTicketNumber++;\n\t\tallowedPassengers.put(ticketNumber, name);\n\t\treturn ticketNumber;\n\t}", "void register(Opcode opcode);", "public void registerService(String serviceName){\n jmc.registerService(serviceName);\n }", "public static void registerListener(AltResource resource, Object listener){\n Set<Object> resourceListeners;\n if(listeners.containsKey(resource))\n resourceListeners = listeners.get(resource);\n else\n resourceListeners = new HashSet<>();\n resourceListeners.add(listener);\n listeners.put(resource, resourceListeners);\n }", "public void store(String name, String val, String register, int i) {\r\n registerName.add(name);\r\n registerValues.add(val);\r\n registerRegister.add(register);\r\n }", "@ProbeBuilder\n\tpublic TestProbeBuilder probeConfiguration( TestProbeBuilder probe ) {\n\t\tprobe.addTest( DmTest.class );\n\t\tprobe.addTest( TestUtils.class );\n\n\t\tprobe.addTest( AbstractIntegrationTest.class );\n\t\tprobe.addTest( IMessagingConfiguration.class );\n\t\tprobe.addTest( ItConfigurationBean.class );\n\n\t\treturn probe;\n\t}", "<T extends EventDetector> void addEventDetector(T detector);", "static public int register(Calibration cal_in) {\r\n int ret_val = 0;\r\n if (registeredCals.contains(cal_in)) {\r\n CrashTracker.logAndPrint(\"[CalWrangler] WARNING: Calibration Wrangler: \" + cal_in.name\r\n + \" has already been added to the cal wrangler. Nothing done.\");\r\n ret_val = -1;\r\n } else {\r\n registeredCals.add(cal_in);\r\n ret_val = 0;\r\n }\r\n return ret_val;\r\n }", "public NodeInformation registerNode(NodeName nodeName) throws IOTException {\n if (nodeCatalog.hasNode(nodeName)) {\n handleError(\"Cannot register node.. node already exists: \" + nodeName);\n return null;\n }\n \n NodeInformation nodeInformation = new NodeInformation(nodeName);\n nodeCatalog.addNode(nodeInformation);\n \n return nodeInformation;\n }", "public static void registerExternal(External hooks) { external = hooks; }", "public void register(FHIRPersistence fhirPersistence, String provider) {\n this.fhirPersistence = fhirPersistence;\n this.provider = provider;\n }", "public boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException;" ]
[ "0.64716804", "0.63866746", "0.6300919", "0.6253267", "0.59713084", "0.58107", "0.5791431", "0.5788306", "0.5646523", "0.5638123", "0.5453322", "0.5205911", "0.515622", "0.5141216", "0.51320237", "0.5113913", "0.5111678", "0.50694585", "0.50520885", "0.504041", "0.49419662", "0.4920949", "0.4920882", "0.48700237", "0.4848965", "0.48319408", "0.4819349", "0.47971022", "0.4796766", "0.47823206", "0.47575673", "0.47538668", "0.47203153", "0.46686372", "0.46611157", "0.46541888", "0.46217358", "0.46177915", "0.46041822", "0.46032408", "0.45994473", "0.45982382", "0.45819792", "0.4578978", "0.45690447", "0.4564167", "0.4550212", "0.45473656", "0.45472613", "0.45355633", "0.45337176", "0.45279625", "0.45219472", "0.45215484", "0.45083684", "0.45077777", "0.45012212", "0.44979113", "0.44892204", "0.4466597", "0.44631818", "0.4463084", "0.44610813", "0.44574597", "0.4456384", "0.44496915", "0.4448858", "0.44299152", "0.4422995", "0.44215178", "0.44195774", "0.44143894", "0.44137457", "0.4406386", "0.43947232", "0.43922153", "0.43795186", "0.43726414", "0.43709564", "0.43661976", "0.43603116", "0.4339231", "0.4339152", "0.43372157", "0.4333174", "0.43260175", "0.43222913", "0.43149066", "0.42973387", "0.4290667", "0.42865837", "0.42847705", "0.42812738", "0.4279859", "0.4277438", "0.42759255", "0.42731437", "0.42635128", "0.42623514", "0.4249233" ]
0.635722
2
Registers a probe. If a probe for the given name exists, it will be overwritten.
<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addProbe(IProbe p) {\n\t\tthis.probes.put(p.getProbeName(), p);\n\t\tp.attachQueue(this.queue);\n\t\tp.attachLogger(this.logger);\n\t}", "public void insertProbe(RadioProbe p) {\n probes.add(p);\n }", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, DoubleProbeFunction<S> probe);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, ProbeUnit unit, LongProbeFunction<S> probe);", "public void probe(String event) {\n profile.add(event);\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n ProbeFunction function);", "<S> void registerStaticProbe(S source, String name, ProbeLevel level, LongProbeFunction<S> function);", "protected void setProbe(Probe<?, ?> probe) {\n this.probe = probe;\n }", "<S> void registerStaticProbe(S source, MetricDescriptor descriptor, String name, ProbeLevel level, ProbeUnit unit,\n LongProbeFunction<S> probe);", "protected void setProbe(Probe<?,?> probe) {\n this.probe = probe;\n }", "public void registerHook(PluginHook name, Hook hook)\n\t{\n\t\tif (!checkHook(name))\n\t\t\tthis.hooks.put(name, hook);\n\t}", "@Override\r\n public void registerMonitor(String name, ProfileMonitor monitor) {\n\r\n }", "void register(String name, K key, V value);", "public void registerInput( String pinName ) {\n\t//Bug: all we do is prevent inputs from being used twice, more later\n\tfor (String s: inputs) {\n\t if (s.equals( pinName )) {\n\t\tErrors.warn( \"Input reused: \" + name + \" \" + pinName );\n\t }\n\t}\n\tinputs.add( pinName );\n }", "void register(String name, Object bean);", "public void registerOutput( String pinName ) {\n\t//Bug: we do nothing about this here, it'll get more fun later\n }", "public String registerNewProducer(Producer producer);", "@Override\n public void register(Remote registerObj, String name) throws RemoteException\n {\n synchronized (supervisors)\n {\n Logger.getGlobal().log(Level.INFO, String.format(\"Register Supervisor: %s.\", name));\n addSupervisor(name);\n registry.rebind(name, registerObj);\n }\n }", "@Override\n public void registerGauge(String name, Gauge gauge) {\n Objects.requireNonNull(name);\n gauges.compute(name, (id, prev) ->\n new PrometheusGaugeWrapper(id, gauge, prev != null ? prev.inner : null));\n }", "public void registerTexture(Texture texture, String filename)\n {\n textureMap.put(filename, texture);\n \n try {\n ImageComponent component = texture.getImage(0);\n componentMap.put(filename, component);\n }\n catch (CapabilityNotSetException cnse) {\n }\n }", "public static void registerDriver( String driverName )\n throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n Class.forName( driverName ).newInstance();\n }", "public void register(T t);", "public void registerForSimNameChange(Handler h, int what, Object obj) {\n Registrant r = new Registrant (h, what, obj);\n\n synchronized (INSTANCE_LOCK) {\n mMultiSimNamesRegistrants.add(r);\n }\n }", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "public static void registerNameInLoading(Object oo, String name) {\n\t\t\n\t\tobject2name.put(oo, name);\n\t}", "public int register(String fileName, IPv4 peer) {\n try {\n // check if this file has been registered before\n if (this.registry.containsKey(fileName)) {\n // it exists, acquire its known peer list and add this peer to it\n HashSet<IPv4> filePeerList = this.registry.get(fileName);\n filePeerList.add(peer);\n } else {\n // does not exist, create a new entry with this peer associated to it\n HashSet<IPv4> filePeerList = new HashSet<IPv4>();\n filePeerList.add(peer);\n this.registry.put(fileName, filePeerList);\n }\n this.log(String.format(\"-> registered '%s' to (leaf %s).\", fileName, peer));\n return 0;\n } catch (Exception e) {\n e.printStackTrace();\n return 1;\n }\n }", "public static void regist(String name, AbstractBridgeHandler handler) {\n if (handler != null) handlers.put(name, handler);\n }", "@Override\n public void triggerProbe(DeviceId deviceId) {\n }", "void putInstrument(String vendorCode, Instrument instrument);", "public void registerHit(boolean alive) {\n\t\tSystem.out.println(\"Player \" + self + \" registered a hit\");\r\n\t}", "public void register(String name, Pipe pipe) throws Exception {\n pool.put(name, pipe);\n }", "public synchronized void registerObject(String name, Object object)\r\n throws IllegalArgumentException,\r\n NullPointerException\r\n {\r\n if (containsSubString(name, TIGHT_BINDING))\r\n {\r\n // user has used the wrong method to register this object.\r\n registerObject(object, name);\r\n }\r\n else\r\n {\r\n // check that name doesn't contain illegal characters\r\n if (!isValidName(name))\r\n {\r\n throw new IllegalArgumentException(\"ResourceManager.registerObject(): \"+\r\n \"name '\" +name+ \"' can not contain \"+\r\n \"the whitespace, or the characters \" +\r\n \" '\"+LOOSE_BINDING+\"', '\"+\r\n SINGLE_MATCH+ \"'\");\r\n }\r\n\r\n if (object == null)\r\n {\r\n throw new NullPointerException(\"ResourceManager.registerObject(): \"+\r\n \"object is null\");\r\n }\r\n\r\n // store this mapping\r\n storeObject(name, object);\r\n }\r\n }", "public static void registerDriver(String className) throws Exception {\n // The newInstance() call is a work around for some \n // broken Java implementations (?)\n Class.forName(className).newInstance(); \n }", "public Builder addProbeFields(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureProbeFieldsIsMutable();\n probeFields_.add(value);\n onChanged();\n return this;\n }", "public void removeProbeByName(String probeName) throws CatascopiaException{\n\t\tif (this.probes.containsKey(probeName)){\n\t\t\tIProbe probe = this.probes.get(probeName);\n\t\t\tprobe.removeQueue();\n\t\t\tprobe.terminate();\n\t\t\tthis.probes.remove(probeName);\n\t\t}\n\t\telse\n\t\t\tthrow new CatascopiaException(\"Remove Probe Failed, probe name given does not exist: \"+probeName, \n\t\t\t\t\t\t\t\t\t\t CatascopiaException.ExceptionType.KEY);\n\t}", "public boolean registerPlayer(Player p);", "public void registerSound(String soundName, String filename) {\r\n\r\n URL soundURL = getClass().getResource(mediaRoot + filename);\r\n MediaPlayer player = new MediaPlayer(new Media(soundURL.toExternalForm()));\r\n\r\n sounds.put(soundName, player);\r\n }", "public void register(T o);", "org.hl7.fhir.ResourceReference addNewSpecimen();", "public void addSpecialization(String Special, double Gpa) {\n\t\thMap.put(Special, Gpa);\n\t}", "public void register(RegistrationData d) {}", "void register(final SimpleHack<?> hack) {\n\t\tthis.hacks.add(hack);\n\t}", "void registerPlayer() throws IOException;", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "public void registerResource(final Resource resource) {\n if (resource != null && resource.getName() != null)\n resourceRegistry.putEntry(resource.getName(), resource);\n }", "public void addDriver(Driver driver) {\n drivers.put(driver);\n }", "void register(RegisterData data) throws Exception;", "HistogramInterface registerHistogram(HistogramInterface histogram);", "public interface Probe {\n\n String MSG_OK = \"OK\";\n int DEFAULT_CONN_TIMEOUT = 2000;\n int DEFAULT_READ_TIMEOUT = 2000;\n\n /**\n * Name of probe.\n * @return\n */\n String getName();\n\n /**\n * Executes the probe and returns result of the check.\n * @return\n */\n ProbeResult run();\n}", "public Endpoint registerProducer(NodeName nodeName, String name, String type, String path)\n throws IOTException {\n NodeInformation nodeInformation = nodeCatalog.getNode(nodeName);\n if (nodeInformation == null) {\n handleError(\"Cannot find the specified node: \" + nodeName);\n return null;\n }\n \n Endpoint endpoint = endpointAllocator.allocate(nodeName, name, type, path);\n nodeInformation.addProducer(endpoint);\n \n return endpoint;\n }", "public void registerMaid(String maidName, MyMaid maid){\n //add maid to registry\n mMaidRegistry.put(maidName, maid);\n }", "public int registerInput( Wire w, String pinName ) {\n\tErrors.warn( \"Illegal input pin: \" + name + \" \" + pinName );\n\treturn -1;\n }", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public void registerService(String serviceName, Object service);", "public void createPHR(String name) {\n Bundle response;\n String[] splitName = name.split(\"\\\\s+\");\n String given = splitName[0], family = splitName[1];\n try {\n response = client.search()\n .forResource(Patient.class)\n .where(Patient.GIVEN.matches().value(given))\n .where(Patient.FAMILY.matches().value(family))\n .returnBundle(Bundle.class)\n .execute();\n for(Bundle.Entry entry : response.getEntry()) {\n String ID = entry.getResource().getIdElement().getIdPart();\n CustomPatient customPatient = CustomHAPIClasses.getCustomPatient((Patient) entry.getResource());\n PatientDetails patientDetails = new PatientDetails(ID,customPatient);\n patientHealthRecords.put(ID,patientDetails);\n }\n } catch (Exception e) {\n System.out.println(\"Error Occurred: \" + e);\n }\n }", "public static void registerType(String name, Class<?> type) {\n if (dbTypes.containsKey(name)) {\n log.warn(\"Type %s already registered!\", name);\n return;\n }\n dbTypes.put(name, type);\n }", "public abstract void register();", "public void register(GameObject gameObject) {\r\n\t\tsuper.register((Object)gameObject);\r\n\t}", "protected void register(String data){\n }", "@Override\n\tpublic boolean registerSensor(String name) {\n\t\t// Get an instance of the Sensor\n\t\tNamingContextExt namingService = CorbaHelper.getNamingService(this._orb());\n\t\tSensor sensor = null;\n\t\t\n\t\t// Get a reference to the sensor\n\t try {\n\t \tsensor = SensorHelper.narrow(namingService.resolve_str(name));\n\t\t} catch (NotFound | CannotProceed | InvalidName e) {\n\t\t\tSystem.out.println(\"Failed to add Sensor named: \" + name);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t \n\t if(sensor != null) {\n\t \t// Lets check this sensors zone already exists. If not, create it\n\t\t if( ! this.sensors.containsKey(sensor.zone())) {\n\t\t \t// Create that zone\n\t\t \tArrayList<Sensor> sensors = new ArrayList<Sensor>();\n\t\t \t\n\t\t \t// Put the array into the sensors hashmap\n\t\t \tthis.sensors.put(sensor.zone(), sensors);\n\t\t }\n\t\t \n\t\t // Check if the sensor zone already contains this sensor\n\t\t if( ! this.sensors.get(sensor.zone()).contains(sensor)) {\n\t\t \t// Add the new sensor to the correct zone\n\t\t \tthis.sensors.get(sensor.zone()).add(sensor);\n\t\t \t\n\t\t \t// A little feedback\n\t\t \tthis.log(name + \" has registered with the LMS in zone \" + sensor.zone() + \". There are \" + this.sensors.get(sensor.zone()).size() + \" Sensors in this Zone.\");\n\t\t \t\n\t\t \t// Return success\n\t\t \treturn true;\n\t\t }\n\t } else {\n\t \tthis.log(\"Returned sensor was null\");\n\t }\n\t \n\t\t// At this stage, the sensor must exist already\n\t\treturn false;\n\t}", "public void registerObserver(DriverObserver driver);", "private void instantiateProbes() {\n\t\tString probe_str = this.config.getProperty(\"probes.include\", \"all\");\n\t\tString probe_exclude_str = this.config.getProperty(\"probes.exclude\", \"\");\n\t\tString probe_external = this.config.getProperty(\"probes.external\", \"\");\n\t\t\t\t\n\t\ttry {\n\t\t\tArrayList<String> availableProbeList = this.listAvailableProbeClasses();\n\t\t\t//user wants to instantiate all available probes with default params\n\t\t\t//TODO - allow user to parameterize probes when selecting to add all probes\n\t\t\tif (probe_str.equals(\"all\")) {\n\t\t\t\tfor(String s : availableProbeList) \n\t\t\t\t\tthis.probes.put(s, null);\n\t\t\t\t\n\t\t\t\t//user wants to instantiate all available probes except the ones specified for exclusion\n\t\t\t\tif (!probe_exclude_str.equals(\"\")) {\n\t\t\t\t\tString[] probe_list = probe_exclude_str.split(\";\");\n\t\t\t\t\tfor(String s:probe_list)\n\t\t\t\t\t\tthis.probes.remove(s.split(\",\")[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//instantiate\n\t\t\t\tfor(Entry<String,IProbe> p:this.probes.entrySet()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH, p.getKey());\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tp.setValue(tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user wants to instantiate specific probes (and may set custom params)\n\t\t\telse{\n\t\t\t\tString[] probe_list = probe_str.split(\";\");\n\t\t\t\tfor(String s:probe_list) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH,params[0]);\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tif(params.length > 1) //user wants to define custom collecting period\n\t\t\t\t\t\t\ttempProbe.setCollectPeriod(Integer.parseInt(params[1]));\n\t\t\t\t\t\tthis.probes.put(params[0], tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//activate Agent probes\n\t\t\tthis.activateAllProbes();\n\t\t\t\n\t\t\t//deploy external probes located in a custom user-defined path\n\t\t\tif (!probe_external.equals(\"\")) {\n\t\t\t\tString[] probe_list = probe_external.split(\";\");\n\t\t\t\tfor(String s:probe_list){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tString pclass = params[0];\n\t\t\t\t\t\tString ppath = params[1];\n\t\t\t\t\t\tthis.deployProbeAtRuntime(ppath, pclass);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, \"External Probe deployment error. Either the probe class name of classpath are not correctly provided\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t//log probe list added to Agent\n\t\t\tString l = \" \";\n\t\t\tfor(Entry<String,IProbe> entry:this.probes.entrySet())\n\t\t\t\tl += entry.getKey() + \",\";\n\t\t\tthis.writeToLog(Level.INFO,\"Probes Activated: \"+l.substring(0, l.length()-1));\n\t\t}\n\t\tcatch (CatascopiaException e){\n\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t}\n\t}", "protected void register() {\r\n\t\tif ((audioFile != null) && (audioFile instanceof AudioFileURL)) {\r\n\t\t\t((AudioFileURL) audioFile).addListener(this);\r\n\t\t}\r\n\t}", "public void register(){\n }", "protected void registerAppMap(String mapname, ApplicationMap map){\n\t\tappmaps.put(mapname.toUpperCase(), map);\n\t}", "public void put(ResourceLocation name, Tag nbt) {\n data.put(name.toString(), nbt);\n }", "private void addProvider(\n String elementName,\n String namespace,\n Class<?> provider)\n {\n // Attempt to load the provider class and then create\n // a new instance if it's an IQProvider. Otherwise, if it's\n // an IQ class, add the class object itself, then we'll use\n // reflection later to create instances of the class.\n try\n {\n // Add the provider to the map.\n if (IQProvider.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider.newInstance());\n }\n else if (IQ.class.isAssignableFrom(provider))\n {\n addIQProvider(elementName, namespace, provider);\n }\n }\n catch (Throwable t)\n {\n logger.error(\"Error adding iq provider.\", t);\n }\n }", "private void register(Path dir) {\n WatchKey key = null;\n\t\t\n try {\n key = dir.register(watcherService, STANDARD_EVENTS, FILE_TREE);\n } catch (UnsupportedOperationException ex) {\n LOG.warn(\"File watching not supported: {}\", ex.getMessage());\n LOG.trace(\"Exception:\", ex);\n } catch (IOException ex) {\n LOG.error(\"IO Error:\", ex);\n }\n\n if (key != null) {\n if (trace) {\n Path prev = keys.get(key);\n if (prev == null) {\n LOG.info(\"Register Watcher for: {}\", dir);\n } else if (!dir.equals(prev)) {\n LOG.info(\"Update Watcher for: {} -> {}\", prev, dir);\n }\n }\n keys.put(key, dir);\n }\n }", "public void registerPatientMethod1(Patient p);", "public static <T extends Item> T registerItem(T item, String name) {\n return registerItem(item, name, null);\n }", "@Override\n\tpublic final void register(final Agent agent) {\n\t\tsynchronized (this.agents) {\n\t\t\tthis.agents.put(agent.getAID(), agent);\n\t\t}\n\t}", "@ProbeBuilder\n public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {\n probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, \"*\");\n return probe;\n }", "public void register(Observer or);", "public void removeProbe(RadioProbe p) {\n probes.remove(p);\n }", "private static SoundEvent registerSound(String soundName)\r\n\t{\n\t\tResourceLocation location = new ResourceLocation(Reference.MODID, soundName);\r\n\t\tSoundEvent e = new SoundEvent(location);\r\n\t\tSoundEvent.REGISTRY.register(size, location, e);\r\n\t\tsize++;\r\n\t\treturn e;\r\n\t\t//return GameRegistry.register(new SoundEvent(soundID).setRegistryName(soundID));\r\n\t\t\t\t\t\t\r\n\t}", "void register();", "@Override\r\n\tpublic void register(NoticeVO vo) {\n\t\tsqlSession.insert(namespace + \".register\", vo);\r\n\t}", "static synchronized void register(Tool tool) {\n\t\tValid.checkBoolean(!isRegistered(tool), \"Tool with itemstack \" + tool.getItem() + \" already registered\");\n\n\t\ttools.add(tool);\n\t}", "public interface Probe {\n void start();\n\n void stop();\n}", "public void registerImageComponent(ImageComponent component, String filename)\n {\n componentMap.put(filename, component);\n }", "public void registerService(Registrant r) {\n namingService.registerService(r);\n }", "private static RegistryKey<World> register(String name){\n return RegistryKey.of(Registry.WORLD_KEY, new Identifier(Shurlin.MODID, name));\n }", "public void register(NPC npc) {\n\t\tnpcs.add(npc);\n\t}", "public void addAlert(String alert) {\n\t\talertsList.add(alert);\n\t\t// now call alertFound()\n\t\t// alertFound();\n\t}", "@Override\n\tpublic void registerPet(PetVO vo) {\n\t\t\n\t}", "private void addRegionToSpriteProviders(final Region region, final String name) {\n for (final SpriteProvider sp : spriteProviders) {\n sp.addRegion(region, name);\n }\n }", "private void register(Path dir) throws IOException {\n\t\tWatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n\t\tif (trace) {\n\t\t\tPath prev = keys.get(key);\n\t\t\tif (prev == null) {\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(String.format(\"register: %s\\n\", dir));\n\t\t\t} else {\n\t\t\t\tif (!dir.equals(prev)) {\n\t\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\t\tlogger.debug(String.format(\"update: %s -> %s\\n\", prev, dir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tkeys.put(key, dir);\n\t}", "public int register(String name) {\n\t\tint ticketNumber = nextTicketNumber;\n\t\tnextTicketNumber++;\n\t\tallowedPassengers.put(ticketNumber, name);\n\t\treturn ticketNumber;\n\t}", "void register(Opcode opcode);", "public void registerService(String serviceName){\n jmc.registerService(serviceName);\n }", "public static void registerListener(AltResource resource, Object listener){\n Set<Object> resourceListeners;\n if(listeners.containsKey(resource))\n resourceListeners = listeners.get(resource);\n else\n resourceListeners = new HashSet<>();\n resourceListeners.add(listener);\n listeners.put(resource, resourceListeners);\n }", "public void store(String name, String val, String register, int i) {\r\n registerName.add(name);\r\n registerValues.add(val);\r\n registerRegister.add(register);\r\n }", "<T extends EventDetector> void addEventDetector(T detector);", "@ProbeBuilder\n\tpublic TestProbeBuilder probeConfiguration( TestProbeBuilder probe ) {\n\t\tprobe.addTest( DmTest.class );\n\t\tprobe.addTest( TestUtils.class );\n\n\t\tprobe.addTest( AbstractIntegrationTest.class );\n\t\tprobe.addTest( IMessagingConfiguration.class );\n\t\tprobe.addTest( ItConfigurationBean.class );\n\n\t\treturn probe;\n\t}", "static public int register(Calibration cal_in) {\r\n int ret_val = 0;\r\n if (registeredCals.contains(cal_in)) {\r\n CrashTracker.logAndPrint(\"[CalWrangler] WARNING: Calibration Wrangler: \" + cal_in.name\r\n + \" has already been added to the cal wrangler. Nothing done.\");\r\n ret_val = -1;\r\n } else {\r\n registeredCals.add(cal_in);\r\n ret_val = 0;\r\n }\r\n return ret_val;\r\n }", "public NodeInformation registerNode(NodeName nodeName) throws IOTException {\n if (nodeCatalog.hasNode(nodeName)) {\n handleError(\"Cannot register node.. node already exists: \" + nodeName);\n return null;\n }\n \n NodeInformation nodeInformation = new NodeInformation(nodeName);\n nodeCatalog.addNode(nodeInformation);\n \n return nodeInformation;\n }", "public static void registerExternal(External hooks) { external = hooks; }", "public void register(FHIRPersistence fhirPersistence, String provider) {\n this.fhirPersistence = fhirPersistence;\n this.provider = provider;\n }", "public boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException;" ]
[ "0.64694697", "0.6383709", "0.635662", "0.63004285", "0.62526625", "0.5970581", "0.5809895", "0.5791225", "0.5644602", "0.56369996", "0.54512376", "0.5205304", "0.5154759", "0.51416445", "0.5132631", "0.51143885", "0.51119363", "0.50675154", "0.5053072", "0.5039661", "0.49421126", "0.49216372", "0.49211428", "0.48701742", "0.48492453", "0.48325697", "0.4819036", "0.47984916", "0.4796457", "0.47813", "0.47568727", "0.4753233", "0.47212717", "0.46683863", "0.46599755", "0.4652464", "0.46207455", "0.46181294", "0.4603652", "0.4602476", "0.45988277", "0.45978427", "0.4581219", "0.45778805", "0.45679837", "0.45641097", "0.45494723", "0.4547076", "0.4545701", "0.45341945", "0.45332137", "0.4527926", "0.45217496", "0.45202687", "0.4509437", "0.45058388", "0.45017177", "0.4498325", "0.44894776", "0.446647", "0.44643992", "0.44627294", "0.44596687", "0.44588265", "0.44562423", "0.4449637", "0.44490084", "0.44293126", "0.4422471", "0.4420686", "0.4419273", "0.4414212", "0.4411773", "0.4406412", "0.4391925", "0.43916246", "0.43791533", "0.4372632", "0.4369482", "0.43653718", "0.43609902", "0.43393704", "0.43390363", "0.43362793", "0.43327653", "0.4325409", "0.43224433", "0.43139702", "0.42972603", "0.42904222", "0.4287933", "0.42846367", "0.42815423", "0.42780456", "0.42774904", "0.42752188", "0.4273281", "0.42634103", "0.42615867", "0.424947" ]
0.57872796
8
Schedules a publisher to be executed at a fixed rate. Probably this method will be removed in the future, but we need a mechanism for complex gauges that require some calculation to provide their values.
ScheduledFuture<?> scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit, ProbeLevel probeLevel);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Publisher<StockPrice> stockPrice(String symbol) {\n\n\n Publisher<StockPrice> publisher = s -> {\n ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1);\n executorService.scheduleAtFixedRate(() -> {\n StockPrice ret = new StockPrice(symbol, 2d, LocalDateTime.now());\n s.onNext(ret);\n }, 0, 2, TimeUnit.SECONDS);\n };\n\n// publisher.subscribe(new TestSubscriber());\n\n return publisher;\n }", "@Override\n protected Scheduler scheduler() {\n return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.SECONDS);\n }", "public void start() {\n logger.info(\"Starting Publisher\");\n // start now, publish every 10 minutes\n task.compareAndSet(\n NullTimerTask$.MODULE$,\n timer.schedule(\n Time.now(),\n Duration.fromMinutes(10),\n new Function0<BoxedUnit>() {\n @Override\n public BoxedUnit apply() {\n return publish();\n }\n })\n );\n }", "@Scheduled(fixedRate = 2000)\n\tpublic void scheduleTaskWithFixedRate() {\n\t\tlog.info(\"Fixed Rate Task :: Execution Time - {}\", dateTimeFormatter.format(LocalDateTime.now()) );\n\t}", "@Override\n protected Scheduler scheduler() {\n return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.DAYS);\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "public void schedule(MessageSender sender) {\n\t\tmScheduler = new Timer();\n\t\tif(!mRegisterdListeners.isEmpty()) {\n\t\t\tfor(int i = 0; i < mRegisterdListeners.size(); i++) {\n\t\t\t\tmArduinoTasks.add(new ArduinoTask(sender,mRegisterdListeners.get(i).getSensor().getSensorId(), mArduinoService.getContainer()));\n\t\t\t\tLog.d(TAG, \"rate: \" + mRegisterdListeners.get(i).getSampleRate());\t\n\t\t\t}\n\t\t\tfor(int i = 0; i < mArduinoTasks.size(); i++) {\n\t\t\t\tmScheduler.scheduleAtFixedRate(mArduinoTasks.get(i), (r.nextInt(2000 - 1010 + 1) + 1000) * (i + 1), mRegisterdListeners.get(i).getSampleRate());\n\t\t\t}\n\t\t}\n\t}", "public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }", "@Scheduled(every = \"1s\")\n void schedule() {\n if (message != null) {\n final String endpointUri = \"azure-eventhubs:?connectionString=RAW(\" + connectionString.get() + \")\";\n producerTemplate.sendBody(endpointUri, message + (counter++));\n }\n }", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void setStarvationRate ( int ticks ) {\n\t\texecute ( handle -> handle.setStarvationRate ( ticks ) );\n\t}", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "public void autonomousPeriodic() {\r\n \r\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "private void runPeriodic() {\n boolean ok = ScheduledFutureTask.super.runAndReset();\n boolean down = isShutdown();\n // Reschedule if not cancelled and not shutdown or policy allows\n if (ok && !down) {\n updateNextExecutionTime();\n MeasurableScheduler.super.getQueue().add(this);\n }\n // This might have been the final executed delayed\n // task. Wake up threads to check.\n else if (down)\n interruptIdleWorkers();\n }", "public void autonomousPeriodic() {\n \n }", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n public void teleopPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}", "@Override\n public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\r\n }", "public void autonomousPeriodic() {\r\n }", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "void schedule(long delay, TimeUnit unit) {\r\n\t\tthis.delay = delay;\r\n\t\tthis.unit = unit;\r\n\t\tif (monitor != null) {\r\n\t\t\tmonitor.cancel(false);\r\n\t\t\tmonitor = pool.scheduleWithFixedDelay(sync, delay, delay, unit);\r\n\t\t}\r\n\t}", "public void autonomousPeriodic()\r\n {\r\n \r\n }", "@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }", "@Override\r\n public void publishStart(Publisher publisher) {\n }", "public void autonomousPeriodic() {\n\n }", "public void autonomousPeriodic() {\n\n }", "@Override\n public void run() {\n schedule();\n }", "public void schedule(Runnable job, long delay, TimeUnit unit);", "public void autonomousPeriodic() {\n \tauto.autonomousPeriodic();\n\t}", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "@Override\n public void autonomousPeriodic() {\n\n }", "@Override\n public void simulationPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n \n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "private void scheduleTasks() {\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// Prepare JSON Ping Message\n\t\t\t\ttry {\n\t\t\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\t\t\tObjectNode objectNode = mapper.createObjectNode();\n\t\t\t\t\tobjectNode.put(\"type\", \"PING\");\n\n\t\t\t\t\twebSocket.sendText(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(objectNode));\n\n\t\t\t\t\tlog.debug(\"Send Ping to Twitch PubSub. (Keep-Connection-Alive)\");\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tlog.error(\"Failed to Ping Twitch PubSub. ({})\", ex.getMessage());\n\t\t\t\t\treconnect();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}, 7000, 282000);\n\t}", "public void updatePeriodic() {\r\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }" ]
[ "0.6217986", "0.60866076", "0.58828634", "0.5688676", "0.5572188", "0.5564258", "0.5546626", "0.5546626", "0.5546626", "0.5546626", "0.5525598", "0.5492168", "0.54707956", "0.5455871", "0.54274446", "0.54156566", "0.54140544", "0.5402431", "0.5390175", "0.5388297", "0.5376744", "0.5376744", "0.5376744", "0.5376744", "0.5376744", "0.5376744", "0.5337695", "0.5312011", "0.5295783", "0.52896863", "0.52896863", "0.52896863", "0.5259044", "0.5256319", "0.52334404", "0.5232644", "0.52254033", "0.5218176", "0.52139777", "0.5203965", "0.5191771", "0.5191771", "0.51873326", "0.51713353", "0.51713353", "0.51610434", "0.51610434", "0.51610434", "0.515799", "0.51515204", "0.5141173", "0.51350117", "0.5131643", "0.5131643", "0.51288265", "0.51099217", "0.5090298", "0.5070742", "0.5069142", "0.50614935", "0.50446975", "0.50398123", "0.50398123", "0.50398123", "0.5031136", "0.503089", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507", "0.50246507" ]
0.7642896
0
Collects the content of the MetricsRegistry.
void collect(MetricsCollector collector);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void collectMetricsInfo() {\n // Retrieve a list of all references to registered metric services\n ServiceReference[] metricsList = null;\n try {\n metricsList = bc.getServiceReferences(null, SREF_FILTER_METRIC);\n } catch (InvalidSyntaxException e) {\n logError(INVALID_FILTER_SYNTAX);\n }\n \n // Retrieve information about all registered metrics found\n if ((metricsList != null) && (metricsList.length > 0)) {\n \n for (int nextMetric = 0;\n nextMetric < metricsList.length;\n nextMetric++) {\n \n ServiceReference sref_metric = metricsList[nextMetric];\n MetricInfo metric_info = getMetricInfo(sref_metric);\n \n // Add this metric's info to the list\n if (metric_info != null) {\n registeredMetrics.put(\n metric_info.getServiceID(),\n metric_info);\n }\n }\n }\n else {\n logInfo(\"No pre-existing metrics were found!\");\n }\n }", "@RefreshScope\n @Bean\n public MetricRegistry metrics() {\n final MetricRegistry metrics = new MetricRegistry();\n metrics.register(\"jvm.gc\", new GarbageCollectorMetricSet());\n metrics.register(\"jvm.memory\", new MemoryUsageGaugeSet());\n metrics.register(\"thread-states\", new ThreadStatesGaugeSet());\n metrics.register(\"jvm.fd.usage\", new FileDescriptorRatioGauge());\n return metrics;\n }", "public MetricRegistry getMetricRegistry();", "@Override\n public Metrics getMetrics() {\n return metrics;\n }", "MetricsRegistry getMetrics2Registry() {\n return metrics2Registry;\n }", "public MetricRegistry getMetricRegistry() {\n return metricRegistry;\n }", "public Collection<MetricInfo> listMetrics() {\n if (!registeredMetrics.isEmpty()) {\n return registeredMetrics.values();\n }\n return null;\n }", "@Override\n public DataStoreMetricsReporter getMetrics()\n {\n return metrics;\n }", "public abstract List<Metric> getMetrics();", "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 }", "private void collectData() {\n this.collectContest();\n this.collectProblems();\n this.collectPreCollegeParticipants();\n this.collectObservers();\n }", "public CachetMetricList getMetrics() {\n throw new RuntimeException(\"Method not implemented.\");\n }", "public interface GaugeDataCollector {\n\n /**\n * Return a collection of @link {MeasurementBundle} objects. Each bundle can have one or more\n * View/Value pairs and zero or more metadata AttachmentKey/String pairs. There a 1:1\n * correspondence between MeasurementBundles returned and instantiation of MeasureMaps (and calls\n * to record).\n *\n * <p>If a class has no attachments to provide, then it's fine to include all samples in a single\n * MeasurementBundle, which will save calls to the metrics backend.\n *\n * @return collection of MeasurementBundles to be recorded.\n */\n Collection<MeasurementBundle> getGaugeData();\n}", "@Override\n\tvoid collect() {\n\t\t\n\t}", "public void collectStatsFromAggregator(IStatsGatherDesc conf) {\n basicStatsWork.setAggKey(conf.getStatsAggPrefix());\n basicStatsWork.setStatsTmpDir(conf.getTmpStatsDir());\n basicStatsWork.setStatsReliable(statsReliable);\n }", "Metrics getMetrics();", "io.netifi.proteus.admin.om.Metrics getMetrics();", "@Nonnull\n @Override\n public Iterable<KeyValueObject<KOUT, VOUT>> collect() {\n return output.collect();\n }", "public void clearMetrics() {\n this.metrics_ = GeneratedMessageLite.emptyProtobufList();\n }", "@Override\n public void clearAllRegistrations()\n {\n writeRegistryStoreProperties(null);\n }", "public Map<String,Value> collect(TaskRuntimeContext runtimeContext);", "private void setupCollector() {\n outList = new ArrayList<>();\n }", "@Override\n public List<Metric> getMetrics() {\n return Arrays.asList(\n TRACE,\n JAVA_LICENSE,\n\n // Rulesets metrics\n ISSUEGROUP_ANDROID, ISSUEGROUP_BAD_PRACTICE,\n ISSUEGROUP_CODE_SIZE, ISSUEGROUP_COMMENT,\n ISSUEGROUP_CORRECTNESS, ISSUEGROUP_COUPLING,\n ISSUEGROUP_DODGY_CODE, ISSUEGROUP_EXPERIMENTAL,\n ISSUEGROUP_INTERNATIONALIZATION,\n ISSUEGROUP_MIGRATION, ISSUEGROUP_MULTITHREADED_CORRECTNESS,\n ISSUEGROUP_VULNERABILITY);\n }", "private void metricRegistered (ServiceReference srefMetric) {\n // Retrieve the service ID\n Long serviceId =\n (Long) srefMetric.getProperty(Constants.SERVICE_ID);\n logInfo(\"A metric service was registered with ID \" + serviceId);\n \n // Dispose from the list of available metric any old metric, that\n // uses the same ID. Should not be required, as long as metric\n // services got properly unregistered.\n if (registeredMetrics.containsKey(serviceId)) {\n registeredMetrics.remove(serviceId);\n }\n \n // Retrieve information about this metric and add this metric to the\n // list of registered/available metrics\n MetricInfo metricInfo = getMetricInfo(srefMetric);\n registeredMetrics.put(serviceId, metricInfo);\n \n // Search for an applicable configuration set and apply it\n Iterator<String> configSets =\n metricConfigurations.keySet().iterator();\n while (configSets.hasNext()) {\n // Match is performed against the metric's class name(s)\n String className = configSets.next();\n // TODO: It could happen that a service get registered with more\n // than one class. In this case a situation can arise where\n // two or more matching configuration sets exists.\n if (metricInfo.usesClassName(className)) {\n // Apply the current configuration set to this metric\n logInfo(\n \"A configuration set was found for metric with\"\n + \" object class name \" + className\n + \" and service ID \" + serviceId);\n MetricConfig configSet =\n metricConfigurations.get(className);\n \n // Execute the necessary post-registration actions\n if (configSet != null) {\n // Checks if this metric has to be automatically\n // installed upon registration\n if ((configSet.containsKey(MetricConfig.KEY_AUTOINSTALL)\n && (configSet.getString(MetricConfig.KEY_AUTOINSTALL)\n .equalsIgnoreCase(\"true\")))) {\n if (installMetric(serviceId)) {\n logInfo (\n \"The install method of metric with\"\n + \" service ID \" + serviceId\n + \" was successfully executed.\");\n }\n else {\n logError (\n \"The install method of metric with\"\n + \" service ID \" + serviceId\n + \" failed.\");\n }\n }\n }\n }\n }\n }", "private void addMetrics(Map<MetricName, KafkaMetric> kafkaMetrics) {\n Set<MetricName> metricKeys = kafkaMetrics.keySet();\n for (MetricName key : metricKeys) {\n KafkaMetric metric = kafkaMetrics.get(key);\n String metricName = getMetricName(metric.metricName());\n if (metrics.getNames().contains(metricName)) {\n metrics.remove(metricName);\n }\n metrics.register(metricName, new Gauge<Double>() {\n @Override\n public Double getValue() {\n return metric.value();\n }\n });\n }\n }", "public void collectWithoutErrors() {\r\n\t\ttry {\r\n\t\t\t// reevaluate each time to disable or reenable at runtime\r\n\t\t\tif (isNodesMonitoringDisabled()) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tcollectWithoutErrorsNow();\r\n\t\t} catch (final Throwable t) { // NOPMD\r\n\t\t\tLOG.warn(\"exception while collecting data\", t);\r\n\t\t}\r\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 }", "public static void collectMetric(String key)\n {\n if (ourToolbox != null && QuantifyToolboxUtils.getQuantifyToolbox(ourToolbox) != null)\n {\n QuantifyToolboxUtils.getQuantifyToolbox(ourToolbox).getQuantifyService().collectMetric(key);\n }\n }", "protected MetricRegistry filter(MetricRegistry metricRegistry) {\n if (!monitorAll) {\n final MetricRegistry filtered = new MetricRegistry();\n metricRegistry.getNames().stream().filter(name ->\n containsName(name, metricNames)).forEach(name ->\n filtered.register(name, metricRegistry.getMetrics().get(name)));\n return filtered;\n } else {\n return metricRegistry;\n }\n }", "public void setMetricRegistry(MetricRegistry metricRegistry) {\n this.metricRegistry = metricRegistry;\n }", "public Map<MeasurementType<L>, Offline<org.hawkular.inventory.api.model.MetricType.Blueprint>> buildMetrics(\n List<ResourceType<L>> resourceTypes) {\n\n Set<MeasurementType<L>> measTypes = new HashSet<>();\n for (ResourceType<L> resourceType : resourceTypes) {\n if (resourceType.isPersisted() == false) {\n measTypes.addAll(resourceType.getMetricTypes().stream().filter(t -> t.isPersisted() == false)\n .collect(Collectors.toList()));\n measTypes.addAll(resourceType.getAvailTypes().stream().filter(t -> t.isPersisted() == false)\n .collect(Collectors.toList()));\n }\n }\n\n Map<MeasurementType<L>, Offline<org.hawkular.inventory.api.model.MetricType.Blueprint>> retVal;\n retVal = new HashMap<>(measTypes.size());\n\n synchronized (addedIds) {\n prepareAddedIds();\n\n // we don't sync parent-child relations for types; all types are stored at root level in inventory\n for (MeasurementType<L> mt : measTypes) {\n if (!addedIds.get(IdType.METRIC_TYPE).add(mt.getID().getIDString())) {\n continue; // we already did this metric type\n }\n InventoryStructure.Builder<org.hawkular.inventory.api.model.MetricType.Blueprint> invBldr;\n org.hawkular.inventory.api.model.MetricType.Blueprint mtBP = buildMetricTypeBlueprint(mt);\n invBldr = InventoryStructure.Offline.of(mtBP);\n retVal.put(mt, invBldr.build());\n }\n }\n\n return retVal;\n }", "private void fillMonitorsMetricsMap() {\n\t\tmonitorsMetricsMap=new HashMap<>();\n\t\tmonitorsMetricsMap.put(\"RR<sub>TOT</sub>\", new String[] {rosetta.MDC_RESP_RATE.VALUE, \"MDC_DIM_RESP_PER_MIN\"});\n\t\tmonitorsMetricsMap.put(\"EtCO<sub>2</sub>\", new String[] {rosetta.MDC_AWAY_CO2_ET.VALUE, rosetta.MDC_DIM_MMHG.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PEAK</sub>\", new String[] {rosetta.MDC_PRESS_AWAY_INSP_PEAK.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"P<sub>PLAT</sub>\", new String[] {rosetta.MDC_PRESS_RESP_PLAT.VALUE, rosetta.MDC_DIM_CM_H2O.VALUE});\n\t\tmonitorsMetricsMap.put(\"PEEP\", new String[] {\"ICE_PEEP\", rosetta.MDC_DIM_CM_H2O.VALUE});\t//TODO: Confirm there is no MDC_ for PEEP\n\t\tmonitorsMetricsMap.put(\"FiO<sub>2</sub>%\", new String[] {\"ICE_FIO2\", rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\tmonitorsMetricsMap.put(\"Leak %\", new String[] {rosetta.MDC_VENT_VOL_LEAK.VALUE, rosetta.MDC_DIM_PERCENT.VALUE});\t//TODO: Confirm there is no MDC_ for FiO2\n\t\t\n\t\t//Leak %\n\t}", "private void writeMetrics() {\n if (metrics.size() > 0) {\n try {\n String payload = pickleMetrics(metrics);\n int length = payload.length();\n byte[] header = ByteBuffer.allocate(4).putInt(length).array();\n socket.getOutputStream().write(header);\n writer.write(payload);\n writer.flush();\n } catch (Exception e) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Error writing to Graphite\", e);\n } else {\n LOGGER.warn(\"Error writing to Graphite: {}\", e.getMessage());\n }\n }\n\n // if there was an error, we might miss some data. for now, drop those on the floor and\n // try to keep going.\n LOGGER.debug(\"Wrote {} metrics\", metrics.size());\n\n metrics.clear();\n }\n }", "private List<MetricConfig> getActualMetrics(HttpClient httpClient, String url) throws IOException {\n List<MetricConfig> actualMetricConfigs = Lists.newArrayList();\n url = url.replace(\"metrics\", \"metricDefinitions\");\n HttpGet request = new HttpGet(url + \"2018-01-01\");\n request.addHeader(AUTHORIZATION, BEARER + authTokenResult.getAccessToken());\n HttpResponse response = httpClient.execute(request);\n String responseBody = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n JSONObject jsonObject = new JSONObject(responseBody);\n scanJsonResponseforMetrics(jsonObject, actualMetricConfigs);\n return actualMetricConfigs;\n }", "@Override\r\n public Map<ByteArrayWrapper, MeasureAggregator[]> call() throws Exception\r\n {\n return null;\r\n }", "public Builder metrics(Collection<Metric> metrics) {\n this.metrics = metrics;\n return this;\n }", "public abstract CustomMetric[] getCustomMetrics();", "CompletableFuture<Map<String, Object>> getAccumulators();", "public void addMetric(Set<M> m){\r\n\t\tmetrics.addAll(m);\r\n\t}", "private void scan() {\n final ClassGraph classGraph = new ClassGraph();\n classGraph.enableAnnotationInfo().ignoreClassVisibility().blacklistLibOrExtJars()\n .removeTemporaryFilesAfterScan();\n if (whitelistedPackagesList.size() > 0) {\n classGraph.whitelistPackages(whitelistedPackagesList.toArray(new String[0]));\n }\n if (blacklistedPackagesList.size() > 0) {\n classGraph.blacklistPackages(blacklistedPackagesList.toArray(new String[0]));\n }\n final ScanResult scanResult = classGraph.scan();\n final ClassInfoList classInfoList = scanResult.getClassesWithAnnotation(MetricClass.class.getName());\n final Set<Class<?>> monitorClasses = new HashSet<>();\n monitorClasses.addAll(classInfoList.loadClasses(true));\n final List<CompositeData> metricClassCompositesList = new ArrayList<>();\n for (Class<?> monitorClass : monitorClasses) {\n try {\n final CompositeData metricClassComposite = new MonitorCompositeDataBuilder(monitorClass).getMetricClassData();\n metricClassCompositesList.add(metricClassComposite);\n } catch (OpenDataException ox) {\n logger.error(\"Build monitor metricaAnnotation failed: \" + monitorClass.getName());\n }\n }\n\n final int monitorCount = metricClassCompositesList.size();\n final String[] monitorKey = new String[monitorCount];\n final String[] monitorKeyDescription = new String[monitorCount];\n @SuppressWarnings(\"rawtypes\")\n final OpenType[] monitorType = new OpenType[monitorCount];\n final CompositeData[] metricClassComposites = metricClassCompositesList.toArray(new CompositeData[0]);\n for (int j = 0; j < metricClassComposites.length; j++) {\n final CompositeData metricClassComposite = metricClassComposites[j];\n monitorKey[j] = metricClassComposite.getCompositeType().getTypeName();\n monitorKeyDescription[j] = metricClassComposite.getCompositeType().getDescription();\n monitorType[j] = metricClassComposite.getCompositeType();\n }\n\n try {\n final CompositeType allMonitorCompositeType = new CompositeType(\"Monitor Metric\", \"Monitor Metric Info\", monitorKey,\n monitorKeyDescription, monitorType);\n allMonitorCompositeData = new CompositeDataSupport(allMonitorCompositeType, monitorKey, metricClassComposites);\n } catch (final OpenDataException ox) {\n logger.error(\"Creating CompositeData failed\", ox);\n }\n }", "@Override\n public void afterPropertiesSet() throws Exception {\n GuavaCacheMetrics.monitor(\n registry,\n cache,\n \"serialLookupCache\",\n Collections.singleton(Tag.of(StoreMetrics.TAG_STORE_KEY, StoreMetrics.TAG_STORE_VALUE)));\n }", "public interface MetricRegistry {\n\n /**\n * An enumeration representing the scopes of the MetricRegistry\n */\n enum Type {\n /**\n * The Application (default) scoped MetricRegistry. Any metric registered/accessed via CDI will use this\n * MetricRegistry.\n */\n APPLICATION(\"application\"),\n\n /**\n * The Base scoped MetricRegistry. This MetricRegistry will contain required metrics specified in the\n * MicroProfile Metrics specification.\n */\n BASE(\"base\"),\n\n /**\n * The Vendor scoped MetricRegistry. This MetricRegistry will contain vendor provided metrics which may vary\n * between different vendors.\n */\n VENDOR(\"vendor\");\n\n private final String name;\n\n Type(String name) {\n this.name = name;\n }\n\n /**\n * Returns the name of the MetricRegistry scope.\n *\n * @return the scope\n */\n public String getName() {\n return name;\n }\n }\n\n /**\n * Concatenates elements to form a dotted name, eliding any null values or empty strings.\n *\n * @param name\n * the first element of the name\n * @param names\n * the remaining elements of the name\n * @return {@code name} and {@code names} concatenated by periods\n */\n static String name(String name, String... names) {\n List<String> ns = new ArrayList<>();\n ns.add(name);\n ns.addAll(asList(names));\n return ns.stream().filter(part -> part != null && !part.isEmpty()).collect(joining(\".\"));\n }\n\n /**\n * Concatenates a class name and elements to form a dotted name, eliding any null values or empty strings.\n *\n * @param klass\n * the first element of the name\n * @param names\n * the remaining elements of the name\n * @return {@code klass} and {@code names} concatenated by periods\n */\n static String name(Class<?> klass, String... names) {\n return name(klass.getCanonicalName(), names);\n }\n\n /**\n * Given a {@link Metric}, registers it under a {@link MetricID} with the given name and with no tags. A\n * {@link Metadata} object will be registered with the name and type. However, if a {@link Metadata} object is\n * already registered with this metric name and is not equal to the created {@link Metadata} object then an\n * exception will be thrown.\n *\n * @param name\n * the name of the metric\n * @param metric\n * the metric\n * @param <T>\n * the type of the metric\n * @return {@code metric}\n * @throws IllegalArgumentException\n * if the name is already registered or if Metadata with different values has already been registered\n * with the name\n */\n <T extends Metric> T register(String name, T metric) throws IllegalArgumentException;\n\n /**\n * Given a {@link Metric} and {@link Metadata}, registers the metric with a {@link MetricID} with the name provided\n * by the {@link Metadata} and with no tags.\n * <p>\n * Note: If a {@link Metadata} object is already registered under this metric name and is not equal to the provided\n * {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the metadata\n * @param metric\n * the metric\n * @param <T>\n * the type of the metric\n * @return {@code metric}\n * @throws IllegalArgumentException\n * if the name is already registered or if Metadata with different values has already been registered\n * with the name\n *\n * @since 1.1\n */\n <T extends Metric> T register(Metadata metadata, T metric) throws IllegalArgumentException;\n\n /**\n * Given a {@link Metric} and {@link Metadata}, registers both under a {@link MetricID} with the name provided by\n * the {@link Metadata} and with the provided {@link Tag}s.\n * <p>\n * Note: If a {@link Metadata} object is already registered under this metric name and is not equal to the provided\n * {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the metadata\n * @param metric\n * the metric\n * @param <T>\n * the type of the metric\n * @param tags\n * the tags of the metric\n * @return {@code metric}\n * @throws IllegalArgumentException\n * if the name is already registered or if Metadata with different values has already been registered\n * with the name\n *\n * @since 2.0\n */\n <T extends Metric> T register(Metadata metadata, T metric, Tag... tags) throws IllegalArgumentException;\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID} with this name and with no tags; or create and\n * register a new {@link Counter} if none is registered.\n *\n * If a {@link Counter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link Counter}\n */\n Counter counter(String name);\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID} with this name and with the provided\n * {@link Tag}s; or create and register a new {@link Counter} if none is registered.\n *\n * If a {@link Counter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Counter}\n *\n * @since 2.0\n */\n Counter counter(String name, Tag... tags);\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID}; or create and register a new {@link Counter} if\n * none is registered.\n *\n * If a {@link Counter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link Counter}\n *\n * @since 3.0\n */\n Counter counter(MetricID metricID);\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID} with the {@link Metadata}'s name and with no\n * tags; or create and register a new {@link Counter} if none is registered. If a {@link Counter} was created, the\n * provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link Counter}\n */\n Counter counter(Metadata metadata);\n\n /**\n * Return the {@link Counter} registered under the {@link MetricID} with the {@link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register a new {@link Counter} if none is registered. If a {@link Counter}\n * was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Counter}\n *\n * @since 2.0\n */\n Counter counter(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID} with this name; or create and register a\n * new {@link ConcurrentGauge} if none is registered. If a {@link ConcurrentGauge} was created, a {@link Metadata}\n * object will be registered with the name and type.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n */\n ConcurrentGauge concurrentGauge(String name);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID} with this name and with the provided\n * {@link Tag}s; or create and register a new {@link ConcurrentGauge} if none is registered. If a\n * {@link ConcurrentGauge} was created, a {@link Metadata} object will be registered with the name and type.\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n */\n ConcurrentGauge concurrentGauge(String name, Tag... tags);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID}; or create and register a new\n * {@link ConcurrentGauge} if none is registered. If a {@link ConcurrentGauge} was created, a {@link Metadata}\n * object will be registered with the name and type.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n *\n * @since 3.0\n */\n ConcurrentGauge concurrentGauge(MetricID metricID);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID} with the {@link Metadata}'s name; or\n * create and register a new {@link ConcurrentGauge} if none is registered. If a {@link ConcurrentGauge} was\n * created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n */\n ConcurrentGauge concurrentGauge(Metadata metadata);\n\n /**\n * Return the {@link ConcurrentGauge} registered under the {@link MetricID} with the {@link Metadata}'s name and\n * with the provided {@link Tag}s; or create and register a new {@link ConcurrentGauge} if none is registered. If a\n * {@link ConcurrentGauge} was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link ConcurrentGauge}\n */\n ConcurrentGauge concurrentGauge(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link Gauge} of type {@link java.lang.Number Number} registered under the {@link MetricID} with this\n * name and with the provided {@link Tag}s; or create and register this gauge if none is registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will apply a {@link java.util.function.Function Function} to the provided object to\n * resolve a {@link java.lang.Number Number} value.\n *\n * @param <T>\n * The Type of the Object of which the function <code>func</code> is applied to\n * @param <R>\n * A {@link java.lang.Number Number}\n * @param name\n * The name of the Gauge metric\n * @param object\n * The object that the {@link java.util.function.Function Function} <code>func</code> will be applied to\n * @param func\n * The {@link java.util.function.Function Function} that will be applied to <code>object</code>\n * @param tags\n * The tags of the metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T, R extends Number> Gauge<R> gauge(String name, T object, Function<T, R> func, Tag... tags);\n\n /**\n * Return the {@link Gauge} of type {@link java.lang.Number Number} registered under the {@link MetricID}; or create\n * and register this gauge if none is registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will apply a {@link java.util.function.Function Function} to the provided object to\n * resolve a {@link java.lang.Number Number} value.\n *\n * @param <T>\n * The Type of the Object of which the function <code>func</code> is applied to\n * @param <R>\n * A {@link java.lang.Number Number}\n * @param metricID\n * The MetricID of the Gauge metric\n * @param object\n * The object that the {@link java.util.function.Function Function} <code>func</code> will be applied to\n * @param func\n * The {@link java.util.function.Function Function} that will be applied to <code>object</code>\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T, R extends Number> Gauge<R> gauge(MetricID metricID, T object, Function<T, R> func);\n\n /**\n * Return the {@link Gauge} of type {@link java.lang.Number Number} registered under the {@link MetricID} with\n * the @{link Metadata}'s name and with the provided {@link Tag}s; or create and register this gauge if none is\n * registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will apply a {@link java.util.function.Function Function} to the provided object to\n * resolve a {@link java.lang.Number Number} value.\n *\n * @param <T>\n * The Type of the Object of which the function <code>func</code> is applied to\n * @param <R>\n * A {@link java.lang.Number Number}\n * @param metadata\n * The Metadata of the Gauge\n * @param object\n * The object that the {@link java.util.function.Function Function} <code>func</code> will be applied to\n * @param func\n * The {@link java.util.function.Function Function} that will be applied to <code>object</code>\n * @param tags\n * The tags of the metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T, R extends Number> Gauge<R> gauge(Metadata metadata, T object, Function<T, R> func, Tag... tags);\n\n /**\n * Return the {@link Gauge} registered under the {@link MetricID} with this name and with the provided {@link Tag}s;\n * or create and register this gauge if none is registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will return the value that the {@link java.util.function.Supplier Supplier} will\n * provide.\n *\n * @param <T>\n * A {@link java.lang.Number Number}\n * @param name\n * The name of the Gauge\n * @param supplier\n * The {@link java.util.function.Supplier Supplier} function that will return the value for the Gauge\n * metric\n * @param tags\n * The tags of the metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T extends Number> Gauge<T> gauge(String name, Supplier<T> supplier, Tag... tags);\n\n /**\n * Return the {@link Gauge} registered under the {@link MetricID}; or create and register this gauge if none is\n * registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will return the value that the {@link java.util.function.Supplier Supplier} will\n * provide.\n *\n * @param <T>\n * A {@link java.lang.Number Number}\n * @param metricID\n * The {@link MetricID}\n * @param supplier\n * The {@link java.util.function.Supplier Supplier} function that will return the value for the Gauge\n * metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T extends Number> Gauge<T> gauge(MetricID metricID, Supplier<T> supplier);\n\n /**\n * Return the {@link Gauge} registered under the {@link MetricID} with the @{link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register this gauge if none is registered.\n *\n * If a {@link Gauge} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * The created {@link Gauge} will return the value that the {@link java.util.function.Supplier Supplier} will\n * provide.\n *\n * @param <T>\n * A {@link java.lang.Number Number}\n * @param metadata\n * The metadata of the gauge\n * @param supplier\n * The {@link java.util.function.Supplier Supplier} function that will return the value for the Gauge\n * metric\n * @param tags\n * The tags of the metric\n * @return a new or pre-existing {@link Gauge}\n *\n * @since 3.0\n */\n <T extends Number> Gauge<T> gauge(Metadata metadata, Supplier<T> supplier, Tag... tags);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID} with this name and with no tags; or create and\n * register a new {@link Histogram} if none is registered.\n *\n * If a {@link Histogram} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link Histogram}\n */\n Histogram histogram(String name);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID} with this name and with the provided\n * {@link Tag}s; or create and register a new {@link Histogram} if none is registered.\n *\n * If a {@link Histogram} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Histogram}\n *\n * @since 2.0\n */\n Histogram histogram(String name, Tag... tags);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID}; or create and register a new\n * {@link Histogram} if none is registered.\n *\n * If a {@link Histogram} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link Histogram}\n *\n * @since 3.0\n */\n Histogram histogram(MetricID metricID);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID} with the {@link Metadata}'s name and with no\n * tags; or create and register a new {@link Histogram} if none is registered. If a {@link Histogram} was created,\n * the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link Histogram}\n */\n Histogram histogram(Metadata metadata);\n\n /**\n * Return the {@link Histogram} registered under the {@link MetricID} with the {@link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register a new {@link Histogram} if none is registered. If a\n * {@link Histogram} was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Histogram}\n *\n * @since 2.0\n */\n Histogram histogram(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID} with this name and with no tags; or create and\n * register a new {@link Meter} if none is registered.\n *\n * If a {@link Meter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link Meter}\n */\n Meter meter(String name);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID} with this name and with the provided {@link Tag}s;\n * or create and register a new {@link Meter} if none is registered.\n *\n * If a {@link Meter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Meter}\n *\n * @since 2.0\n */\n Meter meter(String name, Tag... tags);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID}; or create and register a new {@link Meter} if\n * none is registered.\n *\n * If a {@link Meter} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link Meter}\n *\n * @since 3.0\n */\n Meter meter(MetricID metricID);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID} with the {@link Metadata}'s name and with no tags;\n * or create and register a new {@link Meter} if none is registered. If a {@link Meter} was created, the provided\n * {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link Meter}\n */\n Meter meter(Metadata metadata);\n\n /**\n * Return the {@link Meter} registered under the {@link MetricID} with the {@link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register a new {@link Meter} if none is registered. If a {@link Meter} was\n * created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Meter}\n *\n * @since 2.0\n */\n Meter meter(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link Timer} registered under the {@link MetricID} with this name and with no tags; or create and\n * register a new {@link Timer} if none is registered.\n *\n * If a {@link Timer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link Timer}\n */\n Timer timer(String name);\n\n /**\n * Return the {@link Timer} registered under the {@link MetricID} with this name and with the provided {@link Tag}s;\n * or create and register a new {@link Timer} if none is registered.\n *\n * If a {@link Timer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Timer}\n *\n * @since 2.0\n */\n Timer timer(String name, Tag... tags);\n\n /**\n * Return the {@link Timer} registered under the {@link MetricID}; or create and register a new {@link Timer} if\n * none is registered.\n *\n * If a {@link Timer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link Timer}\n *\n * @since 3.0\n */\n Timer timer(MetricID metricID);\n\n /**\n * Return the {@link Timer} registered under the the {@link MetricID} with the {@link Metadata}'s name and with no\n * tags; or create and register a new {@link Timer} if none is registered. If a {@link Timer} was created, the\n * provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link Timer}\n */\n Timer timer(Metadata metadata);\n\n /**\n * Return the {@link Timer} registered under the the {@link MetricID} with the {@link Metadata}'s name and with the\n * provided {@link Tag}s; or create and register a new {@link Timer} if none is registered. If a {@link Timer} was\n * created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link Timer}\n *\n * @since 2.0\n */\n Timer timer(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link SimpleTimer} registered under the {@link MetricID} with this name and with no tags; or create\n * and register a new {@link SimpleTimer} if none is registered.\n *\n * If a {@link SimpleTimer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param name\n * the name of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 2.3\n */\n SimpleTimer simpleTimer(String name);\n\n /**\n * Return the {@link SimpleTimer} registered under the {@link MetricID} with this name and with the provided\n * {@link Tag}s; or create and register a new {@link SimpleTimer} if none is registered.\n *\n * If a {@link SimpleTimer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n *\n * @param name\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 2.3\n */\n SimpleTimer simpleTimer(String name, Tag... tags);\n\n /**\n * Return the {@link SimpleTimer} registered under the {@link MetricID}; or create and register a new\n * {@link SimpleTimer} if none is registered.\n *\n * If a {@link SimpleTimer} was created, a {@link Metadata} object will be registered with the name and type. If a\n * {@link Metadata} object is already registered with this metric name then that {@link Metadata} will be used.\n *\n * @param metricID\n * the ID of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 3.0\n */\n SimpleTimer simpleTimer(MetricID metricID);\n\n /**\n * Return the {@link SimpleTimer} registered under the the {@link MetricID} with the {@link Metadata}'s name and\n * with no tags; or create and register a new {@link SimpleTimer} if none is registered. If a {@link SimpleTimer}\n * was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 2.3\n */\n SimpleTimer simpleTimer(Metadata metadata);\n\n /**\n * Return the {@link SimpleTimer} registered under the the {@link MetricID} with the {@link Metadata}'s name and\n * with the provided {@link Tag}s; or create and register a new {@link SimpleTimer} if none is registered. If a\n * {@link SimpleTimer} was created, the provided {@link Metadata} object will be registered.\n * <p>\n * Note: During retrieval or creation, if a {@link Metadata} object is already registered under this metric name and\n * is not equal to the provided {@link Metadata} object then an exception will be thrown.\n * </p>\n *\n * @param metadata\n * the name of the metric\n * @param tags\n * the tags of the metric\n * @return a new or pre-existing {@link SimpleTimer}\n *\n * @since 2.3\n */\n SimpleTimer simpleTimer(Metadata metadata, Tag... tags);\n\n /**\n * Return the {@link Metric} registered for a provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Metric} registered for the provided {@link MetricID} or {@code null} if none has been\n * registered so far\n *\n * @since 3.0\n */\n Metric getMetric(MetricID metricID);\n\n /**\n * Return the {@link Metric} registered for the provided {@link MetricID} as the provided type.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @param asType\n * the return type which is expected to be compatible with the actual type of the registered metric\n * @return the {@link Metric} registered for the provided {@link MetricID} or {@code null} if none has been\n * registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to the provided type\n *\n * @since 3.0\n */\n <T extends Metric> T getMetric(MetricID metricID, Class<T> asType);\n\n /**\n * Return the {@link Counter} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Counter} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Counter}\n *\n * @since 3.0\n */\n Counter getCounter(MetricID metricID);\n\n /**\n * Return the {@link ConcurrentGauge} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link ConcurrentGauge} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link ConcurrentGauge}\n *\n * @since 3.0\n */\n ConcurrentGauge getConcurrentGauge(MetricID metricID);\n\n /**\n * Return the {@link Gauge} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Gauge} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Gauge}\n *\n * @since 3.0\n */\n Gauge<?> getGauge(MetricID metricID);\n\n /**\n * Return the {@link Histogram} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Histogram} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Histogram}\n *\n * @since 3.0\n */\n Histogram getHistogram(MetricID metricID);\n\n /**\n * Return the {@link Meter} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Meter} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Meter}\n *\n * @since 3.0\n */\n Meter getMeter(MetricID metricID);\n\n /**\n * Return the {@link Timer} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link Timer} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link Timer}\n *\n * @since 3.0\n */\n Timer getTimer(MetricID metricID);\n\n /**\n * Return the {@link SimpleTimer} registered for the provided {@link MetricID}.\n *\n * @param metricID\n * lookup key, not {@code null}\n * @return the {@link SimpleTimer} registered for the key or {@code null} if none has been registered so far\n * @throws IllegalArgumentException\n * If the registered metric was not assignable to {@link SimpleTimer}\n *\n * @since 3.0\n */\n SimpleTimer getSimpleTimer(MetricID metricID);\n\n /**\n * Return the {@link Metadata} for the provided name.\n *\n * @param name\n * the name of the metric\n * @return the {@link Metadata} for the provided name of {@code null} if none has been registered for that name\n *\n * @since 3.0\n */\n Metadata getMetadata(String name);\n\n /**\n * Removes all metrics with the given name.\n *\n * @param name\n * the name of the metric\n * @return whether or not the metric was removed\n */\n boolean remove(String name);\n\n /**\n * Removes the metric with the given MetricID\n *\n * @param metricID\n * the MetricID of the metric\n * @return whether or not the metric was removed\n *\n * @since 2.0\n */\n boolean remove(MetricID metricID);\n\n /**\n * Removes all metrics which match the given filter.\n *\n * @param filter\n * a filter\n */\n void removeMatching(MetricFilter filter);\n\n /**\n * Returns a set of the names of all the metrics in the registry.\n *\n * @return the names of all the metrics\n */\n SortedSet<String> getNames();\n\n /**\n * Returns a set of the {@link MetricID}s of all the metrics in the registry.\n *\n * @return the MetricIDs of all the metrics\n */\n SortedSet<MetricID> getMetricIDs();\n\n /**\n * Returns a map of all the gauges in the registry and their {@link MetricID}s.\n *\n * @return all the gauges in the registry\n */\n SortedMap<MetricID, Gauge> getGauges();\n\n /**\n * Returns a map of all the gauges in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the gauges in the registry\n */\n SortedMap<MetricID, Gauge> getGauges(MetricFilter filter);\n\n /**\n * Returns a map of all the counters in the registry and their {@link MetricID}s.\n *\n * @return all the counters in the registry\n */\n SortedMap<MetricID, Counter> getCounters();\n\n /**\n * Returns a map of all the counters in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the counters in the registry\n */\n SortedMap<MetricID, Counter> getCounters(MetricFilter filter);\n\n /**\n * Returns a map of all the concurrent gauges in the registry and their {@link MetricID}s.\n *\n * @return all the concurrent gauges in the registry\n */\n SortedMap<MetricID, ConcurrentGauge> getConcurrentGauges();\n\n /**\n * Returns a map of all the concurrent gauges in the registry and their {@link MetricID}s which match the given\n * filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the concurrent gauges in the registry\n */\n SortedMap<MetricID, ConcurrentGauge> getConcurrentGauges(MetricFilter filter);\n\n /**\n * Returns a map of all the histograms in the registry and their {@link MetricID}s.\n *\n * @return all the histograms in the registry\n */\n SortedMap<MetricID, Histogram> getHistograms();\n\n /**\n * Returns a map of all the histograms in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the histograms in the registry\n */\n SortedMap<MetricID, Histogram> getHistograms(MetricFilter filter);\n\n /**\n * Returns a map of all the meters in the registry and their {@link MetricID}s.\n *\n * @return all the meters in the registry\n */\n SortedMap<MetricID, Meter> getMeters();\n\n /**\n * Returns a map of all the meters in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the meters in the registry\n */\n SortedMap<MetricID, Meter> getMeters(MetricFilter filter);\n\n /**\n * Returns a map of all the timers in the registry and their {@link MetricID}s.\n *\n * @return all the timers in the registry\n */\n SortedMap<MetricID, Timer> getTimers();\n\n /**\n * Returns a map of all the timers in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the timers in the registry\n */\n SortedMap<MetricID, Timer> getTimers(MetricFilter filter);\n\n /**\n * Returns a map of all the simple timers in the registry and their {@link MetricID}s.\n *\n * @return all the timers in the registry\n */\n SortedMap<MetricID, SimpleTimer> getSimpleTimers();\n\n /**\n * Returns a map of all the simple timers in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the timers in the registry\n */\n SortedMap<MetricID, SimpleTimer> getSimpleTimers(MetricFilter filter);\n\n /**\n * Returns a map of all the metrics in the registry and their {@link MetricID}s which match the given filter.\n *\n * @param filter\n * the metric filter to match\n * @return all the metrics in the registry\n *\n * @since 3.0\n */\n SortedMap<MetricID, Metric> getMetrics(MetricFilter filter);\n\n /**\n * Returns a map of all the metrics in the registry and their {@link MetricID}s which match the given filter and\n * which are assignable to the provided type.\n * \n * @param ofType\n * the type to which all returned metrics should be assignable\n * @param filter\n * the metric filter to match\n *\n * @return all the metrics in the registry\n *\n * @since 3.0\n */\n @SuppressWarnings(\"unchecked\")\n <T extends Metric> SortedMap<MetricID, T> getMetrics(Class<T> ofType, MetricFilter filter);\n\n /**\n * Returns a map of all the metrics in the registry and their {@link MetricID}s at query time. The only guarantee\n * about this method is that any key has a value (compared to using {@link #getMetric(MetricID)} and\n * {@link #getMetricIDs()} together).\n *\n * It is <b>only</b> intended for bulk querying, if you need a single or a few entries, always prefer\n * {@link #getMetric(MetricID)} or {@link #getMetrics(MetricFilter)}.\n *\n * @return all the metrics in the registry\n */\n Map<MetricID, Metric> getMetrics();\n\n /**\n * Returns a map of all the metadata in the registry and their names. The only guarantee about this method is that\n * any key has a value (compared to using {@link #getMetadata(String)}.\n *\n * It is <b>only</b> intended for bulk querying, if you need a single or a few metadata, always prefer\n * {@link #getMetadata(String)}}.\n *\n * @return all the metadata in the registry\n */\n Map<String, Metadata> getMetadata();\n\n /**\n * Returns the type of this metric registry.\n *\n * @return Type of this registry (VENDOR, BASE, APPLICATION)\n */\n Type getType();\n\n}", "@SuppressWarnings(\"unused\")\n @CalledByNative\n private void onMetricsCollected(long requestStartMs, long dnsStartMs, long dnsEndMs,\n long connectStartMs, long connectEndMs, long sslStartMs, long sslEndMs,\n long sendingStartMs, long sendingEndMs, long pushStartMs, long pushEndMs,\n long responseStartMs, long requestEndMs, boolean socketReused, long sentByteCount,\n long receivedByteCount) {\n synchronized (mNativeStreamLock) {\n try {\n if (mMetrics != null) {\n throw new IllegalStateException(\"Metrics collection should only happen once.\");\n }\n mMetrics = new CronetMetrics(requestStartMs, dnsStartMs, dnsEndMs, connectStartMs,\n connectEndMs, sslStartMs, sslEndMs, sendingStartMs, sendingEndMs,\n pushStartMs, pushEndMs, responseStartMs, requestEndMs, socketReused,\n sentByteCount, receivedByteCount);\n assert mReadState == mWriteState;\n assert (mReadState == State.SUCCESS) || (mReadState == State.ERROR)\n || (mReadState == State.CANCELED);\n int finishedReason;\n if (mReadState == State.SUCCESS) {\n finishedReason = RequestFinishedInfo.SUCCEEDED;\n } else if (mReadState == State.CANCELED) {\n finishedReason = RequestFinishedInfo.CANCELED;\n } else {\n finishedReason = RequestFinishedInfo.FAILED;\n }\n final RequestFinishedInfo requestFinishedInfo =\n new RequestFinishedInfoImpl(mInitialUrl, mRequestAnnotations, mMetrics,\n finishedReason, mResponseInfo, mException);\n mRequestContext.reportRequestFinished(\n requestFinishedInfo, mInflightDoneCallbackCount);\n } finally {\n mInflightDoneCallbackCount.decrement();\n }\n }\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 void collectWithoutErrorsNow() {\r\n\t\ttry {\r\n\t\t\tlastJavaInformationsList = new RemoteCallHelper(null)\r\n\t\t\t\t\t.collectJavaInformationsListByName();\r\n\r\n\t\t\t// inspired by https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/LoadStatistics.java#L197\r\n\t\t\t// but with blocked items added and so getItems() instead of getBuildableItems()\r\n\t\t\t// (getBlockedItems() is protected and unaccessible, getItems() is about 5 times longer than getBuildableItems())\r\n\t\t\tfinal Jenkins jenkins = Jenkins.getInstance();\r\n\t\t\tfinal int queueLength = jenkins.getQueue().getItems().length;\r\n\t\t\t// note: this BUILD_QUEUE_LENGTH needs values for buildQueueLength in translations*.properties of javamelody-core\r\n\t\t\tJdbcWrapper.BUILD_QUEUE_LENGTH.set(queueLength);\r\n\t\t\tfinal long waitingDurationsSum = WaitingDurationQueueListener.getWaitingDurationsSum();\r\n\t\t\tJdbcWrapper.BUILD_QUEUE_WAITING_DURATIONS_SUM.set(waitingDurationsSum);\r\n\r\n\t\t\tfinal List<JavaInformations> javaInformations = new ArrayList<>(\r\n\t\t\t\t\tgetLastJavaInformationsList().values());\r\n\t\t\tcollector.collectWithoutErrors(javaInformations);\r\n\t\t} catch (final Throwable t) { // NOPMD\r\n\t\t\tLOG.warn(\"exception while collecting data\", t);\r\n\t\t}\r\n\t}", "public void addAllMetrics(Iterable<String> values) {\n ensureMetricsIsMutable();\n AbstractMessageLite.addAll(values, this.metrics_);\n }", "@Override\n public void dump(BiConsumer<String, Object> sink) {\n sampleGauges();\n Enumeration<Collector.MetricFamilySamples> samplesFamilies = collectorRegistry.metricFamilySamples();\n while (samplesFamilies.hasMoreElements()) {\n Collector.MetricFamilySamples samples = samplesFamilies.nextElement();\n samples.samples.forEach(sample -> {\n String key = buildKeyForDump(sample);\n sink.accept(key, sample.value);\n });\n }\n }", "com.google.ads.googleads.v6.common.Metrics getMetrics();", "protected void loadReporter() {\n LOGGER.info(\"Load metric reporters, type: {}\", METRIC_CONFIG.getMetricReporterList());\n compositeReporter.clearReporter();\n if (METRIC_CONFIG.getMetricReporterList() == null) {\n return;\n }\n for (ReporterType reporterType : METRIC_CONFIG.getMetricReporterList()) {\n Reporter reporter = null;\n switch (reporterType) {\n case JMX:\n ServiceLoader<JmxReporter> reporters = ServiceLoader.load(JmxReporter.class);\n for (JmxReporter jmxReporter : reporters) {\n if (jmxReporter\n .getClass()\n .getName()\n .toLowerCase()\n .contains(METRIC_CONFIG.getMetricFrameType().name().toLowerCase())) {\n jmxReporter.setMetricManager(metricManager);\n reporter = jmxReporter;\n }\n }\n break;\n case PROMETHEUS:\n reporter = new PrometheusReporter(metricManager);\n break;\n case IOTDB:\n reporter = new IoTDBSessionReporter(metricManager);\n break;\n default:\n break;\n }\n if (reporter == null) {\n LOGGER.warn(\"Failed to load reporter which type is {}\", reporterType);\n continue;\n }\n compositeReporter.addReporter(reporter);\n }\n }", "protected XDocReportRegistry getRegistry( HttpServletRequest request )\n {\n return XDocReportRegistry.getRegistry();\n }", "private void collect() {\n\n System.out.println(\"Getting IndexReader...\");\n final IndexReader reader = index.reader();\n\n System.out.println(\"Calling forEachDocument()...\");\n index.forEachDocument(new DocTask() {\n\n int docsDone = 0;\n\n final int totalDocs = reader.maxDoc() - reader.numDeletedDocs();\n\n @Override\n public void perform(BlackLabIndex index, int docId) {\n Map<String, String> metadata = new HashMap<>();\n Document luceneDoc = index.luceneDoc(docId);\n for (IndexableField f: luceneDoc.getFields()) {\n // If this is a regular metadata field, not a control field\n if (!f.name().contains(\"#\")) {\n fieldNames.add(f.name());\n if (f.stringValue() != null)\n metadata.put(f.name(), f.stringValue());\n else if (f.numericValue() != null)\n metadata.put(f.name(), f.numericValue().toString());\n }\n }\n values.add(metadata);\n docsDone++;\n if (docsDone % 100 == 0) {\n int perc = docsDone * 100 / totalDocs;\n System.out.println(docsDone + \" docs exported (\" + perc + \"%)...\");\n }\n }\n });\n }", "void shutdown() {\n if (metricRegistry != null) {\n for (String metricName : gaugeMetricNames) {\n try {\n metricRegistry.remove(metricName);\n } catch (RuntimeException e) {\n // ignore\n }\n }\n }\n }", "public interface MetricRegistry {\n\n /**\n * Returns or creates a sub-scope of this metric registry.\n *\n * @param name Name for the sub-scope.\n * @return A possibly-new metric registry, whose metrics will be 'children' of this scope.\n */\n MetricRegistry scope(String name);\n\n /**\n * Registers a new gauge.\n *\n * @deprecated Please use registerGauge instead.\n * @param gauge Gauge to register.\n * @param <T> Number type of the gauge's values.\n */\n @Deprecated\n <T extends Number> void register(Gauge<T> gauge);\n\n /**\n * Registers a new gauge.\n *\n * @param gauge Gauge to register.\n * @param <T> Number type of the gauge's values.\n * @return the Gauge created.\n */\n <T extends Number> Gauge<T> registerGauge(Gauge<T> gauge);\n\n /**\n * Unregisters a gauge from the registry.\n *\n * @param gauge Gauge to unregister.\n * @return true if the gauge was successfully unregistered, false otherwise.\n */\n boolean unregister(Gauge<?> gauge);\n\n /**\n * Creates and returns a {@link Counter} that can be incremented.\n *\n * @param name Name to associate with the counter.\n * @return Counter (initialized to zero) to increment the value.\n */\n Counter createCounter(String name);\n\n /**\n * Creates a counter and returns an {@link Counter} that can be incremented.\n * @deprecated Please use createCounter instead.\n * @param name Name to associate with the gauge.\n * @return Counter (initialized to zero) to increment the value.\n */\n @Deprecated\n Counter registerCounter(String name);\n\n /**\n * Unregisters a counter from the registry.\n * @param counter Counter to unregister.\n * @return true if the counter was successfully unregistered, false otherwise.\n */\n boolean unregister(Counter counter);\n\n /**\n * Create a HistogramInterface (with default parameters).\n * @return the newly created histogram.\n */\n HistogramInterface createHistogram(String name);\n\n /**\n * Register an HistogramInterface into the Metrics registry.\n * Useful when you want to create custom histogram (e.g. with better precision).\n * @return the Histogram you registered for chaining purposes.\n */\n HistogramInterface registerHistogram(HistogramInterface histogram);\n\n /**\n * Unregisters an histogram from the registry.\n * @param histogram Histogram to unregister.\n * @return true if the histogram was successfully unregistered, false otherwise.\n */\n boolean unregister(HistogramInterface histogram);\n\n /**\n * Convenient method that unregister any metric (identified by its name) from the registry.\n * @param name Name of metric to unregister.\n * @return true if the metric was successfully unregistered, false otherwise.\n */\n boolean unregister(String name);\n}", "public BasicServerMetricsListener() {\n myServerMetrics = new ConcurrentHashMap<String, BasicServerMetrics>();\n }", "public Map<String, BasicServerMetrics> getServerMetrics() {\n return Collections.unmodifiableMap(myServerMetrics);\n }", "public interface MetricsFactoryService {\n\n /**\n * Load MetricsFactory implementation\n *\n * @return load a given MetricsFactory implementation\n */\n MetricsFactory load();\n}", "public GraphMetrics getMetrics()\r\n {\r\n if(metrics == null)\r\n metrics = new GraphMetrics(this);\r\n return metrics;\r\n }", "private void collectPersistedScreenshotMetadata(Map<String, ScreenshotImportMetadatas> data) {\n data.forEach((k, v) -> {\n if (!v.isNotFound()) {\n ObjectContext context = serverRuntime.newContext();\n Pkg pkg = Pkg.getByName(context, k);\n pkg.getPkgSupplement().getPkgScreenshots().forEach((ps) -> v.add(createPersistedScreenshotMetadata(ps)));\n }\n });\n }", "java.util.List<com.google.dataflow.v1beta3.MetricUpdate> getMetricsList();", "public java.util.List<ServiceRegistry> getServiceRegistries() {\n if (serviceRegistries == null) {\n serviceRegistries = new com.amazonaws.internal.SdkInternalList<ServiceRegistry>();\n }\n return serviceRegistries;\n }", "public java.util.List<ServiceRegistry> getServiceRegistries() {\n if (serviceRegistries == null) {\n serviceRegistries = new com.amazonaws.internal.SdkInternalList<ServiceRegistry>();\n }\n return serviceRegistries;\n }", "protected List<IconRecord> getIconsFromRegistry(IconRegistry iconRegistry)\n {\n return iconRegistry.getIconRecords(r -> myCollectionName.equals(r.collectionNameProperty().get()));\n }", "public static void getMemoryUsage(){\r\n MemoryMeasurement actMemoryStatus = new MemoryMeasurement();\r\n //MemoryMeasurement.printMemoryUsage(actMemoryStatus);\r\n memoryUsageList.add(actMemoryStatus);\r\n }", "public void close() {\n for (final BasicServerMetrics metrics : myServerMetrics.values()) {\n metrics.close();\n }\n myServerMetrics.clear();\n }", "private void collectCpuMemoryUsage(){\r\n\t\tHmDomain hmDomain = CacheMgmt.getInstance().getCacheDomainByName(\"home\");\r\n\t\tfloat cpuUsage = LinuxSystemInfoCollector.getInstance().getCpuInfo() * 100;\r\n\t\tfloat memoryUsage = 0;\r\n\t\ttry {\r\n\t\t\tlong count[] = LinuxSystemInfoCollector.getInstance().getMemInfo();\r\n\t\t\tif(count[0] != 0){\r\n\t\t\t\tmemoryUsage = ((float)(count[0] - count[1] - count[2] - count[3]) * 100 / count[0]);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"calculate memory usage failure.\", e);\r\n\t\t}\r\n\t\tCpuMemoryUsage cmu = new CpuMemoryUsage();\r\n\t\tcmu.setCpuUsage(cpuUsage);\r\n\t\tcmu.setMemUsage(memoryUsage);\r\n\t\tcmu.setOwner(hmDomain);\r\n\t\tcmu.setTimeStamp((new Date()).getTime());\r\n\t\ttry {\r\n\t\t\tQueryUtil.createBo(cmu);\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"create CpuMemoryUsage failure.\", e);\r\n\t\t}\r\n\t}", "private SensorData collectCPUUsageInfo() throws SigarException {\n \n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Collecting CPU Usage Information\");\n }\n SensorData data = new SensorData();\n \n CpuPerc cpuPerc = sigar.getCpuPerc();\n \n data.add(SensorAttributeConstants.CPUConstants.CPU_IDLE, (cpuPerc.getIdle() * 100));\n data.add(SensorAttributeConstants.CPUConstants.CPU_USAGE_USER, (cpuPerc.getUser() * 100));\n data.add(SensorAttributeConstants.CPUConstants.CPU_USAGE_SYSTEM, (cpuPerc.getSys() * 100));\n data.add(SensorAttributeConstants.CPUConstants.CPU_USAGE_TOTAL, (cpuPerc.getCombined() * 100));\n \n return data;\n }", "public void register(MetricRegistry registry) {\n timer = registry.timer(\"life.catalogue.parser.name\");\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 }", "private void registerCaches(){\n // Initialize region arraylist\n prisoners = new HashMap<>();\n regions = QueryManager.getRegions();\n prisonBlocks = QueryManager.getPrisonBlocks();\n portals = QueryManager.getPortals();\n }", "static private void populateCache() {\n if (cacheIsPopulated) {\n return;\n }\n cacheIsPopulated = true;\n\n /* Schema:\n *\n * units{\n * duration{\n * day{\n * one{\"{0} ден\"}\n * other{\"{0} дена\"}\n * }\n */\n\n // Load the unit types. Use English, since we know that that is a superset.\n ICUResourceBundle rb1 = (ICUResourceBundle) UResourceBundle.getBundleInstance(\n ICUData.ICU_UNIT_BASE_NAME,\n \"en\");\n rb1.getAllItemsWithFallback(\"units\", new MeasureUnitSink());\n\n // Load the currencies\n ICUResourceBundle rb2 = (ICUResourceBundle) UResourceBundle.getBundleInstance(\n ICUData.ICU_BASE_NAME,\n \"currencyNumericCodes\",\n ICUResourceBundle.ICU_DATA_CLASS_LOADER);\n rb2.getAllItemsWithFallback(\"codeMap\", new CurrencyNumericCodeSink());\n }", "@After\n public void clearMeters() {\n Search.in(registry)\n .name(name -> name.startsWith(\"org.drools.metric\"))\n .meters()\n .forEach(registry::remove);\n MicrometerUtils.INSTANCE.clear();\n registry = null;\n }", "Metrics(int numMetrics)\n {\n maxMetrics = numMetrics;\n encodedMetrics = new long[maxMetrics];\n decodedMetrics = new long[maxMetrics];\n }", "@RequestMapping(\"kpis\")\n public ApplicationMetricsDto buildServiceMetrics() {\n return this.applicationMetricsService.buildMetrics();\n }", "@Override\n public void cleanup(Context context) throws IOException, InterruptedException {\n for (List<DataTypeHandler<K1>> handlers : typeMap.values()) {\n for (DataTypeHandler<K1> h : handlers)\n if (h.getMetadata() != null) {\n try {\n contextWriter.write(h.getMetadata().getBulkMetadata(), context);\n } finally {\n contextWriter.commit(context);\n }\n }\n }\n\n // dump any unflushed metrics\n if (metricsEnabled) {\n metricsService.close();\n }\n\n // cleanup the context writer\n contextWriter.cleanup(context);\n\n for (List<DataTypeHandler<K1>> handlers : typeMap.values()) {\n for (DataTypeHandler<K1> h : handlers)\n h.close(context);\n }\n typeMap.clear();\n\n // Add the counters from the standalone reporter to this context.\n Counters counters = reporter.getCounters();\n for (CounterGroup cg : counters) {\n for (Counter c : cg) {\n getCounter(context, cg.getName(), c.getName()).increment(c.getValue());\n }\n }\n\n super.cleanup(context);\n\n // we pushed the filename on the NDC if split is non null, so pop it here.\n if (null != split) {\n NDC.pop();\n }\n }", "public static void registerMeters(StormMetricsRegistry registry) {\n \n registry.registerMeter(NUM_FILE_OPEN_EXCEPTIONS);\n registry.registerMeter(NUM_FILE_READ_EXCEPTIONS);\n registry.registerMeter(NUM_FILE_REMOVAL_EXCEPTIONS);\n registry.registerMeter(NUM_FILE_DOWNLOAD_EXCEPTIONS);\n registry.registerMeter(NUM_SET_PERMISSION_EXCEPTIONS);\n registry.registerMeter(NUM_CLEANUP_EXCEPTIONS);\n registry.registerMeter(NUM_READ_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_READ_DAEMON_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_LIST_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_LIST_DUMP_EXCEPTIONS);\n registry.registerMeter(NUM_DOWNLOAD_DUMP_EXCEPTIONS);\n registry.registerMeter(NUM_DOWNLOAD_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_DOWNLOAD_DAEMON_LOG_EXCEPTIONS);\n registry.registerMeter(NUM_SEARCH_EXCEPTIONS);\n }", "public Registry() {\n loadItems();\n }", "java.util.Map<java.lang.String, java.lang.Long> getHdfsMetricsMap();", "com.bingo.server.msg.REQ.RegistryRequest getRegistry();", "private DataCollector getDataCollector(String name) {\n DataCollector dataCollector = collectors.get(name);\n if (dataCollector == null) {\n dataCollector = new DataCollector();\n }\n return dataCollector;\n }", "java.util.List<com.google.api.MetricDescriptor> getMetricDescriptorsList();", "protected abstract Collection<Cache> loadCaches();", "InstallerRegistry() {\n this.lookup = Lookups.forPath(INSTALLER_REGISTRY_FOLDER);\n this.platformInstalls = null;\n }", "@Override\n public void bindTo(final MeterRegistry registry) {\n final Supplier<PoolStats> stats = memoizeWithExpiration(manager::getTotalStats, 1, MINUTES);\n\n gauge(registry, \"available\", stats, PoolStats::getAvailable);\n gauge(registry, \"leased\", stats, PoolStats::getLeased);\n gauge(registry, \"max\", stats, PoolStats::getMax);\n gauge(registry, \"pending\", stats, PoolStats::getPending);\n }", "Registry getRegistry();", "Registry getRegistry();", "protected ILevelBasedRegistry() {\n this.internalRegistry = new ConcurrentHashMap<>();\n }", "private Set<MachineMetric> customMachineMetrics() {\n Set<MachineMetric> customized = new HashSet<MachineMetric>();\n for (MetricType m: AwsSdkMetrics.getPredefinedMetrics()) {\n if (m instanceof MachineMetric)\n customized.add((MachineMetric)m);\n }\n return customized;\n }", "public ReportRunner() \n\t{\n\t\treports = new HashMap<String, Report>();\n\t\tresults =Collections.synchronizedMap(new HashMap<String, ArrayList<String[]>>());\n\t}", "public CacheMetricsSnapshot(CacheMetrics m) {\n reads = m.getCacheGets();\n puts = m.getCachePuts();\n hits = m.getCacheHits();\n misses = m.getCacheMisses();\n txCommits = m.getCacheTxCommits();\n txRollbacks = m.getCacheTxRollbacks();\n evicts = m.getCacheEvictions();\n removes = m.getCacheRemovals();\n\n putAvgTimeNanos = m.getAveragePutTime();\n getAvgTimeNanos = m.getAverageGetTime();\n removeAvgTimeNanos = m.getAverageRemoveTime();\n commitAvgTimeNanos = m.getAverageTxCommitTime();\n rollbackAvgTimeNanos = m.getAverageTxRollbackTime();\n\n cacheName = m.name();\n overflowSize = m.getOverflowSize();\n offHeapEntriesCount = m.getOffHeapEntriesCount();\n offHeapAllocatedSize = m.getOffHeapAllocatedSize();\n size = m.getSize();\n keySize = m.getKeySize();\n isEmpty = m.isEmpty();\n dhtEvictQueueCurrentSize = m.getDhtEvictQueueCurrentSize();\n txThreadMapSize = m.getTxThreadMapSize();\n txXidMapSize = m.getTxXidMapSize();\n txCommitQueueSize = m.getTxCommitQueueSize();\n txPrepareQueueSize = m.getTxPrepareQueueSize();\n txStartVersionCountsSize = m.getTxStartVersionCountsSize();\n txCommittedVersionsSize = m.getTxCommittedVersionsSize();\n txRolledbackVersionsSize = m.getTxRolledbackVersionsSize();\n txDhtThreadMapSize = m.getTxDhtThreadMapSize();\n txDhtXidMapSize = m.getTxDhtXidMapSize();\n txDhtCommitQueueSize = m.getTxDhtCommitQueueSize();\n txDhtPrepareQueueSize = m.getTxDhtPrepareQueueSize();\n txDhtStartVersionCountsSize = m.getTxDhtStartVersionCountsSize();\n txDhtCommittedVersionsSize = m.getTxDhtCommittedVersionsSize();\n txDhtRolledbackVersionsSize = m.getTxDhtRolledbackVersionsSize();\n isWriteBehindEnabled = m.isWriteBehindEnabled();\n writeBehindFlushSize = m.getWriteBehindFlushSize();\n writeBehindFlushThreadCount = m.getWriteBehindFlushThreadCount();\n writeBehindFlushFrequency = m.getWriteBehindFlushFrequency();\n writeBehindStoreBatchSize = m.getWriteBehindStoreBatchSize();\n writeBehindTotalCriticalOverflowCount = m.getWriteBehindTotalCriticalOverflowCount();\n writeBehindCriticalOverflowCount = m.getWriteBehindCriticalOverflowCount();\n writeBehindErrorRetryCount = m.getWriteBehindErrorRetryCount();\n writeBehindBufferSize = m.getWriteBehindBufferSize();\n\n keyType = m.getKeyType();\n valueType = m.getValueType();\n isStoreByValue = m.isStoreByValue();\n isStatisticsEnabled = m.isStatisticsEnabled();\n isManagementEnabled = m.isManagementEnabled();\n isReadThrough = m.isReadThrough();\n isWriteThrough = m.isWriteThrough();\n }", "protected abstract RegistryStorage storage();", "public synchronized void clear() {\n collected.clear();\n }", "private void addMetrics(List<MetricDatum> list,\n MetricValues metricValues,\n StandardUnit unit) {\n List<MachineMetric> machineMetrics = metricValues.getMetrics();\n List<Long> values = metricValues.getValues();\n for (int i=0; i < machineMetrics.size(); i++) {\n MachineMetric metric = machineMetrics.get(i);\n long val = values.get(i).longValue();\n // skip zero values in some cases\n if (val != 0 || metric.includeZeroValue()) {\n MetricDatum datum = new MetricDatum()\n .withMetricName(metric.getMetricName())\n .withDimensions(\n new Dimension()\n .withName(metric.getDimensionName())\n .withValue(metric.name()))\n .withUnit(unit)\n .withValue((double) val)\n ;\n list.add(datum);\n }\n }\n }", "@Override\n public void configureReporters(MetricRegistry metricRegistry) {\n\n\n registerReporter(ConsoleReporter\n .forRegistry(metricRegistry)\n .outputTo(System.out)\n .filter(MetricFilter.ALL)\n .build())\n .start(300, TimeUnit.SECONDS);\n\n }", "public Collection<IRequestHandler<?>> getRegisteredValues() {\n return registry.values();\n }", "@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"servicio gestor arrancado\");\n\t\tmemoria = new HashMap<String, List<Trino>>();\n\t}", "public Collection viewMemoryContents()\n {\n Collection<MemoryFrame> frameCollection = frames.values();\n return frameCollection;\n }", "Map<String, ClientMetrics> getClientMetrics();", "@Override\n public Metrics getMetrics() {\n throw new UnsupportedOperationException(\"Metrics are not not supported in Spark yet\");\n }", "private List<Measurer> getMeasurers(String genomeId) {\n List<Measurer> retVal = new ArrayList<Measurer>(this.methods.size());\n Genome genome = this.getGenome(genomeId);\n this.genomeName1 = genome.getName();\n this.taxAnalysis1 = this.taxMethod.new Analysis(genome);\n for (var method : this.methods) {\n var measurer = method.getMeasurer(genome);\n retVal.add(measurer);\n }\n return retVal;\n }", "public static void readMemory() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd_MM_yyyy_hh_mm\");\n\n\t\t//getting the running container's id\n\t\tHashMap<String,String> hMap = ContainerUtil.getActiveContainers();\n\n\t\t//getting the process IDs for the running conteiners\n\t\tFile[] directories = new File(\"/proc\").listFiles(File::isDirectory);\n\n\t\tfor(Map.Entry<String,String> entry : hMap.entrySet()){\n\n\t\t\t//getting start time of mem copy\n\t\t\tDate startDate = new Date();\n\n\t\t\t//pausing the container to get its memory\n\t\t\tContainerUtil.pauseContainer( entry.getKey() );\n\n\t\t\tfor(File dir : directories) {\n\n\t\t\t\tif(NumberUtils.isNumber(dir.getName())){\n\t\t\t\t\n\t\t\t\t\tString filename = \"/proc/\" + dir.getName() + \"/cgroup\";\n\n\t\t\t\t\t//finding the cgroup file for the containerId\t\t\t\t\t\n\t\t\t\t\ttry(Stream<String> stream = Files.lines(Paths.get(filename))){\n\n\t\t\t\t\t\tif(stream.filter(line -> line.indexOf(entry.getKey()) > 0 ).findFirst().isPresent()){\n\t\t\t\t\t\t\t//change this point to save file to a mapped directory\n\t\t\t\t\t\t\tString outFile = \"./\" +\tentry.getKey() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tentry.getValue() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tdir.getName() + \"-\" + \n\t\t\t\t\t\t\t\t\t\tdateFormat.format(new Date()) + \".mem\";\n\n\t\t\t\t\t\t\tString fileSource = \"/proc/\" + dir.getName() + \"/numa_maps\";\n\n\t\t\t\t\t\t\t//writing memory to file\n\t\t\t\t\t\t\twriteMemToFile(outFile, fileSource);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (IOException e){\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//unpausing the container after memory collection\n\t\t\tContainerUtil.unpauseContainer( entry.getKey() );\n\n\t\t\t//calculating total time for mem copy\n\t\t\tlong seconds = (new Date().getTime() - startDate.getTime());\n\t\t\tSystem.out.println(\" copy time: \" + seconds);\n\t\t}\n\t}" ]
[ "0.6809611", "0.63840884", "0.63048244", "0.6109271", "0.61034054", "0.603595", "0.59398067", "0.5885361", "0.56975496", "0.5651527", "0.55542064", "0.55211353", "0.54675364", "0.5433385", "0.5390601", "0.5367973", "0.5286175", "0.5268636", "0.5256654", "0.5240666", "0.5219531", "0.5162274", "0.5157547", "0.512897", "0.5128962", "0.5122502", "0.5120374", "0.5115158", "0.5113462", "0.50942856", "0.50800973", "0.5061597", "0.5043531", "0.50329274", "0.5025916", "0.502523", "0.5010553", "0.49985215", "0.49896705", "0.49789384", "0.49702224", "0.49651513", "0.496502", "0.49538863", "0.49461767", "0.49432623", "0.4939854", "0.49339554", "0.49290523", "0.49016547", "0.48939452", "0.4889219", "0.4887487", "0.48765796", "0.48724514", "0.48676267", "0.48645303", "0.48609626", "0.485794", "0.48546943", "0.48546943", "0.48355722", "0.4834324", "0.4820908", "0.48196325", "0.480714", "0.47960225", "0.4790345", "0.47884345", "0.47871193", "0.47827402", "0.47812057", "0.47724298", "0.47708455", "0.4759589", "0.47591543", "0.47452113", "0.4743309", "0.47406885", "0.47175893", "0.47168368", "0.47122177", "0.47086367", "0.47079864", "0.47079864", "0.47028875", "0.4680444", "0.46798122", "0.46678603", "0.46642855", "0.46534365", "0.46492833", "0.46447882", "0.46354988", "0.4628781", "0.46285054", "0.4623552", "0.4612933", "0.46029875", "0.45944726" ]
0.6892535
0
When the folder changes, set the selected resource to the new folder.
private void onFolderChange(FolderChangeEvent event) { this.currentResource = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void changeFolder(Folder newFolder, AjaxRequestTarget target) {\n\t\tcurrentFolder = newFolder;\n\t\tcurrentResource = null;\n\t\tsend(getPage(), Broadcast.BREADTH, new FolderChangeEvent(target));\n\t}", "@Override\n public void folderChanged(IProject project, ResourceFolder folder, int eventType) {\n }", "@Override\n public void onFolderSelected(String absolutePath) {\n PdfViewCtrlSettingsManager.updateLocalFolderPath(this, absolutePath);\n // Update last-used local folder tree to the same path\n PdfViewCtrlSettingsManager.updateLocalFolderTree(this, absolutePath);\n\n if (mNavigationDrawerView != null && mNavigationDrawerView.getMenu() != null) {\n MenuItem menuItem = mNavigationDrawerView.getMenu().findItem(R.id.item_folder_list);\n selectNavigationItem(menuItem);\n }\n }", "public void refresh() {\r\n TreePath p = this.getSelectionPath();\r\n model = new FolderTreeModel();\r\n this.setModel(model);\r\n }", "public void newFolderButtonClicked() {\n TreePath[] paths = _fileSystemTree.getSelectionPaths();\r\n List selection = getSelectedFolders(paths);\r\n if (selection.size() > 1 || selection.size() == 0)\r\n return; // should never happen\r\n \r\n File parent = (File) selection.get(0);\r\n \r\n final ResourceBundle resourceBundle = FolderChooserResource.getResourceBundle(Locale.getDefault());\r\n String folderName = JOptionPane.showInputDialog(_folderChooser, resourceBundle.getString(\"FolderChooser.new.folderName\"),\r\n resourceBundle.getString(\"FolderChooser.new.title\"), JOptionPane.OK_CANCEL_OPTION | JOptionPane.QUESTION_MESSAGE);\r\n \r\n if (folderName != null) {\r\n File newFolder = new File(parent, folderName);\r\n boolean success = newFolder.mkdir();\r\n \r\n TreePath parentPath = paths[0];\r\n boolean isExpanded = _fileSystemTree.isExpanded(parentPath);\r\n if (!isExpanded) { // expand it first\r\n _fileSystemTree.expandPath(parentPath);\r\n }\r\n \r\n LazyMutableTreeNode parentTreeNode = (LazyMutableTreeNode) parentPath.getLastPathComponent();\r\n BasicFileSystemTreeNode child = BasicFileSystemTreeNode.createFileSystemTreeNode(newFolder, _folderChooser);\r\n // child.setParent(parentTreeNode);\r\n if (success) {\r\n parentTreeNode.clear();\r\n int insertIndex = _fileSystemTree.getModel().getIndexOfChild(parentTreeNode, child);\r\n if (insertIndex != -1) {\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).insertNodeInto(child, parentTreeNode, insertIndex);\r\n ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).nodeStructureChanged(parentTreeNode);\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).addPath(parentPath, insertIndex, child);\r\n }\r\n }\r\n TreePath newPath = parentPath.pathByAddingChild(child);\r\n _fileSystemTree.setSelectionPath(newPath);\r\n _fileSystemTree.scrollPathToVisible(newPath);\r\n }\r\n }", "private void selectedFolderMovedFromNavTree(Folder selectedFolder, Folder destinationFolder) {\n Folder parentFolder = view.getParentFolder(selectedFolder);\n\n if (DiskResourceUtil.isDescendantOfFolder(parentFolder, destinationFolder)) {\n // The destination is under the parent, so if we prune the parent and set the destination\n // as the selected folder, the parent will lazy-load down to the destination.\n view.removeChildren(parentFolder);\n } else if (DiskResourceUtil.isDescendantOfFolder(destinationFolder, parentFolder)) {\n // The parent is under the destination, so we only need to view the destination folder's\n // contents and refresh its children.\n presenter.doRefreshFolder(destinationFolder);\n } else {\n // Refresh the parent folder since it has lost a child.\n presenter.doRefreshFolder(parentFolder);\n // Refresh the destination folder since it has gained a child.\n presenter.doRefreshFolder(destinationFolder);\n }\n\n // View the destination folder's contents.\n presenter.setSelectedFolderByPath(destinationFolder);\n }", "public void moveTo(Folder targetFolder) {\n if (targetFolder != this.parent) {\n Path sourcePath = this.toPath();\n this.parent.getValue().remove(this);\n String newName = this.newName(targetFolder);\n\n Path targetPath = new File(targetFolder.getPath() + File.separator + newName).toPath();\n\n try {\n Files.move(sourcePath, targetPath);\n } catch (IOException e) {\n }\n\n this.name = newName;\n targetFolder.addImage(this);\n }\n }", "@Override\r\n\tprotected void directorySelectionChangedDirectly() {\n\r\n\t}", "Update withFolderPath(String folderPath);", "public void selectionChanged(IWorkbenchPart part, ISelection selection) {\n Assert.isTrue(part instanceof OverrideTestsView);\n this.overrideTestsView = (OverrideTestsView) part;\n Assert.isTrue(selection instanceof OverrideTestsSelection);\n Element element = ((OverrideTestsSelection) selection).getElement();\n IOverrideTestsTabFolder newFolder = null;\n if (element == null) {\n newFolder = emptyFolder;\n } else {\n for (int i = 0; i < folders.length; i++) {\n if (folders[i].appliesTo(element)) {\n newFolder = folders[i];\n break;\n }\n }\n }\n Assert.isTrue(newFolder != null);\n if (newFolder != activeFolder) {\n if (activeFolder != null) {\n activeFolder.removeItemSelectionListener(this);\n activeFolder.dispose();\n }\n activeFolder = newFolder;\n newFolder.createControls(composite);\n composite.layout(true);\n activeFolder.addItemSelectionListener(this);\n }\n if (element != null) {\n activeFolder.selectionChanged(element);\n }\n }", "@FXML\n private void chooseNewDirEvent() throws IOException {\n DirectoryChooser chooser = new DirectoryChooser();\n chooser.setTitle(\"Choose Home Directory\");\n Stage curStage = (Stage) rootPane.getScene().getWindow();\n File selectedDirectory = chooser.showDialog(curStage);\n if (selectedDirectory != null) {\n model.User.setRootDir(selectedDirectory);\n model.DirectoryManager.set(selectedDirectory);\n model.User.setGalleryPhotos(model.DirectoryManager.getTree().getDir().getPhotos());\n fadeOutEvent();\n } else {\n curStage.show();\n }\n }", "@Override\n\tpublic void init(IWorkbench workbench, IStructuredSelection selection) {\n\t\tif(selection.getFirstElement() instanceof IFolder \n\t\t && ((IFolder)selection.getFirstElement()).getName().equals(\"states\"))\n\t\t{\n\t\t\tthis.targetFolder = (IFolder)selection.getFirstElement();\n\t\t} else {\n\t\t\tthis.performCancel();\n\t\t\tMessageDialog.\n\t\t\t\topenError(getShell(), \n\t\t\t\t\t\t \"Wrong Selection\", \"State machines can only be created in a package named 'states'\");\n\t\t}\n\t}", "void resourceChanged(IPath workspacePath);", "private void onWsFolderPathUpdated() {\n if (mInternalWsFolderPathUpdate) {\n return;\n }\n\n String wsFolderPath = mWsFolderPathTextField.getText();\n\n // This is a custom path, we need to sanitize it.\n // First it should start with \"/res/\". Then we need to make sure there are no\n // relative paths, things like \"../\" or \"./\" or even \"//\".\n wsFolderPath = wsFolderPath.replaceAll(\"/+\\\\.\\\\./+|/+\\\\./+|//+|\\\\\\\\+|^/+\", \"/\"); //$NON-NLS-1$ //$NON-NLS-2$\n wsFolderPath = wsFolderPath.replaceAll(\"^\\\\.\\\\./+|^\\\\./+\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\n wsFolderPath = wsFolderPath.replaceAll(\"/+\\\\.\\\\.$|/+\\\\.$|/+$\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\n\n ArrayList<TypeInfo> matches = new ArrayList<TypeInfo>();\n\n // We get \"res/foo\" from selections relative to the project when we want a \"/res/foo\" path.\n if (wsFolderPath.startsWith(RES_FOLDER_REL)) {\n wsFolderPath = RES_FOLDER_ABS + wsFolderPath.substring(RES_FOLDER_REL.length());\n\n mInternalWsFolderPathUpdate = true;\n mWsFolderPathTextField.setText(wsFolderPath);\n mInternalWsFolderPathUpdate = false;\n }\n\n if (wsFolderPath.startsWith(RES_FOLDER_ABS)) {\n wsFolderPath = wsFolderPath.substring(RES_FOLDER_ABS.length());\n\n int pos = wsFolderPath.indexOf(AndroidConstants.WS_SEP_CHAR);\n if (pos >= 0) {\n wsFolderPath = wsFolderPath.substring(0, pos);\n }\n\n String[] folderSegments = wsFolderPath.split(FolderConfiguration.QUALIFIER_SEP);\n\n if (folderSegments.length > 0) {\n String folderName = folderSegments[0];\n\n // update config selector\n mInternalConfigSelectorUpdate = true;\n mConfigSelector.setConfiguration(folderSegments);\n mInternalConfigSelectorUpdate = false;\n\n boolean selected = false;\n for (TypeInfo type : sTypes) {\n if (type.getResFolderName().equals(folderName)) {\n matches.add(type);\n selected |= type.getWidget().getSelection();\n }\n }\n\n if (matches.size() == 1) {\n // If there's only one match, select it if it's not already selected\n if (!selected) {\n selectType(matches.get(0));\n }\n } else if (matches.size() > 1) {\n // There are multiple type candidates for this folder. This can happen\n // for /res/xml for example. Check to see if one of them is currently\n // selected. If yes, leave the selection unchanged. If not, deselect all type.\n if (!selected) {\n selectType(null);\n }\n } else {\n // Nothing valid was selected.\n selectType(null);\n }\n }\n }\n\n validatePage();\n }", "@Override\r\n public void saveFolder(Folder folder) {\n this.folderRepository.save(folder);\r\n }", "public void doUpdate() {\n fileChooser.setCurrentDirectory(new File(getPath()));\n fileChooser.rescanCurrentDirectory();\n }", "private String setFolderPath(int selection) {\n\t\tString directory = \"\";\n\t\tswitch (selection) {\n\t\tcase 1:\n\t\t\tdirectory = \"\\\\art\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tdirectory = \"\\\\mikons_1\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tdirectory = \"\\\\mikons_2\";\n\t\t\tbreak;\n\t\t}\n\t\treturn directory;\n\t}", "private void prepareFolder(String name, String newFolderName) {\n }", "private void selectFolderBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selectFolderBtnMouseClicked\n if (workingDirectory == null)\n {\n workingDirectory = new File(\".\");\n }\n JFileChooser selectFolderUI = new JFileChooser();\n selectFolderUI.setCurrentDirectory(workingDirectory);\n selectFolderUI.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n int response = selectFolderUI.showOpenDialog(mainUI.this);\n if (response == JFileChooser.APPROVE_OPTION)\n {\n ArrayList<FileItem> fileList = new ArrayList<>();\n workingDirectory = selectFolderUI.getSelectedFile();\n ArrayList<File> files = \n new ArrayList<>(Arrays.asList(workingDirectory.listFiles()));\n \n for (File f : files)\n {\n if (!f.isDirectory())\n {\n FileItem fi = null;\n try {\n fi = new FileItem(f);\n } catch (IOException ex) {\n Logger.getLogger(mainUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n fileList.add(fi);\n }\n }\n \n CSPB.testFiles = fileList;\n mainUI.this.refresh();\n } \n }", "@Override\n public void onPostFolderOpened(DocumentFile oldFolder, DocumentFile newFolder) {\n getList().scrollToPosition(0);\n buildBreadcrumbs(newFolder);\n setBackButtonHandlerEnabled(folderPathView.getBreadcrumbCount() > 1);\n getListAdapter().setInitiallySelectedItems(getContext()); // adapter needs to be populated for this to work.\n updateListOfFileExtensionsForAllVisibleFiles(getListAdapter().getFileExtsAndMimesInCurrentFolder());\n\n SortedSet<String> allFilters = getViewPrefs().getVisibleFileTypes();\n if(allFilters == null) {\n allFilters = new TreeSet<>();\n }\n allFilters.addAll(getViewPrefs().getFileTypesForVisibleMimes());\n allFilters.addAll(getViewPrefs().getAcceptableFileExts(getListAdapter().getFileExtsAndMimesInCurrentFolder()));\n\n getViewPrefs().getFileTypesForVisibleMimes();\n// fileExtFilters.setShowInactiveFilters(false);\n fileExtFilters.setAllFilters(allFilters);\n fileExtFilters.setActiveFilters(getListAdapter().getFileExtsInCurrentFolder());\n fileExtFilters.selectAll(true);\n }", "public void resourcesLocation (String folder) {\n staticFileFolder = folder.startsWith (\"/\")? folder.substring (1) : folder;\n }", "private void addFolder(){\n }", "private void handleFolderOpen(Event event) {\n\t\tWidget widget = event.item;\n\t\tif (!(widget instanceof TreeItem))\n\t\t\treturn;\n\t\tTreeItem item = (TreeItem) widget;\n\t\titem.setImage(SWTUtil.getImage(\"folderopen.gif\"));\n\t}", "public static void start_write_action_from_ui_thread_and_refresh_folder_sync(VirtualFile folder) {\r\n start_write_action_from_ui_thread_and_refresh_folder(folder);\r\n }", "private static void start_write_action_from_ui_thread_and_refresh_folder(final VirtualFile folder) {\r\n // com.intellij.openapi.vfs.VirtualFile\r\n // public void refresh(boolean asynchronous, boolean recursive) ...\r\n // This method should be only called within write-action.\r\n ApplicationManager.getApplication().runWriteAction(new Runnable() {\r\n @Override\r\n public void run() {\r\n try {\r\n folder.refresh(/*asynchronous*/ false, /*recursive*/ true);\r\n } catch (Throwable e) {\r\n e.printStackTrace();\r\n throw new RuntimeException(e);\r\n }\r\n }\r\n });\r\n }", "private void selectResource() {\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n IWorkspaceRoot root = workspace.getRoot();\n FilteredResourcesSelectionDialog dialog = new FilteredResourcesSelectionDialog(getShell(),\n false, root, IResource.FILE);\n dialog.setTitle(\"Select a resource to launch\");\n dialog.setInitialPattern(\"*.app\", FilteredItemsSelectionDialog.FULL_SELECTION);\n IPath path = new Path(getResourcePath());\n if (workspace.validatePath(path.toString(), IResource.FILE).isOK()) {\n IFile file = root.getFile(path);\n if (file != null && file.exists()) {\n dialog.setInitialSelections(new Object[] {path});\n }\n }\n dialog.open();\n Object[] results = dialog.getResult();\n if ((results != null) && (results.length > 0) && (results[0] instanceof IFile)) {\n setResourcePath(((IFile) results[0]).getFullPath());\n }\n }", "public void setWorkspace(File folder) {\n if (folder == null) {\n root.removeAllChildren();\n return;\n }\n\n storage = Paths.get(folder.getAbsolutePath(), getStorageFilename());\n try {\n // create the file if it doesn't exist.\n Files.createFile(storage);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n List<String> lines = Files.readAllLines(storage);\n parseStorage(lines);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void newFolder ()\n {\n newNode(null);\n }", "@Override\n\tpublic void setParrentFolder(String parrentFolder) {\n\t\t\n\t}", "public void changeFolder(String folderName) throws MailboxFolderException {\n\n try {\n\n if(Constants.LEERSTRING.equals(folderName)) {\n\n this.folder = this.store.getDefaultFolder();\n }\n else {\n\n this.folder = this.store.getFolder(folderName);\n }\n\n if(this.folder == null) {\n\n throw(new MailboxFolderException((\"Invalid folder: \" + folderName),\n null));\n }\n }\n catch(MessagingException me) {\n\n throw(new MailboxFolderException((\"Probleme mit Folder: \" + folderName),\n me, folderName));\n }\n }", "public void changePath(String newPath){\n this.path=newPath;\n }", "public void updateFolder(Folder folder) {\n Validate.notNull(folder.getId(), \"id cannot be null\");\n String path = StringUtils.replaceOnce(FOLDERS_ITEM_PATH, PLACEHOLDER, folder.getId().toString());\n client.post(path, String.class, folder);\n }", "private void renameDirectory() {\n ProjectDirectory dir = (ProjectDirectory) viewer.getSelectedNode();\n String oldName = dir.toFile().getName();\n String newName = (String)\n JOptionPane.showInputDialog(\n viewer,\n \"Enter the new name of the directory:\",\n \"Rename directory\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n oldName\n );\n \n if (newName != null && !oldName.equals(newName)) {\n if (!dir.changeName(newName)) {\n JOptionPane.showMessageDialog(\n viewer,\n \"Could not rename selected file!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE\n );\n } else {\n viewer.refresh();\n }\n }\n \n }", "public void updateLabtainersPath(){\n labsPath = new File(labtainerPath + File.separator + \"labs\");\n labChooser.setCurrentDirectory(labsPath); \n }", "public void setParent(TaskFolder parent)\n {\n super.setParent(parent);\n if (parent != null) parent.addFolder(this);\n }", "private void setCategoryPath(Enum enummDt, String newCategoryPath) throws Exception {\n\t\tint txID = program.startTransaction(\"Test Create Enum\");\n\t\ttry {\n\t\t\tenummDt.setCategoryPath(new CategoryPath(newCategoryPath));\n\t\t}\n\t\tfinally {\n\t\t\tprogram.endTransaction(txID, true);\n\t\t}\n\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\t}", "@FXML\n public void onRename(ActionEvent event) {\n try {\n folders.update(oldName.getText(), newName.getText());\n stage.close();\n tree.displayTree();\n } catch (SQLException ex) {\n errorRename.setText(ex.getMessage());\n }\n }", "@Override\n public void onRequestRejected(final Request request)\n throws CvqException, CvqInvalidTransitionException,\n CvqObjectNotFoundException {\n restoreOriginalHomeFolder((HomeFolderModificationRequest) request);\n }", "public void setRootFolder(String folder) {\n m_RootFolder = folder;\n }", "@Override\n public void onFileUploaded(FolderNode folderNode, FileNode fileNode) {\n choices.selectValue(fileNode.getName());\n closeAdditionalChoiceDialog(true);\n }", "public static void setComponentFolder(String folder) {\n\t\tcomponentFolder = folder;\n\t\tif (folder.endsWith(FOLDER_STR) == false) {\n\t\t\tcomponentFolder += FOLDER_CHAR;\n\t\t}\n\t\tTracer.trace(\"component folder set to \" + componentFolder);\n\t}", "private void changeDirectory()\n {\n directory = SlideshowManager.getDirectory(this); //use SlideshowManager to select a directory\n\n if (directory != null) //if a valid directory was selected...\n {\n JFrame loading = new JFrame(\"Loading...\");\n Image icon = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB_PRE);\n loading.setIconImage(icon);\n loading.setResizable(false);\n loading.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n loading.setSize(new Dimension(250,30));\n loading.setLocationRelativeTo(null);\n loading.setVisible(true);\n\n timeline.reset();\n timeline.setSlideDurationVisible(automated);\n timeline.setDefaultSlideDuration(slideInterval);\n\n m_ImageLibrary = ImageLibrary.resetLibrary(timeline, directory); //...reset the libraries to purge the current contents...\n JScrollPane spImages = new JScrollPane(m_ImageLibrary);\n spImages.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spImages.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Images\", spImages);\n \n m_AudioLibrary.resetAudio();\n m_AudioLibrary = AudioLibrary.resetLibrary(timeline, directory);\n JScrollPane spAudio = new JScrollPane(m_AudioLibrary);\n spAudio.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spAudio.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Audio\", spAudio);\n\n loading.dispose();\n }\n }", "private void setClubEventFolder (File file) {\n if (file == null) {\n eventsFile = null;\n // currentFileSpec = null;\n statusBar.setFileName(\" \", \" \");\n } else {\n fileSpec = recentFiles.addRecentFile (file);\n if (clubEventList != null) {\n clubEventList.setSource (fileSpec);\n } else {\n // System.out.println(\"ClubPlanner.setClubEventFolder clubEventList is null\");\n }\n eventsFile = file;\n currentDirectory = file.getParentFile();\n FileName fileName = new FileName (file);\n statusBar.setFileName(fileName);\n // textMergeWindow.openSource(currentDirectory);\n }\n }", "private void setSelectedSetting(Parent parent) {\n localSettings = AppSettings.getSettings();\n selectedSetting.getChildren().removeAll(selectedSetting.getChildren());\n selectedSetting.getChildren().add(parent);\n }", "public void directoryChange( int type, Set fileSet );", "@Override\r\n\tprotected void setSavedDirectoriesIntoControls() {\n\r\n\t}", "@Override\n public void onRequestCancelled(final Request request)\n throws CvqException, CvqInvalidTransitionException,\n CvqObjectNotFoundException {\n restoreOriginalHomeFolder((HomeFolderModificationRequest) request);\n }", "public void setPath(String newPath) {\n String id = PREF_DEFAULTDIR + getId();\n idv.getStateManager().writePreference(id, newPath);\n }", "private void actionAddFolder ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tJFileChooser folderChooser = new JFileChooser();\r\n\t\t\tfolderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n\r\n\t\t\tint isFolderSelected = folderChooser.showOpenDialog(folderChooser);\r\n\r\n\t\t\tif (isFolderSelected == JFileChooser.APPROVE_OPTION)\r\n\t\t\t{\r\n\t\t\t\tString folderPath = folderChooser.getSelectedFile().getPath();\r\n\r\n\t\t\t\tFile folderFileDescriptor = new File(folderPath);\r\n\t\t\t\tFile[] listFolderFiles = folderFileDescriptor.listFiles();\r\n\r\n\t\t\t\tString[] fileList = new String[listFolderFiles.length];\r\n\r\n\t\t\t\tfor (int i = 0; i < listFolderFiles.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfileList[i] = listFolderFiles[i].getPath();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tDataController.scenarioOpenFolder(fileList);\r\n\r\n\t\t\t\thelperDisplayProjectFiles();\r\n\t\t\t\thelperDisplayInputImage();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "@Override\n public void onChosenDir(String chosenDir) {\n ((EditTextPreference)preference).setText(chosenDir);\n try {\n SettingsActivity.createWorkingDir(getActivity(), new File(chosenDir));\n } catch (Exception ex) {\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_SHORT).show();\n }\n AvnLog.i(Constants.LOGPRFX, \"select work directory \" + chosenDir);\n }", "private void setTree() throws IOException {\n TreeItem<File> root = new TreeItem<>();\n dirFolders.setRoot(buildTree(model.DirectoryManager.getTree(), root));\n dirFolders.setRoot(root.getChildren().get(0));\n\n // format cellFactory\n // we want to show file name in UI although treeView stores File object\n // Add directory logo if the file is a directory\n // Add photo thumbnail if the file is a photo\n dirFolders.setCellFactory(\n new Callback<TreeView<File>, TreeCell<File>>() {\n @Override\n public TreeCell<File> call(TreeView<File> param) {\n return new TreeCell<File>() {\n @Override\n protected void updateItem(File item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n if (item.isDirectory()) {\n setGraphic(\n new ImageView(\n new Image(getClass().getResourceAsStream(\"/views/folder.png\"))));\n setDisclosureNode(null);\n File[] fileList = item.listFiles();\n if (fileList != null) {\n if (fileList.length == 0) {\n setDisable(true);\n }\n }\n } else {\n ImageView image = new ImageView(\"File:\" + item.getPath());\n image.setFitHeight(32);\n image.setFitWidth(36);\n setGraphic(image);\n }\n setText(item.getName());\n }\n }\n };\n }\n });\n\n // handle onClickAction\n dirFolders\n .getSelectionModel()\n .selectedItemProperty()\n .addListener(\n (observable, oldValue, newValue) -> {\n if (!dirFolders.getSelectionModel().getSelectedItem().getValue().isDirectory()) {\n model.User.setPhoto(\n model.PhotoManager.getPhoto(\n dirFolders.getSelectionModel().getSelectedItem().getValue().getPath()));\n try {\n loadNextScene(rootPane, \"/views/focusPhotoPane.fxml\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n Stage curStage = (Stage) rootPane.getScene().getWindow();\n File selectedDirectory =\n dirFolders.getSelectionModel().getSelectedItem().getValue();\n if (selectedDirectory != null) {\n Directory dir =\n DirectoryManager.getCurrentDirectory(selectedDirectory.getPath());\n if (dir != null) {\n model.User.setGalleryPhotos(dir.getPhotos());\n fadeOutEvent();\n }\n } else {\n curStage.show();\n }\n }\n });\n }", "void setChosenPath(Path path) throws Exception {\r\n\t\t// Changing direction, assume we need to clear current set of choices\r\n\t\tcurrentChoices.clear();\r\n\r\n\t\tsetCurrentPath(path);\r\n\r\n\t\tcurrentTurnIndex++;\r\n\t}", "private void handleFolderClose(Event event) {\n\t\tWidget widget = event.item;\n\t\tif (!(widget instanceof TreeItem))\n\t\t\treturn;\n\t\tTreeItem item = (TreeItem) widget;\n\t\titem.setImage(SWTUtil.getImage(\"folder.gif\"));\n\t}", "public void setFolderId(UUID folderId) {\n this.folderId = folderId;\n }", "abstract public void setDataResourcesDir(String path);", "public FileObject folderId(UUID folderId) {\n this.folderId = folderId;\n return this;\n }", "@Override\n public void onPopulateSdFilesTaskProgressUpdated(\n ExternalFileInfo savedRoot,\n ExternalFileInfo savedFolder,\n ExternalFileInfo savedLeaf) {\n\n // at this point breadcrum bar should be updated\n Context context = getContext();\n if (context == null) {\n return;\n }\n if (savedFolder != null && savedRoot != null) {\n // load the new built folder\n mCurrentFolder = savedFolder;\n mCurrentRoot = savedRoot;\n } else {\n // folder could not be built, so load root folder\n mCurrentFolder = null;\n mCurrentRoot = null;\n }\n if (savedLeaf != null) {\n rebuildBreadcrumbBar(context, savedLeaf);\n }\n if (mCurrentFolder != null) {\n setCurrentBreadcrumb(findBreadcrumb(mCurrentFolder));\n }\n\n // no need to build saved folder anymore. the relevant settings will be\n // updated in pauseFragment\n mSavedFolderUri = null;\n mSavedLeafUri = null;\n\n }", "@Override\n public void directoryChangedNotify(String path) {\n // TODO: Window title crops end of path, but better to crop start!\n // Maybe it will be better to create some status bar\n this.setTitle(path);\n }", "public void clickCreateFolderButton() {\n\t\tfilePicker.fileManButton(locCreateFolderButton);\n\t}", "public void setFolderPath(Collection<PersonalFolder> folderPath) {\r\n\t\tthis.folderPath = folderPath;\r\n\t}", "@Override\n public void onClick(View v) \n {\n DirectoryChooserDialog directoryChooserDialog = \n new DirectoryChooserDialog(getActivity(), \n new DirectoryChooserDialog.ChosenDirectoryListener() \n {\n @Override\n public void onChosenDir(String chosenDir) \n {\n m_chosenDir = chosenDir;\n Utils.getModel(CurrentPlaylistFragment.this).saveTracksFromDir(chosenDir);\n ((MainActivity) getActivity()).goToCurrentPlaylist();\n }\n }); \n // Toggle new folder button enabling\n directoryChooserDialog.setNewFolderEnabled(m_newFolderEnabled);\n // Load directory chooser dialog for initial 'm_chosenDir' directory.\n // The registered callback will be called upon final directory selection.\n directoryChooserDialog.chooseDirectory(m_chosenDir);\n m_newFolderEnabled = ! m_newFolderEnabled;\n }", "@Override\r\n public void widgetSelected(final SelectionEvent event) {\r\n System.out.println(\"TN5250JPart: Tab folder selected: \" + tn5250jPart.getClass().getSimpleName());\r\n setFocus();\r\n }", "public void changeCurrentDirectory(String newDirectory) {\n currentDirectory = newDirectory;\n }", "@Override\n public void onChosenDir(String chosenDir) {\n ((EditTextPreference)preference).setText(chosenDir);\n AvnLog.i(Constants.LOGPRFX, \"select chart directory \" + chosenDir);\n }", "@DISPID(30)\n\t// = 0x1e. The runtime will prefer the VTID if present\n\t@VTID(41)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject testSetFolder();", "public void setCurrentDirectory(File dir) {\r\n\tif (dir == null) dir = new File(System.getProperty(\"user.home\"));\r\n\r\n\tdir = makeAbsolute(dir);\r\n\r\n\t/**\r\n\t * Note that we compare literal paths, not canonical\r\n\t * paths. If they want the chooser to represent the\r\n\t * files at the end of a different route to the same\r\n\t * place, that's perfectly legitimate. See NextStep\r\n\t * for e.g.\r\n\t */\r\n\tif (curDir == null || !curDir.equals(dir)) {\r\n\t invalidateCache();\r\n\t File oldDir = curDir;\r\n\t curDir = dir;\r\n\t firePropertyChange(\"currentDirectory\", oldDir, dir);\r\n\t fireContentsChanged();\r\n\t}\r\n }", "private void outputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {\n JFileChooser chooser = new JFileChooser();\n chooser.setDialogTitle(\"Select Output Folder\");\n chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n File workingDirectory = new File(System.getProperty(\"user.dir\"));\n chooser.setCurrentDirectory(workingDirectory);\n if (chooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {\n outputFile = chooser.getSelectedFile();\n outputFolderLabel.setText(getFileName(chooser.getSelectedFile()));\n }\n }", "public void selectSourcePackageFolder(String item) {\n cboSourcePackageFolder().selectItem(item);\n }", "public void setResource(ResourceVO newResource) {\n\tresource = newResource;\n}", "public void setResourceFrom(ServiceCenterITComputingResource newResourceFrom) {\n addPropertyValue(getResourcesProperty(), newResourceFrom);\r\n// setPropertyValue(getResourcesProperty(), resourceTo);\r\n }", "public void setParentFolder(com.vmware.converter.ManagedObjectReference parentFolder) {\r\n this.parentFolder = parentFolder;\r\n }", "private void upPath() {\n if (!path.equals(FilePathUtil.getRootPath())) {\n onPathChanged(path, new File(path.getParent()));\n path = new File(path.getParent());\n load(null);\n }\n }", "abstract public void setRingResourcesDir(String path);", "public Builder folder(String folder) {\n\t\t\tthis.folder = folder;\n\t\t\treturn this;\n\t\t}", "@Override\r\n\tprotected void processDirectorySelectionChange(String paramString) {\n\r\n\t}", "private void onResourceMove(ResourceMoveEvent event) throws ROSRSException, ROException {\n\t\tif (currentFolder != null) {\n\t\t\tFolderEntry entry = null;\n\t\t\tfor (FolderEntry e : currentFolder.getFolderEntries().values()) {\n\t\t\t\tif (e.getResource().equals(currentResource)) {\n\t\t\t\t\tentry = e;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (entry != null) {\n\t\t\t\tentry.delete();\n\t\t\t}\n\t\t}\n\t\tif (!event.getFolder().isLoaded()) {\n\t\t\tevent.getFolder().load();\n\t\t}\n\t\tevent.getFolder().addEntry(currentResource, null);\n\t\tsend(getPage(), Broadcast.BREADTH, new ResourceMovedEvent(event.getTarget()));\n\t}", "private void changeProject(IProject newProject) {\n mProject = newProject;\n\n // enable types based on new API level\n enableTypesBasedOnApi();\n\n // update the folder name based on API level\n resetFolderPath(false /*validate*/);\n\n // update the Type with the new descriptors.\n initializeRootValues();\n\n // update the combo\n updateRootCombo(getSelectedType());\n\n validatePage();\n }", "public Builder setFolderId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n folderId_ = value;\n onChanged();\n return this;\n }", "public static void createFolder(IResource res) {\r\n \t\tif (res instanceof IFolder) {\r\n \t\t\tIFolder folder=(IFolder)res;\r\n \t\t\t\r\n \t\t\tif (folder.exists() == false) {\r\n \t\t\t\tcreateFolder(folder.getParent());\r\n \r\n \t\t\t\ttry {\r\n \t\t\t\t\tfolder.create(true, true,\r\n \t\t\t\t\t\t\tnew org.eclipse.core.runtime.NullProgressMonitor());\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 \t\t} else if (res.getParent() != null) {\r\n \t\t\tcreateFolder(res.getParent());\r\n \t\t}\r\n \t}", "public void setResource(int newResource) throws java.rmi.RemoteException;", "private static MenuItem createAddNewFolderMenuItem(SongManager model, Item selectedItem) {\n MenuItem createNewFolder = new MenuItem(CREATE_NEW_FOLDER);\n\n createNewFolder.setOnAction((event) -> {\n if (selectedItem != null) {\n File folderSelected = selectedItem.getFile();\n Path newPath = PromptUI.createNewFolder(folderSelected);\n\n if (newPath != null) {\n try {\n model.addNewFolder(newPath.toFile());\n } catch (IOException ex) {\n PromptUI.customPromptError(\"Create new folder\", null, \"Unable to create new folder \" + newPath);\n }\n }\n }\n });\n\n return createNewFolder;\n }", "interface WithFolderPath {\n /**\n * Specifies the folderPath property: The folder path of the source control. Path must be relative..\n *\n * @param folderPath The folder path of the source control. Path must be relative.\n * @return the next definition stage.\n */\n Update withFolderPath(String folderPath);\n }", "protected void setParentFolder(Folder f) {\n\t\tparentFolder = f;\n\t\tif(f!= null) {\n\t\t\tparentFolderID = f.getMyID();\n\t\t} else {\n\t\t\tparentFolderID = 0;\n\t\t}\n\t}", "public void updatePath() {\n\t\tString oldPath = this.path;\n\t\tif (materializePath()) {\n\t\t\tPageAlias.create(this, oldPath);\n\t\t\tupdateChildPaths();\n\t\t}\n\t}", "public int setCurrentResource(final Resource newResource) {\n currentSpinePos = book.getSpine().getResourceIndex(newResource);\n currentResource = newResource;\n return currentSpinePos;\n }", "private void workerUpdate(final File newFolder, final boolean isReloadFolder) {\r\n\r\n\t\tif (newFolder == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (isReloadFolder == false && _workerNextFolder != null && _workerNextFolder.equals(newFolder)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsynchronized (_workerLock) {\r\n\r\n\t\t\t_workerNextFolder = newFolder;\r\n\r\n\t\t\t_workerStopped = false;\r\n\t\t\t_workerCancelled = true;\r\n\r\n\t\t\t_workerLock.notifyAll();\r\n\t\t}\r\n\r\n\t\tif (_workerThread == null) {\r\n\t\t\t_workerThread = new Thread(_workerRunnable, \"PicDirImages: Retrieving folder image files\");//$NON-NLS-1$\r\n\t\t\t_workerThread.start();\r\n\t\t}\r\n\t}", "abstract public void setTopResourcesDir(String path);", "public void restoreOldFolders() {\n setConfigurationAndLog(ArecoDeploymentScriptFinder.RESOURCES_FOLDER_CONF, this.oldResourcesFolder);\n setConfigurationAndLog(ArecoDeploymentScriptFinder.UPDATE_SCRIPTS_FOLDER_CONF, this.oldUpdateScriptsFolder);\n setConfigurationAndLog(ArecoDeploymentScriptFinder.INIT_SCRIPTS_FOLDER_CONF, this.oldInitScriptsFolder);\n setConfigurationAndLog(FlexibleSearchDeploymentEnvironmentDAO.CURRENT_ENVIRONMENT_CONF, this.oldEnvironmentName);\n setConfigurationAndLog(LocalizedImpexImportService.IMPEX_LOCALE_CONF, this.oldImpexLocaleCode);\n }", "public void setSelectedProjectName(String selectedProjectName) throws Exception{\n\t\tDataManager.createProjectFolder(selectedProjectName);\n\t}", "protected void setTree(JTree newTree) {\n\tif(tree != newTree) {\n\t if(tree != null)\n\t\ttree.removeTreeSelectionListener(this);\n\t tree = newTree;\n\t if(tree != null)\n\t\ttree.addTreeSelectionListener(this);\n\t if(timer != null) {\n\t\ttimer.stop();\n\t }\n\t}\n }", "public void setFolderName(String folderName) {\n mArgs.putString(ARG_NAME, folderName);\n }", "private void changeDirectory(String directory) {\r\n try {\r\n File file = path.searchByPath(directory);\r\n if (file instanceof Directory) {\r\n // Change the directory.\r\n fileSystem.setCurrentDirectory((Directory) file);\r\n } else {\r\n // TextFile is not a directory.\r\n this.setError(directory + \" is a path to TextFile\");\r\n }\r\n } catch (InvalidPathException e) {\r\n // Path to specified directory is not found.\r\n this.setError(directory + \" is not a path to Directory\");\r\n }\r\n }", "private void onChanged(ObservableValue<? extends Path> observable, Path oldValue, Path newValue){\n\n monitorListview.getItems().add(newValue.toString());\n }", "@FXML\n private void selectPath(MouseEvent mouseEvent) {\n\n DirectoryChooser directoryChooser = new DirectoryChooser();\n File selectedDirectory = directoryChooser.showDialog(getStage(mouseEvent));\n if (selectedDirectory != null){\n pathTextField.setText(selectedDirectory.getPath());\n }\n\n }", "private void checkFileSystemResource(UserRequest ureq) {\n\n if (FolderCommandStatus.STATUS_FAILED == FolderCommandHelper.sanityCheck(getWindowControl(), folderComponent)) {\n folderComponent.updateChildren();\n }\n\n VFSItem item = VFSManager.resolveFile(folderComponent.getRootContainer(), ureq.getModuleURI());\n\n if (FolderCommandStatus.STATUS_FAILED == FolderCommandHelper.sanityCheck2(getWindowControl(), folderComponent, ureq, item)) {\n folderComponent.setCurrentContainerPath(folderComponent.getCurrentContainerPath());\n }\n\n }", "public synchronized static void setCurrentDirectory(File newDirectory) {\n if (newDirectory == null) // this can actually happen\n currentDirectory = canon(System.getProperty(\"user.home\"));\n else\n currentDirectory = canon(newDirectory.getAbsolutePath());\n }", "private void updateAllFoldersTreeSet() throws MessagingException {\n\n Folder[] allFoldersArray = this.store.getDefaultFolder().list(\"*\");\n TreeSet<Folder> allFoldersTreeSet =\n new TreeSet<Folder>(new FolderByFullNameComparator());\n\n for(int ii = 0; ii < allFoldersArray.length; ii++) {\n\n allFoldersTreeSet.add(allFoldersArray[ii]);\n }\n\n this.allFolders = allFoldersTreeSet;\n }", "Source updateDatasourceFolder(Source ds) throws RepoxException;", "public void changeImage(){\n if(getImage()==storeItemImg) setImage(selected);\n else setImage(storeItemImg);\n }", "private void appendBreadcrumb(Context context, ExternalFileInfo newFolder) {\n int currentCrumb = -1;\n if (mBreadcrumbBarLayout.getChildCount() > 0) {\n // Find the current folder's crumb in the bar\n if (mCurrentFolder != null && mCurrentRoot != null) {\n currentCrumb = findBreadcrumb(mCurrentFolder);\n } else {\n // In the root folder, so current crumb is the first child\n currentCrumb = 0;\n }\n // Check if the next crumb (right) corresponds to the new folder\n if (currentCrumb >= 0) {\n if (currentCrumb + 1 < mBreadcrumbBarLayout.getChildCount()) {\n boolean clearToRight = true;\n LinearLayout crumb = (LinearLayout) mBreadcrumbBarLayout.getChildAt(currentCrumb + 1);\n Object tag = crumb.getTag();\n if (tag != null && tag instanceof ExternalFileInfo) {\n ExternalFileInfo file = (ExternalFileInfo) tag;\n if (file.getUri().equals(newFolder.getUri())) {\n // New folder is already in breadcrumb bar\n clearToRight = false;\n }\n }\n if (clearToRight) {\n // let's rebuild bread crumb bar from scratch, since it can be a\n // non-immediate child\n rebuildBreadcrumbBar(getContext(), newFolder);\n }\n } else {\n // let's rebuild bread crumb bar from scratch, since it can be a\n // non-immediate child\n rebuildBreadcrumbBar(getContext(), newFolder);\n }\n setCurrentBreadcrumb(currentCrumb + 1);\n }\n }\n if (currentCrumb < 0) {\n // Current crumb could not be found or bar is not built, try (re)building the bar\n rebuildBreadcrumbBar(context, null);\n // Create a new crumb and add to end of bar\n createBreadcrumb(context, newFolder, -1);\n\n setCurrentBreadcrumb(-1);\n }\n }" ]
[ "0.7174574", "0.6291772", "0.6176848", "0.6157703", "0.609162", "0.5955551", "0.5745424", "0.5723532", "0.56228185", "0.56176573", "0.55301744", "0.5514247", "0.55105376", "0.5494029", "0.5491208", "0.5486382", "0.548039", "0.547092", "0.5452195", "0.54519385", "0.538704", "0.5379575", "0.53396976", "0.5333978", "0.53293526", "0.5303012", "0.52946657", "0.5282542", "0.52598673", "0.5253501", "0.5250523", "0.52266484", "0.52220607", "0.5219104", "0.52093524", "0.5208296", "0.5171671", "0.51528263", "0.5146445", "0.5143908", "0.5141283", "0.5130609", "0.5129468", "0.512755", "0.5125619", "0.51255184", "0.5088538", "0.5079882", "0.507841", "0.50642604", "0.50597954", "0.5059556", "0.50411165", "0.504078", "0.50335866", "0.50192285", "0.50111467", "0.4999431", "0.4995463", "0.49921212", "0.49683148", "0.49618262", "0.49530587", "0.4933082", "0.49125162", "0.49122882", "0.49091864", "0.490555", "0.48992732", "0.48916632", "0.4887442", "0.48768142", "0.4873517", "0.48661715", "0.4865315", "0.4850704", "0.483921", "0.48336214", "0.4815404", "0.48129344", "0.48100558", "0.48000747", "0.47948676", "0.478971", "0.47861958", "0.4777624", "0.47713244", "0.47690365", "0.47633815", "0.47614768", "0.47601005", "0.47573245", "0.4753262", "0.47437763", "0.47428232", "0.47408298", "0.47345042", "0.47285157", "0.47282952", "0.47175482" ]
0.6465876
1
Show the modal for updating the resource.
private void onResourceUpdateClicked(UpdateClickedEvent event) { UpdateResourceModal updateResourceModal2 = new UpdateResourceModal("update-resource-modal"); updateResourceModal.replaceWith(updateResourceModal2); updateResourceModal = updateResourceModal2; updateResourceModal.show(event.getTarget()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void updateBuildingButtonClicked() {\n Building building = tableBuilding.getSelectionModel().getSelectedItem();\n\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(null);\n String success = BuildingCommunication.updateBuilding(building.getId(), building.getName(), building.getOpenTime(),\n building.getCloseTime(), building.getStreetName(), building.getStreetNumber(),\n building.getZipCode(), building.getCity());\n if (success.equals(\"Successful\")) {\n alert.hide();\n } else {\n alert.setContentText(success);\n alert.showAndWait();\n }\n }", "public void doUpdate() {\n Map<String, List<String>> dataToSend = new HashMap<>();\r\n List<String> values = new ArrayList<>();\r\n values.add(String.valueOf(selectedOhsaIncident.getId()));\r\n dataToSend.put(\"param\", values);\r\n showDialog(dataToSend);\r\n }", "@RequestMapping(\"/item/{id}/update\")\n\tpublic ModelAndView showEditForm(@PathVariable(\"id\")Long id) {\n\t\tModelAndView mv = new ModelAndView(\"item-form\");\n\t\tmv.addObject(\"title\", \"Edit item!\"); //1st var is name we wanna call it\n\t\tmv.addObject(\"item\", itemDao.findById(id).orElse(null)); //2nd is data we use over and over again\n\t\t\t\t\n\t\t\t\treturn mv;\n\t\t\n\t}", "@FXML\n void OnActionShowUpdateCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/ModifyCustomer.fxml\"));\n stage.setTitle(\"Modify Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public void handleUpdate(){\n increaseDecrease(\"i\");\n action=\"update\";\n buttonSave.setVisible(true);\n admission.setEditable(false);\n\n }", "public String update()\n {\n this.conversation.end();\n\n try\n {\n if (this.id == null)\n {\n this.entityManager.persist(this.automotor);\n return \"search?faces-redirect=true\";\n }\n else\n {\n this.entityManager.merge(this.automotor);\n return \"view?faces-redirect=true&id=\" + this.automotor.getId();\n }\n }\n catch (Exception e)\n {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\n return null;\n }\n }", "@RequestMapping(value = \"/editPersona\", method = RequestMethod.GET)\n\tpublic String showFormForUpdate(@RequestParam(\"id_persona\") int id_persona, Model model) {\n\t\tPersona Person = personaService.getPersona(id_persona);\n\t\tmodel.addAttribute(\"Person\", Person);\n\t\treturn \"editPersona\";\n\t}", "public void updateEmpresa() {\n Empresa empresa = empresaDAO.load(config.getApplicationEmpresaId());\n this.textTitle.setText(MessageFormat.format(resource.getString(\"main.title\"), empresa.getNome()));\n }", "@RequestMapping(\"/author/update/{id}\")\n public ModelAndView showUpdateAuthorPage(@PathVariable(name = \"id\") Long id) {\n ModelAndView mav = new ModelAndView(\"/author/update\");\n Author author = authorservice.getAuthor(id);\n final Logger log = LoggerFactory.getLogger(ProjectApplication.class);\n log.info(\"---------------update author----------------\");\n mav.addObject(\"author\", author);\n\n return mav;\n }", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/{id}\", params = \"form\", method = RequestMethod.GET) \n\tpublic String updateForm(@PathVariable(\"id\") Long id, Model uiModel) {\n\t\tuiModel.addAttribute(\"customer\", customerService.findById(id));\n\t\treturn \"customers/update\"; \n\t}", "@FXML\r\n void onActionUpdateAppointment(ActionEvent event) throws IOException {\r\n\r\n Appointment appointmentIndex = appointmentsTable.getSelectionModel().getSelectedItem();\r\n appointmentToUpdateIndex = DBCustomer.getAllCustomers().indexOf(appointmentIndex);\r\n\r\n if(appointmentsTable.getSelectionModel().getSelectedItem() == null){\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.initModality(Modality.APPLICATION_MODAL);\r\n alert.setTitle(\"Appointment not selected\");\r\n alert.setHeaderText(\"Please choose an appointment to update\");\r\n alert.showAndWait();\r\n }\r\n else{\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"/view/UpdateAppointment.FXML\"));\r\n Parent scene = loader.load();\r\n UpdateAppointmentController UPController = loader.getController();\r\n UPController.sendAppointment(appointmentsTable.getSelectionModel().getSelectedItem());\r\n\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n //scene = FXMLLoader.load(getClass().getResource(\"/view/UpdateAppointment.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n\r\n }", "public void clickOnUpdateButton() {\r\n\t\tsafeJavaScriptClick(updateButton);\r\n\t}", "@FXML\r\n void onActionUpdate(ActionEvent event) throws IOException {\r\n\r\n Customer customerIndex = customerTable.getSelectionModel().getSelectedItem();\r\n customerToUpdateIndex = DBCustomer.getAllCustomers().indexOf(customerIndex);\r\n\r\n if(customerTable.getSelectionModel().getSelectedItem() == null){\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.initModality(Modality.APPLICATION_MODAL);\r\n alert.setTitle(\"Customer not selected\");\r\n alert.setHeaderText(\"Please choose a customer to update\");\r\n alert.showAndWait();\r\n }\r\n else{\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"/view/UpdateCustomer.FXML\"));\r\n Parent scene = loader.load();\r\n UpdateCustomerController UPController = loader.getController();\r\n UPController.sendCustomer(customerTable.getSelectionModel().getSelectedItem());\r\n\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n //scene = FXMLLoader.load(getClass().getResource(\"/view/UpdateCustomer.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n\r\n\r\n\r\n\r\n }", "@FXML\n void UpdateCustomer(ActionEvent event) throws IOException {\n\n customer customer = customerTableView.getSelectionModel().getSelectedItem();\n if(customer == null)\n return;\n \n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/view/UpdateCustomer.fxml\"));\n loader.load();\n\n UpdateCustomerController CustomerController = loader.getController();\n CustomerController.retrieveCustomer(customer);\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n Parent scene = loader.getRoot();\n stage.setScene(new Scene(scene));\n stage.show();\n\n }", "private void showEditForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n Customer customerEdit = CustomerDao.getCustomer(id);\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/editCustomer.jsp\");\n dispatcher.forward(request, response);\n }", "@FXML\r\n void clickSubmit(ActionEvent event) {\r\n editid.setVisible(false);\r\n try {\r\n \r\n conn = mysqlconnect.connectDb();\r\n String value1 = txt_id.getText();\r\n String value2 = txt_name.getText();\r\n String value3 = txt_mg.getText();\r\n String value5 = txt_brand.getText();\r\n String value6 = txt_distributer.getText();\r\n String sql = \"update medicine set Medicineid='\" + value1 + \"', Name='\" + value2 + \"', Mg='\" + value3 + \"', Brand='\" + value5 + \"',Distributer='\" + value6 + \"' where Medicineid=\" + value1 + \"\";\r\n pst = conn.prepareStatement(sql);\r\n pst.execute();\r\n// JOptionPane.showMessageDialog(null, \"Update\");\r\n UpdateTable();\r\n search_user();\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n }", "public String update() throws IOException {\n\n authorManager.update(detailAuthor);\n\n reload();\n return \"author_detail.xhtml\";\n }", "@GetMapping(\"/update/{id}\")\n public String showSocioToUpdate(@PathVariable Integer id, Model model) {\n List<Cargo> cargos = cargoService.getCargos();\n Persona persona = personaService.getById(id);\n model.addAttribute(\"cargos\", cargos);\n model.addAttribute(\"persona\", persona);\n return \"/backoffice/socioFormEdit\";\n }", "@GetMapping(\"/rating/update/{id}\")\r\n public String showUpdateForm(@PathVariable(\"id\") Integer id, Model model) {\r\n Rating rating = ratingRepository.findById(id).orElseThrow(() -> new IllegalArgumentException(\"Invalid rating Id:\" + id));\r\n model.addAttribute(\"rating\", rating);\r\n return \"rating/update\";\r\n }", "@RequestMapping(\"/showFormForUpdate\")\n\tpublic String showFormForUpdate(@RequestParam(\"personId\") int theId, Model theModel) {\n\t\tPerson thePerson = patientKeeperService.getPerson(theId);\n\n\t\t// set person as a model attribute to pre-populate the form\n\t\ttheModel.addAttribute(\"person\", thePerson);\n\n\t\t// send over to our form\n\t\treturn \"person-form\";\n\t}", "private Component updateButton(){\n return updatePersonButton = new Button(\"updateButton\"){\n @Override\n public void onSubmit() {\n super.onSubmit();\n }\n };\n }", "@GetMapping(\"/showFormForUpdate\")\n\tpublic String showFormForUpdate(@RequestParam(\"customerId\") int id, Model model) {\n\t\tCustomer customer = customerService.getById(id);\n\t\t\n\t\t\n\t\tmodel.addAttribute(\"customer\", customer);\n\t\t\n\t\treturn \"customer-form\";\n\t}", "@GetMapping(\"/showFormForUpdate\")\r\n\tpublic String showFormForUpdate(@RequestParam(\"customerId\") int id, Model theModel){\n\t\tCustomer theCustomer = customerService.getCustomer(id);\r\n\t\t\r\n\t\t//set customer as model attribute to pre-populate\r\n\t\ttheModel.addAttribute(\"customer\",theCustomer);\r\n\t\t\r\n\t\t//send over to our form\r\n\t\treturn \"customer-form\";\r\n\t}", "private void showSuccess() {\n if (binder.isValid()){\n Notification notification = Notification.show(\"Your Advert Has Been Updated \");\n notification.addThemeVariants(NotificationVariant.LUMO_SUCCESS);\n UI.getCurrent().getPage().reload();\n }\n }", "public void showEditTitleDialog( ){\n FragmentTransaction ft = fragmentManager.beginTransaction();\n Fragment prev = fragmentManager.findFragmentByTag(FRAGMENT_DIALOG);\n if (prev != null) {\n ft.remove(prev);\n }\n\n // Send Related Information...\n ModelUpdateItem updateItem = new ModelUpdateItem(\n itemPosition,\n rootParentID, // Sending Root Or Parent ID.\n listManageHome.get(itemPosition).getLayoutID(), listManageHome.get(itemPosition).getLayoutTitle() );\n\n PopUpDialogEditTitle dialogFragment = new PopUpDialogEditTitle( this, updateItem );\n dialogFragment.show( fragmentManager, FRAGMENT_DIALOG );\n }", "public String update()\n {\n this.conversation.end();\n\n try\n {\n if (this.id == null)\n {\n this.entityManager.persist(this.paramIntervento);\n return \"search?faces-redirect=true\";\n }\n else\n {\n this.entityManager.merge(this.paramIntervento);\n return \"view?faces-redirect=true&id=\" + this.paramIntervento.getNome();\n }\n }\n catch (Exception e)\n {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\n return null;\n }\n }", "public Update_info() {\n initComponents();\n display_data();\n }", "public void update()\n {\n this.controller.updateAll();\n theLogger.info(\"Update request recieved from UI\");\n }", "public String updateEmpregado() {\n this.empregadosFacade.edit(this.empregado);\n updateMB(empregado);\n\n return \"areaPessoal.xhtml?faces-redirect=true\";\n }", "public void updateDetailWindow();", "public String update()\r\n {\r\n this.conversation.end();\r\n\r\n try\r\n {\r\n \t \r\n \t createUpdateImage(this.item);\r\n createUpdateSound(this.item);\r\n \t \r\n \t \r\n if (this.id == null)\r\n {\r\n this.entityManager.persist(this.item);\r\n return \"search?faces-redirect=true\";\r\n }\r\n else\r\n {\r\n this.entityManager.merge(this.item);\r\n return \"view?faces-redirect=true&id=\" + this.item.getId();\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\r\n return null;\r\n }\r\n }", "private void showUpdateDialog(final Context context) {\n\n final android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(context);\n final android.app.AlertDialog alert = builder.create();\n View view = alert.getLayoutInflater().inflate(R.layout.custom_update_alert, null);\n TextView title = (TextView) view.findViewById(R.id.textMessage);\n TextView title2 = (TextView) view.findViewById(R.id.textMessage2);\n Button ok = (Button) view.findViewById(R.id.buttonUpdate);\n Button buttonCancel = (Button) view.findViewById(R.id.buttonCancel);\n alert.setCustomTitle(view);\n\n ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(\"https://play.google.com/store/apps/details?id=\" + \"fusionsoftware.loop.emergency_help\" + \"&hl=en\"));\n context.startActivity(intent);\n alert.dismiss();\n }\n });\n buttonCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alert.dismiss();\n //MoveNextScreen();\n }\n });\n alert.show();\n alert.setCanceledOnTouchOutside(false);\n }", "public void showPopupModal() {\n log.info(\"OrdersBean : showPopupModal\");\n showPopup = true;\n if (getParam(\"idOrder\") != null) {\n int idOrder = parseInt(getParam(\"idOrder\"));\n ordersEntity = ordersServices.findById(idOrder);\n contractsBean.findAllContractsWhenFindOrders(ordersEntity.getId());\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tUpdateCompany ucp = new UpdateCompany();\n\t\t\t\tucp.setVisible(true);\n \t\t\n\t\t\t}", "@FXML\n\tprivate void handleEdit() {\n\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\tshowCustomerInfoDialog(customer);\n\t}", "@FXML\n public void edit() {\n try {\n workerAdaptor.updateWorker(userIDComboBox.getValue(), passwordTextField.getText(), workerTypeComboBox.getValue());\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n Stage stage = (Stage) cancelButton.getScene().getWindow();\n stage.close();\n }", "@GetMapping(\"/showFormForUpdate/{id}\")\n public String showFormForUpdate(@PathVariable(value =\"id\") long id,Model model){\n Employee employee=employeeService.getEmployeeById(id);\n //set employee as model attribute to pre-populate the form\n model.addAttribute(\"employee\",employee);\n return \"Update_Employee\";\n }", "@Override\n\tpublic void edit(HttpServletRequest request,HttpServletResponse response) {\n\t\tint id=Integer.parseInt(request.getParameter(\"id\"));\n\t\tQuestionVo qv=new QuestionVo().getInstance(id);\n\t\tcd.edit(qv);\n\t\ttry{\n\t\t\tresponse.sendRedirect(\"Admin/question.jsp\");\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t}", "public boolean showFilmEditDialog(Movie movie) {\r\n try {\r\n // Load the fxml file and create a new stage for the popup dialog.\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(FilmApp.class.getResource(\"view/FilmEditDialog.fxml\"));\r\n AnchorPane page = (AnchorPane) loader.load();\r\n\r\n // Create the dialog Stage.\r\n Stage dialogStage = new Stage();\r\n dialogStage.setTitle(\"Edit movie\");\r\n dialogStage.initModality(Modality.WINDOW_MODAL);\r\n dialogStage.initOwner(primaryStage);\r\n Scene scene = new Scene(page);\r\n dialogStage.setScene(scene);\r\n\r\n // Set the movie into the controller.\r\n this.controller = loader.getController();\r\n controller.setDialogStage(dialogStage);\r\n controller.setMovie(movie);\r\n\r\n // Show the dialog and wait until the user closes it\r\n dialogStage.showAndWait();\r\n\r\n return controller.isOkClicked();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.out.println(\"je ot tu\");\r\n return false;\r\n }\r\n}", "public void clickOnEditButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary.ant-btn-circle\"), SHORTWAIT);\r\n\t}", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "public void updateUpdatePatientPanel() {\n\t\tupdateNameTF.setText(getDoctor(tempDoctorId).getPatient(tempPatientId)\n\t\t\t\t.getPName());\n\t\tupdateAddressTA.setText(getDoctor(tempDoctorId).getPatient(\n\t\t\t\ttempPatientId).getPAddress());\n\t\tupdatePhoneNoTA\n\t\t\t\t.setText(\"\"\n\t\t\t\t\t\t+ getDoctor(tempDoctorId).getPatient(tempPatientId)\n\t\t\t\t\t\t\t\t.getPPhone());\n\t}", "public void showEditCustomerDialog(Customer customer) {\n \t\n \ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/CustomerEditDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage editCustomerDialogStage = new Stage(); \n\t\t\teditCustomerDialogStage.setTitle(\"Edit Person\");\n\t\t\teditCustomerDialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\teditCustomerDialogStage.initOwner(searchCustomerDialogStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\teditCustomerDialogStage.setScene(scene);\n\t\t\tCustomerEditDialogController customerEditDialogController = loader.getController();\n\t\t\tcustomerEditDialogController.setDialogStage(editCustomerDialogStage);\n\t\t\tcustomerEditDialogController.setCustomer(customer);\n\t\t\tcustomerEditDialogController.setSearchCustomerController(this.searchCustomerDialogController);\n\t\t\teditCustomerDialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t }\n }", "@FXML\n private void handleEditFilm() {\n \tFilmItem selectedFilm = filmTable.getSelectionModel().getSelectedItem();\n if (selectedFilm != null) {\n boolean okClicked = mainApp.showFilmEditDialog(selectedFilm, false);\n if (okClicked) {\n showFilmDetails(selectedFilm);\n }\n\n } else {\n // Nothing selected.\n Dialogs.create()\n .title(\"No Selection\")\n .masthead(\"No Film Selected\")\n .message(\"Please select a film in the table.\")\n .showWarning();\n }\n }", "void updateModelFromView();", "public void editarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.edit(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaEditDialog').hide()\");\n ejbFacade.limpiarCache();\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n// FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\"));\n// requestContext.execute(\"PF('mensajeRegistroExitoso').show()\");\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n\n }", "public EditEmployeePopup(Stage primaryStage, Observers observers) {\n super(\"Update Employee\", \"PopupEditEmployeeConfirmButton\",\n observers);\n popupStage = new Stage();\n popupStage.initOwner(primaryStage);\n }", "@FXML\n public void OAUpdateAppointment(ActionEvent event) {\n\n try {\n FXMLLoader fxmlLoader = new FXMLLoader();\n fxmlLoader.setLocation(getClass().getResource(\"/View/UpdateAppointment.fxml\"));\n Parent add = fxmlLoader.load();\n UpdateAppointmentController updateAppointment = fxmlLoader.getController();\n Appointment appointment = Appointments.getSelectionModel().getSelectedItem();\n int ID = appointment.getAppointmentID();\n Appointment app = DBQuery.retrieveAppointment(ID);\n updateAppointment.receiveAppointment(app);\n Stage stage = new Stage();\n stage.setScene(new Scene(add));\n stage.show();\n\n\n }catch (IOException | NullPointerException e){\n System.out.println(e);\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"No appointment selected.\");\n alert.setContentText(\"Please select a appointment to update.\");\n alert.showAndWait();}\n }", "@FXML protected void editPatient(ActionEvent event) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"EditPatientInformation.fxml\"));\n Stage stage = new Stage();\n Scene scene = new Scene(root);\n \n stage.setScene(scene);\n stage.show();\n }", "public void popEditEntity()throws IOException {\n final Stage dialog = new Stage();\n dialog.setTitle(\"Editar entidad\");\n \n Parent root = FXMLLoader.load(getClass().getResource(\"/view/PopEditEntity.fxml\"));\n \n Scene xscene = new Scene(root);\n \n dialog.setResizable(false);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initOwner((Stage) root.getScene().getWindow());\n \n dialog.setScene(xscene);\n dialog.showAndWait();\n dialog.resizableProperty().setValue(Boolean.FALSE);\n dialog.setResizable(false);\n dialog.close();\n\n }", "public String update() {\n\t\tif (getElement().getIdTipo() == null) {\n\t\t\tFacesContext.getCurrentInstance()\n\t\t\t\t\t.addMessage(\n\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\tnew FacesMessage(\"Tipo non valido\",\n\t\t\t\t\t\t\t\t\t\"Selezionare il tipo.\"));\n\t\t\treturn null;\n\t\t}\n\t\tModulo t = getSession().update(element);\n\t\t// refresh locale\n\t\telement = t;\n\t\trefreshModel();\n\t\t// vista di destinzione\n\t\toperazioniLogHandler.save(OperazioniLog.MODIFY, JSFUtils.getUserName(),\n\t\t\t\t\"modifica moduli: \" + this.element.getNome());\n\t\treturn viewPage();\n\t}", "@RequestMapping(value = \"/{username}/update\", method = RequestMethod.GET)\n\tpublic String showUpdateEtudiantForm(@PathVariable(\"username\") String username, Model model) {\n\n\t\tlogger.debug(\"showUpdateEtudiantForm() : {}\"+ username);\n\t\n\t\tEtudiant etudiant = etudiantDAO.findOne(username);\n\t\tmodel.addAttribute(\"savedId\", etudiant.getUsername());\n\t\tmodel.addAttribute(\"etudiantForm\", etudiant);\n\n\t\t//populateDefaultModel(model);\n\n\t\treturn \"etudiant/etudiantForm\";\n\n\t}", "@OnShow\n\tpublic void onShow() {\n\t\tviewForm.setValue(\n\t\t\t\t// load product using the \"id\" parameter\n\t\t\t\tdatastore.query().target(TARGET).filter(ID.eq(id)).findOne(PRODUCT)\n\t\t\t\t\t\t// throw an exception if not found\n\t\t\t\t\t\t.orElseThrow(() -> new DataAccessException(\"Product not found: \" + id)));\n\t}", "public boolean showJobEditDialog(Job job) {\n try {\n // Load the fxml file and create a new stage for the popup dialog.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(\"view/JobEditDialog.fxml\"));\n AnchorPane page = loader.load();\n\n // Create the dialog Stage.\n Stage dialogStage = new Stage();\n dialogStage.setTitle(\"Edit Job\");\n dialogStage.initModality(Modality.NONE);\n dialogStage.initOwner(primaryStage);\n Scene scene = new Scene(page);\n dialogStage.setScene(scene);\n\n // Set the job into the controller.\n JobEditDialogController controller = loader.getController();\n controller.setDialogStage(dialogStage);\n controller.setJob(job);\n\n // Show the dialog and wait until the user closes it\n dialogStage.showAndWait();\n\n return controller.isOkClicked();\n\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }", "@Override\r\n\tpublic String update() {\n\t\tSystem.out.println(\"updateView.\");\r\n\t\t\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\t\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\t\r\n\t\t\t\trequest.put(\"Id\", bean.getId());\r\n\t\t\t\trequest.put(\"lineName\", bean.getLineName());\r\n\t\t\t\trequest.put(\"lineLink\", bean.getLineLink());\r\n\t\t\t\t//request.put(\"lineImg\", bean.getLineImg());\r\n\t\t\t\treturn \"update\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn \"go_preload\";\r\n\t}", "@GetMapping(\"/showFormForUpdate\")\n\tpublic String showFormForUpdate(@RequestParam(\"skillId\") int theId, Model theModel) {\n\t\tSkill theSkill = skillService.getSkill(theId);\n\t\t\n\t\t//set education as a model attribute to pre-populate the form\n\t\ttheModel.addAttribute(\"skill\", theSkill);\n\t\t\n\t\t//send over to our form\n\t\treturn \"skill-form\";\n\t}", "@Override\n public void update(AnActionEvent e) {\n // Set the availability based on whether a project is open\n Project project = e.getProject();\n e.getPresentation().setEnabledAndVisible(project != null);\n }", "public boolean showPersonEditDialog(Cliente cliente) {\r\n\t try {\r\n\t // Load the fxml file and create a new stage for the popup dialog.\r\n\t FXMLLoader loader = new FXMLLoader();\r\n\t loader.setLocation(MainApp.class.getResource(\"view/ClienteEditDialog.fxml\"));\r\n\t AnchorPane page = (AnchorPane) loader.load();\r\n\r\n\t // Create the dialog Stage.\r\n\t Stage dialogStage = new Stage();\r\n\t dialogStage.setTitle(\"Editar Cliente\");\r\n\t dialogStage.initModality(Modality.WINDOW_MODAL);\r\n\t dialogStage.initOwner(primaryStage);\r\n\t Scene scene = new Scene(page);\r\n\t dialogStage.setScene(scene);\r\n\r\n\t // Set the person into the controller.\r\n\t ClienteEditDialogController controller = loader.getController();\r\n\t controller.setDialogStage(dialogStage);\r\n\t controller.setCliente(cliente);\r\n\r\n\t // Show the dialog and wait until the user closes it\r\n\t dialogStage.showAndWait();\r\n\r\n\t return controller.isOkClicked();\r\n\t } catch (IOException e) {\r\n\t e.printStackTrace();\r\n\t return false;\r\n\t }\r\n\t}", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "@RequestMapping(\"supplier/edit/{id}\")\r\n\tpublic String editSupplier(@PathVariable(\"id\")int id,Model model){\n\t\tif(supplierservice.get(id)!=null)\r\n\t\t{\r\n\t\t\tsupplierservice.saveOrUpdate(supplier);\r\n\t\t\tmodel.addAttribute(\"message\",\"Succesfully updated\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmodel.addAttribute(\"errorMessage\",\"Could not be updated\");\r\n\t\t}\r\n\t\t//log.debug(\"Ending\");\r\n\t\treturn \"supplier\";\r\n\t}", "public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "@FXML\n\tpublic void updateProduct(ActionEvent event) {\n\t\tProduct productToUpdate = restaurant.returnProduct(LabelProductName.getText());\n\t\tif (!txtUpdateProductName.getText().equals(\"\") && !txtUpdateProductPrice.getText().equals(\"\")\n\t\t\t\t&& selectedIngredients.isEmpty() == false) {\n\n\t\t\ttry {\n\t\t\t\tproductToUpdate.setName(txtUpdateProductName.getText());\n\t\t\t\tproductToUpdate.setPrice(txtUpdateProductPrice.getText());\n\t\t\t\tproductToUpdate.setSize(ComboUpdateSize.getValue());\n\t\t\t\tproductToUpdate.setType(toProductType(ComboUpdateType.getValue()));\n\t\t\t\tproductToUpdate.setIngredients(toIngredient(selectedIngredients));\n\n\t\t\t\tproductToUpdate.setEditedByUser(restaurant.returnUser(empleadoUsername));\n\n\t\t\t\trestaurant.saveProductsData();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Producto actualizado satisfactoriamente\");\n\t\t\t\tdialog.setTitle(\"Proceso Satisfactorio\");\n\t\t\t\tdialog.show();\n\n\t\t\t\ttxtUpdateProductName.setText(\"\");\n\t\t\t\ttxtUpdateProductPrice.setText(\"\");\n\t\t\t\tComboUpdateSize.setValue(\"\");\n\t\t\t\tComboUpdateType.setValue(\"\");\n\t\t\t\tChoiceUpdateIngredients.setValue(\"\");\n\t\t\t\tLabelProductName.setText(\"\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los productos\");\n\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(getClass().getResource(\"Options-window.fxml\"));\n\t\t\t\toptionsFxml.setController(this);\n\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "@FXML\n\tpublic void UpdateClient(ActionEvent event) {\n\t\tClient clientToUpdate = restaurant.returnClient(LabelUpdateClientName.getText());\n\t\tif (!txtUpdateClientNames.getText().equals(\"\") && !txtUpdateClientSurnames.getText().equals(\"\")\n\t\t\t\t&& !txtUpdateClientAdress.getText().equals(\"\") && !txtUpdateClientPhone.getText().equals(\"\")\n\t\t\t\t&& !txtUpdateClientObservations.getText().equals(\"\") && !txtUpdateClientId.getText().equals(\"\")) {\n\n\t\t\ttry {\n\t\t\t\tclientToUpdate.setNames(txtUpdateClientNames.getText());\n\t\t\t\tclientToUpdate.setSurnames(txtUpdateClientSurnames.getText());\n\t\t\t\tclientToUpdate.setAdress(txtUpdateClientAdress.getText());\n\t\t\t\tclientToUpdate.setPhoneNumber(txtUpdateClientPhone.getText());\n\t\t\t\tclientToUpdate.setObservations(txtUpdateClientObservations.getText());\n\t\t\t\tclientToUpdate.setIdNumber(txtUpdateClientId.getText());\n\n\t\t\t\trestaurant.saveClientsData();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Cliente actualizado satisfactoriamente\");\n\t\t\t\tdialog.setTitle(\"Proceso Satisfactorio\");\n\t\t\t\tdialog.show();\n\n\t\t\t\ttxtUpdateClientNames.setText(\"\");\n\t\t\t\ttxtUpdateClientSurnames.setText(\"\");\n\t\t\t\ttxtUpdateClientAdress.setText(\"\");\n\t\t\t\ttxtUpdateClientPhone.setText(\"\");\n\t\t\t\ttxtUpdateClientObservations.setText(\"\");\n\t\t\t\ttxtUpdateClientId.setText(\"\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los datos\");\n\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(getClass().getResource(\"Options-window.fxml\"));\n\t\t\t\toptionsFxml.setController(this);\n\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }", "void updateViewFromModel();", "public String update() {\r\n\t\tuserService.update(userEdit);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"update\";\r\n\t}", "@RequestMapping(\"/recipe/update/{id}\")\n public String updateRecipe(@PathVariable String id, Model model){\n model.addAttribute(\"recipe\", recipeService.findCommandById(new Long(id)));\n \n return \"recipe/recipeForm\";\n }", "public static void updateTimeButtonClicked() {\n Occasion occasion = tableHoliday.getSelectionModel().getSelectedItem();\n\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(null);\n String success = OccasionCommunication.updateOccasion(occasion.getId(), occasion.getDate(), occasion.getOpenTime(),\n occasion.getCloseTime(), occasion.getBuilding().getId());\n if (success.equals(\"Successful\")) {\n alert.hide();\n } else {\n alert.setContentText(success);\n alert.showAndWait();\n }\n }", "public void update(@NotNull AnActionEvent event) {\n project = event.getData(PlatformDataKeys.PROJECT);\n editor = event.getData(PlatformDataKeys.EDITOR);\n\n boolean enabled = project != null && editor != null && canEnable();\n event.getPresentation().setEnabled(enabled);\n }", "@FXML\n\tpublic void UpdateClientAdm(ActionEvent event) {\n\t\tClient clientToUpdate = restaurant.returnClient(LabelUpdateClientNameAdm.getText());\n\t\tif (!txtUpdateClientNamesAdm.getText().equals(\"\") && !txtUpdateClientSurnamesAdm.getText().equals(\"\")\n\t\t\t\t&& !txtUpdateClientAdressAdm.getText().equals(\"\") && !txtUpdateClientPhoneAdm.getText().equals(\"\")\n\t\t\t\t&& !txtUpdateClientObservationsAdm.getText().equals(\"\") && !txtUpdateClientIdAdm.getText().equals(\"\")) {\n\n\t\t\ttry {\n\t\t\t\tclientToUpdate.setNames(txtUpdateClientNamesAdm.getText());\n\t\t\t\tclientToUpdate.setSurnames(txtUpdateClientSurnamesAdm.getText());\n\t\t\t\tclientToUpdate.setAdress(txtUpdateClientAdressAdm.getText());\n\t\t\t\tclientToUpdate.setPhoneNumber(txtUpdateClientPhoneAdm.getText());\n\t\t\t\tclientToUpdate.setObservations(txtUpdateClientObservationsAdm.getText());\n\t\t\t\tclientToUpdate.setIdNumber(txtUpdateClientIdAdm.getText());\n\n\t\t\t\trestaurant.saveClientsData();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Cliente actualizado satisfactoriamente\");\n\t\t\t\tdialog.setTitle(\"Proceso Satisfactorio\");\n\t\t\t\tdialog.show();\n\n\t\t\t\ttxtUpdateClientNamesAdm.setText(\"\");\n\t\t\t\ttxtUpdateClientSurnamesAdm.setText(\"\");\n\t\t\t\ttxtUpdateClientAdressAdm.setText(\"\");\n\t\t\t\ttxtUpdateClientPhoneAdm.setText(\"\");\n\t\t\t\ttxtUpdateClientObservationsAdm.setText(\"\");\n\t\t\t\ttxtUpdateClientIdAdm.setText(\"\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización de los datos\");\n\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(getClass().getResource(\"Administrator-Options-window.fxml\"));\n\t\t\t\toptionsFxml.setController(this);\n\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "@Override\n\tpublic void update(ConfirmDto dto) {\n\t\tsession.update(\"confirm.update\",dto);\n\t}", "@GetMapping(\"/carsAndCustomers/customer/edit/{id}\")\n public String editForm(@PathVariable(\"id\") Integer id, Model model) {\n Customer customer = customerRepository.getOne(id);\n model.addAttribute(\"customer\", customer);\n return \"fragments/editCustomerForm :: editCustomerForm\";\n\n }", "@RequestMapping(value = \"/update/{id}\")\r\n\tpublic ModelAndView update(@PathVariable\r\n\tString id) {\r\n\r\n\t\treturn new ModelAndView(\"user.new\", \"person\", personService.getPerson(id));\r\n\r\n\t}", "@FXML\r\n\tprivate void updateStatus(ActionEvent event) {\r\n\t\tupdateAsset(AssetOperation.STATUS);\r\n\t}", "public void update(){\n\t\tthis.setVisible(true);\n\t}", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "private void updateAction(String taskId) {\n setupPrioritySpinner();\n try {\n QueryBuilder<Task, String> queryBuilder = taskDao.queryBuilder();\n taskForUpdate = taskDao.queryForFirst(queryBuilder.where().eq(Task.TASK_ID, taskId).prepare());\n mTitle.setText(taskForUpdate.getTitle());\n mDescription.setText(taskForUpdate.getDescription());\n mDate.setDate(taskForUpdate.getDate().getTime());\n mPriority.setSelection(taskForUpdate.getPriority());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@RequestMapping(path=\"/actualizaFormulario\")\r\n public String viewUpdateForm(@RequestParam(name=\"id\")int id,Model model)\r\n {\n \tProducto producto=productoDAO.getProducto(id);\r\n \t//Introducimos el producto en el modelo\r\n \tmodel.addAttribute(\"producto\", producto);\r\n \t//Llamamos al formulario de actualizacion\r\n \treturn \"formularioProducto2\";\r\n }", "@GetMapping(\"/edit\")\r\n\tpublic String showEdit(@RequestParam Integer id,Model model)\r\n\t{\r\n\t\tProduct p=service.getOneProduct(id);\r\n\t\tmodel.addAttribute(\"product\", p);\r\n\t\treturn \"ProductEdit\";\r\n\t}", "@ResponseStatus(code=HttpStatus.OK)\r\n\t@RequestMapping(value=\"/update\", method=RequestMethod.GET)\r\n\tpublic void update() {\r\n\t\tSystem.out.println(\"StudentRestController.Update()_________\");\r\n\t}", "public void update() {\n\n\t\tdisplay();\n\t}", "private void updateActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n String sql = \"update user set \"\n + \"iduser = '\"+ id.getText() + \"' , \"\n + \"nama = '\"+ nama.getText() +\"' ,\"\n + \"bagian = '\"+ bagian.getText() +\"' ,\"\n + \"nohp = '\"+ nohp.getText() +\"' , \"\n + \"email = '\"+ email.getText() +\"' where iduser='\"+ id.getText() +\"' \";\n java.sql.Connection conn = (Connection)koneksi.configDB();\n java.sql.PreparedStatement pst = conn.prepareStatement(sql);\n pst.execute();\n JOptionPane.showMessageDialog(null,\"Data Di Update\");\n this.dispose();\n Master_user a = new Master_user();\n a.setVisible(true);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null,e.getMessage());\n Master_user a = new Master_user();\n a.setVisible(true);\n }\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "@RequestMapping(\"/book/edit/{id}\")\n public String edit(@PathVariable Long id, Model model){\n model.addAttribute(\"book\", bookService.getBookById(id));\n return \"bookform\";\n }", "private void showUpdateDialog(String versionDescribe) {\n\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(mActThis);\n\t\talertDialog.setTitle(\"发现新版本\");\n\t\talertDialog.setMessage(versionDescribe);\n\t\talertDialog.setNegativeButton(\"取消\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\talertDialog.setPositiveButton(\"更新\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\talertDialog.show();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tStudentManagement studentManagement =new StudentManagement();\n\t\t\t studentManagement.setModal(true);\n\t\t\t studentManagement.setVisible(true);\n\t\t\t}", "protected abstract IModalView<BeanItem<M>> showEditForm(BeanItem<M> item);", "public static void update(Resource resource){\n String newUpdate;\n String display = \"What would you like to update?\"+\n \"[1] Type: \" + resource.getType() + \"\\n\" +\n \"[2] Title: \" + resource.getName() + \"\\n\" +\n \"[3] Genre: \" + resource.getGenre() + \"\\n\" +\n \"[4] Author: \" + resource.getAuthor() + \"\\n\" +\n \"[5] Year: \" + resource.getYear() + \"\\n\" +\n \"[0] Exit\";\n\n int edit = getIntInput(display, 0,5);\n\n switch(edit){\n case 1:\n newUpdate = edit(\"type\", resource.getType());\n resource.setType(newUpdate);\n break;\n case 2:\n newUpdate = edit(\"title\", resource.getName());\n resource.setName(newUpdate);\n break;\n case 3:\n newUpdate = edit(\"genre\", resource.getGenre());\n resource.setGenre(newUpdate);\n break;\n case 4:\n newUpdate = edit(\"author\", resource.getAuthor());\n resource.setAuthor(newUpdate);\n break;\n case 5:\n newUpdate = edit(\"year\", resource.getYear());\n resource.setYear(newUpdate);\n break;\n case 0:\n break;\n default:\n JOptionPane.showMessageDialog(null, \"should not reach here\");\n }\n }", "public void popEditElement()throws IOException {\n final Stage dialog = new Stage();\n dialog.setTitle(\"Editar nombre\");\n \n Parent root = FXMLLoader.load(getClass().getResource(\"/view/PopEditAttribute.fxml\"));\n \n Scene xscene = new Scene(root);\n \n dialog.setResizable(false);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initOwner((Stage) root.getScene().getWindow());\n \n dialog.setScene(xscene);\n dialog.showAndWait();\n dialog.resizableProperty().setValue(Boolean.FALSE);\n dialog.setResizable(false);\n dialog.close();\n\n }", "@Override\n\tpublic void updateProgessDialog(String title, String message, boolean visible, Integer increment) {\n\t\t\n\t}", "@FXML\n private void updateStudent() {\n System.out.println(\"trying to insert new student to database\");\n DBhandler db = new DBhandler();\n Student s = new Student(\n txfID.getText(),\n txfFirstName.getText(),\n txfLastName.getText(),\n txfAddress.getText(),\n txfZIP.getText(),\n txfZIPloc.getText(),\n txfEmail.getText(),\n txfPhone.getText()\n );\n System.out.println(s.toString());\n db.updateStudentToDatabase(s);\n RecordEditPage.handledStudent=s;\n Cancel(new ActionEvent());\n }", "public void update(Object observable) {\n\tif (model.mainframeValue()) {\n\t this.setVisible(true);\n\t} else {\n\t this.setVisible(false);\n\t}\n }", "Optional<RacePlanForm> partialUpdate(RacePlanForm racePlanForm);", "@Override\n public void update() {\n if ((mLikesDialog != null) && (mLikesDialog.isVisible())) {\n return;\n }\n\n if ((mCommentariesDialog != null) && (mCommentariesDialog.isVisible())) {\n return;\n }\n\n if (!getUserVisibleHint()) {\n return;\n }\n\n updateUI();\n }", "@FXML\n private void openUpdateUser(ActionEvent event) throws InterruptedException {\n\n User userToUpdate = table.getSelectionModel().getSelectedItem();\n UpdateUserController updateUserController = new UpdateUserController();\n\n User user = updateUserController.openUpdateUser(event, userToUpdate);\n profileNavigation.setSelected(false);\n editBtn.setSelected(false);\n\n if (user != null) {\n userList.remove(userToUpdate);\n UsermanagementUtilities.setFeedback(event, user.getName().getFirstName()+LanguageHandler.getText(\"userUpdated\"), true);\n\n\n if (user.getRole() == roleTap) {\n userList.add(user);\n }\n }\n // else {\n // UsermanagementUtilities.setFeedback(event, LanguageHandler.getText(\"userNotUpdated\"), false);\n // }\n }", "@FXML\r\n\tvoid enableEdit(ActionEvent event) {\r\n\t\tupdateUser.setText(\"Update\");\r\n\t\tboxFn.setDisable(false);\r\n\t\tboxLn.setDisable(false);\r\n\t\tdatePicker.setDisable(false);\r\n\t\tcalorieCount.setDisable(false);\r\n \t}", "public void actionPerformed(ActionEvent e){\n\t\t\topenUpdate();\n\t\t}", "public void modificar() {\r\n\r\n ModificaProducto modprodu = new ModificaProducto(vista, true);//C.P.M instanciamos la forma de modificar producto en modo modal y le mandamos al vista \r\n int Opcion = vista.jTbuscar.getSelectedRow();//C.P.M obtenemos los datos de la fila la cual este seleccionada\r\n modprodu.id = vista.jTbuscar.getValueAt(Opcion, 0).toString();//C.P.M se los mandamos a la forma dentro de sus campos\r\n modprodu.jTbcodigobarras.setText(vista.jTbuscar.getValueAt(Opcion, 1).toString());\r\n modprodu.jTproducto.setText(vista.jTbuscar.getValueAt(Opcion, 2).toString());\r\n modprodu.jTbprecio.setText(vista.jTbuscar.getValueAt(Opcion, 3).toString());\r\n modprodu.jTbcaducidad.setText(vista.jTbuscar.getValueAt(Opcion, 4).toString());\r\n modprodu.jTbexistencia.setText(vista.jTbuscar.getValueAt(Opcion, 5).toString());\r\n modprodu.jTbdescripcion2.setText(vista.jTbuscar.getValueAt(Opcion, 6).toString());\r\n modprodu.jTbespecificaciones.setText(vista.jTbuscar.getValueAt(Opcion, 7).toString());\r\n modprodu.setLocationRelativeTo(vista);//C.P.M centramos la forma a la vista\r\n modprodu.setVisible(true);//C.P.M y la asemos visible\r\n }", "private void updateInformation(){\n view.getPrompt().setText(getPrompt());\n view.getScore().setText(getScore());\n }", "@GetMapping(\"/showFormForUpdateRoom\")\r\n\tpublic String showFormForUpdateRoom(@RequestParam(\"roomId\") int theId,\r\n\t\t\t\t\t\t\t\t\tModel theModel) {\n\t\tRoom theRoom = roomService.findById(theId);\r\n\t\t\r\n\t\t// set employee as a model attribute to pre-populate the form\r\n\t\ttheModel.addAttribute(\"room\", theRoom);\r\n\t\t\r\n\t\t// send over to our form\r\n\t\treturn \"/rooms/room-form\";\t\t\t\r\n\t}" ]
[ "0.6075182", "0.60536253", "0.59730035", "0.58975023", "0.58873", "0.5878605", "0.58303976", "0.5811436", "0.5806055", "0.5792296", "0.578338", "0.5777656", "0.57614636", "0.57588005", "0.57274395", "0.568441", "0.5663582", "0.5652618", "0.5627921", "0.56272733", "0.56140536", "0.5607696", "0.55657053", "0.55507123", "0.5548767", "0.55452317", "0.5536489", "0.5533784", "0.55273753", "0.5527269", "0.55092186", "0.5494639", "0.54940385", "0.5463811", "0.5460413", "0.5454982", "0.54383445", "0.5433063", "0.5427426", "0.5425337", "0.5406135", "0.5400383", "0.5392318", "0.53907424", "0.53893274", "0.5388068", "0.53832155", "0.53822505", "0.5377962", "0.5373799", "0.5365633", "0.5362266", "0.5360886", "0.53603834", "0.53514534", "0.5350792", "0.5347986", "0.53384304", "0.53318065", "0.5327535", "0.5325545", "0.5320379", "0.5301198", "0.5298926", "0.52969074", "0.5267913", "0.52672815", "0.52625537", "0.5261017", "0.5252805", "0.52477807", "0.52461755", "0.5227688", "0.5223933", "0.5222152", "0.52187186", "0.5217848", "0.5215896", "0.5213483", "0.5206846", "0.52063", "0.52008826", "0.519512", "0.5179695", "0.51780695", "0.51778084", "0.5173506", "0.5155722", "0.51550955", "0.5147028", "0.5144204", "0.51417434", "0.5138069", "0.51356876", "0.5134213", "0.513105", "0.5130945", "0.5124941", "0.5123102", "0.5122121" ]
0.68084645
0
Delete the selected resource.
private void onDeleteResourceClicked(ResourceDeleteClickedEvent event) throws ROSRSException { if (currentResource != null) { boolean isSketch = updateSketch(event); currentResource.delete(); if (currentResource != currentFolder) { currentResource = currentFolder; } else { List<Folder> list = folderHierarchyModel.getObject(); list.remove(currentFolder); if (list.isEmpty()) { changeFolder(null, event.getTarget()); } else { changeFolder(list.get(list.size() - 1), event.getTarget()); } } if (isSketch) send(getPage(), Broadcast.BREADTH, new SketchEvent(event.getTarget())); } send(getPage(), Broadcast.BREADTH, new ResourceDeletedEvent(event.getTarget())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteResource() {\n }", "@Override\n \tpublic Representation deleteResource() {\n \t\tString interId = (String) this.getRequestAttributes().get(\"interId\");\n \t\tString srcId = (String) this.getRequestAttributes().get(\"sourceId\");\n \t\t\n \t\t// On s'assure qu'il n'est plus prsent en base de donnes\n \t\n \t\tIntervention inter = Interventions.getInstance().getIntervention(interId);\n \t\tList<Source> sources = inter.getSources();\n \t\tfor (int i = 0; i < sources.size(); i++) {\n \t\t\tif (sources.get(i).getUniqueID().equals(srcId)) {\n \t\t\t\tsources.remove(sources.get(i));\n \t\t\t}\n \t\t}\n \t\t\n \t\treturn null;\n \t}", "public abstract boolean deleteResource(String name);", "@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }", "void afterDelete(T resource);", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "private void deleteResource(IResource resource) throws CoreException {\n \t\tif (!resource.exists()) {\n \t\t\treturn;\n \t\t}\n \n \t\tint type = resource.getType();\n \n \t\tif (type == IResource.FOLDER) {\n \t\t\tIFolder folder = (IFolder) resource;\n \t\t\tIResource[] members = folder.members();\n \t\t\tfor (int i = 0; i < members.length; i++) {\n \t\t\t\tdeleteResource(members[i]);\n \t\t\t}\n \t\t\tfolder.delete(true, null);\n \t\t} else if (type == IResource.FILE) {\n \t\t\t((IFile) resource).delete(true, null);\n \t\t} else {\n \t\t\tthrow new ResourceException(IResourceStatus.RESOURCE_WRONG_TYPE, null, \"Wrong resource type\", null);\n \t\t}\n \t}", "private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }", "int deleteByPrimaryKey(Integer resourceid);", "@DELETE\n\tResponse delete();", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "@Override\n public void deletedResource( ResourceEvent event )\n {\n\n }", "public void delete() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"deleteButton\").click();\n\t}", "public void delete() throws NotAuthorizedException, ConflictException,\n\t\t\tBadRequestException {\n\t}", "int deleteByExample(ResourceExample example);", "@DELETE\n public void delete() {\n }", "@DELETE\n public void delete() {\n }", "@Override\n\tpublic int delete(Uri uri, String selection, String[] selectionArgs) {\n\t\tint cnt = 1;\n\t\tmChallengesDB.del();\n\t\treturn cnt;\n\t}", "public String delete() {\r\n\t\tVendorMasterModel model = new VendorMasterModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tboolean result = model.delete(vendorMaster);\r\n\t\tif (result) {\r\n\t\t\taddActionMessage(\"Record Deleted Successfully.\");\r\n\t\t\treset();\r\n\t\t}// end of if\r\n\t\telse {\r\n\t\t\taddActionMessage(\"This record is referenced in other resources.So can't delete.\");\r\n\t\t\treset();\r\n\t\t}// end of else\r\n\t\tmodel.Data(vendorMaster, request);\r\n\t\tmodel.terminate();\r\n\t\tgetNavigationPanel(1); \r\n\t\treturn \"success\";\r\n\t}", "@Override\n\tpublic int delete(Uri uri, String selection, String[] selectionArgs) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int delete(Uri uri, String selection, String[] selectionArgs) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int delete(Uri uri, String selection, String[] selectionArgs) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int delete(Uri uri, String selection, String[] selectionArgs) {\n\t\treturn 0;\n\t}", "@Override\n public void delete()\n {\n }", "public ResponseTranslator delete() {\n setMethod(\"DELETE\");\n return doRequest();\n }", "void delete(InformationResourceFile file);", "@Override\r\n\tpublic void delete(int id) {\n\t\t\r\n\t}", "@Command(\"delete\")\n @NotifyChange({\"events\", \"selectedEvent\"})\n public void delete() {\n if(this.selectedEvent != null) {\n eventDao.delete(this.selectedEvent);\n this.selectedEvent = null;\n }\n }", "public void delete() {\n\n\t}", "@Override\n public void delete(int id) {\n }", "@Override\n\tpublic void delete(int id) {\n\t}", "@Source(\"gr/grnet/pithos/resources/editdelete.png\")\n ImageResource delete();", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\r\n\tpublic Result delete(int id) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}", "@Override\n\tpublic void delete() {\n\n\t}", "@Override\r\n\tpublic int delete(ActionContext arg0) throws Exception {\n\t\treturn 0;\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(\n String resourceGroupName,\n String workspaceName,\n String computeName,\n UnderlyingResourceAction underlyingResourceAction,\n Context context);", "@Override\n\tpublic void delete() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void delete(int id);", "public abstract void onDelete(final ResourceType type, final Integer... resources);", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "public void delete();", "protected ValidatableResponse deleteResource(String path) throws JSONException {\n return given()\n .header(HEADER_AUTHORIZATION, authenticated())\n .delete(path)\n .then()\n .statusCode(204);\n }", "@Override\n\tpublic void delete(String id) throws Exception {\n\n\t}", "@Override\n\tpublic void delete(String id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(String id) {\n\t\t\n\t}", "@Override\n\tpublic void deleteSelected() {\n\n\t}", "@Override\n\t\tpublic void delete() {\n\t\t\tSystem.out.println(\"새로운 삭제\");\n\t\t}", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(Integer id);", "public void delete(Integer id);", "public void delete(Integer id);", "ResponseEntity deleteById(UUID id);", "@Override\n\tpublic void delete(Integer id) {\n\t\t\n\t}", "private void delete() {\n\n\t}", "public void resourceDeleted(Resource item)\n\t{\n\t\tevent(\"ResourceDeletion\",\n\t\t\t item.getId(),\n\t\t\t -1,\n\t\t\t -1,\n\t\t\t false);\n\t}", "public DeleteResourceAction() {\r\n super(\"Delete Safi Resources\");\r\n setToolTipText(\"Deletes physical resources from the current workspace\");\r\n // PlatformUI.getWorkbench().getHelpSystem().setHelp(this,\r\n // IIDEHelpContextIds.DELETE_RESOURCE_ACTION);\r\n setId(ID);\r\n }", "@DELETE\n public void delete() {\n }", "@Override\n\tpublic String delete() throws Exception {\n\t\treturn null;\n\t}", "void delete(E entity, RequestContext context)\n throws TechnicalException, ResourceNotFoundException;", "public void delete(){\r\n\r\n }", "private void deletePet() {\n if (mCurrentPetUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentPetUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentPetUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "@Override\r\n\tpublic void delete() throws DeleteException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void delete(String id) {\n\r\n\t}", "public void delete() {\r\n if (this.selectedTag != null) {\r\n for (int i = uploads.size() -1; i >= 0 ; i--) {\r\n if (this.selectedTag.equals(uploads.get(i).getTag())) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n uploads.remove(i);\r\n break;\r\n }\r\n }\r\n }\r\n }", "void delete(String identifier) throws IOException;", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(\n String resourceGroupName,\n String workspaceName,\n String computeName,\n UnderlyingResourceAction underlyingResourceAction);", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "public void delete()\n {\n call(\"Delete\");\n }", "public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "@Override\n\tpublic void delete(Object entidade) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Serializable id) {\n\t\t\n\t}", "public void doDelete() throws IOException {\n\n // search ressource\n File file = new File(RESOURCE_DIRECTORY + this.url);\n byte[] contentByte = null;\n\n if (file.delete()) {\n System.out.println(\"Le fichier \" + file.getName() + \" a été supprimé\");\n this.statusCode = OK;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"ressourceDeleted.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n } else {\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n sendBodyByte(contentByte);\n }", "public boolean delete();", "@Override\r\n\tpublic void delete(Integer id) {\n\r\n\t}", "public XCapHttpResponse delete(XCapResourceId resourceId)\n throws XCapException\n {\n assertConnected();\n DefaultHttpClient httpClient = null;\n try\n {\n httpClient = createHttpClient();\n\n URI resourceUri = getResourceURI(resourceId);\n HttpDelete deleteMethod = new HttpDelete(resourceUri);\n deleteMethod.setHeader(\"Connection\", \"close\");\n\n if (logger.isDebugEnabled())\n {\n String logMessage = String.format(\n \"Deleting resource %1s from the server\",\n resourceId.toString()\n );\n logger.debug(logMessage);\n }\n HttpResponse response = httpClient.execute(deleteMethod);\n return createResponse(response);\n }\n catch (IOException e)\n {\n String errorMessage = String.format(\n \"%1s resource cannot be deleted\",\n resourceId.toString());\n throw new XCapException(errorMessage, e);\n }\n finally\n {\n if(httpClient != null)\n httpClient.getConnectionManager().shutdown();\n }\n }", "public void delete() {\n\t\tcp.delete();\n\t}", "@Override\n\tpublic void delete(String id) {\n\n\t}", "@Override\r\n\tpublic String delete() {\n\t\treturn \"delete\";\r\n\t}", "@Override\n\tpublic void delete(Integer id) {\n\n\t}", "private static void deleteResource(ProjectElement element) {\r\n \t\tResource resource = element.eResource();\r\n \t\tif (resource != null) {\r\n resource.getContents().remove(element);\r\n resource.unload();\r\n } \r\n \t}", "private void delete(ActionEvent e){\r\n if (client != null){\r\n ConfirmBox.display(\"Confirm Deletion\", \"Are you sure you want to delete this entry?\");\r\n if (ConfirmBox.response){\r\n Client.deleteClient(client);\r\n AlertBox.display(\"Delete Client\", \"Client Deleted Successfully\");\r\n // Refresh view\r\n refresh();\r\n \r\n }\r\n }\r\n }", "@FXML\n private void deleteRow(ActionEvent event){\n if(facilitiesView.getSelectionModel().getSelectedItem()==null){\n errorBox(\"Feil\", \"Det er ingen rader som er markert\", \"Vennligst marker en rad i tabellen\");\n }\n else{\n Alert mb = new Alert(Alert.AlertType.CONFIRMATION);\n mb.setTitle(\"Bekreft\");\n mb.setHeaderText(\"Du har trykket slett på \"+ facilitiesView.getSelectionModel().getSelectedItem().getFacilityName());\n mb.setContentText(\"Ønsker du virkerlig å slette dette lokalet?\");\n mb.showAndWait().ifPresent(response -> {\n if(response== ButtonType.OK){\n observableList.remove(facilitiesView.getSelectionModel().getSelectedItem());\n\n File file = new File(EditedFiles.getActiveFacilityFile());\n file.delete();\n try {\n WriterThreadRunner.WriterThreadRunner(getFacilities(), EditedFiles.getActiveFacilityFile());\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n }\n });\n }\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 final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}", "@Override\n\tpublic void delete(Serializable id) {\n\n\t}" ]
[ "0.7853644", "0.7008316", "0.6939397", "0.69213814", "0.69013333", "0.6814237", "0.67280596", "0.6711602", "0.67067873", "0.6658446", "0.6652106", "0.66513014", "0.6646631", "0.6606007", "0.65107477", "0.6503246", "0.6503246", "0.6500649", "0.6486571", "0.6477172", "0.6477172", "0.6477172", "0.6477172", "0.6476951", "0.6476565", "0.6469547", "0.6468437", "0.64373887", "0.64173687", "0.6411461", "0.6393481", "0.63914365", "0.6387484", "0.6387484", "0.6387484", "0.6387484", "0.63786256", "0.63783604", "0.636475", "0.6363223", "0.6362089", "0.6360759", "0.6336016", "0.6335645", "0.63327104", "0.63327104", "0.63327104", "0.63327104", "0.63327104", "0.63327104", "0.63218325", "0.63154536", "0.6299388", "0.6299388", "0.62965924", "0.6293853", "0.62911624", "0.62911624", "0.62911624", "0.62911624", "0.62911624", "0.62828934", "0.62828934", "0.62828934", "0.6279228", "0.6278472", "0.6277356", "0.62754405", "0.6274062", "0.62736946", "0.6273173", "0.6265013", "0.62643623", "0.6262302", "0.6261008", "0.6260879", "0.62592214", "0.6253651", "0.6250696", "0.62500507", "0.6246447", "0.6246447", "0.62447804", "0.6244392", "0.6242327", "0.62394726", "0.62319696", "0.62259704", "0.6223538", "0.622345", "0.62142485", "0.6201155", "0.61924964", "0.61848134", "0.6183786", "0.61787814", "0.6174351", "0.6172893", "0.6167644", "0.6166925" ]
0.7015833
1
Move a resource to a folder.
private void onResourceMove(ResourceMoveEvent event) throws ROSRSException, ROException { if (currentFolder != null) { FolderEntry entry = null; for (FolderEntry e : currentFolder.getFolderEntries().values()) { if (e.getResource().equals(currentResource)) { entry = e; break; } } if (entry != null) { entry.delete(); } } if (!event.getFolder().isLoaded()) { event.getFolder().load(); } event.getFolder().addEntry(currentResource, null); send(getPage(), Broadcast.BREADTH, new ResourceMovedEvent(event.getTarget())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void moveFile(String pathToFile, String pathDirectory);", "void move(Path repoRoot, Path source, Path target);", "private Promise<Void> moveResource(final Resource resource, final Path destination) {\n return resource.move(destination)\n .thenPromise((Function<Resource, Promise<Void>>)ignored -> promises.resolve(null))\n .catchErrorPromise(error -> {\n\n //resource may already exists\n if (error.getMessage().contains(\"exists\")) {\n\n //create dialog with overwriting option\n return createFromAsyncRequest((RequestCall<Void>)callback -> {\n\n //handle overwrite operation\n final ConfirmCallback overwrite = () -> {\n\n //copy with overwriting\n resource.move(destination, true).then(ignored -> {\n callback.onSuccess(null);\n }).catchError(error1 -> {\n callback.onFailure(error1.getCause());\n });\n };\n\n //skip this resource\n final ConfirmCallback skip = () -> callback.onSuccess(null);\n\n //change destination name\n final ConfirmCallback rename = () ->\n dialogFactory.createInputDialog(\"Enter new name\", \"Enter new name\",\n value -> {\n final Path newPath = destination.parent().append(value);\n\n moveResource(resource, newPath)\n .then(callback::onSuccess)\n .catchError(error1 -> {\n callback.onFailure(error1.getCause());\n });\n },\n null).show();\n\n dialogFactory.createChoiceDialog(\"Error\",\n error.getMessage(),\n \"Overwrite\",\n \"Skip\",\n \"Change Name\",\n overwrite,\n skip,\n rename).show();\n });\n\n } else {\n //notify user about failed copying\n notificationManager.notify(\"Error moving resource\", error.getMessage(), FAIL, FLOAT_MODE);\n\n return promises.resolve(null);\n }\n\n });\n }", "@Override\r\n\tpublic void move(String srcAbsPath, String destAbsPath)\r\n\t\t\tthrows ItemExistsException, PathNotFoundException,\r\n\t\t\tVersionException, ConstraintViolationException, LockException,\r\n\t\t\tRepositoryException {\n\t\t\r\n\t}", "private RestNodeModel moveNode(ContentModel node, FolderModel targetFolder)\n {\n RestNodeBodyMoveCopyModel moveBody = new RestNodeBodyMoveCopyModel();\n moveBody.setTargetParentId(targetFolder.getNodeRef());\n return restClient.authenticateUser(testUser).withCoreAPI().usingNode(node).move(moveBody);\n }", "@Test\r\n\tpublic void resource_MoveTests() {\n\t\tLibraryNode srcLib = ml.createNewLibrary(pc, \"ResourceTestLib\");\r\n\t\tLibraryNode destLib = ml.createNewLibrary(pc, \"ResourceTestLib2\");\r\n\t\tBusinessObjectNode bo = null;\r\n\t\tfor (Node n : srcLib.getDescendants_LibraryMembers())\r\n\t\t\tif (n instanceof BusinessObjectNode) {\r\n\t\t\t\tbo = (BusinessObjectNode) n;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tResourceNode resource = ml.addResource(bo);\r\n\t\tassertTrue(\"Resource created must not be null.\", resource != null);\r\n\t\tml.check(resource);\r\n\t\tml.check(srcLib);\r\n\r\n\t\t// When - moved to destination library\r\n\t\tsrcLib.moveMember(resource, destLib);\r\n\t\t// Then - it is moved and is valid\r\n\t\tassertTrue(!srcLib.contains(resource));\r\n\t\tassertTrue(destLib.contains(resource));\r\n\t\tml.check(resource);\r\n\t\tml.check(srcLib);\r\n\t\tml.check(destLib);\r\n\t}", "public void move(String targetNodeId, String targetPath);", "@Override\n\tpublic void moveObject(String sourceBucketName, String sourceObjectPath, String destinationBucketName,\n\t\t\tString destinationObjectPath) {\n\t\t\n\t}", "public void moveFile(String url) throws IOException {\n\n\t\tSystem.out.println(\"folder_temp : \" + folder_temp);\n\t\tPath Source = Paths.get(folder_temp + url);\n\t\tPath Destination = Paths.get(folder_photo + url);\n\t\tSystem.out.println(\"folder_photo : \" + folder_photo);\n\n\t\tif (Files.exists(Source)) {\n\t\t\t// Files.move(Source, Destination,\n\t\t\t// StandardCopyOption.REPLACE_EXISTING);\n\t\t\t// cpie du fichiet au lieu de deplaacer car il est enn coiurs\n\t\t\t// d'utilisation\n\t\t\tFiles.copy(Source, Destination, StandardCopyOption.REPLACE_EXISTING);\n\t\t}\n\n\t}", "void moveFolder(Long sourceId, Long targetFolderId, List<SolutionParam> solutions);", "private static String moveFiles(File origen, Long id, String pref) throws Exception{\n\n String customImgPath = Play.applicationPath.getAbsolutePath()+\"/public/images/custom/\";\n\n String destinationName = origen.getName();\n if(destinationName.lastIndexOf(\".\") != -1 && destinationName.lastIndexOf(\".\") != 0)\n destinationName = \"u\"+id + \"_\"+pref+ Calendar.getInstance().getTimeInMillis() + \".\" +destinationName.substring(destinationName.lastIndexOf(\".\")+1);\n\n File destination = new File(customImgPath, destinationName);\n\n if(destination.exists()){\n destination.delete();\n }\n FileUtils.moveFile(origen, destination);\n\n return destinationName;\n }", "public void moveTo(Folder targetFolder) {\n if (targetFolder != this.parent) {\n Path sourcePath = this.toPath();\n this.parent.getValue().remove(this);\n String newName = this.newName(targetFolder);\n\n Path targetPath = new File(targetFolder.getPath() + File.separator + newName).toPath();\n\n try {\n Files.move(sourcePath, targetPath);\n } catch (IOException e) {\n }\n\n this.name = newName;\n targetFolder.addImage(this);\n }\n }", "@Test\n public void testMoveFolder() {\n System.out.println(\"moveFolder\");\n String folderToMove = \"\";\n String destinationFolder = \"\";\n FileSystemStorage instance = null;\n instance.moveFolder(folderToMove, destinationFolder);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "void moveFileToDirectoryWithConvertedFiles(String pathToFile);", "public void moveDirectory(String source, String target) throws IOException{\n Path sourceFilePath = Paths.get(PWD.getPath()+\"/\"+source);\n Path targetFilePath = Paths.get(PWD.getPath()+\"/\"+target);\n //using builtin move function which uses Paths\n Files.move(sourceFilePath,targetFilePath);\n }", "private void moveToFinal(String imageName, String sourceDirectory,\n\t\t\t\tString destinationDirectory) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\ttry {\n\n\t\t\t\tFile afile = new File(sourceDirectory + imageName);\n\t\t\t\tFile bfile = new File(destinationDirectory + imageName);\n\t\t\t\tif (afile.renameTo(bfile)) {\n\t\t\t\t\tSystem.out.println(\"File is moved successful!\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"File is failed to move!\");\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}", "void moveFile(String sourceName, String destinationName, boolean overwrite) throws IOException;", "public OutputResponse mv(String oldPath, String newPath){\n String command = String.format(\"mv -b %s %s\", oldPath, newPath); // By default, backup\n return jobTarget.runCommand( command );\n }", "public void objServiceMove(String sourceObjectPathString,\r\n\t\t\tString targetLocPathString, String sourceLocPathString)\r\n\t\t\t\t\tthrows ServiceException {\n\t\tObjectPath objPath = new ObjectPath(sourceObjectPathString);\r\n\t\tObjectIdentity<ObjectPath> docToCopy = new ObjectIdentity<ObjectPath>();\r\n\t\tdocToCopy.setValue(objPath);\r\n\t\tdocToCopy.setRepositoryName(REPOSITORY_NAME);\r\n\r\n\t\t// identify the folder to move from\r\n\t\tObjectPath fromFolderPath = new ObjectPath();\r\n\t\tfromFolderPath.setPath(sourceLocPathString);\r\n\t\tObjectIdentity<ObjectPath> fromFolderIdentity = new ObjectIdentity<ObjectPath>();\r\n\t\tfromFolderIdentity.setValue(fromFolderPath);\r\n\t\tfromFolderIdentity.setRepositoryName(REPOSITORY_NAME);\r\n\t\tObjectLocation fromLocation = new ObjectLocation();\r\n\t\tfromLocation.setObjectIdentity(fromFolderIdentity);\r\n\r\n\t\t// identify the folder to move to\r\n\t\tObjectPath folderPath = new ObjectPath();\r\n\t\tfolderPath.setPath(targetLocPathString);\r\n\t\tObjectIdentity<ObjectPath> toFolderIdentity = new ObjectIdentity<ObjectPath>();\r\n\t\ttoFolderIdentity.setValue(folderPath);\r\n\t\ttoFolderIdentity.setRepositoryName(REPOSITORY_NAME);\r\n\t\tObjectLocation toLocation = new ObjectLocation();\r\n\t\ttoLocation.setObjectIdentity(toFolderIdentity);\r\n\r\n\t\tOperationOptions operationOptions = null;\r\n\t\tthis.objectService.move(new ObjectIdentitySet(docToCopy),\r\n\t\t\t\tfromLocation, toLocation, new DataPackage(), operationOptions);\r\n\r\n\t}", "private void moveFile(File mp3, String finishDir, String artist, String album){\n\t\tString destinationFolder = finishDir + \"\\\\\" + \"Sorted Music\\\\\" + \n\t\t\t\tartist.substring(0, 1).toUpperCase() + \"\\\\\" + artist;\n\t\tnew File(destinationFolder).mkdir();\n\t\tdestinationFolder += \"\\\\\" + album;\n\t\tnew File(destinationFolder).mkdir();\n\t\t\n\t\tmp3.renameTo(new File(destinationFolder + \"\\\\\" + mp3.getName()));\n\t}", "@Override\n\tpublic URI move(URI uri, URI toURI) throws StorageSecuirtyException,\n\t\t\tResourceAccessException {\n\t\treturn null;\n\t}", "@Override\n public void moveResourceToContainer(ResourceContainer container, Shelf from, ResourceSingle resource, int amount) throws IllegalCupboardException {\n if(container == null || from == null || resource == null)\n throw new NullPointerException();\n if(amount <= 0)\n throw new IllegalArgumentException(\"The amount must be positive\");\n if(!contains(from))\n throw new NoSuchElementException(\"Container \" + from.getId() + \" does not contain \" + amount + \" \" + resource.getId());\n\n try{\n from.moveTo(container, resource, amount);\n }catch(IllegalResourceTransferException e ){\n throw new IllegalCupboardException(\"Resource transaction cannot be performed\");\n }\n }", "public void onResourceMoved(final ResourceEvent resourceEvent);", "public void move(String source, String dest)\n throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException {\n if (!(repository.getDataSource() instanceof ExternalDataSource.Writable)) {\n throw new UnsupportedRepositoryOperationException();\n }\n if (source.equals(dest)) {\n return;\n }\n ExternalData oldData = repository.getDataSource().getItemByPath(source);\n ((ExternalDataSource.Writable) repository.getDataSource()).move(source, dest);\n ExternalData newData = repository.getDataSource().getItemByPath(dest);\n if (oldData.getId().equals(newData.getId())) {\n return;\n }\n getRepository()\n .getStoreProvider()\n .getIdentifierMappingService()\n .updateExternalIdentifier(oldData.getId(), newData.getId(), getRepository().getProviderKey(),\n getRepository().getDataSource().isSupportsHierarchicalIdentifiers());\n }", "public void move(Directory directory) throws IOException {\n Path oldPath = Paths.get(photo.getUrl());\n Path newPath =\n Paths.get(directory.getPath() + File.separator + photo.getTagName() + photo.getExtension());\n if (oldPath != newPath) {\n Files.move(oldPath, newPath, ATOMIC_MOVE);\n photo.setUrl(newPath.toString());\n directory.add(photo);\n }\n }", "void moveFileToDirectoryNotValidFiles(String pathToFile);", "@PostMapping(\"/movefolder\")\n public String moveFolder(@RequestParam String currentPath, @RequestParam(name = \"movedFolders\") List<String> folders, @RequestParam(name = \"ft_1_active\") String destination, RedirectAttributes redirectAttributes) {\n if(null != folders && folders.size() > 0) {\n ArrayList<String> successMessages = new ArrayList<>();\n ArrayList<String> errorMessages = new ArrayList<>();\n logger.log(Level.INFO, \"Moving folder(s)...\");\n for (String folder : folders) {\n if (uiCommandService.moveFile(folder, destination)) {\n successMessages.add(\"Successfully moved \" + new File(folder).getName() + \" to \" + destination + \"!\");\n } else {\n errorMessages.add(\"Could not move \" + new File(folder).getName() + \" to \" + destination + \"!\");\n }\n }\n logger.log(Level.INFO, \"Finished moving folder(s)!\");\n redirectAttributes.addFlashAttribute(\"success_messages\",successMessages);\n redirectAttributes.addFlashAttribute(\"error_messages\",errorMessages);\n }\n return \"redirect:/imageview?location=\" + currentPath.replace(\"\\\\\", \"/\");\n }", "public int Move(String sSourcePath, String sDestinationPath, int EXISTING_FILE_ACTION) {\n int iRetVal = 0;\n int iCopyCount = 0;\n int iDeleteCount = 0;\n try {\n\n //check if source & destination path are same.\n if (sSourcePath.equalsIgnoreCase(sDestinationPath)) {\n iRetVal = 0;\n }\n\n //copying file for movement\n iCopyCount = Copy(sSourcePath, sDestinationPath, EXISTING_FILE_ACTION);\n if (iCopyCount > 0) {\n iDeleteCount = Delete(sSourcePath);\n }\n\n if (iCopyCount == iDeleteCount) {\n iRetVal = iCopyCount;\n } else if (iCopyCount > iDeleteCount) {\n iRetVal = iDeleteCount;\n } else if (iCopyCount < iDeleteCount) {\n iRetVal = iCopyCount;\n }\n\n } catch (Exception exp) {\n println(\"move : \" + exp.toString());\n iRetVal = 0;\n } finally {\n return iRetVal;\n }\n }", "public static void moveFile(File source, File destination) throws Exception {\n\tif (destination.exists()) {\n\t destination.delete();\n\t}\n\tsource.renameTo(destination);\n }", "public String moveSheetToFolder(String token, String sheetID, String folderID) throws IOException, GeneralSecurityException {\n Drive service = getDriveService(token);\n File file = service.files().get(sheetID)\n .setFields(\"parents\")\n .execute();\n\n StringBuilder previousParents = new StringBuilder();\n for (String parent : file.getParents()) {\n previousParents.append(parent);\n previousParents.append(',');\n }\n\n file = service.files().update(sheetID, null)\n .setAddParents(folderID)\n .setRemoveParents(previousParents.toString())\n .setFields(\"id, parents\")\n .execute();\n\n System.out.println(\"Moved from location: \" + previousParents.toString() + \" to location: \" + FOLDER_NAME);\n\n return \"Sheet: \" + SPREADSHEET_NAME + \" was moved from location: \" + previousParents.toString() + \" to location: \" + FOLDER_NAME;\n }", "public boolean move(File dest) {\n\t\tboolean result = false;\n\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (!dest.exists()) dest.mkdirs();\n\n\t\t\t\tif (dest.isDirectory()) dest = new File(dest.getAbsolutePath().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\t\t\t\telse if (dest.isFile()) dest = new File(dest.getParent().replace(\"\\\\\", \"/\") + \"/\" + this.getName());\n\n\t\t\t\tif (dest.exists()) {\n\t\t\t\t\tSystem.err.println(\"directory is exist\");\n\t\t\t\t\t//this.delete(dest);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.renameTo(dest);\n\t\t\t}\n\n\t\t\tresult = true;\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}", "private static void mover(String nombre, String directorio) {\n\t\tFile archivo = new File(nombre);\n\t\tFile dir = new File(directorio);\n\t\tboolean correcto = archivo.renameTo(new File(dir, \n\t\t\t\tarchivo.getName()));\n\t\tif (!correcto) {\n\t\t\tSystem.out.println(\"--> El fichero no se ha podido \" +\n\t\t\t\t\t\"mover\");\n\t\t}\n\t}", "@Test\n public void testMove() throws Exception {\n allow(path, privilegesFromNames(new String[] {\n Privilege.JCR_ADD_CHILD_NODES,\n Privilege.JCR_NODE_TYPE_MANAGEMENT}));\n try {\n move(childNPath, destPath);\n fail(\"Move requires addChildNodes and removeChildNodes privilege.\");\n } catch (AccessDeniedException e) {\n // success.\n }\n }", "public void moveEntry (String oldPath, String newPath) throws IOException\n\t{\n\t\tString alt = prepareLocation (oldPath);\n\t\tString neu = prepareLocation (newPath);\n\t\t\n\t\tArchiveEntry entry = getEntryByLocation (alt);\n\t\tif (entry == null)\n\t\t\tthrow new IOException (\"no such entry in archive\");\n\t\t\n\t\tboolean wasMain = mainEntries.contains (entry);\n\t\tentries.remove (alt);\n\t\t\n\t\tPath neuPath = zipfs.getPath (neu).normalize ();\n\t\tFiles.createDirectories (neuPath.getParent ());\n\t\tFiles.move (zipfs.getPath (alt).normalize (), neuPath,\n\t\t\tStandardCopyOption.ATOMIC_MOVE);\n\t\tArchiveEntry newEntry = new ArchiveEntry (this, neuPath,\n\t\t\tentry.getFormat ());\n\t\t\n\t\tentries.put (neu, newEntry);\n\t\tif (wasMain)\n\t\t{\n\t\t\taddMainEntry (newEntry);\n\t\t}\n\t\t\n\t\t// move meta data\n\t\tList<MetaDataObject> meta = entry.getDescriptions ();\n\t\tfor (MetaDataObject m : meta)\n\t\t{\n\t\t\tnewEntry.addDescription (m);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args){\nFile from = new File(\"d:/prac/shubha.txt\");\r\n//rename and change the file and folder\r\nFile to = new File(\"d:/prac/Sub1/shubha.txt\");\r\n//Rename\r\nif (from.renameTo(to))\r\nSystem.out.println(\"Successfully Moved the file\");\r\nelse\r\nSystem.out.println(\"Error while moving the file\");\r\n}", "public void moveTo(CollectionResource arg0, String arg1)\n\t\t\tthrows ConflictException {\n\t}", "private void moveFilesToDiffDirectory(Path sourcePath, Path destinationPath) {\n try {\n Files.move(sourcePath, destinationPath,\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n //moving file failed.\n e.printStackTrace();\n }\n }", "public static void moveFile(Component parentComponent, String source, String destination)\r\n {\r\n File des = new File(destination);\r\n File src = new File(source);\r\n try(FileOutputStream fout = new FileOutputStream(des); FileInputStream in = new FileInputStream(src))\r\n {\r\n BufferedInputStream bin = new BufferedInputStream(in);\r\n byte[] pic = new byte[(int)src.length()];\r\n bin.read(pic, 0, pic.length - 1);\r\n des.createNewFile();\r\n fout.write(pic, 0, pic.length - 1);\r\n fout.flush();\r\n JOptionPane.showMessageDialog(parentComponent, \"File Successfully Copied!\");\r\n }\r\n catch(IOException xcp)\r\n {\r\n xcp.printStackTrace(System.err);\r\n }\r\n }", "@NonNull\n Completable renameFolder(@NonNull String oldName, @NonNull String newName);", "public boolean move(String dest) {\n\t\treturn this.move(new File(dest));\n\t}", "public static void createFolder(IResource res) {\r\n \t\tif (res instanceof IFolder) {\r\n \t\t\tIFolder folder=(IFolder)res;\r\n \t\t\t\r\n \t\t\tif (folder.exists() == false) {\r\n \t\t\t\tcreateFolder(folder.getParent());\r\n \r\n \t\t\t\ttry {\r\n \t\t\t\t\tfolder.create(true, true,\r\n \t\t\t\t\t\t\tnew org.eclipse.core.runtime.NullProgressMonitor());\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 \t\t} else if (res.getParent() != null) {\r\n \t\t\tcreateFolder(res.getParent());\r\n \t\t}\r\n \t}", "@Test\r\n public void moveToFileWithSameName() {\r\n currentDirectory.addNewFile(\"file\");\r\n Dir dirWithFile = currentDirectory.getSubDirectoryByName(\"child\");\r\n File fileWithContents = dirWithFile.getFileByName(\"file\");\r\n fileWithContents.setContent(\"content\");\r\n command.executeCommand(\"file\", \"child/file\", root, currentDirectory);\r\n File fileInRoot = currentDirectory.getFileByName(\"file\");\r\n // content in file in root is removed\r\n assertTrue(fileInRoot.getContents().equals(\"\"));\r\n }", "@Test\n public void testMove2() throws Exception {\n allow(path, modifyChildCollection);\n try {\n move(childNPath, destPath);\n fail(\"Move requires addChildNodes and removeChildNodes privilege.\");\n } catch (AccessDeniedException e) {\n // success.\n }\n }", "private void copyOrMove(Action action, Path dir) throws IOException {\n\n try {\n if (action == Action.COPY) {\n Path newdir = target.resolve(source.relativize(dir));\n Files.copy(dir, newdir, copyMoveOptions);\n } else if (action == Action.MOVE) {\n Path newdir = target.resolve(source.relativize(dir));\n Files.move(dir, newdir, copyMoveOptions);\n }\n } catch (AtomicMoveNotSupportedException e) {\n // Remove the atomic move from the list and try again\n List<CopyOption> optionsTemp = Arrays.asList(copyMoveOptions);\n optionsTemp.remove(StandardCopyOption.ATOMIC_MOVE);\n copyMoveOptions = optionsTemp.toArray(new CopyOption[optionsTemp.size()]);\n\n copyOrMove(action, dir);\n }\n\n }", "public void moveObject(\n String repositoryId,\n String sourceLocation,\n String sourceName,\n String publicType,\n String destinationLocation\n ) throws Exception {\n val treesDao = context.getBean(TreesDao.class, iomConnection);\n val srcTrees = treesDao.getTreesByPath(repositoryId, sourceLocation);\n val dstTrees = treesDao.getTreesByPath(repositoryId, destinationLocation);\n \n if (srcTrees.size() == 0) {\n throw new Exception(\"Source location is not found: \" + sourceLocation);\n }\n if (dstTrees.size() == 0) {\n throw new Exception(\"Destination location is not found: \" + destinationLocation);\n }\n val srcTree = srcTrees.get(0);\n val dstTree = dstTrees.get(0);\n // check if locations match\n if (srcTree.getId().equals(dstTree.getId())) return;\n // check source and destination folder permissions\n val authorizationDao = context.getBean(AuthorizationDao.class, iomConnection);\n if (!authorizationDao.isAuthorized(\"Tree\", srcTree.getId(), AuthorizationDao.PERMISSION_WRITE_MEMBER_METADATA)) {\n throw new Exception(\"Current user is not authorized for changing source folder content\");\n }\n if (!authorizationDao.isAuthorized(\"Tree\", dstTree.getId(), AuthorizationDao.PERMISSION_WRITE_MEMBER_METADATA)) {\n throw new Exception(\"Current user is not authorized for changing destination folder content\");\n }\n\n val srcSearchParams = new SearchParams();\n srcSearchParams.setLocationFolderIds(treesDao.collectTreeIds(srcTrees, false).toArray(new String[0]));\n srcSearchParams.setNameEquals(sourceName);\n srcSearchParams.setPublicTypes(new String[] { publicType });\n\n val searchDao = context.getBean(SearchDao.class, iomConnection);\n val srcObjects = searchDao.getFilteredObjects(repositoryId, srcSearchParams);\n if (srcObjects.size() == 0) {\n throw new Exception(\"Source object with name '\" + sourceName + \"' was not found in location '\" + sourceLocation + \"'\");\n }\n if (srcObjects.size() > 1) {\n throw new Exception(\"More than one object with name '\" + sourceName + \"' was found in location '\" + sourceLocation + \"'\");\n }\n\n String template = \"<MULTIPLE_REQUESTS>%s</MULTIPLE_REQUESTS>\";\n\n String updateTemplate = \"\"\n + \"<UpdateMetadata>\"\n + \" <Metadata>\"\n + \" <Tree Id='%1$s'>\"\n + \" <Members Function='%2$s'>%3$s</Members>\"\n + \" </Tree>\"\n + \" </Metadata>\"\n + \" <NS>SAS</NS>\"\n + \" <Flags>\" + MetadataUtil.OMI_TRUSTED_CLIENT + \"</Flags>\"\n + \" <Options/>\"\n + \"</UpdateMetadata>\"\n ;\n\n String srcObjectXml = srcObjects.get(0).toObjRefXml();\n\n String cutRequest = String.format(updateTemplate, srcTree.getId(), \"Remove\", srcObjectXml);\n String pasteRequest = String.format(updateTemplate, dstTree.getId(), \"Append\", srcObjectXml);\n\n String request = String.format(template, cutRequest + pasteRequest);\n\n IOMI iOMI = iomConnection.getIOMIConnection();\n val outputMeta = new StringHolder();\n int rs = iOMI.DoRequest(request, outputMeta);\n if (rs != 0) {\n throw new Exception(\"DoRequest returned \" + rs + \" instead of 0\");\n }\n }", "public static void moveFile(File toMove, File target) throws IOException {\n\n\t\tif (toMove.renameTo(target))\n\t\t\treturn;\n\n\t\tif (toMove.isDirectory()) {\n\t\t\ttarget.mkdirs();\n\t\t\tcopyRecursively(toMove, target);\n\t\t\tdeleteRecursively(toMove);\n\t\t} else {\n\t\t\tcopyFile(toMove, target);\n\t\t\tdeleteFile(toMove);\n\t\t}\n\t}", "@Override\r\n\tpublic boolean moveFile(String srcfilePath, String destfilePath) throws FileSystemUtilException {\r\n\t\tlogger.debug(\"Begin: \" + getClass().getName() + \":moveFile()\");\r\n\t\ttry {\r\n\t\t\tconnect(); \r\n\t\t\tString command = \"mv \" + srcfilePath + \" \" + destfilePath;\r\n\t\t\tint results = executeSimpleCommand(command);\r\n\t\t\tdisconnect();\r\n\t\t\tlogger.debug(\"End: \" + getClass().getName() + \":moveFile()\");\r\n\t\t\tif (results == 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t} catch (FileSystemUtilException e) {\r\n\t\t\tdisconnect();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\r\n\t}", "private void selectedFolderMovedFromNavTree(Folder selectedFolder, Folder destinationFolder) {\n Folder parentFolder = view.getParentFolder(selectedFolder);\n\n if (DiskResourceUtil.isDescendantOfFolder(parentFolder, destinationFolder)) {\n // The destination is under the parent, so if we prune the parent and set the destination\n // as the selected folder, the parent will lazy-load down to the destination.\n view.removeChildren(parentFolder);\n } else if (DiskResourceUtil.isDescendantOfFolder(destinationFolder, parentFolder)) {\n // The parent is under the destination, so we only need to view the destination folder's\n // contents and refresh its children.\n presenter.doRefreshFolder(destinationFolder);\n } else {\n // Refresh the parent folder since it has lost a child.\n presenter.doRefreshFolder(parentFolder);\n // Refresh the destination folder since it has gained a child.\n presenter.doRefreshFolder(destinationFolder);\n }\n\n // View the destination folder's contents.\n presenter.setSelectedFolderByPath(destinationFolder);\n }", "public boolean moveFile(final Uri source, final Uri target) throws IOException\n\t{\n\t\tif (FileUtil.isFileScheme(target) && FileUtil.isFileScheme(target))\n\t\t{\n\t\t\tFile from = new File(source.getPath());\n\t\t\tFile to = new File(target.getPath());\n\t\t\treturn moveFile(from, to);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tboolean success = copyFile(source, target);\n\t\t\tif (success) {\n\t\t\t\tsuccess = deleteFile(source);\n\t\t\t}\n\t\t\treturn success;\n\t\t}\n\t}", "private void prepareFolder(String name, String newFolderName) {\n }", "void move(IRodinElement container, IRodinElement sibling, String rename,\n\t\t\tboolean replace, IProgressMonitor monitor) throws RodinDBException;", "protected VRL mv(VRL vrl, String newNameOrPath, boolean nameIsPath)\n throws VlException {\n throw new nl.uva.vlet.exception.NotImplementedException(\n \"Cloud storage services don't support move or rename!\");\n\n }", "int move(int pileSize) ;", "private static void moveFiles(String src, String dest, int Num) // \n\t{\n\t File directoryPath = new File(src);\n\t \n\t // Creating filter for directories files, to select files only\n\t FileFilter fileFilter = new FileFilter(){\n\t public boolean accept(File dir) \n\t { \n\t if (dir.isFile()) \n\t {\n\t return true;\n\t } \n\t else \n\t {\n\t return false;\n\t }\n\t }\n\t }; \n\t \n\t // Get list of files in the source folder\n\t File[] list = directoryPath.listFiles(fileFilter);\n\t \n\t int i = 0;\n\t \n\t // Move Num file to destination folder\n\t while ((i < Num) && (i < list.length))\n\t {\n\t \tString srcFileName = src + \"/\" + list[i].getName();\n\t \tString destFileName = dest + \"/\" + list[i].getName();\n\t \tmoveFile(srcFileName, destFileName);\n\t \ti++;\t \t\n\t } \n\t}", "@Test\n\tpublic void testMove_1()\n\t\tthrows Exception {\n\t\tDLLocalServiceImpl fixture = new DLLocalServiceImpl();\n\t\tfixture.groupLocalService = new GroupLocalServiceWrapper(new GroupLocalServiceImpl());\n\t\tfixture.hook = new CMISHook();\n\t\tfixture.dlFolderService = new DLFolderServiceWrapper(new DLFolderServiceImpl());\n\t\tString srcDir = \"\";\n\t\tString destDir = \"\";\n\n\t\tfixture.move(srcDir, destDir);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: com.liferay.documentlibrary.service.impl.DLLocalServiceImpl\n\t\t// at java.net.URLClassLoader.findClass(Unknown Source)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Unknown Source)\n\t}", "@Test\n\tpublic void testMove_2()\n\t\tthrows Exception {\n\t\tDLLocalServiceImpl fixture = new DLLocalServiceImpl();\n\t\tfixture.groupLocalService = new GroupLocalServiceWrapper(new GroupLocalServiceImpl());\n\t\tfixture.hook = new CMISHook();\n\t\tfixture.dlFolderService = new DLFolderServiceWrapper(new DLFolderServiceImpl());\n\t\tString srcDir = \"\";\n\t\tString destDir = \"\";\n\n\t\tfixture.move(srcDir, destDir);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: com.liferay.documentlibrary.service.impl.DLLocalServiceImpl\n\t\t// at java.net.URLClassLoader.findClass(Unknown Source)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Unknown Source)\n\t}", "public int move(int from, int to) {\n // Gracefully handle items beyond end\n final int size = mItems.size();\n from = constrain(from, 0, size - 1);\n to = constrain(to, 0, size - 1);\n\n final Path item = mItems.remove(from);\n mItems.add(to, item);\n return to;\n }", "@Override\r\n\tpublic void move(String from, String to) {\n\t\t\r\n\t}", "@SuppressWarnings(\"squid:S3776\")\n public static void moveNewTsFile(\n TsFileResource oldTsFileResource, List<TsFileResource> newTsFileResources)\n throws IOException {\n // delete old mods\n oldTsFileResource.removeModFile();\n\n File newPartitionDir =\n new File(\n oldTsFileResource.getTsFile().getParent()\n + File.separator\n + oldTsFileResource.getTimePartition());\n if (newTsFileResources.isEmpty()) { // if the oldTsFile has no mods, it should not be deleted.\n if (oldTsFileResource.isDeleted()) {\n oldTsFileResource.remove();\n }\n Files.delete(newPartitionDir.toPath());\n return;\n }\n FSFactory fsFactory = FSFactoryProducer.getFSFactory();\n File oldTsFile = oldTsFileResource.getTsFile();\n boolean isOldFileExisted = oldTsFile.exists();\n if (isOldFileExisted) {\n Files.delete(oldTsFile.toPath());\n }\n for (TsFileResource newTsFileResource : newTsFileResources) {\n newPartitionDir =\n new File(\n oldTsFileResource.getTsFile().getParent()\n + File.separator\n + newTsFileResource.getTimePartition());\n // if old TsFile has been deleted by other threads, then delete its new TsFile.\n if (!isOldFileExisted) {\n newTsFileResource.remove();\n } else {\n File newTsFile = newTsFileResource.getTsFile();\n\n // move TsFile\n fsFactory.moveFile(newTsFile, oldTsFile);\n\n // move .resource File\n newTsFileResource.setFile(fsFactory.getFile(oldTsFile.getParent(), newTsFile.getName()));\n newTsFileResource.setStatus(TsFileResourceStatus.NORMAL);\n try {\n newTsFileResource.serialize();\n } catch (IOException e) {\n e.printStackTrace();\n }\n File tmpResourceFile =\n fsFactory.getFile(\n newPartitionDir, newTsFile.getName() + TsFileResource.RESOURCE_SUFFIX);\n if (tmpResourceFile.exists()) {\n Files.delete(tmpResourceFile.toPath());\n }\n }\n // if the newPartition folder is empty, then it will be deleted\n if (newPartitionDir.exists()) {\n Files.delete(newPartitionDir.toPath());\n }\n }\n }", "private void move() {\n System.out.println(\"current dir= \" + head.dir);\n addToHead();\n deleteFromTail();\n }", "private void moveBundle(InputStream in, File newFile) {\n String fileName = newFile.getName();\n try {\n FileOutputStream out = new FileOutputStream(newFile);\n byte[] buffer = new byte[1024];\n int read;\n while ((read = in.read(buffer)) != -1) {\n out.write(buffer, 0, read);\n }\n in.close();\n out.flush();\n out.close();\n Log.i(\"BundleMover\", fileName + \" copied to \" + bundleLocation);\n } catch (Exception e) {\n Log.e(\"BundleMover\", \"ERROR: \" + e.getMessage());\n e.printStackTrace();\n }\n }", "@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameFileIntoExistingDirectory() throws Exception {\n assumeRenameSupported();\n\n Path src = path(\"/test/olddir/file\");\n createFile(src);\n Path dst = path(\"/test/new/newdir\");\n fs.mkdirs(dst);\n rename(src, dst, true, false, true);\n Path newFile = path(\"/test/new/newdir/file\");\n if (!fs.exists(newFile)) {\n String ls = ls(dst);\n LOG.info(ls(path(\"/test/new\")));\n LOG.info(ls(path(\"/test/hadoop\")));\n fail(\"did not find \" + newFile + \" - directory: \" + ls);\n }\n assertTrue(\"Destination changed\",\n fs.exists(path(\"/test/new/newdir/file\")));\n }", "public void moveMessage(Long id, Long folderId) {\n Validate.notNull(id, \"id cannot be null\");\n Validate.notNull(folderId, \"folderId cannot be null\");\n List<NameValuePair> params = ClientUtils.asParams(\"ID\", id.toString(), \"FolderID\", folderId.toString());\n client.post(MOVE_MESSAGE_PATH, Object.class, params);\n }", "public void moveToDestination(Move move) {\r\n\t\tx = move.getToX();\r\n\t\ty = move.getToY();\r\n\r\n\t}", "public boolean moveFile(final File source, final File target) throws WritePermissionException\n\t{\n\t\t// First try the normal rename.\n\t\tif (source.renameTo(target)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tboolean success = copyFile(source, target);\n\t\tif (success) {\n\t\t\tsuccess = deleteFile(source);\n\t\t}\n\t\treturn success;\n\t}", "protected void moveNode( String workspaceName,\n NodeKey key,\n Name primaryType,\n Set<Name> mixinTypes,\n NodeKey oldParent,\n NodeKey newParent,\n Path newPath,\n Path oldPath ) {\n\n }", "private Promise<Void> copyResource(final Resource resource, final Path destination) {\n return resource.copy(destination)\n .thenPromise((Function<Resource, Promise<Void>>)resource1 -> promises.resolve(null))\n .catchErrorPromise(error -> {\n\n //resource may already exists\n if (error.getMessage().contains(\"exists\")) {\n\n //create dialog with overwriting option\n return createFromAsyncRequest((RequestCall<Void>)callback -> {\n\n //handle overwrite operation\n final ConfirmCallback overwrite = () -> {\n\n //copy with overwriting\n resource.copy(destination, true).then(ignored -> {\n callback.onSuccess(null);\n }).catchError(error1 -> {\n callback.onFailure(error1.getCause());\n });\n };\n\n //skip this resource\n final ConfirmCallback skip = () -> callback.onSuccess(null);\n\n //change destination name\n final ConfirmCallback rename = () ->\n dialogFactory.createInputDialog(\"Enter new name\", \"Enter new name\",\n value -> {\n final Path newPath = destination.parent().append(value);\n\n copyResource(resource, newPath)\n .then(callback::onSuccess)\n .catchError(error1 -> {\n callback.onFailure(error1.getCause());\n });\n },\n null).show();\n\n dialogFactory.createChoiceDialog(\"Error\",\n error.getMessage(),\n \"Overwrite\",\n \"Skip\",\n \"Change Name\",\n overwrite,\n skip,\n rename).show();\n });\n } else {\n //notify user about failed copying\n notificationManager.notify(\"Error copying resource\", error.getMessage(), FAIL, FLOAT_MODE);\n\n return promises.resolve(null);\n }\n });\n }", "Folder createFolder();", "public void move(String direction);", "public abstract boolean moveToArchive(K id) throws ServiceException;", "private void copyOrMoveFile(File file, File dir,boolean isCopy) throws IOException {\n File newFile = new File(dir, file.getName());\n FileChannel outChannel = null;\n FileChannel inputChannel = null;\n try {\n outChannel = new FileOutputStream(newFile).getChannel();\n inputChannel = new FileInputStream(file).getChannel();\n inputChannel.transferTo(0, inputChannel.size(), outChannel);\n inputChannel.close();\n if(!isCopy)\n file.delete();\n } finally {\n if (inputChannel != null) inputChannel.close();\n if (outChannel != null) outChannel.close();\n }\n }", "@PostMapping(\"/renamefolder\")\n public String renameFolder(@RequestParam String currentPath, @RequestParam(name = \"renamedFolder\") String directory, @RequestParam(name = \"newFolderName\") String newFolderName, RedirectAttributes redirectAttributes) {\n logger.log(Level.INFO, \"Renaming folder...\");\n if(uiCommandService.renameFile(directory, newFolderName)) {\n redirectAttributes.addFlashAttribute(\"success_messages\",\"[Successfully renamed \" + new File(directory).getName() + \" to \" + newFolderName + \"!]\");\n logger.log(Level.INFO, \"Finished renaming folder!\");\n } else {\n redirectAttributes.addFlashAttribute(\"error_messages\", \"[\"+ newFolderName +\" already exists!]\");\n logger.log(Level.INFO, \"Renaming interrupted\");\n }\n return \"redirect:/imageview?location=\" + currentPath.replace(\"\\\\\", \"/\");\n }", "public void makeFolder() throws IOException {\n\t\tclientOutput.println(\n\t\t\t\t\">>> Unesite relativnu putanju do destinacije na kojoj pravite folder zajedno sa imenom foldera: \");\n\t\tuserInput = clientInput.readLine();\n\n\t\tuserInput = \"drive/\" + username + \"/\" + userInput;\n\t\tdestinacija = new File(userInput);\n\t\tdestinacija.mkdir();\n\t}", "public static void copyResourceToDir(@Nonnull File targetDirectory, @Nonnull String resource) throws IOException {\n copyResourceToDir(targetDirectory, null, resource);\n }", "@POST\n @Path(\"/move/{id}/{parentId}\")\n public Response move(final @PathParam(\"id\") String id,\n final @PathParam(\"parentId\") String parentId) {\n final ValidatorBuilder preValidators = ValidatorBuilder.builder()\n .add(validatorFactory.getHasPreviewConfigurationValidator(getPageComposerContextService()))\n .add(validatorFactory.getConfigurationExistsValidator(id, siteMapHelper))\n .add(validatorFactory.getNodePathPrefixValidator(getPreviewConfigurationWorkspacePath(),\n id, HstNodeTypes.NODETYPE_HST_SITEMAPITEM))\n .add(validatorFactory.getNodePathPrefixValidator(getPreviewConfigurationPath(), getPageComposerContextService().getRequestConfigIdentifier(),\n HstNodeTypes.NODETYPE_HST_SITEMAP));\n\n if (parentId != null) {\n preValidators.add(validatorFactory.getConfigurationExistsValidator(parentId, siteMapHelper));\n preValidators.add(validatorFactory.getNodePathPrefixValidator(getPreviewConfigurationWorkspacePath(),\n parentId, HstNodeTypes.NODETYPE_HST_SITEMAPITEM));\n }\n return tryExecute(new Callable<Response>() {\n @Override\n public Response call() throws Exception {\n siteMapHelper.move(id, parentId);\n final SiteMapPageRepresentation siteMapPageRepresentation = createSiteMapPageRepresentation(id, parentId);\n return ok(\"Item moved successfully\", siteMapPageRepresentation);\n }\n }, preValidators.build());\n }", "static boolean localMove(File source, File target) {\n\t\tif (target.exists())\n\t\t\tif (!target.delete()) {\n\t\t\t\tlogConsole(0, target.getPath() + \" delete failed\", null);\n\t\t\t\treturn false;\n\t\t\t}\n\t\tif (source != null)\n\t\t\tif (!source.renameTo(target)) {\n\t\t\t\tlogConsole(0, target.getPath() + \" rename failed\", null);\n\t\t\t\treturn false;\n\t\t\t}\n\t\treturn true;\n\t}", "protected void move()\n {\n // Find a location to move to.\n Debug.print(\"Fish \" + toString() + \" attempting to move. \");\n Location nextLoc = nextLocation();\n\n // If the next location is different, move there.\n if ( ! nextLoc.equals(location()) )\n {\n // Move to new location.\n Location oldLoc = location();\n changeLocation(nextLoc);\n\n // Update direction in case fish had to turn to move.\n Direction newDir = environment().getDirection(oldLoc, nextLoc);\n changeDirection(newDir);\n Debug.println(\" Moves to \" + location() + direction());\n }\n else\n Debug.println(\" Does not move.\");\n }", "static IFolder createWorkspaceFolderFromBundle(String srcpath, IContainer parent, String destname)\r\n \t\t\tthrows CoreException, URISyntaxException, IOException {\r\n \t\tBundle bundle = Platform.getBundle(DeeTestsPlugin.PLUGIN_ID);\r\n \t\tIPath bundlesrcpath = new Path(DeeTestsPlugin.TESTDATA + srcpath);\r\n \t\tURL sampleURL = FileLocator.find(bundle, bundlesrcpath, null);\r\n \t\tIFolder folder = parent.getFolder(new Path(\"__\"+destname+\"link\"));\r\n \t\tfolder.createLink(FileLocator.toFileURL(sampleURL).toURI(), IResource.NONE, null);\r\n \t\t\r\n \t\tIPath projpath = parent.getFullPath(); \r\n \t\tfolder.copy(projpath.append(destname), false, null);\r\n \t\tfolder.delete(false, null);\r\n \t\treturn parent.getFolder(new Path(destname));\r\n \t}", "void moveDocument(long documentId, long targetFolderNodeId, List<SolutionParam> solutions);", "private void moveDatabase(File srcDir, File dstDir) {\n // store the sub-folders\n File[] files = srcDir.listFiles();\n\n // create the destination folder\n dstDir.mkdirs();\n\n // move to destination\n for (File f : files) {\n f.renameTo(new File(dstDir, f.getName()));\n }\n }", "public void resourcesLocation (String folder) {\n staticFileFolder = folder.startsWith (\"/\")? folder.substring (1) : folder;\n }", "private void moveShapeDone() {\n System.out.println(\"moving file to \" + BUFFER_DONE_PATH\n + currentFileName);\n File file = new File(BUFFER_ACC_PATH + currentFileName);\n File newFile = new File(BUFFER_DONE_PATH + currentFileName);\n file.renameTo(newFile);\n }", "@SuppressWarnings(\"unused\")\n\tpublic boolean renameFolder(final File source,\n\t\t\t\t\t\t\t\tfinal File target)\n\t\t\tthrows WritePermissionException\n\t{\n\t\t// First try the normal rename.\n\t\tif (source.renameTo(target)) {\n\t\t\treturn true;\n\t\t}\n\t\tif (target.exists()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Try the Storage Access Framework if it is just a rename within the same parent folder.\n\t\tif (Util.hasLollipop() && source.getParent().equals(target.getParent())) {\n\t\t\tUsefulDocumentFile document = getDocumentFile(source, true, true);\n\t\t\tif (document == null)\n\t\t\t\treturn false;\n\t\t\tif (document.renameTo(target.getName())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Try the manual way, moving files individually.\n\t\tif (!mkdir(target)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tFile[] sourceFiles = source.listFiles();\n\n\t\tif (sourceFiles == null) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfor (File sourceFile : sourceFiles) {\n\t\t\tString fileName = sourceFile.getName();\n\t\t\tFile targetFile = new File(target, fileName);\n\t\t\tif (!copyFile(sourceFile, targetFile)) {\n\t\t\t\t// stop on first error\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Only after successfully copying all files, delete files on source folder.\n\t\tfor (File sourceFile : sourceFiles) {\n\t\t\tif (!deleteFile(sourceFile)) {\n\t\t\t\t// stop on first error\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "Move(int r, int c, int dr, int dc)\n\t{\n\t\tpieceRow = r;\n\t\tpieceCol = c;\n\t\tdestRow = dr;\n\t\tdestCol = dc;\n\t}", "private static void moveFilesToFolder(List<File> files, String strFolderPath) throws IOException {\n File folderPath = Paths.get(strFolderPath).toFile();\n folderPath.mkdir();\n\n for (File file : files) {\n Path dst = Paths.get(folderPath.getAbsolutePath(), file.getName());\n Path src = file.toPath();\n if (dst.toFile().exists() && !src.equals(dst)) {\n String dstStr = dst.toString();\n String fileExt = FilenameUtils.getExtension(dstStr);\n String newPath = FilenameUtils.removeExtension(dstStr) + \" (Copy).\" + fileExt;\n Files.move(src, new File(newPath).toPath(), StandardCopyOption.ATOMIC_MOVE);\n } else {\n Files.move(src, dst, StandardCopyOption.ATOMIC_MOVE);\n }\n }\n }", "public boolean moveCard(AbstractCard card, CardCollection moveLocation);", "private boolean sourceTableMoveObjTable(HttpServletRequest request,String username,String sourceFolder,String ojbFolder,String fileName,String fileType) throws Exception{\n boolean result=false;\n try {\n String sourcePath=request.getSession().getServletContext().getRealPath(\"/\")+REPOSITORY+\"\\\\\"+username+\"\\\\\"+PERSISTENT+\"\\\\\"+sourceFolder;\n String objPath=request.getSession().getServletContext().getRealPath(\"/\")+REPOSITORY+\"\\\\\"+username+\"\\\\\"+PERSISTENT+\"\\\\\"+ojbFolder;\n System.out.println(sourcePath+\"\\\\\"+fileName+\".\"+fileType);\n System.out.println(objPath+\"\\\\\"+fileName+\".\"+fileType);\n File newFile=new File(objPath,fileName+\".\"+fileType);\n File newFilePath=new File(objPath);\n File oldFile=new File(sourcePath,fileName+\".\"+fileType);\n File oldFilePath=new File(sourcePath);\n if(!newFilePath.exists()){\n throw new Exception(\"目标路径不存在!\");\n }\n if(!oldFilePath.exists()){\n throw new Exception(\"源路径不存在!\");\n }\n if(newFile.exists()){\n throw new Exception(\"文件已经在目标路径中存在了!\");\n }\n if(!oldFile.exists()){\n throw new Exception(\"源表不存在!\");\n }\n //文件从源路径移动到目标路径\n Files.copy(oldFile.toPath(),newFile.toPath());\n oldFile.delete();\n result=true;\n }catch (IOException io){\n io.printStackTrace();\n throw new IOException(\"文件移动失败!\");\n }\n return result;\n }", "public String moveFileUp() {\r\n\t\tlog.debug(\"Item file Id::\"+itemObjectId);\r\n\t\t\r\n\t\tIrUser user = userService.getUser(userId, false);\r\n\t\tif( !item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) && \r\n\t\t\t\t!institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId))\r\n\t\t{\r\n\t\t return \"accessDenied\";\r\n\t\t}\r\n\t\t\r\n\t\tItemObject moveUpItemObject = item.getItemObject(itemObjectId, itemObjectType);\r\n\t\titem.moveItemObject(moveUpItemObject, moveUpItemObject.getOrder() - 1);\r\n\t\t\r\n\t\t// Save the item\r\n\t\titemService.makePersistent(item);\r\n\r\n\t\treturn SUCCESS;\r\n\t\t\r\n\t}", "final public VFile moveTo(VDir parentDir,String newName) throws VlException\n {\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,newName,true); \n //return (VFile)doCopyMoveTo(parentDir, newName,true);\n }", "public void moveCard(int pileId, int pos, int destPileId) {\n \t\tCard c = mTable.get(pileId).takeCard(pos);\n \t\tif (c != null) {\n \t\t\tmTable.get(destPileId).addCard(c);\n \t\t\tsendUpdatedState();\n \t\t}\n \t}", "@Test\n public void testMoveMessageToFolder() {\n System.out.println(\"moveMessageToFolder\");\n String message = \"\";\n String folder = \"\";\n FileSystemStorage instance = null;\n instance.moveMessageToFolder(message, folder);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static boolean move(String srcPath, String destPath, SourceType sourceType) throws IOException {\n if(StringUtils.isEmpty(srcPath) || StringUtils.isEmpty(destPath) || sourceType == null) {\n throw new IllegalArgumentException(String.format(\n \"Null or empty parameters srcDataPath:%s, dstDataPath:%s, sourceType:%s\", srcPath, destPath,\n sourceType));\n }\n\n FileSystem fs = getFileSystemBySourceType(sourceType);\n // delete all files in dst firstly because of different folder if has dstDataPath\n if(!fs.delete(new Path(destPath), true)) {\n // ignore delete failed, it's ok.\n }\n\n if(fs.exists(new Path(srcPath))) {\n // copy file only when source file exists.\n fs.rename(new Path(srcPath), new Path(destPath));\n return true;\n }\n\n return false;\n }", "public void testMove() throws RepositoryException{\n String src = \"src\";\n String dest=\"dest\";\n \n session.move(src, dest);\n sessionControl.replay();\n sfControl.replay();\n \n jt.move(src, dest);\n }", "void uploadingFolder(String remoteFolder);", "void moveDisk(char fromRod, char toRod) {\n Rod fromThisRod = null;\n Rod toThisRod = null;\n for(int i = 0; i < listOfRods.size(); i++){\n if(listOfRods.get(i).getRodName() == fromRod)\n fromThisRod = listOfRods.get(i);\n else if((listOfRods.get(i).getRodName() == toRod))\n toThisRod = listOfRods.get(i);\n }\n try {\n toThisRod.addDisk(fromThisRod.removeTopMostDisk());\n }\n catch(NullPointerException rodIsNull){\n Display.displayWithNextLine(\"Rod you are trying to reach is null!\");\n }\n }", "@Test\r\n public void moveChildToParent() {\r\n command.executeCommand(\"/parent/child/\", \"/\", root, currentDirectory);\r\n assertTrue(root.getDirectoryByAbsolutePath(\"/child\") != null);\r\n }", "public interface AdditionalDestination {\n\n public void copy(FileObject fo, String path);\n\n public void delete(FileObject fo, String path);\n\n}", "void folderUploaded(String remoteFolder);", "protected void moveToDestination(){\n\t\tqueue.clear();\n\t\twhile (destination[0] < 0){\n\t\t\tqueue.add(\"MOVE S\");\n\t\t\tdestination[0] += 1;\n\t\t}\n\t\twhile (destination[0] > 0){\n\t\t\tqueue.add(\"MOVE N\");\n\t\t\tdestination[0] -= 1;\n\t\t}\n\t\twhile (destination[1] < 0){\n\t\t\tqueue.add(\"MOVE E\");\n\t\t\tdestination[1] += 1;\n\t\t}\n\t\twhile (destination[1] > 0){\n\t\t\tqueue.add(\"MOVE W\");\n\t\t\tdestination[1] -= 1;\n\t\t}\n\t\tdestination = null;\n\t}", "final public VFile moveTo(VDir parentDir) throws VlException\n {\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,true); \n //return (VFile)doCopyMoveTo(parentDir, null,true);\n }" ]
[ "0.67341363", "0.6530072", "0.6447382", "0.6370003", "0.6115273", "0.60455966", "0.604236", "0.60416365", "0.6036027", "0.5888894", "0.5876218", "0.58552545", "0.5768491", "0.5764526", "0.57420594", "0.5674655", "0.55952287", "0.55560154", "0.5555777", "0.555497", "0.5495476", "0.54896563", "0.5466923", "0.5452753", "0.5405496", "0.539316", "0.5354843", "0.5349672", "0.53151226", "0.53114593", "0.52945685", "0.52500343", "0.52496165", "0.52489686", "0.5229245", "0.52252716", "0.51953506", "0.5164186", "0.51639485", "0.515845", "0.51457787", "0.5084639", "0.50809765", "0.50784904", "0.5068698", "0.50459194", "0.5041709", "0.50302166", "0.5003261", "0.49949208", "0.4991576", "0.49914142", "0.49897242", "0.49830502", "0.49825472", "0.4954569", "0.4942919", "0.4941186", "0.49293518", "0.49091387", "0.49078745", "0.4904087", "0.489107", "0.48833084", "0.48736554", "0.48685402", "0.48666048", "0.48663583", "0.48592362", "0.4852623", "0.48513597", "0.48501796", "0.48451117", "0.48420304", "0.48416144", "0.48226738", "0.47978023", "0.47957417", "0.47942933", "0.47865742", "0.47764584", "0.47729585", "0.47682092", "0.47344488", "0.47284946", "0.4714277", "0.47088745", "0.47086477", "0.47037736", "0.47030717", "0.47029465", "0.46962386", "0.46960175", "0.46899354", "0.4686855", "0.46837112", "0.46787626", "0.46701175", "0.4666004", "0.46603587" ]
0.69029087
0
Change the current folder, set the current resource to it and post events.
protected void changeFolder(Folder newFolder, AjaxRequestTarget target) { currentFolder = newFolder; currentResource = null; send(getPage(), Broadcast.BREADTH, new FolderChangeEvent(target)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onFolderChange(FolderChangeEvent event) {\n\t\tthis.currentResource = null;\n\t}", "@Override\n public void folderChanged(IProject project, ResourceFolder folder, int eventType) {\n }", "public static void start_write_action_from_ui_thread_and_refresh_folder_sync(VirtualFile folder) {\r\n start_write_action_from_ui_thread_and_refresh_folder(folder);\r\n }", "public void setCurrentDirectory(File dir) {\r\n\tif (dir == null) dir = new File(System.getProperty(\"user.home\"));\r\n\r\n\tdir = makeAbsolute(dir);\r\n\r\n\t/**\r\n\t * Note that we compare literal paths, not canonical\r\n\t * paths. If they want the chooser to represent the\r\n\t * files at the end of a different route to the same\r\n\t * place, that's perfectly legitimate. See NextStep\r\n\t * for e.g.\r\n\t */\r\n\tif (curDir == null || !curDir.equals(dir)) {\r\n\t invalidateCache();\r\n\t File oldDir = curDir;\r\n\t curDir = dir;\r\n\t firePropertyChange(\"currentDirectory\", oldDir, dir);\r\n\t fireContentsChanged();\r\n\t}\r\n }", "public void setParent(TaskFolder parent)\n {\n super.setParent(parent);\n if (parent != null) parent.addFolder(this);\n }", "private void setClubEventFolder (File file) {\n if (file == null) {\n eventsFile = null;\n // currentFileSpec = null;\n statusBar.setFileName(\" \", \" \");\n } else {\n fileSpec = recentFiles.addRecentFile (file);\n if (clubEventList != null) {\n clubEventList.setSource (fileSpec);\n } else {\n // System.out.println(\"ClubPlanner.setClubEventFolder clubEventList is null\");\n }\n eventsFile = file;\n currentDirectory = file.getParentFile();\n FileName fileName = new FileName (file);\n statusBar.setFileName(fileName);\n // textMergeWindow.openSource(currentDirectory);\n }\n }", "public void doUpdate() {\n fileChooser.setCurrentDirectory(new File(getPath()));\n fileChooser.rescanCurrentDirectory();\n }", "@Override\n public void onFolderSelected(String absolutePath) {\n PdfViewCtrlSettingsManager.updateLocalFolderPath(this, absolutePath);\n // Update last-used local folder tree to the same path\n PdfViewCtrlSettingsManager.updateLocalFolderTree(this, absolutePath);\n\n if (mNavigationDrawerView != null && mNavigationDrawerView.getMenu() != null) {\n MenuItem menuItem = mNavigationDrawerView.getMenu().findItem(R.id.item_folder_list);\n selectNavigationItem(menuItem);\n }\n }", "void resourceChanged(IPath workspacePath);", "public void setRootFolder(String folder) {\n m_RootFolder = folder;\n }", "private static void start_write_action_from_ui_thread_and_refresh_folder(final VirtualFile folder) {\r\n // com.intellij.openapi.vfs.VirtualFile\r\n // public void refresh(boolean asynchronous, boolean recursive) ...\r\n // This method should be only called within write-action.\r\n ApplicationManager.getApplication().runWriteAction(new Runnable() {\r\n @Override\r\n public void run() {\r\n try {\r\n folder.refresh(/*asynchronous*/ false, /*recursive*/ true);\r\n } catch (Throwable e) {\r\n e.printStackTrace();\r\n throw new RuntimeException(e);\r\n }\r\n }\r\n });\r\n }", "@FXML\n private void chooseNewDirEvent() throws IOException {\n DirectoryChooser chooser = new DirectoryChooser();\n chooser.setTitle(\"Choose Home Directory\");\n Stage curStage = (Stage) rootPane.getScene().getWindow();\n File selectedDirectory = chooser.showDialog(curStage);\n if (selectedDirectory != null) {\n model.User.setRootDir(selectedDirectory);\n model.DirectoryManager.set(selectedDirectory);\n model.User.setGalleryPhotos(model.DirectoryManager.getTree().getDir().getPhotos());\n fadeOutEvent();\n } else {\n curStage.show();\n }\n }", "public void saveCurrentFolders() {\n if (!this.oldConfigurationWasSaved) {\n this.oldResourcesFolder = getConfiguration().getString(ArecoDeploymentScriptFinder.RESOURCES_FOLDER_CONF);\n this.oldUpdateScriptsFolder = getConfiguration().getString(ArecoDeploymentScriptFinder.UPDATE_SCRIPTS_FOLDER_CONF);\n this.oldInitScriptsFolder = getConfiguration().getString(ArecoDeploymentScriptFinder.INIT_SCRIPTS_FOLDER_CONF);\n this.oldEnvironmentName = getConfiguration().getString(FlexibleSearchDeploymentEnvironmentDAO.CURRENT_ENVIRONMENT_CONF);\n this.oldImpexLocaleCode = getConfiguration().getString(LocalizedImpexImportService.IMPEX_LOCALE_CONF);\n this.oldConfigurationWasSaved = true;\n }\n\n }", "@Override\n\tpublic void setParrentFolder(String parrentFolder) {\n\t\t\n\t}", "@objid (\"34f4b366-450c-42c4-945e-4b5c3c0b4165\")\r\n public void setCurrentFile(final File currentFile) {\r\n this.currentFile = currentFile;\r\n }", "public void changeCurrentDirectory(String newDirectory) {\n currentDirectory = newDirectory;\n }", "private synchronized void setCurrentChannel(String currentChannel) {\n\n this.currentChannel = currentChannel;\n }", "Update withFolderPath(String folderPath);", "protected void setParentFolder(Folder f) {\n\t\tparentFolder = f;\n\t\tif(f!= null) {\n\t\t\tparentFolderID = f.getMyID();\n\t\t} else {\n\t\t\tparentFolderID = 0;\n\t\t}\n\t}", "public void setParentFolder(com.vmware.converter.ManagedObjectReference parentFolder) {\r\n this.parentFolder = parentFolder;\r\n }", "private void onWsFolderPathUpdated() {\n if (mInternalWsFolderPathUpdate) {\n return;\n }\n\n String wsFolderPath = mWsFolderPathTextField.getText();\n\n // This is a custom path, we need to sanitize it.\n // First it should start with \"/res/\". Then we need to make sure there are no\n // relative paths, things like \"../\" or \"./\" or even \"//\".\n wsFolderPath = wsFolderPath.replaceAll(\"/+\\\\.\\\\./+|/+\\\\./+|//+|\\\\\\\\+|^/+\", \"/\"); //$NON-NLS-1$ //$NON-NLS-2$\n wsFolderPath = wsFolderPath.replaceAll(\"^\\\\.\\\\./+|^\\\\./+\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\n wsFolderPath = wsFolderPath.replaceAll(\"/+\\\\.\\\\.$|/+\\\\.$|/+$\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\n\n ArrayList<TypeInfo> matches = new ArrayList<TypeInfo>();\n\n // We get \"res/foo\" from selections relative to the project when we want a \"/res/foo\" path.\n if (wsFolderPath.startsWith(RES_FOLDER_REL)) {\n wsFolderPath = RES_FOLDER_ABS + wsFolderPath.substring(RES_FOLDER_REL.length());\n\n mInternalWsFolderPathUpdate = true;\n mWsFolderPathTextField.setText(wsFolderPath);\n mInternalWsFolderPathUpdate = false;\n }\n\n if (wsFolderPath.startsWith(RES_FOLDER_ABS)) {\n wsFolderPath = wsFolderPath.substring(RES_FOLDER_ABS.length());\n\n int pos = wsFolderPath.indexOf(AndroidConstants.WS_SEP_CHAR);\n if (pos >= 0) {\n wsFolderPath = wsFolderPath.substring(0, pos);\n }\n\n String[] folderSegments = wsFolderPath.split(FolderConfiguration.QUALIFIER_SEP);\n\n if (folderSegments.length > 0) {\n String folderName = folderSegments[0];\n\n // update config selector\n mInternalConfigSelectorUpdate = true;\n mConfigSelector.setConfiguration(folderSegments);\n mInternalConfigSelectorUpdate = false;\n\n boolean selected = false;\n for (TypeInfo type : sTypes) {\n if (type.getResFolderName().equals(folderName)) {\n matches.add(type);\n selected |= type.getWidget().getSelection();\n }\n }\n\n if (matches.size() == 1) {\n // If there's only one match, select it if it's not already selected\n if (!selected) {\n selectType(matches.get(0));\n }\n } else if (matches.size() > 1) {\n // There are multiple type candidates for this folder. This can happen\n // for /res/xml for example. Check to see if one of them is currently\n // selected. If yes, leave the selection unchanged. If not, deselect all type.\n if (!selected) {\n selectType(null);\n }\n } else {\n // Nothing valid was selected.\n selectType(null);\n }\n }\n }\n\n validatePage();\n }", "public void updateLabtainersPath(){\n labsPath = new File(labtainerPath + File.separator + \"labs\");\n labChooser.setCurrentDirectory(labsPath); \n }", "@Override\r\n\tprotected void setSavedDirectoriesIntoControls() {\n\r\n\t}", "@Override\n public void onRequestRejected(final Request request)\n throws CvqException, CvqInvalidTransitionException,\n CvqObjectNotFoundException {\n restoreOriginalHomeFolder((HomeFolderModificationRequest) request);\n }", "public void setWorkspace(File folder) {\n if (folder == null) {\n root.removeAllChildren();\n return;\n }\n\n storage = Paths.get(folder.getAbsolutePath(), getStorageFilename());\n try {\n // create the file if it doesn't exist.\n Files.createFile(storage);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n List<String> lines = Files.readAllLines(storage);\n parseStorage(lines);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void pathChanged(){\r\n ctrlDomain.pathChanged();\r\n }", "@Override\r\n public void saveFolder(Folder folder) {\n this.folderRepository.save(folder);\r\n }", "private void setDirectoryWatch(long index) {\n etcdWrapper.waitForChange(PUBSUB_ROOT_PATH, true, index, responseListener);\n }", "abstract public void setDataResourcesDir(String path);", "abstract public void setTopResourcesDir(String path);", "@FXML\n private void setDirectoryOfPostVersionLists() {\n setPathToRootOfPostVersionLists();\n indexPostVersionListsInRootPath();\n }", "protected void setRootPath(String root) {\n this.root = new File(root);\n this.appsDir = new File(this.root, APPS_ROOT);\n this.m2Dir = new File(M2_ROOT);\n }", "public void resourcesLocation (String folder) {\n staticFileFolder = folder.startsWith (\"/\")? folder.substring (1) : folder;\n }", "public void projectWorkDirChanged() { }", "public void projectWorkDirChanged() { }", "private void addFolder(){\n }", "private void upPath() {\n if (!path.equals(FilePathUtil.getRootPath())) {\n onPathChanged(path, new File(path.getParent()));\n path = new File(path.getParent());\n load(null);\n }\n }", "public void directoryChange( int type, Set fileSet );", "private void onResourceMove(ResourceMoveEvent event) throws ROSRSException, ROException {\n\t\tif (currentFolder != null) {\n\t\t\tFolderEntry entry = null;\n\t\t\tfor (FolderEntry e : currentFolder.getFolderEntries().values()) {\n\t\t\t\tif (e.getResource().equals(currentResource)) {\n\t\t\t\t\tentry = e;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (entry != null) {\n\t\t\t\tentry.delete();\n\t\t\t}\n\t\t}\n\t\tif (!event.getFolder().isLoaded()) {\n\t\t\tevent.getFolder().load();\n\t\t}\n\t\tevent.getFolder().addEntry(currentResource, null);\n\t\tsend(getPage(), Broadcast.BREADTH, new ResourceMovedEvent(event.getTarget()));\n\t}", "void setDirectory(File dir);", "void setParent(Resource parent)\n {\n this.parent = new ResourceRef(parent, coral);\n if(parent != null)\n {\n \tparentId = parent.getId();\n }\n else\n {\n \tparentId = -1;\n }\n }", "@Override\n public void onChosenDir(String chosenDir) {\n ((EditTextPreference)preference).setText(chosenDir);\n try {\n SettingsActivity.createWorkingDir(getActivity(), new File(chosenDir));\n } catch (Exception ex) {\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_SHORT).show();\n }\n AvnLog.i(Constants.LOGPRFX, \"select work directory \" + chosenDir);\n }", "private void checkFileSystemResource(UserRequest ureq) {\n\n if (FolderCommandStatus.STATUS_FAILED == FolderCommandHelper.sanityCheck(getWindowControl(), folderComponent)) {\n folderComponent.updateChildren();\n }\n\n VFSItem item = VFSManager.resolveFile(folderComponent.getRootContainer(), ureq.getModuleURI());\n\n if (FolderCommandStatus.STATUS_FAILED == FolderCommandHelper.sanityCheck2(getWindowControl(), folderComponent, ureq, item)) {\n folderComponent.setCurrentContainerPath(folderComponent.getCurrentContainerPath());\n }\n\n }", "public void newFolderButtonClicked() {\n TreePath[] paths = _fileSystemTree.getSelectionPaths();\r\n List selection = getSelectedFolders(paths);\r\n if (selection.size() > 1 || selection.size() == 0)\r\n return; // should never happen\r\n \r\n File parent = (File) selection.get(0);\r\n \r\n final ResourceBundle resourceBundle = FolderChooserResource.getResourceBundle(Locale.getDefault());\r\n String folderName = JOptionPane.showInputDialog(_folderChooser, resourceBundle.getString(\"FolderChooser.new.folderName\"),\r\n resourceBundle.getString(\"FolderChooser.new.title\"), JOptionPane.OK_CANCEL_OPTION | JOptionPane.QUESTION_MESSAGE);\r\n \r\n if (folderName != null) {\r\n File newFolder = new File(parent, folderName);\r\n boolean success = newFolder.mkdir();\r\n \r\n TreePath parentPath = paths[0];\r\n boolean isExpanded = _fileSystemTree.isExpanded(parentPath);\r\n if (!isExpanded) { // expand it first\r\n _fileSystemTree.expandPath(parentPath);\r\n }\r\n \r\n LazyMutableTreeNode parentTreeNode = (LazyMutableTreeNode) parentPath.getLastPathComponent();\r\n BasicFileSystemTreeNode child = BasicFileSystemTreeNode.createFileSystemTreeNode(newFolder, _folderChooser);\r\n // child.setParent(parentTreeNode);\r\n if (success) {\r\n parentTreeNode.clear();\r\n int insertIndex = _fileSystemTree.getModel().getIndexOfChild(parentTreeNode, child);\r\n if (insertIndex != -1) {\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).insertNodeInto(child, parentTreeNode, insertIndex);\r\n ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).nodeStructureChanged(parentTreeNode);\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).addPath(parentPath, insertIndex, child);\r\n }\r\n }\r\n TreePath newPath = parentPath.pathByAddingChild(child);\r\n _fileSystemTree.setSelectionPath(newPath);\r\n _fileSystemTree.scrollPathToVisible(newPath);\r\n }\r\n }", "public static void setConfigFolder(String configFolder) {\n\t\tConfigDispatcher.configFolder = configFolder;\n\t\tinitializeBundleConfigurations();\n\t}", "public abstract void SetlocalTemporalFolder(String TemporalPath);", "abstract public void setRingResourcesDir(String path);", "public synchronized static void setCurrentDirectory(File newDirectory) {\n if (newDirectory == null) // this can actually happen\n currentDirectory = canon(System.getProperty(\"user.home\"));\n else\n currentDirectory = canon(newDirectory.getAbsolutePath());\n }", "@Override\n public void onRequestCancelled(final Request request)\n throws CvqException, CvqInvalidTransitionException,\n CvqObjectNotFoundException {\n restoreOriginalHomeFolder((HomeFolderModificationRequest) request);\n }", "void folderUploaded(String remoteFolder);", "public void setResourcePath(String resourcePath) {\n //To change body of implemented methods use File | Settings | File Templates.\n }", "@PostConstruct\n public void onStart() {\n final String path = \"/images/\";\n try {\n final Path path_of_resource = getPathOfResource(path);\n saveImagesFolder(path_of_resource);\n } catch (final IOException e1) {\n e1.printStackTrace();\n }\n }", "public void newFolder ()\n {\n newNode(null);\n }", "@Override\r\n public void run() {\r\n \t// increases the internal producers counter of the queue by one.\r\n this.directory_queue.registerProducer();\r\n directory_queue.enqueue(this.root);\r\n try {\r\n \taddPath(this.root);\r\n } catch (IllegalArgumentException e) {\r\n \tSystem.err.println(e.toString());\r\n \t//e.printStackTrace();\r\n }\r\n // Unregisters a producer from the queue.\r\n this.directory_queue.unregisterProducer();\r\n }", "private void selectedFolderMovedFromNavTree(Folder selectedFolder, Folder destinationFolder) {\n Folder parentFolder = view.getParentFolder(selectedFolder);\n\n if (DiskResourceUtil.isDescendantOfFolder(parentFolder, destinationFolder)) {\n // The destination is under the parent, so if we prune the parent and set the destination\n // as the selected folder, the parent will lazy-load down to the destination.\n view.removeChildren(parentFolder);\n } else if (DiskResourceUtil.isDescendantOfFolder(destinationFolder, parentFolder)) {\n // The parent is under the destination, so we only need to view the destination folder's\n // contents and refresh its children.\n presenter.doRefreshFolder(destinationFolder);\n } else {\n // Refresh the parent folder since it has lost a child.\n presenter.doRefreshFolder(parentFolder);\n // Refresh the destination folder since it has gained a child.\n presenter.doRefreshFolder(destinationFolder);\n }\n\n // View the destination folder's contents.\n presenter.setSelectedFolderByPath(destinationFolder);\n }", "@Override\n public void onPostFolderOpened(DocumentFile oldFolder, DocumentFile newFolder) {\n getList().scrollToPosition(0);\n buildBreadcrumbs(newFolder);\n setBackButtonHandlerEnabled(folderPathView.getBreadcrumbCount() > 1);\n getListAdapter().setInitiallySelectedItems(getContext()); // adapter needs to be populated for this to work.\n updateListOfFileExtensionsForAllVisibleFiles(getListAdapter().getFileExtsAndMimesInCurrentFolder());\n\n SortedSet<String> allFilters = getViewPrefs().getVisibleFileTypes();\n if(allFilters == null) {\n allFilters = new TreeSet<>();\n }\n allFilters.addAll(getViewPrefs().getFileTypesForVisibleMimes());\n allFilters.addAll(getViewPrefs().getAcceptableFileExts(getListAdapter().getFileExtsAndMimesInCurrentFolder()));\n\n getViewPrefs().getFileTypesForVisibleMimes();\n// fileExtFilters.setShowInactiveFilters(false);\n fileExtFilters.setAllFilters(allFilters);\n fileExtFilters.setActiveFilters(getListAdapter().getFileExtsInCurrentFolder());\n fileExtFilters.selectAll(true);\n }", "@Override\n public void modelStarted(ModelEvent me)\n {\n save(me.getSource(), _startDirectory);\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tsetPath(null);\n\t\t\t\t}", "public void doFolder_permissions(RunData data, Context context)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState(((JetspeedRunData)data).getJs_peid());\n\t\tParameterParser params = data.getParameters();\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\t// get the current collection id and the related site\n\t\tString collectionId = params.getString(\"collectionId\"); //(String) state.getAttribute (STATE_COLLECTION_ID);\n\t\tString title = \"\";\n\t\ttry\n\t\t{\n\t\t\ttitle = ContentHostingService.getProperties(collectionId).getProperty(ResourceProperties.PROP_DISPLAY_NAME);\n\t\t}\n\t\tcatch (PermissionException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notread\"));\n\t\t}\n\t\tcatch (IdUnusedException e)\n\t\t{\n\t\t\taddAlert(state, rb.getString(\"notfindfol\"));\n\t\t}\n\n\t\t// the folder to edit\n\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(collectionId));\n\t\tstate.setAttribute(PermissionsHelper.TARGET_REF, ref.getReference());\n\n\t\t// use the folder's context (as a site) for roles\n\t\tString siteRef = SiteService.siteReference(ref.getContext());\n\t\tstate.setAttribute(PermissionsHelper.ROLES_REF, siteRef);\n\n\t\t// ... with this description\n\t\tstate.setAttribute(PermissionsHelper.DESCRIPTION, rb.getString(\"setpermis\") + \" \" + title);\n\n\t\t// ... showing only locks that are prpefixed with this\n\t\tstate.setAttribute(PermissionsHelper.PREFIX, \"content.\");\n\n\t\t// get into helper mode with this helper tool\n\t\tstartHelper(data.getRequest(), \"sakai.permissions.helper\");\n\n\t}", "void setAppRootDirectory(String rootDir);", "@Override\r\n public void run() {\r\n Path dir = propsPath.getParent();\r\n for (;;) {\r\n try {\r\n WatchService watcher = dir.getFileSystem().newWatchService();\r\n dir.register(watcher, StandardWatchEventKinds.ENTRY_MODIFY);\r\n WatchKey watckKey = watcher.take();\r\n List<WatchEvent<?>> events = watckKey.pollEvents();\r\n events.stream().filter((event) -> (event.kind() == StandardWatchEventKinds.ENTRY_MODIFY)).forEach((event) -> {\r\n WatchEvent.Kind<?> kind = event.kind();\r\n if (kind != OVERFLOW) {\r\n // The filename is the\r\n // context of the event.\r\n WatchEvent<Path> ev = (WatchEvent<Path>) event;\r\n Path filename = ev.context();\r\n final Path fileName = propsPath.getFileName();\r\n if (filename.equals(fileName)) {\r\n HierarchicalProperties reloadedProps = HierarchicalPreprocessorFactory.createInstance(propsPath);\r\n props.setRoot(reloadedProps.getRoot());\r\n }\r\n }\r\n });\r\n } catch (IOException | InterruptedException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }\r\n }", "private void renderFolder(HttpServletResponse resp, String baseURL,\n\t\t\tFolder folder) throws IOException {\n\t\tPage startpage = null;\n\t\tfor (Page page : dc2f.getChildren(folder.getPath(), Page.class)) {\n\t\t\tif (\"index.html\".equals(page.getName())) {\n\t\t\t\tstartpage = page;\n\t\t\t\tbreak;\n\t\t\t} else if(startpage == null) {\n\t\t\t\tstartpage = page;\n\t\t\t}\n\t\t}\n\t\tif (startpage != null) {\n\t\t\tresp.sendRedirect(baseURL + \"/\" + startpage.getPath());\n\t\t}\n\t}", "@Override\r\n\t\tpublic void setDir(String dir)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public void moveTo(Folder targetFolder) {\n if (targetFolder != this.parent) {\n Path sourcePath = this.toPath();\n this.parent.getValue().remove(this);\n String newName = this.newName(targetFolder);\n\n Path targetPath = new File(targetFolder.getPath() + File.separator + newName).toPath();\n\n try {\n Files.move(sourcePath, targetPath);\n } catch (IOException e) {\n }\n\n this.name = newName;\n targetFolder.addImage(this);\n }\n }", "public void setParentCalendarPath(final String val) {\n parentCalendarPath = val;\n }", "void folderCreated(String remoteFolder);", "public static void setComponentFolder(String folder) {\n\t\tcomponentFolder = folder;\n\t\tif (folder.endsWith(FOLDER_STR) == false) {\n\t\t\tcomponentFolder += FOLDER_CHAR;\n\t\t}\n\t\tTracer.trace(\"component folder set to \" + componentFolder);\n\t}", "interface WithFolderPath {\n /**\n * Specifies the folderPath property: The folder path of the source control. Path must be relative..\n *\n * @param folderPath The folder path of the source control. Path must be relative.\n * @return the next definition stage.\n */\n Update withFolderPath(String folderPath);\n }", "public void resourceChanged(final IResourceChangeEvent event) {\n\t\tif (event.getType() == IResourceChangeEvent.POST_CHANGE) {\n\t\t\tif (event.getDelta() != null) {\n\t\t\t\tif (event.getDelta().getKind() == IResourceDelta.CHANGED || event.getDelta().getKind() == IResourceDelta.REMOVED) {\n\t\t\t\t\tDisplay.getDefault().asyncExec(new Runnable() {\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tpageMainEditor.refreshLstClasses();\n\t\t\t\t\t\t\tpageMainEditor.updateBuildPathStatus(getEditor(1));\n\t\t\t\t\t\t\tpageMainEditor.checkCache();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (event.getType() == IResourceChangeEvent.PRE_CLOSE) {\n\t\t\tDisplay.getDefault().asyncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages();\n\t\t\t\t\tfor (int i = 0; i < pages.length; i++) {\n\t\t\t\t\t\tif (((FileEditorInput) editor.getEditorInput()).getFile().getProject().equals(event.getResource())) {\n\t\t\t\t\t\t\tIEditorPart editorPart = pages[i].findEditor(editor.getEditorInput());\n\t\t\t\t\t\t\tpages[i].closeEditor(editorPart, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void update()\n {\n modifier = coral.getCurrentSubject();\n modified = new Date();\n try\n {\n persistence.save(this);\n }\n catch(SQLException e)\n {\n throw new BackendException(\"failed to update resource's persitent image\", e);\n }\n try\n {\n Resource impl = coral.getStore().getResource(getId());\n coralEventHub.getGlobal().fireResourceChangeEvent(impl, modifier);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"inconsistent data\", e);\n }\n }", "public void setCurrent(Node current) {\n this.current = current;\n }", "public void gotoParentDir() {\n boolean z;\n if (!isRootDir() && this.mCurrentDir != null && this.mBox.hasAuthenticated()) {\n String sb = new StringBuilder(getCurrentDirPath()).toString();\n if (sb.endsWith(File.separator)) {\n sb = sb.substring(0, sb.lastIndexOf(File.separator));\n }\n String substring = sb.substring(0, sb.lastIndexOf(File.separator) + 1);\n if (!substring.equals(getCurrentDirName())) {\n if (!substring.equals(File.separator) && substring.endsWith(File.separator)) {\n substring = substring.substring(0, substring.length() - 1);\n }\n BoxFileObject boxFileObject = null;\n if (this.mDirCached.containsKey(substring)) {\n boxFileObject = (BoxFileObject) this.mDirCached.get(substring);\n }\n if (boxFileObject == null) {\n z = this.mBox.asyncLoadDir(substring, this.mLoadFolderListener);\n } else {\n z = this.mBox.asyncLoadDir(boxFileObject, this.mLoadFolderListener);\n }\n if (z) {\n showWaitingDialog(this.mActivity.getString(C4538R.string.zm_msg_loading), this.mWaitingDialogCancelListener);\n }\n }\n }\n }", "@FXML\n private void goToDefault(ActionEvent event) throws IOException {\n App.setRoot(\"default\");\n }", "private void changeDirectory()\n {\n directory = SlideshowManager.getDirectory(this); //use SlideshowManager to select a directory\n\n if (directory != null) //if a valid directory was selected...\n {\n JFrame loading = new JFrame(\"Loading...\");\n Image icon = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB_PRE);\n loading.setIconImage(icon);\n loading.setResizable(false);\n loading.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n loading.setSize(new Dimension(250,30));\n loading.setLocationRelativeTo(null);\n loading.setVisible(true);\n\n timeline.reset();\n timeline.setSlideDurationVisible(automated);\n timeline.setDefaultSlideDuration(slideInterval);\n\n m_ImageLibrary = ImageLibrary.resetLibrary(timeline, directory); //...reset the libraries to purge the current contents...\n JScrollPane spImages = new JScrollPane(m_ImageLibrary);\n spImages.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spImages.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Images\", spImages);\n \n m_AudioLibrary.resetAudio();\n m_AudioLibrary = AudioLibrary.resetLibrary(timeline, directory);\n JScrollPane spAudio = new JScrollPane(m_AudioLibrary);\n spAudio.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spAudio.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Audio\", spAudio);\n\n loading.dispose();\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tUtils.upgradeRootPermission(getPackageCodePath());\n\t\t\t}", "public void setRootDir(String rootDir);", "abstract void setRootObject(DataObject root);", "void setSystabIOFolderName(String name){\n this.folderName = name + \"\\\\\"; // Append the \\\\ to get inside the folder\n }", "@Override\n public void whenDone() {\n getDocumentController().setFile(fileToSaveTo);\n getDocumentController().setHasChanged(false);\n getDocumentController().notifyChange();\n }", "private void handleFolderOpen(Event event) {\n\t\tWidget widget = event.item;\n\t\tif (!(widget instanceof TreeItem))\n\t\t\treturn;\n\t\tTreeItem item = (TreeItem) widget;\n\t\titem.setImage(SWTUtil.getImage(\"folderopen.gif\"));\n\t}", "void setResourceItem(BaseContentItem resourceItem);", "public void refresh() {\r\n TreePath p = this.getSelectionPath();\r\n model = new FolderTreeModel();\r\n this.setModel(model);\r\n }", "private void changeContext(){\n MainWorkflow.observeContexts(generateRandom(24,0));\n }", "public void setDir(File dir) {\n this.dir = dir;\n }", "public void testSetParent_fixture28_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture28();\n\t\tFolder parent = new Folder();\n\n\t\tfixture.setParent(parent);\n\n\t\t// add additional test code here\n\t}", "private void setCategoryPath(Enum enummDt, String newCategoryPath) throws Exception {\n\t\tint txID = program.startTransaction(\"Test Create Enum\");\n\t\ttry {\n\t\t\tenummDt.setCategoryPath(new CategoryPath(newCategoryPath));\n\t\t}\n\t\tfinally {\n\t\t\tprogram.endTransaction(txID, true);\n\t\t}\n\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\t}", "public void changeFolder(String folderName) throws MailboxFolderException {\n\n try {\n\n if(Constants.LEERSTRING.equals(folderName)) {\n\n this.folder = this.store.getDefaultFolder();\n }\n else {\n\n this.folder = this.store.getFolder(folderName);\n }\n\n if(this.folder == null) {\n\n throw(new MailboxFolderException((\"Invalid folder: \" + folderName),\n null));\n }\n }\n catch(MessagingException me) {\n\n throw(new MailboxFolderException((\"Probleme mit Folder: \" + folderName),\n me, folderName));\n }\n }", "public void updateFolder(Folder folder) {\n Validate.notNull(folder.getId(), \"id cannot be null\");\n String path = StringUtils.replaceOnce(FOLDERS_ITEM_PATH, PLACEHOLDER, folder.getId().toString());\n client.post(path, String.class, folder);\n }", "public void setParentController(HomeController parent) {\n\t\tthis.parent = parent;\n\t}", "private void processFolders(List<File> folderList, java.io.File parentFolder) {\n // process each folder to see if it needs to be updated;\n for (File f : folderList) {\n String folderName = f.getTitle();\n java.io.File localFolder = new java.io.File(parentFolder, folderName);\n Log.e(\"folder\",localFolder.getAbsolutePath());\n if (!localFolder.exists())\n localFolder.mkdirs();\n getFolderContents(f, localFolder);\n }\n }", "private void workerUpdate(final File newFolder, final boolean isReloadFolder) {\r\n\r\n\t\tif (newFolder == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (isReloadFolder == false && _workerNextFolder != null && _workerNextFolder.equals(newFolder)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsynchronized (_workerLock) {\r\n\r\n\t\t\t_workerNextFolder = newFolder;\r\n\r\n\t\t\t_workerStopped = false;\r\n\t\t\t_workerCancelled = true;\r\n\r\n\t\t\t_workerLock.notifyAll();\r\n\t\t}\r\n\r\n\t\tif (_workerThread == null) {\r\n\t\t\t_workerThread = new Thread(_workerRunnable, \"PicDirImages: Retrieving folder image files\");//$NON-NLS-1$\r\n\t\t\t_workerThread.start();\r\n\t\t}\r\n\t}", "public void onSetNewCurrentItem() {\n }", "public void setResource(URI resource) {\n this.resource = resource;\n }", "public void setFolderId(UUID folderId) {\n this.folderId = folderId;\n }", "@Override\n\tpublic void doAction() {\n\t\tacceptMUs();\n\t\tModel.getViewer().setRoot(iurs.getRoot(0));\n\t}", "@FXML\n private void switchHome(ActionEvent event) {\n setNode(mainForm);\n }", "public void setCurrentFile(String name) {\n\t\tthis.currentFile = name;\n\t}", "private void setTemplateFile() throws IOException, BusinessException, ObjectNotFoundException, JackrabbitException,\n CertitoolsAuthorizationException, BadElementException {\n super.setFolder(folder);\n if (fileTemplate1 != null) {\n String folderPath;\n if (insertFolderFlag) {\n folderPath = folderId + \"/folders/\" + folder.getName();\n } else {\n folderPath = PlanUtils.getParentPath(folderId) + \"/folders/\" + folder.getName();\n }\n\n Template1Diagram template1Diagram = new Template1Diagram(new Resource(\"/\" + fileTemplate1.getFileName(),\n fileTemplate1.getFileName(),\n fileTemplate1.getContentType(), fileTemplate1.getInputStream(),\n \"\" + fileTemplate1.getSize(), true),\n PlanUtils.convertResourceToHTML(folderPath, getContext().getRequest().getContextPath(),\n getModuleTypeFromEnum()));\n if (replaceImageMap == null) {\n replaceImageMap = Boolean.FALSE;\n }\n if (!insertFolderFlag && !replaceImageMap) {\n\n Folder previousVersion =\n planService.findFolder(folderId, true, getUserInSession(), getModuleTypeFromEnum());\n try {\n TemplateWithImage previousTemplate = (TemplateWithImage) previousVersion.getTemplate();\n String htmlContent = template.getImageMap();\n Image newImage = TemplateWithImageUtils.getImage(fileTemplate1.getInputStream());\n Image oldImage = TemplateWithImageUtils.getImage(previousTemplate.getResource().getData());\n\n String unescapedHtml = StringEscapeUtils.unescapeHtml(htmlContent);\n\n String htmlResultContent = TemplateWithImageUtils.resizeImageMap(unescapedHtml, oldImage, newImage);\n\n if(htmlResultContent != null){\n template1Diagram.setImageMap(htmlResultContent);\n }\n } catch (ClassCastException ex) {\n //Do nothing\n }\n }\n super.setTemplateToFolder(template1Diagram);\n\n } else {\n Folder dbFolder = planService.findFolder(folderId, false, getUserInSession(), getModuleTypeFromEnum());\n //User does not changed template\n if (dbFolder.getTemplate().getName().equals(Template.Type.TEMPLATE_DIAGRAM.getName())) {\n Template1Diagram dbTemplate1Diagram = (Template1Diagram) dbFolder.getTemplate();\n //set old resource and update image Map\n super.setTemplateToFolder(\n new Template1Diagram(dbTemplate1Diagram.getResource(), template.getImageMap()));\n } else {\n //User changed template to this one, and do not upload image, so create empty template\n super.setTemplateToFolder(new Template1Diagram());\n }\n }\n }", "@Async\r\n void processEvents() {\r\n for (;;) {\r\n \r\n // wait for key to be signalled\r\n WatchKey key;\r\n try {\r\n key = watcher.take();\r\n } catch (InterruptedException x) {\r\n log.error(\"interrupted exception: \" + x);\r\n return;\r\n }\r\n\r\n FolderConfig config = keys.get(key);\r\n Path dir = Paths.get(config.getDirectory());\r\n \r\n if (dir == null) {\r\n \r\n continue;\r\n }\r\n\r\n for (WatchEvent<?> event : key.pollEvents()) {\r\n WatchEvent.Kind kind = event.kind();\r\n\r\n // TBD - provide example of how OVERFLOW event is handled\r\n if (kind == OVERFLOW) {\r\n continue;\r\n }\r\n if (kind == StandardWatchEventKinds.ENTRY_CREATE) {\r\n insertIntoSDE(config, event.context().toString());\r\n }\r\n\r\n }\r\n\r\n // reset key and remove from set if directory no longer accessible\r\n boolean valid = key.reset();\r\n if (!valid) {\r\n keys.remove(key);\r\n\r\n // all directories are inaccessible\r\n if (keys.isEmpty()) {\r\n break;\r\n }\r\n }\r\n }\r\n }", "void setSystabRegFolderName(String name){\n this.folderName = name + \"\\\\\"; // Append the \\\\ to get inside the folder\n }" ]
[ "0.61425346", "0.5991641", "0.5409528", "0.538474", "0.53631", "0.5270301", "0.52652544", "0.52483976", "0.5239075", "0.51599854", "0.5152803", "0.5134882", "0.5124947", "0.50697", "0.505497", "0.50155866", "0.5007563", "0.50005627", "0.4984811", "0.4975315", "0.4970255", "0.49647725", "0.4951991", "0.49474308", "0.49414647", "0.4933823", "0.4929972", "0.49232084", "0.49139372", "0.49103233", "0.48972753", "0.48908925", "0.48870087", "0.48846993", "0.48846993", "0.48832154", "0.4879447", "0.4875182", "0.48745048", "0.4872114", "0.48677567", "0.4860755", "0.48594722", "0.48557034", "0.48450094", "0.48423117", "0.48331726", "0.48253885", "0.48215973", "0.48195398", "0.48113993", "0.48112774", "0.47893968", "0.4776946", "0.4770255", "0.4768158", "0.4766451", "0.476566", "0.4759794", "0.4734427", "0.47324654", "0.47324193", "0.47278434", "0.472478", "0.47190785", "0.47086418", "0.47020295", "0.46952185", "0.46946135", "0.46910334", "0.46876326", "0.46864024", "0.46827266", "0.4672946", "0.46695367", "0.46639478", "0.46589276", "0.46557516", "0.46551612", "0.46479255", "0.46398744", "0.46395305", "0.46263725", "0.4619421", "0.46149245", "0.46087176", "0.460474", "0.4597037", "0.45899376", "0.45819345", "0.45756188", "0.45743755", "0.45732334", "0.45707378", "0.456944", "0.45690334", "0.45679387", "0.45676133", "0.45606625", "0.45594758" ]
0.65861875
0
Creates a new InstrumentedClassInfo
public InstrumentedClassInfo(String binaryClassName, ClassLoader classLoader, ProtectionDomain protectionDomain, byte[] originalClassByteCode, byte[] instrumentedClassByteCode) { super(); this.binaryClassName = binaryClassName; this.classLoader = classLoader; this.protectionDomain = protectionDomain; originalClassBuffer = ByteBuffer.allocateDirect(originalClassByteCode.length); originalClassBuffer.put(originalClassByteCode); originalClassBuffer.flip(); instrumentedClassBuffer = ByteBuffer.allocateDirect(instrumentedClassByteCode.length); instrumentedClassBuffer.put(instrumentedClassByteCode); instrumentedClassBuffer.flip(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ClassInfo() {\n }", "public interface Instrumentor {\n\n InstrumentionClass getInstrucmentClass(ClassLoader loader, String className, byte[] classfileBuffer);\n\n}", "public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }", "public abstract String getInstrumentationClass();", "DescribedClass createDescribedClass();", "protected abstract Result createClasses( Outline outline, CClassInfo bean );", "public TracerClassInstrumentation() {\n this(\"datadog.trace.api.Trace\", Collections.singleton(\"noop\"));\n }", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "Class createClass();", "private static byte[] instrumentClassFile(byte[] classfileBuffer) {\n String className = new ClassReader(classfileBuffer).getClassName().replace(\"/\", \".\");\n ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();\n byte[] newClassfileBuffer = new EkstaziCFT().transform(currentClassLoader, className, null, null, classfileBuffer);\n return newClassfileBuffer;\n }", "Reproducible newInstance();", "@Test\n public void test01()\n {\n MetaClass.forClass(Class, reflectorFactory)\n }", "NamedClass createNamedClass();", "public CianetoClass() {\r\n this.cianetoMethods = new Hashtable<String, Object>();\r\n this.cianetoAttributes = new Hashtable<String, Object>();\r\n }", "public ASCompilationUnit newClass(String qualifiedClassName) {\n\t\treturn ASTBuilder.synthesizeClass(qualifiedClassName);\n\t}", "public org.objenesis.instantiator.ObjectInstantiator newInstantiatorOf(final java.lang.Class r4) {\n /*\n r3 = this;\n boolean r0 = com.esotericsoftware.kryo.util.Util.IS_ANDROID\n r1 = 1\n if (r0 != 0) goto L_0x002a\n java.lang.Class r0 = r4.getEnclosingClass()\n if (r0 == 0) goto L_0x001d\n boolean r0 = r4.isMemberClass()\n if (r0 == 0) goto L_0x001d\n int r0 = r4.getModifiers()\n boolean r0 = java.lang.reflect.Modifier.isStatic(r0)\n if (r0 != 0) goto L_0x001d\n r0 = 1\n goto L_0x001e\n L_0x001d:\n r0 = 0\n L_0x001e:\n if (r0 != 0) goto L_0x002a\n com.esotericsoftware.reflectasm.ConstructorAccess r0 = com.esotericsoftware.reflectasm.ConstructorAccess.get(r4) // Catch:{ Exception -> 0x002a }\n com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$1 r2 = new com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$1 // Catch:{ Exception -> 0x002a }\n r2.<init>(r0, r4) // Catch:{ Exception -> 0x002a }\n return r2\n L_0x002a:\n r0 = 0\n r2 = r0\n java.lang.Class[] r2 = (java.lang.Class[]) r2 // Catch:{ Exception -> 0x0033 }\n java.lang.reflect.Constructor r0 = r4.getConstructor(r2) // Catch:{ Exception -> 0x0033 }\n goto L_0x003c\n L_0x0033:\n java.lang.Class[] r0 = (java.lang.Class[]) r0 // Catch:{ Exception -> 0x0042 }\n java.lang.reflect.Constructor r0 = r4.getDeclaredConstructor(r0) // Catch:{ Exception -> 0x0042 }\n r0.setAccessible(r1) // Catch:{ Exception -> 0x0042 }\n L_0x003c:\n com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$2 r1 = new com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$2 // Catch:{ Exception -> 0x0042 }\n r1.<init>(r0, r4) // Catch:{ Exception -> 0x0042 }\n return r1\n L_0x0042:\n org.objenesis.strategy.InstantiatorStrategy r0 = r3.fallbackStrategy\n if (r0 != 0) goto L_0x00c1\n boolean r0 = r4.isMemberClass()\n if (r0 == 0) goto L_0x0073\n int r0 = r4.getModifiers()\n boolean r0 = java.lang.reflect.Modifier.isStatic(r0)\n if (r0 == 0) goto L_0x0058\n goto L_0x0073\n L_0x0058:\n com.esotericsoftware.kryo.KryoException r0 = new com.esotericsoftware.kryo.KryoException\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"Class cannot be created (non-static member class): \"\n r1.append(r2)\n java.lang.String r4 = com.esotericsoftware.kryo.util.Util.className(r4)\n r1.append(r4)\n java.lang.String r4 = r1.toString()\n r0.<init>(r4)\n throw r0\n L_0x0073:\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"Class cannot be created (missing no-arg constructor): \"\n r1.append(r2)\n java.lang.String r2 = com.esotericsoftware.kryo.util.Util.className(r4)\n r1.append(r2)\n java.lang.String r1 = r1.toString()\n r0.<init>(r1)\n java.lang.String r4 = r4.getSimpleName()\n java.lang.String r1 = \"\"\n boolean r4 = r4.equals(r1)\n if (r4 == 0) goto L_0x00b7\n java.lang.String r4 = \"\\n\\tThis is an anonymous class, which is not serializable by default in Kryo. Possible solutions: \"\n r0.append(r4)\n java.lang.String r4 = \"1. Remove uses of anonymous classes, including double brace initialization, from the containing \"\n r0.append(r4)\n java.lang.String r4 = \"class. This is the safest solution, as anonymous classes don't have predictable names for serialization.\"\n r0.append(r4)\n java.lang.String r4 = \"\\n\\t2. Register a FieldSerializer for the containing class and call \"\n r0.append(r4)\n java.lang.String r4 = \"FieldSerializer#setIgnoreSyntheticFields(false) on it. This is not safe but may be sufficient temporarily. \"\n r0.append(r4)\n java.lang.String r4 = \"Use at your own risk.\"\n r0.append(r4)\n L_0x00b7:\n com.esotericsoftware.kryo.KryoException r4 = new com.esotericsoftware.kryo.KryoException\n java.lang.String r0 = r0.toString()\n r4.<init>(r0)\n throw r4\n L_0x00c1:\n org.objenesis.instantiator.ObjectInstantiator r4 = r0.newInstantiatorOf(r4)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.esotericsoftware.kryo.Kryo.DefaultInstantiatorStrategy.newInstantiatorOf(java.lang.Class):org.objenesis.instantiator.ObjectInstantiator\");\n }", "private static final class <init> extends com.ebay.nautilus.kernel.content.\n{\n\n public EbayAppInfo create(EbayContext ebaycontext)\n {\n return new EbayAppInfoImpl(\"com.ebay.mobile\", \"4.1.5.22\", false);\n }", "Appinfo createAppinfo();", "@SuppressWarnings({\"UnusedDeclaration\"})\n public static void createAnalysisContext(Project project, List<ClassDescriptor> appClassList,\n @CheckForNull String sourceInfoFileName) throws IOException {\n AnalysisCacheToAnalysisContextAdapter analysisContext = new AnalysisCacheToAnalysisContextAdapter();\n\n // Make this the current analysis context\n AnalysisContext.setCurrentAnalysisContext(analysisContext);\n\n // Make the AnalysisCache the backing store for\n // the BCEL Repository\n analysisContext.clearRepository();\n\n // If needed, load SourceInfoMap\n if (sourceInfoFileName != null) {\n SourceInfoMap sourceInfoMap = analysisContext.getSourceInfoMap();\n sourceInfoMap.read(new FileInputStream(sourceInfoFileName));\n }\n analysisContext.setProject(project);\n }", "public MakeClass(String classAccessSp,String className,String listOfAttributes,int tabSize )\n {\n this(\"\",classAccessSp,className,listOfAttributes,tabSize);\n }", "Object yangAugmentedInfo(Class classObject);", "Object yangAugmentedInfo(Class classObject);", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "private SystemInfo() {\r\n // forbid object construction \r\n }", "public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}", "public static TracingHelper create() {\n return new TracingHelper(TracingHelper::classMethodName);\n }", "public DeviceInfo() {}", "DsmlClass createDsmlClass();", "InstrumentedType withInitializer(ByteCodeAppender byteCodeAppender);", "public static IATAndroid create(Activity parent, IATOptions iatOptions) throws IOException, InterpreterException {\t\n\t\tFile _ENV_AT_HOME_ = new File(iatOptions.AT_HOME_); \n\t\t\n\t\tSystem.setProperty(\"AT_HOME\", iatOptions.AT_HOME_);\n\t\tSystem.setProperty(\"AT_INIT\", iatOptions.AT_INIT_);\n\t\tSystem.setProperty(\"AT_STACK_SIZE\", Constants._ENV_AT_STACKSIZE_);\t\t\n\t\t\n\t\tString appName = parent.getApplicationInfo().packageName;\n\t\t\t\n\t\tsetupLogging(iatOptions);\n\t\tMulticastLock mclock = setupMulticast(parent);\n\t\t\n\t\t\n\t\tLinkedList<String> args = new LinkedList<String>(Arrays.asList(\t\t\n\t\t\t\tnew String[] {\n\t\t\t\t\t\"-a\", iatOptions.ipAddress_,\n\t\t\t\t\t\"-o\", getNamespaceMappings(_ENV_AT_HOME_.toString()),\n\t\t\t\t\t\"-n\", iatOptions.networkName_,\n\t\t\t\t\t\"-nojline\"\n\t\t\t\t}));\n\t\t\n\t\tif (iatOptions.startFile_ != null)\n\t\t\targs.add(iatOptions.startFile_);\n\t\t\n\t\tsynchronized (instance_lock) {\n\t\t\tinstance = new IATAndroid(args.toArray(new String[args.size()]));\n\t\t\tinstance.parent_ = parent;\n\t\t\tinstance.appName_ = appName;\n\t\t\tinstance.mclock_ = mclock;\n\t\t}\n\t\tLog.v(\"AmbientTalk\", \"IAT created\");\n\n\t\treturn instance;\n\t}", "Clase createClase();", "Instrument getInstrument(String vendorCode);", "public void createClass(String className)\r\n\t{\r\n\t\tString longName;\r\n\t\tif(className.contains(\"#\"))\r\n\t\t\tlongName = className;\r\n\t\tif(className.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(className);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + className;\r\n\t\t\r\n\t\tONT_MODEL.createClass(longName);\r\n\t}", "private CoverageBase convertClass(com.intland.jenkins.gcovr.model.Class clazz, String packageName) {\n\n\t\tCoverageBase base = new CoverageBase();\n\t\tbase.setName(StringUtils.replace(clazz.getName(), packageName + \"/\", \"\"));\n\n\t\tthis.setCoverage(base, clazz);\n\t\tbase.setMarkup(GcovHTMLMarkupBuilder.genearteSummary(base));\n\n\t\treturn base;\n\t}", "private Instantiation(){}", "CdapServiceInstance createCdapServiceInstance();", "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}", "public CMObject newInstance();", "public ClassBundle() {\n }", "public Class() {\n\t\tarrayMethods = new ArrayList<Method>();\n\t\tcode_Smells = new HashMap<String, Boolean>();\n\n\t}", "public SystemInfo() {\r\n\t}", "private CoverageParser() {\n }", "public Activator() {\r\n\t}", "public ClassInfo(String sClassName, String sJarName, long lCrc, Date dDate, long lSize,\r\n long lCompressedSize, Attributes aAttributes, Certificate[] acCertificates,\r\n Class<?> cClass, String sComment, String sHash, int iClassOrder,\r\n String sClassPathDir, String sRelative)\r\n {\r\n sFileName = sClassName;\r\n this.sJarName = sJarName;\r\n lFileCrc = lCrc;\r\n dFileDate = dDate;\r\n lFileSize = lSize;\r\n lFileCompressedSize = lCompressedSize;\r\n aFileAttributes = aAttributes;\r\n acFileCertificates = acCertificates;\r\n cFileClass = cClass;\r\n sFileComment = sComment;\r\n sMD5Hash = sHash;\r\n iClassOrderLevel = iClassOrder;\r\n sClassDirPath = sClassPathDir;\r\n sRelativeDir = sRelative;\r\n }", "public AppInfo() {\n }", "Information createInformation();", "public static Object createOb(String[] info){\n Object ob1 = null;\n \n try {\n Class cDef = Class.forName(ClassNames[Integer.parseInt(info[0])-1]);\n Constructor ctor=null;\n ctor=cDef.getDeclaredConstructor(String.class,String.class);\n ob1 = ctor.newInstance(info[1],info[2]);\n } catch (ClassNotFoundException|NoSuchMethodException|InstantiationException | IllegalAccessException | IllegalArgumentException\n\t\t\t\t| InvocationTargetException e) {\n //TODO: handle exception\n e.printStackTrace();\n }\n return ob1;\n }", "protected DiagClassVisitor() {\n super(ASM5);\n }", "public ClassesInfoFragment() {\r\n }", "private SystemInfo() {\n }", "@Deprecated\r\n private void setDevices() throws ClassNotFoundException {\n\r\n installedDevices = new Device[deviceName.length];\r\n\r\n for (int i = 0; i < deviceName.length; i++) {\r\n\r\n //Class<?> eine = Class.forName(deviceName[0]);\r\n try {\r\n Constructor<?>[] ctors = Class.forName(deviceName[i]).getDeclaredConstructors();\r\n Constructor<?> ctor = null;\r\n for (Constructor<?> c : ctors) {\r\n if (c.getGenericParameterTypes().length == 0) {\r\n ctor = c;\r\n }\r\n }\r\n ctor.setAccessible(true);\r\n Device device = (Device) ctor.newInstance();\r\n\r\n installedDevices[i] = device;\r\n\r\n } catch (Exception e) {\r\n throw new ClassNotFoundException(\r\n \"Ist abgestuerzt, weil Klasse aus Config nicht existiert oder im falschen ordner sich befindet\"\r\n + e + \".\");\r\n }\r\n\r\n }\r\n\r\n }", "private ClassUtil() {}", "Instance createInstance();", "NewClass1 createNewClass1();", "public Annotation(String className) {\n\t//\tthis.id = newId();\n\t\tthis.annotatonClassName = className;\n\t\tattributes = new HashSetValuedHashMap<String, String>();\n\t}", "AttributeDeclarations createAttributeDeclarations();", "@Override\n public void enterMainClass(MiniJavaParser.MainClassContext ctx) {\n Klass mainKlass = klasses.get(ctx.Identifier(0).getText());\n String mainKlassName = mainKlass.getScopeName();\n\n cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cw.visit(V1_1, ACC_PUBLIC, mainKlassName, null, \"java/lang/Object\", null);\n\n mg = new GeneratorAdapter(ACC_PUBLIC, INIT(), null, null, cw);\n mg.loadThis();\n mg.invokeConstructor(Type.getType(Object.class), INIT());\n mg.returnValue();\n mg.endMethod();\n mg = new GeneratorAdapter(ACC_PUBLIC + ACC_STATIC, org.objectweb.asm.commons.Method.getMethod(\"void main (String[])\"), null, null, cw);\n }", "public AnnotationInfoImpl()\n {\n }", "public void fetchClassInfo() {\n try {\n telephonyClassName = \"android.telephony.TelephonyManager\";\n listofClass = new String[]{\n \"com.mediatek.telephony.TelephonyManagerEx\",\n \"android.telephony.TelephonyManager\",\n \"android.telephony.MSimTelephonyManager\",\n \"android.telephony.TelephonyManager\"};\n for (int index = 0; index < listofClass.length; index++) {\n if (isTelephonyClassExists(listofClass[index])) {\n if (isMethodExists(listofClass[index], \"getDeviceId\")) {\n if (!simVariant.equalsIgnoreCase(\"\")) {\n break;\n }\n }\n if (isMethodExists(listofClass[index], \"getNetworkOperatorName\")) {\n break;\n } else if (isMethodExists(listofClass[index], \"getSimOperatorName\")) {\n break;\n }\n }\n }\n for (int index = 0; index < listofClass.length; index++) {\n try {\n if (slotName1 == null || slotName1.equalsIgnoreCase(\"\")) {\n getValidSlotFields(listofClass[index]);\n // if(slotName1!=null || !slotName1.equalsIgnoreCase(\"\")){\n getSlotNumber(listofClass[index]);\n } else {\n break;\n }\n } catch (Exception e) {\n LOGE(TAG, \"[fetchClassInfo] Unable to get class info\", e);\n }\n }\n } catch (Exception e) {\n LOGE(TAG, \"[fetchClassInfo] Unable to get class info\", e);\n }\n }", "public Attributes2Impl() {\n /*\n // Can't load method instructions: Load method exception: null in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.xml.sax.ext.Attributes2Impl.<init>():void\");\n }", "public static void startInstrumenting() {\n\t\tstate = new InstrumenterState();\n\t\tfirstLevelStore = state.currentLevelStore;\n\t\t\n\t\tdidError = false;\n\t\texception = \"\";\n\t\tinstrumenting = true;\n\t\trunning = false;\n\t}", "public ClassInformation(String className, String filepath, int startPos, int endPos, final SourceContext sourceContext) {\n super(startPos, endPos, sourceContext);\n\n this.className = className;\n this.filepath = filepath;\n this.fields = new ArrayList<>();\n this.methodDeclarations = new ArrayList<>();\n this.comments = new ArrayList<>();\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}", "public static final Instrument getDummy() {\n return new Instrument();\n }", "Klassenstufe createKlassenstufe();", "public static ClassMap create(String uri, String localName)\n {\n // XMLName.create checks that localName is not null.\n\n return new ClassMap(XMLName.create(uri, localName));\n }", "ClassAcft initClassAcft(ClassAcft iClassAcft)\n {\n iClassAcft.updateElementValue(\"ClassAcft\");\n return iClassAcft;\n }", "public String createAssetClass(AssetClass assetClass_);", "ClassInstanceCreationExpression getClass_();", "private CoverageClassVisitor createCoverageClassVisitor(String className, ClassWriter cv, boolean isRedefined) {\n // We cannot change classfiles if class is being redefined.\n return new CoverageClassVisitor(className, cv);\n }", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "TAttribute createTAttribute();", "public InspectionAttributes() {\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180372));\n classWriter0.addType(\"H\");\n classWriter0.visitOuterClass(\"H\", \"H\", \"9iniWt>\");\n classWriter0.newField(\"H\", \"H\", \"UNp|{*'V\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"UNp|{*'V\";\n stringArray0[1] = \"9iniWt>\";\n classWriter0.newLong(1);\n stringArray0[2] = \"H\";\n stringArray0[3] = \"UNp|{*'V\";\n boolean boolean0 = true;\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180372), \"H\", \"<T'RwU+).UKJX>\", \"H\", stringArray0, true, false);\n classWriter0.newNameTypeItem(\"9iniWt>\", \"UNp|{*'V\");\n Item item0 = new Item();\n methodWriter0.visitInsn(186);\n Label label0 = new Label();\n Attribute attribute0 = new Attribute(\"9iniWt>\");\n methodWriter0.visitIincInsn((-1), 177);\n ClassReader classReader0 = null;\n try {\n classReader0 = new ClassReader(\"HL)rLXrkh@[\");\n fail(\"Expecting exception: IOException\");\n \n } catch(Throwable e) {\n //\n // Class not found\n //\n verifyException(\"org.objectweb.asm.jip.ClassReader\", e);\n }\n }", "public void constructorReturned(Spy spy, String constructionInfo);", "public IdentityInfo() {\n }", "private void gatherInformation(String className, byte[] bytes) {\n ClassReader reader = new ClassReader(bytes);\n ClassWriter writer = new NonClassloadingClassWriter(reader, ClassWriter.COMPUTE_FRAMES);\n ClassVisitor visitor = new ClassInformationAdapter(writer, methodInformation);\n reader.accept(visitor, 0);\n }", "Intent createNewIntent(Class cls);", "protected abstract void createAttributes();", "private static PacketAnalyzer loadInstance(String analyzerClassName) {\n PacketAnalyzer packetAnalyzer = null;\n try {\n \t//System.out.println(\"--- Looking for : \" + analyzerClassName);\n packetAnalyzer = (PacketAnalyzer) Class.forName(analyzerClassName).newInstance();\n //System.out.println(\"--- Found : \" + analyzerClassName);\n } catch (InstantiationException e) {\n e.printStackTrace();\n //System.out.println(\"--- Creating the default PacketAnalyzer (InstantiationException) ---\");\n packetAnalyzer = new PacketAnalyzer();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n //System.out.println(\"--- Creating the default PacketAnalyzer (IllegalAccessException) ---\");\n packetAnalyzer = new PacketAnalyzer();\n } catch (ClassNotFoundException e) {\n //System.out.println(\"--- PacketAnalyzer subclass \" + analyzerClassName + \" not found ---\");\n //System.out.println(\"--- Creating the default PacketAnalyzer ---\");\n packetAnalyzer = new PacketAnalyzer();\n }\n return packetAnalyzer;\n }", "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "private TesteeAttributeIdentity() {\n }", "Attribute createAttribute();", "Attribute createAttribute();", "public native void constructor();", "public String getFullInstrumentationClass() {\n if (getInstrumentationClass().startsWith(\".\")) {\n return getAndroidPackage() + getInstrumentationClass();\n }\n return getInstrumentationClass();\n }", "public static Unit generateDummy(String className)\r\n {\r\n try\r\n {\r\n //find constructor requiring no parameters\r\n Class classToCreate = Class.forName(\"TowerDefense.\"+className);\r\n Class[] params = {};\r\n Constructor constructor = classToCreate.getConstructor(params);\r\n \r\n //create instance of object using found constructor\r\n Object[] argList = {};\r\n return (Tower)constructor.newInstance(argList);\r\n }\r\n catch (Exception e)\r\n {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }", "InstrumentedType prepare(InstrumentedType instrumentedType);", "ClassMaker(String packageName, String className, String core, String toBeFluentized) throws IOException {\n this.className = className;\n this.packageName = packageName;\n this.core = core;\n this.toBeFluentized = toBeFluentized;\n }", "public static void initializeClassAttributes() {\n\t\tAboraSupport.findAboraClass(IntegerVarArray.class).setAttributes( new Set().add(\"CONCRETE\").add(\"PSEUDOCOPY\"));\n\t}", "static public InstanceGenerator create(String className, String datasetFileName)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(String.class).newInstance(datasetFileName);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "@Override\n\tpublic InvocationInstrumenter newInvocationInstrumenter() {\n\t\treturn AuthInfoContext.current()\n\t\t\t\t.map(LocalInstrumenter::new)\n\t\t\t\t.orElse(null);\n\t}", "CdapApplication createCdapApplication();", "private void __sep__Constructors__() {}", "public ServiceInfo() {\n }", "public static Object createObject(String className) throws Exception {\n return createObject(Class.forName(className));\n }", "public static Flipkart createFlipkart()throws Exception {\r\n\t\t //create target class obj\r\n\t\t Flipkart fpkt=new Flipkart();\r\n\t\t \r\n\t\t // Load Dependent class \r\n\t\t Class c=Class.forName(props.getProperty(\"dependent.comp\"));\r\n\t\t //create object using refflection object\r\n\t\t Constructor cons[]=c.getDeclaredConstructors();\r\n\t\t //create object\r\n\t\t Courier courier=(Courier) cons[0].newInstance();\r\n\t\t //set Dependent class object to target class obj\r\n\t\t fpkt.setCourier(courier);\r\n\t return fpkt;\r\n }", "@Override\n\tpublic void buildAttributes(JDefinedClass cls) {\n\n\t}", "protected XMLClassDescriptorImpl() {\n attributeDescriptors = new List(7);\n elementDescriptors = new List(7);\n }", "public CallInfo() {\n\t}" ]
[ "0.5920404", "0.5610403", "0.55273044", "0.5466098", "0.5441897", "0.53097004", "0.52113664", "0.5179042", "0.5135595", "0.50568277", "0.5052726", "0.5044127", "0.50304496", "0.50303006", "0.5018491", "0.4971691", "0.4959423", "0.49471015", "0.49369115", "0.49309194", "0.48840412", "0.48840412", "0.48796323", "0.48658282", "0.48639604", "0.48158702", "0.48143125", "0.48103806", "0.47881246", "0.47750854", "0.47701943", "0.4749182", "0.47465107", "0.47440726", "0.47408253", "0.47348943", "0.47344625", "0.47270125", "0.4713784", "0.470955", "0.46800223", "0.4665145", "0.46629766", "0.46512666", "0.46492416", "0.46438274", "0.46355468", "0.46343035", "0.46339604", "0.4633348", "0.46317124", "0.46307167", "0.462444", "0.46214172", "0.46094072", "0.46078655", "0.46056348", "0.45992416", "0.45978215", "0.45928124", "0.4591735", "0.45901775", "0.45891273", "0.45888123", "0.45860064", "0.45825833", "0.4582333", "0.45812503", "0.45765036", "0.4575938", "0.4570702", "0.45687962", "0.45625377", "0.4559738", "0.45448363", "0.45434564", "0.4541116", "0.45389235", "0.45377064", "0.45335144", "0.45328015", "0.45322713", "0.45266482", "0.45266482", "0.45241213", "0.45233065", "0.45212552", "0.45157355", "0.45141017", "0.45118818", "0.45039487", "0.45019576", "0.45015347", "0.45011622", "0.4486387", "0.44799417", "0.44785047", "0.44768733", "0.44755185", "0.44749242" ]
0.5431373
5
Returns the binary name of the class that was instrumented
public String getBinaryClassName() { return binaryClassName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getInstrumentationClass();", "public String getFullInstrumentationClass() {\n if (getInstrumentationClass().startsWith(\".\")) {\n return getAndroidPackage() + getInstrumentationClass();\n }\n return getInstrumentationClass();\n }", "public String getFullName() {\n return getAndroidPackage() + \"/\" + getInstrumentationClass();\n }", "public String getRuntimeClass();", "public String getBinaryClassName() {\n\t\tString bcn = classQName.dotSeparated();\n\t\t// Inner classes not supported yet\n\t\tassert(!bcn.contains(\"$\"));\n\t\treturn bcn;\n\t}", "java.lang.String getClass_();", "java.lang.String getClass_();", "public String getName()\n {\n return underlyingClass.getName();\n }", "public String getShortTestClassName()\r\n {\r\n return target.getClass().getSimpleName();\r\n }", "public String getSerializableClassName()\n {\n return \"bm.vm.ScriptingClass\";\n }", "public String getClassName() {\n\t\tString tmp = methodBase();\n\t\treturn tmp.substring(0, 1).toUpperCase()+tmp.substring(1);\n\t}", "java.lang.String getClassName();", "String getGeneratedClassName();", "String getGeneratedClassName();", "String getGeneratedClassName();", "public final String toStringClassName() {\r\n \t\tString str = this.getClass().getName();\r\n \t\tint lastIx = str.lastIndexOf('.');\r\n \t\treturn str.substring(lastIx+1);\r\n \t}", "public String getCompilerClassName();", "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}", "protected String getName() {\n\t\tfinal String tmpName = getClass().getSimpleName();\n\t\tif (tmpName.length() == 0) {\n\t\t\t// anonymous class\n\t\t\treturn \"???\";//createAlgorithm(replanningContext).getClass().getSimpleName();\n\t\t}\n\n\t\treturn tmpName;\n\t}", "public String getClassName();", "public static String getCurrentClassName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getClassName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=java.lang.Thread s1=g1.tool.Tool s2=g1.TRocketmq1Application\n\t\treturn s2;\n\t}", "public String getClassname() {\n return classname;\n }", "java.lang.String getInstanceName();", "public static String getName() {\n\t\treturn _asmFileStr;\n\t}", "protected String getClassName() {\n return getDescriptedClass().getName();\n }", "String getClassName();", "String getClassName();", "String getClassName();", "public String getTestClassName()\r\n {\r\n return target.getClass().getName();\r\n }", "public String getClassName(){\n\t\treturn targetClass.name;\n\t}", "public String toString() {return classSimpleName+\"#\"+name;}", "private static String getClassName() {\n\n\t\tThrowable t = new Throwable();\n\n\t\ttry {\n\t\t\tStackTraceElement[] elements = t.getStackTrace();\n\n\t\t\t// for (int i = 0; i < elements.length; i++) {\n\t\t\t//\n\t\t\t// }\n\n\t\t\treturn elements[2].getClass().getSimpleName();\n\n\t\t} finally {\n\t\t\tt = null;\n\t\t}\n\n\t}", "default public String strandInfo() {\n\t\treturn this.getClass().getName();\n\t}", "public String mo12985l_() {\n return getClass().getName();\n }", "public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }", "protected String getName() {\n return testClass.getName();\n }", "public String getName() {\r\n \treturn this.getClass().getName();\r\n }", "public String getClassname() {\n\t\treturn classname;\n\t}", "public String getName_Class() {\n\t\treturn name;\n\t}", "@Override\n public String simpleName() {\n if (this == class_) {\n return \"class\";\n }\n return name();\n }", "String getInstanceOfClass();", "@Override\n public String toString() {\n if (this == UNREFERENCED_EXTERNAL) {\n return \"Unreferenced external class name\";\n } else {\n return method.getSimpleName().toString() + \"=\" + obfuscatedClassName;\n }\n }", "public String getName() {\n return className;\n }", "public String getClassname()\r\n {\r\n return m_classname;\r\n }", "public JvmType getClassx();", "public String binaryName() {\n return fullName();\n }", "@Override\n public String getClassName() {\n Object ref = className_;\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 className_ = s;\n return s;\n }\n }", "private String m56637b(Class cls) {\n return cls.getName();\n }", "public interface Instrumentor {\n\n InstrumentionClass getInstrucmentClass(ClassLoader loader, String className, byte[] classfileBuffer);\n\n}", "public static String getClassName() {\n return CLASS_NAME;\n }", "public abstract String getClassName();", "default String getCheckName() {\n return getClass().getSimpleName();\n }", "@Override\n public byte[] getClassBytes(String name) {\n return null;\n }", "public String getClassName() throws NoSuchFieldException, IllegalAccessException {\n assertTargetNotNull();\n var targetField = targetInstance.getClass().getDeclaredField(targetName);\n targetField.setAccessible(true);\n var ob = targetField.get(targetInstance);\n return ob.getClass().getCanonicalName();\n }", "@Test\n public void testClassName() {\n TestClass testClass = new TestClass();\n logger.info(testClass.getClass().getCanonicalName());\n logger.info(testClass.getClass().getName());\n logger.info(testClass.getClass().getSimpleName());\n }", "public String getName() {\n\t\treturn \"Object class name\";\n\t}", "public String getName() {\n\t\treturn className;\n\t}", "abstract String getClassName();", "@Override\n public String getName() {\n return this.getClass().getSimpleName();\n }", "String getMainClass();", "private String nameFor(Class<?> type) {\n String typeName = type.getName();\n if (typeName.startsWith(\"java.\") || (type.getPackage() != null && type.getPackage().isSealed())) {\n typeName = \"codegen.\" + typeName;\n }\n return String.format(\"%s$%s$%d\", typeName, \"MockitoMock\", Math.abs(random.nextInt()));\n }", "public String getClassName() {\n return super.getClassName();\n }", "public String getStartName() {// TODO remove\n\t\treturn this.getClass().getSimpleName();\n\t}", "com.google.protobuf.ByteString\n getClass_Bytes();", "com.google.protobuf.ByteString\n getClass_Bytes();", "@Override\n public com.google.protobuf.ByteString\n getClassNameBytes() {\n Object ref = className_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n className_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "protected String getCallingClassSignature() {\r\n \treturn Watcher.getCallingClassSignature(5) ;\r\n }", "private String getClassName(String fileName){\n String className = FilenameUtils.getBaseName(fileName);\n return className;\n }", "public String toString() {\n\t\treturn getClass().getName();\n\t}", "IArenaClass getClass(final String name);", "com.google.protobuf.ByteString\n getClassNameBytes();", "public String getClassName() { return className; }", "private String getClassName( Class c ) {\n\treturn c.getName().substring(c.getName().lastIndexOf('.')+1);\n }", "public String getClassCode() {\n\t\treturn classCode;\n\t}", "public String getClassname(Class<?> aClass) {\n\t\tString result = aClass.getCanonicalName();\n\t\tif (result.endsWith(\"[]\")) {\n\t\t\tresult = result.substring(0, result.length() - 2);\n\t\t}\n\t\treturn result;\n\t}", "java.lang.String getCodeName();", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "private String getType( )\n\t{\n\t\treturn this.getModuleName( ) + \"$\" + this.getSimpleName( ) + \"$\" + this.getSystem( );\n\t}", "protected String logInstanceName() {\n\t\treturn getClass().getName();\n\t}", "public String getClassName() {\n Object ref = className_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n className_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "String getObjectName();", "public String getName(){\n\t\treturn arr.getClass().getSimpleName();\n\t}", "public String getClazzName();", "public final String getDClassName() {\n return Descriptor.getDClassName(this.dclass);\n }", "public String getClassName(String path);", "public static String classObjectName(Class<?> type) {\n return (type.getName() + \":::OBJECT\");\n }", "com.google.protobuf.ByteString\n getClassNameBytes();", "public String getClassid() {\n return classid;\n }", "protected static String getSimpleName(Class<?> c) {\n String name = c.getName();\n return name.substring(name.lastIndexOf(\".\") + 1);\n }", "public String getBaseClassName() {\n return className;\n }", "default String getClassName() {\n return declaringType().getClassName();\n }", "@Override\n public String toString(){\n\n return this.getClass().getSimpleName();\n }", "public String getImplementationName();", "@Override\n String getClassRef() {\n return this.classNode.name;\n }", "public java.lang.String getClassCode()\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(CLASSCODE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(CLASSCODE$30);\n }\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getClassName()\n {\n return _className;\n }", "public static String getRunningJarName(\n\t\t\t@SuppressWarnings(\"rawtypes\") final Class clazz) {\n\t\tfinal String classURI = RuntimeLogbasenamePropertyDefiner\n\t\t\t\t.getClassURI(clazz);\n\n\t\tString jarName = null;\n\t\tif (RuntimeLogbasenamePropertyDefiner.isRunningAsJar(classURI)) {\n\t\t\tfinal String vals[] = classURI.split(\"/\");\n\t\t\tfor (final String val : vals) {\n\t\t\t\t// skip all path fragments until the one with the '!'\n\t\t\t\tif (val.contains(\"!\")) {\n\t\t\t\t\tjarName = val.substring(0, val.length() - 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn jarName;\n\t}", "public String getClassName () { return _className; }", "public String getClassName()\n {\n return className;\n }", "@DISPID(-2147417111)\n @PropGet\n java.lang.String className();" ]
[ "0.71945107", "0.69704044", "0.6933468", "0.68706185", "0.68378973", "0.68103385", "0.68103385", "0.6709548", "0.67008847", "0.6695651", "0.6640494", "0.65415525", "0.6526492", "0.6526492", "0.6526492", "0.6522108", "0.65139914", "0.651383", "0.65024686", "0.649234", "0.64901024", "0.64868325", "0.64633983", "0.6434214", "0.64325064", "0.6431454", "0.6431454", "0.6431454", "0.6428642", "0.64017886", "0.63820475", "0.63425916", "0.63088495", "0.63072574", "0.63019913", "0.62842363", "0.62819004", "0.6264976", "0.6252185", "0.62382144", "0.6227655", "0.6208364", "0.62068766", "0.61948866", "0.6192181", "0.61725676", "0.6168319", "0.6165066", "0.6158431", "0.6146519", "0.6134601", "0.6121637", "0.6113687", "0.6045366", "0.6043615", "0.6042308", "0.6036547", "0.6035912", "0.6013744", "0.59751636", "0.5965121", "0.5960744", "0.5956934", "0.59482604", "0.59482604", "0.59305817", "0.592099", "0.5916589", "0.59113467", "0.59104496", "0.5882424", "0.5871313", "0.5867475", "0.5866231", "0.58580416", "0.5847404", "0.5844081", "0.5840295", "0.5831219", "0.5829104", "0.58239937", "0.5820259", "0.5813356", "0.58055085", "0.5804072", "0.5785176", "0.5775186", "0.57734215", "0.57612866", "0.5756666", "0.57530224", "0.57512003", "0.5742919", "0.5740678", "0.57345915", "0.57186955", "0.5716741", "0.57104105", "0.5707822", "0.57050544" ]
0.6615319
11
Returns the byte code of the original class
public byte[] getOriginalClassBuffer() { byte[] byteCode = new byte[originalClassBuffer.capacity()]; originalClassBuffer.get(byteCode); return byteCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte getCode();", "com.google.protobuf.ByteString getByteCode();", "public String getClassCode() {\n\t\treturn classCode;\n\t}", "public byte[] getByteCode() {\n return byteCode;\n }", "public java.lang.String getClassCode()\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(CLASSCODE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(CLASSCODE$30);\n }\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String toBinaryCode() {\r\n\t\treturn \"CodeDefinition(\" + mActivityName + \".class\"+ \")\";\r\n\t}", "public ITravelClassType getClassCode();", "public byte[] code();", "com.google.protobuf.ByteString\n getClass_Bytes();", "com.google.protobuf.ByteString\n getClass_Bytes();", "com.google.protobuf.ByteString\n getCodeBytes();", "com.google.protobuf.ByteString\n getCodeBytes();", "public com.google.protobuf.ByteString getByteCode() {\n return byteCode_;\n }", "public com.google.protobuf.ByteString getByteCode() {\n return byteCode_;\n }", "@NonNull\n public byte[] getBytecode() {\n return mBytes;\n }", "public com.walgreens.rxit.ch.cda.EntityClass xgetClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.EntityClass target = null;\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_default_attribute_value(CLASSCODE$30);\n }\n return target;\n }\n }", "Code getCode();", "public java.lang.String getCode() {\n java.lang.Object ref = code_;\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 code_ = s;\n return s;\n }\n }", "@Override\n public byte[] getClassBytes(String name) {\n return null;\n }", "public byte[] getInstrumentedClassBuffer() {\n\t\tbyte[] byteCode = new byte[instrumentedClassBuffer.capacity()];\n\t\tinstrumentedClassBuffer.get(byteCode);\n\t\treturn byteCode;\n\t}", "public com.google.protobuf.ByteString\n getCodeBytes() {\n java.lang.Object ref = code_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n code_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getCode();", "java.lang.String getCode();", "public long getCode () {\r\n\t\treturn code;\r\n\t}", "Integer getCode();", "public long getCode() {\n return code;\n }", "public int getCode();", "public String toCode() {\r\n\t\treturn \"CodeDefinition(\" + mActivityName + \".class\"+ \")\";\r\n\t}", "public com.google.protobuf.ByteString\n getCodeBytes() {\n java.lang.Object ref = code_;\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 code_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getCode() {\n java.lang.Object ref = code_;\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 code_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private byte[] loadByteCode(String className) {\n Class<?> clazz = loadClass(className);\n\n if (clazz != null) {\n return collector.getByteCode(clazz);\n }\n\n return null;\n }", "int getCode();", "int getCode();", "int getCode();", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCodigoBytes() {\n java.lang.Object ref = codigo_;\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 codigo_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getEncodableClassId() {\n return -1;\n }", "@Override\r\n\tpublic String java_code() {\n\t\treturn null;\r\n\t}", "public String getCode() {\n return _toBaseUnit._code;\n }", "java.lang.String getClass_();", "java.lang.String getClass_();", "public String getBinaryClassName() {\n\t\tString bcn = classQName.dotSeparated();\n\t\t// Inner classes not supported yet\n\t\tassert(!bcn.contains(\"$\"));\n\t\treturn bcn;\n\t}", "public int generateHashCode() {\n int code = getClass().hashCode();\n boolean temp_fromSource = isFromSource();\n code ^= temp_fromSource ? 1231 : 1237;\n IRId temp_name = getName();\n code ^= temp_name.hashCode();\n List<IRId> temp_params = getParams();\n code ^= temp_params.hashCode();\n List<IRStmt> temp_args = getArgs();\n code ^= temp_args.hashCode();\n List<IRFunDecl> temp_fds = getFds();\n code ^= temp_fds.hashCode();\n List<IRVarStmt> temp_vds = getVds();\n code ^= temp_vds.hashCode();\n List<IRStmt> temp_body = getBody();\n code ^= temp_body.hashCode();\n return code;\n }", "@java.lang.Override\n public java.lang.String getCodigo() {\n java.lang.Object ref = codigo_;\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 codigo_ = s;\n return s;\n }\n }", "public java.lang.Class classForCoder(){\n return null; //TODO codavaj!!\n }", "public com.google.protobuf.ByteString\n getCodigoBytes() {\n java.lang.Object ref = codigo_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n codigo_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCode();", "public String getCode();", "public int code() {\n return code;\n }", "public byte[] getBytes()\n {\n if (isModified())\n {\n // collect all constants\n ConstantPool pool = m_pool;\n boolean fOptimize = !pool.isOrderImportant();\n if (fOptimize)\n {\n if (pool != null)\n {\n // detach the previous pool from the ClassFile\n pool.setClassFile(null);\n }\n pool = new ConstantPool(this);\n }\n preassemble(pool);\n if (fOptimize)\n {\n pool.sort();\n }\n m_pool = pool;\n\n // assemble the class into bytes\n ByteArrayOutputStream streamRaw = new ByteArrayOutputStream(8192);\n DataOutputStream stream = new DataOutputStream(streamRaw);\n try\n {\n assemble(stream, pool);\n }\n catch (IOException e)\n {\n throw ensureRuntimeException(e);\n }\n m_abClazz = streamRaw.toByteArray();\n\n resetModified();\n }\n\n return m_abClazz;\n }", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "byte mo30283c();", "public String getBinaryClassName() {\n\t\treturn binaryClassName;\n\t}", "public int getCode () {\n return code;\n }", "public java.lang.String getCodigo() {\n java.lang.Object ref = codigo_;\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 codigo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "Object getClass_();", "Object getClass_();", "public int generateHashCode() {\n int code = getClass().hashCode();\n ASTSpanInfo temp_info = getInfo();\n code ^= temp_info.hashCode();\n LHS temp_obj = getObj();\n code ^= temp_obj.hashCode();\n Expr temp_index = getIndex();\n code ^= temp_index.hashCode();\n return code;\n }", "public String code() {\n return this.code;\n }", "public String code() {\n return this.code;\n }", "public abstract String getFullCode();", "public int getCode()\n {\n return code;\n }", "public int getCode() {\n return code_;\n }", "public int getCode() {\n return code_;\n }", "public int getCode() {\r\n return code;\r\n }", "public int getCode() {\r\n return code;\r\n }", "public String getCode() {\t\t\t\t\t\t\t\t\treturn code;\t\t\t\t\t\t\t}", "public int getMessageClass() {\n // Who in the holy hell thought this was a good idea for a protocol? The\n // `class` is a 2 bit value constructed from the lowest bit of the highest\n // order byte and the 5th lowest bit of the 2nd highester order byte.\n return (((int)data[0] & 0x01) << 1) | ((int)data[1] & 0x10) >> 4;\n }", "public short getCode() {\n/* 92 */ return this.code;\n/* */ }", "public int getCode() {\n return code;\n }", "public int getCode() {\n return code;\n }", "public int getCode() {\n return code;\n }", "public int getCode() {\n return code;\n }", "public int getCode() {\n return code;\n }", "public Long getCode() {\n return code;\n }", "public Long getCode() {\n return code;\n }", "public String code() {\n\t\treturn (\"ID\"+this.hashCode()).replace(\"-\", \"M\");\n\t}", "public int getMessageClass() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.telephony.SmsCbCmasInfo.getMessageClass():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.getMessageClass():int\");\n }", "public String getCode() { \n\t\treturn getCodeElement().getValue();\n\t}", "public java.lang.String getJavaClass()\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(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public short code() {\n return this.code;\n }", "public int getCode() {\n return code_;\n }", "public int getCode() {\n return code_;\n }", "public int getCode() {\n\t\treturn adaptee.getCode();\n\t}", "@Override\r\n\tpublic String getCode() {\n\t\treturn code;\r\n\t}", "public int getCode() {\r\n\t\t\treturn code;\r\n\t\t}", "public Byte getSource() {\r\n return source;\r\n }", "@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }", "@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }", "@java.lang.Override\n public long getCodeId() {\n return codeId_;\n }", "@Override\n public byte[] generateCode(byte[] data) {\n\treturn new byte[0];\n }", "@Nullable\n private HashCode hashClassBytes(byte[] classBytes) {\n ClassReader reader = new ClassReader(classBytes);\n return extractor.extractApiClassFrom(reader)\n .map(Hashing::hashBytes)\n .orElse(null);\n }", "public String getPKCClass();", "public java.lang.String getSwiftCode()\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(SWIFTCODE$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getCode () {\r\n\t\treturn code;\r\n\t}", "public String getCode()\r\n\t{\r\n\t\treturn code;\r\n\t}", "public int getCode() {\n\t\treturn code;\n\t}" ]
[ "0.7230562", "0.6946047", "0.69131535", "0.67431605", "0.664446", "0.6599575", "0.6588601", "0.6569918", "0.6468344", "0.6468344", "0.6458563", "0.64349407", "0.6421065", "0.6381965", "0.624759", "0.61296016", "0.60744554", "0.6052503", "0.6045192", "0.6017505", "0.60101765", "0.600332", "0.600332", "0.6000888", "0.59707904", "0.5960629", "0.59436524", "0.59236354", "0.59092236", "0.5905973", "0.58673793", "0.5835124", "0.5835124", "0.5835124", "0.5833805", "0.5832639", "0.5828758", "0.5813708", "0.58071935", "0.58071935", "0.5795996", "0.577026", "0.57645094", "0.57533324", "0.5742992", "0.571936", "0.571936", "0.56904966", "0.5684572", "0.5676767", "0.5676767", "0.5676767", "0.5676767", "0.5676767", "0.5666437", "0.56607294", "0.5656882", "0.5637468", "0.5624897", "0.5624897", "0.56205267", "0.56133187", "0.56133187", "0.5610427", "0.5606446", "0.5603138", "0.5603138", "0.55995333", "0.55995333", "0.5594894", "0.5589701", "0.55846083", "0.55796", "0.55796", "0.55796", "0.55796", "0.55796", "0.5578171", "0.5578171", "0.557039", "0.55675316", "0.55651665", "0.5561025", "0.55546796", "0.55492663", "0.55492663", "0.55415124", "0.55363643", "0.55036175", "0.5502825", "0.55000114", "0.55000114", "0.55000114", "0.54996973", "0.5486321", "0.54850394", "0.5482348", "0.54792213", "0.5477946", "0.5476233" ]
0.71038383
1
Returns the byte code of the instrumented class
public byte[] getInstrumentedClassBuffer() { byte[] byteCode = new byte[instrumentedClassBuffer.capacity()]; instrumentedClassBuffer.get(byteCode); return byteCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte getCode();", "public String getClassCode() {\n\t\treturn classCode;\n\t}", "com.google.protobuf.ByteString getByteCode();", "public byte[] code();", "@NonNull\n public byte[] getBytecode() {\n return mBytes;\n }", "public byte[] getByteCode() {\n return byteCode;\n }", "public java.lang.String getClassCode()\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(CLASSCODE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(CLASSCODE$30);\n }\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "com.google.protobuf.ByteString\n getCodeBytes();", "com.google.protobuf.ByteString\n getCodeBytes();", "public String getCode() {\n return _toBaseUnit._code;\n }", "public ITravelClassType getClassCode();", "java.lang.String getCode();", "java.lang.String getCode();", "public com.google.protobuf.ByteString getByteCode() {\n return byteCode_;\n }", "public String toBinaryCode() {\r\n\t\treturn \"CodeDefinition(\" + mActivityName + \".class\"+ \")\";\r\n\t}", "public com.google.protobuf.ByteString getByteCode() {\n return byteCode_;\n }", "Code getCode();", "public long getCode () {\r\n\t\treturn code;\r\n\t}", "public com.google.protobuf.ByteString\n getCodeBytes() {\n java.lang.Object ref = code_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n code_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long getCode() {\n return code;\n }", "int getCode();", "int getCode();", "int getCode();", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "com.google.protobuf.ByteString\n getClass_Bytes();", "com.google.protobuf.ByteString\n getClass_Bytes();", "public abstract byte[] instrumentMethod();", "public java.lang.String getCode() {\n java.lang.Object ref = code_;\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 code_ = s;\n return s;\n }\n }", "public com.google.protobuf.ByteString\n getCodeBytes() {\n java.lang.Object ref = code_;\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 code_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "Integer getCode();", "public int getCode();", "public abstract String getInstrumentationClass();", "public java.lang.String getCode() {\n java.lang.Object ref = code_;\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 code_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getCode() { \n\t\treturn getCodeElement().getValue();\n\t}", "public String getCode();", "public String getCode();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }", "public String getCode() {\t\t\t\t\t\t\t\t\treturn code;\t\t\t\t\t\t\t}", "public String getCode() {\n return (String)getAttributeInternal(CODE);\n }", "public com.walgreens.rxit.ch.cda.EntityClass xgetClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.EntityClass target = null;\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_default_attribute_value(CLASSCODE$30);\n }\n return target;\n }\n }", "public int getMessageClass() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.telephony.SmsCbCmasInfo.getMessageClass():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.getMessageClass():int\");\n }", "public int code() {\n return code;\n }", "private byte[] loadByteCode(String className) {\n Class<?> clazz = loadClass(className);\n\n if (clazz != null) {\n return collector.getByteCode(clazz);\n }\n\n return null;\n }", "public java.lang.String getCode() {\r\n return code;\r\n }", "public String getCode(){\n\t\treturn new SmartAPIModel().getCpSourceCode(cp.getLocalName());\n\t}", "int getCodeValue();", "@Override\n public byte[] getClassBytes(String name) {\n return null;\n }", "public byte getType() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00f0 in method: android.location.GpsClock.getType():byte, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.getType():byte\");\n }", "public int getCode () {\n return code;\n }", "com.google.protobuf.ByteString getWasmByteCode();", "public short getCode() {\n/* 92 */ return this.code;\n/* */ }", "public byte[] getOriginalClassBuffer() {\n\t\tbyte[] byteCode = new byte[originalClassBuffer.capacity()];\n\t\toriginalClassBuffer.get(byteCode);\n\t\treturn byteCode;\n\t}", "public String getCode () {\r\n\t\treturn code;\r\n\t}", "public String getCompilerClassName();", "java.lang.String getClass_();", "java.lang.String getClass_();", "public String code() {\n return this.code;\n }", "public String code() {\n return this.code;\n }", "public String toCode() {\r\n\t\treturn \"CodeDefinition(\" + mActivityName + \".class\"+ \")\";\r\n\t}", "public int getCode()\n {\n return code;\n }", "public String getCode(){\n\t\treturn code;\n\t}", "public short code() {\n return this.code;\n }", "public int getCode() {\r\n return code;\r\n }", "public int getCode() {\r\n return code;\r\n }", "public String getCode()\r\n\t{\r\n\t\treturn code;\r\n\t}", "@Override\r\n\tpublic String getCode() {\n\t\treturn code;\r\n\t}", "public int value() {\n return code;\n }", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public interface Instrumentor {\n\n InstrumentionClass getInstrucmentClass(ClassLoader loader, String className, byte[] classfileBuffer);\n\n}", "public int getCode() {\n return code;\n }", "public int getCode() {\n return code;\n }", "public int getCode() {\n return code;\n }", "public int getCode() {\n return code;\n }", "public int getCode() {\n return code;\n }", "public java.lang.String getSwiftCode()\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(SWIFTCODE$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getCode()\n {\n return code;\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n\t\treturn code;\r\n\t}", "public String getCode() {\r\n\t\treturn code;\r\n\t}", "public String getFullInstrumentationClass() {\n if (getInstrumentationClass().startsWith(\".\")) {\n return getAndroidPackage() + getInstrumentationClass();\n }\n return getInstrumentationClass();\n }", "public Long getCode() {\n return code;\n }", "public Long getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }" ]
[ "0.743898", "0.708158", "0.7034043", "0.68495774", "0.68430024", "0.6771331", "0.6741911", "0.67243665", "0.6666667", "0.65910095", "0.6514984", "0.6504731", "0.6504731", "0.63931936", "0.63847786", "0.63786036", "0.63581765", "0.62825215", "0.62521005", "0.62261856", "0.62208563", "0.62208563", "0.62208563", "0.6220826", "0.6220826", "0.6220826", "0.6220826", "0.6220826", "0.62085956", "0.62085956", "0.62012565", "0.6193326", "0.61910564", "0.61841154", "0.6115706", "0.61070466", "0.607847", "0.6004321", "0.5984179", "0.5984179", "0.597326", "0.5971316", "0.5921656", "0.5911891", "0.59007263", "0.59006155", "0.5889203", "0.58782077", "0.58712083", "0.58593965", "0.5845514", "0.5843301", "0.58161414", "0.5815398", "0.58073926", "0.5796902", "0.57944626", "0.57940394", "0.5793325", "0.5792208", "0.5792208", "0.57817304", "0.57817304", "0.5775437", "0.5774324", "0.57726353", "0.5761583", "0.57582724", "0.57582724", "0.5750773", "0.57476854", "0.57410586", "0.573842", "0.573842", "0.573842", "0.573842", "0.573842", "0.573842", "0.57364315", "0.57305366", "0.57305366", "0.57305366", "0.57305366", "0.57305366", "0.57233274", "0.571143", "0.57079285", "0.57079285", "0.57079285", "0.57079285", "0.57079285", "0.57079285", "0.57079285", "0.5699376", "0.5699376", "0.5696813", "0.5695501", "0.5695501", "0.5692001", "0.5692001" ]
0.71337426
1
Returns the classloader of the instrumented class
public ClassLoader getClassLoader() { return classLoader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Loader getClassLoader() {\n\treturn this.classLoader;\n }", "public ClassLoader getClassLoader () { return _classLoader; }", "public IClassLoader getClassLoader();", "private ClassLoader getClassLoader() {\r\n return this.getClass().getClassLoader();\r\n }", "public ClassLoader getClassLoader() {\r\n return _classLoader;\r\n }", "public ClassLoader getClassLoader ()\n {\n return Thread.currentThread ().getContextClassLoader ();\n }", "protected ClassLoader getClassLoader()\n {\n return m_classLoader;\n }", "public ClassLoader getClassLoader() {\n\t\treturn ClassLoader.getSystemClassLoader();\n\t}", "public ClassLoader getClassLoader() {\n return classLoader;\n }", "private static ClassLoader getClassLoader() {\n return LoggerProviders.class.getClassLoader();\n }", "public ClassLoader getClassLoader() {\n return null;\n }", "public ScriptingClassLoader getClassLoader()\n {\n return vm.getClassLoader();\n }", "public static ClassLoader getCurrentClassLoader() {\n ClassLoader classLoader = Thread.currentThread()\n .getContextClassLoader();\n if (classLoader == null) {\n classLoader = ConsumerTest.class.getClassLoader();\n }\n return classLoader;\n }", "public ClassLoader getClassLoader() {\n return new BundleClassLoader(bundle);\n }", "public ClassLoader getBootClassLoader ()\n {\n return bootLoader;\n }", "public synchronized ClassLoader getClassLoader() {\n return new BrainClassLoader(buildClassLoader(projectCP), \n buildClassLoader(buildCP), \n buildClassLoader(projectFilesCP), \n buildClassLoader(externalFilesCP), \n buildClassLoader(extraCP));\n }", "public String getSharedLoader(IPath baseDir);", "@Override\n public ClassLoader getClassLoader() {\n return null;\n }", "public static ClassLoader getClassLoader() {\n ClassLoader loader = Ruby.class.getClassLoader();\n if (loader == null) {\n loader = ClassLoader.getSystemClassLoader();\n }\n \n return loader;\n }", "public static ClassLoader getClassLoader() {\n ClassLoader loader = Ruby.class.getClassLoader();\n if (loader == null) {\n loader = ClassLoader.getSystemClassLoader();\n }\n \n return loader;\n }", "protected ClassLoader getClassLoader() throws PortletException {\n return getClass().getClassLoader();\n }", "static ClassLoader contextClassLoader() {\n return Thread.currentThread().getContextClassLoader();\n }", "public URI getClassLoaderId() {\n return classLoaderId;\n }", "public interface Instrumentor {\n\n InstrumentionClass getInstrucmentClass(ClassLoader loader, String className, byte[] classfileBuffer);\n\n}", "ClassLoader getClassLoader() throws GeDARuntimeException;", "public ClassPath getClassPath();", "public String getRuntimeClass();", "ClassLoaderLogInfo getClassLoaderLogInfo();", "public abstract String getInstrumentationClass();", "public static ClassLoader getDefaultClassLoader() {\n ClassLoader cl = null;\n try {\n cl = Thread.currentThread().getContextClassLoader();\n } finally {\n if (cl == null) {\n cl = ClassUtils.class.getClassLoader();\n }\n if (cl == null) {\n cl = ClassLoader.getSystemClassLoader();\n }\n }\n return cl;\n }", "private ClassLoader getCompileClassLoader() throws MojoExecutionException {\n\t\ttry {\n\t\t\tList<String> runtimeClasspathElements = project.getRuntimeClasspathElements();\n\t\t\tList<String> compileClasspathElements = project.getCompileClasspathElements();\n\t\t\tArrayList<URL> classpathURLs = new ArrayList<>();\n\t\t\tfor (String element : runtimeClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tfor (String element : compileClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tURL[] urlArray = classpathURLs.toArray(new URL[classpathURLs.size()]);\n\t\t\treturn new URLClassLoader(urlArray, Thread.currentThread().getContextClassLoader());\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new MojoExecutionException(\"Unable to load project runtime !\", e);\n\t\t}\n\t}", "ClassLoader getWebComponentClassLoader(URI componentId);", "String resolveClassPath(String classPath);", "public ContainerLoader getLoader();", "@Override\n public Class getJavaClass() throws IOException, ClassNotFoundException {\n open();\n URL url;\n int p = path.lastIndexOf('/');\n int p2 = path.substring(0,p-1).lastIndexOf('/');\n\n File f = new File(path.substring(0,p2));\n url = f.toURI().toURL();\n URL[] urls = new URL[1];\n urls[0] = url;\n ClassLoader loader = new URLClassLoader(urls);\n\n String cls = path.substring(p2 + 1, path.lastIndexOf('.')).replace('/', '.');\n\n if (cfile.getParentFile().getParentFile().getName().equals(\"production\")) {\n cls = cls.substring(cls.lastIndexOf('.') + 1);\n }\n\n\n\n return loader.loadClass(cls);\n }", "private URLClassLoader getURLClassLoader(URL jarURL) {\n \t\tClassLoader baseClassLoader = AGLoader.class.getClassLoader();\n \t\tif (baseClassLoader == null)\n \t\t\tbaseClassLoader = ClassLoader.getSystemClassLoader();\n \t\treturn new URLClassLoader(new URL[] { jarURL }, baseClassLoader);\n \t}", "public Class<?> getClazz(ClassLoader loader);", "public synchronized PluginClassLoader getPluginClassloader( Plugin plugin )\n {\n return classloaders.get( plugin );\n }", "public ClassLoader getCoreLoader() {\n return coreLoader;\n }", "public ClassLoader getClassLoaderFor(ObjectName mbeanName)\n throws InstanceNotFoundException{\n return mbsInterceptor.getClassLoaderFor(cloneObjectName(mbeanName));\n }", "public String getSystemClassPath();", "public String getClassPath();", "void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public String getFullInstrumentationClass() {\n if (getInstrumentationClass().startsWith(\".\")) {\n return getAndroidPackage() + getInstrumentationClass();\n }\n return getInstrumentationClass();\n }", "public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/manageable/modelAdapter/ReporterMBean\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }", "public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/net/Security\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }", "public ClassManager getClassManager()\n {\n return this.classManager;\n }", "public Loader getLoader() {\n\t\treturn loader;\n\t}", "private Class loadClass(ClassInfo classInfo) {\n Class type = null;\n try {\n URLClassLoader classLoader = new URLClassLoader(new URL[]{\n new File(classInfo.getPath()).toURI().toURL()\n });\n type = classLoader.loadClass(classInfo.getName());\n } catch (MalformedURLException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Class url stimmt nicht. Ggf. hat der ClassIndexer einen falschen Pfad!\", ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Klasse konnte nicht gefunden werden!\", ex);\n }\n return type;\n }", "public String getClassPath() {\n return classPath;\n }", "public static List<ClassLoader> findAllClassLoaders(final LogNode log) {\n // Need both a set and a list so we can keep them unique, but in an order that (hopefully) reflects\n // the order in which the JDK calls classloaders.\n //\n // See:\n // https://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n //\n final AdditionOrderedSet<ClassLoader> classLoadersSet = new AdditionOrderedSet<>();\n\n // Look for classloaders on the call stack\n // Find the first caller in the call stack to call a method in the FastClasspathScanner package\n ClassLoader callerLoader = null;\n if (CALLER_RESOLVER == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \" could not create \"\n + CallerResolver.class.getSimpleName() + \", current SecurityManager does not grant \"\n + \"RuntimePermission(\\\"createSecurityManager\\\")\");\n }\n } else {\n final Class<?>[] callStack = CALLER_RESOLVER.getClassContext();\n if (callStack == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \": \" + CallerResolver.class.getSimpleName()\n + \"#getClassContext() returned null\");\n }\n } else {\n final String fcsPkgPrefix = FastClasspathScanner.class.getPackage().getName() + \".\";\n int fcsIdx;\n for (fcsIdx = callStack.length - 1; fcsIdx >= 0; --fcsIdx) {\n if (callStack[fcsIdx].getName().startsWith(fcsPkgPrefix)) {\n break;\n }\n }\n if (fcsIdx < 0 || fcsIdx == callStack.length - 1) {\n // Should not happen\n throw new RuntimeException(\"Could not find caller of \" + fcsPkgPrefix + \"* in call stack\");\n }\n\n // Get the caller's current classloader\n callerLoader = callStack[fcsIdx + 1].getClassLoader();\n }\n }\n boolean useCallerLoader = callerLoader != null;\n\n // Get the context classloader\n final ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();\n boolean useContextLoader = contextLoader != null;\n\n // Get the system classloader\n final ClassLoader systemLoader = ClassLoader.getSystemClassLoader();\n boolean useSystemLoader = systemLoader != null;\n\n // Establish descendancy relationships, and ignore any classloader that is an ancestor of another.\n if (useCallerLoader && useContextLoader && isDescendantOf(callerLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useCallerLoader && isDescendantOf(contextLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useSystemLoader && useContextLoader && isDescendantOf(systemLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useSystemLoader && isDescendantOf(contextLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (useSystemLoader && useCallerLoader && isDescendantOf(systemLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useCallerLoader && useSystemLoader && isDescendantOf(callerLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (!useCallerLoader && !useContextLoader && !useSystemLoader) {\n // Should not happen\n throw new RuntimeException(\"Could not find a usable ClassLoader\");\n }\n // There will generally only be one class left after this. In rare cases, you may have a separate\n // callerLoader and contextLoader, but those cases are ill-defined -- see:\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n // We specifically add the classloaders in the following order however, so that in the case that there\n // are two of them left, they are resolved in this order. The relative ordering of callerLoader and\n // contextLoader is due to the recommendation at the above URL.\n if (useSystemLoader) {\n classLoadersSet.add(systemLoader);\n }\n if (useCallerLoader) {\n classLoadersSet.add(callerLoader);\n }\n if (useContextLoader) {\n classLoadersSet.add(contextLoader);\n }\n\n final List<ClassLoader> classLoaders = classLoadersSet.getList();\n if (log != null) {\n for (final ClassLoader classLoader : classLoaders) {\n log.log(\"Found ClassLoader \" + classLoader.toString());\n }\n log.addElapsedTime();\n }\n return classLoaders;\n }", "public Class<?> loadApplicationClass(String name) {\n \n for (GraphClassLoader graphClassLoader : this.classLoaders) {\n Class<?> loadClass = graphClassLoader.loadApplicationClass(name, \n false //don't try delegate\n );\n \n if (logger.isDebugEnabled()) {\n logger.debug(\"Attempting to load class \" + name + \" from classloader \" + graphClassLoader + \" on behalf of delegate \" + this);\n }\n \n if (loadClass != null) {\n return loadClass;\n }\n }\n \n return null;\n }", "private String discoverDriverClassName(URLClassLoader urlClassLoader) throws IOException {\n String className = null;\n URL resource = urlClassLoader.findResource(\"META-INF/services/java.sql.Driver\");\n if (resource != null) {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new InputStreamReader(resource.openStream()));\n className = br.readLine();\n } finally {\n if (br != null) {\n br.close();\n }\n }\n }\n return className;\n }", "SpringLoader getSpringLoader();", "public synchronized JRubyClassLoader getJRubyClassLoader() {\n if (!Ruby.isSecurityRestricted() && jrubyClassLoader == null) {\n jrubyClassLoader = new JRubyClassLoader(config.getLoader());\n }\n \n return jrubyClassLoader;\n }", "public synchronized JRubyClassLoader getJRubyClassLoader() {\n if (!Ruby.isSecurityRestricted() && jrubyClassLoader == null) {\n jrubyClassLoader = new JRubyClassLoader(config.getLoader());\n }\n \n return jrubyClassLoader;\n }", "public URL[] getRuntimeClassPath()\n {\n return runtimeClassPath;\n }", "private Path getClasspath() {\n return getRef().classpath;\n }", "ClassLoader getNewTempClassLoader() {\n return new ClassLoader(getClassLoader()) {\n };\n }", "public static PathAnchor classpath() {\n return classpath(Config.class.getClassLoader());\n }", "static private URLClassLoader separateClassLoader(URL[] classpath) throws Exception {\n\t\treturn new URLClassLoader(classpath, ClassLoader.getSystemClassLoader().getParent());\r\n\t}", "public String getClassName(String path);", "public static void checkClassloaders() {\n\t\tSystem.out.println(ClassLoaderDemo.class.getClassLoader()); //sun.misc.Launcher$AppClassLoader@36422510\n\t\tSystem.out.println(ClassLoaderDemo.class.getClassLoader().getParent()); //sun.misc.Launcher$ExtClassLoader@308f5944\n\t\tSystem.out.println(ClassLoaderDemo.class.getClassLoader().getParent().getParent()); //null\n\t}", "public String getCustomLoaderName();", "public static String getLocationOnDisk(Class<?> aClass) {\n ProtectionDomain protectionDomain = aClass.getProtectionDomain();\n if (protectionDomain == null) {\n //Android\n return null;\n }\n CodeSource codeSource = protectionDomain.getCodeSource();\n if (codeSource == null) {\n //Custom classloader with for example classes defined using URLClassLoader#defineClass(String name, byte[] b, int off, int len)\n return null;\n }\n return UrlUtils.decodeURL(codeSource.getLocation().getPath());\n }", "public java.lang.String getClassPath() {\n return this.classPath;\n }", "private Class<?> loadClass(final ClassLoader lastLoader, final String className) {\n Class<?> clazz;\n if (lastLoader != null) {\n try {\n clazz = lastLoader.loadClass(className);\n if (clazz != null) {\n return clazz;\n }\n } catch (final Exception ex) {\n // Ignore exception.\n }\n }\n try {\n clazz = Thread.currentThread().getContextClassLoader().loadClass(className);\n } catch (final ClassNotFoundException e) {\n try {\n clazz = Class.forName(className);\n } catch (final ClassNotFoundException e1) {\n try {\n clazz = getClass().getClassLoader().loadClass(className);\n } catch (final ClassNotFoundException e2) {\n return null;\n }\n }\n }\n return clazz;\n }", "private List<ExtensionClassLoader> getClassLoaders() {\n final List<ExtensionClassLoader> classLoaders = new ArrayList<>();\n\n // start with the class loader that loaded ExtensionManager, should be WebAppClassLoader for API WAR\n final ExtensionClassLoader frameworkClassLoader = new ExtensionClassLoader(\"web-api\", new URL[0], this.getClass().getClassLoader());\n classLoaders.add(frameworkClassLoader);\n\n // we want to use the system class loader as the parent of the extension class loaders\n ClassLoader systemClassLoader = FlowPersistenceProvider.class.getClassLoader();\n\n // add a class loader for each extension dir\n final Set<String> extensionDirs = properties.getExtensionsDirs();\n for (final String dir : extensionDirs) {\n if (!StringUtils.isBlank(dir)) {\n final ExtensionClassLoader classLoader = createClassLoader(dir, systemClassLoader);\n if (classLoader != null) {\n classLoaders.add(classLoader);\n }\n }\n }\n\n return classLoaders;\n }", "public static ImageLoader getImageLoader() {\n return ImageLoader.IMAGE;\n }", "private ClassLoader makeClassLoader() throws MojoExecutionException {\n final List<URL> urls = new ArrayList<URL>();\n try {\n for (String cp: project.getRuntimeClasspathElements()) {\n urls.add(new File(cp).toURI().toURL());\n }\n } catch (DependencyResolutionRequiredException e) {\n throw new MojoExecutionException(\"dependencies not resolved\", e);\n } catch (MalformedURLException e) {\n throw new MojoExecutionException(\"invalid classpath element\", e);\n }\n return new URLClassLoader(urls.toArray(new URL[urls.size()]),\n getClass().getClassLoader());\n }", "private static Class<?> loadClass(String archiveImplClassName) throws Exception \n {\n return SecurityActions.getThreadContextClassLoader().loadClass(archiveImplClassName);\n }", "public String getClasspath()\n\t{\n\t\treturn classpath;\n\t}", "public static XML.ObjectLoader getLoader() {\n return new Loader();\n }", "Class<?> getImplementationClass();", "public File getProgramTbLoadersDir() {\n return pathsProvider.getProgramTbLoadersDir();\n }", "public BCClass getFieldDeclarerBC() {\n String type = getFieldDeclarerName();\n if (type == null)\n return null;\n return getProject().loadClass(type, getClassLoader());\n }", "public String getClasspath() {\n return classpath;\n }", "public Class<?> getTestClass()\r\n {\r\n return target.getClass();\r\n }", "public Class getInstanceClass()\n {\n return _cl;\n }", "public BCClass getReturnBC() {\n return getProject().loadClass(getReturnName(), getClassLoader());\n }", "public static Class<?> loadClass(String className) throws ClassNotFoundException {\n // Use the thread context class loader. This is necessary because in some configurations, e.g.\n // when run from a single JAR containing caliper and all its dependencies the caliper JAR\n // ends up on the boot class path of the Worker and so needs to the use thread context class\n // loader to load classes provided by the user.\n return Class.forName(className, true, Thread.currentThread().getContextClassLoader());\n }", "ClassLoaderConfigType createClassLoaderConfigType();", "@Override\n public ElementMatcher<ClassLoader> classLoaderMatcher() {\n return HibernateMatchers.CLASS_LOADER_MATCHER;\n }", "public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/net/Security$ConfigAction\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }", "protected ClassLoader getRestrictedClassloader(Profile profile) throws MalformedURLException\n {\n StringContainsClassRestrictor recipeLoader = null;\n URL libUrl = servletContext.getResource(\"/WEB-INF/\" + RECIPE_LIBRARY_PATH + \"/\" + profile.getRecipeLibraryFile());\n recipeLoader = new StringContainsClassRestrictor(new URL[] { libUrl }, servletContext.getClassLoader(), RESTRICTED_PACKAGES);\n return recipeLoader;\n }", "private ClassLoader createBootClassLoader(ClassLoader hostClassLoader) throws MojoExecutionException {\n \n Set<URL> bootClassPath = artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-test-runtime\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\");\n return new URLClassLoader(bootClassPath.toArray(new URL[] {}), hostClassLoader);\n \n }", "public static Class<?> classForName(String className) throws ClassNotFoundException {\r\n Class<?> loaded = null;\r\n try {\r\n loaded = Thread.currentThread().getContextClassLoader().loadClass(className);\r\n } catch (ClassNotFoundException ex) {\r\n // retry using standard classloader\r\n loaded = DiagnoseUtil.class.getClassLoader().loadClass(className);\r\n }\r\n return loaded;\r\n }", "EnvironmentLoader getEnvironmentLoader();", "public ContainerUnloader getUnloader();", "protected Class getOnlineService () throws ClassNotFoundException {\n String className = config.getString(\"CLIENT_IMPL\");\n Class serviceClass = Class.forName(className);\n return serviceClass;\n }", "public void classLoader(){\n \t\n URL xmlpath = this.getClass().getClassLoader().getResource(\"\");\n System.out.println(xmlpath.getPath());\n }", "@SuppressWarnings(\"unchecked\")\n private <T extends Annotation> Class<T> getLoadedClassFor(final Class<T> clazz) {\n try {\n return (Class<T>) classLoader.loadClass(clazz.getName());\n } catch (final ClassNotFoundException ex) {\n throw new IllegalStateException(\"Could not find class \" + clazz, ex);\n }\n }", "public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/net/Security$RefAction\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }", "private ClassLoader createHostClassLoader() throws MojoExecutionException {\n \n Set<URL> hostClasspath = artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-api\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\");\n hostClasspath.addAll(artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-host-api\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\"));\n hostClasspath.addAll(artifactHelper.resolve(\"javax.servlet\", \"servlet-api\", \"2.4\", Artifact.SCOPE_RUNTIME, \"jar\"));\n \n return new URLClassLoader(hostClasspath.toArray(new URL[] {}), getClass().getClassLoader());\n \n }", "private byte[] getClassBytes(String slashedName) {\n URL url = Thread.currentThread().getContextClassLoader().getResource(\n slashedName + \".class\");\n if (url == null) {\n logger.log(TreeLogger.DEBUG, \"Unable to find \" + slashedName\n + \" on the classPath\");\n return null;\n }\n String urlStr = url.toExternalForm();\n if (slashedName.equals(mainClass)) {\n // initialize the mainUrlBase for later use.\n mainUrlBase = urlStr.substring(0, urlStr.lastIndexOf('/'));\n } else {\n assert mainUrlBase != null;\n if (!mainUrlBase.equals(urlStr.substring(0, urlStr.lastIndexOf('/')))) {\n logger.log(TreeLogger.DEBUG, \"Found \" + slashedName + \" at \" + urlStr\n + \" The base location is different from that of \" + mainUrlBase\n + \" Not loading\");\n return null;\n }\n }\n \n // url != null, we found it on the class path.\n try {\n URLConnection conn = url.openConnection();\n return Util.readURLConnectionAsBytes(conn);\n } catch (IOException ignored) {\n logger.log(TreeLogger.DEBUG, \"Unable to load \" + urlStr\n + \", in trying to load \" + slashedName);\n // Fall through.\n }\n return null;\n }", "public List<String> getManualClassPath() {\n return classPath;\n }", "public String getWrapperManagerClassName();", "public synchronized Class<?> loadJPPFClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"looking up resource [\" + name + \"]\");\n\t\t\tClass<?> c = findLoadedClass(name);\n\t\t\tif (c != null)\n\t\t\t{\n\t\t\t\tClassLoader cl = c.getClassLoader();\n\t\t\t\tif (debugEnabled) log.debug(\"classloader = \" + cl);\n\t\t\t}\n\t\t\t/*\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tClassLoader parent = getParent();\n\t\t\t\tif (parent instanceof AbstractJPPFClassLoader) c = ((AbstractJPPFClassLoader) parent).findLoadedClass(name);\n\t\t\t}\n\t\t\t*/\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not already loaded\");\n\t\t\t\tc = findClass(name);\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] : \" + c);\n\t\t\treturn c;\n\t\t}\n\t\tcatch(NoClassDefFoundError e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t}", "String getMainClass();" ]
[ "0.7524193", "0.7501548", "0.7468955", "0.7373747", "0.72975373", "0.72892565", "0.7267048", "0.7055763", "0.70113975", "0.6983072", "0.6939098", "0.6901579", "0.6860333", "0.6746931", "0.67125326", "0.66779256", "0.66468245", "0.6608109", "0.6605435", "0.6605435", "0.66010535", "0.65604323", "0.65338427", "0.6510583", "0.6414526", "0.6213783", "0.61943746", "0.6176713", "0.61761713", "0.6146019", "0.61151713", "0.6100481", "0.60344887", "0.60204047", "0.601947", "0.59837866", "0.597256", "0.5862107", "0.5850122", "0.58495224", "0.5843355", "0.5826625", "0.58067507", "0.5767099", "0.5733569", "0.572569", "0.56791824", "0.56737816", "0.56726235", "0.5588364", "0.55822366", "0.55791986", "0.5569556", "0.55521834", "0.55416334", "0.55416334", "0.55122477", "0.5480073", "0.54759634", "0.54755753", "0.54574865", "0.5457193", "0.5447035", "0.54402596", "0.5433181", "0.54331565", "0.5426105", "0.5402001", "0.5384835", "0.5380412", "0.5363303", "0.5358946", "0.5344738", "0.53201026", "0.53143567", "0.53034943", "0.5294554", "0.5293592", "0.5286785", "0.5279132", "0.5271927", "0.52707744", "0.52665967", "0.5260023", "0.525962", "0.52488816", "0.52452755", "0.5233973", "0.52259207", "0.5224923", "0.52181256", "0.52103055", "0.5196757", "0.51813376", "0.51806074", "0.51774025", "0.51687217", "0.5166982", "0.51655143" ]
0.68608457
13
Returns the protection domain of the instrumented class
public ProtectionDomain getProtectionDomain() { return protectionDomain; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getDomain ();", "public Long getDomain()\n\t{\n\t\treturn domain;\n\t}", "public Domain getDomain() {\n return domain;\n }", "public Domain getDomain() {\n return this.domain;\n }", "public String getDomain() {\n return getProperty(DOMAIN);\n }", "public String getDomain() {\r\n return domain;\r\n }", "public String getDomain() {\n return domain;\n }", "public String getDomain() {\n return domain;\n }", "public String getDomain() {\n\t\treturn domain;\n\t}", "public Concept getDomain() { return domain; }", "String getDomain();", "@Override\n public String getDomain() {\n // return this.userDomain;\n return null; // to support create principal for different domains\n }", "@Override\n\tpublic boolean hasDomainGuard() {\n\t\treturn true;\n\t}", "DomainPackage getDomainPackage();", "@Override\n\tpublic final native String getDomain() /*-{\n return this.domain;\n\t}-*/;", "protected String getDomain() {\n return \"\";\n }", "public java.security.Principal getSubjectDN() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getSubjectDN():java.security.Principal, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getSubjectDN():java.security.Principal\");\n }", "public String getDomainRegEx() {\n return domainRegEx;\n }", "@DSSource({DSSourceKind.NETWORK})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:38.940 -0500\", hash_original_method = \"4243CC1C17FF1186628D392C9E7E1EB1\", hash_generated_method = \"C57F990C7B2B0F2B5409D3AF146913D2\")\n \npublic String getIsimDomain() {\n return mIsimDomain;\n }", "public String getDomainCd() {\n return this.domainCd;\n }", "@Override\n public String domain() {\n return null;\n }", "public String getDomainId() {\n return domain;\n }", "public List<String> getDomain() {\n\t\treturn null;\n\t}", "@Override\n public String getIsimDomain() {\n return mIsimDomain;\n }", "public IDomain[] getDomainComponents();", "public java.security.Principal getIssuerDN() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getIssuerDN():java.security.Principal, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getIssuerDN():java.security.Principal\");\n }", "public String getDomainName(){\n return this.domainName;\n }", "public String getDomainNm() {\n return this.domainNm;\n }", "DomainHelper dh();", "GetDomainType createGetDomainType();", "public String getAcsDomain() {\n return acsDomain;\n }", "public int getProtection() {\r\n\t\treturn protection;\r\n\t}", "private String getJmxDomain() {\n return \"metrics.session.\" + configuration.getNamespace();\n }", "protected static Container getDomainContainer(Container c)\r\n {\n return c.getProject();\r\n }", "public String getWaveDomain() {\n return waveDomain;\n }", "public BamService getDomainService()\n {\n return _domainService;\n }", "public ManagedHsmSecurityDomainProperties securityDomainProperties() {\n return this.securityDomainProperties;\n }", "public Long getDomainId() {\n return domainId;\n }", "public Long getDomainId() {\n return domainId;\n }", "public Domain getPreferenceDomain() {\n return getPreferenceService().getDomain(getName(), true);\n }", "public String getDomainId() {\n return this.domainId;\n }", "public String getCorpDistrict() {\n return corpDistrict;\n }", "public String getDomainName() {\n return domainName;\n }", "public String getDomainLabel() {\n return domainLabel;\n }", "public String domainId() {\n return this.domainId;\n }", "public String getDomainClassifier() {\r\n\t\treturn getTextValue(this.domainClassifierList);\r\n\t}", "public javax.security.auth.x500.X500Principal getSubjectX500Principal() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getSubjectX500Principal():javax.security.auth.x500.X500Principal, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getSubjectX500Principal():javax.security.auth.x500.X500Principal\");\n }", "public int getBasePProtection()\r\n {\r\n return mBasePProtection;\r\n }", "public DomainEntryPoint getDomainEntryPoint() {\n return this.domainEntryPoint;\n }", "public String getServiceDomain() {\r\n\t\treturn getTextValue(this.serviceDomainList);\r\n\t}", "public ServiceDomain getServiceDomain() {\n return _serviceDomain;\n }", "public int getDomainIdGain() {\r\n return dg;\r\n }", "public java.lang.String getDomainName() {\r\n return domainName;\r\n }", "@Override\n public AbstractDomain getAbstractDomain() {\n return null;\n }", "public ProtectionSet getManagedProtectionSet() {\n return _managedProtectionSet;\n }", "public Vec2 getCurveDomain() {\n return new Vec2(opensimSimulationJNI.FiberCompressiveForceCosPennationCurve_getCurveDomain(swigCPtr, this), true);\n }", "public java.lang.String getDomainName() {\n return domainName;\n }", "public ASPBuffer getLogonDomainList()\n {\n return configfile.domain_list;\n }", "public int getBaseMProtection()\r\n {\r\n return mBaseMProtection;\r\n }", "@Basic @Immutable\n\tpublic int getProtection() {\n\t\treturn protection;\n\t}", "public boolean getProtection();", "public static synchronized ServiceDomain getDomain() {\n if (!domains.containsKey(ROOT_DOMAIN)) {\n createDomain(ROOT_DOMAIN);\n }\n\n return getDomain(ROOT_DOMAIN);\n }", "DomainManager[] _get_domain_managers();", "boolean isForDomain();", "public Security getSecurity()\n {\n return __m_Security;\n }", "public javax.security.auth.x500.X500Principal getIssuerX500Principal() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getIssuerX500Principal():javax.security.auth.x500.X500Principal, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getIssuerX500Principal():javax.security.auth.x500.X500Principal\");\n }", "public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/net/Security\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }", "public Domain() {\n\n }", "public ArrayList<Domain> GetDomain()\r\n\t\t{\r\n\t\t\tArrayList<Domain> res = null;\r\n query.settype(MsgId.GET_DOMAIN);\r\n query.setdomlist(null);\r\n query.setrettype(RetID.INVALID);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t scon.sendmsg(query);\r\n\t\t\t MessageObject result = (MessageObject) scon.getmsg(query);\r\n\t\t\t \r\n\t\t\t if (result.getrettype() == RetID.DOMAIN_LIST) {\r\n\t\t\t \t res = result.getdomlist();\r\n\t\t\t }\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tHandleException(e, MsgId.GET_DOMAIN);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn res;\r\n\t\t}", "private ServiceDomains() {\n }", "public DomainTarget[] getDomainTargets() {\n return domainTargets;\n }", "public final String getDClassName() {\n return Descriptor.getDClassName(this.dclass);\n }", "public BlobDomain getResignationFile() {\r\n return (BlobDomain) getAttributeInternal(RESIGNATIONFILE);\r\n }", "public String ReturnProtectionClass(String Log) {\r\n\t\ttry {\r\n\t\t\tif(pc.getText().toUpperCase().contains(\"NO\")) {\r\n\t\t\t\tif(Log.toUpperCase().equals(\"Y\") || Log.toUpperCase().equals(\"YES\")) {\r\n\t\t\t\t\t\tLog(\"There is no protection class available in PIAL\");\r\n\t\t\t\t}\r\n\t\t\t\treturn \"No Protection Class available\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(Log.toUpperCase().equals(\"Y\") || Log.toUpperCase().equals(\"YES\")) {\r\n\t\t\t\t\t\tLog(\"The PIAL protection class value is \" + pc.getText().substring(27));\r\n\t\t\t\t}\r\n\t\t\t\treturn pc.getText().substring(27);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\tif(Log.toUpperCase().equals(\"Y\") || Log.toUpperCase().equals(\"YES\")) {\r\n\t\t\t\t\tLog(\"Address is not valid\");\r\n\t\t\t}\r\n\t\t\treturn \"addressnotvalid\";\r\n\t\t}\r\n\t}", "String privacyPolicy();", "@DOMSupport(DomLevel.ONE)\r\n @Property String getSecurity();", "public String getClassifcation()\r\n\t{\r\n\t\treturn this._classifcation;\r\n\t}", "public DomainManager[] _get_domain_managers() {\n throw new NO_IMPLEMENT(reason);\n }", "public XnRegion simpleDomain() {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9686:OrglRoot methodsFor: 'accessing'!\n{XnRegion} simpleDomain\n\t\"Return a simple region that encloses the domain of the receiver.\"\n\t\n\tself subclassResponsibility!\n*/\n}", "@Override\n\t\tpublic SecurityDirector getSecurity() {\n\t\t\treturn null;\n\t\t}", "public DIGReasonerIdentity getIdentity();", "public static String get() {\n\t\treturn \"ldapntlmdomain get\" + delimiter + \"ldapntlmdomain get \";\n\t}", "public Confidentiality getConfidentiality() {\n return confidentiality;\n }", "public ContractModelDomain getContractModelDomain() {\n\t\treturn ContractModelDomain;\n\t}", "DomainStatus getDomainStatus();", "public ClassifyDynamics GetClassDynm() {\n\t\treturn this.class_dynm;\n\t}", "public String getDistrict() {\n\t\treturn district;\n\t}", "public DomainConstraints domainConstraints() {\n if (_domainConstraints == null)\n _domainConstraints = new DomainConstraints(this, null, Keys.SYNTHETIC_FK_DOMAIN_CONSTRAINTS__SYNTHETIC_PK_CHECK_CONSTRAINTS.getInverseKey());\n\n return _domainConstraints;\n }", "public LegalScope getLegalScope()\n\t{\n\t\treturn legalScope;\n\t}", "public static String getEngineDomainId() {\n\t return null;\r\n }", "public CanaryDistributionProvider.Distribution getDistribution()\n {\n return _distribution;\n }", "public void setDomain(Concept _domain) { domain = _domain; }", "public float getSecurity() {\n return security;\n }", "public String l3IsolationDomainId() {\n return this.innerProperties() == null ? null : this.innerProperties().l3IsolationDomainId();\n }", "String getSearchDomainName();", "public YangString getDomainNameValue() throws JNCException {\n return (YangString)getValue(\"domain-name\");\n }", "private Patrol getDroidPatrol() {\n\t\treturn this.droidPatrol;\n\t}", "public Dns dns() {\n return dns;\n }", "public double getDomainMax2() throws IllegalStateException {\n\treturn Double.MAX_VALUE;\n }", "@NonNull\n public AuthenticationDomain getAuthenticationDomain() {\n return new AuthenticationDomain(mProto.authDomain);\n }" ]
[ "0.6817157", "0.64033", "0.6348151", "0.63140315", "0.61240077", "0.6115481", "0.60611475", "0.60611475", "0.6017861", "0.6004016", "0.598109", "0.58375853", "0.5731274", "0.5722316", "0.56425285", "0.5631073", "0.56030804", "0.5523381", "0.5510307", "0.55066514", "0.550368", "0.54880214", "0.5476589", "0.54523075", "0.5451487", "0.5437547", "0.5434832", "0.5391083", "0.5342142", "0.5327078", "0.5318066", "0.53169346", "0.5274922", "0.52330965", "0.52274805", "0.52180123", "0.5217206", "0.52013046", "0.52013046", "0.5182078", "0.51797", "0.51766616", "0.5175639", "0.515559", "0.51545453", "0.51125723", "0.51093894", "0.51081413", "0.5106431", "0.5101084", "0.5097503", "0.5094007", "0.5075496", "0.5050763", "0.5047953", "0.5018464", "0.5017249", "0.5009475", "0.50051355", "0.5001882", "0.49983874", "0.49853393", "0.49681744", "0.4964863", "0.49499482", "0.4935597", "0.4930813", "0.49215767", "0.4914566", "0.49052975", "0.49017698", "0.48864207", "0.48838207", "0.48672006", "0.4866198", "0.48650548", "0.48587897", "0.48354802", "0.4806335", "0.47915056", "0.47906753", "0.47880858", "0.47765577", "0.47661147", "0.47604954", "0.47596902", "0.47532594", "0.47509485", "0.47401544", "0.4728636", "0.47206917", "0.4714132", "0.4705018", "0.46994796", "0.46939975", "0.46881166", "0.4682566", "0.46744648", "0.46726477", "0.46701884" ]
0.71838254
0
Just for example, you can do this by OkHttp or something.
private void upgradeBundle(final net.wequick.small.Bundle bundle, final String urlStr, final File file, final OnUpgradeListener listener) { mHandler = new DownloadHandler(listener); new Thread() { @Override public void run() { try { URL url = new URL(urlStr); HttpURLConnection urlConn = (HttpURLConnection) url.openConnection(); InputStream is = urlConn.getInputStream(); // Save OutputStream os = new FileOutputStream(file); byte[] buffer = new byte[1024]; int length; while ((length = is.read(buffer)) != -1) { os.write(buffer, 0, length); } os.flush(); os.close(); is.close(); // While you finish downloading patch file, call this bundle.upgrade(); Message.obtain(mHandler, 1).sendToTarget(); } catch (IOException e) { e.printStackTrace(); } } }.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OptimizeResponse() {\n\n\t}", "@Override\r\n\tpublic void onOk(HttpRequest paramHttpRequest, Object paramObject) {\n\r\n\t}", "void faild_response();", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onResponseSuccess(final String resp) {\n }", "public void okhttpClick(View view) {\n\n\n String url = \"https://gank.io/api/add2gank\";\n RequestBody requestBody = new MultipartRequestBody()\n .addFormDataPart(\"pageNo\", \"1\")\n .addFormDataPart(\"pageSize\", \"50\")\n .addFormDataPart(\"platform\", \"android\");\n final Request request = new Request.Builder()\n .url(url)\n .tag(this)\n .post(requestBody)\n .build();\n\n OkHttpClient okHttpClient = new OkHttpClient();\n\n okHttpClient.newCall(request).enqueue(new Callback() {\n\n @Override\n public void onFailure(Call call, Exception e) {\n e.printStackTrace();\n Log.e(\"dengzi\", \"出错了\");\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String result = response.string();\n Log.e(\"dengzi\", result);\n }\n });\n }", "@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void onResponse(String response) {\n }", "@Override\n\tpublic void OnRequest() {\n\t\t\n\t}", "@Override\n public void onResponse(String response)\n {\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "public void request() {\n }", "@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}", "private CallResponse() {\n initFields();\n }", "public static void simple() throws IOException {\n OkHttpClient client = new OkHttpClient()\n .newBuilder()\n .connectTimeout(5, TimeUnit.SECONDS)\n .build();\n\n Request request = new Request.Builder()\n .url(\"http://www.ncq8.com/test.php\")\n .header(\"X-TEST\", \"test\")\n .header(\"User-Agent\", \"Chrome\")\n .build();\n\n\n Response response = client.newCall(request).execute();\n\n // 响应代码\n if (!response.isSuccessful()) {\n throw new IOException(\"服务器端错误: \" + response);\n }\n int httpCode = response.code();\n System.out.println(\"Status Code:\" + httpCode);\n\n // 单个响应头\n String server = response.header(\"Server\");\n System.out.println(\"Server:\" + server);\n\n // 响应头数组\n Headers headers = response.headers();\n for (int i = 0; i < headers.size(); i++) {\n System.out.println(headers.name(i) + \":\" +headers.value(i));\n }\n\n // 正文\n ResponseBody body = response.body();\n System.out.println(body.contentType().charset());\n System.out.println(body.contentType().type());\n System.out.println(body.contentLength());\n System.out.println(body.string());\n }", "public interface OkHttpDownFileCallBackListener {\r\n\r\n public void onError(Call call, Exception e, int errorCode);\r\n public void onResponse(File response, int successCode);\r\n public void inProgress(float progress, long total, int id);\r\n}", "java.lang.String getResponse();", "@Test\n public void getUserTest() throws Exception{\n Context appContext = InstrumentationRegistry.getTargetContext();\n String userStr= AssetsUtils.ReadAssetTxtContent(appContext, Constants.ASSET_USER_INFO_PATH);\n\n OkHttpClient client=new OkHttpClient();\n Request request = new Request.Builder().url(Constants.USER_INFO_URL).build();\n String userRequestStr=\"\";\n try(Response response=client.newCall(request).execute()){\n userRequestStr=response.body().string();\n }\n assertEquals(userStr,userRequestStr);\n }", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n public void onFailure(VolleyError error)\r\n {\n }", "@Override\r\n public void onFailure(VolleyError error)\r\n {\n }", "@Override\r\n public void onFailure(VolleyError error)\r\n {\n }", "String getResponse();", "private Response() {\n initFields();\n }", "@Override\n public void onResponse(Response response) throws IOException {\n }", "public interface Api {\n\n @GET(\"index\")\n Call<String> getSimple();\n\n @GET(\"getxml\")\n Call<String> getXml(@Query(\"code\") int code);\n\n @FormUrlEncoded\n @POST(\"postme\")\n Call<String> postSimple(@Field(\"from\") String foo);\n\n @Headers({\"Content-Type: application/xml\", \"Accept: application/json\"})\n @POST(\"postxml\")\n Call<String> postXml(@Body RequestBody aRequestBody);\n\n\n}", "private void StringRequest_POST() {\n\t\tString POST = \"http://api.juheapi.com/japi/toh?\";\n\t\trequest = new StringRequest(Method.POST, POST, new Listener<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0, Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}, new ErrorListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}){@Override\n\t\tprotected Map<String, String> getParams() throws AuthFailureError {\n\t\t\tHashMap< String , String> map = new HashMap<String,String>();\n\t\t\tmap.put(\"key\", \"7bc8ff86168092de65576a6166bfc47b\");\n\t\t\tmap.put(\"v\", \"1.0\");\n\t\t\tmap.put(\"month\", \"11\");\n\t\t\tmap.put(\"day\", \"1\");\n\t\t\treturn map;\n\t\t}};\n\t\trequest.addMarker(\"StringRequest_GET\");\n\t\tMyApplication.getHttpRequestQueue().add(request);\n\t}", "public abstract String getResponse();", "@Override\n public void onFailure(Request request, IOException e) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void onFailure(VolleyError error)\r\n {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "private void erweimaHttpPost() {\n\t\tHttpUtils httpUtils = new HttpUtils();\n\t\tUtils utils = new Utils();\n\t\tString[] verstring = utils.getVersionInfo(getActivity());\n\t\tRequestParams params = new RequestParams();\n\t\tparams.addHeader(\"ccq\", utils.getSystemVersion()+\",\"+ verstring[0]+\",\"+verstring[2]);\n\t\tparams.addBodyParameter(\"token\",\n\t\t\t\tnew DButil().gettoken(getActivity()));\n\t\tparams.addBodyParameter(\"member_id\",\n\t\t\t\tnew DButil().getMember_id(getActivity()));\n\t\thttpUtils.send(HttpMethod.POST, JiekouUtils.TUIGUANGERWEIMA, params,\n\t\t\t\tnew RequestCallBack<String>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tLog.e(\"ee\", \"失败:\" + arg1);\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t\t// handler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(ResponseInfo<String> arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\terweimaJsonInfo(arg0.result);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "private WebResponse() {\n initFields();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "public interface AntrianSendAPI {\n String URL_FILE = \"/response_place.php\";\n\n @FormUrlEncoded\n @POST(URL_FILE)\n void reserve(\n @Field(\"api_key\") String apiKey,\n @Field(\"antrian_numb\") Integer antrianNumb,\n @Field(\"antrian_code\") String antrianCode,\n @Field(\"user_token\") String userToken,\n Callback<Response> callback);\n}", "public void onResponse(Response response) throws Exception;", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}", "com.czht.face.recognition.Czhtdev.Request getRequest();", "private String httpOk() {\n return \"HTTP/1.1 200 OK\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\";\n }", "@Override\n protected String doInBackground(String... params){\n\n try {\n //1. Create okHttp Client object\n OkHttpClient client = new OkHttpClient();\n\n Endpoint endpoint = new Endpoint();\n\n //2. Define request being sent to the server\n\n Request request = new Request.Builder()\n .url(endpoint.getUrl())\n .header(\"Connection\", \"close\")\n .build();\n\n //3. Transport the request and wait for response to process next\n Response response = client.newCall(request).execute();\n String result = response.body().string();\n setCode(response.code());\n return result;\n }\n catch(Exception e) {\n return null;\n }\n }", "GetResponse() {\n\t}", "@Override\n public void onResponse(Call<Response> call, retrofit2.Response<Response> response) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n }", "@Override\n\t\tvoid request(HttpURLConnection u, String prefix) {\n\t\t}", "public interface RequestService {\n @GET(\"index?type=yule&key=d7e184978722fe31928061a05ac7980c\")\n Call<ResponseBody> getString();\n}", "@Override\n public void onErrorResponse(VolleyError error){\n }", "@Override\n public void onErrorResponse(VolleyError error){\n }", "@Override\n public void onErrorResponse(VolleyError error){\n }", "@Override\n public OkHttpClient customMake() {\n // just for OkHttpClient customize.\n final OkHttpClient.Builder builder = new OkHttpClient.Builder();\n // you can set the connection timeout.\n builder.connectTimeout(15_000, TimeUnit.MILLISECONDS);\n // you can set the HTTP proxy.\n builder.proxy(Proxy.NO_PROXY);\n // etc.\n return builder.build();\n }", "public void onRequestResponse(Response response) { }", "private Response() {}", "private Response() {}", "public void doGet( )\n {\n \n }", "public interface API {\n\n// String BASE_URL = \"https://www.apiopen.top/\";\n String BASE_URL = \"http://gc.ditu.aliyun.com/\";\n\n\n @GET\n Observable<Response<ResponseBody>> doGet(@Url String Url);\n\n @FormUrlEncoded\n @POST\n Observable<Response<ResponseBody>> doPost(@Url String Url, @FieldMap HashMap<String, String> map);\n\n @Streaming\n @GET\n Observable<Response<ResponseBody>> doDownload(@Url String Url);\n}", "@Override\n public void onResponse(String response) {\n }", "public interface ApiService {\n @GET(\"/lista_pokemons.php\")\n void getPokemons(Callback<List<PokemonEntity>> response);\n\n\n}", "public static void main(String[] args) throws IOException {\n String url = \"https://fonts.gstatic.com/\";\n //String url = \"http://localhost/\";\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor(new CustomHttpLogger());\n interceptor.setLevel(HttpLoggingInterceptor.Level.HEADERS);\n OkHttpClient client = new OkHttpClient.Builder()\n .addNetworkInterceptor(interceptor)\n .addInterceptor(interceptor)\n .build();\n Request request = new Request.Builder()\n .url(url)\n .build();\n\n try (Response response = client.newCall(request).execute()) {\n try (ResponseBody body = response.body()) {\n logger.info(\"response length: {}\", body == null ? \"no body\" : body.contentLength());\n }\n }\n }", "@Override\npublic void get(String url) {\n\t\n}", "@Test\n void getTest() {\n URI uri = URI.create(endBody + \"/get\");\n\n // get the response\n HttpResponse<String> response = HttpMethods.get(uri);\n\n // check if it received OK\n assertEquals(200, response.statusCode());\n }", "public interface ApiInterface {\n\n @GET(\"status.txt\")\n Call<Integer> getStatus();\n\n @GET(\"login.php\")\n Call<LoginModel> login(@Query(\"phone\") String phone);\n\n @GET(\"verify.php\")\n Call<LoginModel> verify(@Query(\"phone\") String phone, @Query(\"code\") String code);\n}", "@Override\n public void onErrorResponse(VolleyError volleyError) {\n\n }", "@Override\n\t\t\t\t\tpublic void onResponse(String s) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public interface RequestService {\n //http://gank.io/api/data/Android/10/1\n /*@GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();*/\n @GET(\"api/data/Android/10/1\")\n Call<GankBean> getAndroidInfo();\n @GET(\"api/data/Android/10/{page}\")\n Call<GankBean> getAndroidInfo(@Path(\"page\") int page);\n @GET(\"api/data/query?cityname=深圳\")\n Call<ResponseBody> getWeather(@Query(\"key\") String key,@Query(\"area\") String area);\n @GET(\"group/{id}/users\")\n Call<List<User2>> groupList(@Field(\"id\") int groupId, @QueryMap Map<String,String> options);\n @GET\n Call<GankBean> getAndroid2Info(@Url String url);\n\n}", "@Override\n\t\tpublic void onFailure(HttpException error, String msg) {\n\t\t\t\n\t\t}", "private void getMall(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "void onHTTPRequest(HTTPRequest request, HTTPResponse response);", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "public interface AsyncHttpLink{\n// @FormUrlEncoded\n// @POST(\"{url}\")\n// Call<ResponseBody> request(@Path(value = \"url\", encoded = true) String url, @FieldMap Map<String, String> params);\n\n @FormUrlEncoded\n @POST\n Call<ResponseBody> request(@Url String url, @FieldMap Map<String, String> params);\n\n @FormUrlEncoded\n @Headers(\"Authorization: basic dGFjY2lzdW06YWJjZGU=\")\n @POST\n Call<ResponseBody> login(@Url String url, @FieldMap Map<String, String> params);\n}", "private void fetchEverything() {\n ApiNewsMethods newsEverything = retrofit.create(ApiNewsMethods.class);\n newsEverything.getEverything(\"bitcoin\"/*topic input by user*/, newsApiKey).enqueue(new Callback<NewsModelClass>() {\n @Override\n public void onResponse(Call<NewsModelClass> call, Response<NewsModelClass> response) {\n if(response.isSuccessful()) {\n newsModelBody = response.body();\n Log.d(\"myBODY\", newsModelBody.getStatus());\n //text to speech object of the response fetched\n newsUIChanges();\n } else {\n Log.d(\"mySTRING\", \"DID NOT OCCUR\");\n }\n }\n\n @Override\n public void onFailure(Call<NewsModelClass> call, Throwable t) {\n }\n\n });\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "private WebRequest() {\n initFields();\n }", "@Test\n public void printResponse(){\n when().get(\"http:://34.223.219.142:1212/ords/hr/countries\")\n .body().prettyPrint();\n\n }", "private void postRequest(String my_id, int owner_id, Boolean accept) {\n ApiInterface apiService = ApiClient.getRetrofitClient().create(ApiInterface.class);\n Call<Request> call = apiService.getRequest(my_id, owner_id, accept);\n // progressDoalog.show();\n loadingDialog = new LoadingDialog((Activity) context);\n alert = new Alert((Activity) context);\n loadingDialog.startLoadingDialog();\n call.enqueue(new Callback<Request>() {\n @Override\n public void onResponse(Call<Request> call, Response<Request> response) {\n\n if (response.isSuccessful()) {\n loadingDialog.dismissDialog();\n if (response.body().equals(true))\n // progressDoalog.dismiss();\n alert.showAlertSuccess(\"تم قبول الطلب\");\n else\n alert.showAlertSuccess(\"تم رفض الطلب\");\n //Toast.makeText(context, \"don\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<Request> call, Throwable t) {\n // progressDoalog.dismiss();\n loadingDialog.dismissDialog();\n // Toast.makeText(context, \"خطاء في النظام الخارجي\", Toast.LENGTH_SHORT).show();\n alert.showAlertError(\"خطاء في النظام الخارجي\");\n\n }\n });\n }", "@GET(\"random.php\")\n Call<MealData> getRandomMeal();", "private Request() {}", "private Request() {}", "@Test\n\t \n\t public void getApi() {\n\t\t \n\t\t Response getIt=get(\"https://reqres.in/api/users?page=2\");\n\t\t getIt.prettyPrint();\n\t\t System.out.println(getIt.getStatusCode());\n\t\t System.out.println(getIt.getTime());\n\t\t \n\t\t //to validate\n\t\t int validGstatus=getIt.getStatusCode();\n\t\t Assert.assertEquals(validGstatus,200);\n\t\t \n\t }", "Call mo35727a(Request request);", "public void serverSideOk();", "public interface WeatherService {\n @GET(\"data/sk/{cityNumber}.html\")\n Call<WeatherResult>getResult(@Path(\"cityNumber\")String cityNumber);\n\n\n\n}", "void handleRequest();", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "public interface API {\n @GET(\"api/v1.5/tr.json/translate\")\n Call<Resp> Translate(@QueryMap Map<String, String> parameters);\n\n}", "private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}", "@Override\n\tpublic void onFailure(VolleyError error) {\n\t\t\n\t}", "private void caseForfeit(Request request) {\n }" ]
[ "0.60324985", "0.60239255", "0.593208", "0.58638775", "0.5851314", "0.5844721", "0.581926", "0.5795757", "0.5786677", "0.57829237", "0.5776224", "0.5776224", "0.5776224", "0.57422984", "0.57058245", "0.5704216", "0.5649533", "0.5628874", "0.56063175", "0.5605984", "0.55933666", "0.55933666", "0.5586929", "0.5586929", "0.5586929", "0.55773294", "0.5576057", "0.5571698", "0.5567831", "0.5554381", "0.5554117", "0.5539361", "0.5538632", "0.55374306", "0.55374306", "0.55374306", "0.55223006", "0.55196875", "0.551925", "0.55144626", "0.54995066", "0.5495799", "0.5495799", "0.5495799", "0.5495799", "0.5489578", "0.5476731", "0.54747444", "0.5461749", "0.54556835", "0.5455143", "0.54430497", "0.5441812", "0.5441812", "0.5441812", "0.5431589", "0.54304624", "0.54217434", "0.54217434", "0.54217434", "0.54195815", "0.5415714", "0.5414352", "0.5414352", "0.54121333", "0.5405062", "0.5403339", "0.5396012", "0.53822905", "0.538226", "0.5379148", "0.53766096", "0.5376292", "0.53760785", "0.53687984", "0.5364347", "0.53591835", "0.53562987", "0.5353125", "0.53528947", "0.53497607", "0.5349493", "0.5349493", "0.5344163", "0.5344163", "0.5341158", "0.53407633", "0.5339531", "0.5335029", "0.53345776", "0.53345776", "0.53344584", "0.53317535", "0.5330253", "0.53262365", "0.53227067", "0.531927", "0.5307325", "0.5305387", "0.5296846", "0.5293287" ]
0.0
-1
builds a new panel with the combo box chooser populated with the list of looks installed inthis machine.
public LookAndFeelChooser (LookAndFeelInfo [] looks , MainWindow mainWindow){ super(); this.mainWindow = mainWindow; this.setLayout(new FlowLayout()); String [] lookStrings = new String [looks.length]; for (int i = 0 ; i< looks.length ; i++){ lookStrings[i] = looks[i].getClassName(); System.out.println("look " + i + " = " + lookStrings[i]); } JComboBox lookPick = new JComboBox(lookStrings); lookPick.addActionListener(this); this.add(lookPick); this.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder("Will Destroy Current MainWindow and rebuild"), BorderFactory.createEmptyBorder(5,5,5,5))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildComboPanel(){\n //Create the combo panel\n comboPanel = new JPanel();\n \n //Combo box\n laneType = new JComboBox(lanes);\n \n //Allow the user to type input into combo field\n laneType.setEditable(true);\n \n comboLabel = new JLabel(\"Lane: \");\n \n //Add the components to the panel\n comboPanel.add(comboLabel);\n comboPanel.add(laneType);\n }", "private void makeGUI() {\r\n\t\tInstrument[] instruments = getAvailableInstruments();\r\n\r\n\t\tJPanel channels = new JPanel();\r\n\t\tchannels.setLayout(new BoxLayout(channels, BoxLayout.Y_AXIS));\r\n\r\n\t\tcomboBoxes = new JComboBox[16];\r\n\t\tfor (int chan = 0; chan < 16; chan++) {\r\n\t\t\tJPanel channelPanel = new JPanel();\r\n\t\t\tchannelPanel\r\n\t\t\t\t\t.setLayout(new BoxLayout(channelPanel, BoxLayout.X_AXIS));\r\n\t\t\tJLabel label = new JLabel(\"Channel \" + chan);\r\n\t\t\tlabel.setPreferredSize(LABEL_DIMENSION);\r\n\t\t\tchannelPanel.add(label);\r\n\t\t\tJComboBox cb = new JComboBox(instruments);\r\n\t\t\tcb.setMaximumRowCount(25);\r\n\t\t\tint program = pianoRollPanel.getProgram(chan);\r\n\t\t\tcb.setSelectedIndex(program);\r\n\t\t\tchannelPanel.add(cb);\r\n\t\t\tcomboBoxes[chan] = cb;\r\n\t\t\tchannels.add(channelPanel);\r\n\t\t}\r\n\t\tadd(channels, BorderLayout.CENTER);\r\n\t\tJPanel buttonPanel = new JPanel();\r\n\t\tJButton okButton = new JButton(OK);\r\n\t\tokButton.setActionCommand(OK);\r\n\t\tokButton.setMnemonic('O');\r\n\t\tokButton.addActionListener(this);\r\n\t\tJButton cancelButton = new JButton(CANCEL);\r\n\t\tcancelButton.setActionCommand(CANCEL);\r\n\t\tcancelButton.setMnemonic('C');\r\n\t\tcancelButton.addActionListener(this);\r\n\t\tbuttonPanel.add(okButton);\r\n\t\tbuttonPanel.add(cancelButton);\r\n\t\tadd(buttonPanel, BorderLayout.SOUTH);\r\n\t}", "private static void createAndShowGUI() {\n //Make sure we have nice window decorations.\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"MRALD Color Chooser\");\n\n //Create and set up the content pane.\n JComponent newContentPane = new MraldColorChooser(coloringItems);\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n lblPlatform = new javax.swing.JLabel();\n platformComboBox = new javax.swing.JComboBox();\n btnManagePlatforms = new javax.swing.JButton();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 100), new java.awt.Dimension(0, 0));\n progressLabel = new javax.swing.JLabel();\n progressPanel = new javax.swing.JPanel();\n\n setLayout(new java.awt.GridBagLayout());\n\n lblPlatform.setLabelFor(platformComboBox);\n lblPlatform.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_ComboBox\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 12);\n add(lblPlatform, gridBagConstraints);\n lblPlatform.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_labelPlatform\")); // NOI18N\n lblPlatform.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_labelPlatform\")); // NOI18N\n\n platformComboBox.setModel(platformsModel);\n platformComboBox.setRenderer(platformsCellRenderer);\n platformComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n platformComboBoxItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING;\n gridBagConstraints.weightx = 0.1;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 5, 0);\n add(platformComboBox, gridBagConstraints);\n\n org.openide.awt.Mnemonics.setLocalizedText(btnManagePlatforms, org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_PanelOptions_Manage_Button\")); // NOI18N\n btnManagePlatforms.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnManagePlatformsActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_TRAILING;\n gridBagConstraints.insets = new java.awt.Insets(5, 10, 5, 0);\n add(btnManagePlatforms, gridBagConstraints);\n btnManagePlatforms.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_buttonManagePlatforms\")); // NOI18N\n btnManagePlatforms.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_buttonManagePlatforms\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints.weighty = 0.1;\n add(filler1, gridBagConstraints);\n\n progressLabel.setText(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"LBL_Platform_Progress\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;\n add(progressLabel, gridBagConstraints);\n progressLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSN_platformProgress\")); // NOI18N\n progressLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(PanelOptionsVisual.class, \"ACSD_platformProgress\")); // NOI18N\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 0.1;\n add(progressPanel, gridBagConstraints);\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Combo box editabel\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //2. kreirati kontrole i pobacati kako nam kaže neki manager LayoutManager\n JComponent comboBoxPanel = new ComboBoxPanel2();\n comboBoxPanel.setOpaque(true);\n frame.setContentPane(comboBoxPanel);\n\n //3. prikazati prozor\n frame.pack();\n frame.setVisible(true);\n }", "public JPanel createWeaponGuessPanel() {\n\t\tJPanel panel = new JPanel();\n\t\tJComboBox<String> comboBox = new JComboBox<String>();\n\t\tpanel.setBorder(new TitledBorder(new EtchedBorder(), \"Weapon Guess\"));\n\t\tcomboBox.addItem(\"Unsure\");\n\t\tcomboBox.addItem(\"Rope\");\n\t\tcomboBox.addItem(\"Lead Pipe\");\n\t\tcomboBox.addItem(\"Knife\");\n\t\tcomboBox.addItem(\"Wrench\");\n\t\tcomboBox.addItem(\"Candlestick\");\n\t\tcomboBox.addItem(\"Revolver\");\t\n\t\tpanel.add(comboBox);\n\t\treturn panel;\n\t}", "private JPanel setup_font_family_combo_box() {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout( new FlowLayout( FlowLayout.LEFT, 5, 5));\r\n\r\n\t\t_comboBox = CommonTool.get_font_family_combo_box();\r\n\r\n\t\tif ( !_family_name.equals( \"\"))\r\n\t\t\t_comboBox.setSelectedItem( _family_name);\r\n\r\n\t\tlink_to_cancel( _comboBox);\r\n\r\n\t\tpanel.add( _comboBox);\r\n\t\treturn panel;\r\n\t}", "private void fillPanel(){\n populateLittlesComboBox(littlesRankingsBox);\n populateLittlesComboBox(whoRanksLittleBox);\n populateBigsComboBox(bigsRankingsBox);\n populateBigsComboBox(whoRanksBigBox);\n\n }", "private void addComponentsToOptionsPanel(){\r\n\t\tBox box = Box.createVerticalBox();\r\n\t\tbox.add(new JLabel(\"Active Feature Type\",SwingConstants.LEFT));\r\n\t\tJPanel featuresPanel = new JPanel(new GridLayout(2, 2));\r\n\t\tfeaturesPanel.setBorder(BorderFactory.createLineBorder (Color.black, 1));\r\n\t\tfeaturesPanel.add(asCB);\r\n\t\tfeaturesPanel.add(new JLabel(\"\"));\r\n\t\tfeaturesPanel.add(bldngCB);\r\n\t\tfeaturesPanel.add(stuCB);\r\n\t\tbox.add(featuresPanel);\r\n\r\n\t\t//creating empty space\r\n\t\tbox.add(new JPanel());\r\n\t\t\r\n\t\tJLabel queryLabel = new JLabel(\"Query\",SwingConstants.LEFT);\r\n\t\tbox.add(queryLabel);\r\n\t\tJPanel queriesRB = new JPanel();\r\n\t\tqueriesRB.setLayout(new BoxLayout(queriesRB, BoxLayout.Y_AXIS));\r\n\t\tbuttonGroup = new ButtonGroup();\r\n\t\twholeRegion = new JRadioButton(\"Whole Region\");\r\n\t\twholeRegion.addItemListener(new ItemListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent arg0) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tpointQuery = new JRadioButton(\"Point Query\");\r\n\t\tpointQuery.addItemListener(new ItemListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent ie) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t\tif(ie.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\tpointQuery.setSelected(true);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(\"Point Query\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpointQuery.setSelected(false);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(null);\r\n\t\t\t\t\tsetPqX(-300);\r\n\t\t\t\t\tsetPqY(-300);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t\trangeQuery = new JRadioButton(\"Range Query\");\r\n\t\trangeQuery.addItemListener(new ItemListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent ie) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t\tif(ie.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\trangeQuery.setSelected(true);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(\"Range Query\");\r\n\t\t\t\t\tsetDrawPoly(true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\trangeQuery.setSelected(false);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(null);\r\n\t\t\t\t\tgetPath().clear();\r\n\t\t\t\t}\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t\tsurrStudent = new JRadioButton(\"Surrounding Student\");\r\n\t\tsurrStudent.addItemListener(new ItemListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent ie) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t\tif(ie.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\tsurrStudent.setSelected(true);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(\"Surrounding Student\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsurrStudent.setSelected(false);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(null);\r\n\t\t\t\t}\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\temerQuery = new JRadioButton(\"Emergency Query\");\r\n\t\temerQuery.addItemListener(new ItemListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void itemStateChanged(ItemEvent ie) {\r\n\t\t\t\tgetQuery().setSubmitFlag(false);\r\n\t\t\t\tif(ie.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\temerQuery.setSelected(true);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(\"Emergency Query\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\temerQuery.setSelected(false);\r\n\t\t\t\t\tgetQuery().setSelectedQuery(null);\r\n\t\t\t\t}\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tbuttonGroup.add(wholeRegion);\r\n\t\tbuttonGroup.add(pointQuery);\r\n\t\tbuttonGroup.add(rangeQuery);\r\n\t\tbuttonGroup.add(surrStudent);\r\n\t\tbuttonGroup.add(emerQuery);\r\n\t\tqueriesRB.add(wholeRegion);\r\n\t\tqueriesRB.add(pointQuery);\r\n\t\tqueriesRB.add(rangeQuery);\r\n\t\tqueriesRB.add(surrStudent);\r\n\t\tqueriesRB.add(emerQuery);\r\n\t\tqueriesRB.setBorder(BorderFactory.createLineBorder (Color.black, 1));\r\n\t\tbox.add(queriesRB);\r\n\t\t//creating empty space\r\n\t\tbox.add(new JPanel());\r\n\t\tJPanel buttonPanel = new JPanel();\r\n\t\tbuttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));\r\n\t\tsubmitButton = new JButton(\"Submit Query\");\r\n\t\tsubmitButton.addActionListener(new ActionListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\r\n\t\t\t\tQuery query = new Query();\r\n\t\t\t\tquery.setAsFlag(asCB.isSelected());\r\n\t\t\t\tquery.setBuildingFlag(bldngCB.isSelected());\r\n\t\t\t\tquery.setStudentFlag(stuCB.isSelected());\r\n\t\t\t\tquery.setSubmitFlag(true);\r\n\t\t\t\tfor(Enumeration<AbstractButton> radButtons = buttonGroup.getElements(); radButtons.hasMoreElements();){\r\n\t\t\t\t\tAbstractButton ab = radButtons.nextElement();\r\n\t\t\t\t\tif(ab.isSelected()){\r\n\t\t\t\t\t\tquery.setSelectedQuery(ab.getText());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsetQuery(query);\r\n\t\t\t\timagePanel.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonPanel.add(submitButton);\r\n\t\tbuttonPanel.setBorder(BorderFactory.createLineBorder (Color.black, 1));\r\n\t\tbox.add(buttonPanel);\r\n\t\toptionsPanel.add(box);\r\n\t}", "private void loadDisplayScreen() {\r\n wells = xmlreader.getWells();\r\n \r\n for (int i = 0; i < wells.size(); i++) {\r\n opName.add(new Well(i, wells.get(i).getName()));\r\n \r\n }\r\n Iterator<Well> iterate = opName.iterator();\r\n \r\n while (iterate.hasNext()) {\r\n arrName.add(iterate.next().getName());\r\n }\r\n aModel = new DefaultComboBoxModel<>(arrName);\r\n wellCombo.setModel(aModel);\r\n\r\n }", "private JPanel createComboBoxes() {\n JPanel container = new JPanel();\n JPanel comboContainer = new JPanel();\n JLabel preferenceLabel = new JLabel();\n String[] names = getCandidateNames();\n \n // Sets the text of the preference (new vote) label.\n String preferenceLabelText = \"<html><div style='text-align: center; width: \" + PANEL_SIZE.width + \";'><h3>New Vote</h3>\";\n if (names.length < 2) {\n preferenceLabelText += \"There are no candidates to vote for right now.<br><br>\";\n }\n preferenceLabelText += \"</div></html>\";\n preferenceLabel.setText(preferenceLabelText);\n \n // Lays out the containers.\n container.setLayout(new BorderLayout());\n container.add(preferenceLabel, BorderLayout.PAGE_START);\n container.add(comboContainer, BorderLayout.PAGE_END);\n \n comboContainer.setLayout(new BoxLayout(comboContainer, BoxLayout.Y_AXIS));\n \n // Allows the user to select each of their preferences for a new vote.\n for (int index = 1; index < names.length; index++) {\n JPanel comboPanel = new JPanel();\n JLabel comboLabel = new JLabel(\"Preference \" + index);\n JComboBox<String> comboBox = new JComboBox<>(names);\n comboPanel.setLayout(new BoxLayout(comboPanel, BoxLayout.X_AXIS));\n comboPanel.add(comboLabel);\n comboPanel.add(comboBox);\n comboContainer.add(comboPanel);\n comboBoxes.add(comboBox);\n }\n \n // Returns the container so that it can be added to a panel.\n return container;\n }", "public JPanel createRoomGuessPanel() {\n\t\tJPanel panel = new JPanel();\n\t\tJComboBox<String> comboBox = new JComboBox<String>();\n\t\tpanel.setBorder(new TitledBorder(new EtchedBorder(), \"Room Guess\"));\n\t\tcomboBox.addItem(\"Unsure\");\n\t\tcomboBox.addItem(\"Conservatory\");\n\t\tcomboBox.addItem(\"Kitchen\");\n\t\tcomboBox.addItem(\"Ballroom\");\n\t\tcomboBox.addItem(\"Library\");\n\t\tcomboBox.addItem(\"Arcade room\");\n\t\tcomboBox.addItem(\"Gun room\");\n\t\tcomboBox.addItem(\"Trophy room\");\n\t\tcomboBox.addItem(\"Pantry\");\n\t\tcomboBox.addItem(\"Sauna\");\t\n\t\tpanel.add(comboBox);\n\t\treturn panel;\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n 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 void initComponents() {\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n setTitle(title());\r\n setMinimumSize(new java.awt.Dimension(1000, 500));\r\n\r\n toolsPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));\r\n\r\n channelComboBox.setMinimumSize(new java.awt.Dimension(75, 20));\r\n channelComboBox.setPreferredSize(new java.awt.Dimension(100, 20));\r\n channelComboBox.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n channelComboBox_actionPerformed(evt);\r\n }\r\n });\r\n toolsPanel.add(channelComboBox);\r\n\r\n getContentPane().add(toolsPanel, java.awt.BorderLayout.NORTH);\r\n getContentPane().add(tabsPanel, java.awt.BorderLayout.CENTER);\r\n\r\n valuesPanel.setLayout(new javax.swing.BoxLayout(valuesPanel, javax.swing.BoxLayout.Y_AXIS));\r\n getContentPane().add(valuesPanel, java.awt.BorderLayout.EAST);\r\n\r\n pack();\r\n }", "private void buildComboBox() {\r\n\r\n comboBoxKernelOpen = new JComboBox();\r\n comboBoxKernelOpen.setFont(serif12);\r\n comboBoxKernelOpen.setBackground(Color.white);\r\n\r\n if (image.getNDims() == 2) {\r\n comboBoxKernelOpen.addItem(\"3x3 - 4 connected\");\r\n comboBoxKernelOpen.addItem(\"5x5 - 12 connected\");\r\n comboBoxKernelOpen.addItem(\"User sized circle.\");\r\n comboBoxKernelOpen.setSelectedIndex(2);\r\n } else if (image.getNDims() == 3) {\r\n comboBoxKernelOpen.addItem(\"3x3x3 - 6 connected (2.5D: 4)\");\r\n comboBoxKernelOpen.addItem(\"5x5x5 - 24 connected (2.5D: 12)\");\r\n comboBoxKernelOpen.addItem(\"User sized sphere.\");\r\n }\r\n }", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "public ClientPanel() {\n initComponents();\n chooser = new JFileChooser();\n \n }", "public Items()\r\n\t{\r\n\t\t//create the window/panel\r\n\t\tsuper( \"Swing Window\" );\r\n\t\tsetSize( 500,200 );\r\n\t\tsetDefaultCloseOperation( EXIT_ON_CLOSE );\r\n\t\tadd(pnl);\r\n\t\t\r\n\r\n\t\t//add the different checkboxes to the panel\r\n\t\tpnl.add( chk1 ) ;\r\n\t\tpnl.add( chk2 ) ;\r\n\t\tpnl.add( chk3 ) ;\r\n\t\tpnl.add( chk4 ) ;\r\n\t\t\r\n\t\t//pnl.add( chk5 ) ;\r\n\t\t//pnl.add( chk6 ) ;\r\n\t\t//pnl.add( chk7 ) ;\r\n\t\t//add the combobox\r\n\t\tbox1.setSelectedIndex(0);\r\n\t\tpnl.add( box1 ) ;\r\n\t\t\r\n\t\tbox2.setSelectedIndex(0);\r\n\t\tpnl.add( box2 ) ;\r\n\t\t\r\n\t\tpnl.add( lst1 ) ; \r\n\t\tpnl.add( lst2 ) ; \r\n\t\tsetVisible( true );\r\n\t}", "public Component componentSetup() {\r\n\t\tJPanel pane = new JPanel();\r\n\t\t// Absolute container positioning used\r\n\t\tpane.setLayout(null);\r\n\r\n\t\t// Variable declaration\r\n\t\tString[] media_combo_box = { \"Choose here\", \"CD\" };\r\n\t\t// declaration of pane components\r\n\r\n\t\t// Combo boxes\r\n\t\tmediaTypeSelected = new JComboBox(media_combo_box);\r\n\t\tmediaTypeSelected.setActionCommand(\"Media Select\");\r\n\t\tmediaTypeSelected.addActionListener(this);\r\n\r\n\t\t// Buttons\r\n\t\tadd = new JButton(\"Add\");\r\n\t\tadd.setActionCommand(\"Add\");\r\n\t\tadd.addActionListener(this);\r\n\t\tbackToMain = new JButton(\"Back to Main Screen\");\r\n\t\tbackToMain.setActionCommand(\"Back to Main\");\r\n\t\tbackToMain.addActionListener(this);\r\n\r\n\t\t// Labels\r\n\t\tmediaText = new JLabel(\"Select a media type:\");\r\n\t\tmediaText.setFont(new Font(\"Helvetica\", Font.PLAIN, 12));\r\n\r\n\t\taddText = new JLabel(\"Adding media:\");\r\n\t\taddText.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\r\n\r\n\r\n\t\tchooseMediaText = new JLabel(\"Please choose a media type\");\r\n\t\tchooseMediaText.setFont(new Font(\"Helvetica\", Font.PLAIN, 10));\r\n\r\n\r\n\t\taddedText = new JLabel(\"Information successfully added\");\r\n\t\taddedText.setFont(new Font(\"Helvetica\", Font.PLAIN, 12));\r\n\t\taddedText.setForeground(Color.red);\r\n\t\t\r\n\t\tchooseMediaText.setForeground(Color.red);\r\n\t\t\r\n\t\taddSetup = new JPanel();\r\n\t\taddSetup.setLayout(new CardLayout()); \r\n\t\taddSetup.setBorder(BorderFactory.createEtchedBorder());\r\n\t\taddSetup.setPreferredSize(new Dimension(600, 250));\r\n\t\taddSetup.add(new UnselectedPanel(PANEL_SIZE), UNSELECTED);\r\n\t\taddSetup.add(CDsSelected, CDs);\r\n\t\t\r\n\t\t\r\n\t\t// Add components to the pane\r\n\t\tpane.add(mediaTypeSelected);\r\n\t\tpane.add(backToMain);\r\n\t\tpane.add(add);\r\n\t\tpane.add(mediaText);\r\n\t\tpane.add(addText);\r\n\t\tpane.add(chooseMediaText);\r\n\t\tpane.add(addedText);\r\n\t\tpane.add(addSetup);\r\n\t\t\r\n\t\t// Screen positioning\r\n\t\tInsets insets = pane.getInsets();\r\n\r\n\t\tbackToMain.setBounds(490 + insets.left, 425 + insets.top, 160, 75);\r\n\r\n\t\tadd.setBounds(320 + insets.left, 425 + insets.top, 160, 75);\r\n\r\n\t\tmediaTypeSelected.setBounds(175 + insets.left, 128 + insets.top, 100,\r\n\t\t\t\t20);\r\n\r\n\t\taddText.setBounds(50 + insets.left, 50 + insets.top, 300, 75);\r\n\r\n\t\tmediaText.setBounds(50 + insets.left, 100 + insets.top, 150, 75);\r\n\r\n\t\taddedText.setBounds(450 + insets.left, 350 + insets.top, 300, 75);\r\n\t\taddedText.setVisible(false);\r\n\t\t\r\n\t\taddSetup.setBounds(50 + insets.left,160 + insets.top, 600, 250);\r\n\r\n\t\treturn pane;\r\n\r\n\t}", "public void setUpDropdowns(){\n\t\t\n\t\tString[] numberList = {\"2\",\"3\",\"4\"};\n\t\tframe.getContentPane().removeAll();\n\t\t\n\t\touterPanel = new JPanel();\t\t\n\t\touterPanel.setLayout(new FlowLayout()); \n\t\tframe.revalidate();\n\t\tframe.repaint();\n\t\t\n\t\t//JComboBox = Dropwdown list\n\t\tfinal JComboBox<String> dropdownList = new JComboBox<>(numberList);\n\t\tdropdownList.setSelectedIndex(0);\n\t\t//frame.getContentPane().add(dropdownList);\n\t\tfinal JLabel amountOfPlayers = new JLabel(\"Give the amount of players: \");\n\t\tamountOfPlayers.setForeground(Color.WHITE);\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));\n\t\tJLabel instructions = new JLabel();\n\t\tPictureCreateClass instructionsP = new PictureCreateClass(URLs.INSTRUCTIONS,400,400);\n\t\tImage image = instructionsP.getImage();\n\t\tImageIcon icon = new ImageIcon(image);\n\t\tinstructions.setIcon(icon);\n\t\tpanel.add(amountOfPlayers);\n\t\tpanel.add(dropdownList);\n\t\tJPanel uberOuterPanel = new JPanel();\n\t\tuberOuterPanel.setLayout(new FlowLayout());\n\t\tuberOuterPanel.setBackground(Color.BLACK);\n\t\tuberOuterPanel.add(instructions);\n\t\tuberOuterPanel.add(outerPanel);\n\t\touterPanel.add(panel);\n\t\tframe.add(uberOuterPanel);\n\t\tpanel.setBackground(Color.BLACK);\n\t\touterPanel.setBackground(Color.BLACK);\n\t\tJButton returnButton = new JButton(\"Go to Menu\");\n\t\touterPanel.add(Box.createHorizontalStrut(100));\n\t\touterPanel.add(returnButton);\n\t\treturnButton.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\tMenu m = new Menu(frame);\n\t\t\t\tm.makeMenu();\n\t\t\t}\n\t\t});\n\t\t\n\t\tframe.revalidate();\n\t\tframe.repaint();\n\t\tdropdownList.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tJComboBox<String> cb = (JComboBox<String>)e.getSource();\n\t\t\t\tamountPlayers = Integer.parseInt((String)cb.getSelectedItem());\n\t\t\t\tpanel.remove(dropdownList);\n\t\t\t\tamountOfPlayers.setText(\"Type the player names\");\n\t\t\t\tsetUpPlayers(amountOfPlayers);\n\t\t\t}\t\n\t\t});\n\t}", "private void initSettingsPanel() {\n JLabel lblName = new JLabel(\"Name:\");\n lblName.setForeground(StyleCompat.textColor());\n\n JTextField fieldName = new JTextField(20);\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblName, fieldName));\n\n JLabel lblVirtOutput = new JLabel(\"VirtualOutput:\");\n lblVirtOutput.setForeground(StyleCompat.textColor());\n\n JComboBox<String> comboVirtOutputs = new JComboBox<>();\n for(Device device : instance.getInterface().getDeviceManager().getDevices()) {\n if(device instanceof VirtualOutput) {\n if(handler != null && instance.getHandlerByVirtualOutput(device.getId()) == handler) {\n comboVirtOutputs.addItem(device.getId());\n comboVirtOutputs.setSelectedIndex(comboVirtOutputs.getItemCount() - 1);\n } else if(!instance.isVirtualOutputUsed(device.getId())) {\n comboVirtOutputs.addItem(device.getId());\n }\n }\n }\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblVirtOutput, comboVirtOutputs));\n\n JLabel lblDeviceId = new JLabel(\"OpenRGB Device ID (index):\");\n lblDeviceId.setForeground(StyleCompat.textColor());\n\n JFormattedTextField fieldDeviceId = new JFormattedTextField(UserInterfaceUtil.getIntFieldFormatter());\n fieldDeviceId.setColumns(5);\n JButton btnAddDeviceId = new JButton(\"Add device\");\n UiUtilsCompat.configureButton(btnAddDeviceId);\n btnAddDeviceId.addActionListener(e -> {\n if(fieldDeviceId.getValue() == null) return;\n int value = (int) fieldDeviceId.getValue();\n if(value < 0 || listDevices.contains(value)) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Invalid ID or list contains already ID.\"));\n return;\n }\n listDevices.add(value);\n fieldDeviceId.setText(\"\");\n updateDeviceListPanel();\n });\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblDeviceId, fieldDeviceId, btnAddDeviceId));\n\n if(instance.getOpenRGB().isConnected()) {\n // show info label, remove all and add all button\n int deviceCount = instance.getOpenRGB().getControllerCount();\n\n JLabel lblCountInfo = new JLabel(\"There are \" + deviceCount + \" devices available.\");\n lblCountInfo.setForeground(StyleCompat.textColor());\n\n JButton btnAddAll = new JButton(\"Add all\");\n UiUtilsCompat.configureButton(btnAddAll);\n btnAddAll.addActionListener(e -> {\n for(int i = 0; i < deviceCount; i++) {\n if(!listDevices.contains(i))\n listDevices.add(i);\n }\n updateDeviceListPanel();\n });\n\n JButton btnRemoveAll = new JButton(\"Remove all\");\n UiUtilsCompat.configureButton(btnRemoveAll);\n btnRemoveAll.addActionListener(e -> {\n listDevices.clear();\n updateDeviceListPanel();\n });\n\n // add components to panel\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblCountInfo, btnAddAll, btnRemoveAll));\n } else {\n // show hint message\n JLabel lblHint = new JLabel(\"(i) Go back and connect the client to receive live data from the SDK server.\");\n lblHint.setForeground(StyleCompat.textColorDarker());\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblHint));\n }\n\n panelDeviceList = new JPanel();\n panelDeviceList.setBackground(StyleCompat.panelDarkBackground());\n panelDeviceList.setLayout(new BoxLayout(panelDeviceList, BoxLayout.Y_AXIS));\n panelDeviceList.setAlignmentX(Component.LEFT_ALIGNMENT);\n panelSettings.add(Box.createVerticalStrut(10));\n panelSettings.add(panelDeviceList);\n updateDeviceListPanel();\n\n if(handler != null) {\n // set stored values\n fieldName.setText(handler.getName());\n }\n\n JButton btnAdd = new JButton(handler == null ? \"Add OpenRGB Device\" : \"Save OpenRGB Device\");\n UiUtilsCompat.configureButton(btnAdd);\n btnAdd.setAlignmentX(Component.LEFT_ALIGNMENT);\n btnAdd.setMaximumSize(new Dimension(Integer.MAX_VALUE, 50));\n btnAdd.setMinimumSize(new Dimension(100, 50));\n\n btnAdd.addActionListener(e -> {\n // create value holder\n ValueHolder holder = new ValueHolder(\n fieldName.getText(),\n (String) comboVirtOutputs.getSelectedItem(),\n listDevices);\n\n if(validateInput(holder.getName(), holder.getOutputId())) {\n // get output\n VirtualOutput output = OpenRgbPlugin.getVirtualOutput(instance.getInterface().getDeviceManager(), holder.getOutputId());\n if (output == null) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Could not find virtual output for id \" + holder.getOutputId()));\n return;\n }\n\n if(handler != null) { // set values to output handler\n handler.setName(holder.getName());\n handler.setDevices(listDevices);\n handler.setVirtualOutput(output);\n } else { // create new output handler\n // create new handler\n OutputHandler handler = instance.createHandler(holder, output);\n // add handler to set\n instance.addHandler(handler);\n }\n\n // go back\n context.navigateDown();\n }\n });\n\n panelSettings.add(Box.createVerticalGlue());\n panelSettings.add(btnAdd);\n }", "private void createChooser(final int nr, final String[] chooserText,\r\n final int pos) {\r\n chooserLabel[nr] = new JLabel();\r\n chooserLabel[nr].setFont(new Font(\"Serif\", Font.BOLD, 14));\r\n chooserLabel[nr].setBounds(10, pos, 150, 25);\r\n\r\n this.add(chooserLabel[nr]);\r\n this.add(new SComponent(chooserLabel[nr], chooserText));\r\n\r\n chooser[nr] = new ColorChooserComboBox();\r\n chooser[nr].setBounds(210, pos, 100, 25);\r\n this.add(chooser[nr]);\r\n }", "private void initPanel(){\n setBackground(Color.decode(\"#D9E4E8\"));\n unmatchedLilsTextField = new UnmatchedTextArea(\"littles\", new JTextArea());\n unmatchedBigsTextField = new UnmatchedTextArea(\"bigs\", new JTextArea());\n\n scoresLabel = new JLabel();\n\n littlesRanksTitleLabel = new JLabel(\"Select a little to see her preferences:\");\n littlesRanksTitleLabel.setPreferredSize(new Dimension(400,20));\n littlesRankingsBox = new JComboBox<>();\n littlesRankingsBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n littlesRankingsResultsLabel = new JTextArea();\n\n\n bigsRanksTitleLabel = new JLabel(\"Select a big to see her preferences:\");\n bigsRanksTitleLabel.setPreferredSize(new Dimension(400,20));\n bigsRankingsBox = new JComboBox<>();\n bigsRankingsResultsLabel = new JTextArea();\n\n whoRanksLittleTitleLabel = new JLabel (\"Select a Little to see who ranked her:\");\n whoRanksLittleTitleLabel.setPreferredSize(new Dimension(400,20));\n whoRanksLittleBox = new JComboBox<String>();\n whoRanksLittleResultsLabel = new JTextArea();\n\n whoRanksBigTitleLabel = new JLabel (\"Select a Big to see who ranked her:\");\n whoRanksBigTitleLabel.setPreferredSize(new Dimension(400,20));\n whoRanksBigBox = new JComboBox<String>();\n whoRanksBigResultsLabel = new JTextArea();\n\n// got rid of this button for now so I could improve its functionality\n// button = new JButton(\"Click to display computed matches\");\n// button.setPreferredSize(new Dimension(300,20));\n\n setLayout(new FlowLayout());\n// add(button);\n add(scoresLabel);\n add(unmatchedLilsTextField);\n add(unmatchedBigsTextField);\n add(littlesRanksTitleLabel);\n add(littlesRankingsBox);\n add(littlesRankingsResultsLabel);\n add(bigsRanksTitleLabel);\n add(bigsRankingsBox);\n add(bigsRankingsResultsLabel);\n add(whoRanksLittleTitleLabel);\n add(whoRanksLittleBox);\n add(whoRanksLittleResultsLabel);\n add(whoRanksBigTitleLabel);\n add(whoRanksBigBox);\n add(whoRanksBigResultsLabel);\n setPreferredSize(new Dimension(500,700));\n }", "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 }", "private static void createAndShowGUI() {\n\t\tJFrame frame = new JFrame(\"ComboBox2\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);;\n\t\t\n\t\t//create and set up the content pane\n\t\tJComponent content = new ComboboxDemo2();\n\t\tcontent.setOpaque(true);\n\t\tframe.setContentPane(content);\n\t\t\n\t\t//display the window\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t}", "private void initComponents() {\n jComboBox1 = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jButton1 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jCheckBox4 = new javax.swing.JCheckBox();\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel2.setText(\"Choose applications\");\n\n jLabel3.setText(\"League\");\n\n jCheckBox1.setText(\"jCheckBox1\");\n jCheckBox1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));\n\n jCheckBox2.setText(\"jCheckBox2\");\n jCheckBox2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n jCheckBox2.setMargin(new java.awt.Insets(0, 0, 0, 0));\n\n jCheckBox3.setText(\"jCheckBox3\");\n jCheckBox3.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n jCheckBox3.setMargin(new java.awt.Insets(0, 0, 0, 0));\n\n jButton1.setText(\"OK\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n\n jLabel4.setText(\"Launch applications\");\n\n jCheckBox4.setText(\"jCheckBox4\");\n jCheckBox4.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n jCheckBox4.setMargin(new java.awt.Insets(0, 0, 0, 0));\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton1))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jCheckBox1)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox3)\n .addComponent(jLabel2)\n .addComponent(jCheckBox4)))\n .addGroup(layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel1)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 88, Short.MAX_VALUE)\n .addComponent(jLabel4)))\n .addGap(37, 37, 37))\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 .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBox1)\n .addGap(18, 18, 18)\n .addComponent(jCheckBox2)\n .addGap(16, 16, 16)\n .addComponent(jCheckBox3)\n .addGap(15, 15, 15)\n .addComponent(jCheckBox4)\n .addGap(37, 37, 37)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel1))\n .addGap(51, 51, 51))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(229, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1)\n .addGap(25, 25, 25))\n );\n }", "private JPanel createSelectDocTypePanel(){\n\t\tJPanel toReturn = new JPanel(new GridBagLayout());\n\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\t\n\t\t//add document type JLabel\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\ttoReturn.add(new JLabel(translator.getTranslation(Tags.SELECT_DOCUMENT_TYPE)) , gbc);\n\t\t\t\n\t\t//add comboBox\n\t\tgbc.gridx++;\n\t\tgbc.weightx = 1;\n\t\tgbc.anchor = GridBagConstraints.WEST;\n\t\tgbc.insets.left = 2;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\ttoReturn.add(combBoxDocumentTypes, gbc);\n\t\t\n\t\t//action for add button\n\t\tAction addDocTypeAction = new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString docType = JOptionPane.showInputDialog(null, (Object)new JLabel(translator.getTranslation(Tags.INSERT_DOC_TYPE_LABEL)), \"\", \n\t\t\t\t\t\t JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tif(docType !=null && !docType.isEmpty()){\n\t\t\t\t\tcombBoxDocumentTypes.addItem(docType);\n\t\t\t\t\tcombBoxDocumentTypes.setSelectedItem(docType);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\taddDocumentTypeButton = new ToolbarButton(addDocTypeAction, false);\n\t\t\n\t\t// Get the image for toolbar button\n\t\tURL imageToLoad = getClass().getClassLoader().getResource(Images.ADD_ICON);\n\t\tif (imageToLoad != null) {\n\t\t\taddDocumentTypeButton.setText(\"\");\n\t\t\taddDocumentTypeButton.setIcon(ro.sync.ui.Icons.getIcon(imageToLoad.toString()));\n\t\t}\n\t\t\n\t\t//add the addButton\n\t\tgbc.gridx++;\n\t\tgbc.weightx = 0;\n\t\tgbc.insets.left = 0;\n\t\ttoReturn.add(addDocumentTypeButton,gbc);\n\t\t\n\t\t\n\t\t\n\t\t//action for remove button\n\t\t\tAction removeAction = new AbstractAction() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tcombBoxDocumentTypes.removeItem(combBoxDocumentTypes.getSelectedItem());\n\t\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tremoveDocumentTypeButton = new ToolbarButton(removeAction, false);\n\t\t\t\n\t\t\t// Get the image for toolbar button\n\t\t\timageToLoad = getClass().getClassLoader().getResource(Images.REMOVE_ICON);\n\t\t\tif (imageToLoad != null) {\n\t\t\t\tremoveDocumentTypeButton.setText(\"\");\n\t\t\t\tremoveDocumentTypeButton.setIcon(ro.sync.ui.Icons.getIcon(imageToLoad.toString()));\n\t\t\t}\n\t\t\t\n\t\t\t//add the addButton\n\t\t\tgbc.gridx++;\n\t\t\ttoReturn.add(removeDocumentTypeButton,gbc);\n\t\t\n\t\t\n\t\treturn toReturn;\n\t\t\n\t}", "public void iniciar_combo() {\n try {\n Connection cn = DriverManager.getConnection(mdi_Principal.BD, mdi_Principal.Usuario, mdi_Principal.Contraseña);\n PreparedStatement psttt = cn.prepareStatement(\"select nombre from proveedor \");\n ResultSet rss = psttt.executeQuery();\n\n cbox_proveedor.addItem(\"Seleccione una opción\");\n while (rss.next()) {\n cbox_proveedor.addItem(rss.getString(\"nombre\"));\n }\n \n PreparedStatement pstt = cn.prepareStatement(\"select nombre from sucursal \");\n ResultSet rs = pstt.executeQuery();\n\n \n cbox_sucursal.addItem(\"Seleccione una opción\");\n while (rs.next()) {\n cbox_sucursal.addItem(rs.getString(\"nombre\"));\n }\n \n PreparedStatement pstttt = cn.prepareStatement(\"select id_compraE from compra_encabezado \");\n ResultSet rsss = pstttt.executeQuery();\n\n \n cbox_compra.addItem(\"Seleccione una opción\");\n while (rsss.next()) {\n cbox_compra.addItem(rsss.getString(\"id_compraE\"));\n }\n \n PreparedStatement ps = cn.prepareStatement(\"select nombre_moneda from moneda \");\n ResultSet r = ps.executeQuery();\n\n \n cbox_moneda.addItem(\"Seleccione una opción\");\n while (r.next()) {\n cbox_moneda.addItem(r.getString(\"nombre_moneda\"));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }", "public SelectPanel() {\n initComponents();\n \n buttonSelection.add(jRadioButtonEverything);\n buttonSelection.add(jRadioButtonLinesCurves);\n buttonSelection.add(jRadioButtonControlPoints);\n buttonSelection.add(jRadioButtonAllItem);\n jRadioButtonControlPoints.setSelected(true);\n \n buttonLayer.add(jRadioButtonCurrentLayer);\n buttonLayer.add(jRadioButtonAllVisibleLayers);\n jRadioButtonCurrentLayer.setSelected(true);\n }", "public void buildGUI(){\n\n\t\tsetLayout(new BorderLayout());//Setting a borderlayout for the frame\n\t\toptionsPane.setBorder(BorderFactory.createLineBorder(Color.black));//This sets a border around the options panel\n\t\tadd(disclaimer, BorderLayout.SOUTH);//Adds the disclaimer panel to the frame\n\t\tadd(optionsPane, BorderLayout.LINE_START);//Adds the options panel to the frame\n\t\tadd(scrollbar);//Adds the scrollbar to the frame (contains the search frame)\n\t\toptionsPane.add(jpCmbBoxes, BorderLayout.NORTH);//Adds the combo boxes to the options pane\n\t\toptionsPane.add(pic, BorderLayout.SOUTH);//Adds the picture to the options pane\n\t\tdisclaimer.add(disclaim, BorderLayout.LINE_START);//Adds the disclaimer text to the disclaimer panel\n\t\t\n\t\t/*Sets borders around each of the combo boxes, buttons and the disclaimer text */\n\t\ttrackingRange.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tgenderBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tstageofLifeBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\ttagLocationBox.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchButton.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tdisclaimer.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\tsearchByName.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\tsearchResults.setLayout((new BoxLayout(searchResults, BoxLayout.PAGE_AXIS)));//Setting the layout for search results panel\n\t\tsearchResults.setBorder(BorderFactory.createLineBorder(Color.black));//Sets a border around the panel\n\t\t/*Adding components to the combo boxes panel */\n\t\tjpCmbBoxes.setLayout(new BoxLayout(jpCmbBoxes, BoxLayout.Y_AXIS));//Sets the layout for this panel\n\t\tjpCmbBoxes.add(subTitle);\n\t\tjpCmbBoxes.add(trackingRangeLabel);\n\t\tjpCmbBoxes.add(trackingRange);\n\t\tjpCmbBoxes.add(genderLabel);\n\t\tjpCmbBoxes.add(genderBox);\n\t\tjpCmbBoxes.add(stageOfLifeLabel);\n\t\tjpCmbBoxes.add(stageofLifeBox);\n\t\tjpCmbBoxes.add(tagLocationLabel);\n\t\tjpCmbBoxes.add(tagLocationBox);\n\t\tjpCmbBoxes.add(searchButton);\n\t\tjpCmbBoxes.add(searchByName);\n\t\t\n\t\ttry {//Importing the image for this panel\n\t\t\tsharkImage = ImageIO.read(new File(\"source/images/shark2.png\"));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tJLabel image = new JLabel(new ImageIcon(sharkImage));//Creating a label and adding the image to the label\n\t\tpic.add(image);//adding the label to the panel\n\t}", "public void panel3_arrangements(){\n p3_bus=new JLabel();\n p3_bus.setText(\"Select Bus id\");\n p3_bus.setBounds(50,0,200,50);\n p3_bus.setFont(new Font(\"Times New Roman\",Font.BOLD,20));\n p3_bus.setForeground(new Color(241, 241, 242));\n p3.add(p3_bus);\n \n busdate=new JComboBox(date_all);\n busdate.setBounds(360,12,130,30); \n busdate.addItemListener(this);\n busdate.setBackground(new Color(255, 168, 1));\n busdate.setForeground(new Color(255, 255, 255));\n busdate.setFont(new Font(\"Times New Roman\",Font.BOLD,16));\n p3.add(busdate);\n \n \n //creating combo box for panel 3\n bus_display=new JComboBox(bus_combo);\n bus_display.setFont(new Font(\"Times New Roman\",Font.BOLD,16));\n bus_display.setBounds(210,12,140,30);\n bus_display.setBackground(new Color(255, 168, 1));\n bus_display.setForeground(new Color(255, 255, 255));\n bus_display.addItemListener(this);\n p3.add(bus_display); \n \n \n \n \n }", "private void fillComboBox(ServiceManager serviceManager){\n for (String vendingMachineName : serviceManager.getVmManager().getVendingMachineNames()) {\n getItems().add(vendingMachineName); \n }\n }", "public L5MyList() {\n \n window.setLayout(new BorderLayout());\n window.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n panel = new JPanel();\n\n cBox = new JComboBox(colorNames);\n cBox.setMaximumRowCount(5);\n cBox.addItemListener(this);\n\n panel.add(cBox);\n window.add(panel, BorderLayout.CENTER);\n\n window.setSize(500, 300);\n window.setVisible(true);\n }", "public void panel2_arrangements(){\n p2_user_name=new JLabel();\n p2_user_name.setText(\"Select User name\");\n p2_user_name.setBounds(50,0,200,50);\n p2_user_name.setFont(new Font(\"Times New Roman\",Font.BOLD,20));\n p2_user_name.setForeground(new Color(241, 241, 242));\n p2.add(p2_user_name);\n \n namedate=new JComboBox(date_all);\n namedate.setBounds(360,12,130,30); \n namedate.addItemListener(this);\n namedate.setBackground(new Color(255, 168, 1));\n namedate.setForeground(new Color(255, 255, 255));\n namedate.setFont(new Font(\"Times New Roman\",Font.BOLD,16));\n p2.add(namedate);\n \n //creating combo box for panel 1\n p2_display_names=new JComboBox(vector_name);\n p2_display_names.setBounds(210,12,140,30); \n p2_display_names.setFont(new Font(\"Times New Roman\",Font.BOLD,16));\n p2_display_names.setBackground(new Color(255, 168, 1));\n p2_display_names.setForeground(new Color(255, 255, 255));\n p2_display_names.addItemListener(this);\n p2.add(p2_display_names); \n \n \n \n \n }", "private void initControlList() {\n this.controlComboBox.addItem(CONTROL_PANELS);\n //this.controlComboBox.addItem(PEER_TEST_CONTROL);\n //this.controlComboBox.addItem(DISAGGREGATION_CONTROL);\n this.controlComboBox.addItem(AXIS_CONTROL);\n this.controlComboBox.addItem(DISTANCE_CONTROL);\n this.controlComboBox.addItem(SITES_OF_INTEREST_CONTROL);\n this.controlComboBox.addItem(CVM_CONTROL);\n this.controlComboBox.addItem(X_VALUES_CONTROL);\n }", "private void createUIComponents() {\n this.selectorApplication = new AzureArtifactComboBox(project, true);\n this.selectorApplication.refreshItems();\n }", "public BrandsPanel()\n {\n initComponents();\n\n listBrands.setCellRenderer(new BrandsListCellRenderer());\n listBrands.getSelectionModel().addListSelectionListener(new ListSelectionListener()\n {\n @Override\n public void valueChanged(ListSelectionEvent e)\n {\n loadSelectedValue();\n }\n });\n\n panelBrandEdit.setVisible(false);\n }", "protected JComponent doMakeContents() {\n // Run super.doMakeContents()\n // It does some initialization on private components that we can't get at\n JComponent parentContents = super.doMakeContents();\n Element chooserNode = getXmlNode();\n \n String pathFromXml =\n XmlUtil.getAttribute(chooserNode, ATTR_PATH, (String)null);\n if (pathFromXml != null && Paths.get(pathFromXml).toFile().exists()) {\n setPath(pathFromXml);\n }\n \n JComponent typeComponent = new JPanel();\n if (XmlUtil.getAttribute(chooserNode, ATTR_DSCOMP, true)) {\n typeComponent = getDataSourcesComponent();\n }\n \n if (defaultDataSourceName != null) {\n typeComponent = new JLabel(defaultDataSourceName);\n McVGuiUtils.setLabelBold((JLabel) typeComponent, true);\n McVGuiUtils.setComponentHeight(typeComponent, new JComboBox());\n }\n \n // Create the different panels... extending classes can override these\n topPanel = getTopPanel();\n centerPanel = getCenterPanel();\n bottomPanel = getBottomPanel();\n \n JPanel innerPanel = centerPanel;\n if (topPanel != null && bottomPanel != null) {\n innerPanel = McVGuiUtils.topCenterBottom(topPanel, centerPanel, bottomPanel);\n } else if (topPanel != null) {\n innerPanel = McVGuiUtils.topBottom(topPanel, centerPanel, McVGuiUtils.Prefer.BOTTOM);\n } else if (bottomPanel != null) {\n innerPanel = McVGuiUtils.topBottom(centerPanel, bottomPanel, McVGuiUtils.Prefer.TOP);\n }\n // Start building the whole thing here\n JPanel outerPanel = new JPanel();\n \n JLabel typeLabel = McVGuiUtils.makeLabelRight(getDataSourcesLabel());\n \n JLabel statusLabelLabel = McVGuiUtils.makeLabelRight(\"\");\n \n McVGuiUtils.setLabelPosition(statusLabel, Position.RIGHT);\n McVGuiUtils.setComponentColor(statusLabel, TextColor.STATUS);\n \n JButton helpButton = McVGuiUtils.makeImageButton(ICON_HELP, \"Show help\");\n helpButton.setActionCommand(GuiUtils.CMD_HELP);\n helpButton.addActionListener(this);\n \n JButton refreshButton = McVGuiUtils.makeImageButton(ICON_REFRESH, \"Refresh\");\n refreshButton.setActionCommand(GuiUtils.CMD_UPDATE);\n refreshButton.addActionListener(this);\n \n McVGuiUtils.setButtonImage(loadButton, ICON_ACCEPT_SMALL);\n McVGuiUtils.setComponentWidth(loadButton, Width.DOUBLE);\n \n // This is how we know if the action was initiated by a button press\n loadButton.addActionListener(e -> {\n buttonPressed = true;\n Misc.runInABit(1000, () -> buttonPressed = false);\n });\n \n GroupLayout layout = new GroupLayout(outerPanel);\n outerPanel.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(LEADING)\n .addGroup(TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(helpButton)\n .addGap(GAP_RELATED)\n .addComponent(refreshButton)\n .addPreferredGap(RELATED)\n .addComponent(loadButton))\n .addGroup(LEADING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(LEADING)\n .addComponent(innerPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(typeLabel)\n .addGap(GAP_RELATED)\n .addComponent(typeComponent))\n .addGroup(layout.createSequentialGroup()\n .addComponent(statusLabelLabel)\n .addGap(GAP_RELATED)\n .addComponent(statusLabel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(BASELINE)\n .addComponent(typeLabel)\n .addComponent(typeComponent))\n .addPreferredGap(UNRELATED)\n .addComponent(innerPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(UNRELATED)\n .addGroup(layout.createParallelGroup(BASELINE)\n .addComponent(statusLabelLabel)\n .addComponent(statusLabel))\n .addPreferredGap(UNRELATED)\n .addGroup(layout.createParallelGroup(BASELINE)\n .addComponent(loadButton)\n .addComponent(refreshButton)\n .addComponent(helpButton))\n .addContainerGap())\n );\n outerPanel.addAncestorListener(this);\n return outerPanel;\n }", "private Panel designPanel() {\n Panel panel = new Panel();\n contentLayout = new FormLayout();\n wrapperLayout = new VerticalLayout();\n numberOfDatasetsBox = new ComboBox<>();\n numberOfReplicatesBox = new ComboBox<>(\"Select number of Replicates\");\n\n\n List<Integer> possibleDatasetNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfDatasetsBox.setItems(possibleDatasetNumber);\n\n List<Integer> possibleReplicateNumber =\n IntStream.rangeClosed(1, 100).boxed().collect(Collectors.toList());\n numberOfReplicatesBox.setItems(possibleReplicateNumber);\n\n datasetAccordion = new Accordion();\n datasetAccordion.setWidth(\"100%\");\n\n panel.setContent(wrapperLayout);\n return panel;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new JPanel();\n jButton1 = new javax.swing.JButton();\n visrusjComboBox = new javax.swing.JComboBox<>();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n quarantinejComboBox = new javax.swing.JComboBox<>();\n socialdistancingjComboBox = new javax.swing.JComboBox<>();\n jLabel5 = new javax.swing.JLabel();\n maskjComboBox = new javax.swing.JComboBox<>();\n jLabel6 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n populationjTextField = new javax.swing.JTextField();\n jLabel9 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jPanel2 = new JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setPreferredSize(new Dimension(1000, 800));\n\n jButton1.setText(\"Run\");\n jButton1.setAlignmentX(1.0F);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n visrusjComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n visrusjComboBox.setAlignmentX(1.0F);\n\n jLabel3.setText(\"Virus\");\n jLabel3.setAlignmentX(1.0F);\n\n jLabel4.setText(\"Quarantine\");\n jLabel4.setAlignmentX(1.0F);\n\n quarantinejComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n quarantinejComboBox.setAlignmentX(1.0F);\n\n socialdistancingjComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n socialdistancingjComboBox.setAlignmentX(1.0F);\n\n jLabel5.setText(\"Social distancing \");\n jLabel5.setAlignmentX(1.0F);\n\n maskjComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n maskjComboBox.setAlignmentX(1.0F);\n\n jLabel6.setText(\"Mask\");\n jLabel6.setAlignmentX(1.0F);\n\n jLabel8.setText(\"Population density\");\n\n jLabel9.setFont(new java.awt.Font(\"Lucida Grande\", 0, 10)); // NOI18N\n jLabel9.setText(\"Default value: 200\");\n\n jButton2.setText(\"Graphics\");\n jButton2.setAlignmentX(1.0F);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(populationjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(visrusjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(quarantinejComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(socialdistancingjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(maskjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {maskjComboBox, quarantinejComboBox, socialdistancingjComboBox, visrusjComboBox});\n\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(quarantinejComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(socialdistancingjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6)\n .addComponent(maskjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(visrusjComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(populationjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addComponent(jLabel9)\n .addContainerGap(13, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 352, 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(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayList<String>();\n \tgladiatorLore.add(\"FIGHT TO THE DEATH AND WIN YOUR FREEDOM\");\n \tgladiatorLore.add(\"GOOD LUCK WARRIOR!\");\n \tInventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, \"GLADIATOR\", gladiatorLore, 1, true, 1);\n \tinventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);\n \t\n \tchooseGameUI = new GUIInventory(plugin, \"MINIGAMES\", inventoryStuff, 3);\n }", "public void addPanelControls() {\n\t\tlist_sort = new JComboBox<>(new String[] { \"MSSV\", \"HoTen\", \"NTNS\" });\r\n\t\tbtn_sapxep = new JButton(\"Sap xep\");\r\n\t\tbtn_them = new JButton(\"Them\");\r\n\t\tbtn_xoa = new JButton(\"Xoa\");\r\n\t\tbtn_save = new JButton(\"Save\");\r\n\t\tbtn_load = new JButton(\"Load\");\r\n\r\n\t\tJPanel mControlPanel = new JPanel(new GridLayout(5, 1));\r\n\t\tmControlPanel.add(btn_them);\r\n\t\tmControlPanel.add(btn_xoa);\r\n\t\tJPanel sapxepPanel = new JPanel();\r\n\t\tsapxepPanel.add(list_sort);\r\n\t\tsapxepPanel.add(btn_sapxep);\r\n\t\tmControlPanel.add(sapxepPanel);\r\n\t\tmControlPanel.add(btn_save);\r\n\t\tmControlPanel.add(btn_load);\r\n\r\n\t\tmControlPanel.setPreferredSize(new Dimension(380, 200));\r\n\t\tmControlPanel.setBorder(new TitledBorder(\"Controls\"));\r\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tc.weightx = 0.5;\r\n\t\tc.gridx = 1;\r\n\t\tc.gridy = 0;\r\n\t\tpanel.add(mControlPanel,c);\r\n\t}", "public JPanel createPersonGuessPanel() {\n\t\tJPanel panel = new JPanel();\n\t\tJComboBox<String> comboBox = new JComboBox<String>();\n\t\tpanel.setBorder(new TitledBorder(new EtchedBorder(), \"Person Guess\"));\n\t\tcomboBox.addItem(\"Unsure\");\n\t\tcomboBox.addItem(\"Miss Scarlet\");\n\t\tcomboBox.addItem(\"Colonel Mustard\");\n\t\tcomboBox.addItem(\"Mr. Green\");\n\t\tcomboBox.addItem(\"Mrs. White\");\n\t\tcomboBox.addItem(\"Mrs. Peacock\");\n\t\tcomboBox.addItem(\"Professor Plum\");\n\t\tpanel.add(comboBox);\n\t\treturn panel;\n\t}", "protected void displayComboBox() {\n openingLine = new JLabel(\"Select \" + type + \":\");\n window = new JFrame(frameTitle);\n chooseBox = new JComboBox(range);\n chooseBox.addActionListener(this);\n window.setVisible(true);\n window.setLayout(new BoxLayout(window.getContentPane(), BoxLayout.PAGE_AXIS));\n window.setMinimumSize(new Dimension(300, 100));\n window.setLocationRelativeTo(null);\n confirm = new JButton(\"Confirm\");\n confirm.addActionListener(this);\n confirm.setActionCommand(\"confirm\");\n openingLine = new JLabel(\"Select \" + type + \":\");\n JPanel chooseBoxPane = new JPanel();\n chooseBoxPane.add(openingLine);\n chooseBoxPane.add(chooseBox);\n window.add(chooseBoxPane);\n window.add(confirm);\n\n }", "private JPanel createAvailableConditionsSetPanel() {\n\t\tJPanel toReturn = new JPanel(new GridBagLayout());\n\n\t\t\n\t\t// Action for show profiling preferences.\n\t\t AbstractAction showProfilingPageAction = new AbstractAction(\"Profiling Preferences\") {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tPluginWorkspaceProvider.getPluginWorkspace().showPreferencesPages(new String[] { \"profiling.conditions\" },\n\t\t\t\t\t\t\"profiling.conditions\", true);\n\t\t\t\n\t\t\t\t//update the panel \n\t\t\t\tcomboBoxUpdate();\n\t\t\t}\n\t\t};\n\n\t\t\n\t\t // Button for display profiling preferences\n\t\t ToolbarButton buttonToProfiling = new ToolbarButton(showProfilingPageAction, true);\n\t\t\n\t\t\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\t\n\t\t//add the checkBox\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.weightx = 1;\n\t\ttoReturn.add(useAllCondSetsRBtn, gbc);\n\t\t\n\t\t//add the button\n\t\tgbc.gridx = 1;\n\t\tgbc.weightx = 0;\n\n\t\tURL imageToLoad = getClass().getClassLoader().getResource(Images.PREFERENCES_ICON);\n\t\tif (imageToLoad != null) {\n\t\t\tbuttonToProfiling.setIcon(ro.sync.ui.Icons.getIcon(imageToLoad.toString()));\n\t\t\tbuttonToProfiling.setText(\"\");\n\t\t} else {\n\t\t\tbuttonToProfiling.setText(\"PC\");\n\t\t}\n\t\ttoReturn.add(buttonToProfiling, gbc);\n\n\t\treturn toReturn;\n\t}", "private void createWidgets() {\n\t\tgrid = new GridPane();\n\t\ttxtNickname = new TextField();\n\t\ttxtPort = new TextField();\n\t\ttxtAdress = new TextField();\n\n\t\tlblNick = new Label(\"Nickname\");\n\t\tlblNickTaken = new Label();\n\t\tlblPort = new Label(\"Port\");\n\t\tlblAdress = new Label(\"Adress\");\n\t\tlblCardDesign = new Label(\"Carddesign\");\n\n\t\tbtnLogin = new Button(\"\");\n\t\timageStart = new Image(BTNSTARTWOOD, 85, 35, true, true);\n\t\timvStart = new ImageView();\n\n\t\tcardDesignOptions = FXCollections.observableArrayList(\n\t\t\t\t\"original design\", \"pirate design\", \"graveyard design\");\n\t\tcomboBoxCardDesign = new ComboBox<String>(cardDesignOptions);\n\n\t\tcomboBoxCardDesign\n\t\t\t\t.setCellFactory(new Callback<ListView<String>, ListCell<String>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ListCell<String> call(ListView<String> list) {\n\t\t\t\t\t\treturn new ExtCell();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t}", "void createMenu4Filled(Container cp) {\r\n JPanel pn3 = new JPanel(); // create a panel\r\n pn3.setLayout(new FlowLayout(FlowLayout.LEFT)); // set the layout\r\n\r\n JLabel lb3 = new JLabel(labelStr[2]); // create label \"Filled\"\r\n lb3.setForeground(Color.black); // set the string color to black\r\n pn3.add(lb3); // add the label to the panel\r\n\r\n cb3 = new JComboBox<String>(); // create a combo box\r\n cb3.setEditable(false); // set the attribute editable false\r\n for (int i=0; i<strFill.length; i++) {\r\n // repeat for the number of the items\r\n cb3.addItem(strFill[i]); // set the string of the item\r\n }\r\n\r\n cb3.addActionListener(this); // add the action listener to the combo box\r\n pn3.add(cb3); // add the combo box to the panel\r\n cp.add(pn3); // add the panel to the container\r\n }", "@Override\n\tprotected JComponent buildPanel() {\n\t\tcategory.setModel(new ListComboBoxModel(categoryService.getAll()));\n\t\t// Add auto-completion to author combo, limit max results to 1000 and order data by surname\n\t\tFilterAutoCompletionListener acl = new FilterAutoCompletionListener(author, 1000, \"surname\");\n\t\tacl.setPersistentService(authorService);\n\t\tauthor.setEditable(true);\n\t\t// Create a Box with author combo and add button\n\t\tBox authorBox = Box.createHorizontalBox();\n\t\tauthorBox.add(author);\n\t\tauthorBox.add(Box.createHorizontalStrut(5));\n\t\tauthorBox.add(new JButton(new AddAuthorAction(FormUtils.getIcon(ADD_ICON))));\n\t\t// Build Form with a BoxFormBuilder\n\t\tBoxFormBuilder fb = new BoxFormBuilder();\n\t\tfb.add(getMessage(\"Title\"), name);\n\t\tfb.row();\n\t\tfb.add(getMessage(\"Author\"), authorBox);\t\n\t\tfb.row();\n\t\tfb.add(getMessage(\"ISBN\"), isbn);\n\t\tfb.row();\n\t\tfb.add(getMessage(\"PublishedDate\"), publishedDate);\n\t\tfb.row();\n\t\tfb.add(getMessage(\"Category\"), category);\n\t\t\n\t\tJComponent form = fb.getForm();\n\t\tform.setBorder(FormUtils.createTitledBorder(getMessage(\"Book\")));\n\t\treturn form;\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n btnGo = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n AirlinerBox = new javax.swing.JComboBox();\n btnManager = new javax.swing.JButton();\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"Airliner Name\");\n\n btnGo.setText(\"GO>>\");\n btnGo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGoActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel2.setText(\"Airliner Login\");\n\n AirlinerBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n AirlinerBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n AirlinerBoxActionPerformed(evt);\n }\n });\n\n btnManager.setText(\"I'm the Manager\");\n btnManager.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnManagerActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(140, 140, 140)\n .addComponent(btnManager)\n .addContainerGap(116, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(80, 80, 80)\n .addComponent(jLabel2))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(11, 11, 11)\n .addComponent(AirlinerBox, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(20, 20, 20)\n .addComponent(btnGo)))\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(btnManager)\n .addContainerGap(233, Short.MAX_VALUE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGap(51, 51, 51)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(AirlinerBox, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnGo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n }", "public void initialize ()\n\t{\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tsetBounds(100, 100, 450, 300);\n\t\t//add main panel\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\n\t\t//add title label\n\t\tJLabel TitleLabel = new JLabel(\"Add a Daily Service to this Horse\");\n\t\tTitleLabel.setBounds(28, 6, 416, 31);\n\t\tcontentPane.add(TitleLabel);\n\n\t\t//add combo box\n\n\t\ttry {\n\t\t\tm.connect();\n\t\t\tservices = m.getAllTypesOfServices();\n\t\t\tm.disconnect();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] chooserOptions= new String[services.size()];\n\n\t\tfor(int i = 0; i<services.size(); i++)\n\t\t{\n\t\t\tString thisS=services.get(i);\n\t\t\tString [] thisService=thisS.split(\",\");\n\n\t\t\tchooserOptions[i] = thisService[0]+ \" - $\"+ thisService[2];\n\n\t\t}\n\n\t\t//add buttons\n\t\tAddServiceButton = new JButton(\"Add Service\");\n\t\tAddServiceButton.setBounds(147, 229, 117, 29);\n\t\tAddServiceButton.addActionListener(this);\n\t\tcontentPane.add(AddServiceButton);\n\n\t\tJLabel StartDateLabel = new JLabel(\"Start Date:\");\n\t\tStartDateLabel.setBounds(17, 49, 94, 16);\n\t\tcontentPane.add(StartDateLabel);\n\n\t\t//add text fields\n\t\tStartDateMonth = new JTextField();\n\t\tStartDateMonth.setText(\"MM\");\n\t\tStartDateMonth.setBounds(123, 49, 41, 28);\n\t\tcontentPane.add(StartDateMonth);\n\t\tStartDateMonth.setColumns(10);\n\n\t\tJLabel descriptionLabel = new JLabel(\"Description\");\n\t\tdescriptionLabel.setBounds(17, 147, 94, 16);\n\t\tcontentPane.add(descriptionLabel);\n\n\t\tDescriptionField = new JTextField();\n\t\tDescriptionField.setBounds(137, 141, 134, 28);\n\t\tcontentPane.add(DescriptionField);\n\t\tDescriptionField.setColumns(10);\n\n\t\tlabel = new JLabel(\"/\");\n\t\tlabel.setBounds(176, 49, 22, 28);\n\t\tcontentPane.add(label);\n\n\t\tStartDateDay = new JTextField();\n\t\tStartDateDay.setText(\"DD\");\n\t\tStartDateDay.setColumns(10);\n\t\tStartDateDay.setBounds(186, 49, 41, 28);\n\t\tcontentPane.add(StartDateDay);\n\n\t\tlabel_1 = new JLabel(\"/\");\n\t\tlabel_1.setBounds(249, 49, 22, 28);\n\t\tcontentPane.add(label_1);\n\n\t\tStartDateYear = new JTextField();\n\t\tStartDateYear.setText(\"YYYY\");\n\t\tStartDateYear.setColumns(10);\n\t\tStartDateYear.setBounds(278, 49, 72, 28);\n\t\tcontentPane.add(StartDateYear);\n\n\t\tlblEndDate = new JLabel(\"End Date:\");\n\t\tlblEndDate.setBounds(17, 95, 94, 16);\n\t\tcontentPane.add(lblEndDate);\n\n\t\tEndDateMonth = new JTextField();\n\t\tEndDateMonth.setText(\"MM\");\n\t\tEndDateMonth.setColumns(10);\n\t\tEndDateMonth.setBounds(123, 89, 41, 28);\n\t\tcontentPane.add(EndDateMonth);\n\n\t\tlabel_2 = new JLabel(\"/\");\n\t\tlabel_2.setBounds(176, 89, 22, 28);\n\t\tcontentPane.add(label_2);\n\n\t\tEndDateDay = new JTextField();\n\t\tEndDateDay.setText(\"DD\");\n\t\tEndDateDay.setColumns(10);\n\t\tEndDateDay.setBounds(186, 89, 41, 28);\n\t\tcontentPane.add(EndDateDay);\n\n\t\tlabel_3 = new JLabel(\"/\");\n\t\tlabel_3.setBounds(249, 89, 22, 28);\n\t\tcontentPane.add(label_3);\n\n\t\tEndDateYear = new JTextField();\n\t\tEndDateYear.setText(\"YYYY\");\n\t\tEndDateYear.setColumns(10);\n\t\tEndDateYear.setBounds(278, 89, 72, 28);\n\t\tcontentPane.add(EndDateYear);\n\n\t\tlblDailyPrice = new JLabel(\"Daily Price\");\n\t\tlblDailyPrice.setBounds(17, 186, 94, 16);\n\t\tcontentPane.add(lblDailyPrice);\n\n\t\tDailyPrice = new JTextField();\n\t\tDailyPrice.setColumns(10);\n\t\tDailyPrice.setBounds(137, 181, 134, 28);\n\t\tcontentPane.add(DailyPrice);\n\n\n\n\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void switchFrontEnd() {\n\t\tfor(ABoat b : ABmap.instance().boats) {\n\t\t\t((JComboBox<String>)components.get(\"nameComboBox\")).addItem(b.name);\n\t\t}\n\t\t((JPanel)components.get(\"initPanel\")).setVisible(false);\n\t\t((JPanel)components.get(\"controlPanel\")).setBounds(931, 11, 253, 185);\n\t\t((JPanel)components.get(\"controlPanel\")).setVisible(true);\n\t\t((JPanel)components.get(\"generalInfoPanel\")).setBounds(931, 230, 253, 208);\n\t\t((JPanel)components.get(\"generalInfoPanel\")).setVisible(true);\n\t\t((JPanel)components.get(\"boatInfoPanel\")).setBounds(931, 450, 253, 252);\n\t\t((JPanel)components.get(\"boatInfoPanel\")).setVisible(true);\n\t}", "public ChampionSelectGUI() {\n\t\tsetupPanel();\n\t\tsetupScroll();\n\t\tsetupCenterPanel();\n\t\tsetupBottomPanel();\n\t\tsetupSidePanels();\n\t\taddWindowListener(this);\n\t}", "private JPanel createPanelStoredServices() {\n\t\t// Fabriken holen\n\t\tGridBagConstraintsFactory gbcf = GridBagConstraintsFactory.getInstance();\n\t\tWidgetFactory wf = WidgetFactory.getInstance();\n\t\t// Widgets erzeugen\n\t\tJPanel panel = wf.getPanel(\"PanelStoredServices\");\n\t\tserviceAbbreviationFilter = wf.getTextField(\"FieldServiceAbbreviation\");\n\t\tserviceAbbreviationFilter.addKeyListener(new KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\tupdateSearch();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t}\n\n\t\t});\n\t\tserviceAbbreviationFilterCaseSensitive = wf\n\t\t\t\t.getCheckBox(\"CheckBoxServiceAbbreviationFilterCaseSensitive\");\n\t\tserviceAbbreviationFilterCaseSensitive.addItemListener(new ItemListener() {\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent event) {\n\t\t\t\tupdateSearch();\n\t\t\t}\n\t\t});\n\t\tserviceAbbreviationFilterAsRegex = wf.getCheckBox(\"CheckBoxServiceAbbreviationFilterAsRegex\");\n\t\tserviceAbbreviationFilterAsRegex.addItemListener(new ItemListener() {\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent event) {\n\t\t\t\tupdateSearch();\n\t\t\t}\n\t\t});\n\t\tregexContainsErrors = wf.getLabel(\"LabelRegexContainsErrors\");\n\t\tregexContainsErrors.setForeground(Color.RED);\n\t\ttableModelStoredServices = new StoredServicesTableModel(((PswGenCtl) ctl).getServices().getServices(),\n\t\t\t\tnew String[] { ctl.getGuiText(\"LabelServiceAbbreviation\"),\n\t\t\t\t\t\tctl.getGuiText(\"LabelAdditionalInfo\"), ctl.getGuiText(\"LabelUseOldPassphrase\"),\n\t\t\t\t\t\tctl.getGuiText(\"LabelLoginUrl\") });\n\t\ttableStoredServices = wf.getTable(\"TableStoredServices\", tableModelStoredServices);\n\t\ttableStoredServices.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\ttableRowSorter = new TableRowSorter<StoredServicesTableModel>(tableModelStoredServices);\n\t\ttableRowSorter.setComparator(StoredServicesTableModel.COL_ADDITIONAL_INFO, new Comparator<String>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(String leftString, String rightString) {\n\t\t\t\ttry {\n\t\t\t\t\tDate leftDate = CoreConstants.DATE_FORMAT_de_DE.parse(leftString);\n\t\t\t\t\tDate rightDate = CoreConstants.DATE_FORMAT_de_DE.parse(rightString);\n\t\t\t\t\treturn leftDate.compareTo(rightDate);\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\treturn leftString.compareTo(rightString);\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\ttableStoredServices.setRowSorter(tableRowSorter);\n\t\t// Ask to be notified of selection changes.\n\t\tListSelectionModel rowSM = tableStoredServices.getSelectionModel();\n\t\trowSM.addListSelectionListener(new ListSelectionListener() {\n\t\t\t@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent event) {\n\t\t\t\tif (event.getValueIsAdjusting()) {// Ignore extra messages.\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tListSelectionModel lsm = (ListSelectionModel) event.getSource();\n\t\t\t\tif (!lsm.isSelectionEmpty()) { // Ist überhaupt eine Zeile ausgewählt?\n\t\t\t\t\tint selectedRow = lsm.getMinSelectionIndex();\n\t\t\t\t\tint modelRow = tableStoredServices.convertRowIndexToModel(selectedRow);\n\t\t\t\t\tString serviceAbbreviation = tableModelStoredServices.getServiceInfoAt(modelRow)\n\t\t\t\t\t\t\t.getServiceAbbreviation();\n\t\t\t\t\t((PswGenCtl) ctl).valueChangedLoadServiceFromList(me, serviceAbbreviation);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tscrollableTableStoredServices = new JScrollPane(tableStoredServices);\n\t\t// tableStoredServices.setFillsViewportHeight(true);\n\t\t// Widgets zufügen, erste Zeile\n\t\tint row = 0;\n\t\tpanel.add(serviceAbbreviationFilter, gbcf.getFieldConstraints(0, row, 4, 1));\n\t\t// Nächste Zeile zum einfügen von Groß-/Kleinschreibung\n\t\trow++;\n\t\tpanel.add(serviceAbbreviationFilterCaseSensitive, gbcf.getFieldConstraints(0, row, 2, 1));\n\t\t// Nächste Zeile zum einfügen der Regex-Suche\n\t\trow++;\n\t\tpanel.add(serviceAbbreviationFilterAsRegex, gbcf.getFieldConstraints(0, row, 2, 1));\n\t\tpanel.add(regexContainsErrors, gbcf.getFieldConstraints(GridBagConstraints.RELATIVE, row, 2, 1));\n\t\t// Widgets zufügen, nächste Zeile\n\t\trow++;\n\t\tpanel.add(scrollableTableStoredServices, gbcf.getTableConstraints(0, row, 4, 1));\n\n\t\t// Anzeige des regex-errors deaktivieren\n\t\tshowRegexErrorMessage(false);\n\n\t\t// Panel zurückgeben\n\t\treturn panel;\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabelStatus = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jComboBoxLookAndFeel = new javax.swing.JComboBox();\n jToolBar1 = new javax.swing.JToolBar();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jSeparator14 = new javax.swing.JToolBar.Separator();\n jButton7 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n jSeparator15 = new javax.swing.JToolBar.Separator();\n jButton9 = new javax.swing.JButton();\n jButton10 = new javax.swing.JButton();\n jButton12 = new javax.swing.JButton();\n jSeparator16 = new javax.swing.JToolBar.Separator();\n jButton13 = new javax.swing.JButton();\n jSeparator2 = new javax.swing.JToolBar.Separator();\n jButton15 = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem5 = new javax.swing.JMenuItem();\n jSeparator3 = new javax.swing.JPopupMenu.Separator();\n jMenuItem17 = new javax.swing.JMenuItem();\n jSeparator4 = new javax.swing.JPopupMenu.Separator();\n jMenuItem16 = new javax.swing.JMenuItem();\n jSeparator5 = new javax.swing.JPopupMenu.Separator();\n jMenuItem9 = new javax.swing.JMenuItem();\n jSeparator6 = new javax.swing.JPopupMenu.Separator();\n jMenuItem21 = new javax.swing.JMenuItem();\n jSeparator18 = new javax.swing.JPopupMenu.Separator();\n jMenuItem15 = new javax.swing.JMenuItem();\n jSeparator17 = new javax.swing.JPopupMenu.Separator();\n jMenuItem11 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n jMenuItem8 = new javax.swing.JMenuItem();\n jSeparator7 = new javax.swing.JPopupMenu.Separator();\n jMenuItem19 = new javax.swing.JMenuItem();\n jSeparator8 = new javax.swing.JPopupMenu.Separator();\n jMenuItem18 = new javax.swing.JMenuItem();\n jSeparator10 = new javax.swing.JPopupMenu.Separator();\n jMenuItem20 = new javax.swing.JMenuItem();\n jSeparator11 = new javax.swing.JPopupMenu.Separator();\n jMenuItem13 = new javax.swing.JMenuItem();\n jSeparator19 = new javax.swing.JPopupMenu.Separator();\n jMenuItem14 = new javax.swing.JMenuItem();\n jSeparator9 = new javax.swing.JPopupMenu.Separator();\n jMenuItem12 = new javax.swing.JMenuItem();\n jMenu5 = new javax.swing.JMenu();\n jMenuItem4 = new javax.swing.JMenuItem();\n jSeparator12 = new javax.swing.JPopupMenu.Separator();\n jMenuItem1 = new javax.swing.JMenuItem();\n jSeparator13 = new javax.swing.JPopupMenu.Separator();\n jMenuItem3 = new javax.swing.JMenuItem();\n jMenu3 = new javax.swing.JMenu();\n jMenuItem23 = new javax.swing.JMenuItem();\n jMenu4 = new javax.swing.JMenu();\n jMenuItem7 = new javax.swing.JMenuItem();\n jMenuItem6 = new javax.swing.JMenuItem();\n jMenuItem22 = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JPopupMenu.Separator();\n jMenuItem2 = new javax.swing.JMenuItem();\n jMenu6 = new javax.swing.JMenu();\n jMenuItem10 = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Página Principal do Sistema\");\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/imagemTelaInicial.jpg\"))); // NOI18N\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 50, 660, 330));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 3, 14)); // NOI18N\n jLabel2.setText(\"Seja Bem Vindo ao Sistema para Barzinhos\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 50, 307, -1));\n\n jLabelStatus.setText(\"Barra de status\");\n jLabelStatus.setAlignmentY(0.0F);\n\n jLabel3.setText(\"LookAndFeel\");\n\n jComboBoxLookAndFeel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxLookAndFeelActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(jLabelStatus)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 147, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jComboBoxLookAndFeel, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addComponent(jLabelStatus))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jComboBoxLookAndFeel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 360, 660, -1));\n\n jToolBar1.setRollover(true);\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/bebidas.png\"))); // NOI18N\n jButton1.setToolTipText(\"Cadastrar Bebidas\");\n jButton1.setBorder(null);\n jButton1.setBorderPainted(false);\n jButton1.setFocusable(false);\n jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jButton1MouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jButton1MouseExited(evt);\n }\n });\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton1);\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/funcionarios.png\"))); // NOI18N\n jButton2.setToolTipText(\"Cadastrar Funcionários\");\n jButton2.setBorder(null);\n jButton2.setBorderPainted(false);\n jButton2.setFocusable(false);\n jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jButton2MouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jButton2MouseExited(evt);\n }\n });\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton2);\n\n jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/comidas.png\"))); // NOI18N\n jButton4.setToolTipText(\"Cadastrar Comidas\");\n jButton4.setBorder(null);\n jButton4.setBorderPainted(false);\n jButton4.setFocusable(false);\n jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton4.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jButton4MouseEntered(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n jButton4MouseExited(evt);\n }\n });\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton4);\n\n jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/pedidos.jpg\"))); // NOI18N\n jButton5.setToolTipText(\"Cadastrar Pedidos\");\n jButton5.setBorder(null);\n jButton5.setBorderPainted(false);\n jButton5.setFocusable(false);\n jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jButton5MouseEntered(evt);\n }\n });\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton5);\n\n jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/prato.png\"))); // NOI18N\n jButton6.setToolTipText(\"Cadastrar Pratos\");\n jButton6.setBorder(null);\n jButton6.setBorderPainted(false);\n jButton6.setFocusable(false);\n jButton6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton6.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton6.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jButton6MouseEntered(evt);\n }\n });\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton6);\n jToolBar1.add(jSeparator14);\n\n jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/reiniciar.png\"))); // NOI18N\n jButton7.setToolTipText(\"Reiniciar Persistência\");\n jButton7.setBorder(null);\n jButton7.setBorderPainted(false);\n jButton7.setFocusable(false);\n jButton7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton7.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton7.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jButton7MouseEntered(evt);\n }\n });\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton7);\n\n jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/conf.png\"))); // NOI18N\n jButton8.setToolTipText(\"Reiniciar Persistência\");\n jButton8.setBorder(null);\n jButton8.setBorderPainted(false);\n jButton8.setFocusable(false);\n jButton8.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton8.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton8.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jButton8MouseEntered(evt);\n }\n });\n jButton8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton8ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton8);\n jToolBar1.add(jSeparator15);\n\n jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/calcular.png\"))); // NOI18N\n jButton9.setToolTipText(\"Calcular Conta\");\n jButton9.setBorder(null);\n jButton9.setBorderPainted(false);\n jButton9.setFocusable(false);\n jButton9.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton9.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton9.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jButton9MouseEntered(evt);\n }\n });\n jButton9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton9ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton9);\n\n jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/emitirConta.png\"))); // NOI18N\n jButton10.setToolTipText(\"Emitir Conta\");\n jButton10.setBorder(null);\n jButton10.setBorderPainted(false);\n jButton10.setFocusable(false);\n jButton10.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton10.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton10.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n jButton10MouseEntered(evt);\n }\n });\n jButton10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton10ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton10);\n\n jButton12.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/mesa.png\"))); // NOI18N\n jButton12.setToolTipText(\"Liberar Mesa\");\n jButton12.setBorder(null);\n jButton12.setBorderPainted(false);\n jButton12.setFocusable(false);\n jButton12.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton12.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(jButton12);\n jToolBar1.add(jSeparator16);\n\n jButton13.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/ajuda.png\"))); // NOI18N\n jButton13.setToolTipText(\"Ajuda\");\n jButton13.setBorder(null);\n jButton13.setBorderPainted(false);\n jButton13.setFocusable(false);\n jButton13.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton13.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton13.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton13ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton13);\n jToolBar1.add(jSeparator2);\n\n jButton15.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/sair.jpg\"))); // NOI18N\n jButton15.setToolTipText(\"Sair\");\n jButton15.setBorder(null);\n jButton15.setBorderPainted(false);\n jButton15.setFocusable(false);\n jButton15.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton15.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton15.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton15ActionPerformed(evt);\n }\n });\n jToolBar1.add(jButton15);\n\n getContentPane().add(jToolBar1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 660, 50));\n\n jMenu1.setMnemonic('c');\n jMenu1.setText(\"Cadastro\");\n\n jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/bebidas.png\"))); // NOI18N\n jMenuItem5.setText(\"Bebidas\");\n jMenuItem5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem5ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem5);\n jMenu1.add(jSeparator3);\n\n jMenuItem17.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem17.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/funcionarios.png\"))); // NOI18N\n jMenuItem17.setText(\"Funcionários\");\n jMenuItem17.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem17ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem17);\n jMenu1.add(jSeparator4);\n\n jMenuItem16.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem16.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/comidas.png\"))); // NOI18N\n jMenuItem16.setText(\"Comidas\");\n jMenuItem16.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem16ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem16);\n jMenu1.add(jSeparator5);\n\n jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/pedidos.jpg\"))); // NOI18N\n jMenuItem9.setText(\"Pedidos Bebidas\");\n jMenuItem9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem9ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem9);\n jMenu1.add(jSeparator6);\n\n jMenuItem21.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_BACK_SPACE, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem21.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/pedidos.jpg\"))); // NOI18N\n jMenuItem21.setText(\"Pedidos de Pratos\");\n jMenuItem21.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem21ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem21);\n jMenu1.add(jSeparator18);\n\n jMenuItem15.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem15.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/prato.png\"))); // NOI18N\n jMenuItem15.setText(\"Pratos\");\n jMenuItem15.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem15ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem15);\n jMenu1.add(jSeparator17);\n\n jMenuItem11.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem11.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/mesa.png\"))); // NOI18N\n jMenuItem11.setText(\"Mesa\");\n jMenuItem11.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem11ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem11);\n\n jMenuBar1.add(jMenu1);\n\n jMenu2.setMnemonic('l');\n jMenu2.setText(\"Consulta\");\n\n jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/bebidas.png\"))); // NOI18N\n jMenuItem8.setText(\"Bebidas\");\n jMenuItem8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem8ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem8);\n jMenu2.add(jSeparator7);\n\n jMenuItem19.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem19.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/funcionarios.png\"))); // NOI18N\n jMenuItem19.setText(\"Funcionários\");\n jMenuItem19.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem19ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem19);\n jMenu2.add(jSeparator8);\n\n jMenuItem18.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem18.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/comidas.png\"))); // NOI18N\n jMenuItem18.setText(\"Comidas\");\n jMenuItem18.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem18ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem18);\n jMenu2.add(jSeparator10);\n\n jMenuItem20.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem20.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/pedidos.jpg\"))); // NOI18N\n jMenuItem20.setText(\"Pedidos de Bebidas\");\n jMenuItem20.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem20ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem20);\n jMenu2.add(jSeparator11);\n\n jMenuItem13.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_BACK_SPACE, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem13.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/pedidos.jpg\"))); // NOI18N\n jMenuItem13.setText(\"Pedidos de Pratos\");\n jMenuItem13.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem13ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem13);\n jMenu2.add(jSeparator19);\n\n jMenuItem14.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem14.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/prato.png\"))); // NOI18N\n jMenuItem14.setText(\"Pratos \");\n jMenuItem14.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem14ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem14);\n jMenu2.add(jSeparator9);\n\n jMenuItem12.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem12.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/mesa.png\"))); // NOI18N\n jMenuItem12.setText(\"Mesa\");\n jMenuItem12.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem12ActionPerformed(evt);\n }\n });\n jMenu2.add(jMenuItem12);\n\n jMenuBar1.add(jMenu2);\n\n jMenu5.setMnemonic('a');\n jMenu5.setText(\"Opções Mesa\");\n\n jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK));\n jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/calcular.png\"))); // NOI18N\n jMenuItem4.setText(\"Calcular Conta\");\n jMenuItem4.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n jMenuItem4MousePressed(evt);\n }\n });\n jMenuItem4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem4ActionPerformed(evt);\n }\n });\n jMenu5.add(jMenuItem4);\n jMenu5.add(jSeparator12);\n\n jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.ALT_MASK));\n jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/emitirConta.png\"))); // NOI18N\n jMenuItem1.setText(\"Abrir Mesa\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu5.add(jMenuItem1);\n jMenu5.add(jSeparator13);\n\n jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.ALT_MASK));\n jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/mesa.png\"))); // NOI18N\n jMenuItem3.setText(\"Liberar Mesa\");\n jMenuItem3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem3ActionPerformed(evt);\n }\n });\n jMenu5.add(jMenuItem3);\n\n jMenuBar1.add(jMenu5);\n\n jMenu3.setText(\"Relatórios\");\n\n jMenuItem23.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.CTRL_MASK));\n jMenuItem23.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/consultar.jpg\"))); // NOI18N\n jMenuItem23.setText(\"Gerar relatório de pedidos de bebidas em aberto\");\n jMenuItem23.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem23ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem23);\n\n jMenuBar1.add(jMenu3);\n\n jMenu4.setMnemonic('s');\n jMenu4.setText(\"Sistema\");\n\n jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/reiniciar.png\"))); // NOI18N\n jMenuItem7.setText(\"Reiniciar persistência\");\n jMenuItem7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem7ActionPerformed(evt);\n }\n });\n jMenu4.add(jMenuItem7);\n\n jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F3, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/conf.png\"))); // NOI18N\n jMenuItem6.setText(\"Configurar persistência\");\n jMenuItem6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem6ActionPerformed(evt);\n }\n });\n jMenu4.add(jMenuItem6);\n\n jMenuItem22.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem22.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/mais.gif\"))); // NOI18N\n jMenuItem22.setText(\"Inserções Válidas automaticamente\");\n jMenuItem22.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem22ActionPerformed(evt);\n }\n });\n jMenu4.add(jMenuItem22);\n jMenu4.add(jSeparator1);\n\n jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));\n jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/sair.jpg\"))); // NOI18N\n jMenuItem2.setText(\"Sair\");\n jMenuItem2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem2ActionPerformed(evt);\n }\n });\n jMenu4.add(jMenuItem2);\n\n jMenuBar1.add(jMenu4);\n\n jMenu6.setMnemonic('a');\n jMenu6.setText(\"Ajuda\");\n\n jMenuItem10.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, java.awt.event.InputEvent.ALT_MASK));\n jMenuItem10.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/ajuda.png\"))); // NOI18N\n jMenuItem10.setText(\"Sobre\");\n jMenuItem10.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n jMenuItem10MousePressed(evt);\n }\n });\n jMenuItem10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem10ActionPerformed(evt);\n }\n });\n jMenu6.add(jMenuItem10);\n\n jMenuBar1.add(jMenu6);\n\n setJMenuBar(jMenuBar1);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n nameLabel = new javax.swing.JLabel();\n performButton = new javax.swing.JButton();\n availableNames = new javax.swing.JComboBox<>();\n\n setMaximumSize(new java.awt.Dimension(435, 600));\n setMinimumSize(new java.awt.Dimension(435, 600));\n setPreferredSize(new java.awt.Dimension(435, 600));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Знайти за назвою\");\n jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n nameLabel.setText(\"Назва:\");\n\n performButton.setText(\"Виконати\");\n performButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n performButtonActionPerformed(evt);\n }\n });\n\n availableNames.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(140, 140, 140)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(performButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(40, 40, 40)\n .addComponent(performButton))\n );\n\n nameLabel.getAccessibleContext().setAccessibleName(\"id\");\n\n getAccessibleContext().setAccessibleParent(this);\n }", "public LookUpPanel() {\n initComponents(); \n }", "private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }", "public manageLecturersNewUI() {\n initComponents();\n loadLecturerData();\n loadSubjectsToComboBox();\n PanelMain.setBackground(Loading.getColorCode());\n PanelSub.setBackground(Loading.getColorCode());\n }", "public ColorPanel() {\r\n setLayout(null);\r\n\r\n chooser = new ColorChooserComboBox[8];\r\n chooserLabel = new JLabel[8];\r\n String[][] text = new String[][] {\r\n {\"Hintergrund\", \"Background\"},\r\n {\"Kante I\", \"Edge I\"},\r\n {\"Kante II\", \"Edge II\"},\r\n {\"Gewicht\", \"Weight\"},\r\n {\"Kantenspitze\", \"Edge Arrow\"},\r\n {\"Rand der Knoten\", \"Node Borders\"},\r\n {\"Knoten\", \"Node Background\"},\r\n {\"Knoten Kennzeichnung\", \"Node Tag\"}};\r\n\r\n for (int i = 0; i < 8; i++) {\r\n createChooser(i, text[i], 10 + 30 * i);\r\n }\r\n\r\n add(createResetButton());\r\n add(createApplyButton());\r\n add(createReturnButton());\r\n\r\n setColorSelection();\r\n this.changeLanguageSettings(mainclass.getLanguageSettings());\r\n }", "private void initComponents() {//GEN-BEGIN:initComponents\n jPanel1 = new javax.swing.JPanel();\n grp_LSelect_Dossier = new srcastra.astra.gui.components.combobox.liste.Liste();\n jLabel10 = new javax.swing.JLabel();\n\n getContentPane().setLayout(new java.awt.GridLayout(1, 0));\n\n setClosable(true);\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(640, 480));\n setPreferredSize(new java.awt.Dimension(730, 520));\n jPanel1.setLayout(null);\n\n grp_LSelect_Dossier.setPreferredSize(new java.awt.Dimension(100, 18));\n grp_LSelect_Dossier.setWarningIcon(new javax.swing.ImageIcon(getClass().getResource(\"/srcastra/astra/gui/img/aTextfield/warning.gif\")));\n grp_LSelect_Dossier.setWorkingIcon(new javax.swing.ImageIcon(getClass().getResource(\"/srcastra/astra/gui/img/aTextfield/working.gif\")));\n jPanel1.add(grp_LSelect_Dossier);\n grp_LSelect_Dossier.setBounds(50, 10, 130, 18);\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 0, 10));\n jLabel10.setText(\"Dossier\");\n jPanel1.add(jLabel10);\n jLabel10.setBounds(10, 10, 32, 13);\n\n getContentPane().add(jPanel1);\n\n pack();\n }", "private void buildColorSelector(JPanel panel) {\n colorChooserButton = new JLabel();\n colorChooserButton.setPreferredSize(new Dimension(16, 16));\n colorChooserButton.setVerticalAlignment(JLabel.CENTER);\n colorChooserButton.setBackground(Color.WHITE);\n colorChooserButton.setOpaque(true);\n colorChooserButton.setBorder(BorderFactory.createLineBorder(Color.black));\n colorChooserButton.addMouseListener(ApplicationFactory.INSTANCE\n .getNewColorChooserListener(this));\n panel.add(colorChooserButton, \"wrap\");\n }", "TvShowScraperNfoSettingsPanel() {\n checkBoxListener = e -> checkChanges();\n comboBoxListener = e -> checkChanges();\n\n // UI init\n initComponents();\n initDataBindings();\n\n // data init\n\n // implement checkBoxListener for preset events\n settings.addPropertyChangeListener(evt -> {\n if (\"preset\".equals(evt.getPropertyName())) {\n buildComboBoxes();\n }\n });\n\n buildCheckBoxes();\n buildComboBoxes();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jComboBox1 = new javax.swing.JComboBox<>();\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jPanel4 = new javax.swing.JPanel();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jPanel7 = new javax.swing.JPanel();\n jButton13 = new javax.swing.JButton();\n jButton14 = new javax.swing.JButton();\n jButton15 = new javax.swing.JButton();\n jPanel8 = new javax.swing.JPanel();\n jButton16 = new javax.swing.JButton();\n jButton17 = new javax.swing.JButton();\n jButton18 = new javax.swing.JButton();\n jPanel9 = new javax.swing.JPanel();\n jButton19 = new javax.swing.JButton();\n jButton20 = new javax.swing.JButton();\n jButton21 = new javax.swing.JButton();\n jPanel10 = new javax.swing.JPanel();\n jButton22 = new javax.swing.JButton();\n jButton23 = new javax.swing.JButton();\n jButton24 = new javax.swing.JButton();\n jPanel11 = new javax.swing.JPanel();\n jButton25 = new javax.swing.JButton();\n jButton26 = new javax.swing.JButton();\n jButton27 = new javax.swing.JButton();\n jPanel12 = new javax.swing.JPanel();\n jButton28 = new javax.swing.JButton();\n jButton29 = new javax.swing.JButton();\n jButton30 = new javax.swing.JButton();\n jPanel13 = new javax.swing.JPanel();\n jButton31 = new javax.swing.JButton();\n jButton32 = new javax.swing.JButton();\n jButton33 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jPanel14 = new javax.swing.JPanel();\n jPanel15 = new javax.swing.JPanel();\n jButton34 = new javax.swing.JButton();\n jPanel16 = new javax.swing.JPanel();\n jButton37 = new javax.swing.JButton();\n jPanel17 = new javax.swing.JPanel();\n jButton35 = new javax.swing.JButton();\n jButton36 = new javax.swing.JButton();\n jButton38 = new javax.swing.JButton();\n jButton39 = new javax.swing.JButton();\n jButton40 = new javax.swing.JButton();\n jButton41 = new javax.swing.JButton();\n jPanel18 = new javax.swing.JPanel();\n jTextField2 = new javax.swing.JTextField();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jPanel19 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jPanel20 = new javax.swing.JPanel();\n jPanel5 = new javax.swing.JPanel();\n jButton7 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n jButton9 = new javax.swing.JButton();\n jButton10 = new javax.swing.JButton();\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jPanel2.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton1.setText(\"3\");\n jButton1.setFocusPainted(false);\n\n jButton2.setText(\"2\");\n jButton2.setFocusPainted(false);\n\n jButton3.setText(\"1\");\n jButton3.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap(33, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addContainerGap())\n );\n\n jButton4.setText(\"6\");\n jButton4.setFocusPainted(false);\n\n jButton5.setText(\"5\");\n jButton5.setFocusPainted(false);\n\n jButton6.setText(\"4\");\n jButton6.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel4Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton4)\n .addComponent(jButton5)\n .addComponent(jButton6))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton6)\n .addContainerGap())\n );\n\n jButton13.setText(\"9\");\n jButton13.setFocusPainted(false);\n\n jButton14.setText(\"8\");\n jButton14.setFocusPainted(false);\n\n jButton15.setText(\"7\");\n jButton15.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);\n jPanel7.setLayout(jPanel7Layout);\n jPanel7Layout.setHorizontalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel7Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton13)\n .addComponent(jButton14)\n .addComponent(jButton15))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel7Layout.setVerticalGroup(\n jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton13)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton14)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton15)\n .addContainerGap())\n );\n\n jPanel8.setBackground(new java.awt.Color(255, 204, 204));\n jPanel8.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton16.setText(\"12\");\n jButton16.setFocusPainted(false);\n\n jButton17.setText(\"11\");\n jButton17.setFocusPainted(false);\n\n jButton18.setText(\"10\");\n jButton18.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);\n jPanel8.setLayout(jPanel8Layout);\n jPanel8Layout.setHorizontalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel8Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton16)\n .addComponent(jButton17)\n .addComponent(jButton18))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel8Layout.setVerticalGroup(\n jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton16)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton17)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton18)\n .addContainerGap())\n );\n\n jPanel9.setBackground(new java.awt.Color(255, 204, 204));\n jPanel9.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton19.setText(\"15\");\n jButton19.setFocusPainted(false);\n\n jButton20.setText(\"14\");\n jButton20.setFocusPainted(false);\n\n jButton21.setText(\"13\");\n jButton21.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);\n jPanel9.setLayout(jPanel9Layout);\n jPanel9Layout.setHorizontalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel9Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton19)\n .addComponent(jButton20)\n .addComponent(jButton21))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel9Layout.setVerticalGroup(\n jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton19)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton20)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton21)\n .addContainerGap())\n );\n\n jPanel10.setBackground(new java.awt.Color(255, 204, 204));\n jPanel10.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton22.setText(\"18\");\n jButton22.setFocusPainted(false);\n\n jButton23.setText(\"17\");\n jButton23.setFocusPainted(false);\n\n jButton24.setText(\"16\");\n jButton24.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);\n jPanel10.setLayout(jPanel10Layout);\n jPanel10Layout.setHorizontalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel10Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton22)\n .addComponent(jButton23)\n .addComponent(jButton24))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel10Layout.setVerticalGroup(\n jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton22)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton23)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton24)\n .addContainerGap())\n );\n\n jPanel11.setBackground(new java.awt.Color(153, 153, 255));\n jPanel11.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton25.setText(\"21\");\n jButton25.setFocusPainted(false);\n\n jButton26.setText(\"20\");\n jButton26.setFocusPainted(false);\n\n jButton27.setText(\"19\");\n jButton27.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);\n jPanel11.setLayout(jPanel11Layout);\n jPanel11Layout.setHorizontalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel11Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton25)\n .addComponent(jButton26)\n .addComponent(jButton27))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel11Layout.setVerticalGroup(\n jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton25)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton26)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton27)\n .addContainerGap())\n );\n\n jPanel12.setBackground(new java.awt.Color(153, 153, 255));\n jPanel12.setBorder(new javax.swing.border.MatteBorder(null));\n\n jButton28.setText(\"24\");\n jButton28.setFocusPainted(false);\n\n jButton29.setText(\"23\");\n jButton29.setFocusPainted(false);\n\n jButton30.setText(\"22\");\n jButton30.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);\n jPanel12.setLayout(jPanel12Layout);\n jPanel12Layout.setHorizontalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel12Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton28)\n .addComponent(jButton29)\n .addComponent(jButton30))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel12Layout.setVerticalGroup(\n jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton28)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton29)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton30)\n .addContainerGap())\n );\n\n jButton31.setText(\"27\");\n jButton31.setFocusPainted(false);\n\n jButton32.setText(\"26\");\n jButton32.setFocusPainted(false);\n\n jButton33.setText(\"25\");\n jButton33.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);\n jPanel13.setLayout(jPanel13Layout);\n jPanel13Layout.setHorizontalGroup(\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel13Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton31)\n .addComponent(jButton32)\n .addComponent(jButton33))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel13Layout.setVerticalGroup(\n jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton31)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton32)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton33)\n .addContainerGap())\n );\n\n jLabel2.setText(\"Hospitalización\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel2))\n .addContainerGap(22, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n jPanel14.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton34.setText(\"A-2\");\n jButton34.setBorder(null);\n jButton34.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);\n jPanel15.setLayout(jPanel15Layout);\n jPanel15Layout.setHorizontalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton34, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel15Layout.setVerticalGroup(\n jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton34, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(38, 38, 38))\n );\n\n jButton37.setText(\"A-1\");\n jButton37.setBorder(null);\n jButton37.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);\n jPanel16.setLayout(jPanel16Layout);\n jPanel16Layout.setHorizontalGroup(\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton37, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel16Layout.setVerticalGroup(\n jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton37, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(37, 37, 37))\n );\n\n javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);\n jPanel14.setLayout(jPanel14Layout);\n jPanel14Layout.setHorizontalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel14Layout.setVerticalGroup(\n jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel14Layout.createSequentialGroup()\n .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 1, Short.MAX_VALUE))\n .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n jPanel17.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton35.setText(\"Masculino\");\n jButton35.setBorder(null);\n jButton35.setFocusPainted(false);\n jButton35.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton35ActionPerformed(evt);\n }\n });\n\n jButton36.setText(\"Femenino\");\n jButton36.setBorder(null);\n jButton36.setFocusPainted(false);\n\n jButton38.setText(\"Pediatrico\");\n jButton38.setBorder(null);\n jButton38.setFocusPainted(false);\n\n jButton39.setText(\"Ginecologia\");\n jButton39.setBorder(null);\n jButton39.setFocusPainted(false);\n jButton39.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton39ActionPerformed(evt);\n }\n });\n\n jButton40.setText(\"C. General\");\n jButton40.setBorder(null);\n jButton40.setFocusPainted(false);\n jButton40.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton40ActionPerformed(evt);\n }\n });\n\n jButton41.setText(\"M. General\");\n jButton41.setBorder(null);\n jButton41.setFocusPainted(false);\n jButton41.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton41ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);\n jPanel17.setLayout(jPanel17Layout);\n jPanel17Layout.setHorizontalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton36, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)\n .addComponent(jButton35, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(158, Short.MAX_VALUE))\n );\n jPanel17Layout.setVerticalGroup(\n jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel17Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton35, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton36, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel18.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel3.setText(\"Nombre (s):\");\n\n jLabel4.setText(\"Primer Apellido:\");\n\n jLabel5.setText(\"Segundo apellido:\");\n\n jLabel6.setText(\"Edad:\");\n\n jLabel7.setText(\"Diagnostico:\");\n\n javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);\n jPanel18.setLayout(jPanel18Layout);\n jPanel18Layout.setHorizontalGroup(\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel18Layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5)\n .addComponent(jLabel6)\n .addComponent(jLabel7))\n .addContainerGap(40, Short.MAX_VALUE))\n );\n jPanel18Layout.setVerticalGroup(\n jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel18Layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel4)\n .addGap(1, 1, 1)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel5)\n .addGap(1, 1, 1)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6)\n .addGap(2, 2, 2)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel7)\n .addGap(2, 2, 2)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel19.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel1.setText(\"Busqueda paciente hospitalizado:\");\n\n javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);\n jPanel19.setLayout(jPanel19Layout);\n jPanel19Layout.setHorizontalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel19Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel19Layout.setVerticalGroup(\n jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel19Layout.createSequentialGroup()\n .addContainerGap(14, Short.MAX_VALUE)\n .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n jPanel20.setBackground(new java.awt.Color(204, 204, 204));\n\n jButton7.setText(\"U-1\");\n jButton7.setBorder(null);\n jButton7.setFocusPainted(false);\n\n jButton8.setText(\"U-2\");\n jButton8.setBorder(null);\n jButton8.setFocusPainted(false);\n\n jButton9.setText(\"U-3\");\n jButton9.setBorder(null);\n jButton9.setFocusPainted(false);\n\n jButton10.setText(\"U-4\");\n jButton10.setBorder(null);\n jButton10.setFocusPainted(false);\n\n javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);\n jPanel5.setLayout(jPanel5Layout);\n jPanel5Layout.setHorizontalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(32, 32, 32)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(41, 41, 41))\n );\n jPanel5Layout.setVerticalGroup(\n jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(jPanel5Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(4, 4, 4)))\n .addContainerGap(12, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);\n jPanel20.setLayout(jPanel20Layout);\n jPanel20Layout.setHorizontalGroup(\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel20Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel20Layout.setVerticalGroup(\n jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()\n .addContainerGap(12, Short.MAX_VALUE)\n .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n }", "public LauncherPanel(String conffile) {\n initComponents();\n \n Properties props = new Properties();\n try {\n FileInputStream in = new FileInputStream( conffile );\n props.load(in);\n } catch (FileNotFoundException fe) {\n System.err.println(\"Missing \" + conffile + \" -file!\");\n System.exit(-1);\n } catch (IOException ie) {\n System.err.println(\"Reading \" + conffile + \" failed!\");\n System.exit(-1); \n } catch (Exception e) {\n System.err.println(\"Reading properties failed \\n\" + e);\n System.exit(-1);\n }\n \n timeout = Integer.parseInt(props.getProperty(\"timeout\", \"10000\"));\n jLabel1.setText(props.getProperty(\"title\", \"Application launcher\"));\n jLabel2.setText(props.getProperty(\"launch\", \"Launch applications\"));\n jLabel3.setText(props.getProperty(\"leagues\", \"Leagues\")); \n \n workingDir = new File(props.getProperty(\"workingdir\"));\n separator = props.getProperty(\"separator\");\n extension = props.getProperty(\"extension\");\n app1 = props.getProperty(\"app1\");\n app2 = props.getProperty(\"app2\");\n app3 = props.getProperty(\"app3\");\n app4 = props.getProperty(\"app4\");\n \n String app1name = props.getProperty(\"app1name\");\n String app2name = props.getProperty(\"app2name\");\n String app3name = props.getProperty(\"app3name\");\n String app4name = props.getProperty(\"app4name\");\n \n if(app1name != null) {\n jCheckBox1.setText(app1name);\n jCheckBox1.setSelected(true);\n }\n if(app2name != null) {\n jCheckBox2.setText(app2name);\n jCheckBox2.setSelected(true);\n }\n if(app3name != null) {\n jCheckBox3.setText(app3name);\n jCheckBox3.setSelected(true);\n }\n if(app4name != null) {\n jCheckBox4.setText(app4name);\n jCheckBox4.setSelected(true);\n }\n \n String league1 = props.getProperty(\"league1\");\n String league2 = props.getProperty(\"league2\");\n String league3 = props.getProperty(\"league3\");\n String league4 = props.getProperty(\"league4\");\n String league5 = props.getProperty(\"league5\");\n \n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { league1, league2, league3, league4, league5 }));\n jLabel4.setText(props.getProperty(\"startall\"));\n jButton1.setText(props.getProperty(\"confirm\"));\n }", "public JFind2() {\n try {\n String metal = \"javax.swing.plaf.metal.MetalLookAndFeel\";\n String synth = \"javax.swing.plaf.synth.SynthLookAndFeel\"; // --> since JDK-1.5\n\n String gtk = \"com.sun.java.swing.plaf.gtk.GTKLookAndFeel\"; // -> since JDK-1.4\n\n String motif = \"com.sun.java.swing.plaf.motif.MotifLookAndFeel\";\n String windows = \"com.sun.java.swing.plaf.windows.WindowsLookAndFeel\";\n\n String os = System.getProperty(\"os.name\");\n if (os.startsWith(\"Linux\")) {\n try // Install client system look and feel.\n {\n UIManager.setLookAndFeel(metal);\n } catch (Exception e) {\n }\n } else {\n try // Install client system look and feel.\n {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n }\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n preInit();\n initComponents();\n postInit();\n\n }", "private void buildMainPanel() {\n\t\t\n\t\tif(theMode == MODE_FPC) {\n\t\t\ttheFields = new PropertyComponent[9];\n\t\t\t\n\t\t\ttheFields[0] = new PropertyComponent(\"category\", \"Uncategorized\", 1, false, false);\n\t\t\ttheFields[1] = new PropertyComponent(\"display_name\", theDisplayName, 1, false, false);\n\t\t\ttheFields[2] = new PropertyComponent(\"grp_type\", \"Chromosome\", 1, false, false);\n\t\t\ttheFields[3] = new PropertyComponent(\"grp_prefix\", \"\", 1, false, false);\n\t\t\t//theFields[4] = new PropertyComponent(\"grp_sort\", FPC_GRP_SORT, 0, true, false);\t\t\t\n\t\t\t//theFields[5] = new PropertyComponent(\"grp_order\", \"\", 1, true, false);\t\t\t\n\t\t\ttheFields[4] = new PropertyComponent(\"cbsize\", \"1200\", 1, false, false);\t\t\t\n\t\t\ttheFields[5] = new PropertyComponent(\"description\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[6] = new PropertyComponent(\"fpc_file\", \"\", true, true, true);\n\t\t\ttheFields[7] = new PropertyComponent(\"bes_files\", \"\", true, true, false);\n\t\t\ttheFields[8] = new PropertyComponent(\"marker_files\", \"\", true, true, false);\n\t\t} else { //MODE_PSEUDO\n\t\t\ttheFields = new PropertyComponent[13];\n\t\t\t\n\t\t\ttheFields[0] = new PropertyComponent(\"category\", \"Uncategorized\", 1, false, false);\n\t\t\ttheFields[1] = new PropertyComponent(\"display_name\", theDisplayName, 1, false, false);\n\t\t\ttheFields[2] = new PropertyComponent(\"grp_type\", \"Chromosome\", 1, false, false);\n\t\t\ttheFields[3] = new PropertyComponent(\"grp_prefix\", \"Chr\", 1, false, false);\t\t\t\n\t\t\t//theFields[4] = new PropertyComponent(\"grp_sort\", PSEUDO_GRP_SORT, 0, true, false);\n\t\t\ttheFields[4] = new PropertyComponent(\"order_against\", getProjectSelections(), 0, false, true);\n\t\t\ttheFields[5] = new PropertyComponent(\"mask_all_but_genes\", PSEUDO_MASK_GENES, 1, false, true);\n\t\t\ttheFields[6] = new PropertyComponent(\"min_size\", \"100000\", 1, true, false);\t\t\t\n\t\t\ttheFields[7] = new PropertyComponent(\"min_display_size_bp\", \"0\", 1, false, false);\t\t\t\n\t\t\ttheFields[8] = new PropertyComponent(\"description\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[9] = new PropertyComponent(\"annot_keywords\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[10] = new PropertyComponent(\"annot_kw_mincount\", \"50\", 2, false, false);\t\n\t\t\ttheFields[11] = new PropertyComponent(\"anno_files\", \"\", true, true, false);\n\t\t\ttheFields[12] = new PropertyComponent(\"sequence_files\", \"\", true, true, false);\n\t\t}\n\t\t\t\n\t\tJPanel tempPanel = new JPanel();\n\t\ttempPanel.setLayout(new BoxLayout(tempPanel, BoxLayout.PAGE_AXIS));\n\t\ttempPanel.setBackground(Color.WHITE);\n\t\t\n\t\tfor(int x=0; x<theFields.length; x++) {\n\t\t\ttempPanel.add(Box.createVerticalStrut(5));\n\t\t\ttheFields[x].setTextListener(theListener);\n\t\t\ttempPanel.add(theFields[x]);\n\t\t}\n\t\ttempPanel.add(Box.createVerticalStrut(20));\n\t\ttempPanel.add(createButtonPanel());\n\t\ttempPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n\t\ttempPanel.setMaximumSize(tempPanel.getPreferredSize());\n\t\ttempPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\t\n\t\tgetContentPane().add(tempPanel);\n\t}", "private void initComponents() {\n\n jPanel4 = new javax.swing.JPanel();\n jLabel13 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jComboBox2 = new javax.swing.JComboBox();\n jPanel1 = new javax.swing.JPanel();\n jTextField3 = new javax.swing.JTextField();\n jComboBox5 = new javax.swing.JComboBox();\n jComboBox1 = new javax.swing.JComboBox();\n jLabel11 = new javax.swing.JLabel();\n jTextField7 = new javax.swing.JTextField();\n jComboBox10 = new javax.swing.JComboBox();\n jComboBox12 = new javax.swing.JComboBox();\n jComboBox4 = new javax.swing.JComboBox();\n jLabel7 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n jComboBox20 = new javax.swing.JComboBox();\n jLabel10 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jComboBox3 = new javax.swing.JComboBox();\n jButton6 = new javax.swing.JButton();\n jComboBox24 = new javax.swing.JComboBox();\n jButton7 = new javax.swing.JButton();\n jComboBox25 = new javax.swing.JComboBox();\n jComboBox26 = new javax.swing.JComboBox();\n jComboBox27 = new javax.swing.JComboBox();\n jComboBox28 = new javax.swing.JComboBox();\n jButton8 = new javax.swing.JButton();\n jComboBox29 = new javax.swing.JComboBox();\n jButton9 = new javax.swing.JButton();\n jComboBox30 = new javax.swing.JComboBox();\n jTextField4 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel4.setBackground(new java.awt.Color(153, 255, 255));\n\n jLabel13.setFont(new java.awt.Font(\"Tahoma\", 1, 36)); // NOI18N\n jLabel13.setText(\" ADD SESSION\");\n\n javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addContainerGap(345, Short.MAX_VALUE)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(342, 342, 342))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n getContentPane().add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1000, 80));\n\n jButton2.setBackground(new java.awt.Color(0, 153, 153));\n jButton2.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jButton2.setText(\"Back\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 100, 220, 47));\n\n jButton3.setBackground(new java.awt.Color(0, 153, 153));\n jButton3.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jButton3.setText(\"Home\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 100, 220, 47));\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"\", \"1\", \"2\" }));\n getContentPane().add(jComboBox2, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 260, 100, 30));\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n jPanel1.add(jTextField3, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 350, 100, 30));\n\n jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"\", \"1\", \"2\" }));\n jPanel1.add(jComboBox5, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 270, 100, 30));\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"\", \"1\", \"2\" }));\n jComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox1ActionPerformed(evt);\n }\n });\n jPanel1.add(jComboBox1, new org.netbeans.lib.awtextra.AbsoluteConstraints(328, 134, 100, 30));\n\n jLabel11.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jLabel11.setText(\"SessionID\");\n jPanel1.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 100, 160, 30));\n jPanel1.add(jTextField7, new org.netbeans.lib.awtextra.AbsoluteConstraints(328, 91, 100, 30));\n\n jComboBox10.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"\", \"1\", \"2\" }));\n jComboBox10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox10ActionPerformed(evt);\n }\n });\n jPanel1.add(jComboBox10, new org.netbeans.lib.awtextra.AbsoluteConstraints(446, 134, 106, 30));\n\n jComboBox12.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"\", \"1\", \"2\" }));\n jComboBox12.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBox12ActionPerformed(evt);\n }\n });\n jPanel1.add(jComboBox12, new org.netbeans.lib.awtextra.AbsoluteConstraints(446, 177, 106, 30));\n\n jComboBox4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"\", \"1\", \"2\" }));\n jPanel1.add(jComboBox4, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 230, 100, 30));\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jLabel7.setText(\"Tag\");\n jPanel1.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 230, 190, 30));\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jLabel5.setText(\"Subject Name\");\n jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 190, 190, 30));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jLabel4.setText(\"Lacturers Name\");\n jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 140, 190, 30));\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jLabel8.setText(\"Sub Group ID\");\n jPanel1.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 310, 150, 30));\n\n jLabel12.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jLabel12.setText(\"Group ID\");\n jPanel1.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 270, 90, 30));\n\n jComboBox20.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"\", \"1\", \"2\" }));\n jPanel1.add(jComboBox20, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 310, 100, 30));\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jLabel10.setText(\"Durations\");\n jPanel1.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 400, 160, 30));\n\n jLabel9.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jLabel9.setText(\"Student Count\");\n jPanel1.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 360, 160, 30));\n\n jButton1.setBackground(new java.awt.Color(0, 153, 153));\n jButton1.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n jButton1.setText(\"ADD SESSION\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 440, 200, 40));\n\n jButton4.setText(\"Lec Names\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 135, -1, 30));\n\n jPanel1.add(jComboBox3, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 130, 90, 30));\n\n jButton6.setText(\"Sub Names\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton6, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 175, -1, 30));\n\n jPanel1.add(jComboBox24, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 170, 90, 30));\n\n jButton7.setText(\"Tags\");\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton7, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 230, 90, 30));\n\n jPanel1.add(jComboBox25, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 310, 100, 30));\n\n jPanel1.add(jComboBox26, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 230, 90, 30));\n\n jPanel1.add(jComboBox27, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 230, 100, 30));\n\n jPanel1.add(jComboBox28, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 270, 100, 30));\n\n jButton8.setText(\"Grp IDs\");\n jButton8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton8ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton8, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 270, 90, 30));\n\n jPanel1.add(jComboBox29, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 270, 90, 30));\n\n jButton9.setText(\"SubGrp IDs\");\n jButton9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton9ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton9, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 310, -1, 30));\n\n jPanel1.add(jComboBox30, new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 310, 90, 30));\n jPanel1.add(jTextField4, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 400, 100, 30));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(2, 78, 990, 520));\n getContentPane().add(jTextField6, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 450, 140, 30));\n\n pack();\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}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setModified(true);\n\t\tshell.setSize(512, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(null);\n\n\t\tLabel label = new Label(shell, SWT.SEPARATOR | SWT.VERTICAL);\n\t\tlabel.setBounds(253, 26, 2, 225);\n\n\t\tcomboCarBrandBuy = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarBrandBuy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tlabel_1.setText(\"Selected\");\n\t\t\t}\n\t\t});\n\t\tcomboCarBrandBuy.setItems(new String[] {\"Maruti\", \"Fiat\", \"Tata\", \"Ford\", \"Honda\", \"Hyundai\"});\n\t\tcomboCarBrandBuy.setBounds(87, 33, 123, 23);\n\t\tcomboCarBrandBuy.setText(\"--select--\");\n\n\t\tLabel lblCarBrand = new Label(shell, SWT.NONE);\n\t\tlblCarBrand.setAlignment(SWT.RIGHT);\n\t\tlblCarBrand.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblCarBrand.setBounds(12, 38, 71, 15);\n\t\tlblCarBrand.setText(\"Car Brand :\");\n\n\t\ttextCarNameBuy = new Text(shell, SWT.BORDER);\n\t\ttextCarNameBuy.setBounds(87, 67, 123, 21);\n\n\t\tLabel lblCarName = new Label(shell, SWT.NONE);\n\t\tlblCarName.setAlignment(SWT.RIGHT);\n\t\tlblCarName.setText(\"Car Name :\");\n\t\tlblCarName.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblCarName.setBounds(12, 70, 71, 15);\n\n\t\tcomboCarModelBuy = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarModelBuy.setItems(new String[] {\"2015\", \"2014\", \"2013\", \"2012\", \"2011\", \"2010\", \"2009\", \"2008\", \"2007\", \"2006\", \"2005\", \"2004\", \"2003\", \"2002\", \"2001\", \"2000\"});\n\t\tcomboCarModelBuy.setBounds(87, 99, 91, 23);\n\t\tcomboCarModelBuy.setText(\"--select--\");\n\n\t\tLabel lblModelYear = new Label(shell, SWT.NONE);\n\t\tlblModelYear.setAlignment(SWT.RIGHT);\n\t\tlblModelYear.setText(\"Model :\");\n\t\tlblModelYear.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblModelYear.setBounds(12, 105, 71, 15);\n\n\t\tButton buttonBuy = new Button(shell, SWT.NONE);\n\t\tbuttonBuy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\n\t\t\t\tString carName = textCarNameBuy.getText();\n\t\t\t\tString carModel = comboCarModelBuy.getText();\n\n\t\t\t\tif(comboCarBrandBuy.getText().equalsIgnoreCase(\"maruti\")){\n\t\t\t\t\tmarutiMap.put(carName, carModel);\n\t\t\t\t}\n\n\t\t\t\tlabel_1.setText(\"Added to Inventory\");\n\t\t\t\tSystem.out.println(marutiMap);\n\t\t\t}\n\t\t});\n\t\tbuttonBuy.setBounds(87, 138, 63, 25);\n\t\tbuttonBuy.setText(\"BUY\");\n\n\t\tlabel_1 = new Label(shell, SWT.BORDER | SWT.HORIZONTAL | SWT.CENTER);\n\t\tlabel_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\tlabel_1.setBounds(73, 198, 137, 19);\n\n\t\tLabel lblStatus = new Label(shell, SWT.NONE);\n\t\tlblStatus.setBounds(22, 198, 45, 15);\n\t\tlblStatus.setText(\"Status :\");\n\n\t\tLabel label_2 = new Label(shell, SWT.NONE);\n\t\tlabel_2.setText(\"Car Brand :\");\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_2.setAlignment(SWT.RIGHT);\n\t\tlabel_2.setBounds(280, 38, 71, 15);\n\n\t\tcomboCarBrandSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarBrandSell.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\n\t\t\t\tString carBrand = comboCarBrandSell.getText();\n\t\t\t\tcomboCarNameSell.clearSelection();\n\t\t\t\t\n\t\t\t\tif(carBrand.equalsIgnoreCase(\"maruti\")){\n\t\t\t\t\tSet<String> keyList = marutiMap.keySet();\n\t\t\t\t\tint i=0;\n\t\t\t\t\tfor(String key : keyList){\n\t\t\t\t\t\tcarNames.add(key);\n\t\t\t\t\t\t//comboCarNameSell.setItem(i, key);\n\t\t\t\t\t\t//i++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tString[] strArray = (String[]) carNames.toArray(new String[0]);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcomboCarNameSell.setItems(strArray);\n\n\t\t\t}\n\t\t});\n\t\tcomboCarBrandSell.setItems(new String[] {\"Maruti\", \"Fiat\", \"Tata\", \"Ford\", \"Honda\", \"Hyundai\"});\n\t\tcomboCarBrandSell.setBounds(355, 33, 123, 23);\n\t\tcomboCarBrandSell.setText(\"--select--\");\n\n\t\tLabel label_3 = new Label(shell, SWT.NONE);\n\t\tlabel_3.setText(\"Car Name :\");\n\t\tlabel_3.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_3.setAlignment(SWT.RIGHT);\n\t\tlabel_3.setBounds(280, 70, 71, 15);\n\n\t\tLabel label_4 = new Label(shell, SWT.NONE);\n\t\tlabel_4.setText(\"Model :\");\n\t\tlabel_4.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_4.setAlignment(SWT.RIGHT);\n\t\tlabel_4.setBounds(280, 105, 71, 15);\n\n\t\tCombo comboCarModelSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarModelSell.setItems(new String[] {\"2015\", \"2014\", \"2013\", \"2012\", \"2011\", \"2010\", \"2009\", \"2008\", \"2007\", \"2006\", \"2005\", \"2004\", \"2003\", \"2002\", \"2001\", \"2000\"});\n\t\tcomboCarModelSell.setBounds(355, 99, 91, 23);\n\t\tcomboCarModelSell.setText(\"--select--\");\n\n\t\tButton buttonSell = new Button(shell, SWT.NONE);\n\t\tbuttonSell.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tlabel_5.setText(\"Sold Successfully\");\n\t\t\t}\n\t\t});\n\t\tbuttonSell.setText(\"SELL\");\n\t\tbuttonSell.setBounds(355, 138, 63, 25);\n\n\t\tlabel_5 = new Label(shell, SWT.BORDER | SWT.HORIZONTAL | SWT.CENTER);\n\t\tlabel_5.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_5.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\tlabel_5.setBounds(341, 198, 137, 19);\n\n\t\tLabel label_6 = new Label(shell, SWT.NONE);\n\t\tlabel_6.setText(\"Status :\");\n\t\tlabel_6.setBounds(290, 198, 45, 15);\n\n\t\tcomboCarNameSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarNameSell.setItems(new String[] {});\n\t\tcomboCarNameSell.setBounds(355, 65, 123, 23);\n\t\tcomboCarNameSell.setText(\"--select--\");\n\n\t}", "private void setupLeftPanel()\n {\n // display the radio buttons for the various sorts.\n Box leftPanel = Box.createVerticalBox();\n Box buttonColumn = Box.createVerticalBox();\n Box nameDelayBox = Box.createHorizontalBox();\n buttonColumn.setBorder(BorderFactory.createTitledBorder(\"Algorithms\"));\n ButtonGroup bg = new ButtonGroup();\n sortTypeButtons = new JRadioButton[sortNames.length]; // to change which sorts are available, look at variables\n // at the top of the class.\n for (int i=0; i<sortNames.length; i++)\n {\n sortTypeButtons[i] = new JRadioButton(sortNames[i]);\n buttonColumn.add(sortTypeButtons[i]);\n bg.add(sortTypeButtons[i]);\n sortTypeButtons[i].addActionListener(this);\n }\n sortTypeButtons[0].setSelected(true);\n nameDelayBox.add(buttonColumn);\n\n // display the delay slider.\n delaySlider = new JSlider(JSlider.VERTICAL,0,20,1);\n delaySlider.addChangeListener(this);\n delaySlider.setMajorTickSpacing(1);\n delaySlider.setPaintTicks(true);\n Hashtable<Integer,JLabel> labelTable = new Hashtable<>();\n labelTable.put(0,new JLabel(\"0\"));\n labelTable.put(5,new JLabel(\"5\"));\n labelTable.put(10,new JLabel(\"10\"));\n labelTable.put(15,new JLabel(\"15\"));\n labelTable.put(20,new JLabel(\"20\"));\n delaySlider.setLabelTable(labelTable);\n delaySlider.setPaintLabels(true);\n delaySlider.setSnapToTicks(true);\n delaySlider.setBorder(new TitledBorder(\"Delay\"));\n nameDelayBox.add(delaySlider);\n leftPanel.add(nameDelayBox);\n\n // display the run/cancel and reset buttons.\n Box runResetPanel = Box.createHorizontalBox();\n runButton = new JButton(\"Run\");\n runButton.addActionListener(this);\n resetButton = new JButton(\"Reset\");\n resetButton.addActionListener(this);\n runResetPanel.add(runButton);\n runResetPanel.add(resetButton);\n leftPanel.add(runResetPanel);\n\n // shows popup menu of possible values of N.\n nMenu = new JComboBox<>();\n for (int v:possibleNValues) // see the variables at the top of the class to modify options shown.\n nMenu.addItem(v);\n nMenu.addActionListener(this);\n nMenu.setSelectedItem(100);\n nMenu.setBorder(new TitledBorder(\"Array Size (N)\"));\n leftPanel.add(nMenu);\n\n // label that indicates whether this list is sorted correctly\n leftPanel.add(new JLabel(\"Status\"));\n statusLabel = new JLabel(\"\");\n leftPanel.add(statusLabel);\n leftPanel.add(Box.createVerticalStrut(10));\n\n // label that indicates how much time (was/has been) spent on the most recent run\n leftPanel.add(new JLabel(\"Time\"));\n timeLabel = new JLabel(\"00.000\");\n leftPanel.add(timeLabel);\n leftPanel.add(Box.createVerticalStrut(10));\n\n // label that indicates which sort was run most recently.\n leftPanel.add(new JLabel(\"Latest Run\"));\n latestRunLabel = new JLabel(\"None\");\n leftPanel.add(latestRunLabel);\n leftPanel.add(Box.createVerticalGlue());\n\n // update alignment so things look nice.\n buttonColumn.setAlignmentY(Component.TOP_ALIGNMENT);\n nameDelayBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n runResetPanel.setAlignmentX(Component.LEFT_ALIGNMENT);\n nMenu.setAlignmentX(Component.LEFT_ALIGNMENT);\n delaySlider.setAlignmentY(Component.TOP_ALIGNMENT);\n statusLabel.setAlignmentX(Component.LEFT_ALIGNMENT);\n timeLabel.setAlignmentX(Component.LEFT_ALIGNMENT);\n latestRunLabel.setAlignmentX(Component.LEFT_ALIGNMENT);\n\n getContentPane().add(leftPanel,BorderLayout.WEST);\n\n }", "private void initComponents(String label, Object[] items) {\r\n\t\tFormLayout layout = new FormLayout(\"3dlu, 21px, p:g, 21px, 3dlu\", \"3dlu, t:16px, 3dlu\");\r\n\t\t\r\n\t\tthis.setLayout(layout);\r\n\t\t\r\n\t\tthis.add(new JLabel(label), CC.xyw(2, 2, 2));\r\n\t\t\r\n\t\tint row = 2;\r\n\t\t\r\n\t\tif (items != null) {\r\n\t\t\tlayout.appendRow(RowSpec.decode(\"f:21px\"));\r\n\t\t\tlayout.appendRow(RowSpec.decode(\"3dlu\"));\r\n\t\t\t\r\n\t\t\tJComboBox comboBox = new JComboBox(items);\r\n\t\t\tcomboBox.addPopupMenuListener(new BoundsPopupMenuListener(true, false));\r\n\t\t\t((JTextField) comboBox.getEditor().getEditorComponent()).setMargin(new Insets(1, 3, 2, 1));\r\n\t\t\t\r\n\t\t\tthis.add(comboBox, CC.xyw(2, 4, 2));\r\n\t\t\t\r\n\t\t\trow += 2;\r\n\t\t}\r\n\r\n\t\tfinal JToggleButton blockBtn = new JToggleButton(IconConstants.PLUGIN_ICON);\r\n\t\tblockBtn.setRolloverIcon(IconConstants.PLUGIN_ROLLOVER_ICON);\r\n\t\tblockBtn.setPressedIcon(IconConstants.PLUGIN_PRESSED_ICON);\r\n\t\tblockBtn.setOpaque(false);\r\n\t\tblockBtn.setContentAreaFilled(false);\r\n\t\tblockBtn.setBorder(null);\r\n\t\tblockBtn.setFocusPainted(false);\r\n\t\tblockBtn.setToolTipText(\"Append/Remove \" + label + \" Block\");\r\n\r\n\t\tfinal JPopupMenu blockPop = new JPopupMenu();\r\n\t\t\r\n\t\tappendItem = new JMenuItem(\"Append \" + label + \" Block\", IconConstants.ADD_ICON);\r\n\t\tappendItem.setRolloverIcon(IconConstants.ADD_ROLLOVER_ICON);\r\n\t\tappendItem.setPressedIcon(IconConstants.ADD_PRESSED_ICON);\r\n\t\t\r\n\t\tremoveItem = new JMenuItem(\"Remove \" + label + \" Block\", IconConstants.DELETE_ICON);\r\n\t\tremoveItem.setRolloverIcon(IconConstants.DELETE_ROLLOVER_ICON);\r\n\t\tremoveItem.setPressedIcon(IconConstants.DELETE_PRESSED_ICON);\r\n\t\tremoveItem.setEnabled(false);\r\n\t\t\r\n\t\tremoveItem.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\r\n\t\t\t\tremoveBlock();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tappendItem.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\r\n\t\t\t\tappendBlock();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tblockPop.add(appendItem);\r\n\t\tblockPop.add(removeItem);\r\n\t\t\r\n\t\tblockBtn.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tblockPop.show(blockBtn, -3, blockBtn.getSize().height / 2 + 11);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tthis.add(blockBtn, CC.xy(4, row));\r\n\t}", "@Override\n public void installUI ( @NotNull final JComponent c )\n {\n chooser = ( JColorChooser ) c;\n\n // Applying skin\n StyleManager.installSkin ( chooser );\n\n selectionModel = chooser.getSelectionModel ();\n\n chooser.setLayout ( new BorderLayout () );\n\n colorChooserPanel = new WebColorChooserPanel ( StyleId.colorchooserContent.at ( chooser ), false );\n colorChooserPanel.setColor ( selectionModel.getSelectedColor () );\n colorChooserPanel.addChangeListener ( new ChangeListener ()\n {\n @Override\n public void stateChanged ( final ChangeEvent e )\n {\n if ( !modifying )\n {\n modifying = true;\n selectionModel.setSelectedColor ( colorChooserPanel.getColor () );\n modifying = false;\n }\n }\n } );\n chooser.add ( colorChooserPanel, BorderLayout.CENTER );\n\n modelChangeListener = new ChangeListener ()\n {\n @Override\n public void stateChanged ( final ChangeEvent e )\n {\n if ( !modifying )\n {\n modifying = true;\n colorChooserPanel.setColor ( selectionModel.getSelectedColor () );\n modifying = false;\n }\n }\n };\n selectionModel.addChangeListener ( modelChangeListener );\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 fillComboBox() {\n jComboBoxFilterChains.setModel(new DefaultComboBoxModel(ImageFilterManager.getObject().getListOfFilters().toArray()));\n }", "private void initPanel() {\r\n panel = new JDialog(mdiForm);\r\n panel.setTitle(\"Groups\");\r\n panel.setSize(325, 290);\r\n panel.getContentPane().add(groupsController.getControlledUI());\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n java.awt.Dimension dlgSize = panel.getSize();\r\n int x = screenSize.width/1 - ((dlgSize.width/1)+20);\r\n int y = screenSize.height/1 - ((dlgSize.height/1)+60);\r\n panel.setLocation(x, y);\r\n panel.setFocusable(false);\r\n panel.show();\r\n panel.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\r\n panel.addWindowListener(new java.awt.event.WindowAdapter() {\r\n public void windowClosing(java.awt.event.WindowEvent event) {\r\n panel.dispose();\r\n maintainSponsorHierarchyBaseWindow.mnuItmPanel.setSelected(false);\r\n maintainSponsorHierarchyBaseWindow.btnPanel.setSelected(false);\r\n }\r\n });\r\n }", "private void initComponents() {\n jScrollPane1 = new javax.swing.JScrollPane();\n xList1 = new com.rameses.rcp.control.XList();\n xActionBar1 = new com.rameses.rcp.control.XActionBar();\n formPanel1 = new com.rameses.rcp.util.FormPanel();\n xTextField1 = new com.rameses.rcp.control.XTextField();\n xComboBox4 = new com.rameses.rcp.control.XComboBox();\n xComboBox1 = new com.rameses.rcp.control.XComboBox();\n xComboBox2 = new com.rameses.rcp.control.XComboBox();\n xComboBox3 = new com.rameses.rcp.control.XComboBox();\n xLookupField1 = new com.rameses.rcp.control.XLookupField();\n\n setLayout(new java.awt.BorderLayout());\n\n setPreferredSize(new java.awt.Dimension(548, 368));\n xList1.setDynamic(true);\n xList1.setExpression(\"#{name}\");\n xList1.setItems(\"filterlist\");\n xList1.setName(\"selectedFilter\");\n jScrollPane1.setViewportView(xList1);\n\n add(jScrollPane1, java.awt.BorderLayout.NORTH);\n\n xActionBar1.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 0, 5, 0));\n xActionBar1.setDepends(new String[] {\"selectedFilter\"});\n xActionBar1.setName(\"formActions\");\n xActionBar1.setUseToolBar(false);\n add(xActionBar1, java.awt.BorderLayout.SOUTH);\n\n com.rameses.rcp.control.border.XTitledBorder xTitledBorder1 = new com.rameses.rcp.control.border.XTitledBorder();\n xTitledBorder1.setTitle(\"Filter Information\");\n formPanel1.setBorder(xTitledBorder1);\n xTextField1.setCaption(\"Name\");\n xTextField1.setCaptionWidth(100);\n xTextField1.setName(\"filter.name\");\n xTextField1.setPreferredSize(new java.awt.Dimension(0, 19));\n xTextField1.setRequired(true);\n xTextField1.setTextCase(com.rameses.rcp.constant.TextCase.NONE);\n formPanel1.add(xTextField1);\n\n xComboBox4.setCaption(\"State\");\n xComboBox4.setCaptionWidth(100);\n xComboBox4.setDynamic(true);\n xComboBox4.setItems(\"statelist\");\n xComboBox4.setName(\"filter.info.docstate\");\n xComboBox4.setPreferredSize(new java.awt.Dimension(0, 22));\n formPanel1.add(xComboBox4);\n\n xComboBox1.setCaption(\"Barangay\");\n xComboBox1.setCaptionWidth(100);\n xComboBox1.setDynamic(true);\n xComboBox1.setExpression(\"#{name}\");\n xComboBox1.setItems(\"barangaylist\");\n xComboBox1.setName(\"filter.info.barangay\");\n xComboBox1.setPreferredSize(new java.awt.Dimension(0, 22));\n formPanel1.add(xComboBox1);\n\n xComboBox2.setCaption(\"Classification\");\n xComboBox2.setCaptionWidth(100);\n xComboBox2.setDynamic(true);\n xComboBox2.setExpression(\"#{classname}\");\n xComboBox2.setItems(\"classificationlist\");\n xComboBox2.setName(\"filter.info.classification\");\n xComboBox2.setPreferredSize(new java.awt.Dimension(0, 22));\n formPanel1.add(xComboBox2);\n\n xComboBox3.setCaption(\"Property Type\");\n xComboBox3.setCaptionWidth(100);\n xComboBox3.setDynamic(true);\n xComboBox3.setItems(\"rputypelist\");\n xComboBox3.setName(\"filter.info.rputype\");\n xComboBox3.setPreferredSize(new java.awt.Dimension(0, 22));\n formPanel1.add(xComboBox3);\n\n xLookupField1.setCaption(\"Owner\");\n xLookupField1.setCaptionWidth(100);\n xLookupField1.setExpression(\"#{entityname}\");\n xLookupField1.setHandler(\"lookupOwner\");\n xLookupField1.setName(\"filter.info.owner\");\n xLookupField1.setPreferredSize(new java.awt.Dimension(0, 19));\n formPanel1.add(xLookupField1);\n\n add(formPanel1, java.awt.BorderLayout.CENTER);\n\n }", "protected Control createControl(Composite parent) {\n combo = new Combo(parent, SWT.DROP_DOWN);\n combo.addSelectionListener(new SelectionListener() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n handleWidgetSelected(e);\n }\n\n @Override\n public void widgetDefaultSelected(SelectionEvent e) {\n handleWidgetDefaultSelected(e);\n }\n });\n combo.addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent e) {\n // do nothing\n }\n\n @Override\n public void focusLost(FocusEvent e) {\n refresh(false);\n }\n });\n\n // Initialize width of combo\n combo.setItems(initStrings);\n toolitem.setWidth(computeWidth(combo));\n refresh(true);\n return combo;\n }", "public void fillCompBox() {\n\t\tcomboBoxName.removeAllItems();\n\t\tint counter = 0;\n\t\tif (results.getResults() != null) {\n\t\t\tList<String> scenarios = new ArrayList<String>(results.getResults().keySet());\n\t\t\tCollections.sort(scenarios);\n\t\t\tfor (String s : scenarios) {\n\t\t\t\tcomboBoxName.insertItemAt(s, counter);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\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 ChooseParameterPanel() {\n initComponents();\n }", "@SuppressWarnings({ \"unused\", \"unchecked\", \"rawtypes\" })\r\n\tprivate void buildPanel() {\r\n\t\tageField = new JComboBox(ageRanges);\r\n\t\tfNameField = new JTextField(20);\r\n\t\tGhostText fNameGhost = new GhostText(fNameField, \"First Name\");\r\n\t\tlNameField = new JTextField(20);\r\n\t\tGhostText lNameGhost = new GhostText(lNameField, \"Last Name\");\r\n\t\tmInitField = new JTextField(2);\r\n\t\tGhostText mInitGhost = new GhostText(mInitField, \"M\");\r\n\t\temailField = new JTextField(20);\r\n\t\tGhostText emailGhost = new GhostText(emailField, \"Email\");\r\n\t\tphoneNumberField = new JTextField(12);\r\n\t\timage = new JLabel();\r\n\t\tGhostText phoneNoGhost = new GhostText(phoneNumberField, \"Phone Number\");\r\n\t\tJPanel namePanel = new JPanel();\r\n\t\tJPanel emailPhoneAgePanel = new JPanel();\r\n\t\tJPanel northPanel = new JPanel();\r\n\t\tJPanel centerPanel = new JPanel();\r\n\t\temailPhoneAgePanel.setLayout(new GridLayout(0, 3));\r\n\t\temailPhoneAgePanel.setSize(new Dimension(400, 25));\r\n\t\temailPhoneAgePanel.setMaximumSize(new Dimension(400, 25));\r\n\t\tregisterButton = new JButton(\"Register & Save\");\r\n\t\tregisterButton.addActionListener(new registerButtonAction());\r\n\t\tregisterButton.setEnabled(false);\r\n\t\tuploadButton = new JButton(\"Upload Photo\");\r\n\t\tuploadButton.addActionListener(new uploadListener());\r\n\t\tnamePanel.add(fNameField);\r\n\t\tnamePanel.add(lNameField);\r\n\t\tnamePanel.add(mInitField);\r\n\t\tnamePanel.setBackground(Color.BLACK);\r\n\t\tnamePanel.setLayout(new GridBagLayout());\r\n\t\temailPhoneAgePanel.add(emailField);\r\n\t\temailPhoneAgePanel.add(phoneNumberField);\r\n\t\temailPhoneAgePanel.add(ageField);\r\n\t\temailPhoneAgePanel.setBackground(Color.BLACK);\r\n\t\temailPhoneAgePanel.setLayout(new GridBagLayout());\r\n\t\tcenterPanel.add(image);\r\n\t\tJPanel buttonPanel = new JPanel();\r\n\t\tbuttonPanel.add(uploadButton);\r\n\t\tbuttonPanel.add(registerButton);\r\n\t\tnorthPanel.add(namePanel, BorderLayout.NORTH);\r\n\t\tnorthPanel.add(emailPhoneAgePanel, BorderLayout.CENTER);\r\n\t\tnorthPanel.setBackground(Color.BLACK);\r\n\t\tcenterPanel.setBackground(Color.BLACK);\r\n\t\tthis.add(northPanel, BorderLayout.NORTH);\r\n\t\tthis.add(centerPanel, BorderLayout.CENTER);\r\n\t\tthis.add(buttonPanel, BorderLayout.SOUTH);\t\r\n\t\t}", "public static void initialisePanel(){\n\t\t\n\t\tBrewPanel = new JPanel();\n\t\tBrewPanel.setLayout(new MigLayout(\"\", \"[grow][65px:n:65px]\", \"[20px:n:20px][25px:n:25px][grow]\"));\n\t\t\n\t\t\n\t\t//Header\n\t\tBrewHeader = new JLabel(\"Brew\");\n\t\tBrewHeader.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tBrewPanel.add(BrewHeader, \"cell 0 0,grow\");\n\t\t\n\t\t\n\t\t//Subtitle\n\t\tBrewSubtitle = new JLabel(\"Browse and edit the brew database.\");\n\t\tBrewSubtitle.setFont(new Font(\"Tahoma\", Font.ITALIC, 13));\n\t\tBrewPanel.add(BrewSubtitle, \"cell 0 1,growx,aligny top\");\n\t\t\n\t\tbtnPrintBrew = new JButton();\n\t\tbtnPrintBrew.setIcon(new ImageIcon(BrewPanel.class.getResource(\"/images/print.png\")));\n\t\tbtnPrintBrew.setToolTipText(\"Save currently selected brew data to printable .pdf\");\n\t\tBrewPanel.setVisible(true);\n \tbtnPrintBrew.setVisible(false);\n\t\tbtnPrintBrew.setEnabled(false);\n\t\tBrewPanel.add(btnPrintBrew, \"cell 1 0\");\n\t\t\n\t\t//Tabbed Pane\n\t\ttabbedBrewPane = new JTabbedPane(JTabbedPane.TOP);\n\t\tBrewPanel.add(tabbedBrewPane, \"cell 0 2 2,grow\");\n\t\t\t\t\n\t\t\n\t\t//Brew Search Tab\n\t\tBrewSearchPanel.initialisePanel();\t\t\n\t\ttabbedBrewPane.addTab(\"Search\", null, BrewSearchPanel.tabbedBrewSearchPanel, null);\n\t\t\n\t\t\n\t\t//Brew Data Tab\n\t\tBrewDataPanel.initialisePanel();\t\t\n\t\ttabbedBrewPane.addTab(\"Brew Data\", null, BrewDataPanel.tabbedBrewDataPanel, null);\n\t\t\n\t\t\n\t\t//Brew Notes Tab\n\t\tBrewNotesPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Notes\", null, BrewNotesPanel.tabbedBrewNotesPanel, null);\n\t\t\n\t\t\n\t\t//Brew Pictures Tab\n\t\tBrewPicturesPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Pictures\", null, BrewPicturesPanel.tabbedBrewPicturesPanel, null);\n\t\t\n\t\t\n\t\t//Brew Pictures Tab\n\t\tBrewCostPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Costs\", null, BrewCostPanel.tabbedBrewCostPanel, null);\n\t\t\t\t\n\t\t\n\t\t//Add New Brew Tab\n\t\tBrewAddPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Add New Brew\", new ImageIcon(BrewPanel.class.getResource(\"/images/new.png\")), BrewAddPanel.tabbedBrewAddPanel, null);\n\t\t\n\t\t\n\t\t//Set some tabs disabled initially\n\t\ttabbedBrewPane.setEnabledAt(1, false);\n\t\ttabbedBrewPane.setEnabledAt(2, false);\n\t\ttabbedBrewPane.setEnabledAt(3, false);\n\t\ttabbedBrewPane.setEnabledAt(4, false);\n\t\t\n\t \t\n\t\t//Add it all to the main window\n\t\tLegacyApp.WineBrewDBFrame.getContentPane().add(BrewPanel, \"cell 0 0,grow\");\n\t\tBrewPanel.setVisible(false);\n\n\t\t\n\t\tBrewPanelStatus = \"Initialised\";\n\t\t\n\t\t\n\t\t//Add print button listener\n\t\tbtnPrintBrew.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser c = new JFileChooser();\n\t\t\t int rVal = c.showSaveDialog(LegacyApp.WineBrewDBFrame);\n\t\t\t if (rVal == JFileChooser.APPROVE_OPTION) {\t\t\t \t \t \n\t\t\t\t\tString pdflocation = c.getCurrentDirectory().toString() + LegacyApp.OSSlash + c.getSelectedFile().getName() + \".pdf\";\n\t\t\t\t\tBrewPDF.createPDF(pdflocation);\t \t \n\t\t\t \t \n\t\t\t }\n\t\t\t if (rVal == JFileChooser.CANCEL_OPTION) {\n\t\t\t \t \n\t\t\t }\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\ttabbedBrewPane.addChangeListener(new ChangeListener() {\n\t\t // This method is called whenever the selected tab changes\n\t\t public void stateChanged(ChangeEvent evt) {\n\t\t JTabbedPane pane = (JTabbedPane)evt.getSource();\n\n\t\t // Get current tab\n\t\t int sel = pane.getSelectedIndex();\n\t\t if(sel == 0 || sel == 5){\n\t\t \tbtnPrintBrew.setVisible(false);\n\t\t \t\tbtnPrintBrew.setEnabled(false);\n\t\t }else{\n\t\t \tbtnPrintBrew.setVisible(true);\n\t\t \t\tbtnPrintBrew.setEnabled(true);\n\t\t }\n\t\t }\n\t\t});\n\t}", "private void initERFSelector_GuiBean() {\n // create the ERF Gui Bean object\n ArrayList erf_Classes = new ArrayList();\n erf_Classes.add(FRANKEL_ADJ_FORECAST_CLASS_NAME);\n erf_Classes.add(FRANKEL2000_ADJ_FORECAST_CLASS_NAME);\n erf_Classes.add(STEP_FORECAST_CLASS_NAME);\n erf_Classes.add(WG02_FORECAST_CLASS_NAME);\n erf_Classes.add(POISSON_FAULT_ERF_CLASS_NAME);\n erf_Classes.add(PEER_AREA_FORECAST_CLASS_NAME);\n erf_Classes.add(PEER_NON_PLANAR_FAULT_FORECAST_CLASS_NAME);\n erf_Classes.add(PEER_MULTI_SOURCE_FORECAST_CLASS_NAME);\n erf_Classes.add(PEER_LOGIC_TREE_FORECAST_CLASS_NAME);\n\n try{\n if(erfRupSelectorGuiBean == null)\n erfRupSelectorGuiBean = new EqkRupSelectorGuiBean(erf_Classes);\n }catch(InvocationTargetException e){\n throw new RuntimeException(\"Connection to ERF's failed\");\n }\n\n erfPanel.removeAll();\n //erfGuiBean = null;\n erfPanel.add(erfRupSelectorGuiBean, new GridBagConstraints( 0, 0, 1, 1, 1.0, 1.0,\n GridBagConstraints.CENTER,GridBagConstraints.BOTH, defaultInsets, 0, 0 ));\n erfRupSelectorGuiBean.getParameter(ERF_GuiBean.ERF_PARAM_NAME).addParameterChangeListener(this);\n erfPanel.validate();\n erfPanel.repaint();\n }", "private void renderCombobox(){\r\n\r\n\t\tCollection<String> sitesName= new ArrayList<String>();\r\n\t\t\tfor(SiteDto site : siteDto){\r\n\t\t\t\tsitesName.add(site.getSiteName());\r\n\t\t\t}\r\n\t\t\r\n\t\tComboBox siteComboBox = new ComboBox(\"Select Site\",sitesName);\r\n\t\tsiteName = sitesName.iterator().next();\r\n\t\tsiteComboBox.setValue(siteName);\r\n\t\tsiteComboBox.setImmediate(true);\r\n\t\tsiteComboBox.addValueChangeListener(this);\r\n\t\tverticalLayout.addComponent(siteComboBox);\r\n\t}", "private void loadScreen() {\r\n\t\ttry {\r\n\t\t\t// Filtros\r\n\t\t\tcmbDataSource = new LTComboBoxField(rsBundle.getString(\"data_source\"), true, true);\r\n\t\t\tcmbDataSource.addValues(rsBundle.getString(\"screen_audio_comparison_filters_database\"), rsBundle.getString(\"screen_audio_comparison_filters_database\"));\r\n\t\t\tcmbDataSource.addValues(rsBundle.getString(\"screen_audio_comparison_filters_library\"), rsBundle.getString(\"screen_audio_comparison_filters_library\"));\r\n\t\t\tcmbDataSource.addValues(rsBundle.getString(\"screen_audio_comparison_filters_audio_file\"), rsBundle.getString(\"screen_audio_comparison_filters_audio_file\"));\r\n\t\t\tcmbDataSource.setValue(rsBundle.getString(\"screen_audio_comparison_filters_database\"));\r\n\t\t\t\r\n\t\t\tcmbFeature = new LTComboBoxField(rsBundle.getString(\"feature\"), true, true);\r\n\t\t\tcmbFeature.addValues(\"Power Spectrum\", rsBundle.getString(\"feature_power_spectrum\"));\r\n\t\t\tcmbFeature.addValues(\"MFCC\", rsBundle.getString(\"feature_mfcc\"));\r\n\t\t\tcmbFeature.addValues(\"LPC\", rsBundle.getString(\"feature_lpc\"));\r\n\t\t\tcmbFeature.addValues(\"LPCC\", rsBundle.getString(\"feature_lpcc\"));\r\n\t\t\tcmbFeature.addValues(\"PLP\", rsBundle.getString(\"feature_plp\"));\r\n\t\t\tcmbFeature.addValues(\"MFCC_LPC\", \"MFCC + LPC\");\r\n\t\t\tcmbFeature.addValues(\"MFCC_LPCC\", \"MFCC + LPCC\");\r\n\t\t\tcmbFeature.addValues(\"MFCC_PLP\", \"MFCC + PLP\");\r\n\t\t\tcmbFeature.addValues(\"MFCC_LPC_LPCC_PLP\", \"MFCC + LPC + LPCC + PLP\");\r\n\t\t\tcmbFeature.setValue(\"Power Spectrum\");\r\n\t\t\t\r\n\t\t\tcmbClassifier = new LTComboBoxField(rsBundle.getString(\"classifier\"), true, true);\r\n\t\t\tcmbClassifier.addValues(\"Pearson Correlation\", rsBundle.getString(\"classifier_pearson_correlation\"));\r\n\t\t\tcmbClassifier.setValue(\"Pearson Correlation\");\r\n\r\n\t\t\t// Botão Filtro\r\n\t\t\tbtnFilters = new JButton();\r\n\t\t\tbtnFilters.setMinimumSize(new Dimension(40, 40));\r\n\t\t\tbtnFilters.setMaximumSize(new Dimension(40, 40));\r\n\t\t\tbtnFilters.setIcon(new ImageIcon(\"res/images/filter.png\"));\r\n\t\t\tbtnFilters.setToolTipText(\"Filtros\");\r\n\t\t\tbtnFilters.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent event) {\r\n\t\t\t\t\tScreenAudioComparisonFilters objAudioComparisonFilters = new ScreenAudioComparisonFilters();\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalPhylum(lstAnimalPhylum);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalClass(lstAnimalClass);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalOrder(lstAnimalOrder);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalFamily(lstAnimalFamily);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalGenus(lstAnimalGenus);\r\n\t\t\t\t\tobjAudioComparisonFilters.setAnimalSpecies(lstAnimalSpecies);\r\n\t\t\t\t\tobjAudioComparisonFilters.setRecordist(lstRecordist);\r\n\t\t\t\t\tobjAudioComparisonFilters.setLocationCountry(lstLocationCountry);\r\n\t\t\t\t\tobjAudioComparisonFilters.setLocationState(lstLocationState);\r\n\t\t\t\t\tobjAudioComparisonFilters.setLocationCity(lstLocationCity);\r\n\t\t\t\t\tobjAudioComparisonFilters.setDateInitial(txtDateInitial.getValue());\r\n\t\t\t\t\tobjAudioComparisonFilters.setDateFinal(txtDateFinal.getValue());\r\n\t\t\t\t\t\r\n\t\t\t\t\tobjAudioComparisonFilters.showScreen();\r\n\t\t\t\t\t\r\n\t\t\t\t\tlstAnimalPhylum = objAudioComparisonFilters.getAnimalPhylum();\r\n\t\t\t\t\tlstAnimalClass = objAudioComparisonFilters.getAnimalClass();\r\n\t\t\t\t\tlstAnimalOrder = objAudioComparisonFilters.getAnimalOrder();\r\n\t\t\t\t\tlstAnimalFamily = objAudioComparisonFilters.getAnimalFamily();\r\n\t\t\t\t\tlstAnimalGenus = objAudioComparisonFilters.getAnimalGenus();\r\n\t\t\t\t\tlstAnimalSpecies = objAudioComparisonFilters.getAnimalSpecies();\r\n\t\t\t\t\tlstRecordist = objAudioComparisonFilters.getRecordist();\r\n\t\t\t\t\tlstLocationCountry = objAudioComparisonFilters.getLocationCountry();\r\n\t\t\t\t\tlstLocationState = objAudioComparisonFilters.getLocationState();\r\n\t\t\t\t\tlstLocationCity = objAudioComparisonFilters.getLocationCity();\r\n\t\t\t\t\ttxtDateInitial = objAudioComparisonFilters.getDateInitialField();\r\n\t\t\t\t\ttxtDateFinal = objAudioComparisonFilters.getDateFinalField();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// *********************************************************************************************\r\n\t\t\t// Segmentos do Áudio (ROIs)\r\n\t\t\tpanelSegments = new WasisPanel(rsBundle.getString(\"screen_audio_comparison_selections\"));\r\n\t\t\tpanelSegments.setLayout(new MigLayout(\"insets 0\", \"[grow]\", \"[grow]\"));\r\n\t\t\t\r\n\t\t\t// Seleções realizadas pelo usuário\r\n\t\t\tobjTableSegments = new LTTable(true);\r\n\t\t\tobjTableSegments.addColumn(\"sound_unit\", rsBundle.getString(\"audio_file_selection_sound_unit\"), LTDataTypes.STRING, 140, false);\r\n\t\t\tobjTableSegments.addColumn(\"time_initial\", rsBundle.getString(\"audio_file_selection_time_initial\"), LTDataTypes.INTEGER, 0, false);\r\n\t\t\tobjTableSegments.addColumn(\"time_final\", rsBundle.getString(\"audio_file_selection_time_final\"), LTDataTypes.INTEGER, 0, false);\r\n\t\t\tobjTableSegments.addColumn(\"frequency_initial\", rsBundle.getString(\"audio_file_selection_frequency_minimum\"), LTDataTypes.INTEGER, 0, false);\r\n\t\t\tobjTableSegments.addColumn(\"frequency_final\", rsBundle.getString(\"audio_file_selection_frequency_maximum\"), LTDataTypes.INTEGER, 0, false);\r\n\t\t\tobjTableSegments.addColumn(\"time_initial_show\", rsBundle.getString(\"audio_file_selection_time_initial\"), LTDataTypes.STRING, 145, false);\r\n\t\t\tobjTableSegments.addColumn(\"time_final_show\", rsBundle.getString(\"audio_file_selection_time_final\"), LTDataTypes.STRING, 145, false);\r\n\t\t\tobjTableSegments.addColumn(\"frequency_initial_show\", rsBundle.getString(\"audio_file_selection_frequency_minimum\"), LTDataTypes.STRING, 145, false);\r\n\t\t\tobjTableSegments.addColumn(\"frequency_final_show\", rsBundle.getString(\"audio_file_selection_frequency_maximum\"), LTDataTypes.STRING, 145, false);\r\n\t\t\tobjTableSegments.addMouseListener(new SegmentMouseAdapter());\r\n\t\t\tobjTableSegments.showTable();\r\n\r\n\t\t\tloadAudioSegments();\r\n\t\t\t\r\n\t\t\t// Botão Comparar Áudio\r\n\t\t\tbtnRunComparison = new JButton(rsBundle.getString(\"screen_audio_comparison_run_comparison\"));\r\n\t\t\tbtnRunComparison.setMinimumSize(new Dimension(100, 30));\r\n\t\t\tbtnRunComparison.setMaximumSize(new Dimension(300, 30));\r\n\t\t\tbtnRunComparison.setIconTextGap(15);\r\n\t\t\tbtnRunComparison.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\t\tbtnRunComparison.setIcon(new ImageIcon(\"res/images/compare_sounds.png\"));\r\n\t\t\tbtnRunComparison.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent event) {\r\n\t\t\t\t\tcompareAudios();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// *********************************************************************************************\r\n\t\t\t// Resultados da comparação\r\n\t\t\tpanelResults = new WasisPanel(rsBundle.getString(\"screen_audio_comparison_results\"));\r\n\t\t\tpanelResults.setLayout(new MigLayout(\"insets 0\", \"[grow]\", \"[grow]\"));\r\n\t\t\t\r\n\t\t\tobjTableResults = new LTTable(true);\r\n\t\t\tobjTableResults.addColumn(\"fk_audio_file_segment\", rsBundle.getString(\"audio_file_selection_id_selection\"), LTDataTypes.LONG, 0, false);\r\n\t\t\tobjTableResults.addColumn(\"correlation_result\", rsBundle.getString(\"screen_audio_comparison_results_correlation\"), LTDataTypes.DOUBLE, 120, false);\r\n\t\t\tobjTableResults.addColumn(\"animal_name_english\", rsBundle.getString(\"animal_name_english\"), LTDataTypes.STRING, 230, false);\r\n\t\t\tobjTableResults.addColumn(\"animal_genus\", rsBundle.getString(\"animal_genus\"), LTDataTypes.STRING, 185, false);\r\n\t\t\tobjTableResults.addColumn(\"animal_species\", rsBundle.getString(\"animal_species\"), LTDataTypes.STRING, 185, false);\r\n\t\t\tobjTableResults.addColumn(\"audio_file_path\", rsBundle.getString(\"audio_file_path\"), LTDataTypes.STRING, 0, false);\r\n\t\t\tobjTableResults.addColumn(\"sound_unit\", rsBundle.getString(\"audio_file_selection_sound_unit\"), LTDataTypes.STRING, 0, false);\r\n\t\t\tobjTableResults.addMouseListener(new ResultMouseAdapter());\r\n\t\t\tobjTableResults.showTable();\r\n\t\t\t\r\n\t\t\tobjTableResults.setColumnDoubleFractionDigits(\"correlation_result\", 4);\r\n\t\t\t\r\n\t\t\t// Botão Mostrar Resultados\r\n\t\t\tbtnShowResults = new JButton(rsBundle.getString(\"screen_audio_comparison_show_results\"));\r\n\t\t\tbtnShowResults.setMinimumSize(new Dimension(100, 30));\r\n\t\t\tbtnShowResults.setMaximumSize(new Dimension(300, 30));\r\n\t\t\tbtnShowResults.setIconTextGap(15);\r\n\t\t\tbtnShowResults.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\r\n\t\t\tbtnShowResults.setIcon(new ImageIcon(\"res/images/results.png\"));\r\n\t\t\tbtnShowResults.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent event) {\r\n\t\t\t\t\tshowDetailedResults();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t// ***********************************************************************************************************************\r\n\t\t\t// Cria a tela\r\n\t\t\tobjWasisDialog = new WasisDialog(rsBundle.getString(\"screen_audio_comparison_screen_description\"), true);\r\n\t\t\tobjWasisDialog.setBounds(350, 350, 800, 500);\r\n\t\t\tobjWasisDialog.setMinimumSize(new Dimension(800, 500));\r\n\t\t\t\r\n\t\t\tobjWasisDialog.getContentPane().setLayout(new MigLayout(\"insets 5 5 5 5\", \"[grow]\", \"[60.00][400.00][][][]\"));\r\n\t\t\tobjWasisDialog.getContentPane().add(cmbDataSource, \"cell 0 0, grow, width 400\");\r\n\t\t\tobjWasisDialog.getContentPane().add(cmbFeature, \"cell 0 0, grow, width 500\");\r\n\t\t\tobjWasisDialog.getContentPane().add(cmbClassifier, \"cell 0 0, grow, width 500\");\r\n\t\t\tobjWasisDialog.getContentPane().add(btnFilters, \"cell 0 0, grow, gap 5 1 2 0\");\r\n\t\t\tobjWasisDialog.getContentPane().add(panelSegments, \"cell 0 1, grow\");\r\n\t\t\tobjWasisDialog.getContentPane().add(btnRunComparison, \"cell 0 2, grow\");\r\n\t\t\tobjWasisDialog.getContentPane().add(panelResults, \"cell 0 3, grow\");\r\n\t\t\t//objWasisDialog.getContentPane().add(btnShowResults, \"cell 0 4, grow\");\r\n\t\t\t\r\n\t\t\tpanelSegments.add(objTableSegments, \"cell 0 0, grow\");\r\n\t\t\t\r\n\t\t\tpanelResults.add(objTableResults, \"cell 0 0, grow\");\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}", "private void createEncodingPanel(final Composite fpcomp, final Vector<String> encodeType) {\n\t\t//\n\t\t// Create panel\n\t\t//\n\t\tComposite encodingPanel = new Composite(fpcomp, SWT.NONE);\n\t\tencodingPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 2;\n\t\tlayout.horizontalSpacing = 5;\n\t\tlayout.verticalSpacing = 0;\n\t\tlayout.marginWidth = 0;\n\t\tlayout.marginHeight = 0;\n\t\tencodingPanel.setLayout(layout);\n\n\t\t//\n\t\t// Create label\n\t\t//\n\t\tnew Label(encodingPanel, SWT.NONE).setText(Messages.HexEditorControl_30);\n\n\t\t//\n\t\t// Create combo\n\t\t//\n\t\tencodingCombo = getEncodingCombo(encodingPanel, encodeType);\n\n\t\t//\n\t\t// Add selection listener to the combo box\n\t\t//\n\t\tencodingCombo.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n public void widgetSelected(SelectionEvent e) {\n\t\t\t\tencodingChanged();\n\t\t\t} // widgetSelected()\n\t\t});\n\t}", "public OptionsPanel() {\n initComponents();\n }", "public OptionPanel() {\n initComponents();\n }", "private void mealBrowsePaneSetup(){\n //format the listCell to display the name and quantity of the ingredient\n styleIngredientAddedListCell(mealIngred);\n //format the comboBox to display the name of the Recipe\n setupMealSelectionCombobox(comboMealSelection);\n }", "private void initComponents() {\n\n jPMListar = new javax.swing.JPopupMenu();\n jPanel = new javax.swing.JPanel();\n jPCampos = new javax.swing.JPanel();\n jPanel4 = new javax.swing.JPanel();\n jPanel14 = new javax.swing.JPanel();\n jLStatusBar = new javax.swing.JLabel();\n jPAccesos = new javax.swing.JPanel();\n jLNAccesos = new javax.swing.JLabel();\n jTFNAccesos = new javax.swing.JTextField();\n jPanel2 = new javax.swing.JPanel();\n jPBotones1 = new javax.swing.JPanel();\n jToolBar1 = new javax.swing.JToolBar();\n jBAbrirSGFF = new javax.swing.JButton();\n jBGuardarSGFF = new javax.swing.JButton();\n jBImportarSGFF = new javax.swing.JButton();\n jToolBar2 = new javax.swing.JToolBar();\n jBNuevaFicha = new javax.swing.JButton();\n jCBArchivos = new javax.swing.JComboBox();\n jBComenzarConsulta = new javax.swing.JButton();\n jBRegistroAnterior = new javax.swing.JButton();\n jBRegistroSiguiente = new javax.swing.JButton();\n jBListar = new javax.swing.JButton();\n jBAccInv = new javax.swing.JButton();\n jToolBar3 = new javax.swing.JToolBar();\n jBInsertarRegistro = new javax.swing.JButton();\n jBBorrarRegistro = new javax.swing.JButton();\n jBActualizarRegistro = new javax.swing.JButton();\n jToolBar4 = new javax.swing.JToolBar();\n jBCaracteres = new javax.swing.JButton();\n jBAyuda = new javax.swing.JButton();\n jBSSGFF = new javax.swing.JButton();\n jPBotones2 = new javax.swing.JPanel();\n jToolBar5 = new javax.swing.JToolBar();\n jBIrAlPadre = new javax.swing.JButton();\n jBIrAlHijo = new javax.swing.JButton();\n jCBHijos = new javax.swing.JComboBox();\n jBIrAlPV = new javax.swing.JButton();\n jCBPadresV = new javax.swing.JComboBox();\n jBIrAlHV = new javax.swing.JButton();\n jCBHijosV = new javax.swing.JComboBox();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenuEsquema = new javax.swing.JMenu();\n jMenuEsquemaAbrir = new javax.swing.JMenuItem();\n jMenuEsquemaCerrar = new javax.swing.JMenuItem();\n jMenuEsquemaGuardar = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JSeparator();\n jMenuEsquemaExit = new javax.swing.JMenuItem();\n jMenuRegistro = new javax.swing.JMenu();\n jMenuNuevo = new javax.swing.JMenuItem();\n jSeparator2 = new javax.swing.JSeparator();\n jMenuInsertar = new javax.swing.JMenuItem();\n jMenuBorrar = new javax.swing.JMenuItem();\n jMenuActualizar = new javax.swing.JMenuItem();\n jMenuBusq = new javax.swing.JMenu();\n jMenuComenzar = new javax.swing.JMenuItem();\n jMenuSiguiente = new javax.swing.JMenuItem();\n jMenuAnterior = new javax.swing.JMenuItem();\n jSeparator4 = new javax.swing.JSeparator();\n jMenuVinculo = new javax.swing.JMenu();\n jMenuPadre = new javax.swing.JMenuItem();\n jMenuHijo = new javax.swing.JMenuItem();\n jSeparator6 = new javax.swing.JSeparator();\n jMenuPV = new javax.swing.JMenuItem();\n jMenuHV = new javax.swing.JMenuItem();\n jSeparator5 = new javax.swing.JSeparator();\n jMenuBusqCompleja = new javax.swing.JMenuItem();\n jSeparator10 = new javax.swing.JSeparator();\n jMenuAccInv = new javax.swing.JMenuItem();\n jSeparator3 = new javax.swing.JSeparator();\n jMenuListados = new javax.swing.JMenu();\n jMenuMantenimiento = new javax.swing.JMenu();\n jMenuMantImportar = new javax.swing.JMenuItem();\n jSeparator7 = new javax.swing.JSeparator();\n jMenuMantCompactar = new javax.swing.JMenuItem();\n jMenuMantReorganizar = new javax.swing.JMenuItem();\n jSeparator8 = new javax.swing.JSeparator();\n jMenuMantCreaInd = new javax.swing.JMenuItem();\n jMenuMantDestInd = new javax.swing.JMenuItem();\n jMenuMantReorgInd = new javax.swing.JMenuItem();\n jMenuHelp = new javax.swing.JMenu();\n jMenuHelpChar = new javax.swing.JMenuItem();\n jSeparator9 = new javax.swing.JSeparator();\n jMenuHelpAbout = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Sistema Gestor De Ficheros 'Los Conductores'\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n\n jPanel.setMinimumSize(new java.awt.Dimension(374, 3000));\n jPanel.setPreferredSize(new java.awt.Dimension(850, 3000));\n jPanel.setLayout(new java.awt.BorderLayout());\n\n jPCampos.setMinimumSize(new java.awt.Dimension(0, 1600));\n jPCampos.setPreferredSize(new java.awt.Dimension(0, 1600));\n jPCampos.setLayout(new javax.swing.BoxLayout(jPCampos, javax.swing.BoxLayout.Y_AXIS));\n jPanel.add(jPCampos, java.awt.BorderLayout.CENTER);\n\n jPanel4.setMaximumSize(new java.awt.Dimension(134, 30));\n jPanel4.setMinimumSize(new java.awt.Dimension(134, 30));\n jPanel4.setLayout(new java.awt.BorderLayout());\n\n jPanel14.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));\n\n jLStatusBar.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLStatusBar.setText(\" \");\n jLStatusBar.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);\n jPanel14.add(jLStatusBar);\n\n jPanel4.add(jPanel14, java.awt.BorderLayout.WEST);\n\n jLNAccesos.setText(\"Nº de accesos\");\n jPAccesos.add(jLNAccesos);\n\n jTFNAccesos.setColumns(4);\n jTFNAccesos.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n jTFNAccesos.setText(\"0\");\n jPAccesos.add(jTFNAccesos);\n\n jPanel4.add(jPAccesos, java.awt.BorderLayout.EAST);\n\n jPanel.add(jPanel4, java.awt.BorderLayout.SOUTH);\n\n jPanel2.setMaximumSize(new java.awt.Dimension(374, 60));\n jPanel2.setMinimumSize(new java.awt.Dimension(374, 60));\n jPanel2.setPreferredSize(new java.awt.Dimension(374, 60));\n jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.Y_AXIS));\n\n jPBotones1.setPreferredSize(new java.awt.Dimension(278, 20));\n jPBotones1.setLayout(new javax.swing.BoxLayout(jPBotones1, javax.swing.BoxLayout.LINE_AXIS));\n\n jBAbrirSGFF.setToolTipText(\"Abrir sistema de ficheros\");\n jBAbrirSGFF.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAbrirSGFFActionPerformed(evt);\n }\n });\n jToolBar1.add(jBAbrirSGFF);\n\n jBGuardarSGFF.setToolTipText(\"Guardar sistema de ficheros\");\n jBGuardarSGFF.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBGuardarSGFFActionPerformed(evt);\n }\n });\n jToolBar1.add(jBGuardarSGFF);\n\n jBImportarSGFF.setToolTipText(\"Importar fichero\");\n jBImportarSGFF.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBImportarSGFFActionPerformed(evt);\n }\n });\n jToolBar1.add(jBImportarSGFF);\n\n jPBotones1.add(jToolBar1);\n\n jBNuevaFicha.setToolTipText(\"Nueva ficha\");\n jBNuevaFicha.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBNuevaFichaActionPerformed(evt);\n }\n });\n jToolBar2.add(jBNuevaFicha);\n\n jCBArchivos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jCBArchivosItemStateChanged(evt);\n }\n });\n jToolBar2.add(jCBArchivos);\n\n jBComenzarConsulta.setToolTipText(\"Comenzar consulta\");\n jBComenzarConsulta.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBComenzarConsultaActionPerformed(evt);\n }\n });\n jToolBar2.add(jBComenzarConsulta);\n\n jBRegistroAnterior.setToolTipText(\"Registro anterior\");\n jBRegistroAnterior.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBRegistroAnteriorActionPerformed(evt);\n }\n });\n jToolBar2.add(jBRegistroAnterior);\n\n jBRegistroSiguiente.setToolTipText(\"Registro siguiente\");\n jBRegistroSiguiente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBRegistroSiguienteActionPerformed(evt);\n }\n });\n jToolBar2.add(jBRegistroSiguiente);\n\n jBListar.setComponentPopupMenu(jPMListar);\n jBListar.setToolTipText(\"Listar\");\n jBListar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBListarActionPerformed(evt);\n }\n });\n jToolBar2.add(jBListar);\n\n jBAccInv.setComponentPopupMenu(jPMListar);\n jBAccInv.setToolTipText(\"Acceso invertido\");\n jBAccInv.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAccInvActionPerformed(evt);\n }\n });\n jToolBar2.add(jBAccInv);\n\n jPBotones1.add(jToolBar2);\n\n jBInsertarRegistro.setToolTipText(\"Insertar registro\");\n jBInsertarRegistro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBInsertarRegistroActionPerformed(evt);\n }\n });\n jToolBar3.add(jBInsertarRegistro);\n\n jBBorrarRegistro.setToolTipText(\"Borrar registro\");\n jBBorrarRegistro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBBorrarRegistroActionPerformed(evt);\n }\n });\n jToolBar3.add(jBBorrarRegistro);\n\n jBActualizarRegistro.setToolTipText(\"Actualizar registro\");\n jBActualizarRegistro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBActualizarRegistroActionPerformed(evt);\n }\n });\n jToolBar3.add(jBActualizarRegistro);\n\n jPBotones1.add(jToolBar3);\n\n jBCaracteres.setFont(new java.awt.Font(\"Arial Black\", 3, 11)); // NOI18N\n jBCaracteres.setText(\"\\\\?\");\n jBCaracteres.setToolTipText(\"Consulta los caracteres especiales\");\n jBCaracteres.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBCaracteresActionPerformed(evt);\n }\n });\n jToolBar4.add(jBCaracteres);\n\n jBAyuda.setToolTipText(\"Ayuda\");\n jBAyuda.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAyudaActionPerformed(evt);\n }\n });\n jToolBar4.add(jBAyuda);\n\n jBSSGFF.setToolTipText(\"Salir del gestor de ficheros\");\n jBSSGFF.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBSSGFFActionPerformed(evt);\n }\n });\n jToolBar4.add(jBSSGFF);\n\n jPBotones1.add(jToolBar4);\n\n jPanel2.add(jPBotones1);\n\n jPBotones2.setPreferredSize(new java.awt.Dimension(149, 20));\n jPBotones2.setLayout(new javax.swing.BoxLayout(jPBotones2, javax.swing.BoxLayout.LINE_AXIS));\n\n jToolBar5.setMinimumSize(new java.awt.Dimension(137, 25));\n\n jBIrAlPadre.setToolTipText(\"Ir al padre\");\n jBIrAlPadre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBIrAlPadreActionPerformed(evt);\n }\n });\n jToolBar5.add(jBIrAlPadre);\n\n jBIrAlHijo.setToolTipText(\"Ir al hijo nº\");\n jBIrAlHijo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBIrAlHijoActionPerformed(evt);\n }\n });\n jToolBar5.add(jBIrAlHijo);\n\n jCBHijos.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jCBHijosItemStateChanged(evt);\n }\n });\n jToolBar5.add(jCBHijos);\n\n jBIrAlPV.setToolTipText(\"Ir al padre virtual nº\");\n jBIrAlPV.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBIrAlPVActionPerformed(evt);\n }\n });\n jToolBar5.add(jBIrAlPV);\n\n jCBPadresV.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jCBPadresVItemStateChanged(evt);\n }\n });\n jToolBar5.add(jCBPadresV);\n\n jBIrAlHV.setToolTipText(\"Ir al hijo virtual nº\");\n jBIrAlHV.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBIrAlHVActionPerformed(evt);\n }\n });\n jToolBar5.add(jBIrAlHV);\n\n jCBHijosV.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jCBHijosVItemStateChanged(evt);\n }\n });\n jToolBar5.add(jCBHijosV);\n\n jPBotones2.add(jToolBar5);\n\n jPanel2.add(jPBotones2);\n\n jPanel.add(jPanel2, java.awt.BorderLayout.NORTH);\n\n getContentPane().add(jPanel, java.awt.BorderLayout.CENTER);\n\n jMenuBar1.setMinimumSize(new java.awt.Dimension(840, 2));\n\n jMenuEsquema.setText(\"Esquema\");\n\n jMenuEsquemaAbrir.setText(\"Abrir\");\n jMenuEsquemaAbrir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuEsquemaAbrirActionPerformed(evt);\n }\n });\n jMenuEsquema.add(jMenuEsquemaAbrir);\n\n jMenuEsquemaCerrar.setText(\"Cerrar\");\n jMenuEsquemaCerrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuEsquemaCerrarActionPerformed(evt);\n }\n });\n jMenuEsquema.add(jMenuEsquemaCerrar);\n\n jMenuEsquemaGuardar.setText(\"Guardar\");\n jMenuEsquemaGuardar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuEsquemaGuardarActionPerformed(evt);\n }\n });\n jMenuEsquema.add(jMenuEsquemaGuardar);\n jMenuEsquema.add(jSeparator1);\n\n jMenuEsquemaExit.setText(\"Salir\");\n jMenuEsquemaExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuEsquemaExitActionPerformed(evt);\n }\n });\n jMenuEsquema.add(jMenuEsquemaExit);\n\n jMenuBar1.add(jMenuEsquema);\n\n jMenuRegistro.setText(\"Registro\");\n\n jMenuNuevo.setText(\"Nueva ficha\");\n jMenuNuevo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuNuevoActionPerformed(evt);\n }\n });\n jMenuRegistro.add(jMenuNuevo);\n jMenuRegistro.add(jSeparator2);\n\n jMenuInsertar.setText(\"Insertar en\");\n jMenuInsertar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuInsertarActionPerformed(evt);\n }\n });\n jMenuRegistro.add(jMenuInsertar);\n\n jMenuBorrar.setText(\"Borrar de\");\n jMenuBorrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuBorrarActionPerformed(evt);\n }\n });\n jMenuRegistro.add(jMenuBorrar);\n\n jMenuActualizar.setText(\"Actualizar registros del\");\n jMenuActualizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuActualizarActionPerformed(evt);\n }\n });\n jMenuRegistro.add(jMenuActualizar);\n\n jMenuBar1.add(jMenuRegistro);\n\n jMenuBusq.setText(\"Búsqueda\");\n\n jMenuComenzar.setText(\"Comenzar búsqueda sobre\");\n jMenuComenzar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuComenzarActionPerformed(evt);\n }\n });\n jMenuBusq.add(jMenuComenzar);\n\n jMenuSiguiente.setText(\"Siguiente\");\n jMenuSiguiente.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuSiguienteActionPerformed(evt);\n }\n });\n jMenuBusq.add(jMenuSiguiente);\n\n jMenuAnterior.setText(\"Anterior\");\n jMenuAnterior.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuAnteriorActionPerformed(evt);\n }\n });\n jMenuBusq.add(jMenuAnterior);\n jMenuBusq.add(jSeparator4);\n\n jMenuVinculo.setText(\"Ir a...\");\n\n jMenuPadre.setText(\"Registro padre\");\n jMenuPadre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuPadreActionPerformed(evt);\n }\n });\n jMenuVinculo.add(jMenuPadre);\n\n jMenuHijo.setText(\"Primer hijo\");\n jMenuHijo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuHijoActionPerformed(evt);\n }\n });\n jMenuVinculo.add(jMenuHijo);\n jMenuVinculo.add(jSeparator6);\n\n jMenuPV.setText(\"Padre virtual\");\n jMenuPV.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuPVActionPerformed(evt);\n }\n });\n jMenuVinculo.add(jMenuPV);\n\n jMenuHV.setText(\"Hijo virtual\");\n jMenuHV.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuHVActionPerformed(evt);\n }\n });\n jMenuVinculo.add(jMenuHV);\n\n jMenuBusq.add(jMenuVinculo);\n jMenuBusq.add(jSeparator5);\n\n jMenuBusqCompleja.setText(\"Busqueda avanzada\");\n jMenuBusqCompleja.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuBusqComplejaActionPerformed(evt);\n }\n });\n jMenuBusq.add(jMenuBusqCompleja);\n jMenuBusq.add(jSeparator10);\n\n jMenuAccInv.setText(\"Acceso Invertido\");\n jMenuAccInv.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuAccInvActionPerformed(evt);\n }\n });\n jMenuBusq.add(jMenuAccInv);\n jMenuBusq.add(jSeparator3);\n\n jMenuListados.setText(\"Listados\");\n jMenuBusq.add(jMenuListados);\n\n jMenuBar1.add(jMenuBusq);\n\n jMenuMantenimiento.setText(\"Mantenimiento\");\n\n jMenuMantImportar.setText(\"Importar\");\n jMenuMantImportar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuMantImportarActionPerformed(evt);\n }\n });\n jMenuMantenimiento.add(jMenuMantImportar);\n jMenuMantenimiento.add(jSeparator7);\n\n jMenuMantCompactar.setText(\"Compactar\");\n jMenuMantCompactar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuMantCompactarActionPerformed(evt);\n }\n });\n jMenuMantenimiento.add(jMenuMantCompactar);\n\n jMenuMantReorganizar.setText(\"Reorganizar espacio\");\n jMenuMantReorganizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuMantReorganizarActionPerformed(evt);\n }\n });\n jMenuMantenimiento.add(jMenuMantReorganizar);\n jMenuMantenimiento.add(jSeparator8);\n\n jMenuMantCreaInd.setText(\"Crear índice\");\n jMenuMantCreaInd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuMantCreaIndActionPerformed(evt);\n }\n });\n jMenuMantenimiento.add(jMenuMantCreaInd);\n\n jMenuMantDestInd.setText(\"Destruir índice\");\n jMenuMantDestInd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuMantDestIndActionPerformed(evt);\n }\n });\n jMenuMantenimiento.add(jMenuMantDestInd);\n\n jMenuMantReorgInd.setText(\"Reorganizar índice\");\n jMenuMantReorgInd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuMantReorgIndActionPerformed(evt);\n }\n });\n jMenuMantenimiento.add(jMenuMantReorgInd);\n\n jMenuBar1.add(jMenuMantenimiento);\n\n jMenuHelp.setText(\"Ayuda\");\n\n jMenuHelpChar.setText(\"Etiquetas especiales...\");\n jMenuHelpChar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuHelpCharActionPerformed(evt);\n }\n });\n jMenuHelp.add(jMenuHelpChar);\n jMenuHelp.add(jSeparator9);\n\n jMenuHelpAbout.setText(\"Acerca de...\");\n jMenuHelpAbout.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuHelpAboutActionPerformed(evt);\n }\n });\n jMenuHelp.add(jMenuHelpAbout);\n\n jMenuBar1.add(jMenuHelp);\n\n setJMenuBar(jMenuBar1);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n repositoryLabel = new javax.swing.JLabel();\n issueLabel = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n issuePanel = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n\n repositoryLabel.setLabelFor(repositoryComboBox);\n org.openide.awt.Mnemonics.setLocalizedText(repositoryLabel, org.openide.util.NbBundle.getMessage(QuickSearchPanel.class, \"QuickSearchPanel.repositoryLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(issueLabel, org.openide.util.NbBundle.getMessage(QuickSearchPanel.class, \"QuickSearchPanel.issueLabel.text\")); // NOI18N\n\n jLabel2.setForeground(javax.swing.UIManager.getDefaults().getColor(\"Label.disabledForeground\"));\n org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(QuickSearchPanel.class, \"QuickSearchPanel.jLabel2.text\")); // NOI18N\n\n issuePanel.setLayout(new java.awt.BorderLayout());\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(issuePanel, javax.swing.GroupLayout.DEFAULT_SIZE, 477, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(issuePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2))\n );\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(QuickSearchPanel.class, \"QuickSearchPanel.jLabel1.text\")); // NOI18N\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(repositoryLabel)\n .addComponent(issueLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(repositoryComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel1)\n .addContainerGap())\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(repositoryLabel)\n .addComponent(repositoryComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(issueLabel))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n repositoryComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(QuickSearchPanel.class, \"QuickSearchPanel.repositoryComboBox.AccessibleContext.accessibleDescription\")); // NOI18N\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n jCheckBox1 = new javax.swing.JCheckBox();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox3 = new javax.swing.JCheckBox();\n jCheckBox4 = new javax.swing.JCheckBox();\n jSeparator1 = new javax.swing.JSeparator();\n licenseLabel = new javax.swing.JLabel();\n licenseComboBox = new javax.swing.JComboBox();\n jCheckBox5 = new javax.swing.JCheckBox();\n jSeparator2 = new javax.swing.JSeparator();\n pack200Info = new javax.swing.JLabel();\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.Platforms.Label\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.OSLabelWindows\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jCheckBox2, org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.OSLabelLinux\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jCheckBox3, org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.OSLabelMacOS\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jCheckBox4, org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.OSLabelSolaris\")); // NOI18N\n\n licenseLabel.setLabelFor(licenseComboBox);\n org.openide.awt.Mnemonics.setLocalizedText(licenseLabel, org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.licenseLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jCheckBox5, org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.pack200checkBox.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(pack200Info, org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.Pack200.Description.Text\")); // NOI18N\n pack200Info.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n pack200Info.setFocusable(false);\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(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 1122, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jCheckBox1)\n .addComponent(jCheckBox2)\n .addComponent(jCheckBox3)\n .addComponent(jCheckBox4))\n .addGap(53, 53, 53))\n .addGroup(layout.createSequentialGroup()\n .addComponent(licenseLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(licenseComboBox, 0, 1027, Short.MAX_VALUE)))\n .addGap(0, 0, 0))))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jCheckBox5, javax.swing.GroupLayout.DEFAULT_SIZE, 1116, Short.MAX_VALUE)\n .addContainerGap())\n .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 1122, Short.MAX_VALUE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(pack200Info, javax.swing.GroupLayout.DEFAULT_SIZE, 1091, Short.MAX_VALUE)\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.BASELINE)\n .addComponent(jCheckBox1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBox2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBox3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBox4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(licenseLabel)\n .addComponent(licenseComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(7, 7, 7)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jCheckBox5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(pack200Info, javax.swing.GroupLayout.DEFAULT_SIZE, 26, Short.MAX_VALUE)\n .addGap(99, 99, 99))\n );\n\n jLabel2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.Platforms.Label\")); // NOI18N\n jCheckBox1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.OSLabelWindows.AccessibleContext.accessible\")); // NOI18N\n jCheckBox2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.OSLabelLinux.AccessibleContext.accessible\")); // NOI18N\n jCheckBox3.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.OSLabelMacOS.AccessibleContext.accessible\")); // NOI18N\n jCheckBox4.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.OSLabelSolaris.AccessibleContext.accessible\")); // NOI18N\n licenseComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.licenseComboBox.AccessibleContext.accessibleName\")); // NOI18N\n licenseComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.licenseComboBox.AccessibleContext.accessibleDescription\")); // NOI18N\n jCheckBox5.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, \"InstallerPanel.jCheckBox5.AccessibleContext.accessibleDescription\")); // NOI18N\n }", "public void initialize(){\n\n //load Settings\n settings = new Settings(settingsFile);\n if (settings.isExcludeCupboard()){\n cupboardCheckBox.setSelected(true);\n }\n\n //The first pane to see when the program starts is the meals Browse pane\n mealsBtnClicked();\n\n //set up focus and out of focus styling for all the Panes\n styleIngredientBrowsePane();\n styleIngredientAddPane();\n styleMealAddPane();\n styleMealBrowsePane();\n stylePlanShoppingListPane();\n stylePlanWeeklyPlanner();\n stylePlanCupboard();\n\n //setup the Ingredients Browse Pane\n setupBrowseIngredientsPane();\n\n //setup up the main menu hoover button effects\n setupHoverMainMenuButtons();\n\n //setup the meal Add Pane\n MealAddPaneSetUp();\n\n //setup the meal Browse Pane\n mealBrowsePaneSetup();\n\n //setup up the meal planner weekly pane\n weeklyPlannerSetup();\n\n //setup the planner shopping list pane\n plannerShoppingListSetup();\n\n //setup the planner cupboard pane\n plannerCupboardSetup();\n\n //Load the meals from the database\n loadMeals();\n\n //set up the focus styling for the minimise and exit buttons\n setupWindowButtons();\n\n //when the program loads, load the shopping list and meal planner from previous usage\n loadShoppingList();\n loadMealPlanner();\n\n //Set up the information boxes instance for ingredient pane, meal pane and planner pane\n plannerBox = new InformationBox(PlannerPlanPane, plannerColor, plannerColorDark,\n \"images/icons8_planner_96px_Black.png\");\n mealBox = new InformationBox(MealsBrowsePane, mealColor, mealColorDark,\n \"images/icons8_cutlery_96px_Black.png\");\n ingredientBox = new InformationBox(IngredientsBrowsePane, ingredientColor, ingredientColorDark,\n \"images/icons8_apple_96px_Black.png\");\n\n }", "@SuppressWarnings(\"unchecked\")\n private void addComboBox() throws Exception{\n\n Connection con = Coagent.getConnection();\n PreparedStatement query = con.prepareStatement(\"SELECT Publisher_Name FROM publishers;\");\n ResultSet result = query.executeQuery();\n\n while(result.next()){\n jComboBoxAdd.addItem(result.getString(1));\n }\n }", "private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }", "private void initMyComponents() {\n this.jPanel1.setLayout(new BoxLayout(this.jPanel1, BoxLayout.Y_AXIS));\n this.jPanel1.add(controller.getPressureController().getEMeasureBasicView());\n this.jPanel1.add(controller.getTemperatureController().getEMeasureBasicView());\n this.controller.getPressureController().getListeners().add(this);\n this.controller.getTemperatureController().getListeners().add(this);\n this.jComboBox1.setModel(new DefaultComboBoxModel(FluidKind.values()));\n this.changeResponce();\n }", "private JComboBox accountSelector()\n\t{\n\t\tJComboBox viewSelectorDropdown = new JComboBox();\n\t\tviewSelectorDropdown.setBackground(ColorScheme.DARKER_GRAY_COLOR.darker());\n\t\tviewSelectorDropdown.setFocusable(false);\n\t\tviewSelectorDropdown.setForeground(ColorScheme.GRAND_EXCHANGE_PRICE);\n\t\tviewSelectorDropdown.setRenderer(new ComboBoxListRenderer());\n\t\tviewSelectorDropdown.setToolTipText(\"Select which of your account's trades list you want to view\");\n\t\tviewSelectorDropdown.addItemListener(event ->\n\t\t{\n\t\t\tif (event.getStateChange() == ItemEvent.SELECTED)\n\t\t\t{\n\t\t\t\tString selectedName = (String) event.getItem();\n\t\t\t\tplugin.changeView(selectedName);\n\t\t\t}\n\t\t});\n\n\t\treturn viewSelectorDropdown;\n\t}", "public void addClubSelector() {\n\n if (clubSelectorTour == null) {\n clubSelectorTour = calendarMenu.addItem(\"Set Club\", command -> {\n\n Window window = new Window(\"Select Club for Calendar Events\");\n window.setWidth(\"400px\");\n window.setHeight(\"200px\");\n getUI().addWindow(window);\n window.center();\n window.setModal(true);\n C<Club> cs = new C<>(Club.class);\n ComboBox clubs = new ComboBox(\"Club\", cs.c());\n clubs.setItemCaptionMode(ItemCaptionMode.ITEM);\n clubs.setNullSelectionAllowed(false);\n\n clubs.setFilteringMode(FilteringMode.CONTAINS);\n Button done = new Button(\"Done\");\n done.addClickListener(listener -> {\n window.close();\n Object id = clubs.getValue();\n if (id != null) {\n calendar.filterEventOwnerId(id);\n setClubName(id);\n calendar.markAsDirty();\n }\n });\n\n EVerticalLayout l = new EVerticalLayout(clubs, done);\n\n window.setContent(l);\n });\n }\n }", "public NderroPass() {\n initComponents();\n loadComboBox();\n }", "public JoingApplicationChooser()\n {\n initComponents();\n \n createTree();\n createText();\n \n split.setTopComponent( new JScrollPane( tree ) );\n split.setBottomComponent( new JScrollPane( text ) );\n split.setResizeWeight( 0.9d );\n \n tree.addTreeSelectionListener( new TreeSelectionListener()\n {\n public void valueChanged( TreeSelectionEvent tse )\n {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();\n String sDesc = null;\n \n if( node != null )\n {\n Object obj = node.getUserObject();\n \n if( obj instanceof AppGroup ) sDesc = ((AppGroup) obj).getDescription();\n else if( obj instanceof AppDescriptor ) sDesc = ((AppDescriptor) obj).getDescription();\n }\n \n text.setText( sDesc );\n }\n } );\n }" ]
[ "0.7026598", "0.67470324", "0.64124537", "0.6391689", "0.63735324", "0.6372954", "0.6306446", "0.63000435", "0.6233967", "0.6170207", "0.6166062", "0.6161151", "0.61518615", "0.6083895", "0.6077401", "0.6047761", "0.60379046", "0.60340285", "0.5999413", "0.5990583", "0.59875417", "0.5976019", "0.5971594", "0.59610313", "0.59574157", "0.59531975", "0.5951859", "0.5940487", "0.5939251", "0.59370494", "0.593695", "0.5935602", "0.5924307", "0.5922898", "0.59115285", "0.58937216", "0.58853245", "0.5884546", "0.5884363", "0.58766717", "0.5865492", "0.58494127", "0.58475715", "0.5844637", "0.58371645", "0.5826248", "0.58257216", "0.5823782", "0.58227396", "0.58160824", "0.5807969", "0.5803912", "0.5797951", "0.5795204", "0.5792292", "0.5790573", "0.5781937", "0.5779658", "0.5778135", "0.5771228", "0.5769256", "0.576671", "0.5758638", "0.57582706", "0.57416695", "0.57327914", "0.5704681", "0.5701625", "0.5699029", "0.56953746", "0.5691617", "0.5679691", "0.5677595", "0.5670763", "0.56617016", "0.5660253", "0.5653647", "0.56501645", "0.56482315", "0.56470853", "0.5645534", "0.5644756", "0.5638526", "0.5637765", "0.5631531", "0.56296897", "0.56287616", "0.561514", "0.56148213", "0.5613776", "0.560971", "0.5609169", "0.56013286", "0.56006473", "0.55977255", "0.559744", "0.5595173", "0.5590846", "0.55801296", "0.5579397" ]
0.62556326
8
responder to user menu selections
@Override public void actionPerformed(ActionEvent evt) { JComboBox cb = (JComboBox)evt.getSource(); String look = (String) cb.getSelectedItem(); System.out.println("picked = " + look); try { UIManager.setLookAndFeel(look); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (UnsupportedLookAndFeelException e) { e.printStackTrace(); } mainWindow.closeWindow(); mainWindow.drawMainWindow(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void userForm(){\n\t\tSystem.out.print(menu);\n\t\tScanner input = new Scanner(System.in);\n\t\tselection = input.nextInt();\n\t\tmenuActions(selection);\n\t\t}", "public void select() {\n \t\t\tString sinput = \"\";\r\n \t\t\tOption selected = null;\r\n \t\t\tErrorLog.debug(name + \" selected.\");\r\n \t\t\t\r\n \t\t\twhile (true) {\r\n \t\t\t\tSystem.out.println(toString()); //Print menu.\r\n \t\t\t\tsinput = read(); //Get user selection.\r\n \t\t\t\tif (!sinput.equalsIgnoreCase(\"exit\")) {\r\n \t\t\t\t\tselected = options.get(sinput); //Find corresponding option.\r\n \r\n \t\t\t\t\tif (selected != null) //Sinput corresponds to an extant option.\r\n \t\t\t\t\t\tselected.select(); //Select the selected.\r\n \t\t\t\t\telse\r\n \t\t\t\t\t\tprint(sinput + \" is not a valid option\");\r\n \t\t\t\t} else\r\n \t\t\t\t\t{print(\"Returning to previous menu.\"); break;}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tErrorLog.debug (\"Quitting \" + name + \". Sinput:\"+sinput);\r\n \t\t\t\r\n \t\t\treturn;\r\n \t\t}", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "public static void menuActions(int selection){\n\t\tselection = 1;\n\t\tswitch (selection){\n\t\t\tcase 1: //prompt user to input a new record, save response.\n\t\t\t\t//call method addNew here\n\t\t\tbreak; \n\t\t\tcase 2: //prompt user to search using first, last, or telephone\n\t\t\t//call method to search\n\t\t\t//display results\n\t\t\t//if multiple, select which to delete\n\t\t\t//call method for arraylist to delete \n\t\t\tbreak;\n\t\t\tcase 3: //prompt user to search by telephone\n\t\t\t//call method to search by #\n\t\t\t//display results\n\t\t\tbreak;\n\t\t\tcase 4: //prompt user to search by first name\n\t\t\t//call method to search by firstName\n\t\t\t//display results\n\t\t\tbreak;\n\t\t\tcase 5: //prompt user to search by last name\n\t\t\t//call method to search by LastName\n\t\t\t//display results\n\t\t\tbreak;\n\t\t\tcase 6: //prompt user to search by methods 1,2, or 3\n\t\t\t//call method to search\n\t\t\t//display results\n\t\t\t//verify selection with user\n\t\t\t//prompt user to replace input\n\t\t\tbreak;\n\t\t\tcase 7: //terminate program;\n\t\t\tSystem.exit(0);\n\t\t\tbreak;\n\t\t\tdefault: \n\t\t\tSystem.out.print(\"Please enter a valid selection (1-7)\");\n\t\t\t//call userForm to prompt a new menu box;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "@Override\n public void menuSelected(MenuEvent e) {\n \n }", "@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}", "void askMenu();", "public void run(){\n int selection = -1;\n super.myConsole.listOptions(menuOptions);\n selection = super.myConsole.getInputOption(menuOptions);\n branchMenu(selection);\n }", "public void menuClicked(MenuItem menuItemSelected);", "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}", "@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}", "public void getMenuChoice()\n {\n boolean finished = false;\n \n while(!finished)\n {\n printHeading();\n String choice = Menu.getMenuChoice(menuChoices);\n executeMenuChoice(choice);\n \n if(choice.startsWith(\"quit\"))\n {\n finished = true;\n }\n }\n }", "@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}", "public int displayMenuAndGetUserSelection(){\n view.promptInt(\"1. Create a Character\");\n view.promptInt(\"2. Update a Character\");\n view.promptInt(\"3. Display all Characters\");\n view.promptInt(\"4. Search for a Character\");\n view.promptInt(\"5. Delete a Character\");\n view.promptInt(\"6. Exit\");\n return view.promptInt(\"Select from one of the above choices\");\n }", "@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}", "@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "private static void MainMenuRec(){\n System.out.println(\"Choose one of the following:\");\n System.out.println(\"-----------------------------\");\n System.out.println(\"1. Book room\");\n System.out.println(\"2. Check-out\");\n System.out.println(\"3. See room list\");\n System.out.println(\"4. Create a new available room\");\n System.out.println(\"5. Delete a room\");\n System.out.println(\"6. Make a room unavailable\");\n System.out.println(\"7. Make a (unavailable) room available\");\n System.out.println(\"8. Back to main menu\");\n System.out.println(\"-----------------------------\");\n }", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "private void selectMenu()\n\t{\n\t\t//clear the panel first\n\t\tclearPanel(getPanel1());\n\t\t\n\t\tJLabel label1=new JLabel(\"Select two rows to inspect data:\");\n\t\t\n\t\t//set up panel\n\t\tgetPanel1().setLayout(null);\n\t\tadd(getPanel1(),BorderLayout.CENTER);\n\t\t\n\t\t//add buttons to panel\n\t\tgetPanel1().add(getButton1());\n\t\tgetPanel1().add(getTopics1());\n\t\tgetPanel1().add(getTopics2());\n\t\tgetPanel1().add(label1);\n\t\t\n\t\t\n\t\t//manually set their position\n\t\tlabel1.setBounds(380,10,400,40);\n\t\tgetButton1().setBounds(430,350,230,60);\n\t\tgetTopics1().setBounds(430,80,230,60);\n\t\tgetTopics2().setBounds(430,215,230,60);\n\n\t\tlabel1.setFont(new Font(\"Serif\", Font.CENTER_BASELINE, 24));\t\n\t}", "public void selected(String action);", "private void processChoice() {\n switch (this.choice) {\n case 0:\n System.out.println(\"Log Out\");\n break;\n case 1:\n System.out.println(\"Open New Account\");\n break;\n case 2:\n System.out.println(\"View All Accounts\");\n break;\n case 3:\n System.out.println(\"View Transactions\");\n break;\n case 4:\n System.out.println(\"Transfer Funds\");\n break;\n default:\n System.out.println(\"Error! Invalid menu option\");\n break;\n }\n }", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "public void main_menu()\n\t{\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.println(\"Please Select an option\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.print(\"1.Add 2.Update 3.Delete 4.Exit\\n\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tchoice=me.nextInt();\n\t\tthis.check_choice(choice);\n\t}", "public void readTheMenu();", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "@Override\r\n\tpublic void onMenuItemSelected(MenuItem item) {\n\r\n\t}", "@Override\n public void inputHandling() {\n if (input.clickedKeys.contains(InputHandle.DefinedKey.ESCAPE.getKeyCode())\n || input.clickedKeys.contains(InputHandle.DefinedKey.RIGHT.getKeyCode())) { \n if (sourceMenu != null) {\n exit();\n sourceMenu.activate(); \n return;\n }\n }\n \n if (input.clickedKeys.contains(InputHandle.DefinedKey.UP.getKeyCode())) { \n if (selection > 0) {\n selection--;\n }\n }\n \n if (input.clickedKeys.contains(InputHandle.DefinedKey.DOWN.getKeyCode())) { \n if (selection < choices.size() - 1) {\n selection++;\n } \n }\n \n if (input.clickedKeys.contains(InputHandle.DefinedKey.ENTER.getKeyCode())) {\n if (choices.size() > 0) {\n use();\n }\n exit(); \n }\n }", "private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }", "public void mainMenuOption() {\n\t\tScanner keyboard = new Scanner( System.in );\n\t\t\n\t\tfirstMenu();\n\t\t\n\t\tString input = keyboard.nextLine();\n\t\twhile(input != \"0\"){\n\t\t\t\n\t\t\t switch(input){\n\t case \"0\" : System.out.println(\"You close the App\"); \n\t \t\t\tSystem.exit(0);\n\t break;\n\t \n\t case \"1\" : IdentityMenu();\n\t break;\n\t \n\t case \"2\" : AddressMenu();\n\t \tbreak;\n\t \n\t default :\tSystem.out.println(\"Invalid selection\"); \n\t \t\t\tmainMenuOption();\n\t break;\t\n\t \n\t\t\t }\n\t\t break;\n\t\t}\n\t}", "public static void displayMenu() {\r\n System.out.print(\"\\nName Saver Server Menu\\n\\n\"\r\n +\"1. Add a name\\n2. Remove a name\\n3. List all names\\n\"\r\n +\"4. Check if name recorded\\n5. Exit\\n\\n\"\r\n +\"Enter selection [1-5]:\");\r\n }", "protected void printMenu() {\n System.out.println(\"\\nChoose an option:\");\n }", "private void ComboUserActionPerformed(java.awt.event.ActionEvent evt) {\n if(ComboUser.getSelectedItem().equals(\"title\")){\n \n selected=1;\n }\n else if(ComboUser.getSelectedItem().equals(\"author\"))\n {\n selected=2;\n }\n else if(ComboUser.getSelectedItem().equals(\"subject\"))\n {\n selected=3;\n }\n }", "private void runMenu() {\n\t\tint selection;\n\t\tdo {\n\t\t\tdisplayMenu();\n\t\t\tselection = Integer.parseInt(sc.nextLine());\n\t\t\tprocessSelection(selection);\n\t\t} while (selection != 5);\n\t}", "public void run()\n {\n getMenuChoice();\n }", "public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }", "private static String mainMenu(){\n\t\tSystem.out.println(\"==================================\");\n\t\tSystem.out.println(\"Main Menu\");\n\t\tSystem.out.println(\"Please select from the following:\");\n\t\tSystem.out.println(\"1. Display all available courses and add course\");\n\t\tSystem.out.println(\"2. Display all enrolled courses and drop course\");\n\t\tSystem.out.println(\"3. Logout\");\n\t\tSystem.out.print(\"Enter the number of you request: \"); \n\t\tString selection = input.nextLine();\n\t\tSystem.out.println(\"\");\n\t\treturn selection;\n\t}", "public void menuOptions(String type) {\n System.out.println(\"\\n\" + \"To select an option, type what's inside the parenthesis.\");\n System.out.println(\"While in a sub-menu -> (0) Back out of a sub-menu. \\n\");\n System.out.println(\"Main Menu\");\n if (type.equals(\"Attendee\") || type.equals(\"VIP\")) {\n System.out.println(\"(1a) Message, (2a) Contacts, (3a) Signup, (4a) See Attendee Schedule\");\n System.out.println(\"(5a) Get Event Details, (6a) View Conference Schedule, \"+\n \" (p) Export the conference schedule to a PDF\");\n } else if (type.equals(\"Organizer\")) {\n System.out.println(\"(1o) Message, (2o) Contacts, (3o) View Conference Schedule\");\n System.out.println(\"(4o) Modify Events, (5o) Add room, (6o) Create a User account\"+\n \" (p) Export the conference schedule to a PDF\");\n System.out.println(\"(7o) View Current Rooms, (8o) Get Event Details\");\n } else if (type.equals(\"Speaker\")) {\n System.out.println(\"(1s) Message, (2s) Contacts, (3s) See Speaker Schedule\");\n System.out.println(\"(4s) Get Event Details, (5s) View Conference Schedule\"+\n \" (p) Export the conference schedule to a PDF\");\n }\n System.out.println(\"Type Quit to logout\");\n }", "@Override\n public String[] displayMenu() {\n\n PersonalMatchDAO personalMatchDAO = new PersonalMatchDAO();\n personalMatchDAO.listAllPersonalMatches();\n\n String[] str = {selection};\n return str;\n\n }", "public static void menu()\r\n {\n\t\t Scanner scan = new Scanner(System.in);\r\n\t\t System.out.println(\"Please enter your choice : \");\r\n\t\t int choice = scan.nextInt();\r\n\t\t switch(choice)\r\n\t\t {\r\n\t\t case 1:\r\n\t\t\t viewFiles();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t case 2: \r\n\t\t\t createNew();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t case 3: \r\n\t\t\t searchFile();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t case 4: \r\n\t\t deleteFile();\r\n\t\t goback();\r\n\t\t break;\r\n\t\t case 5: \r\n\t\t\t exit();\r\n\t\t\t goback();\r\n\t\t\t break;\r\n\t\t \r\n\t\t default :\r\n\t\t\t System.out.println(\"please enter a only 1,2,3 or 4\");\r\n\t\t\t goback();\r\n\t }\r\n\t }", "int promptOption(IMenu menu);", "public static void menu() {\n\t\tSystem.out.println(\"\\nPlease select which type of argument to generate by entering the associated number.\\n\");\n\t\tfor(int i = 0; i < type.length; i++) {\n\t\t\tSystem.out.println((i+1)+\". \"+type[i]);\n\t\t}\n\t\tSystem.out.println(\"8. Quit\");\n\t}", "private int getMenuSelection() {\n return view.printMenuAndGetSelection();\n }", "private void menuSelect(char playerInput) throws Exception {\n\t\tif (playerInput == '1' || playerInput == '2' || playerInput == '3' || playerInput == '4') {\n\t\t\t\n\t\t\t//If it is then run the appropiate command for the menu selection\n\t\t\tswitch (playerInput) {\n\t\t\t\t//Run the game at level 2\n\t\t\t\tcase '1': System.out.println(\"You have selected option 1\");\n\t\t\t\t\t\t break;\n\t\t\t\t//Run the game at level 1\n\t\t\t\tcase '2': System.out.println(\"You have selected option 2\");\n\t\t\t\t\t\t break;\n\t\t\t\t//Display the highscores board\n\t\t\t\tcase '3': System.out.println(\"You have selected option 3\");\n\t\t\t\t\t\t break;\n\t\t\t}\n\t\t\n\t\t//Otherwise if the input was not a permitted menu option\n\t\t} else {\n\t\t\t\n\t\t\t//Display a message informing the user\n\t\t\tSystem.out.println(\"\\n\\n\\n\\n\\n\\n\\n\\nInformation: Key Not Permitted - Please try again:\\n\");\n\t\t\t\n\t\t\t//Re-load the main menu for them to try again\n\t\t\tmainMenu();\n\t\t}\n\t}", "public void run() \n\t\t{\n\t\t\tboolean exitMenu = false;\n\t\t\tdo \n\t\t\t{\t\t\t\t\t\n\t\t\t\tmenu.display();\n\t\t\t\tint choice = menu.getUserSelection();\n\t\t\t\t// the above method call will return 0 if the user did not\n\t\t\t\t// entered a valid selection in the opportunities given...\n\t\t\t\t// Otherwise, it is valid...\n\t\t\t\tif (choice == 0)\n\t\t\t\t{\n\t\t\t\t\t// here the user can be informed that fail to enter a\n\t\t\t\t\t// valid input after all the opportunities given....\n\t\t\t\t\t// for the moment, just exit....\n\t\t\t\t\texitMenu = true;\n\t\t\t\t}\n\t\t\t\telse if (choice == 1) \n\t\t\t\t{\n\t\t\t\t\t// here goes your code to initiate action associated to\n\t\t\t\t\t// menu option 1....\n\t\t\t\t\tProjectUtils.operationsOnNumbers();\n\t\t\t\t}\n\t\t\t\telse if (choice == 2)\n\t\t\t\t{\n\t\t\t\t\tProjectUtils.operationsOnStrings();\n\t\t\t\t}\n\t\t\t\telse if (choice == 3) \n\t\t\t\t{\n\t\t\t\t\tProjectUtils.showStatistics();\n\t\t\t\t}\n\t\t\t\telse if (choice == 4)\n\t\t\t\t{\n\t\t\t\t\texitMenu = true; \n\t\t\t\t\tProjectUtils.println(\"Exiting now... \\nGoodbye!\");\n\t\t\t\t}\n\t\t\t} while (!exitMenu);\n\t\t}", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }", "private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}", "static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}", "void clickAmFromMenu();", "protected abstract void addMenuOptions();", "public String choosenMenu() {\n String value = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n menu_id = Integer.parseInt(value);\n String user = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser();\n if (user == null) {\n return \"choosenMenu\";\n } else {\n return \"chooseMenuUser\";\n }\n }", "public void update(){\n\t\tif(JudokaComponent.input.up) selectedItem --;\n\t\tif(JudokaComponent.input.down) selectedItem ++;\n\t\tif(selectedItem > items.length - 1) selectedItem = items.length - 1;\n\t\tif(selectedItem < 0) selectedItem = 0;\n\t\tif(JudokaComponent.input.enter){\n\t\t\tif(selectedItem == 0) JudokaComponent.changeMenu(JudokaComponent.CREATE_JUDOKA);\n\t\t\telse if(selectedItem == 1) JudokaComponent.changeMenu(JudokaComponent.SINGLEPLAYER);\n\t\t\telse if(selectedItem == 2) JudokaComponent.changeMenu(JudokaComponent.MULTIPLAYER);\n\t\t\telse if(selectedItem == 3) JudokaComponent.changeMenu(JudokaComponent.ABOUT);\n\t\t\telse if(selectedItem == 4) JudokaComponent.changeMenu(JudokaComponent.EXIT);\n\t\t}\n\t}", "private String printMainMenu() {\n System.out.println(\"Please make a selection:\");\n System.out.println(\"1: List all tools\");\n System.out.println(\"2: Search for tool by toolName\");\n System.out.println(\"3: Search for tool by toolID\");\n System.out.println(\"4: Check item quantity\");\n System.out.println(\"5: Decrease item quantity\");\n System.out.println(\"6: Make New Order/Append Today's Order\");\n System.out.println(\"7: View Current Orders\");\n System.out.println(\"8: View Supplier List\");\n System.out.println(\"9: Quit\");\n String selection = this.userInput.nextLine();\n return selection;\n }", "private void menuOptionOne(){\n SimulatorFacade.printTransactions();\n pressAnyKey();\n }", "public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }", "public static void userSelection(){\n\t\tint selection;\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Which program would you like to run?\");\n\t\tselection=input.nextInt();\n\n\t\tif(selection == 1)\n\t\t\tmazeUnion();\n\t\tif(selection == 2)\n\t\t\tunionPathCompression();\n\t\tif(selection == 3)\n\t\t\tmazeHeight();\n\t\tif(selection == 4)\n\t\t\tmazeSize();\n\t\tif(selection == 5)\n\t\t\tsizePathCompression();\n\t}", "private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }", "private static void returnMenu() {\n\t\t\r\n\t}", "public void branchMenu(int option){\n switch(option){\n case 1:\n System.out.println(\"Starting security view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SECURITY);\n break;\n case 2:\n System.out.println(\"Starting application view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.APPLICATION);\n break;\n case 3:\n System.out.println(\"Starting manager view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.MANAGER);\n break;\n case 4:\n System.out.println(\"Starting swipe view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SWIPE);\n break;\n case 5:\n System.out.println(\"Quitting application...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.QUIT);\n break;\n }\n }", "private void searchMenu(){\n\t\t\n\t}", "void onMenuItemClicked();", "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 }", "protected boolean menu() {\n\t\tint selection = 0;\n\t\twhile(selection != 6) {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"Please select your choice:\\n\" +\n\t\t\t\t\t\"1 - Play Human vs AI Game\\n\" +\n\t\t\t\t\t\"2 - Play AI vs AI Game\\n\" +\n\t\t\t\t\t\"3 - Quit\\n\" );\n\t\t\ttry {\n\t\t\t\tselection = Integer.parseInt(getFromUser(\"Enter selection: \"));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(\"Invalid Input - type the number corresponding to your selection\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tswitch(selection){\n\t\t\t\tcase 1: case 2: board = Factory.instance().makeBoard(selection); break;\n\t\t\t\tcase 3: quit(); break;\n\t\t\t\tdefault: System.out.println(\"Invalid Input\");\n\t\t\t}\n\t\t\tif(selection >= 1 && selection <= 4 && board != null){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void onLoadMenuMyFavoritesSelected();", "abstract void menu(User theUser);", "@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}", "private void adminMenuSelection(int choice) throws Exception {\n switch (choice) {\n case 1:\n System.out.println(\"Selection 1. Set Student Access Period\");\n this.setStudAccPeriod();\n break;\n\n case 2:\n System.out.println(\"Selection 2. Update Student Access Period\");\n this.updStudAccPeriod();\n break;\n\n case 3:\n System.out.println(\"Selection 3. Add A Student\");\n this.addStudentParticulars();\n break;\n\n case 4:\n System.out.println(\"Selection 4. Update A Student\");\n this.updStudentParticulars();\n break;\n\n case 5:\n System.out.println(\"Selection 5. Add A Course\");\n this.addCourse();\n break;\n\n case 6:\n System.out.println(\"Selection 6. Update A Course\");\n this.updCourse();\n break;\n\n case 7:\n System.out.println(\"Selection 7. Check Available Slot For an index number\");\n this.checkVacancy();\n break;\n\n case 8:\n System.out.println(\"Selection 8. Print student list by index \");\n this.printStudListByIndex();\n break;\n\n case 9:\n System.out.println(\"Selection 9. Print student list by course \");\n this.printStudListByCourse();\n break;\n\n default:\n System.out.println(\"\\nHang on a moment while we sign you out.\");\n System.out.println(\"......\");\n TimeUnit.SECONDS.sleep(1);\n System.out.println(\"See you next time! Bye bye ;)\\n\");\n System.exit(0);\n }\n }", "protected void ACTION_B_SELECT(ActionEvent arg0) {\n\t\tchoseInterface();\r\n\t}", "public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }", "private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "private static void makeMenuChoice() {\r\n\t\tint value = Integer.MAX_VALUE;\r\n\t\twhile (value != 0) {\r\n\t\t\tSystem.out.println(\"******************************************************************************************\");\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\" Please make your choice, by entering the assigned number\");\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\" 1: Search for a specific item\");\r\n\t\t\tSystem.out.println(\" 2: View shops\");\r\n\t\t\tSystem.out.println(\" 3: View cart\");\r\n\t\t\tSystem.out.println(\" 4: Checkout cart\");\r\n\t\t\tSystem.out.println(\" 0: Quit\");\r\n\t\t\tvalue = getValidUserInput(scanner, 5);\r\n\t\t\tswitch (value) {\r\n\t\t\tcase 0: \r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(\" Bye!\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tsearchForItem();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tviewItems();\r\n\t\t\t\tbreak; \r\n\t\t\tcase 3:\r\n\t\t\t\tviewCart();\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tcheckoutCart();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void menu() {\n\t\tstate.menu();\n\t}", "public static void menu() {\n\n\t\tSystem.out.println(\"\\n*** MENU ***: \");\n\t\tSystem.out.print(\"\\n1. Host current Date and Time\\n\" + \"2. Host uptime\\n\" + \"3. Host memory use\\n\"\n\t\t\t\t+ \"4. Host IPV4 socket connections\\n\" + \"5. Host current users\\n\" + \"6. Host running processes\\n\"\n\t\t\t\t+ \"7. Quit\\n\" + \"\\nSelect option: \");\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\tmenuSelect = sc.nextInt();\n\t\t\tif (menuSelect < 1 || menuSelect > 7) {\n\t\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\\nUser invalid input, input number between 1 and 7\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\tswitch (menuSelect) {\n\t\tcase 1:\n\t\t\tSystem.out.println(\"Date Request from Client\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"Uptime Request from Client\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"Memory Use Request from Client\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"IPV4 Socket Connections Request from Client\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"Current Users Request from Client\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"Current OS Version Request from Client\");\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Quit\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tsc.close(); // close the Scanner object\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tguiManager.getGameController().processMenuInput(MENU_ITEM.MNU_LEVEL_CHOOSE);\n\t\t\t\t}", "protected void makeMenu( Menu menu, int instance ) {\n_selectedPerson = null; // Not sure which is focused atm.\nField focusingOn = this.getLeafFieldWithFocus();\nif ( focusingOn == _lfBoys ) {\n_selectedPersonIsABoy = true;\n_selectedPerson = (Person) this.get(_lfBoys, _lfBoys.getSelectedIndex());\n}\nif ( focusingOn == _lfGirls ) {\n_selectedPersonIsABoy = false;\n_selectedPerson = (Person) this.get(_lfGirls, _lfGirls.getSelectedIndex());\n}\n\n}", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}", "public void onLoadMenuRadioSelected();", "private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}", "public static void main(String[] args)\r\n {\n String input;\r\n char selection = '\\0';\r\n\r\n // keep repeating the menu until the user chooses to exit\r\n do\r\n {\r\n // display menu options\r\n System.out.println(\"******* Tour Booking System Menu *******\");\r\n System.out.println(\"\");\r\n System.out.println(\"A - Add New Attraction\");\r\n System.out.println(\"B - Display Attraction Summary\");\r\n System.out.println(\"C - Sell Passes\");\r\n System.out.println(\"D - Refund Passes\");\r\n System.out.println(\"E - Add New Scheduled Tour\");\r\n System.out.println(\"F - Update Maximum Group Size\");\r\n System.out.println(\"X - Exit Program\");\r\n System.out.println();\r\n\r\n // prompt the user to enter their selection\r\n System.out.print(\"Enter your selection: \");\r\n input = sc.nextLine();\r\n\r\n System.out.println();\r\n\r\n // check to see if the user failed to enter exactly one character\r\n // for their menu selection\r\n\r\n if (input.length() != 1)\r\n {\r\n System.out.println(\"Error - selection must be a single character!\");\r\n\r\n }\r\n else\r\n {\r\n // extract the user's menu selection as a char value and\r\n // convert it to upper case so that the menu becomes\r\n // case-insensitive\r\n\r\n selection = Character.toUpperCase(input.charAt(0));\r\n\r\n // process the user's selection\r\n switch (selection)\r\n {\r\n case 'A':\r\n \r\n // call addNewAttraction() helper method\r\n addNewAttraction();\r\n break;\r\n\r\n case 'B':\r\n\r\n // call displayAttractionSummary() helper method\r\n displayAttractionSummary();\r\n break;\r\n\r\n case 'C':\r\n\r\n // call sellPasses() helper method\r\n sellPasses();\r\n break;\r\n\r\n case 'D':\r\n\r\n // call refundPasses() helper method\r\n refundPasses();\r\n break;\r\n\r\n case 'E':\r\n\r\n // call addNewScheduledTour() helper method\r\n addNewScheduledTour();\r\n break;\r\n \r\n case 'F':\r\n\r\n // call updateMaxTourGroupSize() helper method\r\n updateMaxGroupSize();\r\n break;\r\n \r\n case 'X':\r\n\r\n System.out.println(\"Booking system shutting down – goodbye...\");\r\n break;\r\n\r\n default:\r\n\r\n // default case - handles invalid selections\r\n System.out.println(\"Error - invalid selection!\");\r\n\r\n }\r\n }\r\n System.out.println();\r\n\r\n } while (selection != 'X');\r\n\r\n }", "private void printMenu() {\n\t\tSystem.out.printf(\"\\n********** MiRide System Menu **********\\n\\n\");\n\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Create Car\", \"CC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Book Car\", \"BC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Complete Booking\", \"CB\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Display ALL Cars\", \"DA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Specific Car\", \"SS\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Available Cars\", \"SA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Seed Data\", \"SD\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Load Cars\", \"LC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Exit Program\", \"EX\");\n\t\tSystem.out.println(\"\\nEnter your selection: \");\n\t\tSystem.out.println(\"(Hit enter to cancel any operation)\");\n\t}", "@Override\r\npublic void menuDeselected(MenuEvent arg0) {\n\t\r\n}", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}", "protected static int mainMenu() {\n System.out.println(\"Main Menu:\");\n System.out.println(\" 1 - Add a room\");\n System.out.println(\" 2 - Remove a room\");\n System.out.println(\" 3 - Schedule a room\");\n System.out.println(\" 4 - List Schedule\");\n System.out.println(\" 5 - List Rooms\");\n System.out.println(\" 6 - save Roomdetails\");\n System.out.println(\" 7 - save schedule\");\n System.out.println(\" 8 - save meeting\");\n System.out.println(\" 9 - import Roomdetails\");\n System.out.println(\" 10 -import schedule\");\n System.out.println(\" 11 -import meeting\");\n System.out.println(\"Enter your selection: \");\n\n return keyboard.nextInt();\n }", "private void menu(){\n System.out.println(\"\");\n System.out.println(\"Round: \"+round);\n System.out.println(\"Please choose your action: \");\n\n Scanner tokenizer = parser.getCommand(); // prompt the user to put a new command in\n Command command = parser.parseCommand(tokenizer); // send the \"scanner\" result to make it into a command\n processCommand(command); // process the command\n\n }", "public void menu(){\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"<=======|\" + name + \"|=======>\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tSystem.out.println(\"1 -> Jouer\");\n\t\tSystem.out.println(\"2 -> Creer votre personnage\");\n\t\tSystem.out.println(\"3 -> Charger\");\n\t\tSystem.out.println(\"4 -> Best Score\");\n\t\tSystem.out.println(\"5 -> Instruction\");\n\t\tSystem.out.println(\"6 -> Quitter\");\n\t\tSystem.out.println(\"------------------------------------------------\");\n\t\tint choice = in.nextInt();\n\n\t\t\tswitch (choice){\n\t\t\t\tcase 1:\n\t\t\t\t\tstartPlay();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreateChar();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tchargeGame();\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.print(\" NOM -\");\n\t\t\t\t\tSystem.out.print(\" GENRE -\");\n\t\t\t\t\tSystem.out.print(\" SANTEE -\");\n\t\t\t\t\tSystem.out.print(\" FORCE -\");\n\t\t\t\t\tSystem.out.print(\" ARMES -\");\n\t\t\t\t\tSystem.out.println(\" ARGENT -\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\tbdd.dbQuery(\"SELECT * FROM score ORDER BY health DESC\");\n\t\t\t\t\tmenu();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\trules();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\texit();\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Choix non valide\");\n\t\t\t\t\tmenu();\n\t\t\t}\n\t}", "public void controllerMenu(){\n\t\tint option=1;\n\t\t\n\t\twhile(option!=0){ \n\t\t\tSystem.out.println(\"You are in the air controller menu\");\n\t\t\tSystem.out.println(\"Write the number corresponding to the action you quant to perform:\");\n\t\t\tSystem.out.println(\"1. Add plane (basic info)\");\n\t\t\tSystem.out.println(\"2. Add detailed information of a plane\");\n\t\t\tSystem.out.println(\"3. Show airspace\");\n\t\t\tSystem.out.println(\"4. Encrypt plane\");\n\t\t\tSystem.out.println(\"5. Decrypt plane\");\n\t\t\tSystem.out.println(\"Press 0 to exit\");\n\t\t\t\n\t\t\toption = entry.nextInt();\n\t\t\t\n\t\t\tswitch(option){\t// switch with a method for each operation\n\t\t\t\tcase 1: \n\t\t\t\t\taddPlane();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: \n\t\t\t\t\tafegirInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: \n\t\t\t\t\tdisplayInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: \n\t\t\t\t\tencrypt();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tdesencriptar();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void use() {\n switch (choices.get(selection)) {\n case INFO : { \n AbstractInMenu newMenu = new ItemInfo(sourceMenu, item);\n this.sourceMenu.setMenu(newMenu);\n newMenu.setVisible(true);\n } break;\n case USE : {\n entity.use(item); \n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case EQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case ACTIVE : {\n entity.setActiveItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNEQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNACTIVE : {\n entity.setActiveItem(null);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case DROP : {\n entity.drop(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break; \n case PLACE : {\n entity.placeItem(item);\n entity.removeItem(item); \n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n case CLOSE : { \n sourceMenu.activate();\n } break;\n case DESTROY : {\n entity.removeItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n }\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}", "public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void chooseMenuOption(Number[] options) {\r\n for (int i = 0; i < options.length; i++) {\r\n switch (options[i].intValue()) {\r\n case 0:\r\n //returns the entered from console Number array corresponding to specific input colour\r\n Number[] numbers = chooseParameters(INTEGER_DELIMITERS, View.INPUT_COLOUR, true);\r\n //if there are any values corresponding to the ordinal of Colour enum,\r\n // the predicate chaining is passed to the model\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getColour().ordinal()));\r\n break;\r\n case 1:\r\n numbers = chooseParameters(INTEGER_DELIMITERS, View.MATERIAL_RANGE, true);\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getMaterial().ordinal()));\r\n break;\r\n case 2:\r\n numbers = chooseParameters(INTEGER_DELIMITERS, View.CUT_RANGE, true);\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getCut().ordinal()));\r\n break;\r\n case 3:\r\n numbers = chooseParameters(DOUBLE_DELIMITERS, View.WEIGHT_RANGE, false);\r\n model.setFilterPredicate(s -> findNumberInArray(numbers, s.getWeight()));\r\n break;\r\n case 4:\r\n numbers = chooseParameters(INTEGER_DELIMITERS, View.CLARITY_RANGE, true);\r\n model.setTranspFilterPredicate(s -> findNumberInArray(numbers, s.getClarity()));\r\n break;\r\n case 5:\r\n view.printMessage(View.BREAK);\r\n return;\r\n }\r\n }\r\n model.build();\r\n view.printMessage(View.SELECTED_GEMS + model.getChain() +\r\n View.NECKLACE_WEIGHT + model.calculateWeight() +\r\n View.NECKLACE_PRICE + model.calculatePrice());\r\n model.sortGems();\r\n view.printMessage(View.SORT_ON_PRICE + model.getChain());\r\n\r\n }", "@Override\n public void menuSelected (MenuEvent e) {\n menu.removeAll();\n ButtonGroup group = new ButtonGroup();\n for (String pName : SerialPortList.getPortNames(macPat)) {\n JRadioButtonMenuItem item = new JRadioButtonMenuItem(pName, pName.equals(portName));\n menu.setVisible(true);\n menu.add(item);\n group.add(item);\n item.addActionListener((ev) -> {\n portName = ev.getActionCommand();\n prefs.put(prefix + \"serial.port\", portName);\n });\n }\n }", "public void consoleSelectItem() throws SQLException{\n System.out.println(\"came here\");\n ConsoleClass obj = new ConsoleClass();\n String item = console_actionItemList.getSelectionModel().getSelectedItem();\n obj.consoleSelectItem(this,item);\n }", "public String promptMenu() {\n String selection;\n promptMenu: do {\n selection = promptString(\n \"\\n======== FLOORING PROGRAM MAIN MENU ========\\n\" + \n \"DISPLAY - Display Orders\\n\" + \n \"ADD - Add an Order\\n\" + \n \"EDIT - Edit an Order\\n\" + \n \"REMOVE - Remove an Order\\n\" + \n \"EXPORT - Export all data to file\\n\" + \n \"EXIT - Exit\\n\" +\n \"What would you like to do?\"\n );\n \n switch(selection.toLowerCase()) {\n case \"display\":\n case \"add\":\n case \"edit\":\n case \"remove\":\n case \"export\":\n case \"exit\":\n break promptMenu;\n default:\n continue;\n }\n } while(true);\n \n return selection;\n }", "void Menu();", "public static String menuSelection() throws ParseException {\n System.out.print(\"\\nWelcome to Poised!\");\n System.out.print(\"\\n1\\t-\\tAdd a new project\");\n System.out.print(\"\\n2\\t-\\tChange due date of a project\");\n System.out.print(\"\\n3\\t-\\tChange payment on project\");\n System.out.print(\"\\n4\\t-\\tUpdate contact details\");\n System.out.print(\"\\n5\\t-\\tFinalise a project\");\n System.out.print(\"\\nPlease make your selection: \");\n\n // User's selection determine which method should be called\n // If user's selection is '1', then user can create a new project\n int userSelection = input.nextInt();\n input.nextLine();\n if (userSelection == 1) {\n ProjectList.add(createProject());\n }\n\n // If user selection '2', then can amend the due date of the project\n else if (userSelection == 2) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n newDeadline(selectedProj);\n }\n\n // If user selects '3', then user can change the payment on the project\n else if (userSelection == 3) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n makePayment(selectedProj);\n }\n\n // If user selects '4', then user can update the details of either the\n // contractor, client or architect.\n else if (userSelection == 4) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n updateDetails(selectedProj);\n }\n\n // If user selects '5', then user can finalise the project\n else if (userSelection == 5) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n finalisation(selectedProj);\n }\n\n return menuSelection();\n }", "void renderNameSelection() {\n //sets the right letters for buttons\n String[] names = {Character.toString(arr[0]), Character.toString(arr[1]), Character.toString(arr[2])};\n changeNames(names);\n selectedButton = menuItems[iH];\n selectedButton.buildSelecter();\n //renders the startscreen\n renderStartScreen();\n }" ]
[ "0.7426906", "0.74034745", "0.73765564", "0.7254162", "0.7235999", "0.71317387", "0.70554703", "0.70463496", "0.7022333", "0.7013675", "0.69444364", "0.6938606", "0.69273126", "0.69167435", "0.6890834", "0.6890834", "0.68847704", "0.6864365", "0.68516755", "0.6790325", "0.679001", "0.6757547", "0.6733844", "0.67248535", "0.67172784", "0.67089474", "0.67051333", "0.66835546", "0.66775495", "0.6675967", "0.6671029", "0.665034", "0.6649767", "0.66332924", "0.66048855", "0.6596809", "0.65854716", "0.65819335", "0.6580484", "0.65780616", "0.65759647", "0.6570441", "0.65688705", "0.65586555", "0.65462196", "0.6545602", "0.65320253", "0.65214807", "0.6514193", "0.6504591", "0.6502431", "0.650138", "0.650057", "0.6480948", "0.6477933", "0.6465226", "0.6457647", "0.6455385", "0.6452602", "0.6450625", "0.6449577", "0.64428216", "0.6436977", "0.64369047", "0.64270806", "0.64267325", "0.6424546", "0.6419577", "0.64161855", "0.6401337", "0.639987", "0.6394282", "0.6392577", "0.6392307", "0.6389579", "0.638705", "0.6386298", "0.6386052", "0.6377209", "0.63715124", "0.6370537", "0.6366639", "0.6356818", "0.6354785", "0.63500905", "0.6347852", "0.63478106", "0.6346233", "0.6345603", "0.634513", "0.63382703", "0.6314875", "0.631465", "0.6311898", "0.6304288", "0.6298571", "0.6286977", "0.6280628", "0.62795097", "0.6274689", "0.62637305" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<ProductGroupMapDTO> getProductGroupCodeLists() throws PersistenceException { List<ProductGroupMapDTO> list=null; logger.info("Entry"); try { Criteria q=session.createCriteria(ProductGroupMapDTO.class); list=(List<ProductGroupMapDTO>)q.list(); } catch (Exception e) { e.printStackTrace(); logger.error(e); throw new PersistenceException(e, IPersistenceErrorCode.DATABASE_PROBLEM); } logger.info("Exit"); return list; }
{ "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
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
public PrometheusTempModify(PrometheusTempModify source) { if (source.Name != null) { this.Name = new String(source.Name); } if (source.Describe != null) { this.Describe = new String(source.Describe); } if (source.ServiceMonitors != null) { this.ServiceMonitors = new PrometheusConfigItem[source.ServiceMonitors.length]; for (int i = 0; i < source.ServiceMonitors.length; i++) { this.ServiceMonitors[i] = new PrometheusConfigItem(source.ServiceMonitors[i]); } } if (source.PodMonitors != null) { this.PodMonitors = new PrometheusConfigItem[source.PodMonitors.length]; for (int i = 0; i < source.PodMonitors.length; i++) { this.PodMonitors[i] = new PrometheusConfigItem(source.PodMonitors[i]); } } if (source.RawJobs != null) { this.RawJobs = new PrometheusConfigItem[source.RawJobs.length]; for (int i = 0; i < source.RawJobs.length; i++) { this.RawJobs[i] = new PrometheusConfigItem(source.RawJobs[i]); } } if (source.RecordRules != null) { this.RecordRules = new PrometheusConfigItem[source.RecordRules.length]; for (int i = 0; i < source.RecordRules.length; i++) { this.RecordRules[i] = new PrometheusConfigItem(source.RecordRules[i]); } } if (source.AlertDetailRules != null) { this.AlertDetailRules = new PrometheusAlertPolicyItem[source.AlertDetailRules.length]; for (int i = 0; i < source.AlertDetailRules.length; i++) { this.AlertDetailRules[i] = new PrometheusAlertPolicyItem(source.AlertDetailRules[i]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void set(String key, Object value);", "void set(K key, V value);", "public setKeyValue_args(setKeyValue_args other) {\n if (other.isSetKey()) {\n this.key = other.key;\n }\n if (other.isSetValue()) {\n this.value = other.value;\n }\n }", "public abstract void set(String key, T data);", "Object put(Object key, Object value);", "public native Map<K, V> set(K key, V value);", "@Test\n public void testSet() {\n Assert.assertTrue(map.set(\"key-1\", \"value-1\", 10));\n Assert.assertTrue(map.set(\"key-1\", \"value-2\", 10));\n Assert.assertTrue(map.set(\"key-2\", \"value-1\", 10));\n }", "private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }", "void set(K k, V v) throws OverflowException;", "public Value put(Key key, Value thing) ;", "@Test\n\tpublic void testPutAccessReodersElement() {\n\t\tmap.put(\"key1\", \"value1\");\n\n\t\tSet<String> keySet = map.keySet();\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key1\",\n\t\t\tkeySet.iterator().next());\n\n\t\t// move 2 to the top/front\n\t\tmap.put(\"key2\", \"value2\");\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key2\",\n\t\t\tkeySet.iterator().next());\n\t}", "public void set(String key, Object value) {\n set(key, value, 0);\n }", "final <T> void set(String key, T value) {\n set(key, value, false);\n }", "public void setObject(final String key, final Object value)\r\n {\r\n if (key == null)\r\n {\r\n throw new NullPointerException();\r\n }\r\n if (value == null)\r\n {\r\n helperObjects.remove(key);\r\n }\r\n else\r\n {\r\n helperObjects.put(key, value);\r\n }\r\n }", "@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }", "@Test\n public void keySetTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.keySet());\n }", "@Override\n public V put(K key, V value) {\n if (!containsKey(key)) {\n keys.add(key);\n }\n\n return super.put(key, value);\n }", "public void set(String newKey)\n\t{\n\t\tthis.Key = newKey;\n\t}", "public void setValue(K key, V value);", "public Value set(Value key, Value value) {\n\t\tif (get(key) != null)\n\t\t\tput(key, value);\n\t\telse if (parent != null)\n\t\t\tparent.put(key, value);\n\t\telse\n\t\t\tput(key, value);\n\t\treturn value;\n\t}", "final void set(String key, String value) {\n set(key, value, false);\n }", "void put(String key, Object obj);", "public void set(Object key, Object value) {\n if(attributes == null)\n attributes = new HashMap<>();\n attributes.put(key, value);\n }", "private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}", "void put(String key, Object value);", "Object put(Object key, Object value) throws NullPointerException;", "public void testNormalKeySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkKeySet(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "@Override\n public synchronized Object put(Object key, Object value) {\n if (value instanceof String) {\n value = ((String) value).trim();\n }\n String strkey = key.toString();\n if (this.ignoreCase) {\n this.keyMap.put(strkey.toLowerCase(), strkey);\n }\n return super.put(strkey, value);\n }", "@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }", "public void testSet(){\n stringRedisTemplate.opsForSet().add(\"set-key\",\"a\",\"b\",\"c\");\n //srem set-key c d\n stringRedisTemplate.opsForSet().remove(\"set-key\",\"c\",\"d\");\n stringRedisTemplate.opsForSet().remove(\"set-key\",\"c\",\"d\");\n //scard set-key\n stringRedisTemplate.opsForSet().size(\"set-key\");\n //smembers set-key\n stringRedisTemplate.opsForSet().members(\"set-key\");\n //smove set-key set-key2 a\n stringRedisTemplate.opsForSet().move(\"set-key\",\"a\",\"set-key2\");\n stringRedisTemplate.opsForSet().move(\"set-key\",\"c\",\"set-key2\");\n\n //sadd skey1 a b c d\n stringRedisTemplate.opsForSet().add(\"skey1\",\"a\",\"b\",\"c\",\"d\");\n //sadd skey2 c d e f\n stringRedisTemplate.opsForSet().add(\"skey2\",\"c\",\"d\",\"e\",\"f\");\n //sdiff skey1 skey2 //存在与skey1中不存在与skey2中, a b\n stringRedisTemplate.opsForSet().difference(\"skey1\",\"skey2\");\n //sinter skey1 skey2 // c d\n stringRedisTemplate.opsForSet().intersect(\"skey1\",\"skey2\");\n //sunion skey1 skey2 // a b c d e f\n stringRedisTemplate.opsForSet().union(\"skey1\",\"skey2\");\n }", "protected abstract void put(K key, V value);", "protected abstract void _set(String key, Object obj, Date expires);", "Set getLocalKeySet();", "void setObjectKey(String objectKey);", "String set(K key, V value, SetOption setOption, long expirationTime, TimeUnit timeUnit);", "public Object putTransient(Object key, Object value);", "public JbootVoModel set(String key, Object value) {\n super.put(key, value);\n return this;\n }", "public abstract void Put(WriteOptions options, Slice key, Slice value) throws IOException, BadFormatException, DecodeFailedException;", "public void set(String key, Object value) {\r\n\t\tthis.context.setValue(key, value);\r\n\t}", "public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}", "@Override\r\n\tpublic void putObject(Object key, Object value) {\n\t\t\r\n\t}", "public MapVS(SetVS<T> keys, Map<K, V> entries) {\n this.keys = keys;\n this.entries = entries;\n this.concreteHash = computeConcreteHash();\n }", "void put(Object indexedKey, Object key);", "public abstract V put(K key, V value);", "void setKey(K key);", "@Override\n\tpublic void put(S key, T val) {\n\t\t\n\t}", "public void set(String key, Object value)\n {\n if (value == null) remove(key);\n else if (value instanceof Map)\n {\n DataSection section = createSection(key);\n Map map = (Map) value;\n for (Object k : map.keySet())\n {\n section.set(k.toString(), map.get(k));\n }\n }\n else\n {\n data.put(key, value);\n if (!keys.contains(key)) keys.add(key);\n }\n }", "@Override\n public void put(K key, V value) {\n root = put(root, key, value);\n }", "public void attach(Object key, Object value);", "public static interface SetFilter extends KeyValueFilter {\r\n\t\tObject put(String name, Object value);\r\n\t}", "public void testCache() {\n MethodKey m = new MethodKey(\"aclass\", \"amethod\", new Object[]{1, \"fads\", new Object()});\n String mValue = \"my fancy value\";\n MethodKey m1 = new MethodKey(\"aclass\", \"amethod1\", new Object[]{1, \"fads\", new Object()});\n String mValue1 = \"my fancy value1\";\n MethodKey m2 = new MethodKey(\"aclass\", \"amethod2\", new Object[]{1, \"fads\", new Object()});\n String mValue2 = \"my fancy value2\";\n\n GenericCache.setValue(m, mValue);\n GenericCache.setValue(m1, mValue1);\n GenericCache.setValue(m2, mValue2);\n\n assertEquals(GenericCache.getValue(m), mValue);\n assertEquals(GenericCache.getValue(m1), mValue1);\n assertEquals(GenericCache.getValue(m2), mValue2);\n }", "void put(K key, V value);", "void put(K key, V value);", "public void set(K key, V value)\n {\n // If there are too many entries, expand the table.\n if (this.size > (this.buckets.length * LOAD_FACTOR))\n {\n expand();\n } // if there are too many entries\n // Find out where the key belongs.\n int index = this.find(key);\n // Create a new association list, if necessary.\n if (buckets[index] == null)\n {\n this.buckets[index] = new AssociationList<K, V>();\n } // if (buckets[index] == null)\n // Add the entry.\n AssociationList<K, V> bucket = this.get(index);\n int oldsize = bucket.size;\n bucket.set(key, value);\n // Update the size\n this.size += bucket.size - oldsize;\n }", "@Override\n public void put(K key, V value) {\n root = putHelper(key,value,root);\n }", "public void setKey(K newKey) {\n this.key = newKey;\n }", "@Override\n\tpublic void set(K key, List<V> value) {\n\t\t\n\t}", "public OwnMap() {\n super();\n keySet = new OwnSet();\n }", "public void setKey (K k) {\n key = k;\n }", "public void setItemCollection(HashMap<String, Item> copy ){\n \titemCollection.putAll(copy);\r\n }", "public void put(Key key, Value val);", "public void setValue(String key, Object value)\n {\n if (value != null)\n {\n if (otherDetails == null)\n {\n otherDetails = new Hashtable();\n }\n\n otherDetails.put(key, value);\n }\n }", "ISObject put(String key, ISObject stuff) throws UnexpectedIOException;", "public void put(Comparable key, Stroke stroke) {\n/* 120 */ ParamChecks.nullNotPermitted(key, \"key\");\n/* 121 */ this.store.put(key, stroke);\n/* */ }", "public void set(R key, List<S> value){\n map.remove(key);\n map.put(key, value);\n }", "public V put(K key, V value) throws InvalidKeyException;", "@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127625049L), 88,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"18fa817e-9d24-4344-a79a-ab19db23016c\", -15,\n \"7b9ca8ca-2f09-4496-b67e-f3a146e5c741\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127627362L));\n ApiKey apikey2 = apikey1.clone();\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public final void set(final String key, final Object value) {\n try {\n synchronized (jo) {\n if (value == null) {\n jo.remove(key);\n } else {\n jo.put(key, value);\n }\n }\n } catch (JSONException e) {\n }\n }", "@Test\n public void testPutAll_Existing() {\n Map<String, String> toAdd = fillMap(1, 10, \"\", \"Old \");\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10, \"\", \"New \");\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n for (String k : toAdd.keySet()) {\n String old = toAdd.get(k);\n String upd = toUpdate.get(k);\n\n verify(helper).fireReplace(entry(k, old), entry(k, upd));\n }\n verifyNoMoreInteractions(helper);\n }", "public T set(T obj);", "V put(K key, V value);", "public boolean put(String key, String value);", "void put(String key, String value) throws StorageException, ValidationException, KeyValueStoreException;", "public void set(R key, Collection<S> value){\n map.remove(key);\n map.put(key, Collections.synchronizedList(Sugar.listFromCollections(value)));\n }", "@Before\r\n public void test_change(){\r\n HashTable<String,String> table = new HashTable<>(1);\r\n MySet<String> s = (MySet<String>) table.keySet();\r\n table.put(\"AA\",\"BB\");\r\n table.put(\"AA\",\"CC\");\r\n assertTrue(s.contains(\"AA\"));\r\n table.remove(\"AA\");\r\n assertFalse(s.contains(\"AA\"));\r\n }", "public void put(String key, Object value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "public boolean put( KEY key, OBJECT object );", "boolean setValue(String type, String key, String value);", "public Set<V> put(K key, Collection<V> set) {\n // Remove any possibly existing prior association with the key\n Set<V> result = remove(key);\n\n // Note: The second argument is effectless, as we cannot encounter item type errors here\n NavigableSet<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n SetTrieNode currentNode = superRootNode;\n while(it.hasNext()) {\n V v = it.next();\n\n SetTrieNode nextNode = currentNode.nextValueToChild == null ? null : currentNode.nextValueToChild.get(v);\n if(nextNode == null) {\n nextNode = new SetTrieNode(nextId++, currentNode, v);\n if(currentNode.nextValueToChild == null) {\n currentNode.nextValueToChild = new TreeMap<>(comparator);\n }\n currentNode.nextValueToChild.put(v, nextNode);\n }\n currentNode = nextNode;\n }\n\n if(currentNode.keyToSet == null) {\n currentNode.keyToSet = new HashMap<>();\n }\n\n currentNode.keyToSet.put(key, navSet);\n\n keyToNode.put(key, currentNode);\n\n return result;\n }", "public K setKey(K key);", "Set keySet(final TCServerMap map) throws AbortedOperationException;", "@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() {\n\t\tLongOpenHashSet c;\n\t\ttry {\n\t\t\tc = (LongOpenHashSet) super.clone();\n\t\t} catch (CloneNotSupportedException cantHappen) {\n\t\t\tthrow new InternalError();\n\t\t}\n\t\tc.key = key.clone();\n\t\tc.state = state.clone();\n\t\treturn c;\n\t}", "boolean canSet(String key);", "@Test\n public void testBackdoorModificationSameKey()\n {\n testBackdoorModificationSameKey(this);\n }", "public IDataKey clone() {\n return new IDataKey(this);\n }", "public abstract void copyFrom(KeyedString src);", "@Override\n public V put(K key, V value) {\n if ((key == null) || (value == null)) {\n logger.warn(\"NULL key or value key = \" + key + \". value = \" + value);\n System.out.println(StringUtils.join(Thread.currentThread().getStackTrace(), \"\\n\"));\n return null;\n }\n\n // If this map is supposed to be case insensitive, uppercase the key before putting it\n // in the map\n if (caseInsensitive && key instanceof String) {\n return super.put(((K) key.toString().toUpperCase()), value);\n } else {\n return super.put(key, value);\n }\n }", "public void set(String key, String value){\n\t\tif(first == null){\n\t\t\tfirst = new ListMapEntry(key, value);\n\t\t}\n\t\tListMapEntry temp = first;\n\t\tListMapEntry prev = null;\n\t\twhile(temp!=null && !temp.getKey().equals(key)){\n\t\t\tprev = temp;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\tif(temp==null){\n\t\t\tprev.setNext(new ListMapEntry(key, value));\n\t\t}\n\t\telse{\n\t\t\ttemp.setValue(value);\n\t\t}\n\t}", "V put(final K key, final V value);", "public void set(String key, Object obj) {\n options.put(key, obj);\n }", "boolean put(K key, V value);", "@Override\n\tpublic void put(Object key, Object val) {\n\t\tif(st[hash(key)].size()>=k)\n\t\t\tst[hash(key)].clear();\n\t\tst[hash(key)].put(key, st[hash(key)].size());\n\t}", "protected abstract boolean _setIfAbsent(String key, Object value, Date expires);", "@Override\n public void putValue(String key, Object value) {\n\n }", "public DelegateAbstractHashMap(AbstractHashSet set) {\n\t\t\tsuper();\n\t\t\tthis.set = set;\n\t\t}", "public void changeKey(String key, Object newValue){\n try {\n myJSON.put(key, newValue);\n writeToFile();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void put(String key, T value);", "@Override\r\n public V put(K key, V value){\r\n \r\n // Declare a temporay node and instantiate it with the key and\r\n // previous value of that key\r\n TreeNode<K, V> tempNode = new TreeNode<>(key, get(key));\r\n \r\n // Call overloaded put function to either place a new node\r\n // in the tree or update the exisiting value for the key\r\n root = put(root, key, value);\r\n \r\n // Return the previous value of the key through the temporary node\r\n return tempNode.getValue();\r\n }", "String setKey(String newKey);", "public void set(String key, String value) {\n if (key.indexOf('=') != -1 || key.indexOf(';') != -1) {\n Log.e(TAG, \"Key \\\"\" + key + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n if (value.indexOf('=') != -1 || value.indexOf(';') != -1) {\n Log.e(TAG, \"Value \\\"\" + value + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n\n mMap.put(key, value);\n }", "@Test\n public void testPutAll_ExistingNoChange() {\n Map<String, String> toAdd = fillMap(1, 10);\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10);\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n verifyZeroInteractions(helper);\n }" ]
[ "0.6440425", "0.6415443", "0.6145525", "0.61172885", "0.609467", "0.60810256", "0.60422385", "0.5990364", "0.59736174", "0.59564006", "0.58394885", "0.58277106", "0.5790857", "0.5705316", "0.57027704", "0.56880087", "0.5686415", "0.56781363", "0.5608639", "0.5590083", "0.5582245", "0.5570489", "0.5560049", "0.55530703", "0.5549463", "0.5533705", "0.55286086", "0.55116004", "0.54972124", "0.54910856", "0.54829353", "0.54679686", "0.5431868", "0.54273665", "0.54224724", "0.5413962", "0.54104", "0.53787935", "0.53772664", "0.53748906", "0.53747004", "0.53570825", "0.5350402", "0.5340595", "0.5330211", "0.5321594", "0.52932364", "0.5285382", "0.52825433", "0.52648", "0.5258141", "0.5257998", "0.5257998", "0.5256669", "0.5256548", "0.5242394", "0.5237798", "0.5234187", "0.522877", "0.52269787", "0.522518", "0.52182424", "0.52167994", "0.52009475", "0.5195212", "0.5188795", "0.5183071", "0.51826215", "0.5177528", "0.517711", "0.51760465", "0.51758975", "0.51740146", "0.5170327", "0.5136484", "0.5132591", "0.5129853", "0.51292944", "0.51247597", "0.5121954", "0.5120632", "0.51204467", "0.5104378", "0.51039904", "0.5101876", "0.5099534", "0.50989676", "0.5092156", "0.5074713", "0.5070289", "0.50656843", "0.50632787", "0.50518346", "0.5028556", "0.5023309", "0.5022976", "0.5020225", "0.50197893", "0.501666", "0.50151473", "0.5015003" ]
0.0
-1
Internal implementation, normal users should not use it.
public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "Name", this.Name); this.setParamSimple(map, prefix + "Describe", this.Describe); this.setParamArrayObj(map, prefix + "ServiceMonitors.", this.ServiceMonitors); this.setParamArrayObj(map, prefix + "PodMonitors.", this.PodMonitors); this.setParamArrayObj(map, prefix + "RawJobs.", this.RawJobs); this.setParamArrayObj(map, prefix + "RecordRules.", this.RecordRules); this.setParamArrayObj(map, prefix + "AlertDetailRules.", this.AlertDetailRules); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@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 protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "protected boolean func_70814_o() { return true; }", "protected Problem() {/* intentionally empty block */}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n public int retroceder() {\n return 0;\n }", "protected Doodler() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public Object preProcess() {\n return null;\n }", "@Override\n protected void initialize() \n {\n \n }", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "@Override\r\n\tpublic void init() {}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void apply() {\n }", "private TestsResultQueueEntry() {\n\t\t}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "protected void initialize() {}", "protected void initialize() {}", "private final void i() {\n }", "protected void h() {}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Unescaper() {\n\n\t}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "private Util() { }", "@Override\n public void init() {}", "@Override public int describeContents() { return 0; }", "public void method_4270() {}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "protected abstract Set method_1559();", "@Override\n public void init() {\n\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "protected void init() {\n // to override and use this method\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private TedCorrigendumHandler() {\n throw new AssertionError();\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", "@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 public void preprocess() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "protected void additionalProcessing() {\n\t}", "private void getStatus() {\n\t\t\n\t}", "protected OpinionFinding() {/* intentionally empty block */}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "@Override\n\tpublic void selfValidate() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "private void assignment() {\n\n\t\t\t}" ]
[ "0.62574834", "0.6217662", "0.6024768", "0.5982239", "0.5965723", "0.59330684", "0.5920059", "0.58351564", "0.5781645", "0.57749504", "0.57749504", "0.57749504", "0.57749504", "0.57749504", "0.57749504", "0.57737285", "0.57054734", "0.5701363", "0.56510806", "0.56491816", "0.56491816", "0.5641364", "0.5636646", "0.5636101", "0.5617263", "0.56129867", "0.56071395", "0.56071395", "0.5604147", "0.5597464", "0.5557192", "0.5547823", "0.5538959", "0.5529547", "0.5527831", "0.55252886", "0.5524415", "0.55170584", "0.55161196", "0.55161196", "0.5508306", "0.55039597", "0.5501735", "0.5498203", "0.5492665", "0.54857016", "0.54857016", "0.5484164", "0.5484164", "0.54709655", "0.54671437", "0.5466405", "0.54586643", "0.54480445", "0.5444829", "0.544423", "0.5431154", "0.54291874", "0.5428321", "0.5426861", "0.5424348", "0.54216623", "0.54197234", "0.54126096", "0.54122156", "0.5410503", "0.5408548", "0.54017633", "0.5393527", "0.5393527", "0.5393108", "0.53811836", "0.53811836", "0.53765255", "0.53727305", "0.5371025", "0.5368476", "0.53672004", "0.5362031", "0.535984", "0.53585947", "0.535824", "0.53558195", "0.53554994", "0.53553045", "0.53553045", "0.53553045", "0.5353958", "0.53527707", "0.53524756", "0.5351759", "0.535174", "0.53509206", "0.53348345", "0.5334606", "0.533233", "0.5331985", "0.5331269", "0.5331116", "0.53306353", "0.5328405" ]
0.0
-1
add short cut to home screen
public void addshortcut() { Intent addshort = new Intent(getApplicationContext(), ShortMaster.class); addshort.setAction(Intent.ACTION_MAIN); Intent addIntent = new Intent(); addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, R.string.app_name); addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, addshort); addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, Intent.ShortcutIconResource.fromContext(getApplicationContext(), R.mipmap.ic_launcher)); getApplicationContext().sendBroadcast(addIntent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void attachFrontlineHUD() {\r\n\t\tResourceManager.getInstance().getCamera().setHUD(HUDRegion);\r\n\t}", "public void homeScreen(Graphics art)\n\t{\n\t\t\n\t\tart.setColor(Color.pink);\n\t\tart.setFont(newFont);\n\t\tart.drawString(\"Balloon Pop\", 200, 200);\n\t\tart.setFont(newFont2);\n\t\tart.drawString(\"Press Z for instructions\", 100, 325);\n\t\tart.drawString(\"Hit the spacebar to start\", 100, 450);\n\t\t\n\t}", "public void FullScreencall() {\n View decorView = getWindow().getDecorView();\n int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;\n decorView.setSystemUiVisibility(uiOptions);\n }", "private void splashScreen() {\r\n\t\t// Clear the screen, reset the level, and display the legend\r\n\t\tclear();\r\n\t\tdisplay.setLegend(\"Asteroids\");\r\n\r\n\t\t// Place four asteroids near the corners of the screen.\r\n\t\tplaceAsteroids();\r\n\t}", "public static void splashScreen() {\n System.out.println(printLine(\"-\",100));\n System.out.println(\"Welcome to KaviBase\"); // Display the string.\n System.out.println(\"Version \" + getVersion());\n System.out.println(getCopyright());\n System.out.println(\"\\nType \\\"help;\\\" to display supported commands.\");\n System.out.println(\"\\nEvery command should end with semicolon ;\");\n System.out.println(printLine(\"-\",100));\n }", "public static void splashScreen() {\n System.out.println(line(\"-\", 80));\n System.out.println(\"Welcome to DavisBaseLite\"); // Display the string.\n System.out.println(\"DavisBaseLite Version \" + getVersion());\n System.out.println(getCopyright());\n System.out.println(\"\\nType \\\"help;\\\" to display supported commands.\");\n System.out.println(line(\"-\", 80));\n }", "public void startFight() {\r\n\t\tmenu.setVisible(false);\r\n\t\tmenu.setThreadSuspended(true);\r\n\t\tadd(new Fight(WIDTH, HEIGHT, gfh.loadBackground(\"london_nationalgallery.jpg\")));\r\n\t\tsetVisible(false);\r\n\t\tsetVisible(true);\r\n\t}", "void showHomeScree(Context con) {\n\t\tIntent i = new Intent(con,CouponsScreen.class);\n\t\t//i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\ti.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tcon.startActivity( i );\n\t}", "public void launchStartupScreen() {\n\t\tnew StartUpScreen(this);\n\t}", "public void shortDescribe(CoState cos) {\n\t\tcos.outputText(\"Home menu.\");\r\n\t}", "@Override\n public void showSplash() {\n }", "public ScreenSplash() {\n initComponents();\n this.setCursor(new Cursor(HAND_CURSOR));\n setBackground(new Color(0, 0, 0, 0));\n }", "public void pressHomeButton() {\n System.out.println(\"TV is already on the home screen\\n\");\n }", "public void displayHome() {\n\t\tclearBackStack();\n\t\tselectItemById(KestrelWeatherDrawerFactory.MAP_OVERVIEW, getLeftDrawerList());\n\t}", "public void paintFinalScreen() {\n\t\tapp.image(end, 0, 0);\n\t}", "public void drawStartScreen() {\n\t\tint highScore = getHighScore();\n\t\tdisplayText(\"High Score \" + String.valueOf(highScore), 0, 0, false);\n\t\tdisplayText(\"Press to Start Game\", 0, -100, false);\n\t}", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "private void prepareAndShowHomeScreen() {\n\t\tFraHeader header = FraHeader.newInstance(true);\n\t\theader.showBackButton(false);\n\t\tFraHomeContent homeContent = FraHomeContent.newInstance();\n\t\tFraFooter footer = FraFooter.newInstance(FooterIcons.TOP10);\n\t\tFraSearch search = FraSearch.newInstance();\n\t\tFraFont font = FraFont.newInstance();\n\t\tFraShare share = FraShare.newInstance();\n\n\t\treplaceScreenWithNavBarContentAndMenu(header, FraHeader.TAG,\n\t\t\t\thomeContent, FraHomeContent.TAG, footer, FraFooter.TAG,\n\t\t\t\tFraMenu.newInstance(), FraMenu.TAG, search, FraSearch.TAG,\n\t\t\t\tfont, FraFont.TAG, share, FraShare.TAG, false);\n\t\tprepareAndShowHomeScreen(false);\n\t\t/*\n\t\t * replaceScreenWithNavBarContentAndFooter(homeContent,\n\t\t * FraHomeContent.TAG, footer, FraFooter.TAG, false);\n\t\t */\n\t}", "private void createBWScreen() {\n\t\tfloat[] dash1 = { 2f, 0f, 2f };\n\t\t// Color myNewBlue = new Color(136, 69, 19);\n\t\tColor myNewBlue = new Color(153, 118, 55);\n\t\tBasicStroke bs1 = new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL);\n\n\t\tactionPanel = new ImagePanel(new ImageIcon(ClassLoader.getSystemResource(\"image/BackgroundNFA.png\")).getImage());\n\t\tactionPanel.setBackground(Color.white);\n\t\tactionPanel.setBounds(0, 0, 1259, 719);\n\t\tgetContentPane().add(actionPanel);\n\n\t\tactionPanel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tactionPanel.setLayout(null);\n\n\t\tg = (Graphics2D) actionPanel.getGraphics();\n\t\tg.setColor(myNewBlue);\n\t\tg.setStroke(bs1);\n\t\ttimer = new Timer(5, blinker);\n\t\ttimer.start();\n\n\t\ttransitionLabel1121 = new JLabel();\n\t\tappleLabels.put(1121, transitionLabel1121);\n\t\ttransitionLabel1121.setBounds(435, 135, 40, 40);\n\t\ttransitionLabel1121.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1121);\n\n\t\ttransitionLabel1122 = new JLabel();\n\t\tappleLabels.put(1122, transitionLabel1122);\n\t\ttransitionLabel1122.setBounds(616, 135, 40, 40);\n\t\ttransitionLabel1122.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1122);\n\n\t\ttransitionLabel1123 = new JLabel();\n\t\tappleLabels.put(1123, transitionLabel1123);\n\t\ttransitionLabel1123.setBounds(801, 133, 40, 40);\n\t\ttransitionLabel1123.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel1123);\n\n\t\ttransitionLabel2131 = new JLabel();\n\t\tappleLabels.put(2131, transitionLabel2131);\n\t\ttransitionLabel2131.setBounds(210, 282, 40, 40);\n\t\ttransitionLabel2131.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2131);\n\n\t\ttransitionLabel2132 = new JLabel();\n\t\tappleLabels.put(2132, transitionLabel2132);\n\t\ttransitionLabel2132.setBounds(264, 282, 40, 40);\n\t\ttransitionLabel2132.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2132);\n\n\t\ttransitionLabel2133 = new JLabel();\n\t\tappleLabels.put(2133, transitionLabel2133);\n\t\ttransitionLabel2133.setBounds(312, 282, 40, 40);\n\t\ttransitionLabel2133.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2133);\n\n\t\ttransitionLabel2234 = new JLabel();\n\t\tappleLabels.put(2234, transitionLabel2234);\n\t\ttransitionLabel2234.setBounds(549, 282, 40, 40);\n\t\ttransitionLabel2234.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2234);\n\n\t\ttransitionLabel2235 = new JLabel();\n\t\tappleLabels.put(2235, transitionLabel2235);\n\t\ttransitionLabel2235.setBounds(615, 282, 40, 40);\n\t\ttransitionLabel2235.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2235);\n\n\t\ttransitionLabel2236 = new JLabel();\n\t\tappleLabels.put(2236, transitionLabel2236);\n\t\ttransitionLabel2236.setBounds(674, 282, 40, 40);\n\t\ttransitionLabel2236.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2236);\n\n\t\ttransitionLabel2337 = new JLabel();\n\t\tappleLabels.put(2337, transitionLabel2337);\n\t\ttransitionLabel2337.setBounds(913, 282, 40, 40);\n\t\ttransitionLabel2337.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2337);\n\n\t\ttransitionLabel2338 = new JLabel();\n\t\tappleLabels.put(2338, transitionLabel2338);\n\t\ttransitionLabel2338.setBounds(966, 282, 40, 40);\n\t\ttransitionLabel2338.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2338);\n\n\t\ttransitionLabel2339 = new JLabel();\n\t\tappleLabels.put(2339, transitionLabel2339);\n\t\ttransitionLabel2339.setBounds(1017, 282, 40, 40);\n\t\ttransitionLabel2339.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleBW.png\")));\n\t\tactionPanel.add(transitionLabel2339);\n\n\t\ttransitionLabel3141 = new JLabel();\n\t\tappleLabels.put(3141, transitionLabel3141);\n\t\ttransitionLabel3141.setBounds(118, 460, 40, 40);\n\t\ttransitionLabel3141.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3141);\n\n\t\ttransitionLabel3142 = new JLabel();\n\t\tappleLabels.put(3142, transitionLabel3142);\n\t\ttransitionLabel3142.setBounds(145, 460, 40, 40);\n\t\ttransitionLabel3142.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3142);\n\n\t\ttransitionLabel3143 = new JLabel();\n\t\tappleLabels.put(3143, transitionLabel3143);\n\t\ttransitionLabel3143.setBounds(173, 460, 40, 40);\n\t\ttransitionLabel3143.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3143);\n\n\t\ttransitionLabel3244 = new JLabel();\n\t\tappleLabels.put(3244, transitionLabel3244);\n\t\ttransitionLabel3244.setBounds(237, 460, 40, 40);\n\t\ttransitionLabel3244.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3244);\n\n\t\ttransitionLabel3245 = new JLabel();\n\t\tappleLabels.put(3245, transitionLabel3245);\n\t\ttransitionLabel3245.setBounds(262, 460, 40, 40);\n\t\ttransitionLabel3245.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3245);\n\n\t\ttransitionLabel3246 = new JLabel();\n\t\tappleLabels.put(3246, transitionLabel3246);\n\t\ttransitionLabel3246.setBounds(285, 460, 40, 40);\n\t\ttransitionLabel3246.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3246);\n\n\t\ttransitionLabel3347 = new JLabel();\n\t\tappleLabels.put(3347, transitionLabel3347);\n\t\ttransitionLabel3347.setBounds(346, 460, 40, 40);\n\t\ttransitionLabel3347.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3347);\n\n\t\ttransitionLabel3348 = new JLabel();\n\t\tappleLabels.put(3348, transitionLabel3348);\n\t\ttransitionLabel3348.setBounds(376, 460, 40, 40);\n\t\ttransitionLabel3348.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3348);\n\n\t\ttransitionLabel3349 = new JLabel();\n\t\tappleLabels.put(3349, transitionLabel3349);\n\t\ttransitionLabel3349.setBounds(406, 460, 40, 40);\n\t\ttransitionLabel3349.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel3349);\n\n\t\ttransitionLabel34410 = new JLabel();\n\t\tappleLabels.put(34410, transitionLabel34410);\n\t\ttransitionLabel34410.setBounds(469, 460, 40, 40);\n\t\ttransitionLabel34410.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34410);\n\n\t\ttransitionLabel34411 = new JLabel();\n\t\tappleLabels.put(34411, transitionLabel34411);\n\t\ttransitionLabel34411.setBounds(496, 460, 40, 40);\n\t\ttransitionLabel34411.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34411);\n\n\t\ttransitionLabel34412 = new JLabel();\n\t\tappleLabels.put(34412, transitionLabel34412);\n\t\ttransitionLabel34412.setBounds(524, 460, 40, 40);\n\t\ttransitionLabel34412.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel34412);\n\n\t\ttransitionLabel35413 = new JLabel();\n\t\tappleLabels.put(35413, transitionLabel35413);\n\t\ttransitionLabel35413.setBounds(588, 460, 40, 40);\n\t\ttransitionLabel35413.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35413);\n\n\t\ttransitionLabel35414 = new JLabel();\n\t\tappleLabels.put(35414, transitionLabel35414);\n\t\ttransitionLabel35414.setBounds(616, 460, 40, 40);\n\t\ttransitionLabel35414.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35414);\n\n\t\ttransitionLabel35415 = new JLabel();\n\t\tappleLabels.put(35415, transitionLabel35415);\n\t\ttransitionLabel35415.setBounds(642, 460, 40, 40);\n\t\ttransitionLabel35415.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel35415);\n\n\t\ttransitionLabel36416 = new JLabel();\n\t\tappleLabels.put(36416, transitionLabel36416);\n\t\ttransitionLabel36416.setBounds(704, 460, 40, 40);\n\t\ttransitionLabel36416.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36416);\n\n\t\ttransitionLabel36417 = new JLabel();\n\t\tappleLabels.put(36417, transitionLabel36417);\n\t\ttransitionLabel36417.setBounds(733, 460, 40, 40);\n\t\ttransitionLabel36417.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36417);\n\n\t\ttransitionLabel36418 = new JLabel();\n\t\tappleLabels.put(36418, transitionLabel36418);\n\t\ttransitionLabel36418.setBounds(758, 460, 40, 40);\n\t\ttransitionLabel36418.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel36418);\n\n\t\ttransitionLabel37419 = new JLabel();\n\t\tappleLabels.put(37419, transitionLabel37419);\n\t\ttransitionLabel37419.setBounds(820, 460, 40, 40);\n\t\ttransitionLabel37419.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37419);\n\n\t\ttransitionLabel37420 = new JLabel();\n\t\tappleLabels.put(37420, transitionLabel37420);\n\t\ttransitionLabel37420.setBounds(848, 460, 40, 40);\n\t\ttransitionLabel37420.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37420);\n\n\t\ttransitionLabel37421 = new JLabel();\n\t\tappleLabels.put(37421, transitionLabel37421);\n\t\ttransitionLabel37421.setBounds(876, 460, 40, 40);\n\t\ttransitionLabel37421.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel37421);\n\n\t\ttransitionLabel38422 = new JLabel();\n\t\tappleLabels.put(38422, transitionLabel38422);\n\t\ttransitionLabel38422.setBounds(938, 460, 40, 40);\n\t\ttransitionLabel38422.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38422);\n\n\t\ttransitionLabel38423 = new JLabel();\n\t\tappleLabels.put(38423, transitionLabel38423);\n\t\ttransitionLabel38423.setBounds(965, 460, 40, 40);\n\t\ttransitionLabel38423.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38423);\n\n\t\ttransitionLabel38424 = new JLabel();\n\t\tappleLabels.put(38424, transitionLabel38424);\n\t\ttransitionLabel38424.setBounds(992, 460, 40, 40);\n\t\ttransitionLabel38424.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel38424);\n\n\t\ttransitionLabel39425 = new JLabel();\n\t\tappleLabels.put(39425, transitionLabel39425);\n\t\ttransitionLabel39425.setBounds(1054, 460, 40, 40);\n\t\ttransitionLabel39425.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39425);\n\n\t\ttransitionLabel39426 = new JLabel();\n\t\tappleLabels.put(39426, transitionLabel39427);\n\t\ttransitionLabel39426.setBounds(1082, 460, 40, 40);\n\t\ttransitionLabel39426.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39426);\n\n\t\ttransitionLabel39427 = new JLabel();\n\t\tappleLabels.put(39427, transitionLabel39427);\n\t\ttransitionLabel39427.setBounds(1111, 460, 40, 40);\n\t\ttransitionLabel39427.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/appleLevel4BW.png\")));\n\t\tactionPanel.add(transitionLabel39427);\n\n\t\ttreeBWLevel1 = new JLabel(\"\");\n\t\ttreeBWLevel1.setLayout(new FlowLayout(FlowLayout.CENTER));\n\t\ttreeBWLevel1.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel1.setBounds(605, 51, 58, 58);\n\t\ttreeBWLevel1.setName(\"11\");\n\t\tactionPanel.add(treeBWLevel1);\n\t\tlabelList.put(11, treeBWLevel1);\n\t\ttreeBWLevel23 = new JLabel(\"\");\n\t\ttreeBWLevel23.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel23.setBounds(956, 200, 58, 58);\n\t\ttreeBWLevel23.setName(\"23\");\n\t\tlabelList.put(23, treeBWLevel23);\n\t\tactionPanel.add(treeBWLevel23);\n\t\ttreeBWLevel22 = new JLabel(\"\");\n\t\ttreeBWLevel22.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel22.setBounds(605, 200, 58, 58);\n\t\ttreeBWLevel22.setName(\"22\");\n\t\tlabelList.put(22, treeBWLevel22);\n\t\tactionPanel.add(treeBWLevel22);\n\t\ttreeBWLevel21 = new JLabel(\"\");\n\t\ttreeBWLevel21.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel21.setBounds(254, 200, 58, 58);\n\t\ttreeBWLevel21.setName(\"21\");\n\t\tlabelList.put(21, treeBWLevel21);\n\t\tactionPanel.add(treeBWLevel21);\n\t\ttreeBWLevel31 = new JLabel(\"\");\n\t\ttreeBWLevel31.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel31.setBounds(137, 350, 58, 58);\n\t\ttreeBWLevel31.setName(\"31\");\n\t\tlabelList.put(31, treeBWLevel31);\n\t\tactionPanel.add(treeBWLevel31);\n\t\ttreeBWLevel32 = new JLabel(\"\");\n\t\ttreeBWLevel32.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel32.setBounds(254, 350, 58, 58);\n\t\ttreeBWLevel32.setName(\"32\");\n\t\tlabelList.put(32, treeBWLevel32);\n\t\tactionPanel.add(treeBWLevel32);\n\t\ttreeBWLevel33 = new JLabel(\"\");\n\t\ttreeBWLevel33.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel33.setBounds(371, 350, 58, 58);\n\t\ttreeBWLevel33.setName(\"33\");\n\t\tlabelList.put(33, treeBWLevel33);\n\t\tactionPanel.add(treeBWLevel33);\n\t\ttreeBWLevel34 = new JLabel(\"\");\n\t\ttreeBWLevel34.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel34.setBounds(488, 350, 58, 58);\n\t\ttreeBWLevel34.setName(\"34\");\n\t\tlabelList.put(34, treeBWLevel34);\n\t\tactionPanel.add(treeBWLevel34);\n\t\ttreeBWLevel35 = new JLabel(\"\");\n\t\ttreeBWLevel35.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel35.setBounds(605, 350, 58, 58);\n\t\ttreeBWLevel35.setName(\"35\");\n\t\tlabelList.put(35, treeBWLevel35);\n\t\tactionPanel.add(treeBWLevel35);\n\t\ttreeBWLevel36 = new JLabel(\"\");\n\t\ttreeBWLevel36.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel36.setBounds(722, 350, 58, 58);\n\t\ttreeBWLevel36.setName(\"36\");\n\t\tlabelList.put(36, treeBWLevel36);\n\t\tactionPanel.add(treeBWLevel36);\n\t\ttreeBWLevel37 = new JLabel(\"\");\n\t\ttreeBWLevel37.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel37.setBounds(839, 350, 58, 58);\n\t\ttreeBWLevel37.setName(\"37\");\n\t\tlabelList.put(37, treeBWLevel37);\n\t\tactionPanel.add(treeBWLevel37);\n\t\ttreeBWLevel38 = new JLabel(\"\");\n\t\ttreeBWLevel38.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel38.setBounds(956, 350, 58, 58);\n\t\ttreeBWLevel38.setName(\"38\");\n\t\tlabelList.put(38, treeBWLevel38);\n\t\tactionPanel.add(treeBWLevel38);\n\t\ttreeBWLevel39 = new JLabel(\"\");\n\t\ttreeBWLevel39.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBW.png\")));\n\t\ttreeBWLevel39.setBounds(1073, 350, 58, 58);\n\t\ttreeBWLevel39.setName(\"39\");\n\t\tlabelList.put(39, treeBWLevel39);\n\t\tactionPanel.add(treeBWLevel39);\n\t\ttreeBWLevel41 = new JLabel(\"\");\n\t\ttreeBWLevel41.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel41.setBounds(98, 510, 40, 40);\n\t\ttreeBWLevel41.setName(\"41\");\n\t\tlabelList.put(41, treeBWLevel41);\n\t\tactionPanel.add(treeBWLevel41);\n\t\ttreeBWLevel42 = new JLabel(\"\");\n\t\ttreeBWLevel42.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel42.setBounds(137, 510, 40, 40);\n\t\ttreeBWLevel42.setName(\"42\");\n\t\tlabelList.put(42, treeBWLevel42);\n\t\tactionPanel.add(treeBWLevel42);\n\t\ttreeBWLevel43 = new JLabel(\"\");\n\t\ttreeBWLevel43.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel43.setBounds(176, 510, 40, 40);\n\t\ttreeBWLevel43.setName(\"43\");\n\t\tlabelList.put(43, treeBWLevel43);\n\t\tactionPanel.add(treeBWLevel43);\n\t\ttreeBWLevel44 = new JLabel(\"\");\n\t\ttreeBWLevel44.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel44.setBounds(215, 510, 40, 40);\n\t\ttreeBWLevel44.setName(\"44\");\n\t\tlabelList.put(44, treeBWLevel44);\n\t\tactionPanel.add(treeBWLevel44);\n\t\ttreeBWLevel45 = new JLabel(\"\");\n\t\ttreeBWLevel45.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel45.setBounds(254, 510, 40, 40);\n\t\ttreeBWLevel45.setName(\"45\");\n\t\tlabelList.put(45, treeBWLevel45);\n\t\tactionPanel.add(treeBWLevel45);\n\t\ttreeBWLevel46 = new JLabel(\"\");\n\t\ttreeBWLevel46.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel46.setBounds(293, 510, 40, 40);\n\t\ttreeBWLevel46.setName(\"46\");\n\t\tlabelList.put(46, treeBWLevel46);\n\t\tactionPanel.add(treeBWLevel46);\n\t\ttreeBWLevel47 = new JLabel(\"\");\n\t\ttreeBWLevel47.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel47.setBounds(332, 510, 40, 40);\n\t\ttreeBWLevel47.setName(\"47\");\n\t\tlabelList.put(47, treeBWLevel47);\n\t\tactionPanel.add(treeBWLevel47);\n\t\ttreeBWLevel48 = new JLabel(\"\");\n\t\ttreeBWLevel48.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel48.setBounds(371, 510, 40, 40);\n\t\ttreeBWLevel48.setName(\"48\");\n\t\tlabelList.put(48, treeBWLevel48);\n\t\tactionPanel.add(treeBWLevel48);\n\t\ttreeBWLevel49 = new JLabel(\"\");\n\t\ttreeBWLevel49.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel49.setBounds(410, 510, 40, 40);\n\t\ttreeBWLevel49.setName(\"49\");\n\t\tlabelList.put(49, treeBWLevel49);\n\t\tactionPanel.add(treeBWLevel49);\n\t\ttreeBWLevel412 = new JLabel(\"\");\n\t\ttreeBWLevel412.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel412.setBounds(527, 510, 40, 40);\n\t\ttreeBWLevel412.setName(\"412\");\n\t\tlabelList.put(412, treeBWLevel412);\n\t\tactionPanel.add(treeBWLevel412);\n\t\ttreeBWLevel410 = new JLabel(\"\");\n\t\ttreeBWLevel410.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel410.setBounds(449, 510, 40, 40);\n\t\ttreeBWLevel410.setName(\"410\");\n\t\tlabelList.put(410, treeBWLevel410);\n\t\tactionPanel.add(treeBWLevel410);\n\t\ttreeBWLevel411 = new JLabel(\"\");\n\t\ttreeBWLevel411.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel411.setBounds(488, 510, 40, 40);\n\t\ttreeBWLevel411.setName(\"411\");\n\t\tlabelList.put(411, treeBWLevel411);\n\t\tactionPanel.add(treeBWLevel411);\n\t\ttreeBWLevel413 = new JLabel(\"\");\n\t\ttreeBWLevel413.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel413.setBounds(566, 510, 40, 40);\n\t\ttreeBWLevel413.setName(\"413\");\n\t\tlabelList.put(413, treeBWLevel413);\n\t\tactionPanel.add(treeBWLevel413);\n\t\ttreeBWLevel414 = new JLabel(\"\");\n\t\ttreeBWLevel414.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel414.setBounds(605, 510, 40, 40);\n\t\ttreeBWLevel414.setName(\"414\");\n\t\tlabelList.put(414, treeBWLevel414);\n\t\tactionPanel.add(treeBWLevel414);\n\t\ttreeBWLevel415 = new JLabel(\"\");\n\t\ttreeBWLevel415.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel415.setBounds(644, 510, 40, 40);\n\t\ttreeBWLevel415.setName(\"415\");\n\t\tlabelList.put(415, treeBWLevel415);\n\t\tactionPanel.add(treeBWLevel415);\n\t\ttreeBWLevel416 = new JLabel(\"\");\n\t\ttreeBWLevel416.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel416.setBounds(683, 510, 40, 40);\n\t\ttreeBWLevel416.setName(\"416\");\n\t\tlabelList.put(416, treeBWLevel416);\n\t\tactionPanel.add(treeBWLevel416);\n\t\ttreeBWLevel417 = new JLabel(\"\");\n\t\ttreeBWLevel417.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel417.setBounds(722, 510, 40, 40);\n\t\ttreeBWLevel417.setName(\"417\");\n\t\tlabelList.put(417, treeBWLevel417);\n\t\tactionPanel.add(treeBWLevel417);\n\t\ttreeBWLevel418 = new JLabel(\"\");\n\t\ttreeBWLevel418.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel418.setBounds(761, 510, 40, 40);\n\t\ttreeBWLevel418.setName(\"418\");\n\t\tlabelList.put(418, treeBWLevel418);\n\t\tactionPanel.add(treeBWLevel418);\n\n\t\ttreeBWLevel419 = new JLabel(\"\");\n\t\ttreeBWLevel419.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel419.setName(\"419\");\n\t\ttreeBWLevel419.setBounds(800, 510, 40, 40);\n\t\tlabelList.put(419, treeBWLevel419);\n\t\tactionPanel.add(treeBWLevel419);\n\n\t\ttreeBWLevel420 = new JLabel(\"\");\n\t\ttreeBWLevel420.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel420.setName(\"420\");\n\t\ttreeBWLevel420.setBounds(839, 510, 40, 40);\n\t\tlabelList.put(420, treeBWLevel420);\n\t\tactionPanel.add(treeBWLevel420);\n\n\t\ttreeBWLevel421 = new JLabel(\"\");\n\t\ttreeBWLevel421.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel421.setName(\"421\");\n\t\ttreeBWLevel421.setBounds(878, 510, 40, 40);\n\t\tlabelList.put(421, treeBWLevel421);\n\t\tactionPanel.add(treeBWLevel421);\n\n\t\ttreeBWLevel422 = new JLabel(\"\");\n\t\ttreeBWLevel422.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel422.setName(\"422\");\n\t\ttreeBWLevel422.setBounds(917, 510, 40, 40);\n\t\tlabelList.put(422, treeBWLevel422);\n\t\tactionPanel.add(treeBWLevel422);\n\n\t\ttreeBWLevel423 = new JLabel(\"\");\n\t\ttreeBWLevel423.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel423.setName(\"423\");\n\t\ttreeBWLevel423.setBounds(956, 510, 40, 40);\n\t\tlabelList.put(423, treeBWLevel423);\n\t\tactionPanel.add(treeBWLevel423);\n\n\t\ttreeBWLevel424 = new JLabel(\"\");\n\t\ttreeBWLevel424.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel424.setName(\"424\");\n\t\ttreeBWLevel424.setBounds(995, 510, 40, 40);\n\t\tlabelList.put(424, treeBWLevel424);\n\t\tactionPanel.add(treeBWLevel424);\n\n\t\ttreeBWLevel425 = new JLabel(\"\");\n\t\ttreeBWLevel425.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel425.setName(\"425\");\n\t\ttreeBWLevel425.setBounds(1034, 510, 40, 40);\n\t\tlabelList.put(425, treeBWLevel425);\n\t\tactionPanel.add(treeBWLevel425);\n\n\t\ttreeBWLevel426 = new JLabel(\"\");\n\t\ttreeBWLevel426.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel426.setName(\"426\");\n\t\tlabelList.put(426, treeBWLevel426);\n\t\ttreeBWLevel426.setBounds(1073, 510, 40, 40);\n\t\tactionPanel.add(treeBWLevel426);\n\n\t\ttreeBWLevel427 = new JLabel(\"\");\n\t\ttreeBWLevel427.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/treeBWLevel4.png\")));\n\t\ttreeBWLevel427.setName(\"427\");\n\t\ttreeBWLevel427.setBounds(1112, 510, 40, 40);\n\t\tlabelList.put(4127, treeBWLevel427);\n\t\tactionPanel.add(treeBWLevel427);\n\t\tactionPanel.add(treeBWLevel427);\n\t\tarrowLabel = new JLabel(\"\");\n\t\tarrowLabel.setIcon(new ImageIcon(ClassLoader.getSystemResource(\"image/arrow.png\")));\n\t\tarrowLabel.setBounds(660, 600, 30, 30);\n\t\tactionPanel.add(arrowLabel);\n\t\tarrowLabel.setVisible(false);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(Color.LIGHT_GRAY);\n\t\tpanel.setBorder(new TitledBorder(null, \"\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\n\t\tpanel.setBounds(6, 599, 1250, 98);\n\t\tactionPanel.add(panel);\n\t\tpanel.setLayout(null);\n\t\ttestPanel = new JPanel();\n\t\ttestPanel.setBounds(650, 27, 245, 39);\n\t\tpanel.add(testPanel);\n\t\ttestPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));\n\n\t\ttestBtn1 = new JButton(\"\");\n\t\ttestBtn1.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn1);\n\n\t\ttestBtn2 = new JButton(\"\");\n\t\ttestBtn2.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn2);\n\n\t\ttestBtn3 = new JButton(\"\");\n\t\ttestBtn3.setBackground(Color.GRAY);\n\t\ttestPanel.add(testBtn3);\n\n\t\ttestPanel.setVisible(false);\n\t\ttestPanel.setBackground(Color.LIGHT_GRAY);\n\n\t\tpanel_1 = new JPanel();\n\t\tpanel_1.setBackground(Color.LIGHT_GRAY);\n\t\tpanel_1.setBounds(181, 27, 376, 44);\n\t\tpanel.add(panel_1);\n\n\t\tJLabel lblNewLabel = new JLabel(\"Enter Test string\");\n\t\tpanel_1.add(lblNewLabel);\n\n\t\ttestField = new JTextField();\n\t\ttestField.setBounds(20, 40, 161, 27);\n\t\tpanel_1.add(testField);\n\t\ttestField.setColumns(10);\n\t\ttestBtn = new JButton(\"Test\");\n\t\ttestBtn.setBounds(340, 20, 92, 30);\n\t\tpanel_1.add(testBtn);\n\n\t\ttestBtn.addMouseListener(new MouseAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\ttestPanel.setVisible(true);\n\t\t\t\tarrowLabel.setVisible(true);\n\n\t\t\t\ttestString = testField.getText().toString();\n\n\t\t\t\ttestBtn1.setText(String.valueOf(testString.charAt(0)));\n\t\t\t\ttestBtn2.setText(String.valueOf(testString.charAt(1)));\n\t\t\t\ttestBtn3.setText(String.valueOf(testString.charAt(2)));\n\t\t\t\tactionPanel.revalidate();\n\t\t\t\tactionPanel.repaint();\n\t\t\t\t// testBtn1.setText(\" \" + testString.charAt(0));\n\n\t\t\t\ttestBtn1.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setVisible(true);\n\t\t\t\t\t\tarrowLabel.setBounds(700, 600, 30, 30);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 1));\n\t\t\t\t\t\ttestBtn1.setBackground(Color.GREEN);\n\t\t\t\t\t\ttestBtn2.setBackground(Color.GRAY);\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GRAY);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttestBtn2.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setBounds(745, 600, 30, 30);\n\t\t\t\t\t\tarrowLabel.setVisible(true);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 2));\n\t\t\t\t\t\ttestBtn2.setBackground(Color.GREEN);\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GRAY);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttestBtn3.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\tarrowLabel.setBounds(790, 600, 30, 30);\n\t\t\t\t\t\tNFARunWindow.this.testUserInput(testString.substring(0, 3));\n\t\t\t\t\t\ttestBtn3.setBackground(Color.GREEN);\n\t\t\t\t\t\tarrowLabel.setVisible(false);\n\t\t\t\t\t\tactionPanel.revalidate();\n\t\t\t\t\t\tactionPanel.repaint();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t}", "public void showTitleScreen() {\n frame.showMenu();\n }", "@Override\n\tpublic void showContents() {\n\t\tt1.start();\n\t\tif (menuAnimation.title_showing())\n\t\t{\n\t\t\tprogram.add(Play);\n\t\t\tprogram.add(Settings);\n\t\t\tprogram.add(Credits);\n\t\t\tprogram.add(Exit);\n\t\t\tprogram.add(barrel);\n\t\t\tprogram.add(tank);\n\t\t\ttitle.setLocation(30,80);\n\t\t\ttitle.changeTransparent(1);\n\t\t\tprogram.add(title);\n\t\t\tbackground.setImage(\"otherImages/background.png\");\n\t\t\tbackground.setSize(900,620);\n\t\t\tbackground.setLocation(-50,0);\n\t\t\tbg.start();\n\t\t\tbackground.sendToBack();\n\t\t\tprogram.add(background);\n\t\t}\n\t}", "private void makeFullScreen(){\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n // Make it full Screen\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);\n }", "@Override\n\tpublic void setDisplayShowHomeEnabled(boolean showHome) {\n\t\t\n\t}", "private void finalScreen() {\r\n\t\tdisplay.setLegend(GAME_OVER);\r\n\t\tdisplay.removeKeyListener(this);\r\n\t}", "@Override\r\n\tprotected void pack() {\r\n\r\n\t\tRectangle displayarea = shell.getDisplay().getPrimaryMonitor().getBounds();\r\n\t\tRectangle windowarea = shell.getBounds();\r\n\t\tshell.setBounds((displayarea.width - windowarea.width) / 2,\r\n\t\t\t\t(displayarea.height - windowarea.height) / 2,\r\n\t\t\t\twindowarea.width, windowarea.height);\r\n\t}", "public static void f_menu(){\n System.out.println(\"╔══════════════════════╗\");\r\n System.out.println(\"║ SoftAverageHeight ║\");\r\n System.out.println(\"║Version 1.0 20200428 ║\");\r\n System.out.println(\"║Created by:Andres Diaz║\");\r\n System.out.println(\"╚══════════════════════╝\");\r\n\r\n }", "private void launchHomeScreen(){\n\n prefManager.setFirstTimeLaunch(false);\n Intent i = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(i);\n }", "protected void zoomToPresent(){\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread > 100) { widgg.timeorg.timeSpread /=2; }\n else { widgg.timeorg.timeSpread = 100; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n }", "public void shortPress();", "public void cutHair(){\r\n \t\t System.out.println(\"The barber is cutting hair\");\r\n \t\t\ttry {\r\n\t\t\t sleep(5000);\r\n \t\t\t } catch (InterruptedException ex){ }\r\n \t\t }", "public void switchToHomeScreen() {\n Intent startMain = new Intent(Intent.ACTION_MAIN);\n startMain.addCategory(Intent.CATEGORY_HOME);\n startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(startMain);\n }", "@Override\n\tpublic void run() {\n\t\tDisplay.getCurrent().getActiveShell().setMinimized(true);\n\t}", "public static void ShowHelpScreen() {\n ToggleVisibility(HelpPage.window);\n }", "@Override\n\tpublic void setDisplayHomeAsUpEnabled(boolean showHomeAsUp) {\n\t\t\n\t}", "public void showHue()\r\n {\r\n\tshowHue(\"Hue\");\r\n }", "public void home() {\n\t\tUserUI ui = new UserUI();\n\t\tui.start();\n\t}", "private void showActionOverflowMenu() {\n try {\n ViewConfiguration config = ViewConfiguration.get(this);\n Field menuKeyField = ViewConfiguration.class.getDeclaredField(\"sHasPermanentMenuKey\");\n if (menuKeyField != null) {\n menuKeyField.setAccessible(true);\n menuKeyField.setBoolean(config, false);\n }\n } catch (Exception e) {\n Log.d(TAG, e.getLocalizedMessage());\n }\n }", "public ShutDown() {\n initComponents();\n this.setPreferredSize(new Dimension(365, 335));\n this.setMaximumSize(new Dimension(365, 335));\n this.setMinimumSize(new Dimension(365, 335));\n this.setBounds(600, 80, 365, 335);\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"/Pictures/icon.jpg\")));\n\n }", "public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screen.width - width) / 2;\r\n int y = (screen.height - height) / 2;\r\n setBounds(x, y, width, height);\r\n\r\n // build the splash screen using an image \r\n \r\n JLabel gifImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/splash.gif\")));\r\n content.add(gifImage, BorderLayout.CENTER);\r\n\r\n // display it\r\n setVisible(true);\r\n\r\n new resourceLoader().execute();\r\n }", "private void setActionBar() {\n headView.setText(\"消息中心\");\n headView.setGobackVisible();\n headView.setRightGone();\n // headView.setRightResource();\n }", "public void cursorHome();", "private void addScreenUsage() {\n double power = 0;\n long screenOnTimeMs = mStats.getScreenOnTime(mRawRealtimeUs, mStatsType) / 1000;\n power += screenOnTimeMs * mPowerProfile.getAveragePower(PowerProfile.POWER_SCREEN_ON);\n final double screenFullPower =\n mPowerProfile.getAveragePower(PowerProfile.POWER_SCREEN_FULL);\n for (int i = 0; i < BatteryStats.NUM_SCREEN_BRIGHTNESS_BINS; i++) {\n double screenBinPower = screenFullPower * (i + 0.5f)\n / BatteryStats.NUM_SCREEN_BRIGHTNESS_BINS;\n long brightnessTime = mStats.getScreenBrightnessTime(i, mRawRealtimeUs, mStatsType)\n / 1000;\n double p = screenBinPower * brightnessTime;\n if (DEBUG && p != 0) {\n Log.d(TAG, \"Screen bin #\" + i + \": time=\" + brightnessTime\n + \" power=\" + makemAh(p / (60 * 60 * 1000)));\n }\n power += p;\n }\n power /= (60 * 60 * 1000); // To hours\n if (power != 0) {\n addEntry(BatterySipper.DrainType.SCREEN, screenOnTimeMs, power);\n }\n }", "public int clearScreen () {\n int distance = home();\n myLine.clear();\n return distance;\n }", "private void prepareAndShowHomeScreen(boolean addToBackstack) {\n\t\tFraHeader header = FraHeader.newInstance(true);\n\t\theader.showBackButton(false);\n\t\tFraHomeContent homeContent = FraHomeContent.newInstance();\n\t\tFraFooter footer = FraFooter.newInstance(FooterIcons.TOP10);\n\t\tFraSearch search = FraSearch.newInstance();\n\t\tFraFont font = FraFont.newInstance();\n\t\tFraShare share = FraShare.newInstance();\n\n\t\treplaceScreenWithNavBarContentAndMenu(header, FraHeader.TAG,\n\t\t\t\thomeContent, FraHomeContent.TAG, footer, FraFooter.TAG,\n\t\t\t\tFraMenu.newInstance(), FraMenu.TAG, search, FraSearch.TAG,\n\t\t\t\tfont, FraFont.TAG, share, FraShare.TAG, addToBackstack);\n\n\t\t/*\n\t\t * replaceScreenWithNavBarContentAndFooter(homeContent,\n\t\t * FraHomeContent.TAG, footer, FraFooter.TAG, false);\n\t\t */\n\t}", "void calculateChevronTrim() {\n ToolBar tb = new ToolBar( parent, SWT.FLAT );\n ToolItem ti = new ToolItem( tb, SWT.PUSH );\n // Image image = new Image (display, 1, 1);\n // ti.setImage (image);\n Point size = tb.computeSize( SWT.DEFAULT, SWT.DEFAULT );\n size = parent.fixPoint( size.x, size.y );\n CHEVRON_HORIZONTAL_TRIM = size.x - 1;\n CHEVRON_VERTICAL_TRIM = size.y - 1;\n tb.dispose();\n ti.dispose();\n // image.dispose ();\n }", "private void startingScreen() {\n screenWithGivenValues(-1,-2,1,2,3,-1,0);\n }", "public void addBlackScreen(Pane root) {\n\t\tblackScreen=new Rectangle(0,0,1920,1080);\n\t\tblackScreen.setFill(Color.BLACK);\n\t\tblackScreen.setVisible(false);\n\t\troot.getChildren().add(blackScreen);\n\t}", "public void onSwipeTop() {\n if (moodNumber < Constants.tabSmiley.length - 1) {\n moodNumber++;\n swipeDisplay();\n }\n }", "public EntryPoint()\n { \n \tpushScreen(new HelperScreen());\n }", "protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}", "private void showTitleScreen() {\n\t\tresetParameters();\n\t\t\n\t\t// if the play button is not clicked\n\t\twhile (!Mouse.isButtonDown(0)\n\t\t\t\t|| !(Mouse.getX() >= 249 && Mouse.getX() <= 539 && Mouse.getY() <= (displayHeight - 215) && Mouse.getY() >= (displayHeight - 284))) {\n\t\t\t// draw title screen\n\t\t\tdrawScreen(sprite.get(\"titleScreen\"));\n\t\t\t\n\t\t\tif (Mouse.isButtonDown(0) && Mouse.getX() >= 249 && Mouse.getX() <= 539\n\t\t\t\t\t&& Mouse.getY() <= (displayHeight - 304) && Mouse.getY() >= (displayHeight - 373)) {\n\t\t\t\tshowInstructScreen();\n\t\t\t}\n\t\t\t\n\t\t\tif (Mouse.isButtonDown(0) && Mouse.getX() >= 249 && Mouse.getX() <= 539\n\t\t\t\t\t&& Mouse.getY() <= (displayHeight - 393) && Mouse.getY() >= (displayHeight - 462)) {\n\t\t\t\tshowCreditsScreen();\n\t\t\t}\n\t\t\tif (Mouse.isButtonDown(0) && Mouse.getX() >= 249 && Mouse.getX() <= 539\n\t\t\t\t\t&& Mouse.getY() <= (displayHeight - 482) && Mouse.getY() >= (displayHeight - 551)) {\n\t\t\t\tDisplay.destroy();\n\t\t\t\tAL.destroy();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\n\t\t\t// update display\n\t\t\tupdateDisplay();\n\t\t}\n\t\t\n\t\t// reset beginning time\n\t\tDelta.setBeginningTime(Delta.getTime());\n\t}", "private void displayWelcome(){\n clrscr();\n System.out.println(\"\\nWelcome to the Tickets Viewer!\\n\");\n System.out.println(\"We Recommend you Maximize this window for the best User Experience!\\n\");\n System.out.println(\"Please press \\\"Enter\\\" to continue\");\n }", "@Override\n\tpublic void showServicePasswordNextScreen() {\n\t\tif(ParentActivity.AnimationRunningFlag == true)\n\t\t\treturn;\n\t\telse\n\t\t\tParentActivity.StartAnimationRunningTimer();\n\t\t\n\t\tParentActivity._MenuBaseFragment.showBodyESL();\n\t\t\n\t\tParentActivity.OldScreenIndex = Home.SCREEN_STATE_MENU_MODE_ETC_AUTOSHUTDOWN_PW;\n\t}", "private void showMenuScreen()\n {\n logoutButton.setVisibility(textViewLabel.VISIBLE);\n battleButton.setVisibility(View.VISIBLE);\n char1.setVisibility(View.VISIBLE);\n char2.setVisibility(View.VISIBLE);\n char3.setVisibility(View.VISIBLE);\n }", "private static void mainMenuLines(){\n setMenuLines(\"\",4,6,7,8,9,10,11,12,13,14,15,16,17,18,19);\n setMenuLines(\"Welcome to Ben's CMR program.\",1);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" for a list of valid commands!\",20);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" to close the application!\",21);\n }", "public static void main(String [] args) \n {\n int primary_display = 0; //index into Graphic Devices array... \n\n int primary_width;\n\n GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment();\n GraphicsDevice devices[] = environment.getScreenDevices();\n String location;\n if(devices.length>1 ){ //we have a 2nd display/projector\n primary_width = devices[0].getDisplayMode().getWidth();\n location = \"--location=\"+primary_width+\",0\";\n\n }else{//leave on primary display\n location = \"--location=0,0\";\n\n }\n\n String display = \"--display=\"+primary_display+1; //processing considers the first display to be # 1\n PApplet.main(new String[] { location , \"--hide-stop\", display, reactivemusicapp.JuneThirdElaphant.class.getName()});\n // End full screen code\n }", "public void startApp() {\n try {\n System.out.println(\" \");\n Thread.sleep(200);\n System.out.println(\" ▓█████▄ ▄▄▄ ██▀███ ▄▄▄█████▓\");\n Thread.sleep(220);\n System.out.println(\" ▒██▀ ██▌▒████▄ ▓██ ▒ ██▒▓ ██▒ ▓▒\");\n Thread.sleep(210);\n System.out.println(\" ░██ █▌▒██ ▀█▄ ▓██ ░▄█ ▒▒ ▓██░ ▒░\");\n Thread.sleep(200);\n System.out.println(\" ░▓█▄ ▌░██▄▄▄▄██ ▒██▀▀█▄ ░ ▓██▓ ░\");\n Thread.sleep(190);\n System.out.println(\" ░▒████▓ ▓█ ▓██▒░██▓ ▒██▒ ▒██▒ ░\");\n Thread.sleep(180);\n System.out.println(\" ▒▒▓ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░ ▒ ░░\");\n Thread.sleep(170);\n System.out.println(\" ░ ▒ ▒ ▒ ▒▒ ░ ░▒ ░ ▒░ ░\");\n Thread.sleep(160);\n System.out.println(\" ░ ░ ░ ░ ▒ ░░ ░ ░\");\n Thread.sleep(150);\n System.out.println(\" ░ ░ ░ ░\");\n Thread.sleep(150);\n System.out.println(\" ░\");\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n mainMenu();\n }\n mainMenu();\n }", "void showOverview() {\n\t\tif (!isShown) {\n\t\t\tisShown = true;\n\t\t\tConfigurationMenu.overviewBox.add(mainBox);\n\t\t} else {\n\t\t\tisShown = false;\n\t\t\tConfigurationMenu.overviewBox.remove(mainBox);\n\t\t}\n\t}", "public void levelSevenScreen() {\n timer.stop();\n gameModel.setState(\"Level 7\");\n currentScene = levelSetup.getLevelSeven().getScene(levelSevenInitialEntrance);\n currentBoard = levelSetup.getLevelSeven().getBoard();\n currentLevelScreen = levelSetup.getLevelSeven();\n levelSevenInitialEntrance = (levelSevenInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n }", "void showProfileBackground();", "public void levelEightScreen() {\n timer.stop();\n gameModel.setState(\"Level 8\");\n currentScene = levelSetup.getLevelEight().getScene(levelEightInitialEntrance);\n currentBoard = levelSetup.getLevelEight().getBoard();\n currentLevelScreen = levelSetup.getLevelEight();\n levelEightInitialEntrance = (levelEightInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n }", "public void levelSixScreen() {\n timer.stop();\n gameModel.setState(\"Level 6\");\n currentScene = levelSetup.getLevelSix().getScene(levelSixInitialEntrance);\n currentBoard = levelSetup.getLevelSix().getBoard();\n currentLevelScreen = levelSetup.getLevelSix();\n levelSixInitialEntrance = (levelSixInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n }", "public void factoryMainScreen()\n\t{\n\t\t\n\t}", "@Override\r\n protected void onScreenActivate() {\n if (Forge.isLandscapeMode() && displaySidebarForLandscapeMode()) {\r\n menu.hide();\r\n menu.show(getLeft(), 0, getWidth(), getHeight());\r\n }\r\n }", "protected void createContents() {\n\t\tshlFaststone = new Shell();\n\t\tshlFaststone.setImage(SWTResourceManager.getImage(Edit.class, \"/image/all1.png\"));\n\t\tshlFaststone.setToolTipText(\"\");\n\t\tshlFaststone.setSize(944, 479);\n\t\tshlFaststone.setText(\"kaca\");\n\t\tshlFaststone.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tComposite composite = new Composite(shlFaststone, SWT.NONE);\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm = new SashForm(composite, SWT.VERTICAL);\n\t\t//\n\t\tMenu menu = new Menu(shlFaststone, SWT.BAR);\n\t\tshlFaststone.setMenuBar(menu);\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setSelection(true);\n\t\tmenuItem.setText(\"\\u6587\\u4EF6\");\n\t\t\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\t\t\n\t\tfinal Canvas down=new Canvas(shlFaststone,SWT.NONE|SWT.BORDER|SWT.DOUBLE_BUFFERED);\n\t\t\n\t\tComposite composite_4 = new Composite(sashForm, SWT.BORDER);\n\t\tcomposite_4.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_3 = new SashForm(composite_4, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_3);\n\t\tformToolkit.paintBordersFor(sashForm_3);\n\t\t\n\t\tToolBar toolBar = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.WRAP | SWT.RIGHT);\n\t\ttoolBar.setToolTipText(\"\");\n\t\t\n\t\tToolItem toolItem_6 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_6.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_2.notifyListeners(SWT.Selection,event1);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6253\\u5F00.jpg\"));\n\t\ttoolItem_6.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t\n\t\ttltmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttltmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\ttltmNewItem.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t//关闭\n\t\tToolItem tltmNewItem_4 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\ttltmNewItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttltmNewItem_4.setText(\"\\u5173\\u95ED\");\n\t\t\n\t\t\n\t\t\n\t\tToolItem tltmNewItem_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//缩放\n\t\t\n\t\t\n\t\ttltmNewItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u653E\\u5927.jpg\"));\n\t\t\n\t\t//工具栏:放大\n\t\t\n\t\ttltmNewItem_1.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tToolItem tltmNewItem_2 = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t//工具栏:缩小\n\t\ttltmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\ttltmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F29\\u5C0F.jpg\"));\n\t\ttltmNewItem_2.setText(\"\\u7F29\\u5C0F\");\n\t\tToolItem toolItem_5 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttoolItem_5.setText(\"\\u9000\\u51FA\");\n\t\t\n\t\tToolBar toolBar_1 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\tformToolkit.adapt(toolBar_1);\n\t\tformToolkit.paintBordersFor(toolBar_1);\n\t\t\n\t\tToolItem toolItem_7 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:标题\n\t\ttoolItem_7.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_7.setText(\"\\u6807\\u9898\");\n\t\ttoolItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6807\\u9898.jpg\"));\n\t\t\n\t\tToolItem toolItem_1 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:调整大小\n\t\ttoolItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_1.setText(\"\\u8C03\\u6574\\u5927\\u5C0F\");\n\t\ttoolItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u8C03\\u6574\\u5927\\u5C0F.jpg\"));\n\t\t\n\t\tToolBar toolBar_2 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tformToolkit.adapt(toolBar_2);\n\t\tformToolkit.paintBordersFor(toolBar_2);\n\t\t\n\t\tToolItem toolItem_2 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:裁剪\n\t\ttoolItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_2.setText(\"\\u88C1\\u526A\");\n\t\ttoolItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u88C1\\u526A.jpg\"));\n\t\t\n\t\tToolItem toolItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:剪切\n\t\ttoolItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_3.setText(\"\\u526A\\u5207\");\n\t\ttoolItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u526A\\u5207.jpg\"));\n\t\t\n\t\tToolItem toolItem_4 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\n\t\t//工具栏:粘贴\n\t\ttoolItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tcomposite_3.layout();\n\t\t\t\tFile f=new File(\"src/picture/beauty.jpg\");\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tButton lblNewLabel_3 = null;\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcomposite_3.layout();\n\t\t\t}\n\t\t});\n\t\t//omposite;\n\t\t//\n\t\t\n\t\ttoolItem_4.setText(\"\\u590D\\u5236\");\n\t\ttoolItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u590D\\u5236.jpg\"));\n\t\t\n\t\tToolItem tltmNewItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\ttltmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\ttltmNewItem_3.setText(\"\\u7C98\\u8D34\");\n\t\tsashForm_3.setWeights(new int[] {486, 165, 267});\n\t\t\n\t\tComposite composite_1 = new Composite(sashForm, SWT.NONE);\n\t\tformToolkit.adapt(composite_1);\n\t\tformToolkit.paintBordersFor(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_1 = new SashForm(composite_1, SWT.VERTICAL);\n\t\tformToolkit.adapt(sashForm_1);\n\t\tformToolkit.paintBordersFor(sashForm_1);\n\t\t\n\t\tComposite composite_2 = new Composite(sashForm_1, SWT.NONE);\n\t\tformToolkit.adapt(composite_2);\n\t\tformToolkit.paintBordersFor(composite_2);\n\t\tcomposite_2.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(composite_2, SWT.NONE);\n\t\ttabFolder.setTouchEnabled(true);\n\t\tformToolkit.adapt(tabFolder);\n\t\tformToolkit.paintBordersFor(tabFolder);\n\t\t\n\t\tTabItem tbtmNewItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem.setText(\"\\u65B0\\u5EFA\\u4E00\");\n\t\t\n\t\tTabItem tbtmNewItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_1.setText(\"\\u65B0\\u5EFA\\u4E8C\");\n\t\t\n\t\tTabItem tbtmNewItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_2.setText(\"\\u65B0\\u5EFA\\u4E09\");\n\t\t\n\t\tButton button = new Button(tabFolder, SWT.CHECK);\n\t\tbutton.setText(\"Check Button\");\n\t\t\n\t\tcomposite_3 = new Composite(sashForm_1, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\t\n\t\tformToolkit.adapt(composite_3);\n\t\tformToolkit.paintBordersFor(composite_3);\n\t\tcomposite_3.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tLabel lblNewLabel_3 = new Label(composite_3, SWT.NONE);\n\t\tformToolkit.adapt(lblNewLabel_3, true, true);\n\t\tlblNewLabel_3.setText(\"\");\n\t\tsashForm_1.setWeights(new int[] {19, 323});\n\t\t\n\t\tComposite composite_5 = new Composite(sashForm, SWT.NONE);\n\t\tcomposite_5.setToolTipText(\"\");\n\t\tcomposite_5.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_2 = new SashForm(composite_5, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_2);\n\t\tformToolkit.paintBordersFor(sashForm_2);\n\t\t\n\t\tLabel lblNewLabel = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel, true, true);\n\t\tlblNewLabel.setText(\"1/1\");\n\t\t\n\t\tLabel lblNewLabel_2 = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_2, true, true);\n\t\tlblNewLabel_2.setText(\"\\u5927\\u5C0F\\uFF1A1366*728\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(sashForm_2, SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_1, true, true);\n\t\tlblNewLabel_1.setText(\"\\u7F29\\u653E\\uFF1A100%\");\n\t\t\n\t\tLabel label = new Label(sashForm_2, SWT.NONE);\n\t\tlabel.setAlignment(SWT.RIGHT);\n\t\tformToolkit.adapt(label, true, true);\n\t\tlabel.setText(\"\\u5494\\u5693\\u5DE5\\u4F5C\\u5BA4\\u7248\\u6743\\u6240\\u6709\");\n\t\tsashForm_2.setWeights(new int[] {127, 141, 161, 490});\n\t\tsashForm.setWeights(new int[] {50, 346, 22});\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u65B0\\u5EFA.jpg\"));\n\t\tmntmNewItem.setText(\"\\u65B0\\u5EFA\");\n\t\t\n\t\tmntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\t//Label lblNewLabel_3 = new Label(composite_1, SWT.NONE);\n\t\t\t\t//Canvas c=new Canvas(shlFaststone,SWT.BALLOON);\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u6253\\u5F00.jpg\"));\n\t\tmntmNewItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem mntmNewItem_1 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_1.setText(\"\\u4ECE\\u526A\\u8D34\\u677F\\u5BFC\\u5165\");\n\t\t\n\t\tMenuItem mntmNewItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\tmntmNewItem_3.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t\n\t\t mntmNewItem_5 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t boolean result=MessageDialog.openConfirm(shlFaststone,\"退出\",\"是否确认退出\");\n\t\t\t\t if(result) {\n\t\t\t\t\t System.exit(0);\n\t\t\t\t }\n\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u4FDD\\u5B58.jpg\"));\n\t\tmntmNewItem_5.setText(\"\\u5173\\u95ED\");\n\t\tevent2=new Event();\n\t\tevent2.widget=mntmNewItem_5;\n\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u6355\\u6349\");\n\t\t\n\t\tMenu menu_2 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_2);\n\t\t\n\t\tMenuItem mntmNewItem_6 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_6.setText(\"\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_7 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6355\\u6349\\u7A97\\u53E3\\u6216\\u5BF9\\u8C61.jpg\"));\n\t\tmntmNewItem_7.setText(\"\\u6355\\u6349\\u7A97\\u53E3\\u5BF9\\u8C61\");\n\t\t\n\t\tMenuItem mntmNewItem_8 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_8.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.jpg\"));\n\t\tmntmNewItem_8.setText(\"\\u6355\\u6349\\u77E9\\u5F62\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_9 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_9.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u624B\\u7ED8\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_9.setText(\"\\u6355\\u6349\\u624B\\u7ED8\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_10 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_10.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6574\\u4E2A\\u5C4F\\u5E55.jpg\"));\n\t\tmntmNewItem_10.setText(\"\\u6355\\u6349\\u6574\\u4E2A\\u5C4F\\u5E55\");\n\t\t\n\t\tMenuItem mntmNewItem_11 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_11.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_11.setText(\"\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_12 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_12.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_12.setText(\"\\u6355\\u6349\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349.jpg\"));\n\t\tmenuItem_1.setText(\"\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349\");\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_2.setText(\"\\u7F16\\u8F91\");\n\t\t\n\t\tMenu menu_3 = new Menu(menuItem_2);\n\t\tmenuItem_2.setMenu(menu_3);\n\t\t\n\t\tMenuItem mntmNewItem_14 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_14.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_14.setText(\"\\u64A4\\u9500\");\n\t\t\n\t\tMenuItem mntmNewItem_13 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_13.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_13.setText(\"\\u91CD\\u505A\");\n\t\t\n\t\tMenuItem mntmNewItem_15 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_15.setText(\"\\u9009\\u62E9\\u5168\\u90E8\");\n\t\t\n\t\tMenuItem mntmNewItem_16 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_16.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7F16\\u8F91.\\u88C1\\u526A.jpg\"));\n\t\tmntmNewItem_16.setText(\"\\u88C1\\u526A\");\n\t\t\n\t\tMenuItem mntmNewItem_17 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_17.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u526A\\u5207.jpg\"));\n\t\tmntmNewItem_17.setText(\"\\u526A\\u5207\");\n\t\t\n\t\tMenuItem mntmNewItem_18 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_18.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u590D\\u5236.jpg\"));\n\t\tmntmNewItem_18.setText(\"\\u590D\\u5236\");\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_3, SWT.NONE);\n\t\tmenuItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\tmenuItem_4.setText(\"\\u7C98\\u8D34\");\n\t\t\n\t\tMenuItem mntmNewItem_19 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_19.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_3.setText(\"\\u7279\\u6548\");\n\t\t\n\t\tMenu menu_4 = new Menu(menuItem_3);\n\t\tmenuItem_3.setMenu(menu_4);\n\t\t\n\t\tMenuItem mntmNewItem_20 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_20.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6C34\\u5370.jpg\"));\n\t\tmntmNewItem_20.setText(\"\\u6C34\\u5370\");\n\t\t\n\t\tPanelPic ppn = new PanelPic();\n\t\tMenuItem mntmNewItem_21 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_21.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tflag[0]=true;\n\t\t\t\tflag[1]=false;\n\n\t\t\t}\n\n\t\t});\n\t\t\n\t\tdown.addMouseListener(new MouseAdapter(){\n\t\t\tpublic void mouseDown(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=true;\n\t\t\t\tpt=new Point(e.x,e.y);\n\t\t\t\tif(flag[1])\n\t\t\t\t{\n\t\t\t\t\trect=new Composite(down,SWT.BORDER);\n\t\t\t\t\trect.setLocation(e.x, e.y);\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=false;\n\t\t\t\tif(flag[1]&&dirty)\n\t\t\t\t{\n\t\t\t\t\trexx[n-1]=rect.getBounds();\n\t\t\t\t\trect.dispose();\n\t\t\t\t\tdown.redraw();\n\t\t\t\t\tdirty=false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdown.addMouseMoveListener(new MouseMoveListener(){\n\t\t\t@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n if(mouseDown)\n {\n \t dirty=true;\n\t\t\t\tif(flag[0])\n\t\t\t {\n \t GC gc=new GC(down);\n gc.drawLine(pt.x, pt.y, e.x, e.y);\n list.add(new int[]{pt.x,pt.y,e.x,e.y});\n pt.x=e.x;pt.y=e.y;\n\t\t\t }\n else if(flag[1])\n {\n \t if(rect!=null)\n \t rect.setSize(rect.getSize().x+e.x-pt.x, rect.getSize().y+e.y-pt.y);\n// \t down.redraw();\n \t pt.x=e.x;pt.y=e.y;\n }\n }\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tdown.addPaintListener(new PaintListener(){\n\t\t\t@Override\n\t\t\tpublic void paintControl(PaintEvent e) {\n\t\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t\t{\n\t\t\t\t\tint a[]=list.get(i);\n\t\t\t\t\te.gc.drawLine(a[0], a[1], a[2], a[3]);\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(rexx[i]!=null)\n\t\t\t\t\t\te.gc.drawRectangle(rexx[i]);\n\t\t\t\t}\n\t\t\t}});\n\n\t\t\n\t\tmntmNewItem_21.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6587\\u5B57.jpg\"));\n\t\tmntmNewItem_21.setText(\"\\u753B\\u7B14\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_1 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_1.setText(\"\\u67E5\\u770B\");\n\t\t\n\t\tMenu menu_5 = new Menu(mntmNewSubmenu_1);\n\t\tmntmNewSubmenu_1.setMenu(menu_5);\n\t\t\n\t\tMenuItem mntmNewItem_24 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_24.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u653E\\u5927.jpg\"));\n\t\tmntmNewItem_24.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tMenuItem mntmNewItem_25 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_25.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u7F29\\u5C0F.jpg\"));\n\t\tmntmNewItem_25.setText(\"\\u7F29\\u5C0F\");\n\t\t\n\t\tMenuItem mntmNewItem_26 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_26.setText(\"\\u5B9E\\u9645\\u5C3A\\u5BF8\\uFF08100%\\uFF09\");\n\t\t\n\t\tMenuItem mntmNewItem_27 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_27.setText(\"\\u9002\\u5408\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_28 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_28.setText(\"100%\");\n\t\t\n\t\tMenuItem mntmNewItem_29 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_29.setText(\"200%\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_2.setText(\"\\u8BBE\\u7F6E\");\n\t\t\n\t\tMenu menu_6 = new Menu(mntmNewSubmenu_2);\n\t\tmntmNewSubmenu_2.setMenu(menu_6);\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_5.setText(\"\\u5E2E\\u52A9\");\n\t\t\n\t\tMenu menu_7 = new Menu(menuItem_5);\n\t\tmenuItem_5.setMenu(menu_7);\n\t\t\n\t\tMenuItem menuItem_6 = new MenuItem(menu_7, SWT.NONE);\n\t\tmenuItem_6.setText(\"\\u7248\\u672C\");\n\t\t\n\t\tMenuItem mntmNewItem_23 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_23.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\t\n\t\tMenuItem mntmNewItem_30 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_30.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\n\t}", "protected void displaySplashScreen() {\n\t\t// Creates new thread to act as timer.\n\t\tThread logoTimer = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\n\t\t\t\t\tint logoTimer = 0;\n\t\t\t\t\t// Pauses for SPLASH_TIME amount of time\n\t\t\t\t\twhile (logoTimer < SPLASH_TIME) {\n\t\t\t\t\t\tsleep(100);\n\t\t\t\t\t\tlogoTimer = logoTimer + 100;\n\t\t\t\t\t}\n\t\t\t\t\t// Calls the activity from manifest.xml\n\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\tMenuActivity.class);\n\t\t\t\t\tintent.putExtra(\"connect\", connect);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Starts the thread.\n\t\tlogoTimer.start();\n\t}", "public void displayTitleScreen() {\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 \" @@@ @@@@ %@@: %@%@ %@@@ =%%@# %@%% @@@ @%@ @%%@ @@@@ @@%. \\n\" +\n \" #%@% %* #%@%# @@@: @@@@ @@@# @@ @@@@ @%%% @%%% %@@% @%@% @@@@ -@@% \\n\" +\n \" #@%@@@@@%%@%% @%@@@%%: @%%@%@%@ %@%@%@@@@@%@ @@@@@%@@ %@@%@@%%@@@@% %@@@ %@@@ -@@@%@@@@@@%# \\n\" +\n \" %@%@@%@@% @@%@@@: @@@%%% #%@@%@@%@ @@%@@@@ @@%@@@@@@ @@@@ %%%@ %@%@@%@@@ \\n\" +\n \"―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― \\n\" +\n \" Nouvelle partie \"\n );\n }", "@Override\n\tprotected int getAddWindowHeigh() {\n\t\treturn 170;\n\t}", "public void makeFullScreen() {\n currentApiVersion = android.os.Build.VERSION.SDK_INT;\n final int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE |\n View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |\n View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |\n View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;\n if (currentApiVersion >= Build.VERSION_CODES.KITKAT) {\n getWindow().getDecorView().setSystemUiVisibility(flags);\n final View decorView = getWindow().getDecorView();\n decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {\n @Override\n public void onSystemUiVisibilityChange(int visibility) {\n if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {\n decorView.setSystemUiVisibility(flags);\n }\n }\n });\n }\n }", "private void showSplash() {\n \t\tthis.splashInfoContainer.setVisibility( View.VISIBLE );\n \t}", "private void returnHome() {\n parentPane.getChildren().clear();\n parentPane.setTop(mainMenu);\n parentPane.setCenter(imgHome);\n }", "public void startScreen()\n {\n onSales = false;\n \n numItemsAdded = 0; \n Menu guiMenu = new Menu(\"File\", \"NewSale\\nClose\\nExit\", 24, Color.BLACK, Color.WHITE, Color.BLACK,Color.WHITE, new FileCommands());\n clearScreen();\n addObject(guiMenu, 200, 50);\n }", "public void showSystemUI() {\r\n if (PhotoViewActivity.this != null)\r\n PhotoViewActivity.this.runOnUiThread(new Runnable() {\r\n public void run() {\r\n toolbar.animate().translationY(Measure.getStatusBarHeight(getResources())).setInterpolator(new DecelerateInterpolator())\r\n .setDuration(240).start();\r\n photoViewActivity.setSystemUiVisibility(\r\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\r\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\r\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\r\n fullScreenMode = false;\r\n }\r\n });\r\n\r\n }", "@SuppressLint(\"InlinedApi\")\r\n @Override\r\n public void run() {\n mainContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\r\n | View.SYSTEM_UI_FLAG_FULLSCREEN\r\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\r\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\r\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\r\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\r\n }", "public boolean isSmallScreen() {\n \t\treturn m_smallScreenMode;\n \t}", "public void toggleMiniHealthBars() {\n miniHealthBarVisible = !miniHealthBarVisible;\n }", "@Override\n public void mouseDoubleClick(MouseEvent event)\n {\n System.out.println(\"Full screen: \" + childShell.getFullScreen());\n \n childShell.setFullScreen(! childShell.getFullScreen());\n \n System.out.println(\"Full screen: \" + childShell.getFullScreen()); \n }", "public void addLogo(){\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n getSupportActionBar().setLogo(R.drawable.monkey_notify);\n getSupportActionBar().setDisplayUseLogoEnabled(true);\n }", "public void windowIconified(WindowEvent arg0) {\n //textArea1.append(\"Window is minimized\");\n\n }", "public static void showStartApp(FruitSlide _gameLib)//not full\n\t{\n\t\t\n\t}", "private void drawTitleScreen(Graphics g) {\n \t\tg.setColor(new Color(0, 0x66, 0xcc, 150));\n \t\tg.fillRect(0, 60, getWidth(), getHeight() - 120);\n \t\tg.setColor(Color.WHITE);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 30));\n \t\tg.drawString(\"POP UP QUIZ!\", 50, 100);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 18));\n \t\tg.drawString(\"Where you answer questions whilst cleaning your desktop!\",\n \t\t\t\t50, 120);\n \t\tg.drawString(\"Q LAM, V TONG, A VIJAYARAGAVAN\", 50, 140);\n \n \t\tg.drawString(\"Use the arrow keys to move the recycle bin.\", 50, 180);\n \t\tg.drawString(\"<Space> pauses, and <Esc> quits.\", 50, 200);\n \n \t\tg.drawImage(sprites.get(\"junk\"), 4, 200, null);\n \t\tg.drawString(\"Polish your computer by trashing junk falling \"\n \t\t\t\t+ \"from the sky!\", 50, 220);\n \n \t\tg.drawImage(sprites.get(\"sysfileLarge\"), 4, 330, null);\n \t\tg.drawImage(sprites.get(\"sysfileMedium\"), 8, 390, null);\n \t\tg.drawImage(sprites.get(\"sysfileSmall\"), 16, 440, null);\n \t\tg.drawString(\"You'll mess up your computer if you collect system files.\",\n \t\t\t\t50, 360);\n \t\tg.drawString(\"Note that they fall from the sky at different speeds.\",\n \t\t\t\t50, 390);\n \n \t\tg.drawString(\"The CPU gauge will tell you how well you're doing!\",\n \t\t\t\t50, 420);\n \t\tg.drawString(\"If your CPU usage goes over 100%, your computer goes kaput\"\n \t\t\t\t+ \" and you lose! How long can you clean?\", 50, 450);\n \n \t\tg.drawString(\"By the way, you'll have to answer questions from a barrage\"\n \t\t\t\t+ \" of pop-up as you do this.\", 50, 500);\n \t\tg.drawString(\"Serves you right for not being clean!!!\", 50, 530);\n \n \t\tg.drawString(\"PUSH START TO BEGIN_\", 50, 600);\n \t}", "public void display() {\n\t\tapplet.image(applet.loadImage(\"/keypad.png\"), 22,410);\n\t\t// TODO Auto-generated method stub\n\n\t}", "public void hideScreen() {\n\t}", "public void hatchKickerExtend() {\n hatchkicker.set(true);\n }", "public void createSShell() {\r\n\t\tGridData gridData = new GridData();\r\n\t\tgridData.widthHint = 500;\r\n\t\tgridData.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;\r\n\t\tgridData.grabExcessHorizontalSpace = true;\r\n\t\tgridData.heightHint = 80;\r\n\t\tsShell = new Shell();\r\n\t\tsShell.setText(\"系统管理\");\r\n\t\tsShell.setSize(new Point(703, 656));\r\n\t\tsShell.setLayout(new GridLayout());\r\n\t\tcLabel = new CLabel(sShell, SWT.CENTER);\r\n\t\tcLabel.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream(\"/images/news.png\")));\r\n\t\tcLabel.setFont(new Font(Display.getDefault(), \"微软雅黑\", 18, SWT.NORMAL));\r\n\t\tcLabel.setLayoutData(gridData);\r\n\t\tcLabel.setText(\"系统管理\");\r\n\t\tcreateTabFolder();\r\n\t\tif(SystemMainShell.userType.equals(\"管理员\")){\r\n\t\t\tbuttonAddRoom.setEnabled(true);\r\n\t\t\tbuttonDeleteRoom.setEnabled(true);\r\n\t\t//\tbuttonAddGoods.setEnabled(true);\r\n\t\t//\tbuttonDeleteGoods.setEnabled(true);\r\n\t\t\tbuttonAddStaff.setEnabled(true);\r\n\t\t\tbuttonDeleteStaff.setEnabled(true);\r\n\t\t\tbuttonAddUser.setEnabled(true);\r\n\t\t\tbuttonDeleteUser.setEnabled(true);\r\n\t\t}else if(SystemMainShell.userType.equals(\"操作员\")){\r\n\t\t\tbuttonAddRoom.setEnabled(false);\r\n\t\t\tbuttonDeleteRoom.setEnabled(false);\r\n\t\t//\tbuttonAddGoods.setEnabled(false);\r\n\t\t//\tbuttonDeleteGoods.setEnabled(false);\r\n\t\t\tbuttonAddStaff.setEnabled(false);\r\n\t\t\tbuttonDeleteStaff.setEnabled(false);\r\n\t\t\tbuttonAddUser.setEnabled(false);\r\n\t\t\tbuttonDeleteUser.setEnabled(false);\r\n\t\t}\r\n\t}", "public void showHomeScreen() {\n try {\n FXMLLoader loader1 = new FXMLLoader();\n loader1.setLocation(MainApplication.class.getResource(\"view/HomeScreen.fxml\"));\n AnchorPane anchorPane = (AnchorPane) loader1.load();\n rootLayout.setCenter(anchorPane);\n HomeScreenController controller = loader1.getController();\n controller.setMainApp(this);\n } catch (IOException e) {\n \t\te.printStackTrace();\n \t }\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "@Override\r\n\t\t\t\tpublic void autStartProcess() {\n\t\t\t\t\tautGetSharedBaseComponent().autInsertScreenByScenario();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autStartProcess() {\n\t\t\t\t\tautGetSharedBaseComponent().autInsertScreenByScenario();\r\n\t\t\t\t}", "public void setFullScreen(){\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tgetWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN);\n\t}", "public void setWelcomeScreen() {\n clearAllContent();\n add(WelcomeScreen.create(controller));\n pack();\n }" ]
[ "0.61774236", "0.61478025", "0.614599", "0.6115224", "0.580155", "0.5742916", "0.57314456", "0.57042646", "0.5656139", "0.56374085", "0.56349206", "0.5617429", "0.560244", "0.55673754", "0.5561942", "0.5557593", "0.5537439", "0.5510355", "0.5503802", "0.5494335", "0.5490485", "0.54877096", "0.5487629", "0.5480014", "0.54527", "0.54512036", "0.54022616", "0.5396856", "0.53628445", "0.53595346", "0.5352649", "0.5348801", "0.53187543", "0.5315266", "0.531489", "0.5306037", "0.5303908", "0.5299814", "0.52995896", "0.52963686", "0.529381", "0.52686626", "0.5260451", "0.5248317", "0.5244931", "0.5243125", "0.52366257", "0.52278477", "0.5227297", "0.52258694", "0.52216434", "0.5221005", "0.52183706", "0.5212516", "0.5210133", "0.5204268", "0.5202889", "0.51989466", "0.51983887", "0.51879907", "0.5186702", "0.51866215", "0.5175841", "0.51743853", "0.5172527", "0.5165936", "0.5160568", "0.51593584", "0.51590174", "0.5158788", "0.5155916", "0.5152724", "0.51443297", "0.51395684", "0.5133093", "0.51326746", "0.51319116", "0.51276934", "0.51239955", "0.51229477", "0.5117176", "0.51131815", "0.51079804", "0.5103759", "0.5101548", "0.5097211", "0.50954354", "0.50954354", "0.50954354", "0.50954354", "0.50954354", "0.50954354", "0.50954354", "0.50954354", "0.50954354", "0.50954354", "0.50923496", "0.50923496", "0.50922626", "0.5083374" ]
0.5395492
28
TODO: queue as SfxAction instead of directly playing?
public static void playMapSelectSound() { int roll = MathUtils.random(3); switch (roll) { case 0: { CardCrawlGame.sound.play("MAP_SELECT_1"); break; } case 1: { CardCrawlGame.sound.play("MAP_SELECT_2"); break; } case 2: { CardCrawlGame.sound.play("MAP_SELECT_3"); break; } default: { CardCrawlGame.sound.play("MAP_SELECT_4"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void play() {\n\t\t\r\n\t}", "public void play(){\n\t\t\n\t}", "@Override\n\tpublic void play() {\n\t\t\n\t}", "@Override\n\tpublic void play() {\n\n\t}", "private void play() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString());\n\t\t\tib.transact(1, pc, pc_reply, 0);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void play() {\n\t\tplay(true, true);\n\t}", "private void playAction(){\n\n if (stopBeforeCall.isSelected()) { execEndAction(execOnEnd.getText()); }\n execStartAction(execOnStart.getText());\n\n //if timer was inicializated\n if (timer != null) {\n if (pto == null) {\n pto = new PlayerTimerOnly(displayTimer);\n pto.play();\n } else {\n pto.stop();\n pto.play();\n }\n }\n //check if play is needed\n SolverProcess sp = solverChoices.getSelectionModel().getSelectedItem();\n if (sp == null || sp.isDummyProcess()){\n return;\n }\n\n Solution s = sp.getSolution();\n\n s = mfd.transofrmSolutionTimeIfChecked(s);\n\n List<List<AgentActionPair>> aapList = Simulator.getAAPfromSolution(s);\n rmp = new RealMapPlayer(aapList,smFront);\n rmp.play();\n\n\n }", "protected abstract void internalPlay();", "@Override\n\tpublic void nowPlaying() {\n\t}", "void play();", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"打击乐器奏乐~~!\");\n\t}", "@Override\r\n public void play()\r\n {\n\r\n }", "public void Play();", "void play ();", "public static play() {\n\t\t\n\t}", "@Override\r\npublic void Play() {\n\t\r\n}", "protected void playS()\n\t\t{\n\t\t\tplayer.start();\n\t\t}", "public void play() { player.resume();}", "public void play() {\n\t\tSystem.out.println(\"TCL 电视机播放中...\");\r\n\t}", "public abstract void play();", "public abstract void play();", "private void play() {\n\t\tlog.finest(\"Playing sound\");\n\t\ttone.trigger();\n\t}", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "public void play() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}", "public static void playScream()\n {\n scream.play();\n }", "@Override\n public void playStart() {\n }", "private void play() {\n MediaQueueItem item = mQueue.get(0);\n if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PENDING\n || item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED) {\n mCurItemId = item.getItemId();\n if (mCallback != null) {\n if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PENDING) {\n mCallback.onNewItem(item.getUri());\n }\n mCallback.onStart();\n }\n item.setState(MediaItemStatus.PLAYBACK_STATE_PLAYING);\n }\n }", "public void actionPerformed(ActionEvent e) {\r\n if (_blnPlaying) {\r\n stop();\r\n } else {\r\n play();\r\n }\r\n }", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "@FXML protected void SFXButtonClicked(ActionEvent event) {\n if (music.getShouldPlaySFX()){\r\n MusicPlayer music2 = new MusicPlayer();\r\n music2.playSFX(MusicPlayer.Track.adjustSound);\r\n }\r\n\r\n music.setShouldPlaySFX(!music.getShouldPlaySFX());\r\n }", "public abstract String playMedia ();", "public final void play() {\n\t\tinitialize();\n\t\tstartPlay();\n\t\tendPlay();\n\t}", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "public static void SFX(String path){\r\n Main.soundSystem.playSFX(path);\r\n }", "@Override\r\n\tpublic void play() {\n\t\tSystem.out.println(\"Play Movie\");\r\n\t\t\r\n\t}", "private void play() {\n play(Animation.INDEFINITE);\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tmVideoContrl.playNext();\r\n\r\n\t\t\t\t\t\t\t}", "public void play() {\n Selection selection;\n if ((selection = master.getWindowManager().getMain().getSelection()) == null) {\n startPlay();\n playShow(nextStartTime, -1 / 1000.0);\n } else {\n playSelection(selection);\n playShow(selection.start, selection.duration);\n }\n }", "@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }", "public void playback() {\n\t\ttry {\n\t\t\tplaySound.load(audioFileName, currFrame);\n\t\t} catch (UnsupportedAudioFileException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (LineUnavailableException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tfastForward = false;\n\t\tsoundThread = null;\n\t\tsoundThread = new Thread(new sound());\n\t\tsoundThread.start();\n\t\tvideoThread = null;\n\t\tvideoThread = new Thread(new video());\n\t\tvideoThread.start();\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp10.play(sound_id10 , 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp9.play(sound_id9 , 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "boolean play();", "public void continueSound() {\n\t\tclip.start();\n\t}", "@Override\n\tpublic void play(String position, int number) {\n\t\t\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "public void play() {\n\t\tSystem.out.println(\"playing \"+title);\r\n\t}", "@Override\n\tpublic void run() \n\t{\n\t\ttry {\n\t\t\tplay();\n\t\t} catch (JavaLayerException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected static void play() {\n\t\tif (curMIDI != null && !playing){\n\t\t\tPlayer.play(curMIDI,microseconds,cleaned);\n\t\t\tplaying = true;\n\t\t}\n\t\tif (sim != null) {\n\t\t\tif(microseconds == 0){\n\t\t\t\tsim.stop();\n\t\t\t}\n\t\t\t\tsim.play();\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp12.play(sound_id12 , 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "private void play(Poker pokerInstance, int action) {\n if (this.playing) {\n if (action == Poker.ACTION_BET) {\n actionBet(pokerInstance, 50);\n } else if (action == Poker.ACTION_FOLLOW) {\n actionFollow(pokerInstance);\n } else if (action == Poker.ACTION_CHECK) {\n actionCheck();\n } else if (action == Poker.ACTION_BED) {\n actionLeave();\n }\n }\n }", "public abstract CardAction play(Player p);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp11.play(sound_id11 , 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "@Override\n\tpublic void perform() {\n\t\tSystem.out.println(\"Playing \" + song);\n\t\tinstrument.play();\n\t}", "public void act()\n {\n if (Greenfoot.mouseClicked(this))\n Greenfoot.playSound(\"fanfare.wav\");\n }", "public void play() {\n try {\n if (clip != null) {\n new Thread() {\n public void run() {\n synchronized (clip) {\n clip.stop();\n clip.setFramePosition(0);\n clip.start();\n }\n }\n }.start();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void play(boolean fromUser);", "public void run()\n\t{\t\t\t\t\n\t\tif (player!=null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tplayer.play();\t\t\t\t\n\t\t\t}\n\t\t\tcatch (JavaLayerException ex)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Problem playing audio: \"+ex);\n\t\t\t}\t\t\t\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tgameType = \"Quick Play\"; \n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void play() {\n\t\tSystem.out.println(\"We played Snokker today\");\n\t\t\n\t\t\n\t}", "void playMonumentCard();", "default public void clickPlay() {\n\t\tremoteControlAction(RemoteControlKeyword.PLAY);\n\t}", "public abstract Element play();", "public void play() {\n try {\n mSessionBinder.play(mContext.getPackageName(), mCbStub);\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling play.\", e);\n }\n }", "public void play()\n\t{\n\t\tif (canPlay)\n\t\t{\n\t\t\tsong.play();\n\t\t\tsong.rewind();\n\t\t\tif (theSong == \"SG1\" || theSong == \"SG2\")\n\t\t\t\tcanPlay = false;\n\t\t}\n\t}", "public void togglePlay() { }", "public static void playerRun()\n {\n runSound.playLooped();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp8.play(sound_id8, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "public void playAudio() {\n\n }", "private void makePlay() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tplay = new Sprite(6, 6, 360, 379, new Image(\"file:./res/images/basketball.png\"), 1, 1000);\n\t\tplay.setLayoutX(140);\n\t\tplay.setLayoutY(190);\n\t\tplay.setScaleX(0.5);\n\t\tplay.setScaleY(0.5);\n\t\tgrid.getChildren().addAll(play);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1000));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(play);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().playWith();\n\t\t});\n\t\tpause.play();\n\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp2.play(sound_id2, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "public void playSequence() {\n sequence.play(seq);\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tsuper.run();\r\n\t\t\twhile(bPlayAudioQueue){\r\n\t\t\t\tplayFromAudioQueue();\r\n\t\t\t}\r\n\t\t}", "void play(){\n\n\t\tnew X.PlayXicon().root.setOnClickListener(Play_TestsPresenter::cc);\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tif (button_BGM.getText().equals(\"배경음 : On\")){\n\t\t\t\tfor (int c1=0; c1<cliplist.size(); c1++){\n\t\t\t\t\tif (cliplist.get(c1).file_url.equals(\"ext/ChmpSlct_DraftMode(8bitS).wav\")){\n\t\t\t\t\t\tcliplist.get(c1).clip.stop();\n\t\t\t\t\t\tcliplist.get(c1).clip.close();\n\t\t\t\t\t\tcliplist.remove(c1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbutton_BGM.setText(\"배경음 : off\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tGameClient.playSound(\"ext/ChmpSlct_DraftMode(8bitS).wav\");\n\t\t\t\tbutton_BGM.setText(\"배경음 : On\");\n\t\t\t}\n\t\t}", "public void play() {\n executor.submit(new Runnable() {\n public void run() {\n resume = true;\n notifyStatus();\n }\n });\n }", "@Override\n public void onClick(View v) {\n play(v);\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\ttheGame.refreshQueue();\r\n\t\t\t\r\n\t\t}", "public void play() { \r\n if (midi) \r\n sequencer.start(); \r\n else \r\n clip.start(); \r\n timer.start(); \r\n play.setText(\"Stop\"); \r\n playing = true; \r\n }", "private void playButton(ActionEvent e) {\n if (paused) {\n timer.start();\n paused = false;\n } else {\n paused = true;\n timer.stop();\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp6.play(sound_id6, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }", "@Override\n public void playSound(int soundId) {\n\n }", "@Override\n public void makeSound() {\n\n }", "@Override\n public void makeSound() {\n\n }", "public void playContent() {\n this.taskHandler.run(this::inlinePlay);\n }", "public static void playSound(){\r\n try{\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(AudioSystem.getAudioInputStream(new File(\"Cheering.wav\")));\r\n clip.start();\r\n }\r\n catch (Exception exc){\r\n exc.printStackTrace(System.out);\r\n } \r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp5.play(sound_id5, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp1.play(sound_id1, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "protected void playDispenseSound(IBlockSource p_82485_1_)\n {\n p_82485_1_.getWorld().playAuxSFX(1000, p_82485_1_.getXInt(), p_82485_1_.getYInt(), p_82485_1_.getZInt(), 0);\n }", "public static void charge_sound() {\n\t\tm_player_charge.start();\n\t\tm_player_charge.setMediaTime(new Time(0));\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp3.play(sound_id3, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}", "@Override\n public void playOneRound (Player player) {\n this.executeActions(this.actionChoosed(player), player);\n }", "private native void nativePlay();", "@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }", "public void playAudio() {\n if (done==false)\n {\n file.play();\n }\n}", "public static void pop_sound() {\n\t\tm_player_pop.start();\n\t\tm_player_pop.setMediaTime(new Time(0));\n\t}", "void togglePlay();", "public Action play() {\n\t MobileDevice mobileDevice = MobileDevice.getInstance();\r\n\t\tUiDevice uiDevice = UiDevice.getInstance();\r\n\t\tint i = 0;\r\n\t\twhile (i < 5 && uiDevice.swipe(340, 180, 340, 660, 10)) i++;\r\n\t\ttry {\r\n\t\t\tThread.sleep(1000);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t ApplicationInfor.errorLogging(\"user tweet process: sleep exception, msg=\" + e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\tQQMessage qqMessage = null;\r\n ArrayList<QQMessage> messageList = new ArrayList<QQMessage>();\r\n\t\t// get the first picture.\r\n\t\tqqMessage = this.getMessageItem();\r\n\t\tint errorTimes = 0;\r\n\t\t\r\n\t\twhile (null != qqMessage.uiItemObj && qqMessage.uiItemObj.exists()) {\r\n\t\t boolean isValidMessage = false;\r\n\t\t\tif (QQMessage.QQMessageType.PICTURE == qqMessage.messageType) {\r\n\t\t\t try {\r\n\t\t // get the image info.\r\n\t\t\t\t qqMessage.uiItemObj.click();\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\tint retryTime = 0;\r\n\t\t\t\t\tfor (retryTime = 0; retryTime < 3; retryTime++) {\r\n \t\t\t\t\tUiObject imgFullObj = new UiObject(new UiSelector().className(\"android.widget.ImageButton\"));\r\n \t\t\t\t\tif (!imgFullObj.exists()) {\r\n \t\t\t\t\t ApplicationInfor.errorLogging(\"user tweet process: image full object not exist!\");\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\timgFullObj.click();\r\n \t\t\t\t\t\tUiObject saveButton = new UiObject(new UiSelector().text(\"保存到手机\"));\r\n \t\t\t\t\t\tif (!saveButton.exists()) {\r\n \t\t\t\t\t\t ApplicationInfor.errorLogging(\"user tweet process: save button not found.\");\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tsaveButton.click();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tUiObject replaceButton = new UiObject(new UiSelector().text(\"替换\"));\r\n \t\t\t\t\t\tif (replaceButton.exists()) {\r\n \t\t\t\t\t\t\treplaceButton.click();\r\n \t\t\t\t\t\t}\r\n \t\t uiDevice.pressBack();\r\n \t\t isValidMessage = true;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (isValidMessage) {\r\n \t\t\t\t\t break;\r\n \t\t\t\t\t}\r\n \t Thread.sleep(1000);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!isValidMessage) {\r\n\t\t\t\t\t ApplicationInfor.errorLogging(\"user tweet process: get imsage all retry failed!!!\");\r\n\t\t\t\t\t}\r\n\t\t\t } catch (UiObjectNotFoundException | InterruptedException e) {\r\n\t\t\t ApplicationInfor.errorLogging(\"message picture: save the picture exception, msg=\" + e.getMessage());\r\n\t\t\t }\r\n\t\t\t} else if (QQMessage.QQMessageType.VOICE == qqMessage.messageType) {\r\n\t\t\t try {\r\n\t\t\t\t // get the voice info.\r\n\t\t\t\t qqMessage.text = qqMessage.uiItemObj.getText().trim();\r\n\t\t\t\t qqMessage.uiItemObj.dragTo(qqMessage.uiItemObj, 50);\r\n\t\t\t\t UiObject collectionButtonObj = new UiObject(new UiSelector().text(\"收藏\"));\r\n\t\t\t\t if (!collectionButtonObj.exists()) {\r\n\t\t\t\t ApplicationInfor.errorLogging(\"collect audios: collection button not found.\");\r\n\t\t\t\t uiDevice.pressBack();\r\n\t\t\t\t } else {\r\n\t\t\t\t collectionButtonObj.click();\r\n UiObject collectButtonObj = new UiObject(new UiSelector().text(\"收藏\"));\r\n if (!collectionButtonObj.exists()) {\r\n ApplicationInfor.errorLogging(\"collect audios: collectionButton edit not exist.\");\r\n } else {\r\n collectButtonObj.click();\r\n File collectionDir = new File(sCollectionPrefixPath);\r\n if (!collectionDir.isDirectory()) {\r\n ApplicationInfor.errorLogging(\"Collection directory not exist.\");\r\n } else {\r\n File[] audios = collectionDir.listFiles(new FileFilter() {\r\n public boolean accept(File file) {\r\n if (file.getName().startsWith(\"collection_\")) {\r\n return false;\r\n }\r\n if (file.getName().endsWith(\".slk\")) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n });\r\n if (1 != audios.length) {\r\n ApplicationInfor.warningLogging(\"autios length not 1, length = \" + String.valueOf(audios.length));\r\n }\r\n if (0 < audios.length) {\r\n File curAudiosFile = audios[0];\r\n UUID uuid = UUID.randomUUID();\r\n String newFileName = uuid.toString() + \".slk\";\r\n File newFile = new File(curAudiosFile.getParent(), newFileName);\r\n if (!curAudiosFile.renameTo(newFile)) {\r\n ApplicationInfor.errorLogging(\"audios process: rename file failed!\");\r\n } else {\r\n qqMessage.messageFile = newFile;\r\n isValidMessage = true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n\t\t\t\t }\r\n\t\t\t } catch (UiObjectNotFoundException e) {\r\n\t\t\t ApplicationInfor.errorLogging(\"collect audios: exception! msg=\" + e.getMessage());\r\n\t\t\t }\r\n\t\t\t} else if (QQMessage.QQMessageType.TEXT == qqMessage.messageType) {\r\n\t\t\t try {\r\n \t\t\t // get the text info.\r\n \t\t\t qqMessage.text= qqMessage.uiItemObj.getText().trim();\r\n \t\t\t isValidMessage = true;\r\n\t\t\t } catch (UiObjectNotFoundException e) {\r\n\t\t\t ApplicationInfor.errorLogging(\"message text: exception! msg=\" + e.getMessage());\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\tif (isValidMessage) {\r\n\t\t\t messageList.add(qqMessage);\r\n\t\t\t errorTimes = 0;\r\n\t\t\t} else {\r\n\t errorTimes += 1;\r\n\t\t\t if (errorTimes < 5) {\r\n\t\t\t i = 0;\r\n\t\t\t while (i < 5 && uiDevice.swipe(340, 180, 340, 660, 10)) i++;\r\n\t\t\t try {\r\n\t\t\t Thread.sleep(1000);\r\n\t\t\t } catch (InterruptedException e) {\r\n\t\t\t ApplicationInfor.errorLogging(\"user tweet process: sleep exception, msg=\" + e.getMessage());\r\n\t\t\t }\r\n\t\t\t } else {\r\n\t\t\t errorTimes = 0;\r\n\t\t\t ApplicationInfor.errorLogging(\"Pull up 5 times but not work.\");\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t// delete the user item.\r\n\t\t\tfor (int j = 0; j < 3; j++) {\r\n\t try {\r\n \t\t\t qqMessage.uiItemObj.dragTo(qqMessage.uiItemObj, 50);\r\n \t\t\t UiObject rightButton = new UiObject(new UiSelector().description(\"right\"));\r\n \t\t\t if (rightButton.exists()) {\r\n \t\t\t rightButton.click();\r\n \t\t\t }\r\n \t\t\t\tUiObject delButton = new UiObject(new UiSelector().text(\"删除\"));\r\n \t\t\t\tif (!delButton.exists()) {\r\n \t\t\t\t ApplicationInfor.warningLogging(\"user tweet process: delete button not found.\");\r\n \t\t\t\t} else {\r\n \t\t\t\t\tdelButton.click();\r\n \t\t\t\t\tdelButton = new UiObject(new UiSelector().text(\"删除\"));\r\n \t\t\t\t\tif (delButton.exists()) {\r\n \t\t\t\t\t\tdelButton.click();\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t ApplicationInfor.errorLogging(\"user tweet process: delete button accept not found.\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\tif (QQMessage.QQMessageType.PICTURE == qqMessage.messageType) {\r\n \t\t\t\t UiObject imgFullObj = new UiObject(new UiSelector().className(\"android.widget.ImageButton\"));\r\n \t\t\t\t if (imgFullObj.exists()) {\r\n \t\t\t\t uiDevice.pressBack();\r\n \t\t\t\t }\r\n \t\t\t\t}\r\n \t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (UiObjectNotFoundException | InterruptedException e) {\r\n\t ApplicationInfor.errorLogging(\"user tweet process: get the img exception, msg=\" + e.getMessage());\r\n\t } \r\n\t\t\t} \r\n\t\t\tqqMessage = this.getMessageItem();\r\n\t\t}\r\n\t\t\r\n\t\t// get the QQ number\r\n\t\tString qqNum = \"\";\r\n\t\tUiObject qqObj = new UiObject(new UiSelector().resourceId(\"com.tencent.mobileqq:id/title\"));\r\n try {\r\n\t\t if (qqObj.exists()) {\r\n qqNum = qqObj.getText();\r\n uploadFiles(qqNum, messageList);\r\n\t\t } else {\r\n\t\t ApplicationInfor.errorLogging(\"user tweet process: QQ number not found.\");\r\n\t\t }\r\n\t } catch (UiObjectNotFoundException e) {\r\n\t ApplicationInfor.errorLogging(\"user tweet process: post the server exception, msg = \" + e.getMessage());\r\n }\r\n \r\n // clear gray column.\r\n UiObject grayColumnObj = new UiObject(new UiSelector().className(\"android.widget.AbsListView\").childSelector(\r\n new UiSelector().className(\"android.widget.LinearLayout\")));\r\n boolean isGrayColumnExists = grayColumnObj.exists(); \r\n UiObject titleTextObj = new UiObject(new UiSelector().resourceId(\"com.tencent.mobileqq:id/ivTitleName\"));\r\n String title = \"\";\r\n if (titleTextObj.exists()) {\r\n try {\r\n title = titleTextObj.getText();\r\n } catch (UiObjectNotFoundException e) {\r\n ApplicationInfor.errorLogging(\"title text get text exception, msg=\" + e.getMessage());\r\n }\r\n }\r\n\t\t// back to the normal.\r\n\t\tuiDevice.pressBack();\r\n\r\n\t\tif (title.equals(\"新朋友\")) {\r\n\t\t return this._actionMngr.getAddNewFriendsAction();\r\n\t\t} else if (isGrayColumnExists) {\r\n\t\t return this._actionMngr.getClearAllChatAction();\r\n\t\t}\r\n\t\t\r\n\t\treturn this._actionMngr.getMsglistDispatchAction();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tplay();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsp4.play(sound_id4, 1.0F, 1.0F, 0, 0, 1.0F);\n\t\t\t}" ]
[ "0.71655905", "0.7025742", "0.69866", "0.694244", "0.6802451", "0.6793108", "0.6773244", "0.6753181", "0.6724069", "0.66491693", "0.66464716", "0.66248536", "0.66169035", "0.6541281", "0.651461", "0.6512305", "0.64722687", "0.6463086", "0.64547884", "0.64161974", "0.64161974", "0.6385091", "0.6382225", "0.6329856", "0.6320886", "0.632042", "0.6318026", "0.63029635", "0.6271278", "0.6250112", "0.6246442", "0.62435496", "0.6231824", "0.62209564", "0.62205666", "0.62129694", "0.62104666", "0.61925197", "0.61919445", "0.61817306", "0.6178569", "0.615211", "0.6151179", "0.61329913", "0.6131453", "0.6128675", "0.611656", "0.61161435", "0.61011434", "0.6101095", "0.60999954", "0.60962343", "0.6095591", "0.60907847", "0.6088495", "0.6081477", "0.6068438", "0.60677123", "0.60662377", "0.6064484", "0.60637754", "0.60616046", "0.6057216", "0.60565346", "0.60560465", "0.6050989", "0.6048944", "0.6047874", "0.6045343", "0.6044465", "0.60350144", "0.6029082", "0.60278815", "0.60271263", "0.6017382", "0.60093296", "0.60083824", "0.60061663", "0.60035855", "0.60003203", "0.59998184", "0.5994358", "0.5993377", "0.59843105", "0.59843105", "0.597833", "0.5975222", "0.5969773", "0.59688586", "0.59674996", "0.5956745", "0.59471196", "0.59462255", "0.59454226", "0.5945229", "0.59445375", "0.5944045", "0.59424233", "0.5941306", "0.59322524", "0.5930956" ]
0.0
-1
returns the similarity of the provided objects
public abstract Double get(T first, T second);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double calculateSimilarity(OWLObject a, OWLObject b);", "public Future<List<Object>> evaluateSimilarity(Serializable objectUnderComparison, List<Serializable> referenceObjects);", "public double getSimilarity(Pair<String, String> representations);", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "@Override\n protected double calcSimilarity(Cluster a, Cluster b) {\n List<Point> aItems = a.getItems();\n List<Point> bItems = b.getItems();\n\n // calculate the similarity of each item in a with every item in b,\n // save the min value in sim-variable\n double sim = Double.MAX_VALUE;\n for (Point x : aItems) {\n for (Point y : bItems) {\n double currSim = x.distanceTo(y);\n if (currSim < sim) {\n sim = currSim;\n }\n }\n }\n\n return sim;\n }", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "public double getSimilarity()\r\n {\r\n return similarity;\r\n }", "public Matrix2D executeSimilarity(List<DataObject> dataObjects) {\r\n\t\tint objectsCount = dataObjects.size();\r\n\t\tMatrix2D similarityMatrix = new Matrix2D(objectsCount);\r\n\t\t\r\n\t\tVideoMediaFile video1 = null;\r\n\t\tVideoMediaFile video2 = null;\r\n\t\t\r\n\t\tint p = 0;\r\n\t\tfor (int i = 0; i < objectsCount; i++) {\r\n\t\t\tfor (int j = i + 1; j < objectsCount; j++) {\r\n\t\t\t\tvideo1 = (VideoMediaFile) dataObjects.get(i);\r\n\t\t\t\tvideo2 = (VideoMediaFile) dataObjects.get(j);\r\n\t\t\t\t\r\n\t\t\t\tint similarValues = 0;\r\n\t\t\t\t\r\n\t\t\t\tint featureListSize = video1.getFeatureList().size();\r\n\t\t\t\tfor (int k = 0; k < featureListSize; k++) {\r\n\t\t\t\t\tMetaData video1MetaData = (MetaData) video1.getFeatureList().get(k);\r\n\t\t\t\t\tMetaData video2MetaData = (MetaData) video2.getFeatureList().get(k);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (video1MetaData.getId().equals(\"mediaDuration\") || \r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"mediaFileSize\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"mediaBitrate\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoFramerate\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"timebase\")) {\r\n\t\t\t\t\t\tdouble v1 = Double.valueOf(video1MetaData.getValue()).doubleValue();\r\n\t\t\t\t\t\tdouble v2 = Double.valueOf(video2MetaData.getValue()).doubleValue();\r\n\t\t\t\t\t\tdouble v3;\r\n\t\t\t\t\t\tif (v1 >= v2)\r\n\t\t\t\t\t\t\tv3 = ((v1 / v2) - 1) * 100;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tv3 = ((v2 / v1) - 1) * 100;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (v3 > 5.0)\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse if (video1MetaData.getId().equals(\"numberStreams\") || \r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoWidth\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoHeight\")) {\r\n\t\t\t\t\t\tint v1 = Integer.valueOf(video1MetaData.getValue()).intValue();\r\n\t\t\t\t\t\tint v2 = Integer.valueOf(video2MetaData.getValue()).intValue();\r\n\t\t\t\t\t\tif (v1 == v2)\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (video1MetaData.getId().equals(\"videoCodecType\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"audioCodecType\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"audioLanguage\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"samplerate\")) {\r\n\t\t\t\t\t\tString s1 = video1MetaData.getValue();\r\n\t\t\t\t\t\tString s2 = video1MetaData.getValue();\r\n\t\t\t\t\t\tif (s1.equals(s2))\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Calculate the similarity.\r\n\t\t\t\tdouble result = (double) similarValues / featureListSize;\r\n\t\t\t\tsimilarityMatrix.set(i, j, result);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setProgress((double)++p/objectsCount);\r\n\t\t}\r\n\t\t\r\n\t\treturn similarityMatrix;\r\n\t}", "public float getSimilarity() {\n return similarity;\n }", "public double computeSimilarity(int[] cluster1, int[] cluster2);", "@RequestMapping(value = \"get_items_similarity\",headers=\"Accept=*/*\", method={RequestMethod.GET},produces=\"application/json\")\n\t@ResponseBody\n\tpublic double getItemsSimilarity(@RequestParam(\"title1\") String title1,\n\t\t\t@RequestParam(\"title2\") String title2){\n\t\t//:TODO your implementation\n\t\tdouble ret = 0.0;\n\t\t\n\t\tUser[] usersObj1 = getUsersByItem(title1);\n\t\tUser[] usersObj2 = getUsersByItem(title2);\n\t\t\n\t\tArrayList<String> users1 = new ArrayList<String>();\n\t\tArrayList<String> users2 = new ArrayList<String>();\n\t\t\n\t\t// get usernames to arrays of string names\n\t\tfor (User user : usersObj1){\n\t\t\tusers1.add(user.getUsername());\n\t\t}\n\t\t\n\t\tfor (User user : usersObj2){\n\t\t\tusers2.add(user.getUsername());\n\t\t}\n\t\t\n\t\t// Intersection list\n\t\tSet<String> intersectionSet = users1.stream()\n\t\t\t\t .distinct()\n\t\t\t\t .filter(users2::contains)\n\t\t\t\t .collect(Collectors.toSet());\n\t\t\n\t\t// get sets of users by two titles \n\t\tSet<String> U1 = new HashSet<String>(users1);\n\t\tSet<String> U2 = new HashSet<String>(users2);\n\t\t\n\t\tU1.addAll(U2); // union\n\t\t\n\t\tif(U1.size() == 0) {\n\t\t\treturn ret;\n\t\t}\n\t\t\n\t\tret = ((double) intersectionSet.size()) / ((double) U1.size());\n\t\t\n\t\treturn ret;\n\t}", "@Override\n\tpublic float similarity(PetriNet pn1, PetriNet pn2) {\n\t\treturn similarity((PetriNet) pn1.clone(), (PetriNet) pn2.clone(), 1);\n\t}", "@Override\n public double similarity(\n final Integer value1, final Integer value2) {\n\n // The value of nodes is an integer...\n return 1.0 / (1.0 + Math.abs(value1 - value2));\n }", "public static double getMatchScore(String obj1, String obj2) {\n\tint distance = getLevenshteinDistance(obj1, obj2);\n\tSystem.out.println(\"distance = \" + distance);\n\tdouble match = 1.0 - ((double)distance / (double)(Math.max(obj1.length(), obj2.length())));\n\t\n\tSystem.out.println(\"match is \" + match);\n\treturn match;\n }", "double computeSimilarity(double[] vector1, double[] vector2) {\n\n // We need doubles for these so the math is done correctly. Else we only\n // return 1 or 0.\n double nDifferences = 0.;\n double lengthOfVector = (double) vector1.length;\n\n for (int i = 0; i < vector1.length; i++) {\n if (vector1[i] != vector2[i]) {\n nDifferences ++;\n }\n } \n return (1. - (nDifferences/lengthOfVector));\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic double calculateSimilarity(String tag1, String tag2) {\n\t\tHashMap<String, ArrayList<HashMap<String, HashSet<String>>>> userMap = db.getUserMap();\n\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\tfor(String user : userMap.keySet()){\n\t\t\n\t\t\tHashMap<String, HashSet<String>> tagsMap = userMap.get(user).get(1);\n\t\t\tint totalTags = tagsMap.keySet().size();\n\t\t\t\n\t\t\tif(null == tagsMap.get(tag1) || null == tagsMap.get(tag2))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tHashMap<String, HashSet<String>> resourcesMap = userMap.get(user).get(0);\n\t\t\t\n\t\t\tdouble userSimilarity = 0.0;\n\t\t\t\n\t\t\tfor(String resource : resourcesMap.keySet()){\n\t\t\t\tHashSet<String> tags = resourcesMap.get(resource);\n\t\t\t\t\n\t\t\t\tif(tags.contains(tag1) && tags.contains(tag2)){\n\t\t\t\t\tuserSimilarity += Math.log(\n\t\t\t\t\t\t\t( (double) tags.size() ) /\n\t\t\t\t\t\t\t( ( (double) totalTags ) + 1.0 )\n\t\t\t\t\t\t\t);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsimilarity += -userSimilarity;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn similarity; //rounding is necessary to match the results given at: www2009.org/proceedings/pdf/p641.pdf\n\t\t\n\t}", "public int getSimilarity() {\n return similarity;\n }", "@Override\n public double similarity(SimComparator<OEMolBase> other, double minSim)\n { return similarity(other);\n }", "private Similarity getSimilarity(DisjointSets<Pixel> ds, int root1, int root2)\n {\n return null; //TODO: remove and replace this line\n }", "@Override\r\n\tpublic final float getSimilarity(final String string1, final String string2) {\r\n //split the strings into tokens for comparison\r\n final ArrayList<String> str1Tokens = this.tokeniser.tokenizeToArrayList(string1);\r\n final ArrayList<String> str2Tokens = this.tokeniser.tokenizeToArrayList(string2);\r\n \r\n if (str1Tokens.size() == 0){\r\n \treturn 0.0f;\r\n }\r\n\r\n float sumMatches = 0.0f;\r\n float maxFound;\r\n for (Object str1Token : str1Tokens) {\r\n maxFound = 0.0f;\r\n for (Object str2Token : str2Tokens) {\r\n final float found = this.internalStringMetric.getSimilarity((String) str1Token, (String) str2Token);\r\n if (found > maxFound) {\r\n maxFound = found;\r\n }\r\n }\r\n sumMatches += maxFound;\r\n }\r\n return sumMatches / str1Tokens.size();\r\n }", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "@Override\r\n\tpublic String getSimilarityExplained(String string1, String string2) {\r\n //todo this should explain the operation of a given comparison\r\n return null; //To change body of implemented methods use File | Settings | File Templates.\r\n }", "double squaredDistanceTo(IMovingObject m);", "public double compute(Object o1, Object o2) throws jcolibri.exception.NoApplicableSimilarityFunctionException {\n\t\tif ((o1 == null) || (o2 == null))\n\t\t\treturn 0;\n\t\tif (!(o1 instanceof java.lang.Number))\n\t\t\tthrow new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), o1.getClass());\n\t\tif (!(o2 instanceof java.lang.Number))\n\t\t\tthrow new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), o2.getClass());\n\n\n\t\tNumber i1 = (Number) o1;\n\t\tNumber i2 = (Number) o2;\n\t\treturn (double) compare(i1.doubleValue(), i2.doubleValue());\n\t}", "public abstract Object[] getSimilarityFactors();", "@Test\n public final void testSimilarity() {\n System.out.println(\"similarity\");\n RatcliffObershelp instance = new RatcliffObershelp();\n\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"ring\" ==> 4, \"My s\" ==> 3, \"s\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(4 + 3 + 1) / (9 + 9)\n\t\t// = 16/18\n\t\t// = 0.888888\n assertEquals(\n 0.888888,\n instance.similarity(\"My string\", \"My tsring\"),\n 0.000001);\n\t\t\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"My \" ==> 3, \"tri\" ==> 3, \"g\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(3 + 3 + 1) / (9 + 9)\n\t\t// = 14/18\n\t\t// = 0.777778\n assertEquals(\n 0.777778,\n instance.similarity(\"My string\", \"My ntrisg\"),\n 0.000001);\n\n // test data from essay by Ilya Ilyankou\n // \"Comparison of Jaro-Winkler and Ratcliff/Obershelp algorithms\n // in spell check\"\n // https://ilyankou.files.wordpress.com/2015/06/ib-extended-essay.pdf\n // p13, expected result is 0.857\n assertEquals(\n 0.857,\n instance.similarity(\"MATEMATICA\", \"MATHEMATICS\"),\n 0.001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.7368421052631579\n assertEquals(\n 0.736842,\n instance.similarity(\"aleksander\", \"alexandre\"),\n 0.000001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.6666666666666666\n assertEquals(\n 0.666666,\n instance.similarity(\"pennsylvania\", \"pencilvaneya\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 14/18 = 0.7777777777777778‬\n assertEquals(\n 0.777778,\n instance.similarity(\"WIKIMEDIA\", \"WIKIMANIA\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 24/40 = 0.65\n assertEquals(\n 0.6,\n instance.similarity(\"GESTALT PATTERN MATCHING\", \"GESTALT PRACTICE\"),\n 0.000001);\n \n NullEmptyTests.testSimilarity(instance);\n }", "public interface Similarity {\n\n double Similarity(Map<String, Double> sourceMap, Map<String, Double> targetMap);\n}", "@Override\n public int compareTo(AutocompleteObject o) {\n return Double.compare(o.similarity, similarity);\n }", "public double getSimilarity(double []x,double []y){\n\t\tdouble res = 0;\n\t\tdouble sx = 0;\n\t\tdouble sy = 0;\n\t\tif( x.length != y.length ){\n\t\t\tSystem.out.println (\"The length of input vector is not consistent.\");\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tfor( int i = 0; i < x.length; ++ i ){\n\t\t\tres += x[i]*y[i];\n\t\t\tsx += x[i]*x[i];\n\t\t\tsy += y[i]*y[i];\n\t\t}\n\t\t\n\t\treturn res/(Math.sqrt(sx)*Math.sqrt(sy));\n\t}", "public interface PairwiseSimilarity {\n public double getMinValue();\n public double getMaxValue();\n public SRResultList mostSimilar(MostSimilarCache matrices, TIntFloatMap vector, int maxResults, TIntSet validIds) throws IOException;\n public SRResultList mostSimilar(MostSimilarCache matrices, int wpId, int maxResults, TIntSet validIds) throws IOException;\n}", "public static double similarity(Library a, Library b) {\r\n double sizeA = a.getPhotos().size();\r\n double sizeB = b.getPhotos().size();\r\n\r\n if (sizeA == 0.0 || sizeB == 0.0) { // return 0.0 if either library is empty\r\n return 0.0;\r\n } else {\r\n int size = commonPhotos(a, b).size();\r\n if (sizeA < sizeB) { // return amount of common photos divided by the smaller library\r\n return size / sizeA;\r\n } else {\r\n return size / sizeB;\r\n }\r\n }\r\n\r\n }", "public void compareWithinClusters() {\n\t\tList<Cluster> clusterList = clusterDao.getClusterList();\n\n\t\tfor (Cluster cluster : clusterList) {\n\t\t\tList<Document> docList = documentDao.getDocListByClusterId(cluster.getId());\n\t\t\tint size = docList.size();\n\t\t\t\n\t\t\tdouble[][] matrix = new double[size][size];\n\t\t\t\n\t\t\tfor(int i =0; i<size; i++){\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (size > 1) {\n\t\t\t\t//List<Document> docList2 = docList1;\n\t\t\t\tfor (int i=0; i<size; i++){\n\t\t\t\t\tfor(int j=i+1; j<size; j++){\n\t\t\t\t\t\t//match docs docList.get(i) & docList.get(j)\n\t\t\t\t\t\tMap<String, Double> map = datumboxCaller.compareDocs(docList.get(i).getDocName(), docList.get(j).getDocName());\n\t\t\t\t\t\tmatrix[i][j] = map.get(\"Oliver\");\n\t\t\t\t\t\tmatrix[j][i] = map.get(\"Shingle\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//persist both metrics in a file \n\t\t\tpersist(matrix, cluster, docList);\n\t\t\t\n\t\t\t//printing the matrix\n\t\t\tSystem.out.println(\"\\nDocument Similarity Matrix for Cluster \"+cluster.getId());\n\t\t\tSystem.out.println(\"\\nOliver Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.println(docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nShingle Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.print(\"\\n\"+docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[j][i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//print ends\n\t\t\t\n\t\t}\n\n\t}", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "public float CalculateSimilarityByVector(float[] v1, float[] v2) {\n\t\t\n\t\tfloat similarity = 0f;\n\t\t\n\t\tfloat numerator = 0f;\n\t\tfor(int i = 0; i < v1.length; i++) {\n\t\t\tnumerator += v1[i] * v2[i];\n\t\t}\n\t\t\n\t\tfloat v1Denom = 0f;\n\t\tfor(int i = 0; i < v1.length; i++) {\n\t\t\tv1Denom += Math.pow(v1[i], 2);\n\t\t}\n\t\tfloat v2Denom = 0f;\n\t\tfor(int i = 0; i < v2.length; i++) {\n\t\t\tv2Denom += Math.pow(v2[i], 2);\n\t\t}\n\t\t\n\t\tfloat denominator = (float) (Math.sqrt(v1Denom) * Math.sqrt(v2Denom));\n\t\t\n\t\tsimilarity = numerator / denominator;\n\t\t\n\t\treturn similarity;\n\t}", "public interface EQSimilarity {\n \n /**\n * Compute similarity between two equivalence classes. The equivalence\n * classes are referenced by their unique identifier.\n * \n * @param eq1\n * @param eq2\n * @return \n */\n public SimilarityScore sim(int eq1, int eq2);\n}", "private static void calculateSimilarity() {\n \tLOG.info(\"Begin calculating spatial similarity between users.\");\n \t\n\t\t// Get a list of all users\n \tNeo4JUserDAO uDao = (Neo4JUserDAO) DAOFactory.instance().getUserDAO();\n\t\tList<Node> users = uDao.findAll();\n\t\t\n\t\tint usersCount = users.size();\n \tLOG.debug(\"Found {} users.\", usersCount);\n\t\t\n\t\t// Instantiate all needed classes for similarity measurement\n\t\tNeo4JSequenceExtractor ex = new Neo4JSequenceExtractor();\n\t\tex.setFromLevel(clArgs.calcSimilarityFromLevel);\n\t\tex.setToLevel(clArgs.calcSimilarityToLevel);\n\t\t\n\t\tNeo4JSequenceMatcher matcher = new Neo4JSequenceMatcher(\n\t\t\t\tclArgs.calcSimilaritySplitThreshold, \n\t\t\t\tclArgs.calcSimilarityMinSequenceLength,\n\t\t\t\tclArgs.calcSimilarityTempConstraintThreshold);\n\t\tNeo4JSimilarityAnalyzer analyzer = new Neo4JSimilarityAnalyzer();\n\t\t\n\t\t// Create matrix that holds similarity results\n\t\tdouble[][] similarityResults = new double[usersCount][usersCount];\n\t\t\n\t\t// Go through all pair-wise user combinations\n \tfor (int i = 0; i < usersCount; i++) {\n\t\t\tNode userOne = users.get(i);\n\t\t\tObject userOneId = uDao.getUserId(userOne);\n\t\t\t\n\t\t\t// Set current first user for sequence extraction\n\t\t\tex.setUserNodeOne(userOne);\n\t\t\t\n\t\t\tfor (int j = i + 1; j < usersCount; j++) {\n\t\t\t\tNode userTwo = users.get(j);\n\t\t\t\tObject userTwoId = uDao.getUserId(userTwo);\n\t\t\t\tLOG.info(\"Calculate similarity between user [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\n\t\t\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\t\t\t// Step 1: Extract cluster sequences of two users based on their hierarchical graphs\n\t\t\t\t// Set current second user for sequence extraction\n\t\t\t\tex.setUserNodeTwo(userTwo);\n\t\t\t\tMap<Integer, SequenceWrapper> clusterSequences = null;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t// Start extraction of cluster sequences\n\t\t\t\t\tLOG.info(\"Step 1: Extraction of cluster sequences from level {} to level {}.\", clArgs.calcSimilarityFromLevel, clArgs.calcSimilarityToLevel);\n\t\t\t\t\tclusterSequences = ex.extract();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(\"An error occurred while extracting the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Step 2: Match the extracted cluster sequences to find maximal length similar sequences\n\t\t\t\tMap<Integer, List<Sequence<SimilarSequenceCluster>>> maxLengthSimilarSequences = null;\n\t\t\t\t\n\t\t\t\t// Matching is only possible if there is a valid result of step 1 \n\t\t\t\tif (clusterSequences != null && !clusterSequences.isEmpty()) {\n\t\t\t\t\tmatcher.setSequencesOnLevel(clusterSequences);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Start matching of cluster sequences\n\t\t\t\t\t\tLOG.info(\"Step 2: Matching of cluster sequences.\");\n\t\t\t\t\t\tmaxLengthSimilarSequences = matcher.match();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLOG.error(\"An error occurred while matching the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t// Step 3: Compute spatial similarity between the current two users\n\t\t\t\t\t// Similarity measurement is only possible with a valid result of step 2\n\t\t\t\t\tif (maxLengthSimilarSequences != null && !maxLengthSimilarSequences.isEmpty()) {\n\t\t\t\t\t\tanalyzer.setUserNodeOne(userOne);\n\t\t\t\t\t\tanalyzer.setUserNodeTwo(userTwo);\n\t\t\t\t\t\tanalyzer.setMaximalLengthSimilarSequencesOnLevel(maxLengthSimilarSequences);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Start similarity measurement\n\t\t\t\t\t\t\tLOG.info(\"Step 3: Similarity measurement.\");\n\t\t\t\t\t\t\tsimilarity = analyzer.analyze();\n\t\t\t\t\t\t\tLOG.debug(\"Final similarity score: {}\", similarity);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Save similarity value in result matrix\n\t\t\t\t\t\t\tsimilarityResults[i][j] = similarity;\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tLOG.error(\"An error occurred while measuring similarity between user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\t// END: step 3\n\t\t\t\t}\t// END: step 2\n\t\t\t}\t// END: user two loop\n\t\t}\t// END: user one loop\n \t\n \tLOG.info(\"Finished calculating spatial similarity.\");\n \t\n \t// Normalize the similarity scores from 0 to 1\n \tif (clArgs.normalization) {\n\t \tLOG.info(\"Normalizing similarity scores.\");\n\t \tsimilarityResults = SimilarityNormalizer.normalize(similarityResults);\n \t}\n \t\n \t// The evaluation is requested\n \tif (clArgs.evaluation) {\n \t\tLOG.info(\"Evaluation is enabled.\");\n \t\t\n \t\t// Calculate simple evaluation\n \t\tLOG.info(\"Calculate similarity evaluation values.\");\n \t\tSimilarityEvaluation evaluation = SimilarityEvaluator.evaluate(similarityResults);\n \t\t\n \t\t// Build up other information to include in the evaluation files\n \t\tList<String> otherInformation = new ArrayList<String>();\n \t\tif (clArgs.automation) {\n \t\t\t// Clustering information is only included if the automation task is running\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_XI);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsXi)));\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_MIN_POINTS);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsMinPoints)));\n \t\t}\n \t\t\n \t\t// Add simple metrics from similarity measurement\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MIN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMin())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MAX);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMax())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MEAN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getSimilarityMean())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILAR_USER_PAIRS);\n \t\totherInformation.add(String.valueOf(evaluation.getSimilarUserPairs()));\n \t\t\n \t\t// Write similarity results in a file\n \t\tLOG.info(\"Writing evaluation data to a file.\");\n \t\tArrayToCsvWriter.writeDoubles(similarityResults, clArgs.evaluationOutDir, otherInformation.toArray(new String[0]));\n \t}\n \t// Evaluation is not requested, write the similarity scores into the graph database\n \telse {\n \t\tLOG.info(\"Write similarity scores to the graph database.\");\n \t\t\n \t\tfor (int i = 0; i < similarityResults.length; i++) {\n \t\t\t// Get first user by id\n \t\t\tNode userOne = uDao.findUserById(i);\n \t\t\tfor (int j = i + 1; j < similarityResults.length; j++) {\n \t\t\t\tdouble similarityScore = similarityResults[i][j];\n \t\t\t\t// User pairs that are not similar (i.e., have a similarity score of zero) do not get a connection\n \t\t\t\tif (similarityScore > 0) {\n\t \t\t\t\t// Get second user by id\n\t \t\t\t\tNode userTwo = uDao.findUserById(j);\n\t \t\t\t\t\n\t \t\t\t\t// Add similarity relationship\n\t \t\t\t\tuDao.connectSimilarUsers(userOne, userTwo, similarityScore);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }", "public double similarity(REPOverlap rep2) {\r\n\t\tdouble p = 0;\r\n\t\tint i = 0;\r\n\t\tfor (i=0;i<dist.length;i++) {\r\n\t\t\tp += Math.sqrt(dist[i]*rep2.dist[i]);\r\n\t\t}\r\n\t\treturn p;\r\n\t}", "@RequestMapping(value = \"get_items_similarity\",headers=\"Accept=*/*\", method={RequestMethod.GET},produces=\"application/json\")\n\t@ResponseBody\n\tpublic double getItemsSimilarity(@RequestParam(\"title1\") String title1,\n\t\t\t@RequestParam(\"title2\") String title2){\n\t\t//:TODO your implementation\n\t\tdouble ret = 0.0;\n\t\treturn ret;\n\t}", "public long numSimilarities();", "public SimilarityScore sim(int eq1, int eq2);", "public double JaccardSimilarity (String stringOne, String stringTwo) {\n\t\treturn (double) intersect(stringOne, stringTwo).size() /\n\t\t\t (double) union(stringOne, stringTwo).size();\n\t}", "public abstract double distanceTo (Object object);", "private float distanceMoyenne(DMatchVector bestMatches){\n\n float DM=0.0f;\n for(int i=0;i<bestMatches.size();i++){\n\n DM+=bestMatches.get(i).distance();\n }\n\n DM=DM/bestMatches.size();\n return DM;\n\n }", "@Override\r\n\tpublic double calculateDistance(Object obj1, Object obj2) {\r\n\t\treturn Math.abs(((String)obj1).split(\" \").length - \r\n\t\t\t\t((String)obj1).split(\" \").length);\r\n\t}", "@Test\n public void testCosineSimilarity() {\n SimilarityFunctions s = new SimilarityFunctions();\n\n double[] vector1 = new double[]{1, 2, 3};\n double[] vector2 = new double[]{2, 6, 3};\n double[] vector3 = new double[]{0, 1, 2};\n double[] vector4 = new double[]{2, 0, 0, 0};\n double[] vector5 = new double[]{1, 2.4, 3.9, 1};\n double[] vector6 = new double[]{1};\n double[] vector7 = new double[]{-1};\n\n assertEquals(0.8781440805693944, s.cosineSimilarity(vector1, vector2), .001);\n assertEquals(0.9561828874675149, s.cosineSimilarity(vector1, vector3), .001);\n assertEquals(0.7666518779999278, s.cosineSimilarity(vector2, vector3), .001);\n assertEquals(0.20865053489458874, s.cosineSimilarity(vector4, vector5), .001);\n assertEquals(-1.0, s.cosineSimilarity(vector6, vector7), .001);\n }", "protected double nameSimilarity(String n1, String n2, boolean useWordNet)\n\t{\n\t\tif(n1.equals(n2))\n\t\t\treturn 1.0;\n\t\t\n\t\t//Split the source name into words\n\t\tString[] sW = n1.split(\" \");\n\t\tHashSet<String> sWords = new HashSet<String>();\n\t\tHashSet<String> sSyns = new HashSet<String>();\n\t\tfor(String w : sW)\n\t\t{\n\t\t\tsWords.add(w);\n\t\t\tsSyns.add(w);\n\t\t\t//And compute the WordNet synonyms of each word\n\t\t\tif(useWordNet && w.length() > 2)\n\t\t\t\tsSyns.addAll(wn.getAllNounWordForms(w));\n\t\t}\n\t\t\n\t\t//Split the target name into words\n\t\tString[] tW = n2.split(\" \");\n\t\tHashSet<String> tWords = new HashSet<String>();\n\t\tHashSet<String> tSyns = new HashSet<String>();\t\t\n\t\tfor(String w : tW)\n\t\t{\n\t\t\ttWords.add(w);\n\t\t\ttSyns.add(w);\n\t\t\t//And compute the WordNet synonyms of each word\n\t\t\tif(useWordNet && w.length() > 3)\n\t\t\t\ttSyns.addAll(wn.getAllWordForms(w));\n\t\t}\n\t\t\n\t\t//Compute the Jaccard word similarity between the properties\n\t\tdouble wordSim = Similarity.jaccard(sWords,tWords)*0.9;\n\t\t//and the String similarity\n\t\tdouble simString = ISub.stringSimilarity(n1,n2)*0.9;\n\t\t//Combine the two\n\t\tdouble sim = 1 - ((1-wordSim) * (1-simString));\n\t\tif(useWordNet)\n\t\t{\n\t\t\t//Check if the WordNet similarity\n\t\t\tdouble wordNetSim = Similarity.jaccard(sSyns,tSyns);\n\t\t\t//Is greater than the name similarity\n\t\t\tif(wordNetSim > sim)\n\t\t\t\t//And if so, return it\n\t\t\t\tsim = wordNetSim;\n\t\t}\n\t\treturn sim;\n\t}", "@Override\r\n\tpublic float getUnNormalisedSimilarity(String string1, String string2) {\r\n //todo check this is valid before use mail [email protected] if problematic\r\n return getSimilarity(string1, string2);\r\n }", "public double getRealSimilarity()\r\n {\r\n double result = (1 - this.similarity) * 100;\r\n BigDecimal big = new BigDecimal(result).setScale(2, RoundingMode.UP);\r\n return big.doubleValue();\r\n }", "public double getValue(Object o) {\n for (SimilarResult result : results) {\n if (result.getObj().equals(o)) {\n return result.getValue();\n }\n }\n return 0;\n }", "public interface DimensionSimilarity {\n double similarity(double left, double right);\n}", "public static double similarity(Color c1,Color c2){\n LOG.info(\"C1,\"+c1.toString()+\",C2:\"+c2.toString());\n //\n double r2_r1 = distance(c2.getRed(),c1.getRed());\n double g2_g1 = distance(c2.getGreen(),c1.getGreen());\n double b2_b1 = distance(c2.getBlue(),c1.getBlue());\n\n double distance = Math.sqrt(r2_r1+g2_g1+b2_b1);\n double avgRgb = Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2));\n double differ = distance/avgRgb;\n LOG.info(\"differ,\"+differ+\"distance:\"+distance+\",avgRgb:\"+avgRgb);\n return 1.00-differ;\n }", "public static double similarity(Library a, Library b) {\n double numerator = commonPhotos(a, b).size();\n if (a.numPhotos() == 0 || b.numPhotos() == 0) { // check if both libraries have 0 photos\n return 0;\n } else if (a.numPhotos() > b.numPhotos()) { // checking to see which number to divide by\n return numerator / b.numPhotos();\n } else {\n return numerator / a.numPhotos();\n }\n }", "private float similarity(PetriNet pn1, PetriNet pn2, int internal) {\n\t\tNewPtsSet nps1 = computeSequenceSet(pn1);\n\t\tNewPtsSet nps2 = computeSequenceSet(pn2);\n\t\tdouble[][] seqM = computeSeqMatrix(nps1, nps2);\n\t\tdouble sim = computeSimilarityForTwoNet_Astar(seqM, nps1, nps2);\n\t\treturn (float) sim;\n\t}", "public interface DistanceFunctionMultiObject<T> {\n /**\n * Measures the distance between all the objects in set (the first argument) and\n * the specified object (the second argument).\n * The passed array {@code individualDistances} will be filled with the\n * distances to the individual objects in the set.\n * \n * @param objects the set of objects for which to measure the distance to the second parameter\n * @param object the object for which to measure the distance\n * @param individualDistances the array to fill with the distances to the respective objects from the set;\n * if not <tt>null</tt>, it must have the same number of allocated elements as the number of the set of objects\n * @return the distance between the given set of {@code objects} and the {@code object}\n * @throws IndexOutOfBoundsException if the passed {@code individualDistances} array is not big enough\n */\n public float getDistanceMultiObject(Collection<? extends T> objects, T object, float[] individualDistances) throws IndexOutOfBoundsException;\n\n /**\n * Returns the type of objects that this distance function accepts as arguments.\n * @return the type of objects for this distance function\n */\n public Class<? extends T> getDistanceObjectClass();\n}", "public void getSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += (list.get(j).getValue() - iAverage) * (userRate- this.userAverageRate);\r\n\t\t\t\t\t\tb += (list.get(j).getValue() - iAverage) * (list.get(j).getValue() - iAverage);\r\n\t\t\t\t\t\tc += (userRate - this.userAverageRate) * (userRate - this.userAverageRate);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && c == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && b != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Create a heap storing the similarity pairs in a descending order.\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public static float similarity(String str) {\n\t\t/*Set<Character> distinct = symbols(str);\n\t\tif (distinct.size() != str.length()) {\n\t\t\tstr = \"\";\n\t\t\tfor (Character ch : distinct) str += ch;\n\t\t}*/\n\t\tMap<Character, Float> bySymbol = new HashMap<Character, Float>(); \n\t\tfloat sum = 0;\n\t\tfor (int i=0; i<str.length()-1; i++) {\n\t\t\tfor (int j=i+1; j<str.length(); j++) {\n\t\t\t\tchar ch1 = str.charAt(i);\n\t\t\t\tchar ch2 = str.charAt(j);\n\t\t\t\tString bigram = \"\"+ch1+ch2;\n\t\t\t\tFloat val = Ciphers.cosineSimilaritiesMap.get(bigram);\n\t\t\t\tif (val == null) val = 0f;\n\t\t\t\t//System.out.println(bigram+\": \" + val);\n\t\t\t\tsum += val;\n\t\t\t\t\n\t\t\t\tFloat val2 = bySymbol.get(ch1);\n\t\t\t\tif (val2 == null) val2 = 0f;\n\t\t\t\tval2 += val;\n\t\t\t\tbySymbol.put(ch1, val2);\n\t\t\t\t\n\t\t\t\tval2 = bySymbol.get(ch2);\n\t\t\t\tif (val2 == null) val2 = 0f;\n\t\t\t\tval2 += val;\n\t\t\t\tbySymbol.put(ch2, val2);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//for (Character ch : bySymbol.keySet()) System.out.println(\"Sum for symbol [\" + ch + \"]: \" + bySymbol.get(ch));\n\t\treturn sum;\n\t}", "private Sim getSimilarity(Product p1, Product p2, double[] weights) {\n\t\tdouble d1 = 1 - matrix.getServiceMatrix()[p1.getNormalizedService()][p2\n\t\t\t\t.getNormalizedService()];\n\t\tdouble d2 = 1 - matrix.getCustomerMatrix()[p1.getNormalizedCustomer()][p2\n\t\t\t\t.getNormalizedCustomer()];\n\t\tdouble d3 = p1.getNormalizedFee() - p2.getNormalizedFee();\n\t\tdouble d4 = p1.getNormalizedAds() - p2.getNormalizedAds();\n\t\tdouble d5 = 1 - matrix.getSizeMatrix()[p1.getNormalizedSize()][p2\n\t\t\t\t.getNormalizedSize()];\n\t\tdouble d6 = 1 - matrix.getPromotionMatrix()[p1.getNormalizedPromo()][p2\n\t\t\t\t.getNormalizedPromo()];\n\t\tdouble d7 = p1.getNormalizedInterest() - p2.getNormalizedInterest();\n\t\tdouble d8 = p1.getNormalizedPeriod() - p2.getNormalizedPeriod();\n\t\tdouble sum = weights[0] * Math.pow(d1, 2) + weights[1]\n\t\t\t\t* Math.pow(d2, 2) + weights[2] * Math.pow(d3, 2) + weights[3]\n\t\t\t\t* Math.pow(d4, 2) + weights[4] * Math.pow(d5, 2) + weights[5]\n\t\t\t\t* Math.pow(d6, 2) + weights[6] * Math.pow(d7, 2) + weights[7]\n\t\t\t\t* Math.pow(d8, 2);\n\t\tdouble simValue = 1 / Math.sqrt(sum);\n\t\tSim sim = new Sim(p2, simValue);\n\t\treturn sim;\n\t}", "private double isSimilar(double rightHandSimilarity, double leftHandSimilarity, List<Double> rightFingersSimilarity, List<Double> leftFingersSimilarity, double rightMotionSimilarity, double leftMotionSimilarity, List<List<Double>> touchList) {\n return rightHandSimilarity * leftHandSimilarity;\n }", "@Override\n\tpublic double getSimilarity(double[] a, double[] b) {\n\t\tVecUtils.checkDims(a,b);\n\t\tfinal int n = a.length;\n\t\tfinal double[] minV = VecUtils.pmin(a, b);\n\t\t\n\t\t// Get front\n\t\t// Originally: \n\t\t//\n\t\t// final double[] front = VecUtils.multiply(VecUtils.multiply(a, b), VecUtils.scalarAdd(minV, 1d));\n\t\t// final double[] mid1 = VecUtils.scalarDivide(VecUtils.add(a, b), 2);\n\t\t// final double[] mid2 = VecUtils.pow(minV, 2);\n\t\t// final double[] mid = VecUtils.multiplyForceSerial(mid1, mid2);\n\t\t// final double[] back = VecUtils.scalarDivide(VecUtils.pow(minV, 3), 3);\n\t\t// final double[] res = VecUtils.addForceSerial(VecUtils.subtractForceSerial(VecUtils.scalarAdd(front, 1), mid), back);\n\t\t// return VecUtils.prod(res);\n\t\t//\n\t\t// but this takes 12n (13n total!!)... can do it uglier, but much more elegantly in 1n (2n total):\n\t\tdouble[] front = new double[n], mid = new double[n], back = new double[n];\n\t\tdouble prod = 1;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfront[i] = a[i]*b[i] * (minV[i]+1);\n\t\t\tmid[i] = ((a[i]+b[i]) / 2) * (minV[i] * minV[i]);\n\t\t\tback[i] = FastMath.pow(minV[i], 3) / 3d;\n\t\t\tprod *= ( ((front[i]+1)-mid[i])+back[i] );\n\t\t}\n\t\t\n\t\treturn prod;\n\t}", "public static double jaccard (Set<String> values1, Set<String> values2) {\t\n\t\t\n\t\tfinal int termsInString1 = values1.size();\t\t\n\t\tfinal int termsInString2 = values2.size();\n\t\t\t\t\n\t\t//now combine the sets\n\t\tvalues1.addAll(values2);\n\t\tfinal int commonTerms = (termsInString1 + termsInString2) - values1.size();\n\t\t\n\t\t//return JaccardSimilarity\n\t\treturn (double) (commonTerms) / (double) (values1.size());\n\t}", "public static double similarity(TopicLabel l1,TopicLabel l2)\n\t{\n\t\tdouble sim = 0;\n\t\tint i = 0;\n\t\tfor(String w: l2.listWords)\n\t\t{\n\t\t\tif(l1.listWords.contains(w))\n\t\t\t{\n\t\t\t\tint j = l1.listWords.indexOf(w);\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/ l1.Pw_given_l.get(j));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsim += l2.Pw_given_l.get(i) * Math.log( l2.Pw_given_l.get(i)/Config.EPSELON);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sim;\n\t}", "public abstract void set(T first, T second, Double similarity);", "public double similarity(String word,String word2) {\n if(word.equals(word2))\n return 1.0;\n\n INDArray vector = Transforms.unitVec(getWordVectorMatrix(word));\n INDArray vector2 = Transforms.unitVec(getWordVectorMatrix(word2));\n if(vector == null || vector2 == null)\n return -1;\n return Nd4j.getBlasWrapper().dot(vector,vector2);\n }", "private float calculateSimilarityScore(int numOfSuspiciousNodesInA, int numOfSuspiciousNodesInB) {\n\t\t// calculate the similarity score\n\t\treturn (float) (numOfSuspiciousNodesInA + numOfSuspiciousNodesInB) \n\t\t\t\t/ (programANodeList.size() + programBNodeList.size()) * 100;\n\t}", "public void getCosineSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n//\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += userRate * list.get(j).getValue();\r\n\t\t\t\t\t\tb += userRate * userRate;\r\n\t\t\t\t\t\tc += list.get(j).getValue() * list.get(j).getValue();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && b == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && c != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\r\n\tpublic double getTwoDiseaseSimilarity(String omimId1, String omimId2) {\r\n\t\tdouble similarity = (1 - alpha) * firstDiseaseSimilarity.getTwoDiseaseSimilarity(omimId1, omimId2);\r\n\t\tsimilarity += alpha * secondDiseaseSimilarity.getTwoDiseaseSimilarity(omimId1, omimId2);\r\n\t\t\r\n\t\treturn similarity;\r\n\t}", "public ArrayList<ResourceType> calculateResourceTypeSimilarity(String requestedResourceTypeName){\r\n\t\tArrayList<ResourceType> resourceTypeArray = new ArrayList<ResourceType>();\r\n\t\tResourceType resourceType;\r\n\t\tArrayList<ResourceType> resourceTypeSimilarityArray = new ArrayList<ResourceType>();\r\n\r\n\t\t//get resource type information contents\r\n\t\tString line1;\r\n\t String line2;\r\n\t String line3;\r\n\t\tFile file = new File(\"D:/Workspace_J2EE/SECoG/Data/ResourceType/ResourceTypeInformationContents.txt\");\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(file))) {\r\n\t\t while ((line1 = br.readLine()) != null) {\r\n\t\t \tline2 = br.readLine();\r\n\t\t \tline3 = br.readLine();\r\n\t\t \tresourceType = new ResourceType(line1, line2, Float.parseFloat(line3));\r\n\t\t \t//System.out.println(\"line1,2,3 is: \" + line1 + \", \" + line2 + \", \" + line3);\r\n\t\t \t\r\n\t\t \tresourceTypeArray.add(resourceType);\r\n\t\t }\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//get requested resource type index\r\n\t\tint requestedResourceTypeIndex = 0;\r\n\t\tfor(int i=1; i<resourceTypeArray.size(); i++){\r\n\t\t\t//System.out.println(resourceTypeArray.get(i).name);\r\n\t\t\tif(requestedResourceTypeName.equals(resourceTypeArray.get(i).name)){\r\n\t\t\t\trequestedResourceTypeIndex = i;\r\n\t\t\t\t//System.out.println(\"The requestedResourceTypeIndex is: \" + requestedResourceTypeIndex);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate resource type similarity\r\n\t\tfor(int i=1; i<resourceTypeArray.size(); i++){\r\n\t\t\t//System.out.println(\"Comparison object is: \" + resourceTypeArray.get(i).name);\r\n\t\t\t/*if(i==requestedResourceTypeIndex){\r\n\t\t\t\tcontinue;\r\n\t\t\t}*/\r\n\t\t\t//System.out.println(\"Comparison object hierarchy is: \" + resourceTypeArray.get(i).hierarchy);\r\n\t\t\t\r\n\t\t\t//get nearest common parent node\r\n\t\t\tString requestedHierarchy = resourceTypeArray.get(requestedResourceTypeIndex).hierarchy;\r\n\t\t\tString currentHierarchy = resourceTypeArray.get(i).hierarchy;\r\n\t\t\tString commonParentHierchary = \"\";\r\n\t\t\t\r\n\t\t\tfor(int j=1; j<=Math.min(requestedHierarchy.length(), currentHierarchy.length()); j++){\r\n\t\t\t\tString subRequest = requestedHierarchy.substring(0, j);\r\n\t\t\t\tString subCurrent = currentHierarchy.substring(0, j);\r\n\t\t\t\t\r\n\t\t\t\tif(!subRequest.equals(subCurrent)){\r\n\t\t\t\t\tcommonParentHierchary = requestedHierarchy.substring(0, j-1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else if(j == Math.min(requestedHierarchy.length(),currentHierarchy.length())){\r\n\t\t\t\t\tcommonParentHierchary = requestedHierarchy.substring(0, j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//System.out.println(\"commonParentHierchary is: \" + commonParentHierchary);\r\n\t\t\t\r\n\t\t\t//get the similarity\r\n\t\t\tResourceType resourceTypeSimilarity;\r\n\t\t\tfor(int m=0; m<resourceTypeArray.size(); m++){\r\n\t\t\t\tcurrentHierarchy = resourceTypeArray.get(m).hierarchy;\r\n\t\t\t\t//System.out.println(\"current hierarchy is: \" + currentHierarchy);\r\n\t\t\t\t\r\n\t\t\t\tif(currentHierarchy.equals(commonParentHierchary)){\r\n\t\t\t\t\tresourceTypeSimilarity = new ResourceType(resourceTypeArray.get(i).name, resourceTypeArray.get(i).hierarchy, resourceTypeArray.get(m).informationContent);\r\n\t\t\t\t\t//System.out.println(\"currentSimilarity is: \" + currentSimilarity);\r\n\t\t\t\t\t\r\n\t\t\t\t\tresourceTypeSimilarityArray.add(resourceTypeSimilarity);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn resourceTypeSimilarityArray;\t\t\r\n\t}", "public static double computeSimilarity(int paraUser1, int paraUser2) {\r\n\r\n\t\tdouble tempSimilarity = 0;\r\n\t\t\r\n\t\tif (userDegree[paraUser1] == 0) {\r\n\t\t\ttempSimilarity = 0;\r\n\t\t}//Of if\r\n\t\tif (userDegree[paraUser2] == 0) {\r\n\t\t\ttempSimilarity = 0;\r\n\t\t}//Of if\r\n\t\t\r\n\t\t\t// 1.by Manhattan-distance\r\n\t\t\t//tempSimilarity = computeMahSimilarity(paraUser1, paraUser2);\r\n\r\n\t\t\t// 2.Jccard-similarity\r\n\t\t\ttempSimilarity = computeJacSimilarity(paraUser1, paraUser2);\r\n\t\r\n\t\treturn tempSimilarity;\r\n\t}", "protected double computeCosineSimilarity(List<float[]> listVector1, List<float[]> listVector2)\r\n {\r\n if (listVector1.size() < 1 || listVector2.size() < 1) {\r\n return 0.f;\r\n }\r\n INDArray averageVector1 = computeVectorAverage(listVector1);\r\n INDArray averageVector2 = computeVectorAverage(listVector2);\r\n\r\n double similarity = Transforms.cosineSim(averageVector1, averageVector2);\r\n\r\n return similarity;\r\n }", "public double cosineSimilarity(double[] docVector1, double[] docVector2) \r\n {\r\n double dotProduct = 0.0;\r\n double magnitude1 = 0.0;\r\n double magnitude2 = 0.0;\r\n double cosineSimilarity = 0.0;\r\n \r\n for (int i = 0; i < docVector1.length; i++) //docVector1 and docVector2 must be of same length\r\n {\r\n dotProduct += docVector1[i] * docVector2[i]; //a.b\r\n magnitude1 += Math.pow(docVector1[i], 2); //(a^2)\r\n magnitude2 += Math.pow(docVector2[i], 2); //(b^2)\r\n }\r\n \r\n magnitude1 = Math.sqrt(magnitude1);//sqrt(a^2)\r\n magnitude2 = Math.sqrt(magnitude2);//sqrt(b^2)\r\n \r\n if (magnitude1 != 0.0 | magnitude2 != 0.0)\r\n {\r\n cosineSimilarity = dotProduct / (magnitude1 * magnitude2);\r\n } \r\n else\r\n {\r\n return 0.0;\r\n }\r\n return cosineSimilarity;\r\n }", "boolean similarCard(Card c);", "public double getSimilarityMetric(String word1, String word2) {\n\t\t// given two words, this function computes two measures of similarity\n\t\t// and returns the average\n\t\tint l1 = word1.length();\n\t\tint l2 = word2.length();\n\t\tint lmin = Math.min(l1, l2);\n\t\tint leftSimilarity = 0;\n\t\tint rightSimilarity = 0;\n\n\t\t// calculate leftSimilarity\n\t\tfor(int i = 0; i < lmin; i++) {\n\t\t\tif(word1.charAt(i) == word2.charAt(i)) {\n\t\t\t\tleftSimilarity += 1;\n\t\t\t}\n\t\t}\n\n\t\t// calculate rightSimilarity\n\t\tfor(int j = 0; j < lmin; j++) {\n\t\t\tif(word1.charAt(l1-j-1) == word2.charAt(l2-j-1)) {\n\t\t\t\trightSimilarity += 1;\n\t\t\t}\n\t\t}\n\t\treturn (leftSimilarity + rightSimilarity)/2.0;\n\t}", "public static double getExamplePairSimilarityScore(Example ex1, Example ex2, List<String> idKeys)\n\t{\n\t\tdouble totalScore = 0.0;\n\t\t\n\t\tfor(String idKey : idKeys) {\n\t\t\tString val1 = ex1.getValueForAttribute(idKey);\n\t\t\tString val2 = ex2.getValueForAttribute(idKey);\n\t\t\ttotalScore += getTwoWaySimilarityScore(val1, val2, null);\n\t\t}\n\t\t\n\t\treturn (totalScore/(double)(idKeys.size()));\n\t}", "public void calculate(Set<Article> articles) {\n \n Set<ArticleDocument> articleDocuments = new HashSet<>();\n for (Article article : articles) {\n articleDocuments.add(article.getDocument());\n }\n \n VSMDocument positiveWords = new TextDocument(\"positive_words.txt\");\n VSMDocument negativeWords = new TextDocument(\"negative_words.txt\");\n \n ArrayList<VSMDocument> documents = new ArrayList<VSMDocument>();\n documents.add(positiveWords);\n documents.add(negativeWords);\n documents.addAll(articleDocuments);\n \n Corpus corpus = new Corpus(documents);\n \n VectorSpaceModel vectorSpace = new VectorSpaceModel(corpus);\n \n double totalPositive = 0;\n double totalNegative = 0;\n \n \n for(ArticleDocument articleDoc : articleDocuments) {\n VSMDocument doc = (VSMDocument) articleDoc;\n System.out.println(\"\\nComparing to \" + doc);\n double positive = vectorSpace.cosineSimilarity(positiveWords, doc);\n double negative = vectorSpace.cosineSimilarity(negativeWords, doc);\n System.out.println(\"Positive: \" + positive);\n System.out.println(\"Negative: \" + negative);\n if (!Double.isNaN(positive)) {\n totalPositive += positive;\n }\n if (!Double.isNaN(negative)) {\n totalNegative += negative;\n }\n double difference = positive - negative;\n if (difference >= 0) {\n System.out.println(\"More positive by \" + difference);\n } else {\n System.out.println(\"More negative by \" + Math.abs(difference));\n }\n \n if (positive >= mostPositive) {\n mostPositive = positive;\n mostPositiveDoc = doc;\n }\n if (negative >= mostNegative) {\n mostNegative = negative;\n mostNegativeDoc = doc;\n }\n if (Math.abs(difference) >= Math.abs(biggestDifference)) {\n biggestDifference = difference;\n biggestDifferenceDoc = doc;\n }\n \n String publisher = articleDoc.getPublisher();\n String region = articleDoc.getRegion();\n LocalDate day = articleDoc.getDate().toLocalDate();\n DayOfWeek weekday = day.getDayOfWeek();\n if (!Double.isNaN(positive)) {\n if (publisherOptimism.containsKey(publisher)) {\n publisherOptimism.get(publisher).add(positive);\n } else {\n publisherOptimism.put(publisher, new LinkedList<Double>());\n publisherOptimism.get(publisher).add(positive);\n }\n \n if (publisherPessimism.containsKey(publisher)) {\n publisherPessimism.get(publisher).add(negative);\n } else {\n publisherPessimism.put(publisher, new LinkedList<Double>());\n publisherPessimism.get(publisher).add(negative);\n }\n \n if (regionOptimism.containsKey(region)) {\n regionOptimism.get(region).add(positive);\n } else {\n regionOptimism.put(region, new LinkedList<Double>());\n regionOptimism.get(region).add(positive);\n }\n \n if (regionPessimism.containsKey(region)) {\n regionPessimism.get(region).add(negative);\n } else {\n regionPessimism.put(region, new LinkedList<Double>());\n regionPessimism.get(region).add(negative);\n }\n \n if (dayOptimism.containsKey(day)) {\n dayOptimism.get(day).add(positive);\n } else {\n dayOptimism.put(day, new LinkedList<Double>());\n dayOptimism.get(day).add(positive);\n }\n \n if (dayPessimism.containsKey(day)) {\n dayPessimism.get(day).add(negative);\n } else {\n dayPessimism.put(day, new LinkedList<Double>());\n dayPessimism.get(day).add(negative);\n }\n \n if (weekdayOptimism.containsKey(weekday)) {\n weekdayOptimism.get(weekday).add(positive);\n } else {\n weekdayOptimism.put(weekday, new LinkedList<Double>());\n weekdayOptimism.get(weekday).add(positive);\n }\n \n if (weekdayPessimism.containsKey(weekday)) {\n weekdayPessimism.get(weekday).add(negative);\n } else {\n weekdayPessimism.put(weekday, new LinkedList<Double>());\n weekdayPessimism.get(weekday).add(negative);\n }\n }\n }\n \n size = articleDocuments.size();\n avgPositive = totalPositive / size;\n avgNegative = totalNegative / size;\n printInfo();\n }", "public double averageCosineSimilarity() {\n\n\t\tdouble sumCosineSimilarities = 0;\n\t\tdouble nDistances = popSize * popSize;\n\t\t// double distance = 0;\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tfor (int j = 0; j < popSize; j++){\n\t\t\t\tIndividual oneIndividual = getIndividualAtIndex(i);\n\t\t\t\tIndividual otherIndividual = getIndividualAtIndex(j);\n\t\t\t\tdouble[] genotypeOneIndidivual = oneIndividual.getGenotype();\n\t\t\t\tdouble[] genotypeOtherIndidivual = otherIndividual.getGenotype();\n\t\t\t\tdouble similarity = cosineSimilarityMetric(genotypeOneIndidivual, genotypeOtherIndidivual);\n\t\t\t\tsumCosineSimilarities += similarity;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\tSystem.out.println(sumCosineSimilarities);\n\t\t// double average = sumEuclideanDistances / nDistances;\n\n\t\treturn sumCosineSimilarities / nDistances;\n\t}", "public List<ModelingSubmissionComparisonDTO> compareSubmissions(List<ModelingSubmission> modelingSubmissions, double minimumSimilarity, int minimumModelSize,\n int minimumScore) {\n\n Map<UMLDiagram, ModelingSubmission> models = new HashMap<>();\n ObjectMapper objectMapper = new ObjectMapper();\n\n for (var modelingSubmission : modelingSubmissions) {\n if (!modelingSubmission.isEmpty(objectMapper)) {\n try {\n log.debug(\"Build UML diagram from json\");\n UMLDiagram model = UMLModelParser.buildModelFromJSON(parseString(modelingSubmission.getModel()).getAsJsonObject(), modelingSubmission.getId());\n if (model.getAllModelElements().size() >= minimumModelSize) {\n models.put(model, modelingSubmission);\n }\n }\n catch (IOException e) {\n log.error(\"Parsing the modeling submission \" + modelingSubmission.getId() + \" did throw an exception:\", e);\n }\n }\n }\n\n log.info(\"Found \" + models.size() + \" modeling submissions with at least \" + minimumModelSize + \" elements to compare\");\n\n final List<ModelingSubmissionComparisonDTO> comparisonResults = new ArrayList<>();\n\n var nonEmptyModelsList = new ArrayList<>(models.keySet());\n\n // it is intended to use the classic for loop here, because we only want to check similarity between two different submissions once\n for (int i = 0; i < nonEmptyModelsList.size(); i++) {\n for (int j = i + 1; j < nonEmptyModelsList.size(); j++) {\n var model1 = nonEmptyModelsList.get(i);\n var model2 = nonEmptyModelsList.get(j);\n final double similarity = model1.similarity(model2);\n log.debug(\"Compare result \" + i + \" with \" + j + \": \" + similarity);\n if (similarity < minimumSimilarity) {\n // ignore comparison results with too small similarity\n continue;\n }\n\n var submission1 = models.get(model1);\n var submission2 = models.get(model2);\n if (submission1.getResult() != null && submission1.getResult().getScore() != null && submission1.getResult().getScore() < minimumScore\n && submission2.getResult() != null && submission2.getResult().getScore() != null && submission2.getResult().getScore() < minimumModelSize) {\n // ignore comparison results with too small scores\n continue;\n }\n\n log.info(\"Found similar models \" + i + \" with \" + j + \": \" + similarity);\n\n var comparisonResult = new ModelingSubmissionComparisonDTO();\n var element1 = new ModelingSubmissionComparisonElement().submissionId(submission1.getId()).size(model1.getAllModelElements().size());\n var element2 = new ModelingSubmissionComparisonElement().submissionId(submission2.getId()).size(model2.getAllModelElements().size());\n element1.studentLogin(((StudentParticipation) submission1.getParticipation()).getParticipantIdentifier());\n element2.studentLogin(((StudentParticipation) submission2.getParticipation()).getParticipantIdentifier());\n comparisonResult.setElement1(element1);\n comparisonResult.setElement2(element2);\n comparisonResult.similarity(similarity);\n if (submission1.getResult() != null) {\n comparisonResult.getElement1().score(submission1.getResult().getScore());\n }\n if (submission2.getResult() != null) {\n comparisonResult.getElement2().score(submission2.getResult().getScore());\n }\n\n comparisonResults.add(comparisonResult);\n }\n }\n\n log.info(\"Found \" + comparisonResults.size() + \" similar modeling submission combinations ( > \" + minimumSimilarity + \")\");\n\n return comparisonResults;\n }", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n match_score *= 100.0f;\n tvFaceMatchScore1.setText(Float.toString(match_score));\n llFaceMatchScore.setVisibility(View.VISIBLE);\n\n }\n }", "public static double similarity(ColorHsv c1,ColorHsv c2){\n LOG.info(\"Ch1,\"+c1.toString()+\",Ch2:\"+c2.toString());\n //\n double avgHue = (c1.H + c2.H)/2;\n double distance = Math.abs(c1.H-avgHue);\n double differ = distance/avgHue;\n LOG.info(\"differ:\"+differ+\"distance:\"+distance+\",avgHue:\"+avgHue);\n return 1.00-differ;\n }", "public String getRelatedSubject (double [] vector){\n VectorSpaceModel vectorSpaceModel = new VectorSpaceModel();\n MongoCursor<Document> cr = subject.find().iterator();\n class similarities implements Comparable<similarities>{\n double sim = 0.0;\n ArrayList<String> docs;\n public similarities(double s,ArrayList<String> d){\n this.sim =s;\n this.docs = d;\n }\n @Override\n public int compareTo(similarities s1) {\n if (this.sim < s1.sim) return 1;\n else return -1;\n }\n }\n ArrayList<similarities> sims = new ArrayList<similarities>();\n try {\n while (cr.hasNext()){\n Document sbj = cr.next();\n String tnp = (String)sbj.get(\"spaceVector\");\n ArrayList<String> docs = (ArrayList<String>) sbj.get(\"docs\");\n String [] vct = tnp.split(\",\");\n double[] vec1 = Arrays.stream(vct)\n .mapToDouble(Double::parseDouble)\n .toArray();\n double sim = vectorSpaceModel.getSimilarity(vec1,vector);\n if (sim>0.55){\n sims.add(new similarities(sim,docs));\n\n }\n }\n\n}\n finally {\n // cr.close();\n }\n Collections.sort(sims);\n String result = \"{\\\"docs\\\":[\";\n for(similarities sim:sims){\n System.out.println(sim.docs);\n System.out.println(sim.sim);\n result+=\"{\\\"sim\\\":\"+sim.sim+\",\\\"docs\\\":[\";\n for(String doc:sim.docs){\n result+=\"\\\"\"+doc+\"\\\",\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]},\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]}\";\n return result;\n}", "static double calculateJaccardSimilarity(Set<String> queryTermIdSet, Set<String> documentTermIdSet) {\n if (queryTermIdSet.isEmpty() || documentTermIdSet.isEmpty()) {\n return 0;\n }\n\n // Intersection between QUERY termId set and DOCUMENT termId set\n Set<String> intersect = new HashSet<>(queryTermIdSet);\n intersect.retainAll(documentTermIdSet);\n\n // Union of DOCUMENT termId set and QUERY term Id set\n Set<String> union = new HashSet<>(documentTermIdSet);\n union.addAll(queryTermIdSet);\n\n // System.out.println();\n // System.out.println(\"Query:\" + queryTermIdSet);\n // System.out.println(\"Doc:\" + documentTermIdSet);\n // System.out.println(\"Intersect: \" + intersect.size() + \"\\tUnion: \" + union.size());\n return (double) intersect.size() / (double) union.size();\n }", "public List<OWLObject> search(OWLObject queryObj) {\n\t\tList<OWLObject> hits = new ArrayList<OWLObject>(maxHits);\n\t\tSystem.out.println(\"gettings atts for \"+queryObj+\" -- \"+simEngine.comparisonProperty);\n\t\tSet<OWLObject> atts = simEngine.getAttributeClosureFor(queryObj);\n\t\tSystem.out.println(\"all atts: \"+atts.size());\n\t\tif (atts.size() == 0)\n\t\t\treturn hits;\n\t\t\n\t\t// only compare using significant atts;\n\t\t// we don't do the same test on candidates as these will be removed by the\n\t\t// intersection operation. they will have a small effect on the score, as\n\t\t// we don't divide by the union, but instead the sum of sizes\n\t\tatts = filterNonSignificantAttributes(atts);\n\t\tSystem.out.println(\"filtered atts: \"+atts.size());\n\n\t\t//bloomFilter = new BloomFilter<OWLObject>(0.05, atts.size());\n\t\t//bloomFilter.addAll(atts);\n\t\t\t\t\n\t\tSortedMap<Integer,Set<OWLObject>> scoreCandidateMap = new TreeMap<Integer,Set<OWLObject>>();\n\t\t\n\t\tfor (OWLObject candidate : getCandidates()) {\n\t\t\tif (candidate.equals(queryObj))\n\t\t\t\tcontinue;\n\t\t\tSet<OWLObject> iAtts = simEngine.getAttributeClosureFor(candidate);\n\t\t\t//Set<OWLObject> iAtts = simEngine.getGraph().getAncestors(candidate);\n\n\t\t\tif (iAtts.size() == 0)\n\t\t\t\tcontinue;\n\t\t\tint cAttsSize = iAtts.size();\n\t\n\t\t\tiAtts.retainAll(atts);\n\t\t\t//Collection<OWLObject> iAtts = bloomFilter.intersection(cAtts);\n\t\t\t\n\t\t\t// simJ, one-sided, scaled by 1000\n\t\t\t// negate to ensure largest first\n\t\t\t//Integer score = - (iAtts.size() * 1000 / cAttsSize);\n\t\t\t\n\t\t\t// this biases us towards genes with large numbers of annotations,\n\t\t\t// but it is better at finding the models that share all features\n\t\t\tInteger score = - iAtts.size();\n\t\t\tif (!scoreCandidateMap.containsKey(score)) \n\t\t\t\tscoreCandidateMap.put(score, new HashSet<OWLObject>());\n\t\t\tscoreCandidateMap.get(score).add(candidate);\n\t\t\treporter.report(this,\"query_candidate_overlap_total\",queryObj,candidate,iAtts.size(),cAttsSize);\n\t\t}\n\t\t\n\t\tint n = 0;\n\t\tfor (Set<OWLObject> cs : scoreCandidateMap.values()) {\n\t\t\tn += cs.size();\n\t\t\thits.addAll(cs);\n\t\t}\n\t\t\n\t\tn = 0;\n\t\tfor (OWLObject hit : hits) {\n\t\t\tn++;\n\t\t\treporter.report(this,\"query_hit_rank_threshold\",queryObj,hit,n,maxHits);\n\t\t}\n\t\tif (hits.size() > maxHits)\n\t\t\thits = hits.subList(0, maxHits);\n\t\t\n\n\n\t\treturn hits;\n\t}", "public double distance(V a, V b);", "public static double computeMahSimilarity(int paraFirstUser, int paraSecondUser) {\r\n\t\tint tempItems = GraphDataInfo.itemNum;\r\n\t\tdouble tempDistance = 0;\r\n\t\tdouble tempSimilarity = 0;\r\n\r\n\t\t// Similarity after sorting\r\n\t\tfor (int i = 0; i < tempItems; i++) {\r\n\t\t\ttempDistance += Math.abs(trainData[paraFirstUser][i] - trainData[paraSecondUser][i]);\r\n\t\t}\r\n\r\n\t\ttempSimilarity = (tempItems * rateDistance - tempDistance) / (tempItems * rateDistance);\r\n//\t\tSystem.out.println(\r\n//\t\t\t\t\"The similarity of user-\" + paraFirstUser + \" and user-\" + paraSecondUser + \" is \" + tempSimilarity);\r\n\t\treturn tempSimilarity;\r\n\t}", "private double getDistance(DataObject o1, DataObject o2) {\n\t\tdouble distance = 0.0;\n\t\tdistance = (o1.getYear() - o2.getYear())\n\t\t\t\t* (o1.getYear() - o2.getYear())\n\t\t\t\t+ (o1.getRatio1() - o2.getRatio1())\n\t\t\t\t* (o1.getRatio1() - o2.getRatio1())\n\t\t\t\t+ (o1.getRatio2() - o2.getRatio2())\n\t\t\t\t* (o1.getRatio2() - o2.getRatio2());\n\t\treturn distance;\n\t}", "public interface SimilarityCalculator {\n\n /**\n * Calculates similarity between query and document.\n *\n * @param documentId Id of document.\n * @return Similarity.\n */\n double calculateScore(String documentId);\n}", "public double distance(Customer i, Customer j);", "public void similar(String tableName, String name) {\n String simName = null;\n float score = 11;\n float val = 0;\n int simCount = 0;\n if (tableName.equals(\"reviewer\")) {\n if (matrix.getReviewers().contains(name) != null) {\n // Node with the reference to the list we are comparing other\n // lists to\n ReviewerList.Node n = matrix.getReviewers().contains(name);\n // Gets the head to the DLList that we are comparing other lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n ReviewerList.Node n1 = matrix.getReviewers().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n RDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n node = n.getList().getHead();\n // Going through this list to find matching movies in\n // simList\n while (node != null) {\n simNode = simList.containsMovie(node\n .getMovieName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextMovie();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getReviewerName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n\n printSimilar(\"reviewer\", name, simName, score);\n }\n else {\n System.out.println(\"Reviewer |\" + name\n + \"| not found in the database.\");\n }\n }\n else {\n if (matrix.getMovies().contains(name) != null) {\n // Node with the reference to the list we are comparing\n // other lists to\n MSLList.Node n = matrix.getMovies().contains(name);\n // Gets the head to the DLList that we are comparing other\n // lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n MSLList.Node n1 = matrix.getMovies().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n MDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n // Going through this list to find matching movies\n // in simList\n node = n.getList().getHead();\n while (node != null) {\n simNode = simList.containsReviewer(node\n .getReviewerName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextReviewer();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getMovieName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n printSimilar(\"movie\", name, simName, score);\n }\n else {\n System.out.println(\"Movie |\" + name\n + \"| not found in the database.\");\n }\n }\n }", "public String getRelatedSubjectByPknows (double [] vector,String[] knowns){\n VectorSpaceModel vectorSpaceModel = new VectorSpaceModel();\n MongoCursor<Document> cr = subject.find().iterator();\n class similarities implements Comparable<similarities>{\n double sim = 0.0;\n ArrayList<String> docs;\n String skills;\n String name;\n\n public similarities(double s,ArrayList<String> d,String sk,String name){\n this.sim =s;\n this.docs = d;\n this.skills = sk;\n this.name = name;\n }\n @Override\n public int compareTo(similarities s1) {\n if (this.sim < s1.sim) return 1;\n else return -1;\n }\n }\n ArrayList<similarities> sims = new ArrayList<similarities>();\n ArrayList<Double> knowns_vector =new ArrayList<Double>() ;\n\n try {\n while (cr.hasNext()){\n Document sbj = cr.next();\n String tnp = (String)sbj.get(\"spaceVector\");\n String skills = (String)sbj.get(\"skills\");\n String [] doc_skills = skills.split(\",\");\n System.out.println(\"doc_skills\"+doc_skills[0]+(String)sbj.get(\"id\"));\n /* check length of docs knows and user skills in other having same vector length*/\n if (knowns.length>=doc_skills.length){\n /* Init ouput vector to need dimension */\n for (int i=0;i<knowns.length;i++){\n knowns_vector.add(i,new Double(0.0));\n }\n /* get skills of doc related to pknows */\n System.out.println(\"knows larger\");\n for (int i = 0; i<knowns.length;i++){\n if (knowns[i]!=null){\n\n int ind = Arrays.asList(doc_skills).indexOf(knowns[i]);\n if (ind!=-1){\n System.out.println(\"knows checking \"+knowns[i]+\" \"+skills);\n System.out.println(\"barruan \"+ind+\" \"+vector[i]);\n knowns_vector.add(ind,new Double(vector[i]));\n }\n else knowns_vector.add(new Double(0.0));\n }\n }\n }\n else {\n /* Init ouput vector to need dimension */\n for (int j=0;j<doc_skills.length;j++){\n knowns_vector.add(j,new Double(0.0));\n }\n for (int i = 0; i<knowns.length;i++){\n\t for (int x = 0 ; x<doc_skills.length;x++){\n\t\tif (doc_skills[x].equals(knowns[i])) knowns_vector.add(x,new Double(vector[i]));\n\t\telse knowns_vector.add(x,new Double(0.0));\n \n\t\t\t\n }\n }\n }\n ArrayList<String> docs = (ArrayList<String>) sbj.get(\"docs\");\n String [] vct = tnp.split(\",\");\n double[] vec1 = Arrays.stream(vct)\n .mapToDouble(Double::parseDouble)\n .toArray();\n double[] knowns_vector1 = knowns_vector.stream().mapToDouble(Double::doubleValue).toArray();\n\n double sim = vectorSpaceModel.getSimilarity(vec1,knowns_vector1);\n System.out.println(sim);\n if (sim>0.09){\n sims.add(new similarities(sim,docs,skills,(String)sbj.get(\"id\")));\n\n }\n }\n\n}\n finally {\n // cr.close();\n }\n Collections.sort(sims);\n String result = \"{\\\"docs\\\":[\";\n for(similarities sim:sims){\n System.out.println(sim.docs);\n System.out.println(sim.sim);\n result+=\"{\\\"name\\\":\\\"\"+sim.name+\"\\\",\\\"sim\\\":\"+sim.sim+\",\\\"skills\\\":\\\"\"+sim.skills+\"\\\",\\\"docs\\\":[\";\n for(String doc:sim.docs){\n result+=\"\\\"\"+doc+\"\\\",\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]},\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]}\";\n if (sims.size() ==0) return \"{\\\"docs\\\":[]}\";\n return result;\n}", "public double similitudPearson(Pelicula i1, Pelicula i2, ArrayList<Long> test){\r\n // Variables auxiliares:\r\n double norma1 = 0;\r\n double norma2 = 0;\r\n int val1;\r\n int val2;\r\n Long key;\r\n double numerador = 0;\r\n double media1 = i1.getMedia();\r\n double media2 = i2.getMedia();\r\n \r\n // 1. Nos quedamos con la películas que tenga menos valoraciones.\r\n if (i1.getValoraciones().size() < i2.getValoraciones().size()){\r\n for (Map.Entry<Long,Valoracion> e : i1.getValoraciones().entrySet()) {\r\n key = e.getKey();\r\n // 2. Descartamos los usuarios de la partición test.\r\n if (!test.contains(key)){\r\n // 3. Comprobamos que la otra película haya sido valorada por el mismo usuario.\r\n if (i2.getValoraciones().containsKey(key)){\r\n // 4. Realizamos los cálculos de similitud.\r\n val1 = e.getValue().getValor();\r\n val2 = i2.getValoraciones().get(key).getValor();\r\n\r\n norma1 = norma1 + (val1 - media1)*(val1 - media1);\r\n norma2 = norma2 + (val2 - media2)*(val2 - media2);\r\n\r\n numerador = numerador + (val1 - media1)*(val2 - media2);\r\n }\r\n }\r\n }\r\n }else{\r\n for (Map.Entry<Long,Valoracion> e : i2.getValoraciones().entrySet()) {\r\n key = e.getKey();\r\n if (!test.contains(key)){\r\n if (i1.getValoraciones().containsKey(key)){\r\n val2 = e.getValue().getValor();\r\n val1 = i1.getValoraciones().get(key).getValor();\r\n\r\n norma1 = norma1 + (val1 - media1)*(val1 - media1);\r\n norma2 = norma2 + (val2 - media2)*(val2 - media2);\r\n\r\n numerador = numerador + (val1 - media1)*(val2 - media2);\r\n }\r\n }\r\n }\r\n }\r\n \r\n if (norma1 != 0 && norma2 !=0){\r\n double sim = numerador / (Math.sqrt(norma1*norma2)) ;\r\n sim = (sim + 1)/2;\r\n if (sim > 1){\r\n return 1;\r\n }\r\n return sim;\r\n }else{\r\n return 0;\r\n }\r\n \r\n }", "public static void demo_SimilarityMetrics(RoWordNet RoWN, String textCorpus_FilePath) throws Exception {\n boolean allowAllRelations = true;\n\n Literal l1 = new Literal(\"salvare\");\n Literal l2 = new Literal(\"dotare\");\n String id1 = RoWN.getSynsetsFromLiteral(l1).get(0).getId();\n String id2 = RoWN.getSynsetsFromLiteral(l2).get(0).getId();\n Synset s1, s2;\n\n s1 = RoWN.getSynsetById(id1);\n s2 = RoWN.getSynsetById(id2);\n\n IO.outln(\"Computed IC for synset_1: \" + s1.getInformationContent());\n IO.outln(\"Computed IC for synset_2: \" + s2.getInformationContent());\n IO.outln(\"Custom distance: \" + SimilarityMetrics.distance(RoWN, s1\n .getId(), s2.getId(), true, null));\n IO.outln(\"Custom hypernymy distance: \" + SimilarityMetrics\n .distance(RoWN, s1.getId(), s2.getId()));\n\n IO.outln(\"Sim Resnik: \" + SimilarityMetrics.Resnik(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim Lin: \" + SimilarityMetrics.Lin(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim JCN: \" + SimilarityMetrics.JiangConrath(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Dist JCN: \" + SimilarityMetrics\n .JiangConrath_distance(RoWN, s1.getId(), s2.getId(), allowAllRelations));\n }", "public int compare(Object obj) {\n\t\t\tint score = 0;\n\t\t\t\n\t\t\tfor(int c = 0; c < classes.size(); c++){\n\t\t\t\t\n\t\t\t\tif(obj.classes.get(c).center == this.classes.get(c).center\n\t\t\t\t\t\t&& !featureClasses.get(c).ignore()){\n\t\t\t\t\t\n\t\t\t\t\tscore ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn score;\n\t\t}", "public static double jaccardSimilarity(int n, CharSequence a, CharSequence b) {\n Set<ComparableCharSequence> agrams = new HashSet<>(toNGrams(true, n, a));\n Set<ComparableCharSequence> bgrams = new HashSet<>(toNGrams(true, n, b));\n if (agrams.isEmpty() || bgrams.isEmpty()) {\n return 0;\n }\n Set<ComparableCharSequence> isect = new HashSet<>(agrams);\n isect.retainAll(bgrams);\n Set<ComparableCharSequence> union = new HashSet<>(agrams);\n union.addAll(bgrams);\n return (double) isect.size() / (double) union.size();\n }", "public void setSimilarity(float value) {\n this.similarity = value;\n }", "private int getShapesMeasures(Collection<ModelElementInstance> shapes){\n\t\tint toReturn = 0;\n\t\tfor (ModelElementInstance s: shapes){\n\t\t\tBpmnShape firstShape = (BpmnShape) s;\t\n\t\t\tfor (ModelElementInstance t: shapes){\n\t\t\t\tBpmnShape secondShape = (BpmnShape) t;\n\t\t\t\tif (!firstShape.equals(secondShape)) {\n\t\t\t\t\tif(this.isOverlapped(firstShape, secondShape))\n\t\t\t\t\t\ttoReturn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn toReturn/2;\n\t}", "public static float calcSimilarity(Map<String, Enum> first, Map<String, Enum> second) {\n if (first == null && second == null) return 1f;\n Set<String> allKeys = new HashSet<>();\n\n if (first != null) allKeys.addAll(first.keySet());\n if (second != null) allKeys.addAll(second.keySet());\n\n int normDiv = 0;\n float sum = 0;\n for (String key : allKeys) {\n Enum thisEnum = first != null ? first.get(key) : null;\n Enum otherEnum = second != null ? second.get(key) : null;\n PhAttribType phA = getAllPhAttribTypes().get(key);\n try {\n sum += phA.calcSimilarity(thisEnum, otherEnum) * phA.getWeight();\n normDiv++;\n } catch (AttribTypeNotComparableException ncE) {\n System.err.println(\"NotComparableException: \" + ncE);\n }\n }\n if (sum == 0) return 0;\n return sum / normDiv;\n }", "private static void calculateSimilarity(Map<String, Double> validInput, Map<String, Integer[]> vocabulary,\r\n\t\t\tMap<Path, Vector> freqVectors) {\r\n\t\tif (validInput.isEmpty()) {\r\n\t\t\tSystem.out.println(\"Input contained no valid keywords\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tresultFiles = new LinkedHashMap<>();\r\n\t\tVector vector = new Vector(vocabulary.size());\r\n\t\tfor (Map.Entry<String, Double> entry : validInput.entrySet()) {\r\n\t\t\tint index = vocabulary.get(entry.getKey())[0];\r\n\t\t\tdouble result = entry.getValue() * idfVectors.get(entry.getKey());\r\n\t\t\tvector.setValueAt(index, result);\r\n\t\t}\r\n\t\t\r\n\t\tfor (Map.Entry<Path, Vector> e : freqVectors.entrySet()) {\r\n\t\t\tdouble result = vector.cosAngle(e.getValue());\r\n\t\t\tresultFiles.put(e.getKey(), result);\r\n\t\t}\r\n\t\t\r\n\t\tresultFiles = sortByValue(resultFiles);\r\n\t}", "public abstract double getDistance(T o1, T o2) throws Exception;", "private double getTverskyScore(Set<String> setOne, Set<String> setTwo) {\n\t\tdouble tverskyScore = 0.0;\n\t\tSet<String> intersectionOfSets = new HashSet<String>(setOne);\n\t\tintersectionOfSets.retainAll(setTwo);\t\t\n\t\t\n\t\tSet<String> differenceOfSets = new HashSet<String>(setOne);\n\t\tdifferenceOfSets.removeAll(setTwo);\n\t\ttverskyScore = (double) intersectionOfSets.size() / (intersectionOfSets.size() + differenceOfSets.size());\n\t\t\n\t\treturn tverskyScore;\n\t}", "public abstract interface Similarity {\n\n /**\n * This is the function that summarizes all the functionality of similarity\n * matching. It computes the total score from the previous level factors\n * multiplied with the appropriate weights.\n *\n * @return The total score of the similarity between document and query.\n */\n public abstract float getScore();\n\n /**\n * This function returns the previous level factors of scoring computation\n *\n * @return\n */\n public abstract Object[] getSimilarityFactors();\n\n}", "@Test\r\n public void testGroupSimilarity() throws Exception {\r\n final List<ICluster> originalCLuster = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster);\r\n List<ICluster> l1 = new ArrayList<ICluster>(originalCLuster);\r\n\r\n final List<ICluster> originalCLuster2 = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster2);\r\n List<ICluster> l2 = new ArrayList<ICluster>(originalCLuster2);\r\n\r\n ClusterListSimilarity cd = new ClusterListSimilarity(distanceMeasure);\r\n final List<ICluster> identical = cd.identicalClusters(l1, l2);\r\n\r\n Assert.assertEquals(originalCLuster.size(), identical.size());\r\n Assert.assertTrue(l1.isEmpty());\r\n Assert.assertTrue(l2.isEmpty());\r\n }", "@Override\n public double score(Map<BasedMining, Map<BasedMining, RateEvent>> preferences,\n BasedMining item1,\n BasedMining item2) {\n var sharedInnerItems = new ArrayList<BasedMining>();\n\n preferences.get(item1).forEach((innerItem, rateEvent) -> {\n if (preferences.get(item2).get(innerItem) != null) {\n sharedInnerItems.add(innerItem);\n }\n });\n\n// If they have no rating in common, return 0\n if (sharedInnerItems.size() > 0)\n return 0;\n\n// Add up the square of all the differences\n var sumOfSquares = preferences.get(item1).entrySet()\n .stream()\n .filter(entry -> preferences.get(item2).get(entry.getKey()) != null)\n .mapToDouble(entry -> Math.pow((entry.getValue().getRating() - preferences.get(item2).get(entry.getKey()).getRating()), 2.0))\n .sum();\n\n return 1 / (1 + sumOfSquares);\n }" ]
[ "0.8039057", "0.7596618", "0.7254353", "0.68127143", "0.657915", "0.6513976", "0.6500995", "0.6463974", "0.64397264", "0.6412153", "0.6362897", "0.6346652", "0.62581545", "0.6238575", "0.62360096", "0.61432654", "0.61239576", "0.6122549", "0.6093304", "0.6087472", "0.6087197", "0.60870147", "0.60717994", "0.60624", "0.6035221", "0.59529954", "0.594496", "0.5919105", "0.5899425", "0.5898613", "0.58927476", "0.5891504", "0.5881656", "0.58677655", "0.5867624", "0.5854027", "0.58447987", "0.5814145", "0.57982504", "0.5781551", "0.5765723", "0.5759108", "0.5754637", "0.5736393", "0.57279617", "0.5726686", "0.57256335", "0.5696119", "0.5667237", "0.5652182", "0.5651336", "0.5607394", "0.5604761", "0.5597213", "0.5595845", "0.55817103", "0.5572106", "0.5550465", "0.5537098", "0.5523969", "0.55050343", "0.54778576", "0.54758835", "0.54744047", "0.5474366", "0.54724175", "0.54524946", "0.54326636", "0.53990656", "0.538856", "0.53884035", "0.5387998", "0.53832227", "0.53671217", "0.535701", "0.535671", "0.53532547", "0.5350777", "0.5347674", "0.53379714", "0.5319882", "0.5280472", "0.5271617", "0.52544296", "0.5243568", "0.52090275", "0.51890093", "0.51870763", "0.51846546", "0.5175559", "0.51651293", "0.51642317", "0.5158939", "0.5156218", "0.514663", "0.5126107", "0.5123599", "0.51200795", "0.5113319", "0.50963783", "0.5094906" ]
0.0
-1
sets the similarity of the provided objects
public abstract void set(T first, T second, Double similarity);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double calculateSimilarity(OWLObject a, OWLObject b);", "public void setSimilarity(float value) {\n this.similarity = value;\n }", "public Future<List<Object>> evaluateSimilarity(Serializable objectUnderComparison, List<Serializable> referenceObjects);", "public Matrix2D executeSimilarity(List<DataObject> dataObjects) {\r\n\t\tint objectsCount = dataObjects.size();\r\n\t\tMatrix2D similarityMatrix = new Matrix2D(objectsCount);\r\n\t\t\r\n\t\tVideoMediaFile video1 = null;\r\n\t\tVideoMediaFile video2 = null;\r\n\t\t\r\n\t\tint p = 0;\r\n\t\tfor (int i = 0; i < objectsCount; i++) {\r\n\t\t\tfor (int j = i + 1; j < objectsCount; j++) {\r\n\t\t\t\tvideo1 = (VideoMediaFile) dataObjects.get(i);\r\n\t\t\t\tvideo2 = (VideoMediaFile) dataObjects.get(j);\r\n\t\t\t\t\r\n\t\t\t\tint similarValues = 0;\r\n\t\t\t\t\r\n\t\t\t\tint featureListSize = video1.getFeatureList().size();\r\n\t\t\t\tfor (int k = 0; k < featureListSize; k++) {\r\n\t\t\t\t\tMetaData video1MetaData = (MetaData) video1.getFeatureList().get(k);\r\n\t\t\t\t\tMetaData video2MetaData = (MetaData) video2.getFeatureList().get(k);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (video1MetaData.getId().equals(\"mediaDuration\") || \r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"mediaFileSize\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"mediaBitrate\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoFramerate\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"timebase\")) {\r\n\t\t\t\t\t\tdouble v1 = Double.valueOf(video1MetaData.getValue()).doubleValue();\r\n\t\t\t\t\t\tdouble v2 = Double.valueOf(video2MetaData.getValue()).doubleValue();\r\n\t\t\t\t\t\tdouble v3;\r\n\t\t\t\t\t\tif (v1 >= v2)\r\n\t\t\t\t\t\t\tv3 = ((v1 / v2) - 1) * 100;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tv3 = ((v2 / v1) - 1) * 100;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (v3 > 5.0)\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse if (video1MetaData.getId().equals(\"numberStreams\") || \r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoWidth\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoHeight\")) {\r\n\t\t\t\t\t\tint v1 = Integer.valueOf(video1MetaData.getValue()).intValue();\r\n\t\t\t\t\t\tint v2 = Integer.valueOf(video2MetaData.getValue()).intValue();\r\n\t\t\t\t\t\tif (v1 == v2)\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (video1MetaData.getId().equals(\"videoCodecType\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"audioCodecType\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"audioLanguage\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"samplerate\")) {\r\n\t\t\t\t\t\tString s1 = video1MetaData.getValue();\r\n\t\t\t\t\t\tString s2 = video1MetaData.getValue();\r\n\t\t\t\t\t\tif (s1.equals(s2))\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Calculate the similarity.\r\n\t\t\t\tdouble result = (double) similarValues / featureListSize;\r\n\t\t\t\tsimilarityMatrix.set(i, j, result);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setProgress((double)++p/objectsCount);\r\n\t\t}\r\n\t\t\r\n\t\treturn similarityMatrix;\r\n\t}", "public float getSimilarity() {\n return similarity;\n }", "@Override\n\tpublic float similarity(PetriNet pn1, PetriNet pn2) {\n\t\treturn similarity((PetriNet) pn1.clone(), (PetriNet) pn2.clone(), 1);\n\t}", "@Override\n public int compareTo(AutocompleteObject o) {\n return Double.compare(o.similarity, similarity);\n }", "@Override\n public double similarity(SimComparator<OEMolBase> other, double minSim)\n { return similarity(other);\n }", "public double getSimilarity()\r\n {\r\n return similarity;\r\n }", "@Override\n protected double calcSimilarity(Cluster a, Cluster b) {\n List<Point> aItems = a.getItems();\n List<Point> bItems = b.getItems();\n\n // calculate the similarity of each item in a with every item in b,\n // save the min value in sim-variable\n double sim = Double.MAX_VALUE;\n for (Point x : aItems) {\n for (Point y : bItems) {\n double currSim = x.distanceTo(y);\n if (currSim < sim) {\n sim = currSim;\n }\n }\n }\n\n return sim;\n }", "public double getSimilarity(Pair<String, String> representations);", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "private static void calculateSimilarity() {\n \tLOG.info(\"Begin calculating spatial similarity between users.\");\n \t\n\t\t// Get a list of all users\n \tNeo4JUserDAO uDao = (Neo4JUserDAO) DAOFactory.instance().getUserDAO();\n\t\tList<Node> users = uDao.findAll();\n\t\t\n\t\tint usersCount = users.size();\n \tLOG.debug(\"Found {} users.\", usersCount);\n\t\t\n\t\t// Instantiate all needed classes for similarity measurement\n\t\tNeo4JSequenceExtractor ex = new Neo4JSequenceExtractor();\n\t\tex.setFromLevel(clArgs.calcSimilarityFromLevel);\n\t\tex.setToLevel(clArgs.calcSimilarityToLevel);\n\t\t\n\t\tNeo4JSequenceMatcher matcher = new Neo4JSequenceMatcher(\n\t\t\t\tclArgs.calcSimilaritySplitThreshold, \n\t\t\t\tclArgs.calcSimilarityMinSequenceLength,\n\t\t\t\tclArgs.calcSimilarityTempConstraintThreshold);\n\t\tNeo4JSimilarityAnalyzer analyzer = new Neo4JSimilarityAnalyzer();\n\t\t\n\t\t// Create matrix that holds similarity results\n\t\tdouble[][] similarityResults = new double[usersCount][usersCount];\n\t\t\n\t\t// Go through all pair-wise user combinations\n \tfor (int i = 0; i < usersCount; i++) {\n\t\t\tNode userOne = users.get(i);\n\t\t\tObject userOneId = uDao.getUserId(userOne);\n\t\t\t\n\t\t\t// Set current first user for sequence extraction\n\t\t\tex.setUserNodeOne(userOne);\n\t\t\t\n\t\t\tfor (int j = i + 1; j < usersCount; j++) {\n\t\t\t\tNode userTwo = users.get(j);\n\t\t\t\tObject userTwoId = uDao.getUserId(userTwo);\n\t\t\t\tLOG.info(\"Calculate similarity between user [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\n\t\t\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\t\t\t// Step 1: Extract cluster sequences of two users based on their hierarchical graphs\n\t\t\t\t// Set current second user for sequence extraction\n\t\t\t\tex.setUserNodeTwo(userTwo);\n\t\t\t\tMap<Integer, SequenceWrapper> clusterSequences = null;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t// Start extraction of cluster sequences\n\t\t\t\t\tLOG.info(\"Step 1: Extraction of cluster sequences from level {} to level {}.\", clArgs.calcSimilarityFromLevel, clArgs.calcSimilarityToLevel);\n\t\t\t\t\tclusterSequences = ex.extract();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(\"An error occurred while extracting the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Step 2: Match the extracted cluster sequences to find maximal length similar sequences\n\t\t\t\tMap<Integer, List<Sequence<SimilarSequenceCluster>>> maxLengthSimilarSequences = null;\n\t\t\t\t\n\t\t\t\t// Matching is only possible if there is a valid result of step 1 \n\t\t\t\tif (clusterSequences != null && !clusterSequences.isEmpty()) {\n\t\t\t\t\tmatcher.setSequencesOnLevel(clusterSequences);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Start matching of cluster sequences\n\t\t\t\t\t\tLOG.info(\"Step 2: Matching of cluster sequences.\");\n\t\t\t\t\t\tmaxLengthSimilarSequences = matcher.match();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLOG.error(\"An error occurred while matching the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t// Step 3: Compute spatial similarity between the current two users\n\t\t\t\t\t// Similarity measurement is only possible with a valid result of step 2\n\t\t\t\t\tif (maxLengthSimilarSequences != null && !maxLengthSimilarSequences.isEmpty()) {\n\t\t\t\t\t\tanalyzer.setUserNodeOne(userOne);\n\t\t\t\t\t\tanalyzer.setUserNodeTwo(userTwo);\n\t\t\t\t\t\tanalyzer.setMaximalLengthSimilarSequencesOnLevel(maxLengthSimilarSequences);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Start similarity measurement\n\t\t\t\t\t\t\tLOG.info(\"Step 3: Similarity measurement.\");\n\t\t\t\t\t\t\tsimilarity = analyzer.analyze();\n\t\t\t\t\t\t\tLOG.debug(\"Final similarity score: {}\", similarity);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Save similarity value in result matrix\n\t\t\t\t\t\t\tsimilarityResults[i][j] = similarity;\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tLOG.error(\"An error occurred while measuring similarity between user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\t// END: step 3\n\t\t\t\t}\t// END: step 2\n\t\t\t}\t// END: user two loop\n\t\t}\t// END: user one loop\n \t\n \tLOG.info(\"Finished calculating spatial similarity.\");\n \t\n \t// Normalize the similarity scores from 0 to 1\n \tif (clArgs.normalization) {\n\t \tLOG.info(\"Normalizing similarity scores.\");\n\t \tsimilarityResults = SimilarityNormalizer.normalize(similarityResults);\n \t}\n \t\n \t// The evaluation is requested\n \tif (clArgs.evaluation) {\n \t\tLOG.info(\"Evaluation is enabled.\");\n \t\t\n \t\t// Calculate simple evaluation\n \t\tLOG.info(\"Calculate similarity evaluation values.\");\n \t\tSimilarityEvaluation evaluation = SimilarityEvaluator.evaluate(similarityResults);\n \t\t\n \t\t// Build up other information to include in the evaluation files\n \t\tList<String> otherInformation = new ArrayList<String>();\n \t\tif (clArgs.automation) {\n \t\t\t// Clustering information is only included if the automation task is running\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_XI);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsXi)));\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_MIN_POINTS);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsMinPoints)));\n \t\t}\n \t\t\n \t\t// Add simple metrics from similarity measurement\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MIN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMin())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MAX);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMax())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MEAN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getSimilarityMean())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILAR_USER_PAIRS);\n \t\totherInformation.add(String.valueOf(evaluation.getSimilarUserPairs()));\n \t\t\n \t\t// Write similarity results in a file\n \t\tLOG.info(\"Writing evaluation data to a file.\");\n \t\tArrayToCsvWriter.writeDoubles(similarityResults, clArgs.evaluationOutDir, otherInformation.toArray(new String[0]));\n \t}\n \t// Evaluation is not requested, write the similarity scores into the graph database\n \telse {\n \t\tLOG.info(\"Write similarity scores to the graph database.\");\n \t\t\n \t\tfor (int i = 0; i < similarityResults.length; i++) {\n \t\t\t// Get first user by id\n \t\t\tNode userOne = uDao.findUserById(i);\n \t\t\tfor (int j = i + 1; j < similarityResults.length; j++) {\n \t\t\t\tdouble similarityScore = similarityResults[i][j];\n \t\t\t\t// User pairs that are not similar (i.e., have a similarity score of zero) do not get a connection\n \t\t\t\tif (similarityScore > 0) {\n\t \t\t\t\t// Get second user by id\n\t \t\t\t\tNode userTwo = uDao.findUserById(j);\n\t \t\t\t\t\n\t \t\t\t\t// Add similarity relationship\n\t \t\t\t\tuDao.connectSimilarUsers(userOne, userTwo, similarityScore);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }", "@Override\n public double similarity(\n final Integer value1, final Integer value2) {\n\n // The value of nodes is an integer...\n return 1.0 / (1.0 + Math.abs(value1 - value2));\n }", "public SimilarityScore sim(int eq1, int eq2);", "public interface EQSimilarity {\n \n /**\n * Compute similarity between two equivalence classes. The equivalence\n * classes are referenced by their unique identifier.\n * \n * @param eq1\n * @param eq2\n * @return \n */\n public SimilarityScore sim(int eq1, int eq2);\n}", "public int getSimilarity() {\n return similarity;\n }", "public interface Similarity {\n\n double Similarity(Map<String, Double> sourceMap, Map<String, Double> targetMap);\n}", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "private Similarity getSimilarity(DisjointSets<Pixel> ds, int root1, int root2)\n {\n return null; //TODO: remove and replace this line\n }", "public double computeSimilarity(int[] cluster1, int[] cluster2);", "public void getSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += (list.get(j).getValue() - iAverage) * (userRate- this.userAverageRate);\r\n\t\t\t\t\t\tb += (list.get(j).getValue() - iAverage) * (list.get(j).getValue() - iAverage);\r\n\t\t\t\t\t\tc += (userRate - this.userAverageRate) * (userRate - this.userAverageRate);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && c == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && b != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Create a heap storing the similarity pairs in a descending order.\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public interface PairwiseSimilarity {\n public double getMinValue();\n public double getMaxValue();\n public SRResultList mostSimilar(MostSimilarCache matrices, TIntFloatMap vector, int maxResults, TIntSet validIds) throws IOException;\n public SRResultList mostSimilar(MostSimilarCache matrices, int wpId, int maxResults, TIntSet validIds) throws IOException;\n}", "@Override\r\n\tpublic String getSimilarityExplained(String string1, String string2) {\r\n //todo this should explain the operation of a given comparison\r\n return null; //To change body of implemented methods use File | Settings | File Templates.\r\n }", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n match_score *= 100.0f;\n tvFaceMatchScore1.setText(Float.toString(match_score));\n llFaceMatchScore.setVisibility(View.VISIBLE);\n\n }\n }", "public void compareWithinClusters() {\n\t\tList<Cluster> clusterList = clusterDao.getClusterList();\n\n\t\tfor (Cluster cluster : clusterList) {\n\t\t\tList<Document> docList = documentDao.getDocListByClusterId(cluster.getId());\n\t\t\tint size = docList.size();\n\t\t\t\n\t\t\tdouble[][] matrix = new double[size][size];\n\t\t\t\n\t\t\tfor(int i =0; i<size; i++){\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (size > 1) {\n\t\t\t\t//List<Document> docList2 = docList1;\n\t\t\t\tfor (int i=0; i<size; i++){\n\t\t\t\t\tfor(int j=i+1; j<size; j++){\n\t\t\t\t\t\t//match docs docList.get(i) & docList.get(j)\n\t\t\t\t\t\tMap<String, Double> map = datumboxCaller.compareDocs(docList.get(i).getDocName(), docList.get(j).getDocName());\n\t\t\t\t\t\tmatrix[i][j] = map.get(\"Oliver\");\n\t\t\t\t\t\tmatrix[j][i] = map.get(\"Shingle\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//persist both metrics in a file \n\t\t\tpersist(matrix, cluster, docList);\n\t\t\t\n\t\t\t//printing the matrix\n\t\t\tSystem.out.println(\"\\nDocument Similarity Matrix for Cluster \"+cluster.getId());\n\t\t\tSystem.out.println(\"\\nOliver Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.println(docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nShingle Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.print(\"\\n\"+docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[j][i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//print ends\n\t\t\t\n\t\t}\n\n\t}", "@RequestMapping(value = \"get_items_similarity\",headers=\"Accept=*/*\", method={RequestMethod.GET},produces=\"application/json\")\n\t@ResponseBody\n\tpublic double getItemsSimilarity(@RequestParam(\"title1\") String title1,\n\t\t\t@RequestParam(\"title2\") String title2){\n\t\t//:TODO your implementation\n\t\tdouble ret = 0.0;\n\t\t\n\t\tUser[] usersObj1 = getUsersByItem(title1);\n\t\tUser[] usersObj2 = getUsersByItem(title2);\n\t\t\n\t\tArrayList<String> users1 = new ArrayList<String>();\n\t\tArrayList<String> users2 = new ArrayList<String>();\n\t\t\n\t\t// get usernames to arrays of string names\n\t\tfor (User user : usersObj1){\n\t\t\tusers1.add(user.getUsername());\n\t\t}\n\t\t\n\t\tfor (User user : usersObj2){\n\t\t\tusers2.add(user.getUsername());\n\t\t}\n\t\t\n\t\t// Intersection list\n\t\tSet<String> intersectionSet = users1.stream()\n\t\t\t\t .distinct()\n\t\t\t\t .filter(users2::contains)\n\t\t\t\t .collect(Collectors.toSet());\n\t\t\n\t\t// get sets of users by two titles \n\t\tSet<String> U1 = new HashSet<String>(users1);\n\t\tSet<String> U2 = new HashSet<String>(users2);\n\t\t\n\t\tU1.addAll(U2); // union\n\t\t\n\t\tif(U1.size() == 0) {\n\t\t\treturn ret;\n\t\t}\n\t\t\n\t\tret = ((double) intersectionSet.size()) / ((double) U1.size());\n\t\t\n\t\treturn ret;\n\t}", "public void getCosineSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n//\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += userRate * list.get(j).getValue();\r\n\t\t\t\t\t\tb += userRate * userRate;\r\n\t\t\t\t\t\tc += list.get(j).getValue() * list.get(j).getValue();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && b == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && c != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public abstract Object[] getSimilarityFactors();", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "@Test\n public final void testSimilarity() {\n System.out.println(\"similarity\");\n RatcliffObershelp instance = new RatcliffObershelp();\n\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"ring\" ==> 4, \"My s\" ==> 3, \"s\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(4 + 3 + 1) / (9 + 9)\n\t\t// = 16/18\n\t\t// = 0.888888\n assertEquals(\n 0.888888,\n instance.similarity(\"My string\", \"My tsring\"),\n 0.000001);\n\t\t\t\t\n\t\t// test data from other algorithms\n\t\t// \"My string\" vs \"My tsring\"\n\t\t// Substrings:\n\t\t// \"My \" ==> 3, \"tri\" ==> 3, \"g\" ==> 1\n\t\t// Ratcliff-Obershelp = 2*(sum of substrings)/(length of s1 + length of s2)\n\t\t// = 2*(3 + 3 + 1) / (9 + 9)\n\t\t// = 14/18\n\t\t// = 0.777778\n assertEquals(\n 0.777778,\n instance.similarity(\"My string\", \"My ntrisg\"),\n 0.000001);\n\n // test data from essay by Ilya Ilyankou\n // \"Comparison of Jaro-Winkler and Ratcliff/Obershelp algorithms\n // in spell check\"\n // https://ilyankou.files.wordpress.com/2015/06/ib-extended-essay.pdf\n // p13, expected result is 0.857\n assertEquals(\n 0.857,\n instance.similarity(\"MATEMATICA\", \"MATHEMATICS\"),\n 0.001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.7368421052631579\n assertEquals(\n 0.736842,\n instance.similarity(\"aleksander\", \"alexandre\"),\n 0.000001);\n\n // test data from stringmetric\n // https://github.com/rockymadden/stringmetric\n // expected output is 0.6666666666666666\n assertEquals(\n 0.666666,\n instance.similarity(\"pennsylvania\", \"pencilvaneya\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 14/18 = 0.7777777777777778‬\n assertEquals(\n 0.777778,\n instance.similarity(\"WIKIMEDIA\", \"WIKIMANIA\"),\n 0.000001);\n\n // test data from wikipedia\n // https://en.wikipedia.org/wiki/Gestalt_Pattern_Matching\n // expected output is 24/40 = 0.65\n assertEquals(\n 0.6,\n instance.similarity(\"GESTALT PATTERN MATCHING\", \"GESTALT PRACTICE\"),\n 0.000001);\n \n NullEmptyTests.testSimilarity(instance);\n }", "public static void demo_SimilarityMetrics(RoWordNet RoWN, String textCorpus_FilePath) throws Exception {\n boolean allowAllRelations = true;\n\n Literal l1 = new Literal(\"salvare\");\n Literal l2 = new Literal(\"dotare\");\n String id1 = RoWN.getSynsetsFromLiteral(l1).get(0).getId();\n String id2 = RoWN.getSynsetsFromLiteral(l2).get(0).getId();\n Synset s1, s2;\n\n s1 = RoWN.getSynsetById(id1);\n s2 = RoWN.getSynsetById(id2);\n\n IO.outln(\"Computed IC for synset_1: \" + s1.getInformationContent());\n IO.outln(\"Computed IC for synset_2: \" + s2.getInformationContent());\n IO.outln(\"Custom distance: \" + SimilarityMetrics.distance(RoWN, s1\n .getId(), s2.getId(), true, null));\n IO.outln(\"Custom hypernymy distance: \" + SimilarityMetrics\n .distance(RoWN, s1.getId(), s2.getId()));\n\n IO.outln(\"Sim Resnik: \" + SimilarityMetrics.Resnik(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim Lin: \" + SimilarityMetrics.Lin(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim JCN: \" + SimilarityMetrics.JiangConrath(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Dist JCN: \" + SimilarityMetrics\n .JiangConrath_distance(RoWN, s1.getId(), s2.getId(), allowAllRelations));\n }", "@Test\r\n public void testGroupSimilarity() throws Exception {\r\n final List<ICluster> originalCLuster = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster);\r\n List<ICluster> l1 = new ArrayList<ICluster>(originalCLuster);\r\n\r\n final List<ICluster> originalCLuster2 = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster2);\r\n List<ICluster> l2 = new ArrayList<ICluster>(originalCLuster2);\r\n\r\n ClusterListSimilarity cd = new ClusterListSimilarity(distanceMeasure);\r\n final List<ICluster> identical = cd.identicalClusters(l1, l2);\r\n\r\n Assert.assertEquals(originalCLuster.size(), identical.size());\r\n Assert.assertTrue(l1.isEmpty());\r\n Assert.assertTrue(l2.isEmpty());\r\n }", "private float distanceMoyenne(DMatchVector bestMatches){\n\n float DM=0.0f;\n for(int i=0;i<bestMatches.size();i++){\n\n DM+=bestMatches.get(i).distance();\n }\n\n DM=DM/bestMatches.size();\n return DM;\n\n }", "public void calculate(Set<Article> articles) {\n \n Set<ArticleDocument> articleDocuments = new HashSet<>();\n for (Article article : articles) {\n articleDocuments.add(article.getDocument());\n }\n \n VSMDocument positiveWords = new TextDocument(\"positive_words.txt\");\n VSMDocument negativeWords = new TextDocument(\"negative_words.txt\");\n \n ArrayList<VSMDocument> documents = new ArrayList<VSMDocument>();\n documents.add(positiveWords);\n documents.add(negativeWords);\n documents.addAll(articleDocuments);\n \n Corpus corpus = new Corpus(documents);\n \n VectorSpaceModel vectorSpace = new VectorSpaceModel(corpus);\n \n double totalPositive = 0;\n double totalNegative = 0;\n \n \n for(ArticleDocument articleDoc : articleDocuments) {\n VSMDocument doc = (VSMDocument) articleDoc;\n System.out.println(\"\\nComparing to \" + doc);\n double positive = vectorSpace.cosineSimilarity(positiveWords, doc);\n double negative = vectorSpace.cosineSimilarity(negativeWords, doc);\n System.out.println(\"Positive: \" + positive);\n System.out.println(\"Negative: \" + negative);\n if (!Double.isNaN(positive)) {\n totalPositive += positive;\n }\n if (!Double.isNaN(negative)) {\n totalNegative += negative;\n }\n double difference = positive - negative;\n if (difference >= 0) {\n System.out.println(\"More positive by \" + difference);\n } else {\n System.out.println(\"More negative by \" + Math.abs(difference));\n }\n \n if (positive >= mostPositive) {\n mostPositive = positive;\n mostPositiveDoc = doc;\n }\n if (negative >= mostNegative) {\n mostNegative = negative;\n mostNegativeDoc = doc;\n }\n if (Math.abs(difference) >= Math.abs(biggestDifference)) {\n biggestDifference = difference;\n biggestDifferenceDoc = doc;\n }\n \n String publisher = articleDoc.getPublisher();\n String region = articleDoc.getRegion();\n LocalDate day = articleDoc.getDate().toLocalDate();\n DayOfWeek weekday = day.getDayOfWeek();\n if (!Double.isNaN(positive)) {\n if (publisherOptimism.containsKey(publisher)) {\n publisherOptimism.get(publisher).add(positive);\n } else {\n publisherOptimism.put(publisher, new LinkedList<Double>());\n publisherOptimism.get(publisher).add(positive);\n }\n \n if (publisherPessimism.containsKey(publisher)) {\n publisherPessimism.get(publisher).add(negative);\n } else {\n publisherPessimism.put(publisher, new LinkedList<Double>());\n publisherPessimism.get(publisher).add(negative);\n }\n \n if (regionOptimism.containsKey(region)) {\n regionOptimism.get(region).add(positive);\n } else {\n regionOptimism.put(region, new LinkedList<Double>());\n regionOptimism.get(region).add(positive);\n }\n \n if (regionPessimism.containsKey(region)) {\n regionPessimism.get(region).add(negative);\n } else {\n regionPessimism.put(region, new LinkedList<Double>());\n regionPessimism.get(region).add(negative);\n }\n \n if (dayOptimism.containsKey(day)) {\n dayOptimism.get(day).add(positive);\n } else {\n dayOptimism.put(day, new LinkedList<Double>());\n dayOptimism.get(day).add(positive);\n }\n \n if (dayPessimism.containsKey(day)) {\n dayPessimism.get(day).add(negative);\n } else {\n dayPessimism.put(day, new LinkedList<Double>());\n dayPessimism.get(day).add(negative);\n }\n \n if (weekdayOptimism.containsKey(weekday)) {\n weekdayOptimism.get(weekday).add(positive);\n } else {\n weekdayOptimism.put(weekday, new LinkedList<Double>());\n weekdayOptimism.get(weekday).add(positive);\n }\n \n if (weekdayPessimism.containsKey(weekday)) {\n weekdayPessimism.get(weekday).add(negative);\n } else {\n weekdayPessimism.put(weekday, new LinkedList<Double>());\n weekdayPessimism.get(weekday).add(negative);\n }\n }\n }\n \n size = articleDocuments.size();\n avgPositive = totalPositive / size;\n avgNegative = totalNegative / size;\n printInfo();\n }", "public void setWeights() {\n for (Square[] square : squares) {\n for (Square square1 : square) {\n try {\n int i = Integer.parseInt(square1.getText());\n square1.setV(new Vertex(square1.getXcoor(), square1.getYcoor(), i));\n } catch (NumberFormatException e) {\n square1.setV(new Vertex(square1.getXcoor(), square1.getYcoor(), 1));\n }\n }\n }\n }", "@Test\n public void testCosineSimilarity() {\n SimilarityFunctions s = new SimilarityFunctions();\n\n double[] vector1 = new double[]{1, 2, 3};\n double[] vector2 = new double[]{2, 6, 3};\n double[] vector3 = new double[]{0, 1, 2};\n double[] vector4 = new double[]{2, 0, 0, 0};\n double[] vector5 = new double[]{1, 2.4, 3.9, 1};\n double[] vector6 = new double[]{1};\n double[] vector7 = new double[]{-1};\n\n assertEquals(0.8781440805693944, s.cosineSimilarity(vector1, vector2), .001);\n assertEquals(0.9561828874675149, s.cosineSimilarity(vector1, vector3), .001);\n assertEquals(0.7666518779999278, s.cosineSimilarity(vector2, vector3), .001);\n assertEquals(0.20865053489458874, s.cosineSimilarity(vector4, vector5), .001);\n assertEquals(-1.0, s.cosineSimilarity(vector6, vector7), .001);\n }", "private float calculateSimilarityScore(int numOfSuspiciousNodesInA, int numOfSuspiciousNodesInB) {\n\t\t// calculate the similarity score\n\t\treturn (float) (numOfSuspiciousNodesInA + numOfSuspiciousNodesInB) \n\t\t\t\t/ (programANodeList.size() + programBNodeList.size()) * 100;\n\t}", "public void similar(String tableName, String name) {\n String simName = null;\n float score = 11;\n float val = 0;\n int simCount = 0;\n if (tableName.equals(\"reviewer\")) {\n if (matrix.getReviewers().contains(name) != null) {\n // Node with the reference to the list we are comparing other\n // lists to\n ReviewerList.Node n = matrix.getReviewers().contains(name);\n // Gets the head to the DLList that we are comparing other lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n ReviewerList.Node n1 = matrix.getReviewers().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n RDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n node = n.getList().getHead();\n // Going through this list to find matching movies in\n // simList\n while (node != null) {\n simNode = simList.containsMovie(node\n .getMovieName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextMovie();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getReviewerName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n\n printSimilar(\"reviewer\", name, simName, score);\n }\n else {\n System.out.println(\"Reviewer |\" + name\n + \"| not found in the database.\");\n }\n }\n else {\n if (matrix.getMovies().contains(name) != null) {\n // Node with the reference to the list we are comparing\n // other lists to\n MSLList.Node n = matrix.getMovies().contains(name);\n // Gets the head to the DLList that we are comparing other\n // lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n MSLList.Node n1 = matrix.getMovies().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n MDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n // Going through this list to find matching movies\n // in simList\n node = n.getList().getHead();\n while (node != null) {\n simNode = simList.containsReviewer(node\n .getReviewerName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextReviewer();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getMovieName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n printSimilar(\"movie\", name, simName, score);\n }\n else {\n System.out.println(\"Movie |\" + name\n + \"| not found in the database.\");\n }\n }\n }", "double squaredDistanceTo(IMovingObject m);", "private double isSimilar(double rightHandSimilarity, double leftHandSimilarity, List<Double> rightFingersSimilarity, List<Double> leftFingersSimilarity, double rightMotionSimilarity, double leftMotionSimilarity, List<List<Double>> touchList) {\n return rightHandSimilarity * leftHandSimilarity;\n }", "public final void test(final List<T> nodes) {\n Graph<T> approximate_graph = computeGraph(nodes);\n\n // Use Brute force to build the exact graph\n Brute brute = new Brute();\n brute.setK(k);\n brute.setSimilarity(similarity);\n Graph<T> exact_graph = brute.computeGraph(nodes);\n\n int correct = 0;\n for (T node : nodes) {\n correct += approximate_graph.getNeighbors(node)\n .countCommons(exact_graph.getNeighbors(node));\n }\n\n System.out.println(\n \"Computed similarities: \" + this.getComputedSimilarities());\n double speedup_ratio\n = (double) (nodes.size() * (nodes.size() - 1) / 2)\n / this.getComputedSimilarities();\n System.out.println(\"Speedup ratio: \" + speedup_ratio);\n\n double correct_ratio = (double) correct / (nodes.size() * k);\n System.out.println(\"Correct edges: \" + correct\n + \" (\" + correct_ratio * 100 + \"%)\");\n\n System.out.println(\"Quality-equivalent speedup: \"\n + speedup_ratio * correct_ratio);\n }", "@SuppressWarnings(\"boxing\")\n @Override\n public void apply(SetUniqueList<SoftwareVersion> trainversionSet, SoftwareVersion testversion) {\n // reset these for each run\n this.mm = null;\n this.classifier = null;\n\n double score = 0; // matching score to select the best matching training data from the set\n int num = 0;\n int biggest_num = 0;\n MetricMatch tmp;\n for (SoftwareVersion trainversion : trainversionSet) {\n num++;\n\n tmp = new MetricMatch(trainversion.getInstances(), testversion.getInstances());\n\n // metric selection may create error, continue to next training set\n try {\n tmp.attributeSelection();\n tmp.matchAttributes(this.method, this.threshold);\n }\n catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n\n // we only select the training data from our set with the most matching attributes\n if (tmp.getScore() > score && tmp.attributes.size() > 0) {\n score = tmp.getScore();\n this.mm = tmp;\n biggest_num = num;\n }\n }\n\n // if we have found a matching instance we use it, log information about the match for\n // additional eval later\n Instances ilist = null;\n if (this.mm != null) {\n ilist = this.mm.getMatchedTrain();\n LOGGER.debug(\"[MATCH FOUND] match: [\" + biggest_num + \"], score: [\" +\n score + \"], instances: [\" + ilist.size() + \"], attributes: [\" +\n this.mm.attributes.size() + \"], ilist attrs: [\" + ilist.numAttributes() + \"]\");\n for (Map.Entry<Integer, Integer> attmatch : this.mm.attributes.entrySet()) {\n LOGGER.debug(\"[MATCHED ATTRIBUTE] source attribute: [\" +\n this.mm.train.attribute(attmatch.getKey()).name() + \"], target attribute: [\" +\n this.mm.test.attribute(attmatch.getValue()).name() + \"]\");\n }\n }\n else {\n LOGGER.debug(\"[NO MATCH FOUND]\");\n }\n\n // if we have a match we build the MetricMatchingClassifier, if not we fall back to FixClass\n // Classifier\n try {\n if (this.mm != null) {\n this.classifier = new MetricMatchingClassifier();\n this.classifier.buildClassifier(ilist);\n ((MetricMatchingClassifier) this.classifier).setMetricMatching(this.mm);\n }\n else {\n this.classifier = new FixClass();\n this.classifier.buildClassifier(ilist); // this is null, but the FixClass Classifier\n // does not use it anyway\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "public static double jaccard (Set<String> values1, Set<String> values2) {\t\n\t\t\n\t\tfinal int termsInString1 = values1.size();\t\t\n\t\tfinal int termsInString2 = values2.size();\n\t\t\t\t\n\t\t//now combine the sets\n\t\tvalues1.addAll(values2);\n\t\tfinal int commonTerms = (termsInString1 + termsInString2) - values1.size();\n\t\t\n\t\t//return JaccardSimilarity\n\t\treturn (double) (commonTerms) / (double) (values1.size());\n\t}", "@Override\r\n\tpublic float getUnNormalisedSimilarity(String string1, String string2) {\r\n //todo check this is valid before use mail [email protected] if problematic\r\n return getSimilarity(string1, string2);\r\n }", "public void setVotes(Set<Vote> arg0) {\n \n }", "@Override\r\n\tpublic final float getSimilarity(final String string1, final String string2) {\r\n //split the strings into tokens for comparison\r\n final ArrayList<String> str1Tokens = this.tokeniser.tokenizeToArrayList(string1);\r\n final ArrayList<String> str2Tokens = this.tokeniser.tokenizeToArrayList(string2);\r\n \r\n if (str1Tokens.size() == 0){\r\n \treturn 0.0f;\r\n }\r\n\r\n float sumMatches = 0.0f;\r\n float maxFound;\r\n for (Object str1Token : str1Tokens) {\r\n maxFound = 0.0f;\r\n for (Object str2Token : str2Tokens) {\r\n final float found = this.internalStringMetric.getSimilarity((String) str1Token, (String) str2Token);\r\n if (found > maxFound) {\r\n maxFound = found;\r\n }\r\n }\r\n sumMatches += maxFound;\r\n }\r\n return sumMatches / str1Tokens.size();\r\n }", "public T union( T obj1, T obj2 )\n {\n // Find the root of each object; if either is not contained, the root\n // value will be null, and we throw an exception.\n Node root1 = getRoot(nodes.get(obj1));\n Node root2 = getRoot(nodes.get(obj2));\n if ( root1 == null && root2 == null )\n throw new NoSuchElementException( \"Sets do not contain either object: \" + obj1 + \", \" + obj2 );\n if ( root1 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj1 );\n if ( root2 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj2 );\n // If already were in same set, just return data from the root of that\n // set.\n if ( root1 == root2 )\n return root1.data;\n // If not already, then doing union reduces overall number of sets.\n numSets-- ;\n // We use root2 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this case,\n // or (b) the tree containing obj1 has lower rank.\n if ( ( root1.rank == root2.rank && Math.random() < 0.5 ) || root1.rank < root2.rank )\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root1.parent = root2;\n root2.size += root1.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root2.rank++ ;\n \n return root2.data;\n }\n else\n // We use root1 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this\n // case, or (b) the tree containing obj2 has lower rank.\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root2.parent = root1;\n root1.size += root2.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root1.rank++ ;\n \n return root1.data;\n }\n }", "public void setMatches() {\r\n this.matches++;\r\n\r\n }", "public static double similarity(Library a, Library b) {\r\n double sizeA = a.getPhotos().size();\r\n double sizeB = b.getPhotos().size();\r\n\r\n if (sizeA == 0.0 || sizeB == 0.0) { // return 0.0 if either library is empty\r\n return 0.0;\r\n } else {\r\n int size = commonPhotos(a, b).size();\r\n if (sizeA < sizeB) { // return amount of common photos divided by the smaller library\r\n return size / sizeA;\r\n } else {\r\n return size / sizeB;\r\n }\r\n }\r\n\r\n }", "void set( couple ch)\r\n { \r\n \r\n //couple ch = itr.next();\r\n ch.g1.sethappy(ch.bucket);\r\n ch.b1.sethappy(ch.bucket);\r\n ch.happiness = ch.b1.happy + ch.g1.happy;\r\n ch.compatibility = (ch.b1.budget - ch.g1.getmaint()) + Math.abs(ch.b1.getintg() - ch.g1.getiq()) + Math.abs(ch.b1.getattr() - ch.g1.getb());\r\n // this sets the happiness n compatibility of the co \r\n \r\n }", "public interface DistanceFunctionMultiObject<T> {\n /**\n * Measures the distance between all the objects in set (the first argument) and\n * the specified object (the second argument).\n * The passed array {@code individualDistances} will be filled with the\n * distances to the individual objects in the set.\n * \n * @param objects the set of objects for which to measure the distance to the second parameter\n * @param object the object for which to measure the distance\n * @param individualDistances the array to fill with the distances to the respective objects from the set;\n * if not <tt>null</tt>, it must have the same number of allocated elements as the number of the set of objects\n * @return the distance between the given set of {@code objects} and the {@code object}\n * @throws IndexOutOfBoundsException if the passed {@code individualDistances} array is not big enough\n */\n public float getDistanceMultiObject(Collection<? extends T> objects, T object, float[] individualDistances) throws IndexOutOfBoundsException;\n\n /**\n * Returns the type of objects that this distance function accepts as arguments.\n * @return the type of objects for this distance function\n */\n public Class<? extends T> getDistanceObjectClass();\n}", "public interface DimensionSimilarity {\n double similarity(double left, double right);\n}", "public double JaccardSimilarity (String stringOne, String stringTwo) {\n\t\treturn (double) intersect(stringOne, stringTwo).size() /\n\t\t\t (double) union(stringOne, stringTwo).size();\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Audiometrias)) {\n return false;\n }\n Audiometrias other = (Audiometrias) object;\n if ((this.idAudiometria == null && other.idAudiometria != null) || (this.idAudiometria != null && !this.idAudiometria.equals(other.idAudiometria))) {\n return false;\n }\n return true;\n }", "public void updateData(ArrayList<T> objects) {\n mTokensMap = new HashMap<String, HashSet<T>>();\n\n // Build the tokens map\n for (T object : objects) {\n for (String token : object.getTokens()) {\n token = token.toLowerCase();\n HashSet<T> references = mTokensMap.get(token);\n if (references == null) {\n references = new HashSet<T>();\n references.add(object);\n mTokensMap.put(token, references);\n } else {\n references.add(object);\n }\n }\n }\n }", "public void BruteForceSimilarity(String s1, String s2, int sLength) {\n\n s1_Array = splitStringIntoArray(s1, sLength);\n s2_Array = splitStringIntoArray(s2, sLength);\n\n// for (int i = 0; i < s1_Array.size(); i++) {\n//// System.out.println(s1_Array.get(i));\n// }\n// System.out.println(\"**************************\");\n//\n// for (int i = 0; i < s2_Array.size(); i++) {\n// System.out.println(s2_Array.get(i));\n// }\n\n }", "public double compute(Object o1, Object o2) throws jcolibri.exception.NoApplicableSimilarityFunctionException {\n\t\tif ((o1 == null) || (o2 == null))\n\t\t\treturn 0;\n\t\tif (!(o1 instanceof java.lang.Number))\n\t\t\tthrow new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), o1.getClass());\n\t\tif (!(o2 instanceof java.lang.Number))\n\t\t\tthrow new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), o2.getClass());\n\n\n\t\tNumber i1 = (Number) o1;\n\t\tNumber i2 = (Number) o2;\n\t\treturn (double) compare(i1.doubleValue(), i2.doubleValue());\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic double calculateSimilarity(String tag1, String tag2) {\n\t\tHashMap<String, ArrayList<HashMap<String, HashSet<String>>>> userMap = db.getUserMap();\n\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\tfor(String user : userMap.keySet()){\n\t\t\n\t\t\tHashMap<String, HashSet<String>> tagsMap = userMap.get(user).get(1);\n\t\t\tint totalTags = tagsMap.keySet().size();\n\t\t\t\n\t\t\tif(null == tagsMap.get(tag1) || null == tagsMap.get(tag2))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tHashMap<String, HashSet<String>> resourcesMap = userMap.get(user).get(0);\n\t\t\t\n\t\t\tdouble userSimilarity = 0.0;\n\t\t\t\n\t\t\tfor(String resource : resourcesMap.keySet()){\n\t\t\t\tHashSet<String> tags = resourcesMap.get(resource);\n\t\t\t\t\n\t\t\t\tif(tags.contains(tag1) && tags.contains(tag2)){\n\t\t\t\t\tuserSimilarity += Math.log(\n\t\t\t\t\t\t\t( (double) tags.size() ) /\n\t\t\t\t\t\t\t( ( (double) totalTags ) + 1.0 )\n\t\t\t\t\t\t\t);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsimilarity += -userSimilarity;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn similarity; //rounding is necessary to match the results given at: www2009.org/proceedings/pdf/p641.pdf\n\t\t\n\t}", "private void cluster() {\n\t\tint index = 0;\n\t\tfor (DataObject obj : objects) {\n\t\t\tindex = getNearestCenterIndex(obj, centers);\n\t\t\tclusters.get(index).add(obj);\n\t\t}\n\t}", "public void align( Alignment alignment, Properties param ) {\n\t\t// For the classes : no optmisation cartesian product !\n\t\tfor ( OWLEntity cl1 : ontology1.getClassesInSignature()){\n\t\t\tfor ( OWLEntity cl2: ontology2.getClassesInSignature() ){\n\t\t\t\tdouble confidence = match(cl1,cl2);\n\t\t\t\tif (confidence > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\taddAlignCell(cl1.getIRI().toURI(),cl2.getIRI().toURI(),\"=\", confidence);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(e.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tfor (OWLEntity cl1:getDataProperties(ontology1)){\n\t\t\tfor (OWLEntity cl2:getDataProperties(ontology2)){\n\t\t\t\tdouble confidence = match(cl1,cl2);\n\t\t\t\tif (confidence > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\taddAlignCell(cl1.getIRI().toURI(),cl2.getIRI().toURI(),\"=\", confidence);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(e.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (OWLEntity cl1:getObjectProperties(ontology1)){\n\t\t\tfor (OWLEntity cl2:getObjectProperties(ontology2)){\n\t\t\t\tdouble confidence = match(cl1,cl2);\n\t\t\t\tif (confidence > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\taddAlignCell(cl1.getIRI().toURI(),cl2.getIRI().toURI(),\"=\", confidence);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(e.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\n\n\n\n\n\n\t}", "public abstract interface Similarity {\n\n /**\n * This is the function that summarizes all the functionality of similarity\n * matching. It computes the total score from the previous level factors\n * multiplied with the appropriate weights.\n *\n * @return The total score of the similarity between document and query.\n */\n public abstract float getScore();\n\n /**\n * This function returns the previous level factors of scoring computation\n *\n * @return\n */\n public abstract Object[] getSimilarityFactors();\n\n}", "public long numSimilarities();", "double computeSimilarity(double[] vector1, double[] vector2) {\n\n // We need doubles for these so the math is done correctly. Else we only\n // return 1 or 0.\n double nDifferences = 0.;\n double lengthOfVector = (double) vector1.length;\n\n for (int i = 0; i < vector1.length; i++) {\n if (vector1[i] != vector2[i]) {\n nDifferences ++;\n }\n } \n return (1. - (nDifferences/lengthOfVector));\n }", "public double similitudPearson(Pelicula i1, Pelicula i2, ArrayList<Long> test){\r\n // Variables auxiliares:\r\n double norma1 = 0;\r\n double norma2 = 0;\r\n int val1;\r\n int val2;\r\n Long key;\r\n double numerador = 0;\r\n double media1 = i1.getMedia();\r\n double media2 = i2.getMedia();\r\n \r\n // 1. Nos quedamos con la películas que tenga menos valoraciones.\r\n if (i1.getValoraciones().size() < i2.getValoraciones().size()){\r\n for (Map.Entry<Long,Valoracion> e : i1.getValoraciones().entrySet()) {\r\n key = e.getKey();\r\n // 2. Descartamos los usuarios de la partición test.\r\n if (!test.contains(key)){\r\n // 3. Comprobamos que la otra película haya sido valorada por el mismo usuario.\r\n if (i2.getValoraciones().containsKey(key)){\r\n // 4. Realizamos los cálculos de similitud.\r\n val1 = e.getValue().getValor();\r\n val2 = i2.getValoraciones().get(key).getValor();\r\n\r\n norma1 = norma1 + (val1 - media1)*(val1 - media1);\r\n norma2 = norma2 + (val2 - media2)*(val2 - media2);\r\n\r\n numerador = numerador + (val1 - media1)*(val2 - media2);\r\n }\r\n }\r\n }\r\n }else{\r\n for (Map.Entry<Long,Valoracion> e : i2.getValoraciones().entrySet()) {\r\n key = e.getKey();\r\n if (!test.contains(key)){\r\n if (i1.getValoraciones().containsKey(key)){\r\n val2 = e.getValue().getValor();\r\n val1 = i1.getValoraciones().get(key).getValor();\r\n\r\n norma1 = norma1 + (val1 - media1)*(val1 - media1);\r\n norma2 = norma2 + (val2 - media2)*(val2 - media2);\r\n\r\n numerador = numerador + (val1 - media1)*(val2 - media2);\r\n }\r\n }\r\n }\r\n }\r\n \r\n if (norma1 != 0 && norma2 !=0){\r\n double sim = numerador / (Math.sqrt(norma1*norma2)) ;\r\n sim = (sim + 1)/2;\r\n if (sim > 1){\r\n return 1;\r\n }\r\n return sim;\r\n }else{\r\n return 0;\r\n }\r\n \r\n }", "@Test\n\tpublic void testMeasureSimilarity() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(true, false, false);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 5, \"01.01.2015 00:00:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 5, \"31.12.2015 00:00:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a global measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 30.11.15: (00:10) +++++ (01:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 00:10:00\", \"30.11.2015 01:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS\", \"NAME='Philipp'\"), 1);\n\t\tr = res.get(0);\n\t\t// 70 minutes (00:00 - 00:09 and 01:01 - 02:00), each 5 => 350\n\t\tassertEquals(350.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(350.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// (00:10) ++++ (00:50) Edison (5)\n\t\t// 30.11.15: (00:00) +++++ (00:50) Edison (5) \n\t\t// (00:10) +++++ (01:00) Philipp (5)\n\t\t// (01:00) ++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Edison\", 5, \"30.11.2015 00:00:00\", \"30.11.2015 00:50:00\");\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 01:00:00\", \"30.11.2015 02:00:00\");\n\t\tloadData(\"Edison\", 5, \"01.01.2015 00:10:00\", \"01.01.2015 00:50:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS\", null), 1);\n\t\tr = res.get(0);\n\t\t// 1 minute (01:00:00), each 5 as value => 5\n\t\tassertEquals(5.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(5.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// fire one with dimensions\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// (00:10) ++++ (00:50) Edison (5)\n\t\t// 30.11.15: (00:00) +++++ (00:50) Edison (5) \n\t\t// (00:10) +++++ (01:00) Philipp (5)\n\t\t// (01:00) ++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MAX(SUM(IDEAS)) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\t// 1 minute (01:00:00), each 5 for the whole hour (* 60) as value => 300\n\t\tassertEquals(300.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(300.0, r.getTotalDistance(), 0.0);\n\t\tassertEquals(\"R20151130_0000_0059\", r.getLabelValue(0));\n\t}", "protected double nameSimilarity(String n1, String n2, boolean useWordNet)\n\t{\n\t\tif(n1.equals(n2))\n\t\t\treturn 1.0;\n\t\t\n\t\t//Split the source name into words\n\t\tString[] sW = n1.split(\" \");\n\t\tHashSet<String> sWords = new HashSet<String>();\n\t\tHashSet<String> sSyns = new HashSet<String>();\n\t\tfor(String w : sW)\n\t\t{\n\t\t\tsWords.add(w);\n\t\t\tsSyns.add(w);\n\t\t\t//And compute the WordNet synonyms of each word\n\t\t\tif(useWordNet && w.length() > 2)\n\t\t\t\tsSyns.addAll(wn.getAllNounWordForms(w));\n\t\t}\n\t\t\n\t\t//Split the target name into words\n\t\tString[] tW = n2.split(\" \");\n\t\tHashSet<String> tWords = new HashSet<String>();\n\t\tHashSet<String> tSyns = new HashSet<String>();\t\t\n\t\tfor(String w : tW)\n\t\t{\n\t\t\ttWords.add(w);\n\t\t\ttSyns.add(w);\n\t\t\t//And compute the WordNet synonyms of each word\n\t\t\tif(useWordNet && w.length() > 3)\n\t\t\t\ttSyns.addAll(wn.getAllWordForms(w));\n\t\t}\n\t\t\n\t\t//Compute the Jaccard word similarity between the properties\n\t\tdouble wordSim = Similarity.jaccard(sWords,tWords)*0.9;\n\t\t//and the String similarity\n\t\tdouble simString = ISub.stringSimilarity(n1,n2)*0.9;\n\t\t//Combine the two\n\t\tdouble sim = 1 - ((1-wordSim) * (1-simString));\n\t\tif(useWordNet)\n\t\t{\n\t\t\t//Check if the WordNet similarity\n\t\t\tdouble wordNetSim = Similarity.jaccard(sSyns,tSyns);\n\t\t\t//Is greater than the name similarity\n\t\t\tif(wordNetSim > sim)\n\t\t\t\t//And if so, return it\n\t\t\t\tsim = wordNetSim;\n\t\t}\n\t\treturn sim;\n\t}", "void permutateObjects()\n {\n for (int i = 0; i < sampleObjects.length; i++)\n {\n for (int i1 = 0; i1 < (r.nextInt() % 7); i1++)\n {\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleStrings[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleNumbers[r.nextInt(5)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n specialValues[r.nextInt(2)]);\n addToObject(sampleObjects[i], sampleStrings[r.nextInt(5)],\n sampleArrays[r.nextInt(5)]);\n }\n }\n }", "@RequestMapping(value = \"get_items_similarity\",headers=\"Accept=*/*\", method={RequestMethod.GET},produces=\"application/json\")\n\t@ResponseBody\n\tpublic double getItemsSimilarity(@RequestParam(\"title1\") String title1,\n\t\t\t@RequestParam(\"title2\") String title2){\n\t\t//:TODO your implementation\n\t\tdouble ret = 0.0;\n\t\treturn ret;\n\t}", "public List<ModelingSubmissionComparisonDTO> compareSubmissions(List<ModelingSubmission> modelingSubmissions, double minimumSimilarity, int minimumModelSize,\n int minimumScore) {\n\n Map<UMLDiagram, ModelingSubmission> models = new HashMap<>();\n ObjectMapper objectMapper = new ObjectMapper();\n\n for (var modelingSubmission : modelingSubmissions) {\n if (!modelingSubmission.isEmpty(objectMapper)) {\n try {\n log.debug(\"Build UML diagram from json\");\n UMLDiagram model = UMLModelParser.buildModelFromJSON(parseString(modelingSubmission.getModel()).getAsJsonObject(), modelingSubmission.getId());\n if (model.getAllModelElements().size() >= minimumModelSize) {\n models.put(model, modelingSubmission);\n }\n }\n catch (IOException e) {\n log.error(\"Parsing the modeling submission \" + modelingSubmission.getId() + \" did throw an exception:\", e);\n }\n }\n }\n\n log.info(\"Found \" + models.size() + \" modeling submissions with at least \" + minimumModelSize + \" elements to compare\");\n\n final List<ModelingSubmissionComparisonDTO> comparisonResults = new ArrayList<>();\n\n var nonEmptyModelsList = new ArrayList<>(models.keySet());\n\n // it is intended to use the classic for loop here, because we only want to check similarity between two different submissions once\n for (int i = 0; i < nonEmptyModelsList.size(); i++) {\n for (int j = i + 1; j < nonEmptyModelsList.size(); j++) {\n var model1 = nonEmptyModelsList.get(i);\n var model2 = nonEmptyModelsList.get(j);\n final double similarity = model1.similarity(model2);\n log.debug(\"Compare result \" + i + \" with \" + j + \": \" + similarity);\n if (similarity < minimumSimilarity) {\n // ignore comparison results with too small similarity\n continue;\n }\n\n var submission1 = models.get(model1);\n var submission2 = models.get(model2);\n if (submission1.getResult() != null && submission1.getResult().getScore() != null && submission1.getResult().getScore() < minimumScore\n && submission2.getResult() != null && submission2.getResult().getScore() != null && submission2.getResult().getScore() < minimumModelSize) {\n // ignore comparison results with too small scores\n continue;\n }\n\n log.info(\"Found similar models \" + i + \" with \" + j + \": \" + similarity);\n\n var comparisonResult = new ModelingSubmissionComparisonDTO();\n var element1 = new ModelingSubmissionComparisonElement().submissionId(submission1.getId()).size(model1.getAllModelElements().size());\n var element2 = new ModelingSubmissionComparisonElement().submissionId(submission2.getId()).size(model2.getAllModelElements().size());\n element1.studentLogin(((StudentParticipation) submission1.getParticipation()).getParticipantIdentifier());\n element2.studentLogin(((StudentParticipation) submission2.getParticipation()).getParticipantIdentifier());\n comparisonResult.setElement1(element1);\n comparisonResult.setElement2(element2);\n comparisonResult.similarity(similarity);\n if (submission1.getResult() != null) {\n comparisonResult.getElement1().score(submission1.getResult().getScore());\n }\n if (submission2.getResult() != null) {\n comparisonResult.getElement2().score(submission2.getResult().getScore());\n }\n\n comparisonResults.add(comparisonResult);\n }\n }\n\n log.info(\"Found \" + comparisonResults.size() + \" similar modeling submission combinations ( > \" + minimumSimilarity + \")\");\n\n return comparisonResults;\n }", "public List<OWLObject> search(OWLObject queryObj) {\n\t\tList<OWLObject> hits = new ArrayList<OWLObject>(maxHits);\n\t\tSystem.out.println(\"gettings atts for \"+queryObj+\" -- \"+simEngine.comparisonProperty);\n\t\tSet<OWLObject> atts = simEngine.getAttributeClosureFor(queryObj);\n\t\tSystem.out.println(\"all atts: \"+atts.size());\n\t\tif (atts.size() == 0)\n\t\t\treturn hits;\n\t\t\n\t\t// only compare using significant atts;\n\t\t// we don't do the same test on candidates as these will be removed by the\n\t\t// intersection operation. they will have a small effect on the score, as\n\t\t// we don't divide by the union, but instead the sum of sizes\n\t\tatts = filterNonSignificantAttributes(atts);\n\t\tSystem.out.println(\"filtered atts: \"+atts.size());\n\n\t\t//bloomFilter = new BloomFilter<OWLObject>(0.05, atts.size());\n\t\t//bloomFilter.addAll(atts);\n\t\t\t\t\n\t\tSortedMap<Integer,Set<OWLObject>> scoreCandidateMap = new TreeMap<Integer,Set<OWLObject>>();\n\t\t\n\t\tfor (OWLObject candidate : getCandidates()) {\n\t\t\tif (candidate.equals(queryObj))\n\t\t\t\tcontinue;\n\t\t\tSet<OWLObject> iAtts = simEngine.getAttributeClosureFor(candidate);\n\t\t\t//Set<OWLObject> iAtts = simEngine.getGraph().getAncestors(candidate);\n\n\t\t\tif (iAtts.size() == 0)\n\t\t\t\tcontinue;\n\t\t\tint cAttsSize = iAtts.size();\n\t\n\t\t\tiAtts.retainAll(atts);\n\t\t\t//Collection<OWLObject> iAtts = bloomFilter.intersection(cAtts);\n\t\t\t\n\t\t\t// simJ, one-sided, scaled by 1000\n\t\t\t// negate to ensure largest first\n\t\t\t//Integer score = - (iAtts.size() * 1000 / cAttsSize);\n\t\t\t\n\t\t\t// this biases us towards genes with large numbers of annotations,\n\t\t\t// but it is better at finding the models that share all features\n\t\t\tInteger score = - iAtts.size();\n\t\t\tif (!scoreCandidateMap.containsKey(score)) \n\t\t\t\tscoreCandidateMap.put(score, new HashSet<OWLObject>());\n\t\t\tscoreCandidateMap.get(score).add(candidate);\n\t\t\treporter.report(this,\"query_candidate_overlap_total\",queryObj,candidate,iAtts.size(),cAttsSize);\n\t\t}\n\t\t\n\t\tint n = 0;\n\t\tfor (Set<OWLObject> cs : scoreCandidateMap.values()) {\n\t\t\tn += cs.size();\n\t\t\thits.addAll(cs);\n\t\t}\n\t\t\n\t\tn = 0;\n\t\tfor (OWLObject hit : hits) {\n\t\t\tn++;\n\t\t\treporter.report(this,\"query_hit_rank_threshold\",queryObj,hit,n,maxHits);\n\t\t}\n\t\tif (hits.size() > maxHits)\n\t\t\thits = hits.subList(0, maxHits);\n\t\t\n\n\n\t\treturn hits;\n\t}", "@SuppressWarnings(\"hiding\")\n public MetricMatch(Instances train, Instances test) {\n // this is expensive but we need to keep the original data intact\n this.train = this.deepCopy(train);\n this.test = test; // we do not need a copy here because we do not drop attributes before\n // the matching and after the matching we create a new Instances with\n // only the matched attributes\n\n // convert metrics of testdata and traindata to later use in similarity tests\n this.train_values = new ArrayList<>();\n for (int i = 0; i < this.train.numAttributes(); i++) {\n if (this.train.classIndex() != i) {\n this.train_values.add(this.train.attributeToDoubleArray(i));\n }\n }\n\n this.test_values = new ArrayList<>();\n for (int i = 0; i < this.test.numAttributes(); i++) {\n if (this.test.classIndex() != i) {\n this.test_values.add(this.test.attributeToDoubleArray(i));\n }\n }\n }", "public TestCaseSimilarity(String updatedTestCaseId, String originalTestCaseId, double sim,\r\n String UCId)\r\n {\r\n updatedId = updatedTestCaseId;\r\n originalId = originalTestCaseId;\r\n similarity = sim;\r\n ucId = UCId;\r\n }", "public boolean isSimilar(String[] words1, String[] words2, String[][] pairs) {\n Map<UUID, Set<String>> sets = new HashMap<>();\n\n // create lookup from word to set\n Map<String, UUID> wordToSetId = new HashMap<>();\n\n for (String[] pair: pairs) {\n // case1:\n // no word is associated with any set id : create a new set\n if (!wordToSetId.containsKey(pair[0]) && !wordToSetId.containsKey(pair[1])) {\n UUID setId = createSet(sets);\n mapWordToSet(sets, wordToSetId, pair[0], setId);\n mapWordToSet(sets, wordToSetId, pair[1], setId);\n }\n // case2:\n // one word is associated with a setId and other is not: merge other word to found set\n if ((wordToSetId.containsKey(pair[0]) && !wordToSetId.containsKey(pair[1])) ||\n (!wordToSetId.containsKey(pair[0]) && wordToSetId.containsKey(pair[1]))\n ) {\n UUID setId = wordToSetId.get(pair[0]) != null ? wordToSetId.get(pair[0]) : wordToSetId.get(pair[1]);\n if (wordToSetId.get(pair[0]) == null) {\n mapWordToSet(sets, wordToSetId, pair[0], setId);\n }\n if (wordToSetId.get(pair[1]) == null) {\n mapWordToSet(sets, wordToSetId, pair[1], setId);\n }\n }\n // case3:\n // both words are associated with different setIds : merge sets to a new setId, update mapping from word to setId\n if (wordToSetId.containsKey(pair[0])\n && wordToSetId.containsKey(pair[1])\n && !wordToSetId.get(pair[0]).equals(wordToSetId.containsKey(pair[1]))) {\n UUID setId1 = wordToSetId.get(pair[0]);\n UUID setId2 = wordToSetId.get(pair[1]);\n // create a merged set\n UUID mergedSetId = createSet(sets);\n for (String word: sets.get(setId1)) {\n mapWordToSet(sets, wordToSetId, word, mergedSetId);\n }\n for (String word: sets.get(setId2)) {\n mapWordToSet(sets, wordToSetId, word, mergedSetId);\n }\n sets.remove(setId1);\n sets.remove(setId2);\n }\n\n // case4:\n // both words are associated with same setIds\n }\n\n boolean isSimilar = true;\n for (int i=0; i<words1.length;i++) {\n if (wordToSetId.get(words1[i]).equals(wordToSetId.get(words2[i]))) {\n System.out.println(words1[i] + \" and \"+ words2[i] + \" are similar\");\n } else {\n isSimilar = false;\n System.out.println(words1[i] + \" and \"+ words2[i] + \" are different\");\n }\n }\n return isSimilar;\n }", "private double getTverskyScore(Set<String> setOne, Set<String> setTwo) {\n\t\tdouble tverskyScore = 0.0;\n\t\tSet<String> intersectionOfSets = new HashSet<String>(setOne);\n\t\tintersectionOfSets.retainAll(setTwo);\t\t\n\t\t\n\t\tSet<String> differenceOfSets = new HashSet<String>(setOne);\n\t\tdifferenceOfSets.removeAll(setTwo);\n\t\ttverskyScore = (double) intersectionOfSets.size() / (intersectionOfSets.size() + differenceOfSets.size());\n\t\t\n\t\treturn tverskyScore;\n\t}", "private Node estimateRelevance(Node original) throws Exception {\n Node combineNode = new Node(\"combine\", new NodeParameters(), original.getInternalNodes(), original.getPosition());\n\n // Only get as many as we need\n Parameters localParameters = retrieval.getGlobalParameters().clone();\n int fbDocs = (int) retrieval.getGlobalParameters().get(\"fbDocs\", 10);\n localParameters.set(\"requested\", fbDocs);\n\n // transform and run\n Node transformedCombineNode = retrieval.transformQuery(combineNode, localParameters);\n List<ScoredDocument> initialResults = retrieval.executeQuery(transformedCombineNode, localParameters).scoredDocuments;\n \n // Gather content\n ArrayList<String> names = new ArrayList<String>();\n for (ScoredDocument sd : initialResults) {\n names.add(sd.documentName);\n }\n List<Document> docs = getDocuments(names);\n\n // Now the maps from the different information sources\n // Each of these is a term -> field -> score double-mapping\n HashMap<String, TObjectDoubleHashMap<String>> uCFSs = null;\n double ucfw = p.get(\"ucfw\", 1.0);\n if (ucfw != 0.0) {\n uCFSs = getUnigramCollFieldScores();\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> bCFSs = null;\n double bcfw = p.get(\"bcfw\", 1.0);\n if (bcfw != 0.0) {\n bCFSs = getBigramCollFieldScores();\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> uPRFSs = null;\n double uprfw = p.get(\"uprfw\", 1.0);\n if (uprfw != 0.0) {\n uPRFSs = getUnigramPRFScores(docs);\n }\n\n HashMap<String, TObjectDoubleHashMap<String>> bPRFSs = null;\n double bprfw = p.get(\"bprfw\", 1.0);\n if (bprfw != 0.0) {\n bPRFSs = getBigramPRFScores(docs);\n }\n\n // We can now construct term-field weights using our supplied lambdas\n // and scores\n Node termNodes = new Node(\"combine\", new NodeParameters(), new ArrayList<Node>(), 0);\n termNodes.getNodeParameters().set(\"norm\", false);\n TObjectDoubleHashMap<String> weights = new TObjectDoubleHashMap<String>();\n for (String term : queryTerms) {\n weights.clear();\n for (String field : fields) {\n double sum = 0.0;\n if (uCFSs != null) {\n sum += (ucfw * uCFSs.get(term).get(field));\n }\n\n if (bCFSs != null) {\n TObjectDoubleHashMap<String> termMap = bCFSs.get(term);\n if (termMap != null) {\n sum += (bcfw * termMap.get(field));\n }\n }\n\n if (uPRFSs != null) {\n sum += (uprfw * uPRFSs.get(term).get(field));\n }\n\n if (bPRFSs != null) {\n TObjectDoubleHashMap<String> termMap = bPRFSs.get(term);\n if (termMap != null) {\n sum += (bprfw * termMap.get(field));\n }\n }\n weights.put(field, sum);\n }\n termNodes.addChild(createTermFieldNodes(term, weights));\n }\n return termNodes;\n }", "private float similarity(PetriNet pn1, PetriNet pn2, int internal) {\n\t\tNewPtsSet nps1 = computeSequenceSet(pn1);\n\t\tNewPtsSet nps2 = computeSequenceSet(pn2);\n\t\tdouble[][] seqM = computeSeqMatrix(nps1, nps2);\n\t\tdouble sim = computeSimilarityForTwoNet_Astar(seqM, nps1, nps2);\n\t\treturn (float) sim;\n\t}", "@Override\r\n\tpublic double getTwoDiseaseSimilarity(String omimId1, String omimId2) {\r\n\t\tdouble similarity = (1 - alpha) * firstDiseaseSimilarity.getTwoDiseaseSimilarity(omimId1, omimId2);\r\n\t\tsimilarity += alpha * secondDiseaseSimilarity.getTwoDiseaseSimilarity(omimId1, omimId2);\r\n\t\t\r\n\t\treturn similarity;\r\n\t}", "@Test\n public void testSetRating() {\n final double delta = 0.0;\n final double expectedRating1 = 70.0;\n final double expectedRating2 = 65.0;\n final double expectedRating3 = 85.5;\n movie1.setRating(expectedRating1);\n movie2.setRating(expectedRating2);\n movie3.setRating(expectedRating1);\n movie4.setRating(expectedRating3);\n movie1.setRating(expectedRating2);\n assertEquals(expectedRating2, movie1.getRating(), delta);\n assertEquals(expectedRating2, movie2.getRating(), delta);\n assertEquals(expectedRating1, movie3.getRating(), delta);\n assertEquals(expectedRating3, movie4.getRating(), delta);\n }", "@Test\n\tpublic void equalGraphsWhichMatchTerms(){\n\t\tTerm term = new Term();\n\t\tterm.setName(\"tutorials\");\n\t\tterm.setNodeid(\"24\");\n\t\ttermRepository.save(term);\n\t\tList<Term> termList = termRepository.findTerms();\n\t\tAssert.assertEquals(\"tutorials\", term.getName());\n\t\tAssert.assertEquals(\"24\", term.getNodeid());\n\t}", "public void updateToAverageOf(Vector<DataPoint> objects) { \t\n double[] average = new double[values.length];\n for (int i = 0; i < objects.size(); i++) {\n \t//POEY comment: position is a calculated value of a pixel\n Position position = objects.elementAt(i).position;\n for (int j = 0; j < average.length; j++) {\n average[j] += position.values[j];\n }\n }\n for (int i = 0; i < average.length; i++) {\n \t//POEY comment: objects.size() = the number of members in a cluster\n average[i] /= objects.size();\n }\n values = average;\n }", "public double similarity(REPOverlap rep2) {\r\n\t\tdouble p = 0;\r\n\t\tint i = 0;\r\n\t\tfor (i=0;i<dist.length;i++) {\r\n\t\t\tp += Math.sqrt(dist[i]*rep2.dist[i]);\r\n\t\t}\r\n\t\treturn p;\r\n\t}", "static double calculateJaccardSimilarity(Set<String> queryTermIdSet, Set<String> documentTermIdSet) {\n if (queryTermIdSet.isEmpty() || documentTermIdSet.isEmpty()) {\n return 0;\n }\n\n // Intersection between QUERY termId set and DOCUMENT termId set\n Set<String> intersect = new HashSet<>(queryTermIdSet);\n intersect.retainAll(documentTermIdSet);\n\n // Union of DOCUMENT termId set and QUERY term Id set\n Set<String> union = new HashSet<>(documentTermIdSet);\n union.addAll(queryTermIdSet);\n\n // System.out.println();\n // System.out.println(\"Query:\" + queryTermIdSet);\n // System.out.println(\"Doc:\" + documentTermIdSet);\n // System.out.println(\"Intersect: \" + intersect.size() + \"\\tUnion: \" + union.size());\n return (double) intersect.size() / (double) union.size();\n }", "public static double getMatchScore(String obj1, String obj2) {\n\tint distance = getLevenshteinDistance(obj1, obj2);\n\tSystem.out.println(\"distance = \" + distance);\n\tdouble match = 1.0 - ((double)distance / (double)(Math.max(obj1.length(), obj2.length())));\n\t\n\tSystem.out.println(\"match is \" + match);\n\treturn match;\n }", "public static void main(String[] args) {\n\t\tHashSet set1 = new HashSet();\n\n\t\t/*\n\t\t * It creates empty HS object with specified initial capacity and\n\t\t * default fill ratio 0.75. \n\t\t * HashSet set2 = new HashSet(int initialCapacity);\n\t\t */\n\t\tHashSet set2 = new HashSet(20);\n\n\t\t/*\n\t\t * It creates equivalent HS object for given Collection\n\t\t * HashSet set3 = new HashSet(Collection c);\n\t\t */\n\t\tArrayList list = new ArrayList();\n\t\tlist.add(1);\n\t\tlist.add(1);\n\t\tSystem.out.println(\"List is \" + list);\n\t\tHashSet set3 = new HashSet(list);\n\t\tSystem.out.println(\"equivalent HashSet is \" + set3);\n\n\t}", "public void setCentroidsAsMeans();", "private SimilarDocument setFields(MinHashFeatures minHashFeatures, double similarityScore) {\n SimilarDocument addDoc = new SimilarDocument();\n addDoc.setSimilarityScore(similarityScore);\n addDoc.setFileName(minHashFeatures.getFileName());\n addDoc.setDocumentHash(minHashFeatures.getDocHashKey());\n addDoc.setContactInfo(minHashFeatures.getContactInfo());\n addDoc.setPublisherWalletAddress(minHashFeatures.getPublisherAddress());\n addDoc.setTimestamp(minHashFeatures.getTimestamp());\n return addDoc;\n }", "public interface SimilarityCalculator {\n\n /**\n * Calculates similarity between query and document.\n *\n * @param documentId Id of document.\n * @return Similarity.\n */\n double calculateScore(String documentId);\n}", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "public String getRelatedSubjectByPknows (double [] vector,String[] knowns){\n VectorSpaceModel vectorSpaceModel = new VectorSpaceModel();\n MongoCursor<Document> cr = subject.find().iterator();\n class similarities implements Comparable<similarities>{\n double sim = 0.0;\n ArrayList<String> docs;\n String skills;\n String name;\n\n public similarities(double s,ArrayList<String> d,String sk,String name){\n this.sim =s;\n this.docs = d;\n this.skills = sk;\n this.name = name;\n }\n @Override\n public int compareTo(similarities s1) {\n if (this.sim < s1.sim) return 1;\n else return -1;\n }\n }\n ArrayList<similarities> sims = new ArrayList<similarities>();\n ArrayList<Double> knowns_vector =new ArrayList<Double>() ;\n\n try {\n while (cr.hasNext()){\n Document sbj = cr.next();\n String tnp = (String)sbj.get(\"spaceVector\");\n String skills = (String)sbj.get(\"skills\");\n String [] doc_skills = skills.split(\",\");\n System.out.println(\"doc_skills\"+doc_skills[0]+(String)sbj.get(\"id\"));\n /* check length of docs knows and user skills in other having same vector length*/\n if (knowns.length>=doc_skills.length){\n /* Init ouput vector to need dimension */\n for (int i=0;i<knowns.length;i++){\n knowns_vector.add(i,new Double(0.0));\n }\n /* get skills of doc related to pknows */\n System.out.println(\"knows larger\");\n for (int i = 0; i<knowns.length;i++){\n if (knowns[i]!=null){\n\n int ind = Arrays.asList(doc_skills).indexOf(knowns[i]);\n if (ind!=-1){\n System.out.println(\"knows checking \"+knowns[i]+\" \"+skills);\n System.out.println(\"barruan \"+ind+\" \"+vector[i]);\n knowns_vector.add(ind,new Double(vector[i]));\n }\n else knowns_vector.add(new Double(0.0));\n }\n }\n }\n else {\n /* Init ouput vector to need dimension */\n for (int j=0;j<doc_skills.length;j++){\n knowns_vector.add(j,new Double(0.0));\n }\n for (int i = 0; i<knowns.length;i++){\n\t for (int x = 0 ; x<doc_skills.length;x++){\n\t\tif (doc_skills[x].equals(knowns[i])) knowns_vector.add(x,new Double(vector[i]));\n\t\telse knowns_vector.add(x,new Double(0.0));\n \n\t\t\t\n }\n }\n }\n ArrayList<String> docs = (ArrayList<String>) sbj.get(\"docs\");\n String [] vct = tnp.split(\",\");\n double[] vec1 = Arrays.stream(vct)\n .mapToDouble(Double::parseDouble)\n .toArray();\n double[] knowns_vector1 = knowns_vector.stream().mapToDouble(Double::doubleValue).toArray();\n\n double sim = vectorSpaceModel.getSimilarity(vec1,knowns_vector1);\n System.out.println(sim);\n if (sim>0.09){\n sims.add(new similarities(sim,docs,skills,(String)sbj.get(\"id\")));\n\n }\n }\n\n}\n finally {\n // cr.close();\n }\n Collections.sort(sims);\n String result = \"{\\\"docs\\\":[\";\n for(similarities sim:sims){\n System.out.println(sim.docs);\n System.out.println(sim.sim);\n result+=\"{\\\"name\\\":\\\"\"+sim.name+\"\\\",\\\"sim\\\":\"+sim.sim+\",\\\"skills\\\":\\\"\"+sim.skills+\"\\\",\\\"docs\\\":[\";\n for(String doc:sim.docs){\n result+=\"\\\"\"+doc+\"\\\",\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]},\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]}\";\n if (sims.size() ==0) return \"{\\\"docs\\\":[]}\";\n return result;\n}", "void setDisjoint(DisjointSet disjoint);", "@Test\n public void testComputeJaccardSimilarity() {\n // Test case 1\n String text = \"abcdef\";\n Set<String> actualKShingles = KShingling.getKShingles(3, text);\n Set<String> expectedKShingles = new HashSet<String>();\n expectedKShingles.add(\"abc\");\n expectedKShingles.add(\"bcd\");\n expectedKShingles.add(\"cde\");\n expectedKShingles.add(\"def\");\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n\n // Test case 2\n text = \"ab\";\n actualKShingles = KShingling.getKShingles(3, text);\n expectedKShingles = new HashSet<String>(); // No shingles is fine\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n\n // Test case 3\n text = \"abc def ghi\";\n actualKShingles = KShingling.getKShingles(4, text);\n expectedKShingles = new HashSet<String>();\n expectedKShingles.add(\"abc \");\n expectedKShingles.add(\"bc d\");\n expectedKShingles.add(\"c de\");\n expectedKShingles.add(\" def\");\n expectedKShingles.add(\"def \");\n expectedKShingles.add(\"ef g\");\n expectedKShingles.add(\"f gh\");\n expectedKShingles.add(\" ghi\");\n\n // Asserts that both sets have the same size.\n Assert.assertEquals(expectedKShingles.size(), actualKShingles.size());\n\n // Asserts that all elements of the expected set of shingles is included\n // in the actual sets of shingles.\n for (String kShingle : expectedKShingles) {\n Assert.assertTrue(actualKShingles.contains(kShingle));\n }\n }", "@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }", "@Test\n public void set() {\n float[] a = new float[] {1.001f, 2.002f, 3.003f, 4.004f, 5.005f, 6.006f}; \n float[] b = new float[] {2.0f, 1.0f, 6.0f, 3.0f, 4.0f, 5.0f};\n float[] expect = new float[] {1.0f, 6.0f, 3.0f, 4.0f};\n Vec4f.set(a, 2, b, 1);\n assertTrue(Vec4f.equals(a, 2, expect, 0));\n \n float[] expect2 = new float[] {2.0f, 1.0f, 6.0f, 3.0f};\n Vec4f.set(a, b);\n assertTrue(Vec4f.equals(a, expect2));\n \n \n float[] a3 = new float[] {1.001f, 2.002f, 3.003f, 4.004f, 5.005f, 6.006f}; \n float[] expect3 = new float[] {2.0f, 1.0f, 6.0f, 4.0f};\n Vec4f.set(a3,2, 2.0f, 1.0f, 6.0f, 4.0f );\n assertTrue(Vec4f.equals(a3, 2, expect3, 0));\n \n float[] a4 = new float[4]; \n float[] expect4 = new float[] {2.0f, 1.0f, 6.0f, 4.0f};\n Vec4f.set(a4, 2.0f, 1.0f, 6.0f, 4.0f );\n assertTrue(Vec4f.equals(a4, expect4));\n }", "public static double similarity(Library a, Library b) {\n double numerator = commonPhotos(a, b).size();\n if (a.numPhotos() == 0 || b.numPhotos() == 0) { // check if both libraries have 0 photos\n return 0;\n } else if (a.numPhotos() > b.numPhotos()) { // checking to see which number to divide by\n return numerator / b.numPhotos();\n } else {\n return numerator / a.numPhotos();\n }\n }", "@Test\n public void removeEqualWordsTest(){\n BotController botController = new BotController(clueService);\n List<Synonym> synonymsOfDiamond = botController.getSimilarWords(\"diamond\");\n //assume diamonds get return as synonym of diamond\n Synonym diamondsSynonym = new Synonym();\n diamondsSynonym.setWord(\"diamonds\");\n diamondsSynonym.setScore(1000);\n synonymsOfDiamond.add(diamondsSynonym);\n\n List<String> synonymsBeforeRemoving = new ArrayList<>();\n for(Synonym synonym: synonymsOfDiamond){\n synonymsBeforeRemoving.add(synonym.getWord());\n }\n synonymsOfDiamond = botController.removeEqualWords(synonymsOfDiamond,\"diamond\");\n List<String> synonymsAfterRemoving = new ArrayList<>();\n for(Synonym synonym: synonymsOfDiamond){\n synonymsAfterRemoving.add(synonym.getWord());\n }\n\n assertTrue(synonymsBeforeRemoving.contains(\"diamonds\"));\n assertFalse(synonymsAfterRemoving.contains(\"diamonds\"));\n\n\n }", "public boolean realEquals(Object o){\n\t\treturn keywords.equals(o);\n\t}", "@Override\r\n\tpublic double calculateDistance(Object obj1, Object obj2) {\r\n\t\treturn Math.abs(((String)obj1).split(\" \").length - \r\n\t\t\t\t((String)obj1).split(\" \").length);\r\n\t}", "@Override\n public double score(Map<BasedMining, Map<BasedMining, RateEvent>> preferences,\n BasedMining item1,\n BasedMining item2) {\n var sharedInnerItems = new ArrayList<BasedMining>();\n\n preferences.get(item1).forEach((innerItem, rateEvent) -> {\n if (preferences.get(item2).get(innerItem) != null) {\n sharedInnerItems.add(innerItem);\n }\n });\n\n// If they have no rating in common, return 0\n if (sharedInnerItems.size() > 0)\n return 0;\n\n// Add up the square of all the differences\n var sumOfSquares = preferences.get(item1).entrySet()\n .stream()\n .filter(entry -> preferences.get(item2).get(entry.getKey()) != null)\n .mapToDouble(entry -> Math.pow((entry.getValue().getRating() - preferences.get(item2).get(entry.getKey()).getRating()), 2.0))\n .sum();\n\n return 1 / (1 + sumOfSquares);\n }" ]
[ "0.69896066", "0.6571762", "0.64868313", "0.58374214", "0.5817897", "0.57963794", "0.57953316", "0.5784681", "0.57765734", "0.5747937", "0.5744577", "0.57284045", "0.56142277", "0.55551255", "0.55409205", "0.5521603", "0.5515605", "0.5513213", "0.54069716", "0.5394864", "0.5381873", "0.53511614", "0.533582", "0.53275466", "0.53204966", "0.52871543", "0.5278518", "0.5275135", "0.5229831", "0.521448", "0.51539934", "0.51134807", "0.5078266", "0.5077441", "0.50546366", "0.5052975", "0.50433254", "0.50349385", "0.50326127", "0.49796712", "0.49513346", "0.49447176", "0.49411336", "0.49157742", "0.4913754", "0.49092114", "0.48960236", "0.48900107", "0.4868154", "0.48544964", "0.48533538", "0.48365775", "0.48355445", "0.4830807", "0.4825954", "0.48197344", "0.48098943", "0.48061106", "0.48018774", "0.47789487", "0.4774884", "0.4774584", "0.47677672", "0.47603595", "0.47532764", "0.4734668", "0.47333705", "0.47326747", "0.47267562", "0.472564", "0.47093302", "0.47078514", "0.46994862", "0.46987927", "0.46972257", "0.46861294", "0.46806222", "0.46677014", "0.46670783", "0.46593314", "0.4659009", "0.465549", "0.46549815", "0.46505177", "0.4644187", "0.4627451", "0.4622767", "0.4621365", "0.4615165", "0.46109343", "0.46038866", "0.45884722", "0.4575377", "0.45736256", "0.45708197", "0.4562038", "0.45507053", "0.4548332", "0.4547752", "0.45427942" ]
0.73642373
0
returns the list of all objects in the first dimension (passed as 'first' parameter to the set() method)
public abstract Collection<T> getFirstDimension();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final ManagedElementList<VirtualMachine> getFirstSet() {\r\n return (ManagedElementList<VirtualMachine>) this.set1;\r\n }", "public Set<String>[] getFirst();", "public java.util.List<Dimension> getDimensionsAll();", "@Override\n public Shape[][] getInitialArray() {\n return allShapes;\n }", "public List<List<Seat>> getFirst() {\n\t\treturn first;\n\t}", "public Object[] getElements() {\r\n\t\treturn elements.clone();\r\n\t}", "E[] getAll();", "public abstract Collection<T> getSecondDimension();", "T[] getObjects() {\n\t\treturn this.array;\n\t}", "public Box[] getBoxes1D() {\n\t\tBox[] temp = new Box[size];\n\t\tint tempCounter = 0;\n\t\tfor (int j = 0; j < length; j++) {\n\t\t for (int i = 0; i < height; i++) {\n\t\t\t\ttemp[tempCounter] = boxes[i][j];\n\t\t\t\ttempCounter++;\n\t\t }\n\t\t}\n\t\treturn temp;\n }", "@Override\r\n\tpublic Object[] toArray() {\n\t\treturn set.toArray();\r\n\t}", "Object[] getChildArray();", "private void shallowPopulate()\n\t{\n\t\tfor(int y = 0; y < mySizeY; y++)\t\t \n\t\t\tfor(int x = 0; x < mySizeX; x++)\t\t\t\n\t\t\t\tadd(new FirstCell(this, x, y));\n\t}", "public List getTheObjects() {\r\n if (theObjects == null) {\r\n setTheObjects(new Vector());\r\n }\r\n return theObjects;\r\n }", "Set<Object> getAllCells() {\n Set<Object> ret = new HashSet<Object>();\n ret.addAll(getNodes());\n ret.addAll(getEdges());\n \n // ports\n for( DefaultGraphCell node : getNodes() ) {\n ret.add(node.getChildAt(0));\n }\n \n return ret;\n }", "public HashSet getElements() {\n\treturn elements;\n }", "public void firstElement() {\r\n \t\tcurrentObject = 0;\r\n \t}", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "public Product[] getAll() {\n Product[] list = new Product[3];\n try {\n list[0] = products[0].clone();\n list[1] = products[1].clone();\n list[2] = products[2].clone();\n } catch (CloneNotSupportedException ignored) {}\n\n return list;\n }", "public Object[] getList() {\n Object[] list = new Object[size()];\n copyInto(list);\n return list;\n }", "public Object firstElement();", "public ArrayList getAll() {\r\n\t\tArrayList list = new ArrayList();\r\n\t\tlist.addAll(getParticles());\r\n\t\tlist.addAll(getConstraints());\r\n\t\tlist.addAll(getComposites());\r\n\t\treturn list;\r\n\t}", "public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }", "public U getFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(0);\r\n\t }", "public Object[] getElements() {\r\n\t\treturn data.toArray();\r\n\t}", "public Object[] getElements(Object arg0) {\n\t\t\t\tRoomFactory roomFactory=(RoomFactory)arg0;\r\n\t\t\t\treturn roomFactory.getRoomList().toArray();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "@NonNull\n Collection<TObj> getAll() {\n Collection<TObj> result = new LinkedList<>();\n for (int countR = mData.size(), i = 0; i < countR; i++) {\n int rowKey = mData.keyAt(i);\n SparseArrayCompat<TObj> columns = mData.get(rowKey);\n for (int countC = columns.size(), j = 0; j < countC; j++) {\n int key = columns.keyAt(j);\n result.add(columns.get(key));\n }\n }\n return result;\n }", "public O[] toArray()\r\n {\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n O[] a = (O[]) new Object[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "private Object[] elements() {\n return elements.toArray();\n }", "public Object[] entrySet() {\n MyStack<Object> result = new MyStack<>();\n\n for (Object entry : this.table) {\n if (entry != null) {\n Entry<K, V> current = (Entry<K, V>) entry;\n\n while (current.hasNext()) {\n result.push(current);\n current = current.getNext();\n }\n result.push(current);\n }\n }\n return result.toArray();\n }", "public Object getFirstObject()\n {\n \tcurrentObject = firstObject;\n\n if (firstObject == null)\n \treturn null;\n else\n \treturn AL.get(0);\n }", "public List<Subset> getElements() {\n\t\treturn subSetList;\n\t}", "public GameObject[][] getGrid(){\n\t\t\r\n\t\treturn this.grid;\r\n\t}", "public Object getFirst()\n {\n return ((Node)nodes.elementAt(0)).data;\n }", "public java.util.ArrayList getClones();", "public ImmutableList<X> getXs() {\n return _xs;\n }", "private List<E> snapshot() {\n\t\tList<E> list = Lists.newArrayListWithExpectedSize(size());\n\t\tfor (Multiset.Entry<E> entry : entrySet()) {\n\t\t\tE element = entry.getElement();\n\t\t\tfor (int i = entry.getCount(); i > 0; i--) {\n\t\t\t\tlist.add(element);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@Override\n public Persona First() {\n return array.get(0);\n }", "public A getFirst() { return first; }", "public ArrayList<String> getObjects(){\n ArrayList<String> objs = new ArrayList<>();\n for (int i = 0; i < field.length; i++){\n objs.add(\"Asteroid\");\n }\n return objs;\n }", "public MyVector rest() {\n\t\tassert size() > 0;\n\t\tMyVector result = new MyVector();\n\t\tfor (int i = 1; i < size(); ++i) {\n\t\t\tresult.push(get(i));\n\t\t}\n\t\treturn result;\n\t}", "@Parameters\n // Método public static que devuelve un elemento iterable de array de objetos\n public static Iterable<Object[]> getData() {\n return Arrays.asList(new Object[][] {\n // Indicamos todas las pruebas {a, b, esperado}\n { 3, 1, 4 }, { 2, 3, 5 }, { 3, 3, 6 } });\n }", "@Parameters\r\n public static Collection<Object[]> data() {\r\n Object[][] data = new Object[][] { { -1 }, { 0 }, { 1 } };\r\n return Arrays.asList(data);\r\n }", "public abstract ArrayList<Cell> getSelfArray();", "public Object getFirst() {\n if (first == null)\n return null;\n return first.getInfo();\n }", "public WorldObject getFirstObject(){\r\n\t\treturn this.firstObject;\r\n\t}", "public Collection<GObject> getObjects();", "public K getFirst() {\r\n\t\treturn first;\r\n\t}", "public Position getFirst() {\n return positions[0];\n }", "@Override\n\tpublic ArrayList<Shape3D> display() {\n\t\treturn list;\n\t}", "public node getFirst() {\n\t\treturn head;\n\t\t//OR\n\t\t//getAt(0);\n\t}", "public ZYArraySet(){\n elements = (ElementType[])new Object[DEFAULT_INIT_LENGTH];\n }", "public SetOfTiles getSetOfTiles();", "public List<Integer> getDimensionList() \n {\n return this.dimList;\n }", "@Parameters\n public static Iterable<Object[]> getData() {\n List<Object[]> obj = new ArrayList<>();\n obj.add(new Object[] {3, 12});\n obj.add(new Object[] {2, 8});\n obj.add(new Object[] {1, 4});\n \n return obj;\n }", "Set<EObject> getAllModelElements();", "public void setFirst(List<List<Seat>> first) {\n\t\tthis.first = first;\n\t}", "@Override\n public List<E> allItems() {\n return new ArrayList(graphNodes.keySet());\n }", "HCollection values();", "public ListNode[] getChildren(){\n\t\tListNode[] ret = new ListNode[length()];\n\t\tListNode temp = firstNode;\n\t\tfor(int i = 0; i < ret.length && temp != null; i++){\n\t\t\tret[i] = temp;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\n\t\treturn ret;\n\t}", "public Array<Particle> getParticlesListIteration() {\n return new Array(masterList);\n }", "Collection<T> getSimpleModelObjects();", "public abstract List<Object> getAll();", "@Override\n\tCollection<T> internalElements() {\n\t\tCollection<T> values = new LinkedList<T>();\n\t\t\n\t\tfor(LinkedList<T> list : internalStorage.get(0).values()) {\n\t\t values.addAll(list);\t\n\t\t}\n\t\treturn values;\n\t}", "public List<Object> toList() {\n int i = this.capacityHint;\n int i2 = this.size;\n ArrayList arrayList = new ArrayList(i2 + 1);\n Object[] head2 = head();\n int i3 = 0;\n while (true) {\n int i4 = 0;\n while (i3 < i2) {\n arrayList.add(head2[i4]);\n i3++;\n i4++;\n if (i4 == i) {\n head2 = head2[i];\n }\n }\n return arrayList;\n }\n }", "public List<Square> getSquareGrid();", "public Object[][] getContents()\n {\n return contents;\n }", "Dimension[] getDimension()\n\t\t{\n\t\t\treturn d;\n\t\t}", "public Object[] selectOne() {\n return ensureAtMostOneRow(selectColumnsBuilder(metadata.getColumns()), null);\n }", "public E[] values(){\n\t\tE[] output = (E[]) new Object[howMany];\n\t\tint j = 0;\n\t\tfor (int i = 0; i < elem.length; i++)\n\t\t\tif (elem[i] != null){\n\t\t\t\toutput[j] = elem[i];\n\t\t\t\tj = j + 1;\n\t\t\t}\n\t\treturn output;\n\t}", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic ArrayList<Board1> getAll() {\n\t\treturn dao.selectAll();\r\n\t}", "Collection<V> getAllElements();", "public grille_chiffre(){\n\tgc=new Object[5][5];\n\tlst_8=new ArrayList<Object>();\n}", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "@Parameters\n\tpublic static Collection<Object[]> data() {\n\t\tObject[][] data = new Object[][] { \n\t\t\t{null, null, null, null, null},\n\t\t\t{null, \"\", null, null, null},\n\t\t\t{null, troppoLunga, null, null, null},\n\t\t};\n\t\treturn Arrays.asList(data);\n\t}", "private List<ElementInfo> rowOfElements(int first, \r\n Graphics2D g2, Rectangle2D bounds) {\r\n List<ElementInfo> result = new ArrayList<ElementInfo>();\r\n int index = first;\r\n boolean full = false;\r\n double w = getInsets().left + getInsets().right;\r\n while (index < this.elements.size() && !full) {\r\n TableElement element = this.elements.get(index);\r\n Dimension2D dim = element.preferredSize(g2, bounds);\r\n if (w + dim.getWidth() <= bounds.getWidth() || index == first) {\r\n result.add(new ElementInfo(element, dim));\r\n w += dim.getWidth() + this.hgap;\r\n index++;\r\n } else {\r\n full = true;\r\n }\r\n }\r\n return result;\r\n }", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "public Object[] toArray() {\n Object[] arr = new Object[size];\n for(int i = 0; i < this.size; i++) {\n arr[i] = this.get(i);\n }\n return arr;\n }", "public Shape[] getShapes() {\n return (Shape[]) shapes.clone();\n }", "protected Object[][] getContents() {\r\n return contents;\r\n }", "public abstract ArrayList<Shape> getShapes();", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "public Set(){\n setSet(new int[0]);\n }", "@Override\n\tpublic int getDimension() {\n\t\treturn 1;\n\t}", "@Override\n\tpublic int getDimension() {\n\t\treturn 1;\n\t}", "public Object[][] getContents() {\n return contents;\n }", "public ObjectList<DynamicPart[]> getSeeds() {\n ObjectList<DynamicPart[]> seeds = new ObjectArrayList<DynamicPart[]>();\n seeds.addAll(\n getCuboids().stream().map(cuboid -> cuboid.parts).collect(Collectors.toList()));\n return seeds;\n }", "List<Mallscroerule> selectAll();", "public ArrayList<ArrayList<Object>> getRowSet()\r\n {\r\n ArrayList<ArrayList<Object>> list = new ArrayList<>();\r\n try {\r\n int c = 0; \r\n while(c < rows)\r\n {\r\n rs.next();\r\n System.out.println(c);\r\n ArrayList<Object> obj = new ArrayList<>();\r\n int col = rs.getMetaData().getColumnCount();\r\n for(int i = 1; i < col; i++)\r\n {\r\n obj.add(rs.getObject(i));\r\n }\r\n list.add(obj);\r\n c++;\r\n }\r\n return list;\r\n \r\n } catch (SQLException ex) {\r\n return list;\r\n }\r\n }", "public Collection<T> values(){\n\t\treturn null;\r\n\t\t//TODO\r\n\t}", "public RenderObject[] getRenderObjects(){\n\t\tRenderObject[] objects = new RenderObject[sectors.length * sectors[0].length];\n\t\tfor(int i = 0; i < sectors.length; i++){\n\t\t\tfor(int j = 0 ; j < sectors[0].length; j++){\n\t\t\t\tobjects[i * sectors.length + j] = sectors[j][i].getRenderObject();\n\t\t\t}\n\t\t}\n\t\treturn objects;\n\t}", "public T getFirst() {\n return this.getHelper(this.indexCorrespondingToTheFirstElement).data;\n }", "public Object getFirst(){\n return pattern[0];\n }", "public Object[] getStartNodes ();", "public T getFirst()\n\t{\n\t\treturn head.getData();\n\t}", "@Override\n public Object[] toArray() {\n Object[] result = new Object[size];\n int i = 0;\n for (E e : this) {\n result[i++] = e;\n }\n return result;\n }", "public Object[] getGroupList() {\n return grouptabs.keySet().toArray();\n }", "public T1 getFirst() {\n\t\treturn first;\n\t}", "public Entity[][] entities() {\r\n\t\treturn this.entities;\r\n\t}" ]
[ "0.62858534", "0.606383", "0.6019345", "0.60091364", "0.56956506", "0.567629", "0.56606805", "0.56400204", "0.559018", "0.5529517", "0.5506714", "0.54800016", "0.5465883", "0.54648936", "0.54573697", "0.543651", "0.54299676", "0.5424618", "0.54205245", "0.53960115", "0.5381798", "0.53478247", "0.5347182", "0.5339009", "0.5321387", "0.53209615", "0.53141665", "0.5302862", "0.52825415", "0.5271978", "0.5267055", "0.5265896", "0.5262156", "0.5260043", "0.525918", "0.52539253", "0.5227589", "0.5220822", "0.52092654", "0.51957566", "0.51855963", "0.5169861", "0.5169723", "0.51671475", "0.51662886", "0.5156604", "0.5149465", "0.51094127", "0.51059216", "0.5104707", "0.5100393", "0.5094941", "0.5093455", "0.5087914", "0.5086077", "0.508227", "0.5081684", "0.5080364", "0.50765795", "0.50755036", "0.5065493", "0.5062549", "0.50597286", "0.50458467", "0.50393987", "0.50348866", "0.5033183", "0.50300133", "0.5026121", "0.502033", "0.50190365", "0.501429", "0.5008544", "0.5008008", "0.5001913", "0.5000429", "0.4997489", "0.4995098", "0.49935663", "0.4991227", "0.4988523", "0.49881732", "0.49841818", "0.49817917", "0.4980973", "0.4980973", "0.49741802", "0.49682584", "0.4955533", "0.49526468", "0.49515003", "0.49505565", "0.49499652", "0.49484533", "0.49389732", "0.49389374", "0.4935871", "0.4916494", "0.49158907", "0.49113658" ]
0.6968575
0
returns the list of all objects in the second dimension (passed as 'second' parameter to the set() method)
public abstract Collection<T> getSecondDimension();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final ManagedElementList<VirtualMachine> getSecondSet() {\r\n return (ManagedElementList<VirtualMachine>) this.set2;\r\n }", "Object[] getChildArray();", "@Override\r\n\tpublic Object[] toArray() {\n\t\treturn set.toArray();\r\n\t}", "public Object[] getElements() {\r\n\t\treturn elements.clone();\r\n\t}", "public List<Subset> getElements() {\n\t\treturn subSetList;\n\t}", "public java.util.List<Dimension> getDimensionsAll();", "public abstract Collection<T> getFirstDimension();", "T[] getObjects() {\n\t\treturn this.array;\n\t}", "public List<BPGNode> get() {\n List l = new ArrayList();\n l.add(n1);\n l.add(n2);\n return l;\n }", "public HashSet getElements() {\n\treturn elements;\n }", "public ArrayList<T> getElements(Point2D point);", "public Product[] getAll() {\n Product[] list = new Product[3];\n try {\n list[0] = products[0].clone();\n list[1] = products[1].clone();\n list[2] = products[2].clone();\n } catch (CloneNotSupportedException ignored) {}\n\n return list;\n }", "@Parameters\n // Método public static que devuelve un elemento iterable de array de objetos\n public static Iterable<Object[]> getData() {\n return Arrays.asList(new Object[][] {\n // Indicamos todas las pruebas {a, b, esperado}\n { 3, 1, 4 }, { 2, 3, 5 }, { 3, 3, 6 } });\n }", "public List<Square> getSquareGrid();", "public Object[][] get2DArray();", "public Set<MindObject> getDirectSubComponents(){\n return new HashSet<>();\n }", "E[] getAll();", "public Object[] getList() {\n Object[] list = new Object[size()];\n copyInto(list);\n return list;\n }", "public static Object[][] getData() {\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}", "public Point2D[] getGivenPoints(){ \n return this.points; \n }", "public List<Object> getValues();", "Dimension[] getDimension()\n\t\t{\n\t\t\treturn d;\n\t\t}", "public Object[] getValues();", "public Object[] getElements() {\r\n\t\treturn data.toArray();\r\n\t}", "public double[] getValues2() {\n return values2.clone();\n }", "Entry<V>[][] getList() {\n @SuppressWarnings(\"unchecked\")\n Entry<V>[][] res = new Entry[4][2 * sizeCache];\n int i = 0;\n for (Entry<V> e = list1.next; e != mid1.next; e = e.next) {\n res[0][i++] = e;\n }\n\n i = 0;\n for (Entry<V> e = mid1.next; e != list1; e = e.next) {\n res[1][i++] = e;\n }\n\n i = 0;\n for (Entry<V> e = list2.next; e != mid2.next; e = e.next) {\n res[2][i++] = e;\n }\n\n i = 0;\n for (Entry<V> e = mid2.next; e != list2; e = e.next) {\n res[3][i++] = e;\n }\n\n\n return res;\n }", "@Parameters\n public static Iterable<Object[]> getData() {\n List<Object[]> obj = new ArrayList<>();\n obj.add(new Object[] {3, 12});\n obj.add(new Object[] {2, 8});\n obj.add(new Object[] {1, 4});\n \n return obj;\n }", "public Object[] subList(int c){\n return Arrays.copyOf(data, c);\n }", "public GameObject[][] getGrid(){\n\t\t\r\n\t\treturn this.grid;\r\n\t}", "public abstract ArrayList<Cell> getSelfArray();", "public List<Integer> getDimensionList() \n {\n return this.dimList;\n }", "HCollection values();", "public O[] toArray()\r\n {\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n O[] a = (O[]) new Object[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "private Object[] elements() {\n return elements.toArray();\n }", "private List<E> snapshot() {\n\t\tList<E> list = Lists.newArrayListWithExpectedSize(size());\n\t\tfor (Multiset.Entry<E> entry : entrySet()) {\n\t\t\tE element = entry.getElement();\n\t\t\tfor (int i = entry.getCount(); i > 0; i--) {\n\t\t\t\tlist.add(element);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "Object[] getValues();", "Object[] getValues();", "List<List<Object>> getTableValues();", "protected Object[][] getContents() {\r\n return contents;\r\n }", "public Square[][] getSquares()\n {\n return squares;\n }", "public Object[][] getContents()\n {\n return contents;\n }", "public Set<String>[] getFirst();", "public ArrayList<ArrayList<Pokemon>> getlistOfNeighborhoods()\n\t{\n\t\treturn ((ArrayList<ArrayList<Pokemon>>)(listOfNeighborhoods.clone()));\n\t}", "@Override\n\tpublic List<Couple> couplelist2() {\n\t\treturn st.selectList(\"couplens.list2\");\n\t}", "public Square[][] getSquares() {\n \treturn squares;\n }", "public java.util.ArrayList getClones();", "@Override\n\tpublic Collection<V> values() {\n\t\tArrayList<V> valores = new ArrayList<V>();\n\t\tIterator it = tabla.iterator();\n\t\tint i = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tIterator it2 = tabla.get(i).valueSet().iterator();\n\t\t\tit.next();\n\t\t\tint j = 0;\n\t\t\twhile (it2.hasNext()) {\n\t\t\t\tit2.next();\n\t\t\t\tvalores.add(tabla.get(i).valueSet().get(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn new HashSet<V>(valores);\n\t}", "public List getTheObjects() {\r\n if (theObjects == null) {\r\n setTheObjects(new Vector());\r\n }\r\n return theObjects;\r\n }", "public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }", "public Object[][] getContents() {\n return contents;\n }", "public Iterable<E> getData(){\n return new Iterable<E>(){\n @Override\n public Iterator<E> iterator() {\n return structure.iterator();\n }\n };\n }", "public Object[] entrySet() {\n MyStack<Object> result = new MyStack<>();\n\n for (Object entry : this.table) {\n if (entry != null) {\n Entry<K, V> current = (Entry<K, V>) entry;\n\n while (current.hasNext()) {\n result.push(current);\n current = current.getNext();\n }\n result.push(current);\n }\n }\n return result.toArray();\n }", "public ArrayList<String> getObjects(){\n ArrayList<String> objs = new ArrayList<>();\n for (int i = 0; i < field.length; i++){\n objs.add(\"Asteroid\");\n }\n return objs;\n }", "public static Object[][] array2DCast2Objects(Object obj)\n\t\t\tthrows IllegalArgumentException {\n\t\t// TODO isArray, getType,Dim-Test refactor to MyArray?\n\t\tClass objClass = obj.getClass();\n\n\t\tif (!objClass.isArray()) {\n\t\t\tString errorMsg = \"Only Arrays allowed !\";\n\t\t\t// System.out.println(ToolBox.getCallerMethod(obj)+\": \"+errorMsg);\n\t\t\tthrow new IllegalArgumentException(errorMsg);\n\t\t} else {\n\t\t\tClass row1Class = Array.get(obj, 0).getClass();\n\t\t\tif (!row1Class.isArray()) {\n\t\t\t\tString errorMsg = \"Only 2 dim Arrays allowed !\";\n\t\t\t\t// System.out.println(ToolBox.getCallerMethod(obj)+\":\n\t\t\t\t// \"+errorMsg);\n\t\t\t\tthrow new IllegalArgumentException(errorMsg);\n\n\t\t\t}\n\t\t}\n\n\t\tObject[] rowArray = new Object[Array.getLength(obj)];\n\t\tint maxRowlength = 0;\n\t\tfor (int i = 0; i < rowArray.length; i++) {\n\t\t\trowArray[i] = Array.get(obj, i);\n\t\t\tint rowLength = Array.getLength(rowArray[i]);\n\t\t\tmaxRowlength = (rowLength > maxRowlength) ? rowLength\n\t\t\t\t\t: maxRowlength;\n\t\t\t// System.out.println(maxRowlength);\n\t\t}\n\n\t\tObject[][] twoDimArray = new Object[rowArray.length][maxRowlength];\n\t\tfor (int j = 0; j < twoDimArray.length; j++) {\n\t\t\ttwoDimArray[j] = arrayCast2Objects(rowArray[j]);\n\t\t}\n\t\treturn twoDimArray;\n\t}", "public Object[] getGroupList() {\n return grouptabs.keySet().toArray();\n }", "protected Object[][] getContents() {\n return RESOURCES;\n }", "public int[][] getworld(){\n return world;\n }", "public ObjectList<DynamicPart[]> getSeeds() {\n ObjectList<DynamicPart[]> seeds = new ObjectArrayList<DynamicPart[]>();\n seeds.addAll(\n getCuboids().stream().map(cuboid -> cuboid.parts).collect(Collectors.toList()));\n return seeds;\n }", "public Object[] toArray() {\n Object[] arr = new Object[size];\n for(int i = 0; i < this.size; i++) {\n arr[i] = this.get(i);\n }\n return arr;\n }", "@Parameters\r\n public static Collection<Object[]> data() {\r\n Object[][] data = new Object[][] { { -1 }, { 0 }, { 1 } };\r\n return Arrays.asList(data);\r\n }", "public Object[] getElements(Object arg0) {\n\t\t\t\tRoomFactory roomFactory=(RoomFactory)arg0;\r\n\t\t\t\treturn roomFactory.getRoomList().toArray();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "final public int[] getSubset() {\n\t\treturn subset;\n\t}", "protected Object[] getList() {\n return list;\n }", "Object[] elements(Object[] destination) {\n return elements.toArray(destination);\n }", "public Iterable<Point2D> points() {\n\n return bst.keys();\n }", "@Override\n public java.util.List<org.openxmlformats.schemas.drawingml.x2006.chart.CTUnsignedInt> getSecondPiePtList() {\n synchronized (monitor()) {\n check_orphaned();\n return new org.apache.xmlbeans.impl.values.JavaListXmlObject<>(\n this::getSecondPiePtArray,\n this::setSecondPiePtArray,\n this::insertNewSecondPiePt,\n this::removeSecondPiePt,\n this::sizeOfSecondPiePtArray\n );\n }\n }", "@NonNull\n Collection<TObj> getAll() {\n Collection<TObj> result = new LinkedList<>();\n for (int countR = mData.size(), i = 0; i < countR; i++) {\n int rowKey = mData.keyAt(i);\n SparseArrayCompat<TObj> columns = mData.get(rowKey);\n for (int countC = columns.size(), j = 0; j < countC; j++) {\n int key = columns.keyAt(j);\n result.add(columns.get(key));\n }\n }\n return result;\n }", "Array<Object> getInstanceValues();", "public abstract DtPropuesta[] getPropuestasPopulares();", "public Set list() {\n Set result = new HashSet();\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n result.addAll( catalog.list() );\n }\n return result;\n\n }", "public DList2 list(){\r\n return this.list;\r\n }", "private static Object[][] getData(Database d) {\n\t\tdb = d;\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}", "public Entity[][] entities() {\r\n\t\treturn this.entities;\r\n\t}", "Set<Object> getAllCells() {\n Set<Object> ret = new HashSet<Object>();\n ret.addAll(getNodes());\n ret.addAll(getEdges());\n \n // ports\n for( DefaultGraphCell node : getNodes() ) {\n ret.add(node.getChildAt(0));\n }\n \n return ret;\n }", "public List<Integer> getBySecond() {\n\t\treturn bySecond;\n\t}", "public SetOfTiles getSetOfTiles();", "public void getEntities() {\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tEntityA entityA = exampleDao.getOne(1);\r\n\t\tEntityB entityB3 = entityBDao.getOne(3);\r\n\t \tEntityB entityB2 = entityBDao.getOne(2);\r\n\t \tEntityB entityB1 = entityBDao.getOne(1);\r\n\r\n\t \t\r\n\r\n\t\tentityA.setEntityBList(Arrays.asList(entityB2,entityB3,entityB1));\r\n\r\n\t}", "@Override\n\tCollection<T> internalElements() {\n\t\tCollection<T> values = new LinkedList<T>();\n\t\t\n\t\tfor(LinkedList<T> list : internalStorage.get(0).values()) {\n\t\t values.addAll(list);\t\n\t\t}\n\t\treturn values;\n\t}", "public Block[][][] getCubes(){ return cubes; }", "public Connection[] getConnections(int x1, int x2, int y1, int y2){\n //TODO Resizeable\n Connection[] temp = new Connection[2];\n int tsize = 0;\n int i = floor(x1); //find largest key equal or smaller than x1\n int j = ceiling(x2); //find smallest key equal or greater than x2\n \n for(i; i<j; i++){\n int k = floor(connections[i], y1); //find largest key equal or smaller than y1, within array\n int l = ceiling(connections[i], y2); //find smallest key equal or greater than y2, within array\n \n connections[10].length = 100;\n connections[9].length = 50;\n \n for(k; k<l; k++){\n temp[tsize] = connections[i][k]);\n tsize++;\n }\n }\n return temp;\n }", "public synchronized <T extends EnvironmentalObject> Iterable<T> getEnvironmentalObjects(int x, int y, Class<T> type) {\n\t\treturn new FilteringIterable<>(type, this.grid.getObjects(x, y));\n\t}", "public String[][] get();", "public List<Dataset> getDatasets();", "@Override\n\tpublic ArregloDinamico<V> valueSet() {\n\t\tArregloDinamico<V> respuesta = new ArregloDinamico<V>(N);\n\t\tfor(int i = 0; i<M ; i++)\n\t\t{\n\t\t\tArregloDinamico<NodoTabla<K,V>> temporal = map.darElemento(i).getAll();\n\t\t\tfor(int j=0 ; j < temporal.size() ; j++)\n\t\t\t{\n\t\t\t\tNodoTabla<K,V> elemento = temporal.darElemento(j);\n\t\t\t\tif(elemento != null && elemento.darLlave() != null)\n\t\t\t\t\trespuesta.addLast(elemento.darValor());\t\n\t\t\t}\n\t\t}\n\t\treturn respuesta;\n\t}", "public void testConstructorWithMultiDimensionComplexTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_OBJECT, \"2\",\r\n \"{{object:ob1,object:ob2}, {object:ob2,object:ob1}}\"));\r\n root.addChild(createObject(\"object:ob1\", TYPE_OBJECT));\r\n root.addChild(createObject(\"object:ob2\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'A'.\", TYPE_OBJECT, array.getType());\r\n assertEquals(\"Dimension should be 2.\", 2, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n Object[] subArray1 = (Object[]) array1[0];\r\n Object[] subArray2 = (Object[]) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertEquals(\"Array[0] should have 2 elements.\", 2, subArray1.length);\r\n assertEquals(\"Array[1] should have 2 elements.\", 2, subArray2.length);\r\n\r\n assertEquals(\"Array[0][0] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), subArray1[0]);\r\n assertEquals(\"Array[0][1] should be object:ob2.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob2\"), subArray1[1]);\r\n assertEquals(\"Array[0][1] should be object:ob2.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob2\"), subArray2[0]);\r\n assertEquals(\"Array[0][0] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), subArray2[1]);\r\n }", "public Collection<GObject> getObjects();", "public Collection<MyNode> getNeighbors(){\r\n return new ArrayList<>(this.neighbors);\r\n }", "public Box[] getBoxes1D() {\n\t\tBox[] temp = new Box[size];\n\t\tint tempCounter = 0;\n\t\tfor (int j = 0; j < length; j++) {\n\t\t for (int i = 0; i < height; i++) {\n\t\t\t\ttemp[tempCounter] = boxes[i][j];\n\t\t\t\ttempCounter++;\n\t\t }\n\t\t}\n\t\treturn temp;\n }", "private Itemset[] getItemsets() {\n\t\t\treturn frequentItemsets.keySet().toArray(new Itemset[frequentItemsets.size()]);\n\t\t}", "public List<Object> toList() {\n int i = this.capacityHint;\n int i2 = this.size;\n ArrayList arrayList = new ArrayList(i2 + 1);\n Object[] head2 = head();\n int i3 = 0;\n while (true) {\n int i4 = 0;\n while (i3 < i2) {\n arrayList.add(head2[i4]);\n i3++;\n i4++;\n if (i4 == i) {\n head2 = head2[i];\n }\n }\n return arrayList;\n }\n }", "Object getTolist();", "@Override\n public Object[][] getContents() {\n return contents;\n }", "public Collection<T> values(){\n\t\treturn null;\r\n\t\t//TODO\r\n\t}", "ArrayList<Tile> getTilesPlayerTwo() throws RemoteException;", "public E[] values(){\n\t\tE[] output = (E[]) new Object[howMany];\n\t\tint j = 0;\n\t\tfor (int i = 0; i < elem.length; i++)\n\t\t\tif (elem[i] != null){\n\t\t\t\toutput[j] = elem[i];\n\t\t\t\tj = j + 1;\n\t\t\t}\n\t\treturn output;\n\t}", "public List<ValueObject> getValueObjects()\r\n {\r\n List<ValueObject> vos = new ArrayList<ValueObject>();\r\n vos.add(getValueObject());\r\n return vos;\r\n }", "public List<T> values();", "public grille_chiffre(){\n\tgc=new Object[5][5];\n\tlst_8=new ArrayList<Object>();\n}", "public MyVector rest() {\n\t\tassert size() > 0;\n\t\tMyVector result = new MyVector();\n\t\tfor (int i = 1; i < size(); ++i) {\n\t\t\tresult.push(get(i));\n\t\t}\n\t\treturn result;\n\t}", "Set<Point2D> getWallSet();" ]
[ "0.61871", "0.57969606", "0.5758048", "0.5648886", "0.5614812", "0.5614614", "0.55819374", "0.55573213", "0.5537813", "0.5533697", "0.55150443", "0.5498966", "0.54670036", "0.54443765", "0.54420114", "0.5422361", "0.541957", "0.54147065", "0.5407978", "0.5395037", "0.5335493", "0.5334082", "0.5304741", "0.530143", "0.52990335", "0.5285794", "0.52842385", "0.52758145", "0.52662444", "0.5262615", "0.5252474", "0.52468747", "0.52323025", "0.52192634", "0.52154034", "0.5209959", "0.5209959", "0.52056426", "0.5204957", "0.51944405", "0.51934314", "0.5184698", "0.5173862", "0.51722276", "0.5161148", "0.5153054", "0.51448697", "0.5138319", "0.5118897", "0.5111381", "0.51020145", "0.5100658", "0.51002085", "0.5093531", "0.5090927", "0.50860184", "0.5083264", "0.50819194", "0.5075274", "0.5065792", "0.50634426", "0.506172", "0.50589156", "0.5058691", "0.50585616", "0.5058186", "0.50479907", "0.5044431", "0.5034819", "0.5034681", "0.5032433", "0.5026963", "0.50241685", "0.5021696", "0.50207925", "0.50044596", "0.5001635", "0.5000556", "0.49985722", "0.49974772", "0.4983771", "0.49825516", "0.49776027", "0.49687377", "0.4967252", "0.49615368", "0.49580207", "0.49438182", "0.49356064", "0.4932873", "0.49309015", "0.4929182", "0.49282673", "0.49277163", "0.49272883", "0.49254182", "0.4921997", "0.49111444", "0.49103883", "0.4903316" ]
0.6753196
0
returns all objects in the second dimension that have a similarity > 0
public abstract Collection<T> getMatches(T first);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double calculateSimilarity(OWLObject a, OWLObject b);", "private Similarity getSimilarity(DisjointSets<Pixel> ds, int root1, int root2)\n {\n return null; //TODO: remove and replace this line\n }", "public float getSimilarity() {\n return similarity;\n }", "public double getSimilarity()\r\n {\r\n return similarity;\r\n }", "public void compareWithinClusters() {\n\t\tList<Cluster> clusterList = clusterDao.getClusterList();\n\n\t\tfor (Cluster cluster : clusterList) {\n\t\t\tList<Document> docList = documentDao.getDocListByClusterId(cluster.getId());\n\t\t\tint size = docList.size();\n\t\t\t\n\t\t\tdouble[][] matrix = new double[size][size];\n\t\t\t\n\t\t\tfor(int i =0; i<size; i++){\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (size > 1) {\n\t\t\t\t//List<Document> docList2 = docList1;\n\t\t\t\tfor (int i=0; i<size; i++){\n\t\t\t\t\tfor(int j=i+1; j<size; j++){\n\t\t\t\t\t\t//match docs docList.get(i) & docList.get(j)\n\t\t\t\t\t\tMap<String, Double> map = datumboxCaller.compareDocs(docList.get(i).getDocName(), docList.get(j).getDocName());\n\t\t\t\t\t\tmatrix[i][j] = map.get(\"Oliver\");\n\t\t\t\t\t\tmatrix[j][i] = map.get(\"Shingle\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//persist both metrics in a file \n\t\t\tpersist(matrix, cluster, docList);\n\t\t\t\n\t\t\t//printing the matrix\n\t\t\tSystem.out.println(\"\\nDocument Similarity Matrix for Cluster \"+cluster.getId());\n\t\t\tSystem.out.println(\"\\nOliver Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.println(docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nShingle Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.print(\"\\n\"+docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[j][i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//print ends\n\t\t\t\n\t\t}\n\n\t}", "public double similarity(REPOverlap rep2) {\r\n\t\tdouble p = 0;\r\n\t\tint i = 0;\r\n\t\tfor (i=0;i<dist.length;i++) {\r\n\t\t\tp += Math.sqrt(dist[i]*rep2.dist[i]);\r\n\t\t}\r\n\t\treturn p;\r\n\t}", "public int getSimilarity() {\n return similarity;\n }", "public List<OWLObject> search(OWLObject queryObj) {\n\t\tList<OWLObject> hits = new ArrayList<OWLObject>(maxHits);\n\t\tSystem.out.println(\"gettings atts for \"+queryObj+\" -- \"+simEngine.comparisonProperty);\n\t\tSet<OWLObject> atts = simEngine.getAttributeClosureFor(queryObj);\n\t\tSystem.out.println(\"all atts: \"+atts.size());\n\t\tif (atts.size() == 0)\n\t\t\treturn hits;\n\t\t\n\t\t// only compare using significant atts;\n\t\t// we don't do the same test on candidates as these will be removed by the\n\t\t// intersection operation. they will have a small effect on the score, as\n\t\t// we don't divide by the union, but instead the sum of sizes\n\t\tatts = filterNonSignificantAttributes(atts);\n\t\tSystem.out.println(\"filtered atts: \"+atts.size());\n\n\t\t//bloomFilter = new BloomFilter<OWLObject>(0.05, atts.size());\n\t\t//bloomFilter.addAll(atts);\n\t\t\t\t\n\t\tSortedMap<Integer,Set<OWLObject>> scoreCandidateMap = new TreeMap<Integer,Set<OWLObject>>();\n\t\t\n\t\tfor (OWLObject candidate : getCandidates()) {\n\t\t\tif (candidate.equals(queryObj))\n\t\t\t\tcontinue;\n\t\t\tSet<OWLObject> iAtts = simEngine.getAttributeClosureFor(candidate);\n\t\t\t//Set<OWLObject> iAtts = simEngine.getGraph().getAncestors(candidate);\n\n\t\t\tif (iAtts.size() == 0)\n\t\t\t\tcontinue;\n\t\t\tint cAttsSize = iAtts.size();\n\t\n\t\t\tiAtts.retainAll(atts);\n\t\t\t//Collection<OWLObject> iAtts = bloomFilter.intersection(cAtts);\n\t\t\t\n\t\t\t// simJ, one-sided, scaled by 1000\n\t\t\t// negate to ensure largest first\n\t\t\t//Integer score = - (iAtts.size() * 1000 / cAttsSize);\n\t\t\t\n\t\t\t// this biases us towards genes with large numbers of annotations,\n\t\t\t// but it is better at finding the models that share all features\n\t\t\tInteger score = - iAtts.size();\n\t\t\tif (!scoreCandidateMap.containsKey(score)) \n\t\t\t\tscoreCandidateMap.put(score, new HashSet<OWLObject>());\n\t\t\tscoreCandidateMap.get(score).add(candidate);\n\t\t\treporter.report(this,\"query_candidate_overlap_total\",queryObj,candidate,iAtts.size(),cAttsSize);\n\t\t}\n\t\t\n\t\tint n = 0;\n\t\tfor (Set<OWLObject> cs : scoreCandidateMap.values()) {\n\t\t\tn += cs.size();\n\t\t\thits.addAll(cs);\n\t\t}\n\t\t\n\t\tn = 0;\n\t\tfor (OWLObject hit : hits) {\n\t\t\tn++;\n\t\t\treporter.report(this,\"query_hit_rank_threshold\",queryObj,hit,n,maxHits);\n\t\t}\n\t\tif (hits.size() > maxHits)\n\t\t\thits = hits.subList(0, maxHits);\n\t\t\n\n\n\t\treturn hits;\n\t}", "@Override\n\tpublic float similarity(PetriNet pn1, PetriNet pn2) {\n\t\treturn similarity((PetriNet) pn1.clone(), (PetriNet) pn2.clone(), 1);\n\t}", "@Override\n protected double calcSimilarity(Cluster a, Cluster b) {\n List<Point> aItems = a.getItems();\n List<Point> bItems = b.getItems();\n\n // calculate the similarity of each item in a with every item in b,\n // save the min value in sim-variable\n double sim = Double.MAX_VALUE;\n for (Point x : aItems) {\n for (Point y : bItems) {\n double currSim = x.distanceTo(y);\n if (currSim < sim) {\n sim = currSim;\n }\n }\n }\n\n return sim;\n }", "public interface DimensionSimilarity {\n double similarity(double left, double right);\n}", "public Matrix2D executeSimilarity(List<DataObject> dataObjects) {\r\n\t\tint objectsCount = dataObjects.size();\r\n\t\tMatrix2D similarityMatrix = new Matrix2D(objectsCount);\r\n\t\t\r\n\t\tVideoMediaFile video1 = null;\r\n\t\tVideoMediaFile video2 = null;\r\n\t\t\r\n\t\tint p = 0;\r\n\t\tfor (int i = 0; i < objectsCount; i++) {\r\n\t\t\tfor (int j = i + 1; j < objectsCount; j++) {\r\n\t\t\t\tvideo1 = (VideoMediaFile) dataObjects.get(i);\r\n\t\t\t\tvideo2 = (VideoMediaFile) dataObjects.get(j);\r\n\t\t\t\t\r\n\t\t\t\tint similarValues = 0;\r\n\t\t\t\t\r\n\t\t\t\tint featureListSize = video1.getFeatureList().size();\r\n\t\t\t\tfor (int k = 0; k < featureListSize; k++) {\r\n\t\t\t\t\tMetaData video1MetaData = (MetaData) video1.getFeatureList().get(k);\r\n\t\t\t\t\tMetaData video2MetaData = (MetaData) video2.getFeatureList().get(k);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (video1MetaData.getId().equals(\"mediaDuration\") || \r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"mediaFileSize\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"mediaBitrate\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoFramerate\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"timebase\")) {\r\n\t\t\t\t\t\tdouble v1 = Double.valueOf(video1MetaData.getValue()).doubleValue();\r\n\t\t\t\t\t\tdouble v2 = Double.valueOf(video2MetaData.getValue()).doubleValue();\r\n\t\t\t\t\t\tdouble v3;\r\n\t\t\t\t\t\tif (v1 >= v2)\r\n\t\t\t\t\t\t\tv3 = ((v1 / v2) - 1) * 100;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tv3 = ((v2 / v1) - 1) * 100;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (v3 > 5.0)\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse if (video1MetaData.getId().equals(\"numberStreams\") || \r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoWidth\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoHeight\")) {\r\n\t\t\t\t\t\tint v1 = Integer.valueOf(video1MetaData.getValue()).intValue();\r\n\t\t\t\t\t\tint v2 = Integer.valueOf(video2MetaData.getValue()).intValue();\r\n\t\t\t\t\t\tif (v1 == v2)\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (video1MetaData.getId().equals(\"videoCodecType\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"audioCodecType\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"audioLanguage\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"samplerate\")) {\r\n\t\t\t\t\t\tString s1 = video1MetaData.getValue();\r\n\t\t\t\t\t\tString s2 = video1MetaData.getValue();\r\n\t\t\t\t\t\tif (s1.equals(s2))\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Calculate the similarity.\r\n\t\t\t\tdouble result = (double) similarValues / featureListSize;\r\n\t\t\t\tsimilarityMatrix.set(i, j, result);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setProgress((double)++p/objectsCount);\r\n\t\t}\r\n\t\t\r\n\t\treturn similarityMatrix;\r\n\t}", "public abstract Object[] getSimilarityFactors();", "private float distanceMoyenne(DMatchVector bestMatches){\n\n float DM=0.0f;\n for(int i=0;i<bestMatches.size();i++){\n\n DM+=bestMatches.get(i).distance();\n }\n\n DM=DM/bestMatches.size();\n return DM;\n\n }", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "public double computeSimilarity(int[] cluster1, int[] cluster2);", "@Test\n\tpublic void testStructureSimilarity2() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(false, false, true);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (01:01) +++ (01:30) Philipp (7)\n\t\t// 01.01.15: (01:20) ++++ (02:00) Philipp (7)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (01:01) +++ (01:30) Tobias (17)\n\t\t// 31.12.15: (01:10) +++++ (02:00) Tobias (17)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 3, \"01.01.2015 00:00:00\", \"01.01.2015 01:00:00\");\n\t\tloadData(\"Philipp\", 7, \"01.01.2015 01:01:00\", \"01.01.2015 01:30:00\");\n\t\tloadData(\"Philipp\", 7, \"01.01.2015 01:20:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 13, \"31.12.2015 00:00:00\", \"31.12.2015 01:00:00\");\n\t\tloadData(\"Tobias\", 17, \"31.12.2015 01:01:00\", \"31.12.2015 01:30:00\");\n\t\tloadData(\"Tobias\", 17, \"31.12.2015 01:10:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getStructureDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (01:01) +++ (01:30) Philipp (7)\n\t\t// 01.01.15: (01:20) ++++ (02:00) Philipp (7)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (01:01) +++ (01:30) Tobias (17)\n\t\t// 31.12.15: (01:10) +++++ (02:00) Tobias (17)\n\t\t// 31.12.15: (01:30) +++ (02:00) Tobias (17)\n\t\t// @formatter:on\n\t\tloadData(\"Tobias\", 17, \"31.12.2015 01:30:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 364);\n\n\t\tassertEquals(364, res.size());\n\t\tfor (int i = 0; i < 363; i++) {\n\t\t\tr = res.get(i);\n\t\t\tassertEquals(3.0, r.getStructureDistance(), 0.0);\n\t\t\tassertEquals(3.0, r.getTotalDistance(), 0.0);\n\t\t}\n\t\tr = res.get(363);\n\t\tassertEquals(3.5, r.getStructureDistance(), 0.0);\n\t\tassertEquals(3.5, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\tfor (TimeSeriesSimilarityCollection a : res) {\n\t\t\tSystem.out.println((Date) a.getLabelValue(0));\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}", "public abstract Collection<T> getMatchesAboveThreshold(T first,\n double similarityThreshold);", "public SimilarityScore sim(int eq1, int eq2);", "public Future<List<Object>> evaluateSimilarity(Serializable objectUnderComparison, List<Serializable> referenceObjects);", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "double squaredDistanceTo(IMovingObject m);", "private static void calculateSimilarity() {\n \tLOG.info(\"Begin calculating spatial similarity between users.\");\n \t\n\t\t// Get a list of all users\n \tNeo4JUserDAO uDao = (Neo4JUserDAO) DAOFactory.instance().getUserDAO();\n\t\tList<Node> users = uDao.findAll();\n\t\t\n\t\tint usersCount = users.size();\n \tLOG.debug(\"Found {} users.\", usersCount);\n\t\t\n\t\t// Instantiate all needed classes for similarity measurement\n\t\tNeo4JSequenceExtractor ex = new Neo4JSequenceExtractor();\n\t\tex.setFromLevel(clArgs.calcSimilarityFromLevel);\n\t\tex.setToLevel(clArgs.calcSimilarityToLevel);\n\t\t\n\t\tNeo4JSequenceMatcher matcher = new Neo4JSequenceMatcher(\n\t\t\t\tclArgs.calcSimilaritySplitThreshold, \n\t\t\t\tclArgs.calcSimilarityMinSequenceLength,\n\t\t\t\tclArgs.calcSimilarityTempConstraintThreshold);\n\t\tNeo4JSimilarityAnalyzer analyzer = new Neo4JSimilarityAnalyzer();\n\t\t\n\t\t// Create matrix that holds similarity results\n\t\tdouble[][] similarityResults = new double[usersCount][usersCount];\n\t\t\n\t\t// Go through all pair-wise user combinations\n \tfor (int i = 0; i < usersCount; i++) {\n\t\t\tNode userOne = users.get(i);\n\t\t\tObject userOneId = uDao.getUserId(userOne);\n\t\t\t\n\t\t\t// Set current first user for sequence extraction\n\t\t\tex.setUserNodeOne(userOne);\n\t\t\t\n\t\t\tfor (int j = i + 1; j < usersCount; j++) {\n\t\t\t\tNode userTwo = users.get(j);\n\t\t\t\tObject userTwoId = uDao.getUserId(userTwo);\n\t\t\t\tLOG.info(\"Calculate similarity between user [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\n\t\t\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\t\t\t// Step 1: Extract cluster sequences of two users based on their hierarchical graphs\n\t\t\t\t// Set current second user for sequence extraction\n\t\t\t\tex.setUserNodeTwo(userTwo);\n\t\t\t\tMap<Integer, SequenceWrapper> clusterSequences = null;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t// Start extraction of cluster sequences\n\t\t\t\t\tLOG.info(\"Step 1: Extraction of cluster sequences from level {} to level {}.\", clArgs.calcSimilarityFromLevel, clArgs.calcSimilarityToLevel);\n\t\t\t\t\tclusterSequences = ex.extract();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(\"An error occurred while extracting the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Step 2: Match the extracted cluster sequences to find maximal length similar sequences\n\t\t\t\tMap<Integer, List<Sequence<SimilarSequenceCluster>>> maxLengthSimilarSequences = null;\n\t\t\t\t\n\t\t\t\t// Matching is only possible if there is a valid result of step 1 \n\t\t\t\tif (clusterSequences != null && !clusterSequences.isEmpty()) {\n\t\t\t\t\tmatcher.setSequencesOnLevel(clusterSequences);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Start matching of cluster sequences\n\t\t\t\t\t\tLOG.info(\"Step 2: Matching of cluster sequences.\");\n\t\t\t\t\t\tmaxLengthSimilarSequences = matcher.match();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLOG.error(\"An error occurred while matching the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t// Step 3: Compute spatial similarity between the current two users\n\t\t\t\t\t// Similarity measurement is only possible with a valid result of step 2\n\t\t\t\t\tif (maxLengthSimilarSequences != null && !maxLengthSimilarSequences.isEmpty()) {\n\t\t\t\t\t\tanalyzer.setUserNodeOne(userOne);\n\t\t\t\t\t\tanalyzer.setUserNodeTwo(userTwo);\n\t\t\t\t\t\tanalyzer.setMaximalLengthSimilarSequencesOnLevel(maxLengthSimilarSequences);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Start similarity measurement\n\t\t\t\t\t\t\tLOG.info(\"Step 3: Similarity measurement.\");\n\t\t\t\t\t\t\tsimilarity = analyzer.analyze();\n\t\t\t\t\t\t\tLOG.debug(\"Final similarity score: {}\", similarity);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Save similarity value in result matrix\n\t\t\t\t\t\t\tsimilarityResults[i][j] = similarity;\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tLOG.error(\"An error occurred while measuring similarity between user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\t// END: step 3\n\t\t\t\t}\t// END: step 2\n\t\t\t}\t// END: user two loop\n\t\t}\t// END: user one loop\n \t\n \tLOG.info(\"Finished calculating spatial similarity.\");\n \t\n \t// Normalize the similarity scores from 0 to 1\n \tif (clArgs.normalization) {\n\t \tLOG.info(\"Normalizing similarity scores.\");\n\t \tsimilarityResults = SimilarityNormalizer.normalize(similarityResults);\n \t}\n \t\n \t// The evaluation is requested\n \tif (clArgs.evaluation) {\n \t\tLOG.info(\"Evaluation is enabled.\");\n \t\t\n \t\t// Calculate simple evaluation\n \t\tLOG.info(\"Calculate similarity evaluation values.\");\n \t\tSimilarityEvaluation evaluation = SimilarityEvaluator.evaluate(similarityResults);\n \t\t\n \t\t// Build up other information to include in the evaluation files\n \t\tList<String> otherInformation = new ArrayList<String>();\n \t\tif (clArgs.automation) {\n \t\t\t// Clustering information is only included if the automation task is running\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_XI);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsXi)));\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_MIN_POINTS);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsMinPoints)));\n \t\t}\n \t\t\n \t\t// Add simple metrics from similarity measurement\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MIN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMin())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MAX);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMax())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MEAN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getSimilarityMean())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILAR_USER_PAIRS);\n \t\totherInformation.add(String.valueOf(evaluation.getSimilarUserPairs()));\n \t\t\n \t\t// Write similarity results in a file\n \t\tLOG.info(\"Writing evaluation data to a file.\");\n \t\tArrayToCsvWriter.writeDoubles(similarityResults, clArgs.evaluationOutDir, otherInformation.toArray(new String[0]));\n \t}\n \t// Evaluation is not requested, write the similarity scores into the graph database\n \telse {\n \t\tLOG.info(\"Write similarity scores to the graph database.\");\n \t\t\n \t\tfor (int i = 0; i < similarityResults.length; i++) {\n \t\t\t// Get first user by id\n \t\t\tNode userOne = uDao.findUserById(i);\n \t\t\tfor (int j = i + 1; j < similarityResults.length; j++) {\n \t\t\t\tdouble similarityScore = similarityResults[i][j];\n \t\t\t\t// User pairs that are not similar (i.e., have a similarity score of zero) do not get a connection\n \t\t\t\tif (similarityScore > 0) {\n\t \t\t\t\t// Get second user by id\n\t \t\t\t\tNode userTwo = uDao.findUserById(j);\n\t \t\t\t\t\n\t \t\t\t\t// Add similarity relationship\n\t \t\t\t\tuDao.connectSimilarUsers(userOne, userTwo, similarityScore);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }", "public String getRelatedSubjectByPknows (double [] vector,String[] knowns){\n VectorSpaceModel vectorSpaceModel = new VectorSpaceModel();\n MongoCursor<Document> cr = subject.find().iterator();\n class similarities implements Comparable<similarities>{\n double sim = 0.0;\n ArrayList<String> docs;\n String skills;\n String name;\n\n public similarities(double s,ArrayList<String> d,String sk,String name){\n this.sim =s;\n this.docs = d;\n this.skills = sk;\n this.name = name;\n }\n @Override\n public int compareTo(similarities s1) {\n if (this.sim < s1.sim) return 1;\n else return -1;\n }\n }\n ArrayList<similarities> sims = new ArrayList<similarities>();\n ArrayList<Double> knowns_vector =new ArrayList<Double>() ;\n\n try {\n while (cr.hasNext()){\n Document sbj = cr.next();\n String tnp = (String)sbj.get(\"spaceVector\");\n String skills = (String)sbj.get(\"skills\");\n String [] doc_skills = skills.split(\",\");\n System.out.println(\"doc_skills\"+doc_skills[0]+(String)sbj.get(\"id\"));\n /* check length of docs knows and user skills in other having same vector length*/\n if (knowns.length>=doc_skills.length){\n /* Init ouput vector to need dimension */\n for (int i=0;i<knowns.length;i++){\n knowns_vector.add(i,new Double(0.0));\n }\n /* get skills of doc related to pknows */\n System.out.println(\"knows larger\");\n for (int i = 0; i<knowns.length;i++){\n if (knowns[i]!=null){\n\n int ind = Arrays.asList(doc_skills).indexOf(knowns[i]);\n if (ind!=-1){\n System.out.println(\"knows checking \"+knowns[i]+\" \"+skills);\n System.out.println(\"barruan \"+ind+\" \"+vector[i]);\n knowns_vector.add(ind,new Double(vector[i]));\n }\n else knowns_vector.add(new Double(0.0));\n }\n }\n }\n else {\n /* Init ouput vector to need dimension */\n for (int j=0;j<doc_skills.length;j++){\n knowns_vector.add(j,new Double(0.0));\n }\n for (int i = 0; i<knowns.length;i++){\n\t for (int x = 0 ; x<doc_skills.length;x++){\n\t\tif (doc_skills[x].equals(knowns[i])) knowns_vector.add(x,new Double(vector[i]));\n\t\telse knowns_vector.add(x,new Double(0.0));\n \n\t\t\t\n }\n }\n }\n ArrayList<String> docs = (ArrayList<String>) sbj.get(\"docs\");\n String [] vct = tnp.split(\",\");\n double[] vec1 = Arrays.stream(vct)\n .mapToDouble(Double::parseDouble)\n .toArray();\n double[] knowns_vector1 = knowns_vector.stream().mapToDouble(Double::doubleValue).toArray();\n\n double sim = vectorSpaceModel.getSimilarity(vec1,knowns_vector1);\n System.out.println(sim);\n if (sim>0.09){\n sims.add(new similarities(sim,docs,skills,(String)sbj.get(\"id\")));\n\n }\n }\n\n}\n finally {\n // cr.close();\n }\n Collections.sort(sims);\n String result = \"{\\\"docs\\\":[\";\n for(similarities sim:sims){\n System.out.println(sim.docs);\n System.out.println(sim.sim);\n result+=\"{\\\"name\\\":\\\"\"+sim.name+\"\\\",\\\"sim\\\":\"+sim.sim+\",\\\"skills\\\":\\\"\"+sim.skills+\"\\\",\\\"docs\\\":[\";\n for(String doc:sim.docs){\n result+=\"\\\"\"+doc+\"\\\",\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]},\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]}\";\n if (sims.size() ==0) return \"{\\\"docs\\\":[]}\";\n return result;\n}", "public long numSimilarities();", "public double getRealSimilarity()\r\n {\r\n double result = (1 - this.similarity) * 100;\r\n BigDecimal big = new BigDecimal(result).setScale(2, RoundingMode.UP);\r\n return big.doubleValue();\r\n }", "@Override\n public double similarity(SimComparator<OEMolBase> other, double minSim)\n { return similarity(other);\n }", "public List<Query> similarTerms() {\n return this.similarTerms;\n }", "@Override\n public double similarity(\n final Integer value1, final Integer value2) {\n\n // The value of nodes is an integer...\n return 1.0 / (1.0 + Math.abs(value1 - value2));\n }", "public static List<HashSet<Index>> findSetsOfOnes(int[][] twoDArray){\n Matrix matrix = new Matrix(twoDArray);\n List<HashSet<Index>> filtered = new ArrayList<>();\n mapOfOnes = getMapOfOnes(matrix, twoDArray);\n\n // Iterate over the map of indices\n // For each index find it's connected component,\n // then changing it's value to 0 in order to avoid duplications\n // Using auxiliary function: findingConnectedComponent.\n for(Map.Entry<Index, Integer> entry : mapOfOnes.entrySet()) {\n\n if (entry.getValue() == 1) {\n mapOfOnes.put(entry.getKey(), 0);\n HashSet<Index> temp = new HashSet<>(findingConnectedComponent(twoDArray, entry.getKey()));\n filtered.add(temp);\n }\n }\n // Sorting the list\n return filtered.stream()\n .sorted(Comparator.comparing(HashSet::size)).collect(Collectors.toList());\n }", "public interface PairwiseSimilarity {\n public double getMinValue();\n public double getMaxValue();\n public SRResultList mostSimilar(MostSimilarCache matrices, TIntFloatMap vector, int maxResults, TIntSet validIds) throws IOException;\n public SRResultList mostSimilar(MostSimilarCache matrices, int wpId, int maxResults, TIntSet validIds) throws IOException;\n}", "@Test void noisy() {\n\t\tstandardScene();\n\t\tsimulateScene(0);\n\n\t\tvar alg = new DistanceMetricTripleReprojection23();\n\n\t\tvar model = new MetricCameraTriple();\n\t\tmodel.view1.setTo(cameraA);\n\t\tmodel.view2.setTo(cameraB);\n\t\tmodel.view3.setTo(cameraC);\n\t\tmodel.view_1_to_2.setTo(truthView_1_to_i(1));\n\t\tmodel.view_1_to_3.setTo(truthView_1_to_i(2));\n\n\t\tmodel.view3.fx += 40; // this will mess things up a bit\n\n\t\talg.setModel(model);\n\n\t\tvar set = observations3.subList(0, 20);\n\t\tvar distances = new double[set.size()];\n\t\talg.distances(set, distances);\n\t\tfor (int i = 0; i < distances.length; i++) {\n\t\t\tassertTrue(distances[i] != 0.0);\n\t\t\tassertEquals(distances[i], alg.distance(set.get(i)), UtilEjml.TEST_F64);\n\t\t}\n\t}", "protected List<StringDoublePair> getSimilar(float[] vector, QueryConfig qc) {\n\t qc = setQueryConfig(qc);\n\t\tList<StringDoublePair> distances = this.selector.getNearestNeighbours(Config.getRetrieverConfig().getMaxResultsPerModule(), vector, \"feature\", qc);\n\t\tif(distances == null){\n\t\t\treturn new ArrayList<>(1);\n\t\t}\n\t\tfor(StringDoublePair sdp : distances){\n\t\t\tdouble dist = sdp.value;\n\t\t\tsdp.value = MathHelper.getScore(dist, maxDist);\n\t\t}\n\t\treturn distances;\n\t}", "public void getSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += (list.get(j).getValue() - iAverage) * (userRate- this.userAverageRate);\r\n\t\t\t\t\t\tb += (list.get(j).getValue() - iAverage) * (list.get(j).getValue() - iAverage);\r\n\t\t\t\t\t\tc += (userRate - this.userAverageRate) * (userRate - this.userAverageRate);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && c == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && b != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Create a heap storing the similarity pairs in a descending order.\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void setSimilarity(float value) {\n this.similarity = value;\n }", "public double getSimilarity(Pair<String, String> representations);", "public double similarity(String word,String word2) {\n if(word.equals(word2))\n return 1.0;\n\n INDArray vector = Transforms.unitVec(getWordVectorMatrix(word));\n INDArray vector2 = Transforms.unitVec(getWordVectorMatrix(word2));\n if(vector == null || vector2 == null)\n return -1;\n return Nd4j.getBlasWrapper().dot(vector,vector2);\n }", "@Test\n\tpublic void testStructureSimilarity1() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(false, false, true);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (7)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (17)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 3, \"01.01.2015 00:00:00\", \"01.01.2015 01:00:00\");\n\t\tloadData(\"Philipp\", 7, \"01.01.2015 00:00:00\", \"01.01.2015 01:00:00\");\n\t\tloadData(\"Tobias\", 13, \"31.12.2015 00:00:00\", \"31.12.2015 01:00:00\");\n\t\tloadData(\"Tobias\", 17, \"31.12.2015 00:00:00\", \"31.12.2015 01:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getStructureDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (7)\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (10)\n\t\t// 01.01.15: (00:00) + (00:10) Philipp (10)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (17)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (1)\n\t\t// 31.12.15: (01:01) ++++++ (02:00) Tobias (2)\n\t\t// 31.12.15: (00:00) + (00:10) Philipp (10)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 10, \"01.01.2015 00:00:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Philipp\", 10, \"01.01.2015 00:00:00\", \"01.01.2015 00:10:00\");\n\t\tloadData(\"Tobias\", 1, \"31.12.2015 00:00:00\", \"31.12.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 2, \"31.12.2015 01:01:00\", \"31.12.2015 02:00:00\");\n\t\tloadData(\"Philipp\", 10, \"31.12.2015 00:00:00\", \"31.12.2015 00:10:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MAX(SUM(IDEAS)) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\t// assertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(3.2, r.getStructureDistance(), 0.0);\n\t\tassertEquals(3.2, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\t}", "public String getRelatedSubject (double [] vector){\n VectorSpaceModel vectorSpaceModel = new VectorSpaceModel();\n MongoCursor<Document> cr = subject.find().iterator();\n class similarities implements Comparable<similarities>{\n double sim = 0.0;\n ArrayList<String> docs;\n public similarities(double s,ArrayList<String> d){\n this.sim =s;\n this.docs = d;\n }\n @Override\n public int compareTo(similarities s1) {\n if (this.sim < s1.sim) return 1;\n else return -1;\n }\n }\n ArrayList<similarities> sims = new ArrayList<similarities>();\n try {\n while (cr.hasNext()){\n Document sbj = cr.next();\n String tnp = (String)sbj.get(\"spaceVector\");\n ArrayList<String> docs = (ArrayList<String>) sbj.get(\"docs\");\n String [] vct = tnp.split(\",\");\n double[] vec1 = Arrays.stream(vct)\n .mapToDouble(Double::parseDouble)\n .toArray();\n double sim = vectorSpaceModel.getSimilarity(vec1,vector);\n if (sim>0.55){\n sims.add(new similarities(sim,docs));\n\n }\n }\n\n}\n finally {\n // cr.close();\n }\n Collections.sort(sims);\n String result = \"{\\\"docs\\\":[\";\n for(similarities sim:sims){\n System.out.println(sim.docs);\n System.out.println(sim.sim);\n result+=\"{\\\"sim\\\":\"+sim.sim+\",\\\"docs\\\":[\";\n for(String doc:sim.docs){\n result+=\"\\\"\"+doc+\"\\\",\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]},\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]}\";\n return result;\n}", "@Test\n\tpublic void testMeasureSimilarity() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(true, false, false);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 5, \"01.01.2015 00:00:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 5, \"31.12.2015 00:00:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a global measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 30.11.15: (00:10) +++++ (01:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 00:10:00\", \"30.11.2015 01:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS\", \"NAME='Philipp'\"), 1);\n\t\tr = res.get(0);\n\t\t// 70 minutes (00:00 - 00:09 and 01:01 - 02:00), each 5 => 350\n\t\tassertEquals(350.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(350.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// (00:10) ++++ (00:50) Edison (5)\n\t\t// 30.11.15: (00:00) +++++ (00:50) Edison (5) \n\t\t// (00:10) +++++ (01:00) Philipp (5)\n\t\t// (01:00) ++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Edison\", 5, \"30.11.2015 00:00:00\", \"30.11.2015 00:50:00\");\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 01:00:00\", \"30.11.2015 02:00:00\");\n\t\tloadData(\"Edison\", 5, \"01.01.2015 00:10:00\", \"01.01.2015 00:50:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS\", null), 1);\n\t\tr = res.get(0);\n\t\t// 1 minute (01:00:00), each 5 as value => 5\n\t\tassertEquals(5.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(5.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// fire one with dimensions\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// (00:10) ++++ (00:50) Edison (5)\n\t\t// 30.11.15: (00:00) +++++ (00:50) Edison (5) \n\t\t// (00:10) +++++ (01:00) Philipp (5)\n\t\t// (01:00) ++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MAX(SUM(IDEAS)) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\t// 1 minute (01:00:00), each 5 for the whole hour (* 60) as value => 300\n\t\tassertEquals(300.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(300.0, r.getTotalDistance(), 0.0);\n\t\tassertEquals(\"R20151130_0000_0059\", r.getLabelValue(0));\n\t}", "public void getCosineSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n//\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += userRate * list.get(j).getValue();\r\n\t\t\t\t\t\tb += userRate * userRate;\r\n\t\t\t\t\t\tc += list.get(j).getValue() * list.get(j).getValue();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && b == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && c != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "@Test void perfect() {\n\t\tstandardScene();\n\t\tsimulateScene(0);\n\n\t\tvar alg = new DistanceMetricTripleReprojection23();\n\n\t\tvar model = new MetricCameraTriple();\n\t\tmodel.view1.setTo(cameraA);\n\t\tmodel.view2.setTo(cameraB);\n\t\tmodel.view3.setTo(cameraC);\n\t\tmodel.view_1_to_2.setTo(truthView_1_to_i(1));\n\t\tmodel.view_1_to_3.setTo(truthView_1_to_i(2));\n\n\t\talg.setModel(model);\n\n\t\tfor (AssociatedTriple a : observations3) {\n\t\t\tassertEquals(0.0, alg.distance(a), UtilEjml.TEST_F64);\n\t\t}\n\n\t\tvar set = observations3.subList(4, 11);\n\t\tvar distances = new double[set.size()];\n\t\talg.distances(set, distances);\n\t\tfor (int i = 0; i < distances.length; i++) {\n\t\t\tassertEquals(0.0, distances[i], UtilEjml.TEST_F64);\n\t\t}\n\t}", "@Test\n\tpublic void testCountSimilarity() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(false, true, false);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 15, \"01.01.2015 00:00:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 5, \"31.12.2015 00:00:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a global measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MAX(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getCountDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 30.11.15: (00:10) +++++ (01:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 00:10:00\", \"30.11.2015 01:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MIN(IDEAS) AS IDEAS ON TIME.DEF.HOUR\",\n\t\t\t\t\t\t\"NAME='Philipp'\"), 1);\n\t\tr = res.get(0);\n\t\t// 70 minutes (00:00 - 00:09 and 01:01 - 02:00)\n\t\tassertEquals(70.0, r.getCountDistance(), 0.0);\n\t\tassertEquals(70.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// (00:10) ++++ (00:50) Edison (5)\n\t\t// 30.11.15: (00:00) +++++ (00:50) Edison (5) \n\t\t// (00:10) +++++ (01:00) Philipp (5)\n\t\t// (01:00) ++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Edison\", 5, \"30.11.2015 00:00:00\", \"30.11.2015 00:50:00\");\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 01:00:00\", \"30.11.2015 02:00:00\");\n\t\tloadData(\"Edison\", 5, \"01.01.2015 00:10:00\", \"01.01.2015 00:50:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\t// 1 minute (01:00:00)\n\t\tassertEquals(1.0, r.getCountDistance(), 0.0);\n\t\tassertEquals(1.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\t}", "public void similar(String tableName, String name) {\n String simName = null;\n float score = 11;\n float val = 0;\n int simCount = 0;\n if (tableName.equals(\"reviewer\")) {\n if (matrix.getReviewers().contains(name) != null) {\n // Node with the reference to the list we are comparing other\n // lists to\n ReviewerList.Node n = matrix.getReviewers().contains(name);\n // Gets the head to the DLList that we are comparing other lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n ReviewerList.Node n1 = matrix.getReviewers().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n RDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n node = n.getList().getHead();\n // Going through this list to find matching movies in\n // simList\n while (node != null) {\n simNode = simList.containsMovie(node\n .getMovieName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextMovie();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getReviewerName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n\n printSimilar(\"reviewer\", name, simName, score);\n }\n else {\n System.out.println(\"Reviewer |\" + name\n + \"| not found in the database.\");\n }\n }\n else {\n if (matrix.getMovies().contains(name) != null) {\n // Node with the reference to the list we are comparing\n // other lists to\n MSLList.Node n = matrix.getMovies().contains(name);\n // Gets the head to the DLList that we are comparing other\n // lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n MSLList.Node n1 = matrix.getMovies().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n MDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n // Going through this list to find matching movies\n // in simList\n node = n.getList().getHead();\n while (node != null) {\n simNode = simList.containsReviewer(node\n .getReviewerName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextReviewer();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getMovieName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n printSimilar(\"movie\", name, simName, score);\n }\n else {\n System.out.println(\"Movie |\" + name\n + \"| not found in the database.\");\n }\n }\n }", "@Override\r\n\t\t\tpublic double matchingItems(Query query) {\n\t\t\t\treturn 0;\r\n\t\t\t}", "public SmartList<Square> getNeighbors(Square square) {\n return this.squares.select(x -> x.isNeighborOf(square)).freeze();\n }", "private float similarity(PetriNet pn1, PetriNet pn2, int internal) {\n\t\tNewPtsSet nps1 = computeSequenceSet(pn1);\n\t\tNewPtsSet nps2 = computeSequenceSet(pn2);\n\t\tdouble[][] seqM = computeSeqMatrix(nps1, nps2);\n\t\tdouble sim = computeSimilarityForTwoNet_Astar(seqM, nps1, nps2);\n\t\treturn (float) sim;\n\t}", "protected double[] getPairCounts(Hashtable<Integer, Double> words) {\n\t\tdouble positiveCount = 0;\n\t\tdouble negativeCount = 0;\n\t\tfor(int word1 : words.keySet()){\n\t\t\tfor(int word2 : words.keySet()){\n\t\t\t\tif(word1 != word2){\n\t\t\t\t\tif(relatedPairs[word1].contains(word2)){\n\t\t\t\t\t\tpositiveCount+= words.get(word1) * words.get(word2); //pairs with feature same SG\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnegativeCount+= words.get(word1) * words.get(word2); // pairs with feature different SG\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new double[]{positiveCount, negativeCount};//return both\n\t}", "int getMatchedElements();", "private Table<String, String, Double> getSongSimilarityMatrix(DataSet testVisibleDataset)\n\t{\n\t\tTable<String, String, Double> itemSimMatrix = HashBasedTable.create();\n\t\t\n\t\tMap<String, Song> testSongMap = testVisibleDataset.getSongMap();\n\t\tMap<String, Song> trainSongMap = trainDataset.getSongMap();\n\t\t\n\t\tSet<String> testSongs = testSongMap.keySet();\n\t\tSet<String> allTrainSongs = trainSongMap.keySet();\n\t\tSet<String> trainSongsToEvaluate = AlgoUtils.getUnexploredSongs(testSongs, allTrainSongs);\n\n\t\tfor(String testSong : testSongs) {\n\t\t\tSet<String> testSongUsers = Sets.newHashSet(testSongMap.get(testSong).getListenersList());\n\t\t\tfor(String trainSong : trainSongsToEvaluate) {\n\t\t\t\tSet<String> trainSongUsers = Sets.newHashSet(trainSongMap.get(trainSong).getListenersList());\n\t\t\t\tint commonUsers = getCommonUsers(testSongUsers, trainSongUsers);\n\t\t\t\t// Optimization : Don't add to similarity matrix, if there are no common listeners\n\t\t\t\t// to these pair of songs.\n\n\t\t\t\tif(commonUsers == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble simScore = getSimScoreBwSongs(commonUsers, testSongUsers.size(), trainSongUsers.size());\n\t\t\t\titemSimMatrix.put(testSong, trainSong, simScore);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn itemSimMatrix;\n\t}", "public void invert() {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n Double sim = get(first, second);\n \n if(sim!=null && sim > 0.0) {\n set(first, second, 1.0/sim);\n }\n \n }\n \n }\n }", "public static void QueryArrayElement() {\n\t\tFindIterable<Document> findIterable = collection.find(gt(\"dim_cm\", 10));\r\n\t\tprint(findIterable);\r\n\t}", "public void computeNeighbourhoods(final SimilarityMap simMap) {\n\t\t\n\t\tfor (Integer simId: simMap.getIds()) { // iterate over all ids\n\t\t\t\n\t\t\t// for the current id, store all similarities in order of descending similarity in a sorted set\n\t\t\tSortedSet<ScoredThingDsc> ss = new TreeSet<ScoredThingDsc>();\n\t\t\t\n\t\t\tProfile profile = simMap.getSimilarities(simId); // get the similarity profile\n\t\t\tif (profile != null) {\n\t\t\t\tfor (Integer id: profile.getIds()) { // iterate over each id in the profile\n\t\t\t\t\tdouble sim = profile.getValue(id);\n\t\t\t\t\tif (sim > 0)\n\t\t\t\t\t\tss.add(new ScoredThingDsc(sim, id));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// get the k most similar users (neighbours)\n\t\t\tint counter = 0;\n\t\t\tfor (Iterator<ScoredThingDsc> iter = ss.iterator(); iter.hasNext() && counter < k; ) {\n\t\t\t\tScoredThingDsc st = iter.next();\n\t\t\t\tInteger id = (Integer)st.thing;\n\t\t\t\tthis.add(simId, id);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\t\n\t}", "@Test\n public void testCosineSimilarity() {\n SimilarityFunctions s = new SimilarityFunctions();\n\n double[] vector1 = new double[]{1, 2, 3};\n double[] vector2 = new double[]{2, 6, 3};\n double[] vector3 = new double[]{0, 1, 2};\n double[] vector4 = new double[]{2, 0, 0, 0};\n double[] vector5 = new double[]{1, 2.4, 3.9, 1};\n double[] vector6 = new double[]{1};\n double[] vector7 = new double[]{-1};\n\n assertEquals(0.8781440805693944, s.cosineSimilarity(vector1, vector2), .001);\n assertEquals(0.9561828874675149, s.cosineSimilarity(vector1, vector3), .001);\n assertEquals(0.7666518779999278, s.cosineSimilarity(vector2, vector3), .001);\n assertEquals(0.20865053489458874, s.cosineSimilarity(vector4, vector5), .001);\n assertEquals(-1.0, s.cosineSimilarity(vector6, vector7), .001);\n }", "public void testDifferentDotProducts() {\n List<ISpectrum> spectra = ClusteringTestUtilities.readISpectraFromResource();\n\n ISpectrum[] spectrums = (ISpectrum[]) spectra.toArray();\n\n int total = 0;\n int different = 0;\n ISimilarityChecker checker = new FrankEtAlDotProduct(0.5F, 15, true);\n ISimilarityChecker currentChecker = new FrankEtAlDotProductJohannes();\n\n Set<String> interestingIds = new HashSet<>();\n\n\n for (int i = 0; i < spectrums.length; i++) {\n ISpectrum psm1 = spectrums[i];\n for (int j = i + 1; j < spectrums.length; j++) {\n ISpectrum psm2 = spectrums[j];\n double dotOrg = checker.assessSimilarity(psm1, psm2);\n double dotNew = currentChecker.assessSimilarity(psm1, psm2);\n\n if (Math.abs(dotOrg - dotNew) > 0.00001) {\n different++;\n\n StringBuilder usedPeaksTester = new StringBuilder();\n\n // these are the really interesting cases\n dotOrg = checker.assessSimilarity(psm1, psm2);\n\n double noClosestPeak = dotNew;\n dotNew = currentChecker.assessSimilarity(psm1, psm2);\n String id2 = psm2.getId();\n String id1 = psm1.getId();\n interestingIds.add(id1);\n interestingIds.add(id2);\n\n // System.out.println(usedPeaksTester.toString());\n // System.out.printf(id2 + \":\" + id1 + \" \" + \"Old: %8.3f Newx: %8.3f New: %8.3f\\tDiff: %8.3f\\n\", dotOrg, noClosestPeak, dotNew, dotOrg - dotNew);\n }\n total++;\n\n }\n\n }\n\n List<String> sorted = new ArrayList<>(interestingIds);\n Collections.sort(sorted);\n // System.out.println(\"Interesting Ids\");\n for (String s : sorted) {\n // System.out.println(s);\n }\n\n\n TestCase.assertEquals(0, different);\n }", "private ArrayList<Rating> getSimilarities(String id){\n \n String moviefile = \"data/ratedmovies_short.csv\";\n String ratingsfile = \"data/ratings_short.csv\";\n \n RaterDatabase database = new RaterDatabase();\n database.initialize(ratingsfile);\n \n ArrayList<Rating> dot_list = new ArrayList<Rating>();\n \n Rater me = database.getRater(id);\n \n for (Rater rater : database.getRaters()){\n \n if(rater != me){\n \n double dot_product = dotProduct(me, rater);\n \n if (dot_product >= 0.0){\n \n Rating new_rating = new Rating(rater.getID() , dot_product);\n \n dot_list.add(new_rating);\n }\n \n }\n \n }\n \n Collections.sort(dot_list , Collections.reverseOrder());\n \n return dot_list;\n \n }", "public boolean checkRoth(Function sMap, Function jMap) {\n\t\tMilnorElement target = new MilnorElement();\n\t\tMilnorElement imJ = jMap.get(topClass());\n\t\tList<int[][]> coprodImJ = DualSteenrod.coproduct(imJ.getAsList());\n\t\t\n\t\tSystem.out.println(\"size of coprod im j: \" + coprodImJ.size());\n\t\t\n\t\tfor(int[][] tensor : coprodImJ) {\n\t\t\tMilnorElement mono1 = new MilnorElement(tensor[0]);\n\t\t\tMilnorElement mono2 = new MilnorElement(tensor[1]);\n\t\t\ttarget.add(Tools.multiplySums(mono1.getAsList(), sBar(mono2, sMap).getAsList()));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"size of target after 1 x s applied: \" + target.getAsList().size());\n\t\tlong time1 = System.nanoTime();\n\t\ttarget.reduceMod2();\n\t\t\n\t\tSystem.out.println(\"size after reduced mod 2: \" + target.getAsList().size() + \" (\" + ((double)(System.nanoTime()-time1))/1000000 +\" ms)\" );\n\t\treturn (target.isZero());\n\t}", "@Test\r\n public void testGroupSimilarity() throws Exception {\r\n final List<ICluster> originalCLuster = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster);\r\n List<ICluster> l1 = new ArrayList<ICluster>(originalCLuster);\r\n\r\n final List<ICluster> originalCLuster2 = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster2);\r\n List<ICluster> l2 = new ArrayList<ICluster>(originalCLuster2);\r\n\r\n ClusterListSimilarity cd = new ClusterListSimilarity(distanceMeasure);\r\n final List<ICluster> identical = cd.identicalClusters(l1, l2);\r\n\r\n Assert.assertEquals(originalCLuster.size(), identical.size());\r\n Assert.assertTrue(l1.isEmpty());\r\n Assert.assertTrue(l2.isEmpty());\r\n }", "@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }", "private Sim getSimilarity(Product p1, Product p2, double[] weights) {\n\t\tdouble d1 = 1 - matrix.getServiceMatrix()[p1.getNormalizedService()][p2\n\t\t\t\t.getNormalizedService()];\n\t\tdouble d2 = 1 - matrix.getCustomerMatrix()[p1.getNormalizedCustomer()][p2\n\t\t\t\t.getNormalizedCustomer()];\n\t\tdouble d3 = p1.getNormalizedFee() - p2.getNormalizedFee();\n\t\tdouble d4 = p1.getNormalizedAds() - p2.getNormalizedAds();\n\t\tdouble d5 = 1 - matrix.getSizeMatrix()[p1.getNormalizedSize()][p2\n\t\t\t\t.getNormalizedSize()];\n\t\tdouble d6 = 1 - matrix.getPromotionMatrix()[p1.getNormalizedPromo()][p2\n\t\t\t\t.getNormalizedPromo()];\n\t\tdouble d7 = p1.getNormalizedInterest() - p2.getNormalizedInterest();\n\t\tdouble d8 = p1.getNormalizedPeriod() - p2.getNormalizedPeriod();\n\t\tdouble sum = weights[0] * Math.pow(d1, 2) + weights[1]\n\t\t\t\t* Math.pow(d2, 2) + weights[2] * Math.pow(d3, 2) + weights[3]\n\t\t\t\t* Math.pow(d4, 2) + weights[4] * Math.pow(d5, 2) + weights[5]\n\t\t\t\t* Math.pow(d6, 2) + weights[6] * Math.pow(d7, 2) + weights[7]\n\t\t\t\t* Math.pow(d8, 2);\n\t\tdouble simValue = 1 / Math.sqrt(sum);\n\t\tSim sim = new Sim(p2, simValue);\n\t\treturn sim;\n\t}", "float getDistinctValues(Object elementID) throws Exception;", "public boolean percolates()\r\n { return uf.find(0) == uf.find(dimension*dimension + 1); }", "public static float assessComplexity(StereoMolecule mol) {\n\t\tint bondCount = Math.min(mol.getBonds()/2, MAX_BOND_COUNT);\n\n\t\tif (bondCount < 2)\n\t\t\treturn 0;\n\n\t\tmol.ensureHelperArrays(Molecule.cHelperSymmetrySimple);\n\t\tStereoMolecule fragment = new StereoMolecule(mol.getAtoms(), mol.getBonds());\n\t\tTreeSet<String> fragmentSet = new TreeSet<>();\n\t\tint[] atomMap = new int[mol.getAllAtoms()];\n\n\t\tboolean[][] bondsTouch = new boolean[mol.getBonds()][mol.getBonds()];\n\t\tfor (int atom=0; atom<mol.getAtoms(); atom++) {\n\t\t\tfor (int i=1; i<mol.getConnAtoms(atom); i++) {\n\t\t\t\tfor (int j=0; j<i; j++) {\n\t\t\t\t\tint bond1 = mol.getConnBond(atom, i);\n\t\t\t\t\tint bond2 = mol.getConnBond(atom, j);\n\t\t\t\t\tbondsTouch[bond1][bond2] = true;\n\t\t\t\t\tbondsTouch[bond2][bond1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tboolean[] bondIsMember = new boolean[mol.getBonds()];\n\t\tint maxLevel = bondCount - 2;\n\t\tint[] levelBond = new int[maxLevel+1];\n\t\tfor (int rootBond=0; rootBond<mol.getBonds(); rootBond++) {\n\t\t\tbondIsMember[rootBond] = true;\n\t\t\tint level = 0;\n\t\t\tlevelBond[0] = rootBond;\n\t\t\twhile (true) {\n\t\t\t\tboolean levelBondFound = false;\n\t\t\t\twhile (!levelBondFound && levelBond[level] < mol.getBonds()-1) {\n\t\t\t\t\tlevelBond[level]++;\n\t\t\t\t\tif (!bondIsMember[levelBond[level]]) {\n\t\t\t\t\t\tfor (int bond=rootBond; bond<mol.getBonds(); bond++) {\n\t\t\t\t\t\t\tif (bondIsMember[bond] && bondsTouch[bond][levelBond[level]]) {\n\t\t\t\t\t\t\t\tlevelBondFound = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (levelBondFound) {\n\t\t\t\t\tbondIsMember[levelBond[level]] = true;\n\t\t\t\t\tif (level == maxLevel) {\n\t\t\t\t\t\tmol.copyMoleculeByBonds(fragment, bondIsMember, true, atomMap);\n\t\t\t\t\t\tfragmentSet.add(new Canonizer(fragment).getIDCode());\n\t\t\t\t\t\tbondIsMember[levelBond[level]] = false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlevel++;\n\t\t\t\t\t\tlevelBond[level] = rootBond;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (--level < 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tbondIsMember[levelBond[level]] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbondIsMember[rootBond] = false;\n\t\t}\n\n\t\treturn (float)Math.log(fragmentSet.size()) / bondCount;\n\t}", "@SuppressWarnings(\"boxing\")\n public int[] getMatching() {\n if (this.n == -1 || this.m == -1) {\n throw new IllegalStateException(\"Graph size not specified.\");\n }\n if (this.n == 0) {\n return new int[0];\n }\n ensurePositiveWeights();\n\n // Step 0: Initialization\n this.eligibleS.clear();\n this.eligibleT.clear();\n for (Integer i = 0; i < this.n; i++) {\n this.sMatches[i] = -1;\n\n this.u[i] = this.maxWeight; // ambiguous on p. 205 of Lawler, but see p. 202\n\n // this is really first run of Step 1.0\n this.sLabels[i] = EMPTY_LABEL;\n this.eligibleS.add(i);\n }\n\n for (int j = 0; j < this.m; j++) {\n this.tMatches[j] = -1;\n\n this.v[j] = 0;\n this.pi[j] = Double.POSITIVE_INFINITY;\n\n // this is really first run of Step 1.0\n this.tLabels[j] = NO_LABEL;\n }\n\n while (true) {\n // Augment the matching until we can't augment any more given the\n // current settings of the dual variables.\n while (true) {\n // Steps 1.1-1.4: Find an augmenting path\n int lastNode = findAugmentingPath();\n if (lastNode == -1) {\n break; // no augmenting path\n }\n\n // Step 2: Augmentation\n flipPath(lastNode);\n for (int i = 0; i < this.n; i++)\n this.sLabels[i] = NO_LABEL;\n\n for (int j = 0; j < this.m; j++) {\n this.pi[j] = Double.POSITIVE_INFINITY;\n this.tLabels[j] = NO_LABEL;\n }\n\n // This is Step 1.0\n this.eligibleS.clear();\n for (int i = 0; i < this.n; i++) {\n if (this.sMatches[i] == -1) {\n this.sLabels[i] = EMPTY_LABEL;\n this.eligibleS.add(i);\n }\n }\n\n this.eligibleT.clear();\n }\n\n // Step 3: Change the dual variables\n\n // delta1 = min_i u[i]\n double delta1 = Double.POSITIVE_INFINITY;\n for (int i = 0; i < this.n; i++) {\n if (this.u[i] < delta1) {\n delta1 = this.u[i];\n }\n }\n\n // delta2 = min_{j : pi[j] > 0} pi[j]\n double delta2 = Double.POSITIVE_INFINITY;\n for (int j = 0; j < this.m; j++) {\n if ((this.pi[j] >= TOL) && (this.pi[j] < delta2)) {\n delta2 = this.pi[j];\n }\n }\n\n if (delta1 < delta2) {\n // In order to make another pi[j] equal 0, we'd need to\n // make some u[i] negative.\n break; // we have a maximum-weight matching\n }\n\n changeDualVars(delta2);\n }\n\n int[] matching = new int[this.n];\n for (int i = 0; i < this.n; i++) {\n matching[i] = this.sMatches[i];\n }\n return matching;\n }", "default Stream<Triple> witnesses(Triple... elements) {\n Set<Triple> toBeMatched = new HashSet<>(Arrays.asList(elements));\n return apex().carrier().elements().filter(witnes -> {\n return toBeMatched.stream().allMatch(target -> {\n return projections().anyMatch(morphism -> morphism.apply(witnes).map(target::equals).orElse(false));\n });\n });\n }", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "private static native void amFilter_0(long joint_nativeObj, long src_nativeObj, long dst_nativeObj, double sigma_s, double sigma_r, boolean adjust_outliers);", "int match(ArrayList<ImageCell> images);", "public void findCommunities() {\n\n\t\t// We copy the community of scale to scale+1\n\t\tfor (Object o : G) {\n\t\t\tNode i = (Node) o;\n\t\t\ti.addCommunity(scale + 1, i.getCommunity(scale));\n\t\t}\n\t\tscale++;\n\t\tG.setScaleMax(scale);\n\n\t\tString old_community;\n\t\tString current_community;\n\t\tString best_community = \"\";\n\t\tdouble dQ_max = 0;\n\t\tdouble dQ = 0;\n\t\t// double old_Q;\n\t\t// do {\n\t\t// old_Q = Q;\n\t\tfor (Object oi : G) {\n\t\t\tNode i = (Node) oi;\n\t\t\t// Node iH = (Node) nodesH.toArray()[k];\n\t\t\tdQ_max = 0;\n\t\t\tfor (Object oj : G) {\n\t\t\t\tNode j = (Node) oj;\n\t\t\t\tif (i != j && i.getCommunity(scale) != j.getCommunity(scale)) {\n\t\t\t\t\t// We put i into the community C of j\n\t\t\t\t\told_community = i.getCommunity(scale);\n\t\t\t\t\tcurrent_community = j.getCommunity(scale);\n\t\t\t\t\ti.editCommunity(scale, current_community);\n\t\t\t\t\t// We compute the modularity gain.\n\t\t\t\t\tdQ = computeModularityGain(i, current_community);\n\t\t\t\t\t// We keep the community with the highest gain.\n\t\t\t\t\tif (dQ > dQ_max) {\n\t\t\t\t\t\tdQ_max = dQ;\n\t\t\t\t\t\tbest_community = current_community;\n\t\t\t\t\t}\n\t\t\t\t\t// We put i back into its old community.\n\t\t\t\t\ti.editCommunity(scale, old_community);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// We put i into the best community.\n\t\t\tif (dQ_max > 0) {\n\t\t\t\ti.editCommunity(scale, best_community);\n\t\t\t\t// iH.editCommunity(scale, best_community);\n\t\t\t}\n\t\t}\n\t\tcomputeModularity();\n\t\t// } while (old_Q != Q);\n\t}", "private List<Point> neighboursFiltering(List<Point> points) {\n Point nearest = points.get(0);\n HeartDistance calculator = new HeartDistance();\n return points.stream().filter(p -> calculator.calculate(p,nearest) < NEIGHBOURS_THRESHOLD).collect(Collectors.toList());\n }", "public List<SquareAbstract> getSquaresWithSameCol(SquareAbstract square){ //passed square won't be in the returned list\n List<SquareAbstract> squareList = new ArrayList<>();\n for(int i = 0; i<squares.size(); i++){\n for(int j = 0; j<squares.get(i).size(); j++){\n if(squares.get(i).get(j) != null)\n if(squares.get(i).get(j).getCol() == square.getCol() && squares.get(i).get(j) != square)\n squareList.add(squares.get(i).get(j));\n\n }\n }\n return squareList;\n }", "@Override\n public int[] getBestMolecule() {\n int bestWeight = 0;\n int indexOfBestMolecule = 0;\n for (int unusedMoleculeIndex = 0; unusedMoleculeIndex < this.getUnusedMolecules().size(); unusedMoleculeIndex++) {\n int[] curr = this.getUnusedMolecules().get( unusedMoleculeIndex ).getAtoms();\n int weight = this.getUnusedParameterIndexCounts()[ curr[0] ] + this.getUnusedParameterIndexCounts()[ curr[1] ];\n log.debug(String.format(\"Pair %d: [%s,%s], Weight: %2d\", unusedMoleculeIndex, scenario.getParameterValues().get(curr[0]), scenario.getParameterValues().get (curr[1]), weight));\n \n //If the new pair is weighted more highly than the previous, make it the new \"best\"\n if (weight > bestWeight) {\n bestWeight = weight;\n indexOfBestMolecule = unusedMoleculeIndex;\n }\n }\n \n //log and return the best pair\n int[] best = this.getUnusedMolecules().get(indexOfBestMolecule).getAtoms();\n log.debug(String.format(\"Best pair is [%s, %s] at %d with weight %d\", scenario.getParameterValues().get(best[0]), scenario.getParameterValues().get(best[1]), indexOfBestMolecule, bestWeight));\n return best;\n }", "@Override\r\n\tpublic String getSimilarityExplained(String string1, String string2) {\r\n //todo this should explain the operation of a given comparison\r\n return null; //To change body of implemented methods use File | Settings | File Templates.\r\n }", "public static void compare () {\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++) {\r\n if (d[i][j] != adjacencyMatrix[i][j])// here \r\n {\r\n System.out.println(\"Comparison failed\");\r\n \r\n return;\r\n }\r\n }\r\n }\r\n System.out.println(\"Comparison succeeded\");\r\n }", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public Set<String> calculateDistance() throws IOException {\n booleanSearch();\n\n Set<String> words = invertedIndexForQuerryWords.keySet();\n Map<String, Double> tfidfQuerry = new TreeMap<>();\n\n //load idf\n char c='a';\n char prC = 'v';\n for (String word : words){\n c = word.charAt(0);\n if(c != prC) {\n String path = Constants.PATH_TO_IDF + c + \"IDF.idf\";\n prC = c;\n idfMap.putAll(objectMapper.readValue(new File(path), new TypeReference<TreeMap<String, Double>>(){}));\n }\n }\n\n Map<String, Double> distanceMap = new HashMap<>();\n double sum = 0.0;\n //calculez norma interogarii\n for(String word:words){\n double idf, tf;\n if(idfMap.containsKey(word)) {\n idf = idfMap.get(word);\n tf = 1.0 / words.size();\n tfidfQuerry.put(word, tf * idf);\n\n sum += (tf * idf) * (tf * idf);\n } else {\n sum += 0.0;\n }\n }\n\n double normQuerry = Math.sqrt(sum);\n\n //iau toate documentele rezultate din boolean search\n Set<String> docs = new TreeSet<>();\n for(List<MyPair> list : invertedIndexForQuerryWords.values()) {\n if (list != null) {\n docs.addAll(list.stream().map(p -> p.getKey()).collect(Collectors.toSet()));\n }\n }\n\n List<File> documents = FileLoader.getFilesForInternalPath(\"Norms\", \".norm\");\n\n Map<String, Double> norms = new HashMap<>();\n for(File file : documents) {\n norms.putAll(objectMapper.readValue(file, new TypeReference<TreeMap<String, Double>>(){}));\n }\n\n //pentru fiecare document din boolean search calculez distanta cosinus\n for(String doc : docs) {\n\n String fileName = Paths.get(doc).getFileName().toString();\n\n String filePath = Constants.PATH_TO_TF + fileName.replaceFirst(\"[.][^.]+$\", \".tf\");\n\n Map<String, Double> tf = objectMapper.readValue(new File(filePath), new TypeReference<TreeMap<String, Double>>(){});\n double wordTF, wordIDF;\n double vectorialProduct = 0.0;\n double tfidfForQueryWord;\n\n for(String word : words) {\n if (tf.containsKey(word)) {\n wordTF = tf.get(word);\n wordIDF = idfMap.get(word);\n tfidfForQueryWord = tfidfQuerry.get(word);\n\n vectorialProduct += tfidfForQueryWord * wordIDF * wordTF;\n }\n }\n\n double normProduct = normQuerry * norms.get(Paths.get(doc).getFileName().toString());\n\n distanceMap.put(doc, vectorialProduct / normProduct);\n }\n\n //sortare distance map\n distanceMap = distanceMap.entrySet().stream()\n .sorted(Map.Entry.comparingByValue(Collections.reverseOrder()))\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n Map.Entry::getValue,\n (e1, e2) -> e1,\n LinkedHashMap::new));\n\n// System.out.println(\"Cos distance:\");\n// for(Map.Entry entry : distanceMap.entrySet()){\n// System.out.println(entry);\n// }\n\n return distanceMap.keySet();\n }", "double computeSimilarity(double[] vector1, double[] vector2) {\n\n // We need doubles for these so the math is done correctly. Else we only\n // return 1 or 0.\n double nDifferences = 0.;\n double lengthOfVector = (double) vector1.length;\n\n for (int i = 0; i < vector1.length; i++) {\n if (vector1[i] != vector2[i]) {\n nDifferences ++;\n }\n } \n return (1. - (nDifferences/lengthOfVector));\n }", "@Test\n\tpublic void testNoZeroGFnorm() {\n\t\t\n\t\tList<Term> terms = termino.getTerms().values().stream()\n\t\t\t\t.filter(t-> t.getGeneralFrequencyNorm() == 0)\n\t\t\t\t.collect(Collectors.toList());\n\n\t\tassertThat(terms).isEmpty();\n\t}", "public Collection<IntPair> findEmptyNeighbors(int x, int y);", "public ReferenceNode searchMatchNodeForDist(double[] data) {\n ReferenceNode node = nodeList.get(0);\n double distSqr = node.calculateDistanceSqrForLearning(data);\n ReferenceNode winningNode = node;\n double newDistSqr = 0.0d;\n for (int i = 1; i < nodeList.size(); i++) {\n node = nodeList.get(i);\n newDistSqr = node.calculateDistanceSqrForLearning(data);\n if (newDistSqr < distSqr) {\n winningNode = node;\n distSqr = newDistSqr;\n }\n }\n return winningNode;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void colleceRelatedPairs() {\n\t\trelatedPairs = new HashSet[words.size()];\n\t\tfor(int i = 0; i < relatedPairs.length; i++){\n\t\t\tSet<Integer> related = new HashSet<Integer>();\n\t\t\trelatedPairs[i] = related;\n\t\t}\n\t\t\n\t\tlong uniquePairs = 0;\n\t\tfor(int i = 0; i < words.size(); i++){\n\t\t\tif(goodWords.get(i)){\n\t\t\t\tString word1 = words.get(i);\n\t\t\t\tfor(int j = i+1; j < words.size(); j++){\n\t\t\t\t\tif(goodWords.get(j)){\n\t\t\t\t\t\tString word2 = words.get(j);\n\t\t\t\t\t\t\n\t\t\t\t\t\tuniquePairs++;\n\t\t\t\t\t\tint similarity = binDst.getSimilarity(word1, word2);\n\t\t\t\t\t\tif(similarity == 1){\n\t\t\t\t\t\t\t//System.out.println(word1 + \"\\t\" + word2);\n\t\t\t\t\t\t\taddPair(i, j);\n\t\t\t\t\t\t\taddPair(j, i);\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(i % 1000 == 0){\n\t\t\t\tLOGGER.info(\"Pairs: \" + i);\n\t\t\t}\n\t\t}\n\t\tLOGGER.info(\"Unique Pairs: \" + uniquePairs);\n\t}", "public int[] findClusterCorrespondence(int[] idx1, int[] idx2) {\n\t\tint n = idx1.length;\n\t\tif (n != idx2.length) {\n\t\t\tSystem.out.println(\"Cluster Utils: findClusterCorrespondence: idx1 and idx2 has to have same number of elements\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// find unique values in idx1 and idx2\n\t\tUniqueResult<Integer> ur_idx1 = utils.findUnique(idx1);\n\t\tUniqueResult<Integer> ur_idx2 = utils.findUnique(idx2);\n\t\tif (ur_idx1.domain.length != ur_idx2.domain.length) {\n\t\t\tSystem.out.println(\"Cluster Utils: findClusterCorrespondence: idx1 and idx2 has different number of clusters\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// find Jaccard coefficient\n\t\tdouble[][] J = findJaccardIndex(idx1, idx2);\n\t\t\n\t\t// use Hungarian method - use any kind of Hungarian algorithm\n\t\tHungarianAlgorithm h = new HungarianAlgorithm();\n\t\t@SuppressWarnings(\"static-access\")\n\t\tint[][] match = h.hgAlgorithm(J, \"max\");\n\t\t\n\t\t// print match matrix\n\t\tif (verbose) {\n\t\t\tSystem.out.println(\"Hunguarian Cost Matrix\");\n\t\t\tutils.printMatrix(match);\n\t\t}\n\t\t\n\t\t// relabel the idx2\n\t\tif (verbose) System.out.println(\"Class correspondents matrix:\");\n\t\tint[] target = idx1.clone();\n\t\tfor (int i = 0; i < match.length; i++) {\n\t\t\tint idx1_index = ur_idx1.domain[match[i][0]];\n\t\t\tint idx2_index = ur_idx2.domain[match[i][1]];\n\t\t\tif (verbose) System.out.printf(\"%d\\t%d\", idx1_index, idx2_index);\t\t\t\n\t\t\tif (idx1_index != idx2_index) {\n\t\t\t\tif (verbose) System.out.printf(\"\\t(will replace all %d in idx2 by %d)\", idx2_index, idx1_index);\n\t\t\t\tboolean[] index = utils.getIndexByValue(idx2, idx2_index);\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (index[j]) target[j] = idx1_index;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (verbose) System.out.printf(\"\\n\");\n\t\t}\n\t\t\n\t\tif (verbose) {\n\t\t\tint v_tt = 15;\n\t\t\tif (target.length < v_tt) v_tt = target.length;\n\t\t\tSystem.out.printf(\"Printing first %d elements of input and output arrays\\n\", v_tt);\n\t\t\tSystem.out.printf(\"IDX1\\tIDX2\\tFINAL IDX\\n\");\n\t\t\tfor (int i = 0; i < v_tt; i++) System.out.printf(\"%d\\t%d\\t%d\\n\", idx1[i], idx2[i], target[i]);\n\t\t}\n\t\t\n\t\treturn target;\n\t}", "protected double getClusterMleSim2(int qdocId, int targetDocId) {\n\t\tSystem.out.println(qdocId);\n\n\t\tdouble sim = 1;\n\t\tdouble[] qTermProb = termProb[qdocId];\n\t\tdouble[] tTermProb = termProb[targetDocId];\n\t\tdouble[] qPseudoProb = pseudoTermWeight[qdocId];\n\t\t\n\t\tint[] qTerm = tfidf.termIndex[qdocId];\n\t\tint[] tTerm = tfidf.termIndex[targetDocId];\n\t\tint[] qPseudoTerm = pseudoTermIndex[qdocId];\n\t\t\n\t\tint[] qTf = tfidf.tf[qdocId];\n\t\tint[] tTf = tfidf.tf[targetDocId];\n\t\tdouble[] qPseudoTf = pseudoTf[qdocId];\n\t\t\n\t\tint qi = 0;\n\t\tint pseudoQi = 0;\n\t\tint ti = 0;\n\t\t\n\t\tfor (qi=0; qi<qPseudoTerm.length; qi++) {\n\t\t\tdouble pseuduFreq = qPseudoTf[qi];\n\t\t\tint term = qPseudoTerm[qi];\n\t\t\tdouble weight = 0; \n\t\t\tint pos = Arrays.binarySearch(tTerm, term);\n\t\t\tif (pos >= 0) {\n\t\t\t\tweight += lambda * tTermProb[pos];\n\t\t\t}\n\t\t\tweight += (1-lambda) * collTw[term];\n\t\t\tsim *= Math.pow(weight, pseuduFreq);\n\t\t\t\n\t\t\t/*****************/\n//\t\t\tsim /= Math.pow(collTw[term], freq);\n\t\t\t/*****************/\n\t\t}\n\t\treturn sim;\n\t}", "@RequestMapping(value = \"get_items_similarity\",headers=\"Accept=*/*\", method={RequestMethod.GET},produces=\"application/json\")\n\t@ResponseBody\n\tpublic double getItemsSimilarity(@RequestParam(\"title1\") String title1,\n\t\t\t@RequestParam(\"title2\") String title2){\n\t\t//:TODO your implementation\n\t\tdouble ret = 0.0;\n\t\t\n\t\tUser[] usersObj1 = getUsersByItem(title1);\n\t\tUser[] usersObj2 = getUsersByItem(title2);\n\t\t\n\t\tArrayList<String> users1 = new ArrayList<String>();\n\t\tArrayList<String> users2 = new ArrayList<String>();\n\t\t\n\t\t// get usernames to arrays of string names\n\t\tfor (User user : usersObj1){\n\t\t\tusers1.add(user.getUsername());\n\t\t}\n\t\t\n\t\tfor (User user : usersObj2){\n\t\t\tusers2.add(user.getUsername());\n\t\t}\n\t\t\n\t\t// Intersection list\n\t\tSet<String> intersectionSet = users1.stream()\n\t\t\t\t .distinct()\n\t\t\t\t .filter(users2::contains)\n\t\t\t\t .collect(Collectors.toSet());\n\t\t\n\t\t// get sets of users by two titles \n\t\tSet<String> U1 = new HashSet<String>(users1);\n\t\tSet<String> U2 = new HashSet<String>(users2);\n\t\t\n\t\tU1.addAll(U2); // union\n\t\t\n\t\tif(U1.size() == 0) {\n\t\t\treturn ret;\n\t\t}\n\t\t\n\t\tret = ((double) intersectionSet.size()) / ((double) U1.size());\n\t\t\n\t\treturn ret;\n\t}", "boolean similarCard(Card c);", "public int isSymmetric(Region r) {\n\t\tif (!sizeEquals(r))\n\t\t\treturn 0;\n\t\t\n\t\tint res=0;\n\t\tfor (int i=0;i<Math.min(sizeX, r.sizeX);i++) {\n\t\t\tfor (int j=0;j<Math.min(sizeY, r.sizeY);j++) {\n\t\t\t\tif (this.get(i, j)!=r.get(r.sizeX-i-1, j))\n\t\t\t\t\tres++;\n\t\t\t}\n\t\t}\n\t\tif (res<square/10)\n\t\t\treturn 1;\n\t\t\n\t\tres=0;\n\t\tfor (int i=0;i<Math.min(sizeX, r.sizeX);i++) {\n\t\t\tfor (int j=0;j<Math.min(sizeY, r.sizeY);j++) {\n\t\t\t\tif (this.get(i, j)!=r.get(i, r.sizeY-j-1))\n\t\t\t\t\tres++;\n\t\t\t}\n\t\t}\n\t\tif (res<square/10)\n\t\t\treturn 2;\n\t\t\n\t\treturn 0;\n\t}", "public ArrayList<Record> near()\n {\n int count = 0;\n ArrayList<Record> closest = new ArrayList<>();\n System.out.println(\"Community Centres that are 5km or less to your location are: \");\n for(Record i: cCentres)\n {\n //latitude and longitude for each centre\n double lat2 = Double.parseDouble(i.getValue(4));\n double lon2 = Double.parseDouble(i.getValue(3));\n ;\n //distance\n double dist = calcDist(lat2, lon2, cCentres);\n if(dist<=5)\n {\n System.out.println(i + \", Distance: \" + dist + \" km\");\n closest.add(i);\n }\n }\n return closest;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic double calculateSimilarity(String tag1, String tag2) {\n\t\tHashMap<String, ArrayList<HashMap<String, HashSet<String>>>> userMap = db.getUserMap();\n\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\tfor(String user : userMap.keySet()){\n\t\t\n\t\t\tHashMap<String, HashSet<String>> tagsMap = userMap.get(user).get(1);\n\t\t\tint totalTags = tagsMap.keySet().size();\n\t\t\t\n\t\t\tif(null == tagsMap.get(tag1) || null == tagsMap.get(tag2))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tHashMap<String, HashSet<String>> resourcesMap = userMap.get(user).get(0);\n\t\t\t\n\t\t\tdouble userSimilarity = 0.0;\n\t\t\t\n\t\t\tfor(String resource : resourcesMap.keySet()){\n\t\t\t\tHashSet<String> tags = resourcesMap.get(resource);\n\t\t\t\t\n\t\t\t\tif(tags.contains(tag1) && tags.contains(tag2)){\n\t\t\t\t\tuserSimilarity += Math.log(\n\t\t\t\t\t\t\t( (double) tags.size() ) /\n\t\t\t\t\t\t\t( ( (double) totalTags ) + 1.0 )\n\t\t\t\t\t\t\t);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsimilarity += -userSimilarity;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn similarity; //rounding is necessary to match the results given at: www2009.org/proceedings/pdf/p641.pdf\n\t\t\n\t}", "private List<Mapping> linearCombination(SimilarityMatrix mtrx, SimilarityMatrix forbidden)\n\t{\n\t\tMapping mp=null;\n\t\tdouble sim=0;\n\t\tList<Mapping> lst=new ArrayList<Mapping>();\n\t\tCrossCountQuality ccq=new CrossCountQuality(mtrx);\n\t\tSimilarityScoreDefinitness ssh=new SimilarityScoreDefinitness(mtrx);\n\t\tInverseOf invSSD=new InverseOf(ssh);\n\t\tfor(int i=0;i<mtrx.getRows();i++)\n\t\t{\n\t\t\tfor(int j=0;j<mtrx.getColumns();j++)\n\t\t\t{\n\t\t\t\tif (forbidden.getSimilarity(i, j)==1.0)\n\t\t\t\t\tcontinue;\n\t\t\t\tmp=mtrx.get(i, j);\n\t\t\t\tsim=alpha*ccq.getQuality(null, i, j)+beta*(invSSD.getQuality(null, i, j));\n\t\t\t\tmp.setSimilarity(sim);\n\t\t\t\tlst.add(mp);\n\n\t\t\t}\n\t\t}\n\t\treturn lst;\n\t\t\n\t}", "public double compareImages(ImageSub img1, ImageSub img2) {\n\t\tdouble[] channels = new double[3];\n\t\tdouble sumOfSquares = 0;\n\t\tfor(int i = 0; i < channels.length; i++) {\n\t\t\tchannels[i] = Imgproc.compareHist(img1.cvChannels.get(i), img2.cvChannels.get(i), Imgproc.CV_COMP_BHATTACHARYYA);\n\t\t\t\n\t\t\t//Uncomment this. Comment the line above\n\t\t\t//channels[i] = SSIM.compareImages(img1.cvChannels.get(i), img2.cvChannels.get(i));\n\t\t\tsumOfSquares += channels[i];\n\t\t}\n\t\tsumOfSquares /= channels.length;\n\t\t//System.out.println(sumOfSquares);\n\t\treturn sumOfSquares;\n\t}", "public float compare(Cluster other) {\n \treturn compare(center, other.center);\n }", "public double compute(Object o1, Object o2) throws jcolibri.exception.NoApplicableSimilarityFunctionException {\n\t\tif ((o1 == null) || (o2 == null))\n\t\t\treturn 0;\n\t\tif (!(o1 instanceof java.lang.Number))\n\t\t\tthrow new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), o1.getClass());\n\t\tif (!(o2 instanceof java.lang.Number))\n\t\t\tthrow new jcolibri.exception.NoApplicableSimilarityFunctionException(this.getClass(), o2.getClass());\n\n\n\t\tNumber i1 = (Number) o1;\n\t\tNumber i2 = (Number) o2;\n\t\treturn (double) compare(i1.doubleValue(), i2.doubleValue());\n\t}", "public double getValue(Object o) {\n for (SimilarResult result : results) {\n if (result.getObj().equals(o)) {\n return result.getValue();\n }\n }\n return 0;\n }", "public void calculate(Set<Article> articles) {\n \n Set<ArticleDocument> articleDocuments = new HashSet<>();\n for (Article article : articles) {\n articleDocuments.add(article.getDocument());\n }\n \n VSMDocument positiveWords = new TextDocument(\"positive_words.txt\");\n VSMDocument negativeWords = new TextDocument(\"negative_words.txt\");\n \n ArrayList<VSMDocument> documents = new ArrayList<VSMDocument>();\n documents.add(positiveWords);\n documents.add(negativeWords);\n documents.addAll(articleDocuments);\n \n Corpus corpus = new Corpus(documents);\n \n VectorSpaceModel vectorSpace = new VectorSpaceModel(corpus);\n \n double totalPositive = 0;\n double totalNegative = 0;\n \n \n for(ArticleDocument articleDoc : articleDocuments) {\n VSMDocument doc = (VSMDocument) articleDoc;\n System.out.println(\"\\nComparing to \" + doc);\n double positive = vectorSpace.cosineSimilarity(positiveWords, doc);\n double negative = vectorSpace.cosineSimilarity(negativeWords, doc);\n System.out.println(\"Positive: \" + positive);\n System.out.println(\"Negative: \" + negative);\n if (!Double.isNaN(positive)) {\n totalPositive += positive;\n }\n if (!Double.isNaN(negative)) {\n totalNegative += negative;\n }\n double difference = positive - negative;\n if (difference >= 0) {\n System.out.println(\"More positive by \" + difference);\n } else {\n System.out.println(\"More negative by \" + Math.abs(difference));\n }\n \n if (positive >= mostPositive) {\n mostPositive = positive;\n mostPositiveDoc = doc;\n }\n if (negative >= mostNegative) {\n mostNegative = negative;\n mostNegativeDoc = doc;\n }\n if (Math.abs(difference) >= Math.abs(biggestDifference)) {\n biggestDifference = difference;\n biggestDifferenceDoc = doc;\n }\n \n String publisher = articleDoc.getPublisher();\n String region = articleDoc.getRegion();\n LocalDate day = articleDoc.getDate().toLocalDate();\n DayOfWeek weekday = day.getDayOfWeek();\n if (!Double.isNaN(positive)) {\n if (publisherOptimism.containsKey(publisher)) {\n publisherOptimism.get(publisher).add(positive);\n } else {\n publisherOptimism.put(publisher, new LinkedList<Double>());\n publisherOptimism.get(publisher).add(positive);\n }\n \n if (publisherPessimism.containsKey(publisher)) {\n publisherPessimism.get(publisher).add(negative);\n } else {\n publisherPessimism.put(publisher, new LinkedList<Double>());\n publisherPessimism.get(publisher).add(negative);\n }\n \n if (regionOptimism.containsKey(region)) {\n regionOptimism.get(region).add(positive);\n } else {\n regionOptimism.put(region, new LinkedList<Double>());\n regionOptimism.get(region).add(positive);\n }\n \n if (regionPessimism.containsKey(region)) {\n regionPessimism.get(region).add(negative);\n } else {\n regionPessimism.put(region, new LinkedList<Double>());\n regionPessimism.get(region).add(negative);\n }\n \n if (dayOptimism.containsKey(day)) {\n dayOptimism.get(day).add(positive);\n } else {\n dayOptimism.put(day, new LinkedList<Double>());\n dayOptimism.get(day).add(positive);\n }\n \n if (dayPessimism.containsKey(day)) {\n dayPessimism.get(day).add(negative);\n } else {\n dayPessimism.put(day, new LinkedList<Double>());\n dayPessimism.get(day).add(negative);\n }\n \n if (weekdayOptimism.containsKey(weekday)) {\n weekdayOptimism.get(weekday).add(positive);\n } else {\n weekdayOptimism.put(weekday, new LinkedList<Double>());\n weekdayOptimism.get(weekday).add(positive);\n }\n \n if (weekdayPessimism.containsKey(weekday)) {\n weekdayPessimism.get(weekday).add(negative);\n } else {\n weekdayPessimism.put(weekday, new LinkedList<Double>());\n weekdayPessimism.get(weekday).add(negative);\n }\n }\n }\n \n size = articleDocuments.size();\n avgPositive = totalPositive / size;\n avgNegative = totalNegative / size;\n printInfo();\n }", "public int m(){\n int m = 0;\n // looping through adj matrix to check if edge.\n // increments counter if so.\n for (int i = 0; i < n; i++){\n for (int j = 0; j < n; j++){\n if (edges[i][j] > 0){\n m++;\n }\n }\n }\n return m / 2;\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public double getSimilarity(double []x,double []y){\n\t\tdouble res = 0;\n\t\tdouble sx = 0;\n\t\tdouble sy = 0;\n\t\tif( x.length != y.length ){\n\t\t\tSystem.out.println (\"The length of input vector is not consistent.\");\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tfor( int i = 0; i < x.length; ++ i ){\n\t\t\tres += x[i]*y[i];\n\t\t\tsx += x[i]*x[i];\n\t\t\tsy += y[i]*y[i];\n\t\t}\n\t\t\n\t\treturn res/(Math.sqrt(sx)*Math.sqrt(sy));\n\t}", "public interface IStoppingCriteria {\n\n /**\n * Determine the degree of clustering agreement\n * @param cluster1 one clustering results\n * @param cluster2 the other clustering results\n * @return the degree of clustering agreement; 1 refers to be the same clustering results; 0 refers to be the totally different clustering results\n */\n public double computeSimilarity(int[] cluster1, int[] cluster2);\n\n}", "public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}" ]
[ "0.5747694", "0.5747475", "0.57108265", "0.56623423", "0.5564646", "0.5337913", "0.5321401", "0.52820426", "0.5222959", "0.52225524", "0.5203099", "0.51714855", "0.51603144", "0.51501495", "0.5128301", "0.5120386", "0.50814563", "0.50797653", "0.50789934", "0.507898", "0.5072968", "0.5061527", "0.50589216", "0.5045103", "0.49871978", "0.49560696", "0.49541277", "0.4947611", "0.49231902", "0.49148414", "0.49135178", "0.49121642", "0.48790795", "0.48499182", "0.4843565", "0.48265955", "0.48221338", "0.48215437", "0.4815648", "0.48064443", "0.47838342", "0.47724605", "0.47594452", "0.47356042", "0.47008488", "0.4699356", "0.46804154", "0.46780837", "0.46576113", "0.4643861", "0.46145934", "0.45937085", "0.45821574", "0.4546425", "0.45409313", "0.4536005", "0.45355403", "0.45346653", "0.45299268", "0.45280185", "0.4509685", "0.4505703", "0.4504607", "0.45027134", "0.4499703", "0.4494344", "0.4479143", "0.4476942", "0.4466798", "0.44656664", "0.4458271", "0.44581178", "0.44521725", "0.4450673", "0.4449585", "0.44417247", "0.44395918", "0.44326973", "0.44277382", "0.44169763", "0.4405478", "0.43892342", "0.4386378", "0.43852", "0.43839952", "0.43836164", "0.43743166", "0.4373174", "0.43700698", "0.43658054", "0.43648988", "0.43642986", "0.43594134", "0.43588775", "0.43580896", "0.43563092", "0.4352499", "0.43521813", "0.4342645", "0.43379435", "0.4324296" ]
0.0
-1
returns all objects in the second dimension that have a similarity > similarityThreshold
public abstract Collection<T> getMatchesAboveThreshold(T first, double similarityThreshold);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void compareWithinClusters() {\n\t\tList<Cluster> clusterList = clusterDao.getClusterList();\n\n\t\tfor (Cluster cluster : clusterList) {\n\t\t\tList<Document> docList = documentDao.getDocListByClusterId(cluster.getId());\n\t\t\tint size = docList.size();\n\t\t\t\n\t\t\tdouble[][] matrix = new double[size][size];\n\t\t\t\n\t\t\tfor(int i =0; i<size; i++){\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t\tmatrix[i][i] = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (size > 1) {\n\t\t\t\t//List<Document> docList2 = docList1;\n\t\t\t\tfor (int i=0; i<size; i++){\n\t\t\t\t\tfor(int j=i+1; j<size; j++){\n\t\t\t\t\t\t//match docs docList.get(i) & docList.get(j)\n\t\t\t\t\t\tMap<String, Double> map = datumboxCaller.compareDocs(docList.get(i).getDocName(), docList.get(j).getDocName());\n\t\t\t\t\t\tmatrix[i][j] = map.get(\"Oliver\");\n\t\t\t\t\t\tmatrix[j][i] = map.get(\"Shingle\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//persist both metrics in a file \n\t\t\tpersist(matrix, cluster, docList);\n\t\t\t\n\t\t\t//printing the matrix\n\t\t\tSystem.out.println(\"\\nDocument Similarity Matrix for Cluster \"+cluster.getId());\n\t\t\tSystem.out.println(\"\\nOliver Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.println(docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nShingle Metric\");\n\t\t\tSystem.out.print(\"id\");\n\t\t\tfor(int i=0; i<size; i++)\n\t\t\t\tSystem.out.print(\"\\t\"+docList.get(i).getId());\n\t\t\t\n\t\t\tfor(int i=0; i<size; i++){\n\t\t\t\tSystem.out.print(\"\\n\"+docList.get(i).getId());\n\t\t\t\tfor(int j=0; j<size; j++){\n\t\t\t\t\tSystem.out.print(\"\\t\");\n\t\t\t\t\tif(j>=i)\n\t\t\t\t\t\tSystem.out.print(matrix[j][i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//print ends\n\t\t\t\n\t\t}\n\n\t}", "public float getSimilarity() {\n return similarity;\n }", "public double getSimilarity()\r\n {\r\n return similarity;\r\n }", "public interface DimensionSimilarity {\n double similarity(double left, double right);\n}", "public Double calculateSimilarity(OWLObject a, OWLObject b);", "int getSimilarityThreshold(final int field);", "private Similarity getSimilarity(DisjointSets<Pixel> ds, int root1, int root2)\n {\n return null; //TODO: remove and replace this line\n }", "public List<OWLObject> search(OWLObject queryObj) {\n\t\tList<OWLObject> hits = new ArrayList<OWLObject>(maxHits);\n\t\tSystem.out.println(\"gettings atts for \"+queryObj+\" -- \"+simEngine.comparisonProperty);\n\t\tSet<OWLObject> atts = simEngine.getAttributeClosureFor(queryObj);\n\t\tSystem.out.println(\"all atts: \"+atts.size());\n\t\tif (atts.size() == 0)\n\t\t\treturn hits;\n\t\t\n\t\t// only compare using significant atts;\n\t\t// we don't do the same test on candidates as these will be removed by the\n\t\t// intersection operation. they will have a small effect on the score, as\n\t\t// we don't divide by the union, but instead the sum of sizes\n\t\tatts = filterNonSignificantAttributes(atts);\n\t\tSystem.out.println(\"filtered atts: \"+atts.size());\n\n\t\t//bloomFilter = new BloomFilter<OWLObject>(0.05, atts.size());\n\t\t//bloomFilter.addAll(atts);\n\t\t\t\t\n\t\tSortedMap<Integer,Set<OWLObject>> scoreCandidateMap = new TreeMap<Integer,Set<OWLObject>>();\n\t\t\n\t\tfor (OWLObject candidate : getCandidates()) {\n\t\t\tif (candidate.equals(queryObj))\n\t\t\t\tcontinue;\n\t\t\tSet<OWLObject> iAtts = simEngine.getAttributeClosureFor(candidate);\n\t\t\t//Set<OWLObject> iAtts = simEngine.getGraph().getAncestors(candidate);\n\n\t\t\tif (iAtts.size() == 0)\n\t\t\t\tcontinue;\n\t\t\tint cAttsSize = iAtts.size();\n\t\n\t\t\tiAtts.retainAll(atts);\n\t\t\t//Collection<OWLObject> iAtts = bloomFilter.intersection(cAtts);\n\t\t\t\n\t\t\t// simJ, one-sided, scaled by 1000\n\t\t\t// negate to ensure largest first\n\t\t\t//Integer score = - (iAtts.size() * 1000 / cAttsSize);\n\t\t\t\n\t\t\t// this biases us towards genes with large numbers of annotations,\n\t\t\t// but it is better at finding the models that share all features\n\t\t\tInteger score = - iAtts.size();\n\t\t\tif (!scoreCandidateMap.containsKey(score)) \n\t\t\t\tscoreCandidateMap.put(score, new HashSet<OWLObject>());\n\t\t\tscoreCandidateMap.get(score).add(candidate);\n\t\t\treporter.report(this,\"query_candidate_overlap_total\",queryObj,candidate,iAtts.size(),cAttsSize);\n\t\t}\n\t\t\n\t\tint n = 0;\n\t\tfor (Set<OWLObject> cs : scoreCandidateMap.values()) {\n\t\t\tn += cs.size();\n\t\t\thits.addAll(cs);\n\t\t}\n\t\t\n\t\tn = 0;\n\t\tfor (OWLObject hit : hits) {\n\t\t\tn++;\n\t\t\treporter.report(this,\"query_hit_rank_threshold\",queryObj,hit,n,maxHits);\n\t\t}\n\t\tif (hits.size() > maxHits)\n\t\t\thits = hits.subList(0, maxHits);\n\t\t\n\n\n\t\treturn hits;\n\t}", "public int getSimilarity() {\n return similarity;\n }", "public abstract Object[] getSimilarityFactors();", "public Future<List<Object>> evaluateSimilarity(Serializable objectUnderComparison, List<Serializable> referenceObjects);", "public Matrix2D executeSimilarity(List<DataObject> dataObjects) {\r\n\t\tint objectsCount = dataObjects.size();\r\n\t\tMatrix2D similarityMatrix = new Matrix2D(objectsCount);\r\n\t\t\r\n\t\tVideoMediaFile video1 = null;\r\n\t\tVideoMediaFile video2 = null;\r\n\t\t\r\n\t\tint p = 0;\r\n\t\tfor (int i = 0; i < objectsCount; i++) {\r\n\t\t\tfor (int j = i + 1; j < objectsCount; j++) {\r\n\t\t\t\tvideo1 = (VideoMediaFile) dataObjects.get(i);\r\n\t\t\t\tvideo2 = (VideoMediaFile) dataObjects.get(j);\r\n\t\t\t\t\r\n\t\t\t\tint similarValues = 0;\r\n\t\t\t\t\r\n\t\t\t\tint featureListSize = video1.getFeatureList().size();\r\n\t\t\t\tfor (int k = 0; k < featureListSize; k++) {\r\n\t\t\t\t\tMetaData video1MetaData = (MetaData) video1.getFeatureList().get(k);\r\n\t\t\t\t\tMetaData video2MetaData = (MetaData) video2.getFeatureList().get(k);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (video1MetaData.getId().equals(\"mediaDuration\") || \r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"mediaFileSize\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"mediaBitrate\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoFramerate\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"timebase\")) {\r\n\t\t\t\t\t\tdouble v1 = Double.valueOf(video1MetaData.getValue()).doubleValue();\r\n\t\t\t\t\t\tdouble v2 = Double.valueOf(video2MetaData.getValue()).doubleValue();\r\n\t\t\t\t\t\tdouble v3;\r\n\t\t\t\t\t\tif (v1 >= v2)\r\n\t\t\t\t\t\t\tv3 = ((v1 / v2) - 1) * 100;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tv3 = ((v2 / v1) - 1) * 100;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (v3 > 5.0)\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse if (video1MetaData.getId().equals(\"numberStreams\") || \r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoWidth\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"videoHeight\")) {\r\n\t\t\t\t\t\tint v1 = Integer.valueOf(video1MetaData.getValue()).intValue();\r\n\t\t\t\t\t\tint v2 = Integer.valueOf(video2MetaData.getValue()).intValue();\r\n\t\t\t\t\t\tif (v1 == v2)\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse if (video1MetaData.getId().equals(\"videoCodecType\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"audioCodecType\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"audioLanguage\") ||\r\n\t\t\t\t\t\tvideo1MetaData.getId().equals(\"samplerate\")) {\r\n\t\t\t\t\t\tString s1 = video1MetaData.getValue();\r\n\t\t\t\t\t\tString s2 = video1MetaData.getValue();\r\n\t\t\t\t\t\tif (s1.equals(s2))\r\n\t\t\t\t\t\t\tsimilarValues++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Calculate the similarity.\r\n\t\t\t\tdouble result = (double) similarValues / featureListSize;\r\n\t\t\t\tsimilarityMatrix.set(i, j, result);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.setProgress((double)++p/objectsCount);\r\n\t\t}\r\n\t\t\r\n\t\treturn similarityMatrix;\r\n\t}", "public SimilarityMatrix<T> makeBinary(double threshold) {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n if(get(first, second)>threshold) {\n set(first, second, 1.0);\n } else {\n set(first, second, 0.0);\n }\n \n }\n \n }\n \n return this;\n }", "public double computeSimilarity(int[] cluster1, int[] cluster2);", "public void setSimilarity(float value) {\n this.similarity = value;\n }", "@Override\n protected double calcSimilarity(Cluster a, Cluster b) {\n List<Point> aItems = a.getItems();\n List<Point> bItems = b.getItems();\n\n // calculate the similarity of each item in a with every item in b,\n // save the min value in sim-variable\n double sim = Double.MAX_VALUE;\n for (Point x : aItems) {\n for (Point y : bItems) {\n double currSim = x.distanceTo(y);\n if (currSim < sim) {\n sim = currSim;\n }\n }\n }\n\n return sim;\n }", "public double similarity(REPOverlap rep2) {\r\n\t\tdouble p = 0;\r\n\t\tint i = 0;\r\n\t\tfor (i=0;i<dist.length;i++) {\r\n\t\t\tp += Math.sqrt(dist[i]*rep2.dist[i]);\r\n\t\t}\r\n\t\treturn p;\r\n\t}", "protected List<StringDoublePair> getSimilar(float[] vector, QueryConfig qc) {\n\t qc = setQueryConfig(qc);\n\t\tList<StringDoublePair> distances = this.selector.getNearestNeighbours(Config.getRetrieverConfig().getMaxResultsPerModule(), vector, \"feature\", qc);\n\t\tif(distances == null){\n\t\t\treturn new ArrayList<>(1);\n\t\t}\n\t\tfor(StringDoublePair sdp : distances){\n\t\t\tdouble dist = sdp.value;\n\t\t\tsdp.value = MathHelper.getScore(dist, maxDist);\n\t\t}\n\t\treturn distances;\n\t}", "double squaredDistanceTo(IMovingObject m);", "public interface PairwiseSimilarity {\n public double getMinValue();\n public double getMaxValue();\n public SRResultList mostSimilar(MostSimilarCache matrices, TIntFloatMap vector, int maxResults, TIntSet validIds) throws IOException;\n public SRResultList mostSimilar(MostSimilarCache matrices, int wpId, int maxResults, TIntSet validIds) throws IOException;\n}", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "@Override\n public double similarity(double[] data1, double[] data2) {\n\t\tdouble distance;\n\t\tint i;\n\t\tif(MATHOD ==1){\n\t\t\t i = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.pow(Math.abs(data1[i] - data2[i]), q);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==2){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += ( Math.abs(data1[i] - data2[i]) )/( Math.abs(data1[i]) + Math.abs(data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tif(MATHOD ==3){\n\t\t\ti = 0;\n\t\t\tdistance = 0;\n\t\t\twhile (i < data1.length && i < data2.length) {\n\t\t\t\tdistance += Math.abs( (data1[i] - data2[i]) / ( 1 + data1[i] + data2[i]) );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn Math.pow(distance, 1 / q);\n }", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "private static void calculateSimilarity() {\n \tLOG.info(\"Begin calculating spatial similarity between users.\");\n \t\n\t\t// Get a list of all users\n \tNeo4JUserDAO uDao = (Neo4JUserDAO) DAOFactory.instance().getUserDAO();\n\t\tList<Node> users = uDao.findAll();\n\t\t\n\t\tint usersCount = users.size();\n \tLOG.debug(\"Found {} users.\", usersCount);\n\t\t\n\t\t// Instantiate all needed classes for similarity measurement\n\t\tNeo4JSequenceExtractor ex = new Neo4JSequenceExtractor();\n\t\tex.setFromLevel(clArgs.calcSimilarityFromLevel);\n\t\tex.setToLevel(clArgs.calcSimilarityToLevel);\n\t\t\n\t\tNeo4JSequenceMatcher matcher = new Neo4JSequenceMatcher(\n\t\t\t\tclArgs.calcSimilaritySplitThreshold, \n\t\t\t\tclArgs.calcSimilarityMinSequenceLength,\n\t\t\t\tclArgs.calcSimilarityTempConstraintThreshold);\n\t\tNeo4JSimilarityAnalyzer analyzer = new Neo4JSimilarityAnalyzer();\n\t\t\n\t\t// Create matrix that holds similarity results\n\t\tdouble[][] similarityResults = new double[usersCount][usersCount];\n\t\t\n\t\t// Go through all pair-wise user combinations\n \tfor (int i = 0; i < usersCount; i++) {\n\t\t\tNode userOne = users.get(i);\n\t\t\tObject userOneId = uDao.getUserId(userOne);\n\t\t\t\n\t\t\t// Set current first user for sequence extraction\n\t\t\tex.setUserNodeOne(userOne);\n\t\t\t\n\t\t\tfor (int j = i + 1; j < usersCount; j++) {\n\t\t\t\tNode userTwo = users.get(j);\n\t\t\t\tObject userTwoId = uDao.getUserId(userTwo);\n\t\t\t\tLOG.info(\"Calculate similarity between user [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\n\t\t\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\t\t\t// Step 1: Extract cluster sequences of two users based on their hierarchical graphs\n\t\t\t\t// Set current second user for sequence extraction\n\t\t\t\tex.setUserNodeTwo(userTwo);\n\t\t\t\tMap<Integer, SequenceWrapper> clusterSequences = null;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t// Start extraction of cluster sequences\n\t\t\t\t\tLOG.info(\"Step 1: Extraction of cluster sequences from level {} to level {}.\", clArgs.calcSimilarityFromLevel, clArgs.calcSimilarityToLevel);\n\t\t\t\t\tclusterSequences = ex.extract();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(\"An error occurred while extracting the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Step 2: Match the extracted cluster sequences to find maximal length similar sequences\n\t\t\t\tMap<Integer, List<Sequence<SimilarSequenceCluster>>> maxLengthSimilarSequences = null;\n\t\t\t\t\n\t\t\t\t// Matching is only possible if there is a valid result of step 1 \n\t\t\t\tif (clusterSequences != null && !clusterSequences.isEmpty()) {\n\t\t\t\t\tmatcher.setSequencesOnLevel(clusterSequences);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Start matching of cluster sequences\n\t\t\t\t\t\tLOG.info(\"Step 2: Matching of cluster sequences.\");\n\t\t\t\t\t\tmaxLengthSimilarSequences = matcher.match();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLOG.error(\"An error occurred while matching the sequences of common clusters of user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t// Step 3: Compute spatial similarity between the current two users\n\t\t\t\t\t// Similarity measurement is only possible with a valid result of step 2\n\t\t\t\t\tif (maxLengthSimilarSequences != null && !maxLengthSimilarSequences.isEmpty()) {\n\t\t\t\t\t\tanalyzer.setUserNodeOne(userOne);\n\t\t\t\t\t\tanalyzer.setUserNodeTwo(userTwo);\n\t\t\t\t\t\tanalyzer.setMaximalLengthSimilarSequencesOnLevel(maxLengthSimilarSequences);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Start similarity measurement\n\t\t\t\t\t\t\tLOG.info(\"Step 3: Similarity measurement.\");\n\t\t\t\t\t\t\tsimilarity = analyzer.analyze();\n\t\t\t\t\t\t\tLOG.debug(\"Final similarity score: {}\", similarity);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Save similarity value in result matrix\n\t\t\t\t\t\t\tsimilarityResults[i][j] = similarity;\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tLOG.error(\"An error occurred while measuring similarity between user [{}] and [{}]:\\n{}\", \n\t\t\t\t\t\t\t\t\tnew Object[] {userOneId, userTwoId, e});\n\t\t\t\t\t\t\tLOG.debug(\"Similarity measurement stopped for users [{}] and [{}].\", userOneId, userTwoId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\t// END: step 3\n\t\t\t\t}\t// END: step 2\n\t\t\t}\t// END: user two loop\n\t\t}\t// END: user one loop\n \t\n \tLOG.info(\"Finished calculating spatial similarity.\");\n \t\n \t// Normalize the similarity scores from 0 to 1\n \tif (clArgs.normalization) {\n\t \tLOG.info(\"Normalizing similarity scores.\");\n\t \tsimilarityResults = SimilarityNormalizer.normalize(similarityResults);\n \t}\n \t\n \t// The evaluation is requested\n \tif (clArgs.evaluation) {\n \t\tLOG.info(\"Evaluation is enabled.\");\n \t\t\n \t\t// Calculate simple evaluation\n \t\tLOG.info(\"Calculate similarity evaluation values.\");\n \t\tSimilarityEvaluation evaluation = SimilarityEvaluator.evaluate(similarityResults);\n \t\t\n \t\t// Build up other information to include in the evaluation files\n \t\tList<String> otherInformation = new ArrayList<String>();\n \t\tif (clArgs.automation) {\n \t\t\t// Clustering information is only included if the automation task is running\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_XI);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsXi)));\n \t\t\totherInformation.add(CommandLineArgs.CLUSTERING_OPTICS_MIN_POINTS);\n \t\t\totherInformation.add(String.valueOf(df.format(currentOpticsMinPoints)));\n \t\t}\n \t\t\n \t\t// Add simple metrics from similarity measurement\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MIN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMin())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MAX);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getMax())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILARITY_MEAN);\n \t\totherInformation.add(String.valueOf(df.format(evaluation.getSimilarityMean())));\n \t\totherInformation.add(SimilarityEvaluation.SIMILAR_USER_PAIRS);\n \t\totherInformation.add(String.valueOf(evaluation.getSimilarUserPairs()));\n \t\t\n \t\t// Write similarity results in a file\n \t\tLOG.info(\"Writing evaluation data to a file.\");\n \t\tArrayToCsvWriter.writeDoubles(similarityResults, clArgs.evaluationOutDir, otherInformation.toArray(new String[0]));\n \t}\n \t// Evaluation is not requested, write the similarity scores into the graph database\n \telse {\n \t\tLOG.info(\"Write similarity scores to the graph database.\");\n \t\t\n \t\tfor (int i = 0; i < similarityResults.length; i++) {\n \t\t\t// Get first user by id\n \t\t\tNode userOne = uDao.findUserById(i);\n \t\t\tfor (int j = i + 1; j < similarityResults.length; j++) {\n \t\t\t\tdouble similarityScore = similarityResults[i][j];\n \t\t\t\t// User pairs that are not similar (i.e., have a similarity score of zero) do not get a connection\n \t\t\t\tif (similarityScore > 0) {\n\t \t\t\t\t// Get second user by id\n\t \t\t\t\tNode userTwo = uDao.findUserById(j);\n\t \t\t\t\t\n\t \t\t\t\t// Add similarity relationship\n\t \t\t\t\tuDao.connectSimilarUsers(userOne, userTwo, similarityScore);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }", "public void ComputeSimilarity() {\n\t\t\n\t\t//first construct the vector space representations for these five reviews\n\t\t// the our smaples vector, finally get the similarity metric \n\t\tanalyzequery(LoadJson(\"./data/samples/query.json\"));\n\t\n\t\t\n\t\tHashMap<String, Double> Similarity = new HashMap<String, Double>();\n\n\t\tfor (int i = 0; i < m_reviews.size(); i++) {\n\t\t\tString content = m_reviews.get(i).getContent();\n\n\t\t\tHashMap<String, Integer> conunttf = new HashMap<String, Integer>();\n\n\t\t\tHashSet<String> biminiset = new HashSet<String>();\n \n\t\t\t//danci means word unit: one or two words\n\t\t\tArrayList danci = new ArrayList();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\t\t\t\tif (m_stopwords.contains(token))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (token.isEmpty())\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdanci.add(PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token))));\n\n\t\t\t}\n \n\t\t\t//get word count in a document\n\t\t\tfor (int k = 0; k < danci.size(); k++) {\n\n\t\t\t\tif (conunttf.containsKey(danci.get(k).toString())) {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(),\n\t\t\t\t\t\t\tconunttf.get(danci.get(k).toString()) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(danci.get(k).toString(), 1);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tArrayList<String> N_gram = new ArrayList<String>();\n\n\t\t\tfor (String token : tokenizer.tokenize(content)) {\n\n\t\t\t\ttoken = PorterStemmingDemo(SnowballStemmingDemo(NormalizationDemo(token)));\n\t\t\t\tif (token.isEmpty()) {\n\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\n\t\t\t\t\tN_gram.add(token);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tString[] fine = new String[N_gram.size()];\n \n\t\t\t//get rid of stopwords\n\t\t\tfor (int p = 0; p < N_gram.size() - 1; p++) {\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p)))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (m_stopwords.contains(N_gram.get(p + 1)))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfine[p] = N_gram.get(p) + \"-\" + N_gram.get(p + 1);\n\n\t\t\t}\n\n\t\t\t\n\t\t\tfor (String str2 : fine) {\n\n\t\t\t\tif (conunttf.containsKey(str2)) {\n\t\t\t\t\tconunttf.put(str2, conunttf.get(str2) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tconunttf.put(str2, 1);\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t//compute tf * idf for each document\n\t\t\tfor (String key : conunttf.keySet()) {\n\t\t\t\tif (m_stats.containsKey(key)) {\n\t\t\t\t\tdouble df = (double) m_stats.get(key);\n\n\t\t\t\t\tdouble idf = (1 + Math.log(102201 / df));\n\n\t\t\t\t\tdouble tf = conunttf.get(key);\n\n\t\t\t\t\tdouble result = tf * idf;\n\n\t\t\t\t\tm_idf.put(key, result);\n\t\t\t\t} else {\n\t\t\t\t\tm_idf.put(key, 0.0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\tHashMap<String, Double> query = new HashMap<String, Double>();\n\t\t\tHashMap<String, Double> test = new HashMap<String, Double>();\n \n\t\t\t//If query contains this word, store it for future computation \n\t\t\tfor (Map.Entry<String, Double> entry : m_idf.entrySet()) {\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tif (query_idf.containsKey(key)) {\n\t\t\t\t\tquery.put(key, query_idf.get(key));\n\t\t\t\t\ttest.put(key, m_idf.get(key));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble dotProduct = 0.00;\n\t\t\tdouble magnitude1 = 0.0;\n\t\t\tdouble magnitude2 = 0.0;\n\t\t\tdouble magnitude3 = 0.0;\n\t\t\tdouble magnitude4 = 0.0;\n\t\t\tdouble cosineSimilarity = 0;\n \n\t\t\t\n\t\t\t//compute Compute similarity between query document and each document in file\n\t\t\tfor (String cal : test.keySet()) {\n\t\t\t\tdotProduct += query.get(cal) * test.get(cal); // a.b\n\t\t\t\tmagnitude1 += Math.pow(query.get(cal), 2); // (a^2)\n\t\t\t\tmagnitude2 += Math.pow(test.get(cal), 2); // (b^2)\n\n\t\t\t\tmagnitude3 = Math.sqrt(magnitude1);// sqrt(a^2)\n\t\t\t\tmagnitude4 = Math.sqrt(magnitude2);// sqrt(b^2)\n\t\t\t}\n\n\t\t\tif (magnitude3 != 0.0 | magnitude4 != 0.0)\n\t\t\t\tcosineSimilarity = dotProduct / (magnitude3 * magnitude4);\n\n\t\t\telse\n\t\t\t\tcosineSimilarity = 0;\n\n\t\t\tSimilarity.put(content, cosineSimilarity);\n\n\t\t\t\t\t\n\n\t\t}\n\n\t\t// sort output to get 3 reviews with the highest similarity with query review\n\t\tList<Map.Entry<String, Double>> infoIds = new ArrayList<Map.Entry<String, Double>>(\n\t\t\t\tSimilarity.entrySet());\n\n\t\tCollections.sort(infoIds, new Comparator<Map.Entry<String, Double>>() {\n\t\t\tpublic int compare(Map.Entry<String, Double> o1,\n\t\t\t\t\tMap.Entry<String, Double> o2) {\n\t\t\t\treturn (int) (o1.getValue() - o2.getValue());\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = infoIds.size() - 1; i > infoIds.size() - 4; i--) {\n\t\t\tEntry<String, Double> ent = infoIds.get(i);\n\t\t\tSystem.out.println(ent.getValue()+\"++\"+ent.getKey()+\"\\n\");\n\n\t\t}\n\n\t}", "@Override\n\tpublic float similarity(PetriNet pn1, PetriNet pn2) {\n\t\treturn similarity((PetriNet) pn1.clone(), (PetriNet) pn2.clone(), 1);\n\t}", "private float distanceMoyenne(DMatchVector bestMatches){\n\n float DM=0.0f;\n for(int i=0;i<bestMatches.size();i++){\n\n DM+=bestMatches.get(i).distance();\n }\n\n DM=DM/bestMatches.size();\n return DM;\n\n }", "public void prune(double belowThreshold) {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n if(get(first, second)<belowThreshold) {\n set(first, second, 0.0);\n }\n \n }\n \n }\n \n }", "public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "public List<Query> similarTerms() {\n return this.similarTerms;\n }", "public SimilarityScore sim(int eq1, int eq2);", "public double getSimilarity(Pair<String, String> representations);", "public interface Similarity {\n\n double Similarity(Map<String, Double> sourceMap, Map<String, Double> targetMap);\n}", "@Test\n\tpublic void testMeasureSimilarity() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(true, false, false);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 5, \"01.01.2015 00:00:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 5, \"31.12.2015 00:00:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a global measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 30.11.15: (00:10) +++++ (01:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 00:10:00\", \"30.11.2015 01:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS\", \"NAME='Philipp'\"), 1);\n\t\tr = res.get(0);\n\t\t// 70 minutes (00:00 - 00:09 and 01:01 - 02:00), each 5 => 350\n\t\tassertEquals(350.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(350.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// (00:10) ++++ (00:50) Edison (5)\n\t\t// 30.11.15: (00:00) +++++ (00:50) Edison (5) \n\t\t// (00:10) +++++ (01:00) Philipp (5)\n\t\t// (01:00) ++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Edison\", 5, \"30.11.2015 00:00:00\", \"30.11.2015 00:50:00\");\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 01:00:00\", \"30.11.2015 02:00:00\");\n\t\tloadData(\"Edison\", 5, \"01.01.2015 00:10:00\", \"01.01.2015 00:50:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS\", null), 1);\n\t\tr = res.get(0);\n\t\t// 1 minute (01:00:00), each 5 as value => 5\n\t\tassertEquals(5.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(5.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// fire one with dimensions\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// (00:10) ++++ (00:50) Edison (5)\n\t\t// 30.11.15: (00:00) +++++ (00:50) Edison (5) \n\t\t// (00:10) +++++ (01:00) Philipp (5)\n\t\t// (01:00) ++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MAX(SUM(IDEAS)) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\t// 1 minute (01:00:00), each 5 for the whole hour (* 60) as value => 300\n\t\tassertEquals(300.0, r.getMeasureDistance(), 0.0);\n\t\tassertEquals(300.0, r.getTotalDistance(), 0.0);\n\t\tassertEquals(\"R20151130_0000_0059\", r.getLabelValue(0));\n\t}", "@Override\n public double similarity(\n final Integer value1, final Integer value2) {\n\n // The value of nodes is an integer...\n return 1.0 / (1.0 + Math.abs(value1 - value2));\n }", "public void getSimilarity(){\r\n\t\tfor(Integer i : read.rateMap.keySet()){\r\n\t\t\tif(i != this.userID){\r\n\t\t\t\t//Calculate the average rate.\r\n\t\t\t\tdouble iAverage = average.get(i);\r\n\t\t\t\tdouble a = 0.0;\r\n\t\t\t\tdouble b = 0.0;\r\n\t\t\t\tdouble c = 0.0;\r\n\t\t\t\t//Set a flag by default meaning the user does not have common rate with this user.\r\n\t\t\t\tboolean intersection = false;\r\n\t\t\t\tArrayList<Map.Entry<String, Double>> list = read.rateMap.get(i);\r\n\t\t\t\tfor(int j = 0; j < list.size(); j++){\r\n\t\t\t\t\tdouble userRate = 0;\r\n\t\t\t\t\tif(ratedID.contains(list.get(j).getKey())){\r\n\t\t\t\t\t\t//The user has common rated movies with this user\r\n\t\t\t\t\t\tintersection = true;\r\n\t\t\t\t\t\tfor(int k = 0; k < read.rateMap.get(userID).size(); k++){\r\n\t\t\t\t\t\t\tif(read.rateMap.get(userID).get(k).getKey().equals(list.get(j).getKey())){\r\n\t\t\t\t\t\t\t\tuserRate = read.rateMap.get(userID).get(k).getValue();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ta += (list.get(j).getValue() - iAverage) * (userRate- this.userAverageRate);\r\n\t\t\t\t\t\tb += (list.get(j).getValue() - iAverage) * (list.get(j).getValue() - iAverage);\r\n\t\t\t\t\t\tc += (userRate - this.userAverageRate) * (userRate - this.userAverageRate);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//Check if this user rated all the movies with the same rate.\r\n\t\t\t\tif(intersection && c == 0){\r\n\t\t\t\t\tfuckUser = true;//really bad user.\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t//Check if current user rated all the movies with the same rate. If so, just set similarity as 0.\r\n\t\t\t\tif(intersection && b != 0){\r\n\t\t\t\t\tdouble s = a / (Math.sqrt(b) * Math.sqrt(c));\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdouble s = 0;\r\n\t\t\t\t\tsimilarity.put(i, s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Create a heap storing the similarity pairs in a descending order.\r\n\t\tthis.heap = new ArrayList<Map.Entry<Integer, Double>>();\r\n\t\tIterator<Map.Entry<Integer, Double>> it = similarity.entrySet().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tMap.Entry<Integer, Double> newest = it.next();\r\n\t\t\theap.add(newest);\r\n\t\t}\r\n\t\tCollections.sort(this.heap, new Comparator<Map.Entry<Integer, Double>>() {\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(Map.Entry<Integer, Double> a, Map.Entry<Integer, Double> b){\r\n\t\t\t\treturn -1 * (a.getValue().compareTo(b.getValue()));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public static void QueryArrayElement() {\n\t\tFindIterable<Document> findIterable = collection.find(gt(\"dim_cm\", 10));\r\n\t\tprint(findIterable);\r\n\t}", "private static ArrayList<Result> distanceMatching(Query query, DataManager myVocab) {\n\t\tString queryterm = query.getQuery();\n\t\tint maxScore;\n\t\tif (queryterm.length()<9)\n\t\t\tmaxScore= queryterm.length()-THRESHOLD_LEV;\n\t\telse\n\t\t\tmaxScore = queryterm.length()-(queryterm.length()/THRESHOLD_LEV);\n\t\tArrayList<Result> fuzzyResults = new ArrayList<Result>();\n\t\tfor (int i = 0; i < myVocab.vocab.size(); i++){\n\t\t\tString vocabterm = myVocab.vocab.get(i).trim();\n\t\t\tint distance = levenshteinDistance(vocabterm, queryterm);\n\t\t\t// subtract the distance that's just the length difference\n\t\t\t// to only take into account the character substitution\n\t\t\tdistance = distance - (Math.abs(vocabterm.length() - queryterm.length()));\n\t\t\tif (distance < maxScore){\n\t\t\t\tdouble score;\n\t\t\t\tif (vocabterm.length() < queryterm.length())\n\t\t\t\t\tscore = ((double)(vocabterm.length())/(double)(queryterm.length()+distance))*99;\n\t\t\t\telse\n\t\t\t\t\tscore = (((double)queryterm.length()/(double)(vocabterm.length()+distance)))*99;\n\t\t\t\tfuzzyResults.add(new Result(query.getType()+\"/\"+myVocab.vocab.get(i), myVocab.vocab.get(i), query.getType(),score, false));\n\t\t\t}\n\t\t}\n\t\treturn fuzzyResults;\n\t}", "@Test\n\tpublic void testStructureSimilarity2() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(false, false, true);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (01:01) +++ (01:30) Philipp (7)\n\t\t// 01.01.15: (01:20) ++++ (02:00) Philipp (7)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (01:01) +++ (01:30) Tobias (17)\n\t\t// 31.12.15: (01:10) +++++ (02:00) Tobias (17)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 3, \"01.01.2015 00:00:00\", \"01.01.2015 01:00:00\");\n\t\tloadData(\"Philipp\", 7, \"01.01.2015 01:01:00\", \"01.01.2015 01:30:00\");\n\t\tloadData(\"Philipp\", 7, \"01.01.2015 01:20:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 13, \"31.12.2015 00:00:00\", \"31.12.2015 01:00:00\");\n\t\tloadData(\"Tobias\", 17, \"31.12.2015 01:01:00\", \"31.12.2015 01:30:00\");\n\t\tloadData(\"Tobias\", 17, \"31.12.2015 01:10:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getStructureDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (01:01) +++ (01:30) Philipp (7)\n\t\t// 01.01.15: (01:20) ++++ (02:00) Philipp (7)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (01:01) +++ (01:30) Tobias (17)\n\t\t// 31.12.15: (01:10) +++++ (02:00) Tobias (17)\n\t\t// 31.12.15: (01:30) +++ (02:00) Tobias (17)\n\t\t// @formatter:on\n\t\tloadData(\"Tobias\", 17, \"31.12.2015 01:30:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 364);\n\n\t\tassertEquals(364, res.size());\n\t\tfor (int i = 0; i < 363; i++) {\n\t\t\tr = res.get(i);\n\t\t\tassertEquals(3.0, r.getStructureDistance(), 0.0);\n\t\t\tassertEquals(3.0, r.getTotalDistance(), 0.0);\n\t\t}\n\t\tr = res.get(363);\n\t\tassertEquals(3.5, r.getStructureDistance(), 0.0);\n\t\tassertEquals(3.5, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\tfor (TimeSeriesSimilarityCollection a : res) {\n\t\t\tSystem.out.println((Date) a.getLabelValue(0));\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}", "public void computeNeighbourhoods(final SimilarityMap simMap) {\n\t\t\n\t\tfor (Integer simId: simMap.getIds()) { // iterate over all ids\n\t\t\t\n\t\t\t// for the current id, store all similarities in order of descending similarity in a sorted set\n\t\t\tSortedSet<ScoredThingDsc> ss = new TreeSet<ScoredThingDsc>();\n\t\t\t\n\t\t\tProfile profile = simMap.getSimilarities(simId); // get the similarity profile\n\t\t\tif (profile != null) {\n\t\t\t\tfor (Integer id: profile.getIds()) { // iterate over each id in the profile\n\t\t\t\t\tdouble sim = profile.getValue(id);\n\t\t\t\t\tif (sim > 0)\n\t\t\t\t\t\tss.add(new ScoredThingDsc(sim, id));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// get the k most similar users (neighbours)\n\t\t\tint counter = 0;\n\t\t\tfor (Iterator<ScoredThingDsc> iter = ss.iterator(); iter.hasNext() && counter < k; ) {\n\t\t\t\tScoredThingDsc st = iter.next();\n\t\t\t\tInteger id = (Integer)st.thing;\n\t\t\t\tthis.add(simId, id);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\t\n\t}", "public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }", "int getMatchedElements();", "public interface IStoppingCriteria {\n\n /**\n * Determine the degree of clustering agreement\n * @param cluster1 one clustering results\n * @param cluster2 the other clustering results\n * @return the degree of clustering agreement; 1 refers to be the same clustering results; 0 refers to be the totally different clustering results\n */\n public double computeSimilarity(int[] cluster1, int[] cluster2);\n\n}", "public abstract interface Similarity {\n\n /**\n * This is the function that summarizes all the functionality of similarity\n * matching. It computes the total score from the previous level factors\n * multiplied with the appropriate weights.\n *\n * @return The total score of the similarity between document and query.\n */\n public abstract float getScore();\n\n /**\n * This function returns the previous level factors of scoring computation\n *\n * @return\n */\n public abstract Object[] getSimilarityFactors();\n\n}", "@Override\n public double similarity(SimComparator<OEMolBase> other, double minSim)\n { return similarity(other);\n }", "boolean isNearMatch(double score);", "public long numSimilarities();", "public static void demo_SimilarityMetrics(RoWordNet RoWN, String textCorpus_FilePath) throws Exception {\n boolean allowAllRelations = true;\n\n Literal l1 = new Literal(\"salvare\");\n Literal l2 = new Literal(\"dotare\");\n String id1 = RoWN.getSynsetsFromLiteral(l1).get(0).getId();\n String id2 = RoWN.getSynsetsFromLiteral(l2).get(0).getId();\n Synset s1, s2;\n\n s1 = RoWN.getSynsetById(id1);\n s2 = RoWN.getSynsetById(id2);\n\n IO.outln(\"Computed IC for synset_1: \" + s1.getInformationContent());\n IO.outln(\"Computed IC for synset_2: \" + s2.getInformationContent());\n IO.outln(\"Custom distance: \" + SimilarityMetrics.distance(RoWN, s1\n .getId(), s2.getId(), true, null));\n IO.outln(\"Custom hypernymy distance: \" + SimilarityMetrics\n .distance(RoWN, s1.getId(), s2.getId()));\n\n IO.outln(\"Sim Resnik: \" + SimilarityMetrics.Resnik(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim Lin: \" + SimilarityMetrics.Lin(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Sim JCN: \" + SimilarityMetrics.JiangConrath(RoWN, s1.getId(), s2\n .getId(), allowAllRelations));\n IO.outln(\"Dist JCN: \" + SimilarityMetrics\n .JiangConrath_distance(RoWN, s1.getId(), s2.getId(), allowAllRelations));\n }", "public SimilarResultList(int maxSize, double threshold) {\n this(maxSize, threshold, new ArrayList<SimilarResult<T>>());\n }", "int match(ArrayList<ImageCell> images);", "public void similar(String tableName, String name) {\n String simName = null;\n float score = 11;\n float val = 0;\n int simCount = 0;\n if (tableName.equals(\"reviewer\")) {\n if (matrix.getReviewers().contains(name) != null) {\n // Node with the reference to the list we are comparing other\n // lists to\n ReviewerList.Node n = matrix.getReviewers().contains(name);\n // Gets the head to the DLList that we are comparing other lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n ReviewerList.Node n1 = matrix.getReviewers().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n RDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n node = n.getList().getHead();\n // Going through this list to find matching movies in\n // simList\n while (node != null) {\n simNode = simList.containsMovie(node\n .getMovieName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextMovie();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getReviewerName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n\n printSimilar(\"reviewer\", name, simName, score);\n }\n else {\n System.out.println(\"Reviewer |\" + name\n + \"| not found in the database.\");\n }\n }\n else {\n if (matrix.getMovies().contains(name) != null) {\n // Node with the reference to the list we are comparing\n // other lists to\n MSLList.Node n = matrix.getMovies().contains(name);\n // Gets the head to the DLList that we are comparing other\n // lists\n // to\n Node<Integer> node = n.getList().getHead();\n // The first node in the reviewer list\n MSLList.Node n1 = matrix.getMovies().getHead();\n // Iterates through the lists we are comparing to this list\n while (n1 != null) {\n if (n.equals(n1)) {\n n1 = n1.getNext();\n }\n else {\n MDLList<Integer> simList = n1.getList();\n Node<Integer> simNode = null;\n // Going through this list to find matching movies\n // in simList\n node = n.getList().getHead();\n while (node != null) {\n simNode = simList.containsReviewer(node\n .getReviewerName());\n if (simNode != null) {\n simCount++;\n // Compute the score\n // Add the name and score to the array\n val += Math.abs(simNode.getValue() - node\n .getValue());\n }\n node = node.getNextReviewer();\n }\n if (simCount != 0 && (val / simCount) < score) {\n simName = simList.getHead().getMovieName();\n score = val / simCount;\n }\n val = 0;\n simCount = 0;\n n1 = n1.getNext();\n }\n }\n printSimilar(\"movie\", name, simName, score);\n }\n else {\n System.out.println(\"Movie |\" + name\n + \"| not found in the database.\");\n }\n }\n }", "private ArrayList<Rating> getSimilarities(String id){\n \n String moviefile = \"data/ratedmovies_short.csv\";\n String ratingsfile = \"data/ratings_short.csv\";\n \n RaterDatabase database = new RaterDatabase();\n database.initialize(ratingsfile);\n \n ArrayList<Rating> dot_list = new ArrayList<Rating>();\n \n Rater me = database.getRater(id);\n \n for (Rater rater : database.getRaters()){\n \n if(rater != me){\n \n double dot_product = dotProduct(me, rater);\n \n if (dot_product >= 0.0){\n \n Rating new_rating = new Rating(rater.getID() , dot_product);\n \n dot_list.add(new_rating);\n }\n \n }\n \n }\n \n Collections.sort(dot_list , Collections.reverseOrder());\n \n return dot_list;\n \n }", "public double getLocalSimilarityThreshold() {\n return localSimilarityThreshold;\n }", "LinkedListSortedNeighborSet obtainKNeighbors(int paraObjectIndex) {\n LinkedListSortedNeighborSet tempNeighborSet = new LinkedListSortedNeighborSet();\n tempNeighborSet.setNeighborThreshold(k);\n\n for (int i = 0; i < formalContext.trainingFormalContext.length; i++) {\n//\t\t\tSystem.out.println(\"u: \" + paraObjectIndex);\n if (i != paraObjectIndex) {\n//\t\t\t\tSystem.out.println(\"v: \" + i);\n Measures tempSimilarityMetric = new Measures(formalContext.trainingFormalContext[paraObjectIndex],\n formalContext.trainingFormalContext[i]);\n double tempSimilarity = tempSimilarityMetric.jaccardSimilarity();\n//\t\t\t\tSystem.out.println(\"Similarity: \" + tempSimilarity);\n tempNeighborSet.topKSortedInsert(i, tempSimilarity);\n//\t\t\t\tSystem.out.println(\"\" + tempNeighborSet.toString());\n } // End if\n } // End for\n return tempNeighborSet;\n }", "public double getRealSimilarity()\r\n {\r\n double result = (1 - this.similarity) * 100;\r\n BigDecimal big = new BigDecimal(result).setScale(2, RoundingMode.UP);\r\n return big.doubleValue();\r\n }", "@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic double calculateSimilarity(String tag1, String tag2) {\n\t\tHashMap<String, ArrayList<HashMap<String, HashSet<String>>>> userMap = db.getUserMap();\n\t\tdouble similarity = 0.0;\n\t\t\t\t\n\t\tfor(String user : userMap.keySet()){\n\t\t\n\t\t\tHashMap<String, HashSet<String>> tagsMap = userMap.get(user).get(1);\n\t\t\tint totalTags = tagsMap.keySet().size();\n\t\t\t\n\t\t\tif(null == tagsMap.get(tag1) || null == tagsMap.get(tag2))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tHashMap<String, HashSet<String>> resourcesMap = userMap.get(user).get(0);\n\t\t\t\n\t\t\tdouble userSimilarity = 0.0;\n\t\t\t\n\t\t\tfor(String resource : resourcesMap.keySet()){\n\t\t\t\tHashSet<String> tags = resourcesMap.get(resource);\n\t\t\t\t\n\t\t\t\tif(tags.contains(tag1) && tags.contains(tag2)){\n\t\t\t\t\tuserSimilarity += Math.log(\n\t\t\t\t\t\t\t( (double) tags.size() ) /\n\t\t\t\t\t\t\t( ( (double) totalTags ) + 1.0 )\n\t\t\t\t\t\t\t);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tsimilarity += -userSimilarity;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn similarity; //rounding is necessary to match the results given at: www2009.org/proceedings/pdf/p641.pdf\n\t\t\n\t}", "@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }", "@Test\r\n public void testGroupSimilarity() throws Exception {\r\n final List<ICluster> originalCLuster = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster);\r\n List<ICluster> l1 = new ArrayList<ICluster>(originalCLuster);\r\n\r\n final List<ICluster> originalCLuster2 = ClusteringTestUtilities.readSpectraClustersFromResource();\r\n Collections.sort(originalCLuster2);\r\n List<ICluster> l2 = new ArrayList<ICluster>(originalCLuster2);\r\n\r\n ClusterListSimilarity cd = new ClusterListSimilarity(distanceMeasure);\r\n final List<ICluster> identical = cd.identicalClusters(l1, l2);\r\n\r\n Assert.assertEquals(originalCLuster.size(), identical.size());\r\n Assert.assertTrue(l1.isEmpty());\r\n Assert.assertTrue(l2.isEmpty());\r\n }", "public String getRelatedSubject (double [] vector){\n VectorSpaceModel vectorSpaceModel = new VectorSpaceModel();\n MongoCursor<Document> cr = subject.find().iterator();\n class similarities implements Comparable<similarities>{\n double sim = 0.0;\n ArrayList<String> docs;\n public similarities(double s,ArrayList<String> d){\n this.sim =s;\n this.docs = d;\n }\n @Override\n public int compareTo(similarities s1) {\n if (this.sim < s1.sim) return 1;\n else return -1;\n }\n }\n ArrayList<similarities> sims = new ArrayList<similarities>();\n try {\n while (cr.hasNext()){\n Document sbj = cr.next();\n String tnp = (String)sbj.get(\"spaceVector\");\n ArrayList<String> docs = (ArrayList<String>) sbj.get(\"docs\");\n String [] vct = tnp.split(\",\");\n double[] vec1 = Arrays.stream(vct)\n .mapToDouble(Double::parseDouble)\n .toArray();\n double sim = vectorSpaceModel.getSimilarity(vec1,vector);\n if (sim>0.55){\n sims.add(new similarities(sim,docs));\n\n }\n }\n\n}\n finally {\n // cr.close();\n }\n Collections.sort(sims);\n String result = \"{\\\"docs\\\":[\";\n for(similarities sim:sims){\n System.out.println(sim.docs);\n System.out.println(sim.sim);\n result+=\"{\\\"sim\\\":\"+sim.sim+\",\\\"docs\\\":[\";\n for(String doc:sim.docs){\n result+=\"\\\"\"+doc+\"\\\",\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]},\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]}\";\n return result;\n}", "private double efficientLInfinityDistance(Instance one, Instance two, double threshold) {\n\n double attributeDistance;\n double maxDistance = 0;\n\n for (int i = 0; i < one.numAttributes() - 1; i++) {\n attributeDistance = Math.abs(one.value(i) - two.value(i));\n\n if (attributeDistance > maxDistance) {\n maxDistance = attributeDistance;\n }\n if (maxDistance > threshold) {\n return Double.MAX_VALUE;\n }\n }\n\n return maxDistance;\n }", "public ArrayList<ResourceType> calculateResourceTypeSimilarity(String requestedResourceTypeName){\r\n\t\tArrayList<ResourceType> resourceTypeArray = new ArrayList<ResourceType>();\r\n\t\tResourceType resourceType;\r\n\t\tArrayList<ResourceType> resourceTypeSimilarityArray = new ArrayList<ResourceType>();\r\n\r\n\t\t//get resource type information contents\r\n\t\tString line1;\r\n\t String line2;\r\n\t String line3;\r\n\t\tFile file = new File(\"D:/Workspace_J2EE/SECoG/Data/ResourceType/ResourceTypeInformationContents.txt\");\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(file))) {\r\n\t\t while ((line1 = br.readLine()) != null) {\r\n\t\t \tline2 = br.readLine();\r\n\t\t \tline3 = br.readLine();\r\n\t\t \tresourceType = new ResourceType(line1, line2, Float.parseFloat(line3));\r\n\t\t \t//System.out.println(\"line1,2,3 is: \" + line1 + \", \" + line2 + \", \" + line3);\r\n\t\t \t\r\n\t\t \tresourceTypeArray.add(resourceType);\r\n\t\t }\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//get requested resource type index\r\n\t\tint requestedResourceTypeIndex = 0;\r\n\t\tfor(int i=1; i<resourceTypeArray.size(); i++){\r\n\t\t\t//System.out.println(resourceTypeArray.get(i).name);\r\n\t\t\tif(requestedResourceTypeName.equals(resourceTypeArray.get(i).name)){\r\n\t\t\t\trequestedResourceTypeIndex = i;\r\n\t\t\t\t//System.out.println(\"The requestedResourceTypeIndex is: \" + requestedResourceTypeIndex);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//calculate resource type similarity\r\n\t\tfor(int i=1; i<resourceTypeArray.size(); i++){\r\n\t\t\t//System.out.println(\"Comparison object is: \" + resourceTypeArray.get(i).name);\r\n\t\t\t/*if(i==requestedResourceTypeIndex){\r\n\t\t\t\tcontinue;\r\n\t\t\t}*/\r\n\t\t\t//System.out.println(\"Comparison object hierarchy is: \" + resourceTypeArray.get(i).hierarchy);\r\n\t\t\t\r\n\t\t\t//get nearest common parent node\r\n\t\t\tString requestedHierarchy = resourceTypeArray.get(requestedResourceTypeIndex).hierarchy;\r\n\t\t\tString currentHierarchy = resourceTypeArray.get(i).hierarchy;\r\n\t\t\tString commonParentHierchary = \"\";\r\n\t\t\t\r\n\t\t\tfor(int j=1; j<=Math.min(requestedHierarchy.length(), currentHierarchy.length()); j++){\r\n\t\t\t\tString subRequest = requestedHierarchy.substring(0, j);\r\n\t\t\t\tString subCurrent = currentHierarchy.substring(0, j);\r\n\t\t\t\t\r\n\t\t\t\tif(!subRequest.equals(subCurrent)){\r\n\t\t\t\t\tcommonParentHierchary = requestedHierarchy.substring(0, j-1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else if(j == Math.min(requestedHierarchy.length(),currentHierarchy.length())){\r\n\t\t\t\t\tcommonParentHierchary = requestedHierarchy.substring(0, j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//System.out.println(\"commonParentHierchary is: \" + commonParentHierchary);\r\n\t\t\t\r\n\t\t\t//get the similarity\r\n\t\t\tResourceType resourceTypeSimilarity;\r\n\t\t\tfor(int m=0; m<resourceTypeArray.size(); m++){\r\n\t\t\t\tcurrentHierarchy = resourceTypeArray.get(m).hierarchy;\r\n\t\t\t\t//System.out.println(\"current hierarchy is: \" + currentHierarchy);\r\n\t\t\t\t\r\n\t\t\t\tif(currentHierarchy.equals(commonParentHierchary)){\r\n\t\t\t\t\tresourceTypeSimilarity = new ResourceType(resourceTypeArray.get(i).name, resourceTypeArray.get(i).hierarchy, resourceTypeArray.get(m).informationContent);\r\n\t\t\t\t\t//System.out.println(\"currentSimilarity is: \" + currentSimilarity);\r\n\t\t\t\t\t\r\n\t\t\t\t\tresourceTypeSimilarityArray.add(resourceTypeSimilarity);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn resourceTypeSimilarityArray;\t\t\r\n\t}", "public String getRelatedSubjectByPknows (double [] vector,String[] knowns){\n VectorSpaceModel vectorSpaceModel = new VectorSpaceModel();\n MongoCursor<Document> cr = subject.find().iterator();\n class similarities implements Comparable<similarities>{\n double sim = 0.0;\n ArrayList<String> docs;\n String skills;\n String name;\n\n public similarities(double s,ArrayList<String> d,String sk,String name){\n this.sim =s;\n this.docs = d;\n this.skills = sk;\n this.name = name;\n }\n @Override\n public int compareTo(similarities s1) {\n if (this.sim < s1.sim) return 1;\n else return -1;\n }\n }\n ArrayList<similarities> sims = new ArrayList<similarities>();\n ArrayList<Double> knowns_vector =new ArrayList<Double>() ;\n\n try {\n while (cr.hasNext()){\n Document sbj = cr.next();\n String tnp = (String)sbj.get(\"spaceVector\");\n String skills = (String)sbj.get(\"skills\");\n String [] doc_skills = skills.split(\",\");\n System.out.println(\"doc_skills\"+doc_skills[0]+(String)sbj.get(\"id\"));\n /* check length of docs knows and user skills in other having same vector length*/\n if (knowns.length>=doc_skills.length){\n /* Init ouput vector to need dimension */\n for (int i=0;i<knowns.length;i++){\n knowns_vector.add(i,new Double(0.0));\n }\n /* get skills of doc related to pknows */\n System.out.println(\"knows larger\");\n for (int i = 0; i<knowns.length;i++){\n if (knowns[i]!=null){\n\n int ind = Arrays.asList(doc_skills).indexOf(knowns[i]);\n if (ind!=-1){\n System.out.println(\"knows checking \"+knowns[i]+\" \"+skills);\n System.out.println(\"barruan \"+ind+\" \"+vector[i]);\n knowns_vector.add(ind,new Double(vector[i]));\n }\n else knowns_vector.add(new Double(0.0));\n }\n }\n }\n else {\n /* Init ouput vector to need dimension */\n for (int j=0;j<doc_skills.length;j++){\n knowns_vector.add(j,new Double(0.0));\n }\n for (int i = 0; i<knowns.length;i++){\n\t for (int x = 0 ; x<doc_skills.length;x++){\n\t\tif (doc_skills[x].equals(knowns[i])) knowns_vector.add(x,new Double(vector[i]));\n\t\telse knowns_vector.add(x,new Double(0.0));\n \n\t\t\t\n }\n }\n }\n ArrayList<String> docs = (ArrayList<String>) sbj.get(\"docs\");\n String [] vct = tnp.split(\",\");\n double[] vec1 = Arrays.stream(vct)\n .mapToDouble(Double::parseDouble)\n .toArray();\n double[] knowns_vector1 = knowns_vector.stream().mapToDouble(Double::doubleValue).toArray();\n\n double sim = vectorSpaceModel.getSimilarity(vec1,knowns_vector1);\n System.out.println(sim);\n if (sim>0.09){\n sims.add(new similarities(sim,docs,skills,(String)sbj.get(\"id\")));\n\n }\n }\n\n}\n finally {\n // cr.close();\n }\n Collections.sort(sims);\n String result = \"{\\\"docs\\\":[\";\n for(similarities sim:sims){\n System.out.println(sim.docs);\n System.out.println(sim.sim);\n result+=\"{\\\"name\\\":\\\"\"+sim.name+\"\\\",\\\"sim\\\":\"+sim.sim+\",\\\"skills\\\":\\\"\"+sim.skills+\"\\\",\\\"docs\\\":[\";\n for(String doc:sim.docs){\n result+=\"\\\"\"+doc+\"\\\",\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]},\";\n }\n result = result.substring(0,result.length()-1);\n result+=\"]}\";\n if (sims.size() ==0) return \"{\\\"docs\\\":[]}\";\n return result;\n}", "public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}", "public float compare(Cluster other) {\n \treturn compare(center, other.center);\n }", "public List<ImgDescriptor> search(ImgDescriptor queryF, int k) {\n\t\tfor (int i = 0; i < descriptors.size(); i++) {\n\t\t\tdescriptors.get(i).distance(queryF);\n\t\t}\n\t\tCollections.sort(descriptors);\n\t\t\n\t\treturn descriptors.subList(0, k);\n\t}", "@Override\n public double evaluate(IntelliTuple tuple, IntelliContext context) {\n double CBLOF = Double.MAX_VALUE;\n\n double maxSim = Double.MIN_VALUE;\n Cluster closestCluster = null;\n for(Cluster c : clusters){\n double sim = c.similarity(context, tuple);\n if(sim > maxSim){\n maxSim = sim;\n closestCluster = c;\n }\n }\n\n if(closestCluster.getIndex() > split){ // c belongs to small clusters\n double minDistance = Double.MAX_VALUE;\n for(int j=0; j <= split; ++j){\n double distance = clusters.get(j).distance(context, tuple);\n if(minDistance > distance){\n minDistance = distance;\n }\n }\n\n CBLOF = closestCluster.size() * minDistance;\n }else{\n CBLOF = closestCluster.size() * closestCluster.distance(context, tuple);\n }\n\n return CBLOF;\n }", "@Test void filterAndSortMatches_Filtered() {\n\t\tvar matches = new DogArray<>(BowMatch::new, BowMatch::reset);\n\n\t\t// Limit is greater than the number of matches, before filtering\n\t\t// The filter will remove all odd ID and return half\n\t\tmatches.resize(50);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, 100);\n\t\tassertEquals(25, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\n\t\t// Limit is greater than the number of matches, after filtering\n\t\tmatches.resize(50);\n\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, 27);\n\t\tassertEquals(25, matches.size);\n\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\n\t\t// Limit is less than the number of matches, after filtering\n\t\tfor (int limit = 5; limit < 20; limit++) {\n\t\t\tmatches.resize(50);\n\t\t\tmatches.forIdx(( idx, m ) -> m.identification = idx);\n\t\t\tmatches.forIdx(( idx, m ) -> m.error = 50 - idx);\n\t\t\tBowUtils.filterAndSortMatches(matches, ( id ) -> id%2==0, limit);\n\t\t\tassertEquals(limit, matches.size);\n\t\t\tmatches.forIdx(( idx, m ) -> assertEquals(48 - idx*2, m.identification));\n\t\t}\n\t}", "public ReferenceNode searchMatchNodeForDist(double[] data) {\n ReferenceNode node = nodeList.get(0);\n double distSqr = node.calculateDistanceSqrForLearning(data);\n ReferenceNode winningNode = node;\n double newDistSqr = 0.0d;\n for (int i = 1; i < nodeList.size(); i++) {\n node = nodeList.get(i);\n newDistSqr = node.calculateDistanceSqrForLearning(data);\n if (newDistSqr < distSqr) {\n winningNode = node;\n distSqr = newDistSqr;\n }\n }\n return winningNode;\n }", "public ArrayList<Record> near()\n {\n int count = 0;\n ArrayList<Record> closest = new ArrayList<>();\n System.out.println(\"Community Centres that are 5km or less to your location are: \");\n for(Record i: cCentres)\n {\n //latitude and longitude for each centre\n double lat2 = Double.parseDouble(i.getValue(4));\n double lon2 = Double.parseDouble(i.getValue(3));\n ;\n //distance\n double dist = calcDist(lat2, lon2, cCentres);\n if(dist<=5)\n {\n System.out.println(i + \", Distance: \" + dist + \" km\");\n closest.add(i);\n }\n }\n return closest;\n }", "@Override\n public int compareTo(AutocompleteObject o) {\n return Double.compare(o.similarity, similarity);\n }", "public interface SimilarityDao {\n public void saveAllSimilarities(Collection<Similarity> similarities);\n public void deleteAllSimilarities(Long imageId);\n public List<Similarity> getImageNearestDistance(Image image);\n}", "public String[] filterRNR(String[] cloneMetricArray){\n\t\tArrayList<String> filteredList = new ArrayList<String>(); //place into string array list because we dont know the size\n\t\tfilteredList.add(\"CID LEN POP NIF RAD RNR TKS LOOP COND McCabe\");\n\t\tfor(int i = 1; i < cloneMetricArray.length; i++){\n\t\t\tString[] temp = toWord(cloneMetricArray[i]);\n\t\t\tfloat RNR = Float.parseFloat(temp[5]);\t\t\t\n\t\t\tif(RNR > filterValue){\n\t\t\t\tfilteredList.add(cloneMetricArray[i]);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tString[] filteredArray = filteredList.toArray(new String[filteredList.size()]); //convert Arraylist to array\n\t\treturn filteredArray;\n\t}", "@Test\n\tpublic void testCountSimilarity() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(false, true, false);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 15, \"01.01.2015 00:00:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 5, \"31.12.2015 00:00:00\", \"31.12.2015 02:00:00\");\n\n\t\t// get the similar once on a global measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MAX(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getCountDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// 30.11.15: (00:10) +++++ (01:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 00:10:00\", \"30.11.2015 01:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MIN(IDEAS) AS IDEAS ON TIME.DEF.HOUR\",\n\t\t\t\t\t\t\"NAME='Philipp'\"), 1);\n\t\tr = res.get(0);\n\t\t// 70 minutes (00:00 - 00:09 and 01:01 - 02:00)\n\t\tassertEquals(70.0, r.getCountDistance(), 0.0);\n\t\tassertEquals(70.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add another data package\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (5)\n\t\t// (00:10) ++++ (00:50) Edison (5)\n\t\t// 30.11.15: (00:00) +++++ (00:50) Edison (5) \n\t\t// (00:10) +++++ (01:00) Philipp (5)\n\t\t// (01:00) ++++++ (02:00) Philipp (5)\n\t\t// 31.12.15: (00:00) ++++++++++++ (02:00) Tobias (5)\n\t\t// @formatter:on\n\t\tloadData(\"Edison\", 5, \"30.11.2015 00:00:00\", \"30.11.2015 00:50:00\");\n\t\tloadData(\"Philipp\", 5, \"30.11.2015 01:00:00\", \"30.11.2015 02:00:00\");\n\t\tloadData(\"Edison\", 5, \"01.01.2015 00:10:00\", \"01.01.2015 00:50:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\t// 1 minute (01:00:00)\n\t\tassertEquals(1.0, r.getCountDistance(), 0.0);\n\t\tassertEquals(1.0, r.getTotalDistance(), 0.0);\n\t\t// 1448841600000l == 30 Nov 2015 00:00:00 UTC\n\t\tassertEquals(1448841600000l, ((Date) r.getLabelValue(0)).getTime());\n\t}", "public ArrayList<String> top5search(String kw1, String kw2) {\n\t\tkw1 = kw1.toLowerCase();\n kw2 = kw2.toLowerCase();\n ArrayList <String> outArr = new ArrayList <String> ();\n ArrayList <Occurrence> kw1Arr = null;\n ArrayList <Occurrence> kw2Arr = null;\n for(String e: keywordsIndex.keySet()) {\n if(e.equals(kw1) == true) {\n kw1Arr = keywordsIndex.get(e);}\n if(e.equals(kw2) == true) {\n kw2Arr = keywordsIndex.get(e);}}\n int kw1Point = 0;\n int kw2Point = 0;\n for(int inc = 0; inc < 5; inc++) {\n int kw1Value = 0;\n Occurrence kw1Occ = null;\n int kw2Value = 0;\n Occurrence kw2Occ = null;\n if(kw1Arr != null && kw1Point < kw1Arr.size()) {\n kw1Occ = kw1Arr.get(kw1Point);\n kw1Value = kw1Occ.frequency;}\n if(kw2Arr != null && kw2Point < kw2Arr.size()) {\n kw2Occ = kw2Arr.get(kw2Point);\n kw2Value = kw2Occ.frequency;}\n if(kw1Value == 0 && kw2Value == 0) {\n \t//will only occur if the if-statements for 212 and 215 are false\n \t//which means that the array doesn't exist or the pointer has iterated through the whole array\n break;}\n if(kw1Value >= kw2Value) {\n outArr.add(kw1Occ.document);\n kw1Point = kw1Point + 1;}\n else {outArr.add(kw2Occ.document);\n kw2Point = kw2Point + 1;}}\n if(outArr.size() == 0) {//no found matches\n return null;}\n else {return outArr;}//found matches\n\t}", "public double similarity(String word,String word2) {\n if(word.equals(word2))\n return 1.0;\n\n INDArray vector = Transforms.unitVec(getWordVectorMatrix(word));\n INDArray vector2 = Transforms.unitVec(getWordVectorMatrix(word2));\n if(vector == null || vector2 == null)\n return -1;\n return Nd4j.getBlasWrapper().dot(vector,vector2);\n }", "public List<Neighbor> getNearNeighborsInSample(double[] point, double distanceThreshold) {\n checkNotNull(point, \"point must not be null\");\n checkArgument(distanceThreshold > 0, \"distanceThreshold must be greater than 0\");\n\n if (!isOutputReady()) {\n return Collections.emptyList();\n }\n\n Function<RandomCutTree, Visitor<Optional<Neighbor>>> visitorFactory = tree ->\n new NearNeighborVisitor(point, distanceThreshold);\n\n return traverseForest(point, visitorFactory, Neighbor.collector());\n }", "public double compareImages(ImageSub img1, ImageSub img2) {\n\t\tdouble[] channels = new double[3];\n\t\tdouble sumOfSquares = 0;\n\t\tfor(int i = 0; i < channels.length; i++) {\n\t\t\tchannels[i] = Imgproc.compareHist(img1.cvChannels.get(i), img2.cvChannels.get(i), Imgproc.CV_COMP_BHATTACHARYYA);\n\t\t\t\n\t\t\t//Uncomment this. Comment the line above\n\t\t\t//channels[i] = SSIM.compareImages(img1.cvChannels.get(i), img2.cvChannels.get(i));\n\t\t\tsumOfSquares += channels[i];\n\t\t}\n\t\tsumOfSquares /= channels.length;\n\t\t//System.out.println(sumOfSquares);\n\t\treturn sumOfSquares;\n\t}", "private double isSimilar(double rightHandSimilarity, double leftHandSimilarity, List<Double> rightFingersSimilarity, List<Double> leftFingersSimilarity, double rightMotionSimilarity, double leftMotionSimilarity, List<List<Double>> touchList) {\n return rightHandSimilarity * leftHandSimilarity;\n }", "private Sim[] findNeighbors(Product p, ArrayList<Product> trainData, int k) {\n\t\tSimComparator sComparator = new SimComparator();\n\t\tPriorityQueue<Sim> pq = new PriorityQueue<Sim>(k, sComparator);\n\t\tfor (Product tp : trainData) {\n\t\t\tSim sim = getSimilarity(p, tp, weights);\n\t\t\tpq.offer(sim);\n\t\t}\n\t\tSim[] neighbors = new Sim[k];\n\t\tfor (int i = 0; i < k; i++)\n\t\t\tneighbors[i] = pq.poll();\n\t\treturn neighbors;\n\t}", "public Collection<String> wordsNearest(String word,int n) {\n INDArray vec = Transforms.unitVec(this.getWordVectorMatrix(word));\n\n\n if(cache instanceof InMemoryLookupCache) {\n InMemoryLookupCache l = (InMemoryLookupCache) cache;\n INDArray syn0 = l.getSyn0();\n INDArray weights = syn0.norm2(0).rdivi(1).muli(vec);\n INDArray distances = syn0.mulRowVector(weights).sum(1);\n INDArray[] sorted = Nd4j.sortWithIndices(distances,0,false);\n INDArray sort = sorted[0];\n List<String> ret = new ArrayList<>();\n VocabWord word2 = cache.wordFor(word);\n if(n > sort.length())\n n = sort.length();\n //there will be a redundant word\n for(int i = 0; i < n + 1; i++) {\n if(sort.getInt(i) == word2.getIndex())\n continue;\n ret.add(cache.wordAtIndex(sort.getInt(i)));\n }\n\n\n return ret;\n }\n\n if(vec == null)\n return new ArrayList<>();\n Counter<String> distances = new Counter<>();\n\n for(String s : cache.words()) {\n if(s.equals(word))\n continue;\n INDArray otherVec = getWordVectorMatrix(s);\n double sim = Transforms.cosineSim(vec,otherVec);\n distances.incrementCount(s, sim);\n }\n\n\n distances.keepTopNKeys(n);\n return distances.keySet();\n\n }", "public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private List<Point> neighboursFiltering(List<Point> points) {\n Point nearest = points.get(0);\n HeartDistance calculator = new HeartDistance();\n return points.stream().filter(p -> calculator.calculate(p,nearest) < NEIGHBOURS_THRESHOLD).collect(Collectors.toList());\n }", "private Sim getSimilarity(Product p1, Product p2, double[] weights) {\n\t\tdouble d1 = 1 - matrix.getServiceMatrix()[p1.getNormalizedService()][p2\n\t\t\t\t.getNormalizedService()];\n\t\tdouble d2 = 1 - matrix.getCustomerMatrix()[p1.getNormalizedCustomer()][p2\n\t\t\t\t.getNormalizedCustomer()];\n\t\tdouble d3 = p1.getNormalizedFee() - p2.getNormalizedFee();\n\t\tdouble d4 = p1.getNormalizedAds() - p2.getNormalizedAds();\n\t\tdouble d5 = 1 - matrix.getSizeMatrix()[p1.getNormalizedSize()][p2\n\t\t\t\t.getNormalizedSize()];\n\t\tdouble d6 = 1 - matrix.getPromotionMatrix()[p1.getNormalizedPromo()][p2\n\t\t\t\t.getNormalizedPromo()];\n\t\tdouble d7 = p1.getNormalizedInterest() - p2.getNormalizedInterest();\n\t\tdouble d8 = p1.getNormalizedPeriod() - p2.getNormalizedPeriod();\n\t\tdouble sum = weights[0] * Math.pow(d1, 2) + weights[1]\n\t\t\t\t* Math.pow(d2, 2) + weights[2] * Math.pow(d3, 2) + weights[3]\n\t\t\t\t* Math.pow(d4, 2) + weights[4] * Math.pow(d5, 2) + weights[5]\n\t\t\t\t* Math.pow(d6, 2) + weights[6] * Math.pow(d7, 2) + weights[7]\n\t\t\t\t* Math.pow(d8, 2);\n\t\tdouble simValue = 1 / Math.sqrt(sum);\n\t\tSim sim = new Sim(p2, simValue);\n\t\treturn sim;\n\t}", "public Set<String> queryTermsConsidered(Query query, double idf_threshold){\n double idf, nDocs = this.docIDs.size();\n String term;\n\n Set<String> termsToConsider = new HashSet<String>();\n\n Iterator<String> it = query.terms.iterator();\n while(it.hasNext()){\n term = it.next();\n idf = -1;\n if(this.idfMap.containsKey(term))\n idf = Math.log(nDocs/new Double(this.idfMap.get(term)));\n if (idf >= idf_threshold){\n termsToConsider.add(term);\n }\n /*else{\n System.err.println(term + \" not considered since idf = \" + idf);\n }*/\n }\n\n return termsToConsider;\n\n }", "public static Object[] scoreHomophones(String cipher, int thresholdCount, float thresholdRatio) {\n\t\tList<Object[]> results = Homophones.homophoneSearch(2, Homophones.alphabetFrom(cipher), cipher, true);\n\t\t\n\t\t//TODO: also track sums per symbol, or maybe associated sums per homophone candidate (and relate accuracy to them)\n\n\t\t// track best findings on a per-symbol basis\n\t\tMap<Character, Object[]> map = new HashMap<Character, Object[]>();\n\t\t\n\t\t// for each homophone candidate, add scores for all others that share one of its symbols\n\t\tMap<String, Integer[]> associatedSums = new HashMap<String, Integer[]>();\n\t\t\n\t\t// track all findings\n\t\tList<Object[]> list = new ArrayList<Object[]>();\n\t\t\n\t\tfor (Object[] o : results) { // array is [len of sequences, # of matches found, homophone candidate, full sequence]\n\t\t\t\n\t\t\tString str = (String) o[2];\n\t\t\tString seq = (String) o[3];\n\t\t\tInteger count = (Integer) o[1];\n\t\t\tInteger len = (Integer) o[0];\n\t\t\t//System.out.println(\"h \" + str + \" seq \" + seq + \" count \" + count + \" len \" + len);\n\t\t\tfloat ratio = (float) count*str.length()/len;\n\t\t\tif (ratio >= thresholdRatio && count > thresholdCount) {\n\t\t\t\tlist.add(new Object[] {count, str, seq});\n\t\t\t\tfor (int i=0; i<str.length(); i++) {\n\t\t\t\t\tCharacter key = str.charAt(i);\n\t\t\t\t\tObject[] val = map.get(key);\n\t\t\t\t\tif (val == null) val = new Object[] {0, null, null};\n\t\t\t\t\tint c = (Integer) val[0];\n\t\t\t\t\tif (count > c) {\n\t\t\t\t\t\tval[0] = count;\n\t\t\t\t\t\tval[1] = str;\n\t\t\t\t\t\tval[2] = seq;\n\t\t\t\t\t}\n\t\t\t\t\tmap.put(key, val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint total = 0;\n\t\t\t\tfor (String key : associatedSums.keySet()) {\n\t\t\t\t\t//System.out.println(\"str \" + str + \" key \" + key);\n\t\t\t\t\tif (key.indexOf(str.charAt(0)) == -1 && key.indexOf(str.charAt(1)) == -1) continue;\n\t\t\t\t\tInteger[] val = associatedSums.get(key);\n\t\t\t\t\tif (val == null) val = new Integer[] {0,0};\n\t\t\t\t\ttotal += val[0];\n\t\t\t\t\tval[1] += count;\n\t\t\t\t\tassociatedSums.put(key, val);\n\t\t\t\t\t//System.out.println(\" - val \" + val[0] + \", \" + val[1] + \" total \" + total);\n\t\t\t\t}\n\t\t\t\tassociatedSums.put(str, new Integer[] {count, total});\n\t\t\t}\n\t\t}\n\t\treturn new Object[] {map, list, associatedSums};\n\t}", "public ApproximateSearch(\n final JavaPairRDD<Node<T>, NeighborList> graph,\n final SimilarityInterface<T> similarity,\n final int partitions) {\n\n // Partition the graph\n KMedoids<T> partitioner\n = new KMedoids<T>(similarity, partitions);\n JavaPairRDD<Node<T>, NeighborList> partitioned_graph =\n partitioner.partition(graph).graph;\n\n this.distributed_graph = DistributedGraph.toGraph(\n partitioned_graph, similarity);\n this.distributed_graph.cache();\n this.distributed_graph.count();\n }", "ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);", "public interface EQSimilarity {\n \n /**\n * Compute similarity between two equivalence classes. The equivalence\n * classes are referenced by their unique identifier.\n * \n * @param eq1\n * @param eq2\n * @return \n */\n public SimilarityScore sim(int eq1, int eq2);\n}", "@Override\n public ArrayList<int[]> Split()\n {\n double hypervolume_best = -Double.MAX_VALUE;\n int hypervolume_best_i = 0;\n int hypervolume_best_j = 0;\n double hypervolume = 0d;\n\n for( int i = 0; i < Capacity_max + 1; i++)\n {\n for( int j = i + 1; j < Capacity_max + 1; j++)\n {\n hypervolume = 0d;\n double[] point1 = PointMatrix[ Items.get(i)[0] ][ Items.get(i)[1] ];\n double[] point2 = PointMatrix[ Items.get(j)[0] ][ Items.get(j)[1] ];\n\n for(int a = 0; a < Dimensions; a++)\n {\n if( point1[a] > point2[a] )\n hypervolume += Math.log10(point1[a] - point2[a]);\n if( point1[a] < point2[a] )\n hypervolume += Math.log10(point2[a] - point1[a]);\n }\n\n if( hypervolume_best < hypervolume)\n {\n hypervolume_best_i = i;\n hypervolume_best_j = j;\n hypervolume_best = hypervolume;\n }\n }\n }\n\n // Ready the split\n ArrayList<int[]> items_split = new ArrayList<>();\n items_split.addAll(Items);\n\n int point1_x = items_split.get(hypervolume_best_i)[0];\n int point1_y = items_split.get(hypervolume_best_i)[1];\n int point2_x = items_split.get(hypervolume_best_j)[0];\n int point2_y = items_split.get(hypervolume_best_j)[1];\n double[] point1 = PointMatrix[ point1_x ][ point1_y ];\n double[] point2 = PointMatrix[ point2_x ][ point2_y ];\n\n if(hypervolume_best_i > hypervolume_best_j)\n {\n items_split.remove(hypervolume_best_i);\n items_split.remove(hypervolume_best_j);\n }\n else\n {\n items_split.remove(hypervolume_best_j);\n items_split.remove(hypervolume_best_i);\n }\n\n // Create new box with point1\n BoundingBoxLeaf box1 = new BoundingBoxLeaf( PointMatrix, ParentBox, Tree, Depth, point1_x, point1_y );\n\n box1.SetBoxToFit(point1);\n box1.SetCoordsToFit( point1_x, point1_y);\n \n // Reset this box, and add point2\n BoundingBoxLeaf box2 = this;\n \n box2.SetBoxToFit(point2);\n box2.SetCoordsToFit( point2_x, point2_y);\n\n box2.Items.clear();\n box2.Items.add( new int[]{ point2_x, point2_y } );\n\n // Notify parent of split\n ParentBox.InsertBox_internal(box1);\n \n // Add items to the new boxes, up to min capacity\n int[] item_best;\n \n // box1\n while( box1.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n \n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box1.Items.add( new int[]{ item_best[0], item_best[1] } );\n box1.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box1.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // box2\n while( box2.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box2.Items.add( new int[]{ item_best[0], item_best[1] } );\n box2.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box2.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // return remaining to be reinserted into the tree\n return items_split; \n }", "@Test\n\tpublic void testStructureSimilarity1() {\n\t\tList<TimeSeriesSimilarityCollection> res;\n\t\tTimeSeriesSimilarityCollection r;\n\n\t\t// we are interested in measure now\n\t\tevaluator.setSimilarity(false, false, true);\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (7)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (17)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 3, \"01.01.2015 00:00:00\", \"01.01.2015 01:00:00\");\n\t\tloadData(\"Philipp\", 7, \"01.01.2015 00:00:00\", \"01.01.2015 01:00:00\");\n\t\tloadData(\"Tobias\", 13, \"31.12.2015 00:00:00\", \"31.12.2015 01:00:00\");\n\t\tloadData(\"Tobias\", 17, \"31.12.2015 00:00:00\", \"31.12.2015 01:00:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"SUM(IDEAS) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\tassertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(0.0, r.getStructureDistance(), 0.0);\n\t\tassertEquals(0.0, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\n\t\t// add some data\n\t\t// @formatter:off\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (3)\n\t\t// 01.01.15: (00:00) ++++++ (01:00) Philipp (7)\n\t\t// 01.01.15: (00:00) ++++++++++++ (02:00) Philipp (10)\n\t\t// 01.01.15: (00:00) + (00:10) Philipp (10)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (13)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (17)\n\t\t// 31.12.15: (00:00) ++++++ (01:00) Tobias (1)\n\t\t// 31.12.15: (01:01) ++++++ (02:00) Tobias (2)\n\t\t// 31.12.15: (00:00) + (00:10) Philipp (10)\n\t\t// @formatter:on\n\t\tloadData(\"Philipp\", 10, \"01.01.2015 00:00:00\", \"01.01.2015 02:00:00\");\n\t\tloadData(\"Philipp\", 10, \"01.01.2015 00:00:00\", \"01.01.2015 00:10:00\");\n\t\tloadData(\"Tobias\", 1, \"31.12.2015 00:00:00\", \"31.12.2015 02:00:00\");\n\t\tloadData(\"Tobias\", 2, \"31.12.2015 01:01:00\", \"31.12.2015 02:00:00\");\n\t\tloadData(\"Philipp\", 10, \"31.12.2015 00:00:00\", \"31.12.2015 00:10:00\");\n\n\t\t// get the similar once on a filtered measure level\n\t\tres = evaluator.evaluateSimilarity(\n\t\t\t\tgetQuery(\"MAX(SUM(IDEAS)) AS IDEAS ON TIME.DEF.HOUR\", null), 1);\n\n\t\t// assertEquals(1, res.size());\n\t\tr = res.get(0);\n\t\tassertEquals(3.2, r.getStructureDistance(), 0.0);\n\t\tassertEquals(3.2, r.getTotalDistance(), 0.0);\n\t\t// 1451520000000l == 31 Dec 2015 00:00:00 UTC\n\t\tassertEquals(1451520000000l, ((Date) r.getLabelValue(0)).getTime());\n\t}", "public int compareTo( Similarity other )\n {\n int diff=this.distance - other.distance;\n if(diff!=0) return diff;\n diff=getID(this.pixels.p) - getID(other.pixels.p);\n if(diff!=0) return diff;\n return getID(this.pixels.q) - getID(other.pixels.q);\n }", "public abstract void set(T first, T second, Double similarity);", "public SimilarResultList(int maxSize, double threshold, Collection<SimilarResult<T>> results) {\n this.maxSize = maxSize;\n this.threshold = threshold;\n this.results = new ArrayList<SimilarResult<T>>(maxSize);\n add(results);\n }", "private List<SimilarNode> astCCImplmentation(HashMap<ASTNode, NodeInfo> fileNodeMap1, HashMap<ASTNode, NodeInfo> fileNodeMap2) {\n TreeMap<Integer, List<NodeInfo>> treeMap1 = convertToTreeMap(fileNodeMap1);\n TreeMap<Integer, List<NodeInfo>> treeMap2 = convertToTreeMap(fileNodeMap2);\n List<SimilarNode> result = new ArrayList<>();\n int[] array1 = getArray(treeMap1.keySet());\n int[] array2 = getArray(treeMap2.keySet());\n int i = 0;\n int j = 0;\n int sum = 0;\n while (i < array1.length && j < array2.length) {\n if (array1[i] == array2[j]) {\n // obtain list of nodeInfos for both and compare them if match found then add it to report\n List<NodeInfo> list1 = treeMap1.get(array1[i]);\n List<NodeInfo> list2 = treeMap2.get(array2[j]);\n for (NodeInfo nodeInfo1 : list1) {\n for (NodeInfo nodeInfo2 : list2) {\n if ((nodeInfo1.hashValue == nodeInfo2.hashValue) && (nodeInfo1.nodeType == nodeInfo2.nodeType)) {\n result.add(new SimilarNode(nodeInfo1, nodeInfo2));\n\n }\n }\n }\n i++;\n j++;\n\n } else if (array1[i] > array2[j]) {\n j++;\n } else if (array1[i] < array2[j]) {\n i++;\n }\n }\n return result;\n }", "public static SiftKnnContainer mergetosizeoflarger(SiftKnnContainer a, SiftKnnContainer b) {\n int size = a.getK();\n if (b.getK() > size ) {\n size = b.getK();\n }\n SiftKnnContainer ret = new SiftKnnContainer( size );\n ret.SetQueryPoint(a.getQueryPoint());\n knnPair[] knn = a.getknnPairArray();\n for (int i = 0; i < knn.length ; i++) {\n if (knn[i].distance != Integer.MAX_VALUE) {\n ret.addNoDuplicateIDs(knn[i].pointID, knn[i].distance);\n }\n }\n knn = b.getknnPairArray();\n for (int i = 0; i < knn.length ; i++) {\n if (knn[i].distance != Integer.MAX_VALUE) {\n ret.addNoDuplicateIDs(knn[i].pointID, knn[i].distance);\n }\n }\n return ret;\n }", "public List<ModelingSubmissionComparisonDTO> compareSubmissions(List<ModelingSubmission> modelingSubmissions, double minimumSimilarity, int minimumModelSize,\n int minimumScore) {\n\n Map<UMLDiagram, ModelingSubmission> models = new HashMap<>();\n ObjectMapper objectMapper = new ObjectMapper();\n\n for (var modelingSubmission : modelingSubmissions) {\n if (!modelingSubmission.isEmpty(objectMapper)) {\n try {\n log.debug(\"Build UML diagram from json\");\n UMLDiagram model = UMLModelParser.buildModelFromJSON(parseString(modelingSubmission.getModel()).getAsJsonObject(), modelingSubmission.getId());\n if (model.getAllModelElements().size() >= minimumModelSize) {\n models.put(model, modelingSubmission);\n }\n }\n catch (IOException e) {\n log.error(\"Parsing the modeling submission \" + modelingSubmission.getId() + \" did throw an exception:\", e);\n }\n }\n }\n\n log.info(\"Found \" + models.size() + \" modeling submissions with at least \" + minimumModelSize + \" elements to compare\");\n\n final List<ModelingSubmissionComparisonDTO> comparisonResults = new ArrayList<>();\n\n var nonEmptyModelsList = new ArrayList<>(models.keySet());\n\n // it is intended to use the classic for loop here, because we only want to check similarity between two different submissions once\n for (int i = 0; i < nonEmptyModelsList.size(); i++) {\n for (int j = i + 1; j < nonEmptyModelsList.size(); j++) {\n var model1 = nonEmptyModelsList.get(i);\n var model2 = nonEmptyModelsList.get(j);\n final double similarity = model1.similarity(model2);\n log.debug(\"Compare result \" + i + \" with \" + j + \": \" + similarity);\n if (similarity < minimumSimilarity) {\n // ignore comparison results with too small similarity\n continue;\n }\n\n var submission1 = models.get(model1);\n var submission2 = models.get(model2);\n if (submission1.getResult() != null && submission1.getResult().getScore() != null && submission1.getResult().getScore() < minimumScore\n && submission2.getResult() != null && submission2.getResult().getScore() != null && submission2.getResult().getScore() < minimumModelSize) {\n // ignore comparison results with too small scores\n continue;\n }\n\n log.info(\"Found similar models \" + i + \" with \" + j + \": \" + similarity);\n\n var comparisonResult = new ModelingSubmissionComparisonDTO();\n var element1 = new ModelingSubmissionComparisonElement().submissionId(submission1.getId()).size(model1.getAllModelElements().size());\n var element2 = new ModelingSubmissionComparisonElement().submissionId(submission2.getId()).size(model2.getAllModelElements().size());\n element1.studentLogin(((StudentParticipation) submission1.getParticipation()).getParticipantIdentifier());\n element2.studentLogin(((StudentParticipation) submission2.getParticipation()).getParticipantIdentifier());\n comparisonResult.setElement1(element1);\n comparisonResult.setElement2(element2);\n comparisonResult.similarity(similarity);\n if (submission1.getResult() != null) {\n comparisonResult.getElement1().score(submission1.getResult().getScore());\n }\n if (submission2.getResult() != null) {\n comparisonResult.getElement2().score(submission2.getResult().getScore());\n }\n\n comparisonResults.add(comparisonResult);\n }\n }\n\n log.info(\"Found \" + comparisonResults.size() + \" similar modeling submission combinations ( > \" + minimumSimilarity + \")\");\n\n return comparisonResults;\n }", "public List<Pair<Double>> getSimilarDoc(String collectionId, String content, String topN) {\r\n List<Pair<Double>> toReturn = new ArrayList<Pair<Double>>();\r\n if (null == collectionId || null == content || 0 == collectionId.length() || 0 == content.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n if (content.length() > MAX_CONTENT_SIZE) {\r\n setError(\"APIL_0153\", \"content size cannot exceed \" + MAX_CONTENT_SIZE + \" characters: \" + content.length());\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"target_field\", \"content\", \"field_delimiter\", \"value_delimiter\", \"item_delimiter\", \"topn\" };\r\n SocketMessage request = new SocketMessage(\"recommender\", \"get_similar_doc\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\",\r\n paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"target_field\", \"TERMS_KMA\");\r\n request.setValue(\"content\", content);\r\n request.setValue(\"field_delimiter\", FIELD_DELIMITER);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"value_delimiter\", VALUE_DELIMITER);\r\n request.setValue(\"topn\", topN);\r\n \r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0271\", \"get similar Documents wasn't successful: coll_id=\" + collectionId);\r\n } else {\r\n wrapError(\"APIL_0271\", \"get similar Documents (realtime) wasn't successful: coll_id=\" + collectionId);\r\n }\r\n } else {\r\n //public static List< Pair<String> > getPairListStr(String obj, String itemDelimiter, String valueDelimiter)\r\n String keywordsString = response.getValue(\"similar_doc\").trim();\r\n toReturn = Tools.getPairListDouble(keywordsString, ITEM_DELIMITER, VALUE_DELIMITER);\r\n }\r\n return toReturn;\r\n }", "private Map<User, Double> checkToInsertOrRemoveNeighbour(Map.Entry<User, Double> mapEntry, User currentUser, double similarity) {\n if (reversed) {\n nearestNeighbours = reversedCheckToInsertOrRemoveNeighbour(mapEntry, currentUser, similarity);\n } else {\n LowestSimilarity LowestSimilarity = new LowestSimilarity(mapEntry, nearestNeighbours, value).invoke();\n value = LowestSimilarity.getValue();\n //Check user rating versus lowest similarity.\n if (value <= similarity) {\n //Remove lowest similarity.\n nearestNeighbours.remove(LowestSimilarity.getMapEntry().getKey());\n //Check threshold and add user to nearestNeighbours TreeMap\n if (threshold == null) {\n nearestNeighbours.put(currentUser, similarity);\n } else if (similarity >= threshold) {\n nearestNeighbours.put(currentUser, similarity);\n }\n }\n }\n return nearestNeighbours;\n }", "public double intrinsicDimensionality(int sampleSize) throws IllegalIdException, IllegalAccessException, InstantiationException, OBException{\r\n \r\n List<O> objs = new ArrayList<O>(sampleSize);\r\n Random r = new Random();\r\n long max = this.databaseSize();\r\n \r\n int i = 0;\r\n while(i < sampleSize){\r\n long id = Math.abs(r.nextLong() % max);\r\n objs.add(getObject(id));\r\n i++;\r\n }\r\n i = 0;\r\n StaticBin1D stats = new StaticBin1D();\r\n while(i < sampleSize){\r\n int i2 = 0;\r\n O a = objs.get(i);\r\n while(i2 < sampleSize){\r\n if(i2 != i){\r\n O b = objs.get(i2);\r\n stats.add(distance(a,b));\r\n }\r\n i2++;\r\n } \r\n logger.info(\"Doing: \" + i); \r\n i++;\r\n }\r\n logger.info(\"Distance Stats: \" + stats.toString());\r\n return Math.pow(stats.mean(), 2) / (2 * stats.variance());\r\n }" ]
[ "0.5569936", "0.55035037", "0.54613674", "0.54145956", "0.5354457", "0.53092694", "0.52800345", "0.52381223", "0.51762676", "0.51369125", "0.513273", "0.49874327", "0.4983102", "0.4976546", "0.49557275", "0.49054086", "0.48823595", "0.48684484", "0.4839447", "0.4805532", "0.48045477", "0.47715607", "0.4766884", "0.4760663", "0.47545487", "0.47535738", "0.47265762", "0.47193772", "0.47167584", "0.47075918", "0.47043014", "0.46865192", "0.4656642", "0.4650225", "0.4648337", "0.4642495", "0.46415305", "0.46211743", "0.46094248", "0.4585457", "0.4570314", "0.45661223", "0.45639288", "0.45457977", "0.45374328", "0.45332533", "0.45288667", "0.4524457", "0.45220178", "0.45210075", "0.4511813", "0.45090348", "0.4506314", "0.44939145", "0.44834578", "0.44766548", "0.44691607", "0.44552913", "0.44419912", "0.44378713", "0.4431055", "0.44146293", "0.44138476", "0.44126529", "0.44103336", "0.4409801", "0.44021252", "0.43953675", "0.43938926", "0.439173", "0.43803358", "0.43744648", "0.43730924", "0.43710953", "0.43575114", "0.43448317", "0.4323481", "0.43234438", "0.43181953", "0.43099785", "0.42980635", "0.42955592", "0.4290625", "0.42871884", "0.42852148", "0.42806485", "0.42679504", "0.4265881", "0.42641544", "0.42641118", "0.42612502", "0.42577764", "0.42567405", "0.4256289", "0.42387676", "0.42302606", "0.42301673", "0.42224482", "0.421836", "0.42118615" ]
0.6499161
0
Normalize all values in the matrix.
public void normalize(double normalizingFactor) { //System.out.println("norm: " + normalizingFactor); for (T value : getFirstDimension()) { for (T secondValue : getMatches(value)) { double d = get(value, secondValue) / normalizingFactor; set(value, secondValue, d); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void normalize()\n {\n int sum;\n\n for(int i=0;i<12;i++)\n {\n for(int j=0;j<12;j++) {\n sum = sumAll(i,j);\n if (sum != 0)\n for (int n = 0; n < 12; n++)\n weights[i][j][n] /= sum;\n }\n }\n }", "public final void normalize() {\n\tsvd(this);\n }", "public void normalize() {\n // determine the maximum value\n \n Double max = getMaxValue();\n \n if(max!=null) {\n normalize(max);\n }\n }", "private static double[] normalize(double[] data)\n {\n double sum = 0;\n \n for (double d : data)\n sum += d;\n \n if (sum != 1 && sum != 0)\n {\n for (int i = 0; i < data.length; i++)\n data[i] /= sum;\n }\n \n return data;\n }", "public double[][] normalize( double[][] data )\n {\n double[][] result = new double[ data.length ][];\n\n for( int i=0; i<data.length; i++ )\n {\n result[ i ] = normalize( data[ i ], 1 );\n }\n\n return result;\n }", "public Double[][] normalize(Double[][] dataSet) {\n Double maxVal = Collections.max(DataClean.twoDArrToArrList(dataSet));\n Double minVal = Collections.min(DataClean.twoDArrToArrList(dataSet)); \n \n Double[][] newData = new Double[dataSet.length][dataSet[0].length];\n for (int i=0; i<dataSet.length; i++) {\n for (int j=0; j<dataSet[0].length; j++) {\n newData[i][j]= (dataSet[i][j]-minVal)/(maxVal-minVal);\n }\n }\n return newData;\n }", "private void normalize(DMatrixRMaj M) {\n double suma=0;\n Equation eq = new Equation();\n eq.alias(M, \"M\");\n eq.alias(suma,\"s\");\n\n// for (int i=0;i<M.numRows;i++) {\n// for (int j = 0; j < M.numCols; j++) {\n// eq.alias(i, \"i\");\n// eq.alias(j, \"j\");\n// eq.process(\"s = s + M(i,j)\");\n//// suma = suma + M.get(i,j);\n// }\n// }\n// for (int i=0;i<M.numRows;i++){\n// for (int j=0;j<M.numCols;j++){\n//// eq.alias(i,\"i\");\n//// eq.alias(j,\"j\");\n//// eq.process(\"s = s + M(i,j)\");\n// M.set(i,j,M.get(i,j)/suma);\n// }\n for(int i=0; i < M.numRows; i++){\n eq.alias(i, \"i\");\n //eq.process(\"M(i,:) = exp(M(i,:) - max(M(i,:)))\"); // to prevent high values in exp(M)\n //eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n// eq.process(\"M(i,:) = M(i,:) / s\");\n }\n }", "public static void normalization(double[] array)\r\n\t{\r\n\t\tdouble sum = Σ(array);\r\n\r\n\t\tif (sum == 0 || array.length == 0)\r\n\t\t\treturn;\r\n\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = array[i] / sum;\r\n\t}", "public static void normalise(double[] v) {\n double tot = 0;\r\n for (int i=0; i<v.length; i++) {\r\n tot += v[i] * v[i];\r\n }\r\n double div = Math.sqrt(tot);\r\n if (div > 0) {\r\n for (int i=0; i<v.length; i++) {\r\n v[i] /= div;\r\n }\r\n }\r\n }", "private double[][] normalize255(RealMatrix realMatrix) {\n\t\tdouble[][] input = realMatrix.getData();\n\t\tdouble[][] normalized = new double[realMatrix.getRowDimension()][realMatrix.getColumnDimension()];\n\t\tdouble minimum = 99999.99;\n\t\tdouble maximum = -9999.99;\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tminimum = Math.min(minimum, input[i][j]);\n\t\t\t\tmaximum = Math.max(maximum, input[i][j]);\n\t\t\t}\n\t\t}\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tnormalized[i][j] = ((input[i][j] - minimum)*(255/(maximum-minimum)));\n\t\t\t}\n\t\t}\n\t\treturn normalized;\n\t}", "public void normalize() {\n\t\tdouble norm = norm();\n\t\tif (DoubleComparison.eq(norm, 0)) {\n\t\t\tthrow new RuntimeException(\"Failed to normalize: length is zero\");\n\t\t}\n\t\tthis.x = this.x / norm;\n\t\tthis.y = this.y / norm;\n\t\tthis.z = this.z / norm;\n\t}", "public void normalize() {\n float length = (float)Math.sqrt(nx * nx + ny * ny);\n nx/=length;\n ny/=length;\n }", "public double[] getNormalizedInputValues(){\r\n\t\tdouble [] norm = new double[realValues[0].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[0][i])\r\n\t\t\t\tnorm[i] = Attributes.getInputAttribute(i).normalizeValue(realValues[0][i]);\r\n\t\t\telse \r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "public final void normalize(Matrix3f m1) {\n\tset(m1);\n\tsvd(this);\n }", "public void normalize() {}", "public Vector normalize ( );", "public void normalize() {\r\n\t\tfor (int i = 0; i<no_goods; i++) {\t\t\t\r\n\t\t\tfor (IntegerArray r : prob[i].keySet()) {\t\t\t\t\r\n\t\t\t\tdouble[] p = prob[i].get(r);\r\n\t\t\t\tint s = sum[i].get(r);\r\n\t\t\t\t\r\n\t\t\t\tfor (int j = 0; j<p.length; j++)\r\n\t\t\t\t\tp[j] /= s;\r\n\t\t\t}\r\n\r\n\t\t\t// compute the marginal distribution for this good\r\n\t\t\tfor (int j = 0; j<no_bins; j++)\r\n\t\t\t\tmarg_prob[i][j] /= marg_sum;\r\n\t\t}\r\n\t\t\r\n\t\tready = true;\r\n\t}", "public void normalize() {\r\n\t\tfloat length = (float) this.lenght();\r\n\t\tif (length > 0) {\r\n\t\t\tx /= length;\r\n\t\t\ty /= length;\r\n\t\t\tz /= length;\r\n\t\t}\r\n\t}", "public Vector Normalize(){\n float magnitude = Magnitude();\n for(int i = 0; i < axis.length; i++){\n axis[i] /= magnitude;\n }\n return this;\n }", "public void histNormalize() {\n\n double max = max();\n double min = min();\n max = max - min;\n for (int i = 0; i < pixelData.length; i++) {\n double value = pixelData[i] & 0xff;\n pixelData[i] = (byte) Math.floor((value - min) * 255 / max);\n }\n }", "public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }", "private double[][] normalize (float[][] in) {\n\n\t\tdouble[][] temp = new double[in.length][2];\n\n\t\t// Get centroid\n\t\tfloat[] centroid = getCentroid(in);\n\n\t\t// Normalize\n\t\tfor(int i = 0; i < in.length; i++) {\n\t\t\ttemp[i][0] = in[i][0] - centroid[0];\n\t\t\ttemp[i][1] = in[i][1] - centroid[1];\n\t\t}\n\n\t\treturn temp;\n\t}", "private double[] normalize(double[] p) {\n double sum = 0;\n double[] output = new double[p.length];\n for (double i : p) {\n sum += i;\n }\n for (int i = 0; i < output.length; i++) {\n output[i] = p[i]/sum;\n }\n return output;\n }", "public void normalize()\n\t{\n\t\tif (this.getDenom() < 0)\n\t\t{\n\t\t\tthis.setDenom(this.getDenom() * (-1));\n\t\t\tthis.setNumer(this.getNumer() * (-1));\n\t\t}\n\t}", "public final void mulNormalize(Matrix3f m1) {\n\tmul(m1);\n\tsvd(this);\n }", "public double oneNorm(){\r\n \tdouble norm = 0.0D;\r\n \tdouble sum = 0.0D;\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tsum+=Math.abs(this.matrix[i][j]);\r\n \t\t}\r\n \t\tnorm=Math.max(norm,sum);\r\n \t}\r\n \treturn norm;\r\n \t}", "public Vector normalize() {\n double num=1/length();\n head = scale(num).head;\n return this;\n }", "private void normalize() {\r\n // GET MAX PRICE \r\n for (Alternative alt : alternatives) {\r\n if (alt.getPrice() > 0 && alt.getPrice() < minPrice) {\r\n minPrice = alt.getPrice();\r\n }\r\n }\r\n\r\n for (Alternative alt : alternatives) {\r\n // NORMALIZE PRICE - NON BENIFICIAL using max - min \r\n double price = alt.getPrice();\r\n double value = minPrice / price;\r\n alt.setPrice(value);\r\n // BENITIFICIAL v[i,j] = x[i,j] / x[max,j]\r\n double wood = alt.getWood();\r\n value = wood / maxWood;\r\n alt.setWood(value);\r\n\r\n double brand = alt.getBrand();\r\n value = wood / maxBrand;\r\n alt.setBrand(value);\r\n\r\n double origin = alt.getOrigin();\r\n value = origin / maxOrigin;\r\n alt.setOrigin(value);\r\n\r\n }\r\n }", "public ArrayList<Double> normalize( ArrayList<Double> data, double scale )\n {\n double min = Double.MAX_VALUE;\n double max = Double.MIN_VALUE;\n ArrayList<Double> result = new ArrayList<Double>();\n\n // First, need to find the min value in the array\n for( double value : data )\n {\n if( value < min )\n {\n min = value;\n }\n }\n\n // Next, translate by the min amount\n for( double value : data )\n {\n double temp = (value - min);\n result.add( temp );\n if( temp > max )\n {\n max = temp;\n }\n }\n\n // Finally, scale by max\n for( int i=0; i<result.size(); i++ )\n {\n result.set( i, (scale * ( result.get( i ) / max )) );\n }\n\n return result;\n }", "public void normalize()\n {\n double magnitude = this.magnitude();\n this.x = x / (float)magnitude;\n this.y = y / (float)magnitude;\n this.z = z / (float)magnitude;\n this.w = w / (float)magnitude;\n }", "public double[] getNormalizedOutputValues(){\r\n\t\tdouble [] norm = new double[realValues[1].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[1][i])\r\n\t\t\t\tnorm[i] = Attributes.getOutputAttribute(i).normalizeValue(realValues[1][i]);\r\n\t\t\telse\r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "@Override\n\tpublic double\n\tnormalize()\n\t{\n\t\tdouble len = length();\n\n\t\tif( len != 0 )\n\t\t{\n\t\t\tdata[0] /= len;\n\t\t\tdata[1] /= len;\n\t\t\tdata[2] /= len;\n\t\t}\n\t\t\n\t\treturn len;\n\t}", "public double[] getNormalizedInputValues( InstanceAttributes instAttributes ){\r\n\t\tdouble [] norm = new double[realValues[0].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[0][i])\r\n\t\t\t\tnorm[i] = instAttributes.getInputAttribute(i).normalizeValue(realValues[0][i]);\r\n\t\t\telse \r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "static void normalize(double[] state) {\r\n double norm = 1/Math.sqrt(state[0]*state[0]+state[2]*state[2]+state[4]*state[4]+state[6]*state[6]);\r\n state[0] *= norm;\r\n state[2] *= norm;\r\n state[4] *= norm;\r\n state[6] *= norm;\r\n }", "public double[] Normalizar(int[] v){\n double[] result=new double[v.length];\n double s=0;\n for (int i=0;i<v.length;i++){\n s+=v[i];\n }\n for (int i=0;i<v.length;i++){\n result[i]=(double)v[i]/(double)s;\n }\n\n return result;\n }", "public void normalize() {\n double maxTotalTime = findMaxTotalTimeSeconds();\n int maxTotalMoves = findMaxTotalMoves();\n ResultMaxTotals maxTotals = new ResultMaxTotals(maxTotalTime, maxTotalMoves);\n\n updateNormalizedValues(maxTotals);\n }", "public void normalizeColumn(final int columnIndex) {\r\n double max = Double.NEGATIVE_INFINITY;\r\n double min = Double.POSITIVE_INFINITY;\r\n for (int i = 0; i < this.getRowCount(); i++) {\r\n double val = getLogicalValueAt(i, columnIndex);\r\n if (val > max) {\r\n max = val;\r\n }\r\n if (val < min) {\r\n min = val;\r\n }\r\n }\r\n for (int i = 0; i < this.getRowCount(); i++) {\r\n setLogicalValue(i, columnIndex, (getLogicalValueAt(i, columnIndex) - min)\r\n / (max - min), false);\r\n }\r\n this.fireTableDataChanged();\r\n }", "private void zScoreNormalize(List<Double> data)\n\t{\n\t\tdouble mean=Statistics.mean(data);\n\t\tdouble sd=Statistics.sd(data);\n\t\tfor(int i=0; i!= data.size(); ++i)\n\t\t{\n\t\t\tdata.set(i, (data.get(i)-mean)/sd);\n\t\t}\n\n\t}", "public void normalize() { sets length to 1\n //\n double length = Math.sqrt(x * x + y * y);\n\n if (length != 0.0) {\n float s = 1.0f / (float) length;\n x = x * s;\n y = y * s;\n }\n }", "public Vector3D normalize()\r\n {\r\n float oneOverMagnitude = 0;\r\n float mag = magnitude();\r\n \r\n if (mag!=0) {\r\n oneOverMagnitude = 1 / mag;\r\n }\r\n\r\n return this.product(oneOverMagnitude);\r\n }", "public ArrayList<DataPoint> normalizeFeatures(ArrayList<DataPoint> datapoints) {\n\t\t\n\t\tdouble[] vector = new double[featureCount];\n\t\t// now normalize ALL the points!\n\t\tfor (DataPoint aPoint : datapoints) {\n\t\t\tvector = aPoint.vector;\n\t\t\tfor (int i = 0; i < featureCount; ++i) {\n\t\t\t\tvector[i] = (vector[i] - meansOfFeatures.get(i))\n\t\t\t\t\t\t/ stdevOfFeatures.get(i);\n\t\t\t}\n\t\t\taPoint.setVector(vector);\n\t\t}\n\t\treturn datapoints;\n\t}", "public static double[] normalize(double[] v) {\n double[] tmp = new double[3];\n tmp[0] = v[0] / VectorMath.length(v); \n tmp[1] = v[1] / VectorMath.length(v); \n tmp[2] = v[2] / VectorMath.length(v); \n return tmp; \n }", "public void normalize(){\n\tstrength = 50;\n\tdefense = 55;\n\tattRating = 0.4\t;\n }", "@Override \n public double[] fastApply(double[] x) {\n double d = dot.norm(x);\n scale.fastDivide(x, d);\n return x;\n }", "public double[] Normalizar01(int[] v){\n double[] result=new double[v.length];\n double s=v[0];\n double max=v[0];\n double min=v[0];\n for (int i=1;i<v.length;i++){\n s+=v[i];\n //minimo\n if (v[i]<min)\n min=v[i];\n if (v[i]>max)\n max=v[i];\n //maximo\n }\n for (int i=0;i<v.length;i++){\n result[i]=((double)v[i]-min)/(max-min);\n }\n\n return result;\n }", "@Override\r\n\t\tpublic void normalize()\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public void normalize(){\n\t_defense = originalDefense;\n\t_strength = originalStrength;\n }", "public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }", "public void normalize() {\n // YOUR CODE HERE\n String w1, w2;\n for (int i = 0; i < row; i++) {\n w1 = NDTokens.get(i);\n for (int j = 0; j < column; j++) {\n w2 = NDTokens.get(j);\n if(smooth) {\n bi_grams_normalized[NDTokens.indexOf(w1)][NDTokens.indexOf(w2)] = (getCount(w1, w2))/(uni_grams[NDTokens.indexOf(w1)] + NDTokens_size);\n }else {\n bi_grams_normalized[NDTokens.indexOf(w1)][NDTokens.indexOf(w2)] = getCount(w1, w2)/(uni_grams[NDTokens.indexOf(w1)]);\n }\n }\n }\n }", "public double infinityNorm(){\r\n \tdouble norm = 0.0D;\r\n \tdouble sum = 0.0D;\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tsum+=Math.abs(this.matrix[i][j]);\r\n \t\t}\r\n \t\tnorm=Math.max(norm,sum);\r\n \t}\r\n \treturn norm;\r\n \t}", "private static void normalize(boolean[][] robot) {\n int n = robot.length;\n for (int i = 1; i < n; i++) {\n robot[i][i] = false;\n }\n for (int i = 1; i < n; i++) {\n normalize(robot, i);\n }\n }", "public Array2DRowRealMatrix getNormalisedData() {\r\n\t\t\r\n\t\t//declare variables\r\n\t\tdouble dataVal;\r\n\t\tdouble normalisationVal;\r\n\t\tdouble finalVal;\r\n\t\r\n\t\tArray2DRowRealMatrix returnMatrix = new Array2DRowRealMatrix(noOfWavelengths,2);\r\n\t\t\r\n\t\t//iterate through data\r\n\t\tfor(int rowIndex=0; rowIndex < noOfWavelengths; rowIndex++) {\r\n\t\t\t\r\n\t\t\t//normalised data value = (recorded data value / recorded normalisation value) * calibration ratio\r\n\t\t\tdouble[] normalData = new double[2];\r\n\r\n\t\t\tdataVal = data.getRow(rowIndex)[1];\r\n\t\t\tnormalisationVal = normalisationData.getRow(rowIndex)[1];\r\n\t\t\t\r\n\t\t\tnormalData[0] = data.getRow(rowIndex)[0];\r\n\t\t\tnormalData[1] = (dataVal / normalisationVal) * calibRatio;\r\n\t\t\t\r\n\t\t\treturnMatrix.setRow(rowIndex, normalData);\r\n\t\t}\r\n\r\n\t\treturn returnMatrix;\r\n\t}", "public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}", "public static float norm(float[] array) {\n float retval = 0;\n for (int i = 0; i < array.length; i++) {\n retval += array[i] * array[i];\n }\n return (float) Math.sqrt(retval);\n }", "public void normalize(List<RankList> samples) {\n/* 667 */ for (RankList sample : samples) nml.normalize(sample);\n/* */ \n/* */ }", "public double[] normalize( double[] data, double scale )\n {\n double min = Double.MAX_VALUE;\n double max = Double.MIN_VALUE;\n double[] result = new double[ data.length ];\n\n // First, need to find the min value in the array\n for( int i=0; i<data.length; i++ )\n {\n double value = data[ i ];\n if( value < min )\n {\n min = value;\n }\n }\n\n // Next, translate by the min amount\n for( int i=0; i<data.length; i++ )\n {\n double value = data[ i ];\n double temp = (value - min);\n result[ i ] = temp;\n if( temp > max )\n {\n max = temp;\n }\n }\n\n // Finally, scale by max\n for( int i=0; i<result.length; i++ )\n {\n result[ i ] = ( scale * ( result[ i ] / max ) );\n }\n\n return result;\n }", "IVec3 normalized();", "public Vector normalized(){\r\n\t\tfloat len = this.length();\r\n\t\tif( len != 0.0f && len != 1.0f ){\r\n\t\t\treturn new Vector( this.x / len, this.y / len, this.z / len );\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "void normalizeSafe()\r\n {\r\n float fLengthSquared = lengthSquared();\r\n if ( 0.0f == fLengthSquared )\r\n {\r\n set(ZERO);\r\n }\r\n else\r\n {\r\n scale(1.0f/(float)Math.sqrt(fLengthSquared));\r\n }\r\n }", "public static float[] l2normalize(float[] v, boolean throwOnZero) {\n double squareSum = IMPL.dotProduct(v, v);\n int dim = v.length;\n if (squareSum == 0) {\n if (throwOnZero) {\n throw new IllegalArgumentException(\"Cannot normalize a zero-length vector\");\n } else {\n return v;\n }\n }\n double length = Math.sqrt(squareSum);\n for (int i = 0; i < dim; i++) {\n v[i] /= length;\n }\n return v;\n }", "public double[] getNormalizedOutputValues( InstanceAttributes instAttributes ){\r\n\t\tdouble [] norm = new double[realValues[1].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[1][i])\r\n\t\t\t\tnorm[i] = instAttributes.getOutputAttribute(i).normalizeValue(realValues[1][i]);\r\n\t\t\telse\r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "float norm();", "private double[] normalizeHistogram(double[] inputHistogram, int totalPixels) {\n\t\tdouble[] normalized=new double[inputHistogram.length];\n\t\tfor(int i=0;i<inputHistogram.length&&start;i++){\n\t\t\tnormalized[i]=inputHistogram[i]/totalPixels;\n\t\t}\n\t\treturn normalized;\n\t}", "public abstract void recalcNormalizationExtrema();", "public Vec2double normalise() {\n\t\tdouble len = (double) (1 / Math.sqrt(x*x + y*y));\n//\t\tx *= len;\n//\t\ty *= len;\n\t\treturn new Vec2double(x*len, y*len);\n\t}", "private void normalize(double[] scores, boolean wantSmall) {\n\n // Yes\n double randomLowValue = 0.00001;\n\n if (wantSmall) {\n double min = Double.MAX_VALUE;\n for (double score : scores) {\n if (score < min) min = score;\n }\n\n for (int i = 0; i < scores.length; i++) {\n scores[i] = min / Math.max(scores[i], randomLowValue);\n }\n\n } else {\n double max = Double.MIN_VALUE;\n for (double score : scores) {\n if (score > max) max = score;\n }\n\n if (max == 0) max = randomLowValue;\n for (int i = 0; i < scores.length; i++) {\n scores[i] = scores[i] / max;\n }\n }\n }", "public double norm() {\n\t\thomogenize();\n\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n\t}", "public Vector normalized() {\n double size = this.length();\n return new Vector(this.getHead().getX() / size, this.getHead().getY() / size, this.getHead().getZ() / size);\n }", "@Nonnull\n S normalize();", "public Vector4d normalize() {\n\t\tdouble len = length();\n\t\tif (len != 0) {\n\t\t\tx /= len;\n\t\t\ty /= len;\n\t\t\tz /= len;\n\t\t\tw /= len;\n\t\t}\n\t\treturn this;\n\t}", "public static Vector<Double> norm(Vector<Double> a) {\n\t\tdouble x = TransEInitializer.vec_len(a);\n\t\tif (x > 1){\n\t\t\t\n\t\t\tfor (int ii = 0; ii < a.size(); ii++)\n\t\t\t\ta.set(ii, a.get(ii) / x);\n\t\t\n\n\t\t}\n\n//\t\tif(x > 1)\n//\t\t\treturn true;\n//\t\treturn false;\n\t\treturn a;\n\t}", "public double l1_norm()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += Math.abs(c);\r\n\r\n return sum;\r\n }", "public double[] preprocessDataNormalizationOnly(double[] data) {\n return dataNormalization.normalizeNewData(data);\n }", "public void normalize(){\r\n \tif(!normal){\r\n\t attack/=2;\r\n\t defense*=2;\r\n\t normal=true;\r\n\t}\r\n }", "public void normalize(){\r\n \tif(!normal){\r\n\t attack/=2;\r\n\t defense*=2;\r\n\t normal=true;\r\n\t}\r\n }", "public MyDouble norm() {\r\n\t\tMyDouble aSquar = this.getReal().square();\r\n\t\tMyDouble bSquare = this.getImag().square();\r\n\t\tMyDouble sum = aSquar.add(bSquare);\r\n\t\tMyDouble result = sum.sqrt();\r\n\t\treturn result;\r\n\t}", "public double norm() {\r\n return Math.sqrt(innerProduct(this));\r\n }", "public double frobeniusNorm(){\r\n \tdouble norm=0.0D;\r\n \tfor(int i=0; i<this.ncol; i++){\r\n \t\tfor(int j=0; j<this.nrow; j++){\r\n \t\tnorm=hypot(norm, Math.abs(matrix[i][j]));\r\n \t\t}\r\n \t}\r\n \treturn norm;\r\n \t}", "public Vector normalize() {\n this.head = this.normalized().getHead();\n return this;\n }", "public final void mulNormalize(Matrix3f m1, Matrix3f m2) {\n\tmul(m1, m2);\n\tsvd(this);\n }", "public static double[][] normaliseColumns (double[][] dataArray){\n\t\t\n\t\tint rows = dataArray.length;\n\t\tint cols = dataArray[0].length;\n\t\tdouble[][] returnData = new double[rows][cols];\n\t\tdouble[] colMaxValues = new double[cols];\n\t\tdouble[] colMinValues = new double[cols];\n\t\tdouble[] colDiffValues = new double[cols];\n\t\t\n\t\t//find max in each column\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < cols; j++ ) {\n\t\t\t\t\n\t\t\t\t//initialise with first values\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tcolMaxValues[j] = dataArray[i][j];\n\t\t\t\t\tcolMinValues[j] = dataArray[i][j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (dataArray[i][j] > colMaxValues[j]) {\n\t\t\t\t\tcolMaxValues[j] = dataArray[i][j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (dataArray[i][j] < colMinValues[j]) {\n\t\t\t\t\tcolMinValues[j] = dataArray[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get difference values \n\t\tfor (int i = 0; i < cols; i++) {\n\t\t\tcolDiffValues[i] = colMaxValues[i] - colMinValues[i];\n\t\t}\n\t\t\n\t\t//normalise\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < cols; j++ ) {\n\t\t\t\treturnData[i][j] = (dataArray[i][j]-colMinValues[j])/colDiffValues[j];\n\t\t\t}\n\t\t}\n\t\treturn returnData;\n\t}", "public static native double norm(double a[]);", "private double valueToNormalized(T value) {\n if (0 == absoluteCriticalValuePrim - absoluteWarningValuePrim) {\n // prevent division by zero, simply return 0.\n return 0d;\n }\n return (value.doubleValue() - absoluteWarningValuePrim) / (absoluteCriticalValuePrim - absoluteWarningValuePrim);\n }", "public void divide(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] /= skalar;\r\n }\r\n }\r\n }", "public static Vector normalize(Vector input) {\n return input.divide(input.euclideanNorm());\n }", "public void invert() {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n Double sim = get(first, second);\n \n if(sim!=null && sim > 0.0) {\n set(first, second, 1.0/sim);\n }\n \n }\n \n }\n }", "public final void normalizeCP() {\n\t// domain error may occur\n\tdouble s = Math.pow(determinant(), -1.0/3.0);\n\tmul((float)s);\n }", "final static public FloatArray2D SequenceToFloatArray2DNormalize(final Sequence seq) {\n\t\tFloatArray2D fa = SequenceToFloatArray2D(seq);\r\n\t\tFloatArray2D fa_normalized = fa.clone();\r\n\r\n\t\tList<Float> list = Arrays.asList(ArrayUtils.toObject(fa.data));\r\n\t\tfloat min = Collections.min(list);\r\n\t\tfloat max = Collections.max(list);\r\n\r\n\t\tfloat scale = (float) (1.0 / (max - min));\r\n\r\n\t\tfor (int i = 0; i < fa_normalized.data.length; ++i) {\r\n\t\t\tfa_normalized.data[i] = (fa_normalized.data[i] - min) * scale;\r\n\t\t}\r\n\r\n\t\treturn fa_normalized;\r\n\t}", "public Vector330Class normalize(){\n if(this.magnitude() <= EPS){\n return new Vector330Class(0, 0);\n }\n else{\n return new Vector330Class(this.x * (1/this.magnitude()), this.y * (1/this.magnitude()));\n }\n }", "public void checkNormalized() {\n double tot = 0.0;\n int i;\n for (i = 0; i < histogram_proportions.size(); i++)\n tot += histogram_proportions.elementAt(i).doubleValue();\n if (!Statistics.APPROXIMATELY_EQUAL(tot, 1.0, EPS))\n Dataset.perror(\"Histogram.class :: not normalized \");\n }", "public Vector3 normalized() {\n\t\tif (isZeroVector(this)) {\n\t\t\treturn this;\n\t\t}\n\t\treturn new Vector3(x / norm(), y / norm(), z / norm());\n\t}", "public Double[][] standardize(Double[][] dataSet) {\n Double sum=0.0;\n for (int i=0;i<dataSet.length;i++){\n for (int j=0; j<dataSet[0].length;j++){\n sum += dataSet[i][j];\n }\n }\n Double mean = sum/(dataSet.length*dataSet[0].length);\n Double std = 0.0;\n //compute standard deviation\n for (Double[] i: dataSet) {\n for (Double ij: i) {\n std += Math.pow(ij-mean,2.0); \n }\n }\n std = Math.sqrt(std/ (dataSet.length * dataSet[0].length));\n\n \n Double[][] newData = new Double[dataSet.length][dataSet[0].length];\n for (int i=0; i<dataSet.length; i++) {\n for (int j=0; j<dataSet[0].length; j++) {\n newData[i][j]= (dataSet[i][j]-mean)/std;\n }\n }\n return newData;\n }", "private Matrix gaussianEliminate(){\r\n\t\t//Start from the 0, 0 (top left)\r\n\t\tint rowPoint = 0;\r\n\t\tint colPoint = 0;\r\n\t\t// instantiate the array storing values for new Matrix\r\n\t\tDouble[][] newVal = deepCopy(AllVal);\r\n\t\twhile (rowPoint < row && colPoint < col) {\r\n\t\t\t// find the index with max number (absolute value) from rowPoint to row\r\n\t\t\tDouble max = Math.abs(newVal[rowPoint][colPoint]);\r\n\t\t\tint index = rowPoint;\r\n\t\t\tint maxindex = rowPoint;\r\n\t\t\twhile (index < row) {\r\n\t\t\t\tif (max < Math.abs(newVal[index][colPoint])) {\r\n\t\t\t\t\tmax = newVal[index][colPoint];\r\n\t\t\t\t\tmaxindex = index;\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t\t// if max is 0 then that must mean there are no pivots\r\n\t\t\tif (max == 0) {\r\n\t\t\t\tcolPoint++;\r\n\t\t\t}else {\r\n\t\t\t\t//TODO: refactor into method\r\n\t\t\t\tDouble[] Temp = newVal[rowPoint];\r\n\t\t\t\tnewVal[rowPoint] = newVal[maxindex];\r\n\t\t\t\tnewVal[maxindex] = Temp;\r\n\t\t\t\t// Fill 0 lower part of pivot\r\n\t\t\t\tfor(int lower = rowPoint + 1; lower < row; lower++) {\r\n\t\t\t\t\tDouble ratio = newVal[lower][colPoint]/newVal[rowPoint][colPoint];\r\n\t\t\t\t\tnewVal[lower][colPoint] = (Double) 0.0;\r\n\t\t\t\t\t// adjust for the remaining element\r\n\t\t\t\t\tfor (int remain = colPoint + 1; remain < col; remain++) {\r\n\t\t\t\t\t\tnewVal[lower][remain] = newVal[lower][remain] - newVal[lower][remain]*ratio;\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\trowPoint++;\r\n\t\t\t\tcolPoint++;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Matrix(newVal);\r\n\t}", "public Vector2f normalize() {\n return div(length());\n }", "private static void normalizeFromLog10(double[] array) {\n double maxValue = findMaxEntry(array).first;\n for (int i = 0; i < array.length; i++)\n array[i] = Math.pow(10, array[i] - maxValue);\n \n // normalize\n double sum = 0.0;\n for (int i = 0; i < array.length; i++)\n sum += array[i];\n for (int i = 0; i < array.length; i++)\n array[i] /= sum;\n }", "public Vector2D normalize() \n {\n \tfloat length = getLength();\n if (length != 0.0f) \n {\n this.setX(this.getX() / length);\n this.setY(this.getY() / length);\n } \n else \n {\n this.setX(0.0f);\n this.setY(0.0f);\n }\n return this;\n }", "public void normaliseProbs() {\n\t\t// Get total\n\t\tdouble sum = 0;\n\t\tfor (Double d : itemProbs_.values()) {\n\t\t\tsum += d;\n\t\t}\n\n\t\t// If already at 1, just return.\n\t\tif ((sum >= 0.9999) && (sum <= 1.0001))\n\t\t\treturn;\n\n\t\t// Normalise\n\t\tint count = itemProbs_.size();\n\t\tfor (T element : itemProbs_.keySet()) {\n\t\t\t// If the sum is 0, everything is equal.\n\t\t\tif (sum == 0)\n\t\t\t\titemProbs_.put(element, 1.0 / count);\n\t\t\telse\n\t\t\t\titemProbs_.put(element, itemProbs_.get(element) / sum);\n\t\t}\n\t\trebuildProbs_ = true;\n\t\tklSize_ = 0;\n\t}", "public void normaliseVertexColors()\r\n\t{\r\n\t for(int i=0; i<3; i++)\r\n vertices[i].normaliseVertexColor();\r\n\t}", "public static final double[] normalize(final double[] V)\n {\n double []vec = new double[periodNum];\t\n\t//Vector vec = new Vector(periodNum);\n\t//Double zero = new Double(0);\n\t//for(int i=0;i<periodNum;i++)\n\t// vec.insertElementAt(zero,i);\n\n\tdouble sum =0;\n\t\n\tfor(int i=0;i<periodNum;i++)\n\t{\n\t\tsum += V[i];\n\t\t//sum += ((Double)V.elementAt(i)).doubleValue();\n\t}\n\t// if sum is 0, can't divide using it\n\tif(sum ==0)\n\t return V;\n\n\n\tfor(int i=0;i<periodNum;i++)\n\t{\n\t double d = V[i];//((Double)V.elementAt(i)).doubleValue();\n\t double dd = d/sum;\n\n\t vec[i] = dd;\n\t //vec.addElement(new Double(dd));\n\t}\n\t \n\treturn vec;\n }", "public double[] compute(Matrix matrix, double[] mean) {\r\n \tThrow.when().isNull(() -> matrix, () -> \"No matrix to compute.\");\r\n if(matrix.getRowCount() == 0){\r\n return new double[0];\r\n }\r\n \r\n double[] var = this.serial(matrix, 0, matrix.getRowCount(), mean);\r\n for(int i = 0; i < var.length; i++){\r\n var[i] /= matrix.getRowCount();\r\n }\r\n return var;\r\n }" ]
[ "0.7665906", "0.73001325", "0.7101657", "0.69884616", "0.6922154", "0.6844735", "0.67843485", "0.6742482", "0.67079955", "0.6619727", "0.66118455", "0.65699637", "0.6550168", "0.65180343", "0.64569354", "0.6454026", "0.63979924", "0.6378551", "0.6345437", "0.6339653", "0.6250844", "0.6238099", "0.61691415", "0.61630946", "0.61576825", "0.6152665", "0.61485654", "0.6135381", "0.6105298", "0.6095019", "0.60917807", "0.60892874", "0.6074194", "0.6036266", "0.60307497", "0.6016647", "0.59854674", "0.59834737", "0.5964557", "0.59393215", "0.59389406", "0.5931934", "0.59305376", "0.59141725", "0.5867346", "0.58670795", "0.5866926", "0.5855694", "0.58534116", "0.58466893", "0.58309376", "0.58290917", "0.58146065", "0.5786831", "0.5757393", "0.5755447", "0.57344204", "0.5714877", "0.571319", "0.57076323", "0.5687793", "0.56765896", "0.5666903", "0.5656785", "0.5653299", "0.5649825", "0.56436825", "0.5621508", "0.5618352", "0.56176656", "0.56135213", "0.56125295", "0.56018317", "0.55995804", "0.55995804", "0.55977184", "0.55730635", "0.555815", "0.5553674", "0.55497426", "0.55352473", "0.552423", "0.5518694", "0.55102193", "0.55013204", "0.54828197", "0.54758686", "0.5457368", "0.5453913", "0.5425671", "0.5416203", "0.5407289", "0.5397635", "0.5391879", "0.5388529", "0.5383646", "0.538127", "0.5379946", "0.53747785", "0.5362955" ]
0.6934502
4
Multiply the matrix with a scalar value
public void multiplyScalar(double scalar) { if(scalar==1.0) { return; } for (T value : getFirstDimension()) { for (T secondValue : getMatches(value)) { double d = get(value, secondValue) * scalar; set(value, secondValue, d); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void scalarMultiply(double s) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n matrix.get(i)[j] *= s;\n }\n }\n }", "public Matrix multiply(double scalar) {\n Matrix result = new Matrix(this.rows, this.cols);\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n result.data[i][j] = this.data[i][j] * scalar;\n }\n }\n\n return result;\n }", "Matrix scalarMult(double x){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n itRow.moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(i, c.column, (x*c.value));\n itRow.moveNext();\n }\n }\n\n return newM;\n }", "@Override\n\tpublic void\n\tscalarMult( double value )\n\t{\n\t\tdata[0] *= value;\n\t\tdata[1] *= value;\n\t\tdata[2] *= value;\n\t}", "public void mul_(JType value) {\n TH.THTensor_(mul)(this, this, value);\n }", "public void multiply(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] *= skalar;\r\n }\r\n }\r\n }", "public final void mul(float scalar) {\n\tm00 *= scalar; m01 *= scalar; m02 *= scalar;\n\tm10 *= scalar; m11 *= scalar; m12 *= scalar;\n\tm20 *= scalar; m21 *= scalar; m22 *= scalar;\n }", "@Override\n\tpublic IVector scalarMultiply(double number){\n\t\tfor(int i=this.getDimension()-1; i>=0; i--){\n\t\t\tthis.set(i, this.get(i)*number);\n\t\t}\n\t\treturn this;\n\t}", "private Vector<Double> multiplyRow(Vector<Double> row, double scalar) {\n row.replaceAll(n -> round(scalar * n, 8));\n return row;\n }", "public Matrix times(double constant){\r\n \tMatrix cmat = new Matrix(this.nrow, this.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tcarray[i][j] = this.matrix[i][j]*constant;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "@Override\n\tpublic IVector nScalarMultiply(double number){\n\t\treturn this.copy().scalarMultiply(number);\n\t}", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "public JTensor mul(JType value) {\n JTensor r = new JTensor();\n TH.THTensor_(mul)(r, this, value);\n return r;\n }", "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "public Vector<T> multiply(T aScalar);", "public void multiply(double val) {\n for (int i = 0; i < numRows; i++) {\n for (int j = 0; j < numCols; j++) {\n data[i][j] = data[i][j] * val;\n }\n }\n }", "public final void mul(float scalar, Matrix3f m1) {\n\t set(m1);\n\t mul(scalar);\n }", "private RealMatrix scalarMultiplication(RealMatrix matrix1, RealMatrix matrix2) {\n\t\tdouble a = matrix1.getEntry(0, 0);\n\t\tdouble b = matrix1.getEntry(1, 0);\n\t\tdouble c = matrix1.getEntry(2, 0);\n\t\tdouble d = matrix1.getEntry(3, 0);\n\t\t\n\t\tdouble[][] result = new double[matrix2.getRowDimension()][matrix2.getColumnDimension()];\n\t\t\n\t\tfor (int i=0; i < matrix2.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < matrix2.getColumnDimension(); j++) {\n\t\t\t\tif (i == 0) result[i][j] = a * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 1) result[i][j] = b * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 2) result[i][j] = c * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 3) result[i][j] = d * matrix2.getEntry(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn MatrixUtils.createRealMatrix(result);\n\t}", "Matrix mul(Matrix m){\n if(m.cols != this.cols || m.rows != this.rows) throw new RuntimeException(String.format(\"Wrong dimensions\"));\n Matrix matrix_to_return = new Matrix(m.rows, m.cols);\n for(int i=0; i<m.rows * m.cols; i++){\n matrix_to_return.data[i] = this.data[i] * m.data[i];\n }\n return matrix_to_return;\n }", "public abstract Vector4fc mul(IMatrix4f mat);", "public Matrix multiply(int i) {\n\t\treturn multiply(new Fraction(i));\n\t}", "public Matrix getValue();", "public abstract Vector4fc mul(IMatrix4x3f mat);", "public static Matrix times(Matrix amat, double constant){\r\n \tMatrix cmat = new Matrix(amat.nrow, amat.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n\r\n \t \tfor(int i=0; i<amat.nrow; i++){\r\n \t\tfor(int j=0; j<amat.ncol; j++){\r\n \t\tcarray[i][j] = amat.matrix[i][j]*constant;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "public DVec multiply(DVec arg0) {\n\t\tDVec vec = new DVec(arg0.rowCount());\n\t\tfor (int i = 0; i < rowCount(); i++)\n\t\t\tfor (int j = 0; j < columnCount(); j++)\n\t\t\t\tvec.set(i, get(i, j) * arg0.get(i));\n\t\treturn vec;\n\t}", "public void multiply() {\n\t\t\n\t}", "Matrix mul(double w){\n Matrix matrix_to_return = new Matrix(this.rows, this.cols);\n for(int i=0; i<this.rows * this.cols; i++){\n matrix_to_return.data[i] = this.data[i] * w;\n }\n return matrix_to_return;\n }", "public Vector2D scalarMult(double scalar)\n {\n return new Vector2D(scalar * this.x, scalar * this.y);\n }", "public void matrixMultiply(Matrix m) {\n if (cols == m.getRows()) {\n ArrayList<double[]> result = newMatrix(rows, m.getCols());\n for (int i=0; i<rows; i++) {\n for (int k=0; k<m.getCols(); k++) {\n double sum = 0;\n for (int j=0; j<cols; j++) {\n sum += matrix.get(i)[j] * m.get(j, k);\n }\n result.get(i)[k] = sum;\n }\n }\n setMatrix(result, rows, m.getCols()); // Rows is that of original matrix, Columns is that of the multiplying matrix\n }\n else {\n throw new MatrixMultiplicationDimensionException();\n }\n }", "private void multiply(float... values) {\n buffer(() -> {\n try (Pooled<Matrix4F> mat = Matrix4F.of(values)) {\n kernel.get().multiply(mat.get());\n }\n trans.set(kernel.get().asArray());\n });\n }", "private void mul() {\n\n\t}", "void multiply(double value);", "public Matrix mult(Matrix MatrixB) {\n\t\tDouble[][] newValue = new Double[row][MatrixB.col()];\r\n\t\tVector[] MatBcol = MatrixB.getCol();\r\n\t\t\r\n\r\n\t\tfor (int x = 0; x < row; x++) {\r\n\t\t\tfor (int y = 0; y < MatrixB.col(); y++) {\r\n\t\t\t\tVector rowVecI = rowVec[x];\r\n\t\t\t\tVector colVecI = MatBcol[y];\r\n\t\t\t\tnewValue[x][y] = rowVecI.DotP(colVecI);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Matrix(newValue);\r\n\t}", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "void mul(double val) {\r\n\t\tresult = result * val;\r\n\t}", "public Scalar mul(Scalar s) {\n\t\treturn new RealScalar(getValue() * ((RealScalar)s).getValue());\n\t}", "private static void directProd(DMatrixRMaj a, DMatrixRMaj b, DMatrixRMaj c) {\n for (int i=0; i<5; ++i) {\n for (int j=0; j<5; ++j) {\n c.unsafe_set(i, j, a.unsafe_get(i, 0)*b.unsafe_get(j, 0));\n }\n }\n }", "public static void multipleScalar(double[] array, double value)\r\n\t{\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = array[i] * value;\r\n\t}", "public Matrix multiply(ComplexNumber cn) {\n\t\tMatrix a = copy();\n\t\tfor (int row = 0; row < a.M; row++) {\n\t\t\tfor (int col = 0; col < a.N; col++) {\n\t\t\t\ta.ROWS[row][col] = a.ROWS[row][col].multiply(cn);\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}", "public static short[][] scalarMultiply(short a, short[][] b, short n) {\n short[][] product = new short[b.length][b[0].length];\n for (int i = 0; i < b.length; i++) {\n for (int j = 0; j < b[0].length; j++) {\n product[i][j] = Arithmetic.reducedProduct(a, b[i][j], n);\n }\n } \n return product;\n }", "public Vector2f mul(float scalar) {\n return mul(new Vector2f(scalar, scalar));\n }", "public abstract <M extends AbstractMatrix> M elementwiseProduct(M b);", "public Matrix multiply(BigInteger c, BigInteger modulo) {\n Stream<BigInteger[]> stream = Arrays.stream(inner);\n if (concurrent) {\n stream = stream.parallel();\n }\n\n BigInteger[][] res = stream.map(r -> rowMultiplyConstant(r, c, modulo)).toArray(BigInteger[][]::new);\n\n return new Matrix(res);\n }", "public static Matrix product(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c, m);\n for (int col = 1; col <= cols_c; col++) {\n double prodCol = 1D;\n for (int row = 1; row <= rows_c; row++) {\n prodCol = prodCol * m.get(row, col);\n }\n d.set(1, col, prodCol);\n }\n }\n return d;\n }", "public void timesEquals(double constant){\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tthis.matrix[i][j] *= constant;\r\n \t\t}\r\n \t}\r\n \t}", "public abstract Vector4fc mulProject(IMatrix4f mat);", "public Mat2 mult(double s) {\n\t\tdouble[][] newData = new double[rows][cols];\n\t\tfor(int i=0; i<rows; i++) {\n\t\t\tfor(int j=0; j<cols; j++) {\n\t\t\t\tnewData[i][j] = data[i][j] * s;\n\t\t\t}\n\t\t}\n\t\treturn new Mat2(newData);\n\t}", "public void multiply(int value) {\r\n\t\ttotal *= value;\r\n\t\thistory += \" * \" + value;\r\n\t}", "double scalarMultiplyVectors(double[] first, double[] second) throws InterruptedException;", "public Matrix scale(Double scalar) {\n\t\treturn null;\r\n\t}", "public Matrix multiply(Fraction f) {\n\t\treturn multiply(new ComplexNumber(f));\n\t}", "public static void multiply(Double[] vector, Double multiplier) {\r\n // ...\r\n for (int i = 0; i < vector.length; i++){\r\n vector[i] = vector[i] * multiplier;\r\n }\r\n }", "public void multiply(Object mulValue) {\n\t\tvalue = operate(\n\t\t\t\ttransform(value),\n\t\t\t\ttransform(mulValue),\n\t\t\t\t(v1, v2) -> v1 * v2,\n\t\t\t\t(v1, v2) -> v1 * v2\n\t\t);\n\t}", "private static double[] matrixMultiply(double[][] bezier, double[] matrixVars) {\r\n\t\tdouble[] result = {0,0,0,0};\r\n\t\tfor (int i = 0; i < bezier.length; i++) {\r\n\t\t\tfor (int j=0; j < matrixVars.length; j++) {\r\n\t\t\t\tresult[i] += bezier[i][j]*matrixVars[j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n }", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "public double[] mult(double[] vector) {\n\t\tif(this.cols != vector.length) return null;\n\t\tdouble[] result = new double[this.rows];\n\t\tfor(int i=0; i<this.rows; i++) {\n\t\t\tfor(int j=0; j<this.cols; j++) {\n\t\t\t\tresult[i] += data[i][j] * vector[j];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private static native double mul(int n);", "@Test\n\tpublic void testMultiply() {\n\t\tdouble epsilon = 0.0000000001;\n\n\t\tdouble[][] values2 = {{1.1, 1.2, 1.3}, {2.1, 2.2, 2.3}};\n\t\tMatrix m2 = new Matrix(values2);\n\n\t\tdouble[][] expectedValues = {{3.73, 3.96, 4.19}, {9.67, 10.24, 10.81}, {-2.07, -2.24, -2.41}};\n\t\tMatrix expected = new Matrix(expectedValues);\n\n\t\tMatrix product = m1.multiply(m2);\n\n\t\tassertEquals(3, product.getRowCount(), \"Product have unexpected number of rows.\");\n\t\tassertEquals(3, product.getColCount(), \"Product have unexpected number of columns.\");\n\n\t\tfor (int i = 0; i < product.getRowCount(); i++) {\n\t\t\tfor (int j = 0; j < product.getColCount(); j++) {\n\t\t\t\tassertTrue(Math.abs(product.get(i, j) - expected.get(i, j)) < epsilon,\n\t\t\t\t\t\"Unexpected value on row \" + i + \" column \" + j + \".\");\n\t\t\t}\n\t\t}\n\t}", "public Vector3 mul(final Matrix4 matrix) {\r\n\t\tfinal float l_mat[] = matrix.val;\r\n\t\treturn this.set(x * l_mat[Matrix4.M00] + y * l_mat[Matrix4.M01] + z * l_mat[Matrix4.M02] + l_mat[Matrix4.M03],\r\n\t\t\t\tx * l_mat[Matrix4.M10] + y * l_mat[Matrix4.M11] + z * l_mat[Matrix4.M12] + l_mat[Matrix4.M13],\r\n\t\t\t\tx * l_mat[Matrix4.M20] + y * l_mat[Matrix4.M21] + z * l_mat[Matrix4.M22] + l_mat[Matrix4.M23]);\r\n\t}", "public long[][] smultiply(int i){\n\t\tint sl = this.mat.length; //jumps to method sideLength to obtain the side length n of the matrix A\n\t\t//the global record contains an array of columns, where each column is an array of row elements. i.e.\n\t\t//the record contains the transpose of matrix A, where every row in the record is a column in A\n\t\t//a temporary 2D array tempMatA, and is made equal to the transpose of A\n\t\tlong[][] tempMatA = transpose(this.mat);\n\t\tlong[][] tempMat2 = new long[sl][sl]; //creates a temporary 2D matrix of the same size as tempMatA\n\t\tlong[][] outMat = new long[sl][sl];\n\t\t\n\t\tif (i > 1){\n\t\t\t//see for loop explanation in class \"Matrix3x3flat\"+\n\t\t\tfor (int j = 1; j < i; j ++){ //loops until j == input variable i.\n\t\t\t\t//j == 1 because matrix multiplication will occur on the first loop, so if i == 2, tempMat2 == A^3, not A^2\n\t\t\t\tfor (int a = 0; a < 3; a++){ //loops until a == side length of A\n\t\t\t\t\tfor (int b = 0; b < 3; b++){ //loops until b == side length of A\n\t\t\t\t\t\tfor (int c = 0; c < 3; c++){ //loops until c == side length of A\n\t\t\t\t\t\t\ttempMat2[a][b] = tempMat2[a][b] + (tempMatA[a][c] * tempMatA[c][b]);\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\t//returns tempMat2 as output matrix\n\t\t\toutMat = copy(tempMat2, outMat);\n\t\t}\n\t\t//returns A as output matrix, since A^1 = A\n\t\telse if (i == 1){\n\t\t\toutMat = copy(tempMatA, outMat);\n\t\t}\n\t\t//returns a 3x3 matrix filled with ones if i == 0\n\t\t//A^0 = 1\n\t\telse if (i == 0){\n\t\t\tfor (int m = 0; m < 3; m++){\n\t\t\t\tfor (int n = 0; n < 3; n++){\n\t\t\t\t\tif (m == n){\n\t\t\t\t\t\toutMat[m][n] = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\toutMat[m][n] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//return matrix must be re-transposed to return a the proper format of 2D array for the global array\n\t\toutMat = transpose(outMat);\n\t\treturn outMat;\n\t}", "public Scalar evaluate(Scalar scalar) {\n\t\tScalar ans=scalar;\n\t\tans=ans.pow(this.exponent);\n\t\treturn this.coefficient.mul(ans);\n\t}", "public static double[] multiply(double[] x, double[][] a) {\n int m = a.length;\n int n = a[0].length;\n if (x.length != m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[] y = new double[n];\n for (int j = 0; j < n; j++)\n for (int i = 0; i < m; i++)\n y[j] += a[i][j] * x[i];\n return y;\n }", "public static double[] multiply(double[] x, double[][] a) {\n int m = a.length;\n int n = a[0].length;\n if (x.length != m) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[] y = new double[n];\n for (int j = 0; j < n; j++)\n for (int i = 0; i < m; i++)\n y[j] += a[i][j] * x[i];\n return y;\n }", "public Matrix multiply(Matrix b) {\n MultMatrix multCommand = new MultMatrix();\n Matrix result = multCommand.multiply(this, b);\n\n return result;\n }", "public double scalarProductNS(ThreeVector v1) {\r\n\t\treturn scalarProduct(v1, this);\r\n\t}", "public long multiplyMatrix(final Matrix matrixA, final Matrix matrixB, final Matrix res);", "public void MatrixChainMultiply(int[] p) {\n n = p.length - 1;\t// how many matrices are in the chain\n m = new int[n + 1][n + 1];\t// overallocate m, so that we don't use index 0\n s = new int[n + 1][n + 1];\t// same for s\n matrixChainOrder(p);\t// run the dynamic-programming algorithm\n }", "public Matrix times(Matrix B) throws JPARSECException {\n if (B.m != n) {\n throw new JPARSECException(\"Matrix inner dimensions must agree.\");\n }\n Matrix X = new Matrix(m,B.n);\n double[][] C = X.getArray();\n double[] Bcolj = new double[n];\n for (int j = 0; j < B.n; j++) {\n for (int k = 0; k < n; k++) {\n Bcolj[k] = B.data[k][j];\n }\n for (int i = 0; i < m; i++) {\n double[] Arowi = data[i];\n double s = 0;\n for (int k = 0; k < n; k++) {\n s += Arowi[k]*Bcolj[k];\n }\n C[i][j] = s;\n }\n }\n return X;\n }", "public T mul(T first, T second);", "@Override\n\tpublic IMatrix nMultiply(IMatrix other) {\n\n\t\tif (this.getColsCount() != other.getRowsCount()) {\n\t\t\tthrow new IncompatibleOperandException(\n\t\t\t\t\t\"For matrix multiplication first matrix must have same number of columns as number of rows of the other matrix!\");\n\t\t}\n\t\tint m = this.getRowsCount();\n\t\tint n = other.getColsCount();\n\t\tint innerDimension = this.getColsCount();\n\t\tdouble[][] p = new double[m][n];\n\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdouble sum = 0;\n\t\t\t\tfor (int k = 0; k < innerDimension; k++) {\n\t\t\t\t\tsum += this.get(i, k) * other.get(k, j);\n\t\t\t\t}\n\t\t\t\tp[i][j] = sum;\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(m, n, p, true);\n\t}", "public void sampleMethod()\n {\n int a = 6;\n System.out.println(a *= a);\n \n }", "public Vector tensorProduct( final Vector a);", "public Matrix times(double s) {\n Matrix X = new Matrix(m,n);\n double[][] C = X.getArray();\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = s*data[i][j];\n }\n }\n return X;\n }", "public static double[] multiply(double[][] a, double[] x) {\n int m = a.length;\n int n = a[0].length;\n if (x.length != n) throw new RuntimeException(\"Illegal matrix dimensions.\");\n double[] y = new double[m];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n y[i] += a[i][j] * x[j];\n return y;\n }", "public final native Vec4 multiply(Vec4 vec) /*-{\n return $wnd.mat4.multiplyVec4(this, vec, $wnd.vec4.create());\n }-*/;", "public Matrix rowMultiply(int row, Fraction weight) {\n\t\treturn rowMultiply(row, new ComplexNumber(weight));\n\t}", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "public Matrix rowMultiply(int row, int weight) {\n\t\treturn rowMultiply(row, new ComplexNumber(new Fraction(weight)));\n\t}", "public Matrix multiply(Matrix other) {\n if (this.cols != other.rows)\n throw new RuntimeException(\"Illegal matrix dimensions\");\n\n Matrix result = new Matrix(this.rows, other.cols); //Matrix full of zeros\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < other.cols; j++) {\n for (int k = 0; k < this.cols; k++) {\n result.data[i][j] += (this.data[i][k] * other.data[k][j]);\n }\n }\n }\n\n return result;\n }", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "public void multiply (int value) {\r\n\t\ttotal = total * value;\r\n\t\thistory = history + \" * \" + value;\r\n\t}", "public Vector3 mult(float scalar){\r\n\t\tthis.x *= scalar;\r\n\t\tthis.y *= scalar;\r\n\t\tthis.z *= scalar;\r\n\t\treturn this;\r\n\t}", "public void mul() {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->mul() unimplemented!\\n\");\n }", "public final void mul(Matrix3f m1) {\n\tmul(this, m1);\n }", "public Matrix calculate();", "public Matrix times(Matrix bmat){\r\n \tif(this.ncol!=bmat.nrow)throw new IllegalArgumentException(\"Nonconformable matrices\");\r\n\r\n \tMatrix cmat = new Matrix(this.nrow, bmat.ncol);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n \tdouble sum = 0.0D;\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<bmat.ncol; j++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int k=0; k<this.ncol; k++){\r\n \t\t\tsum += this.matrix[i][k]*bmat.matrix[k][j];\r\n \t\t}\r\n \t\tcarray[i][j]=sum;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "Matrix mult(Matrix M){\n if(this.getSize() != M.getSize()){\n throw new RuntimeException(\"Matrix\");\n\n } \n int newMatrixSize = this.getSize();\n Matrix newM = M.transpose();\n Matrix resultMatrix = new Matrix(newMatrixSize);\n double resultMatrix_Entry = 0;\n for(int i = 1; i <= newMatrixSize; i++){\n for(int j = 1; j<= newMatrixSize; j++){\n List itRow_A = this.rows[i - 1];\n List itRow_B = newM.rows[j-1];\n itRow_A.moveFront();\n itRow_B.moveFront();\n while((itRow_A.index() != -1) && (itRow_B.index() != -1)){\n Entry c_A = (Entry)itRow_A.get();\n Entry c_B = (Entry) itRow_B.get();\n if(c_A.column == c_B.column){\n resultMatrix_Entry += (c_A.value)*(c_B.value);\n itRow_A.moveNext();\n itRow_B.moveNext();\n\n } else if(c_A.column > c_B.column){\n itRow_B.moveNext();\n\n }else{\n itRow_A.moveNext();\n }\n\n }\n resultMatrix.changeEntry(i, j, resultMatrix_Entry);\n resultMatrix_Entry = 0;\n }\n }\n return resultMatrix;\n\n }", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public Double productoEscalar(Pixel p){\r\n\t\treturn this.getXDouble()*p.getXDouble() + this.getYDouble()*p.getYDouble(); \r\n\t}", "public void multiply(MyDouble val) {\n this.setValue(this.getValue() * val.getValue());\n }", "public long product() {\n\t\tlong result = 1;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult *= theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "public static Matrix pow(Matrix base, double index)\n {\n double[][] d = base.getArray();\n int row = base.getRowDimension(), col = base.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n // double[][] result = new double[row][col];\n double val = 1.0;\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n val = Math.pow(d[i][j], index); // System.out.println(\"val = \"+val);\n if (val > Double.MAX_VALUE)\n {\n C[i][j] = Double.MAX_VALUE;\n }\n else\n {\n C[i][j] = val;\n }\n }\n }\n return X;\n }", "public Matrix times(double[][] bmat){\r\n \t int nr=bmat.length;\r\n \tint nc=bmat[0].length;\r\n\r\n \tif(this.ncol!=nr)throw new IllegalArgumentException(\"Nonconformable matrices\");\r\n\r\n \tMatrix cmat = new Matrix(this.nrow, nc);\r\n \tdouble [][] carray = cmat.getArrayReference();\r\n \tdouble sum = 0.0D;\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int k=0; k<this.ncol; k++){\r\n \t\t\tsum += this.matrix[i][k]*bmat[k][j];\r\n \t\t}\r\n \t\tcarray[i][j]=sum;\r\n \t\t}\r\n \t}\r\n \treturn cmat;\r\n \t}", "public int multiplication(int[] dsMat, int i, int j, int[][] T)\n\t{\n\t\tif (i == j) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// variable to store cost of scalar multiplications\n\t\tint min = Integer.MAX_VALUE;\n\n\t\t// if this value is calculted for first time\n\t\tif (T[i][j] == 0)\n\t\t{\n /* M[i,j]\n /\\\n / \\\n / \\\n M[i,k] M[k+1,j] \n */\n\n\t\t\tfor (int k = i ; k < j; k++)\n\t\t\t{\n\t\t\t\t // recur for i x k matrix // recur for k+1 x j matrix \n int cost = multiplication(dsMat, i, k, T) + multiplication(dsMat, k+1, j, T);\n\n // cost to multiply two (i x k) and (k+1 x j) matrix\n cost+= dsMat[i-1] * dsMat[k] * dsMat[j];\n \n // take minimum possible cost\n\t\t\t\tif (cost < min)\n\t\t\t\t\tmin = cost;\n }\n \n // put in table for future reference\n\t\t\tT[i][j] = min;\n\t\t}\n\n\t\t// return min cost to multiply M[i,j]\n\t\treturn T[i][j];\n\t}", "public void rightMultiply(Matrix other){\n \tdouble[][] temp = new double[4][4];\n\n //record copy of this matrix \n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\ttemp[i][j] = array[i][j];\n\t }\n\t}\n\t//user copy of matrix to left multiply while writing dot products into matrix values\n\tfor (int i = 0; i < 4; i++) {\n\t for (int j = 0; j < 4; j++) {\n\t\tarray[i][j] = 0;\n\t\tfor (int k = 0 ; k < 4 ; k++) {\n \t\t array[i][j] += other.array[i][k] * temp[k][j];\n\t\t}\n\t }\n\t}\n }", "abstract void mulS();", "public void multiply (int value) {\n\t\ttotal = total * value;\n\n\t\thistory = history + \" * \" + value;\n\t\t\n\t}", "private static void multiplyArray(double [][] matrixA, double [][] matrixB, double [][] matrixC) {\n\t\t\n\t\tmatrixC[0][0] = ((matrixA[0][0] * matrixB[0][0]) + (matrixA[0][1] * matrixB[1][0]));\n\t\tmatrixC[0][1] = ((matrixA[0][0] * matrixB[0][1]) + (matrixA[0][1] * matrixB[1][1]));\n\t\tmatrixC[1][0] = ((matrixA[1][0] * matrixB[0][0]) + (matrixA[1][1] * matrixB[1][0]));\n\t\tmatrixC[1][1] = ((matrixA[1][0] * matrixB[0][1]) + (matrixA[1][1] * matrixB[1][1]));\n\t}", "public static void multiply(int[][] matrix1, int[][] matrix2) {\n\t\t int matrix1row = matrix1.length;\r\n\t\t int matrix1column = matrix1[0].length;//same as rows in B\r\n\t\t int matrix2column = matrix2[0].length;\r\n\t\t int[][] matrix3 = new int[matrix1row][matrix2column];\r\n\t\t for (int i = 0; i < matrix1row; i++) {//outer loop refers to row position\r\n\t\t for (int j = 0; j < matrix2column; j++) {//refers to column position\r\n\t\t for (int k = 0; k < matrix1column; k++) {\r\n\t\t \t //adds the products of row*column elements until the row/column is complete\r\n\t\t \t //updates to next row/column\r\n\t\t matrix3[i][j] = matrix3[i][j] + matrix1[i][k] * matrix2[k][j];\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t print(matrix3);\r\n\t\t }", "public void mul(final int factor) {\n for (int i = 0; i < coefficients.length; i++) {\n coefficients[i] = zpz.mul(coefficients[i],factor);\n }\n constant = zpz.mul(constant,factor);\n }" ]
[ "0.75967526", "0.7426141", "0.72259873", "0.7196905", "0.71659017", "0.7039678", "0.7031948", "0.68715525", "0.6759788", "0.67263305", "0.67162883", "0.667399", "0.66316336", "0.6624851", "0.6601764", "0.65781504", "0.6567293", "0.65287966", "0.6437157", "0.6404524", "0.63675654", "0.63540655", "0.6320813", "0.62790966", "0.6251344", "0.6249213", "0.6199492", "0.6198209", "0.61854726", "0.61798185", "0.61630267", "0.61577594", "0.6156105", "0.61046493", "0.6026012", "0.60117954", "0.60116297", "0.6004552", "0.5930557", "0.59293926", "0.59058845", "0.5885454", "0.5849944", "0.5841956", "0.5840131", "0.583417", "0.5822283", "0.5821094", "0.5820082", "0.58139765", "0.580994", "0.5802117", "0.5800467", "0.57830584", "0.578152", "0.5734189", "0.57289445", "0.5722477", "0.57084394", "0.5707621", "0.57074314", "0.5698113", "0.5698113", "0.56765085", "0.56764865", "0.5670429", "0.5664258", "0.5656111", "0.56537354", "0.5653307", "0.5652534", "0.56524116", "0.56476176", "0.56435204", "0.5627659", "0.56203496", "0.56148946", "0.56049615", "0.56013685", "0.5600342", "0.56000394", "0.55914223", "0.559097", "0.5588958", "0.5573674", "0.55695295", "0.5568914", "0.5565049", "0.55610067", "0.5560254", "0.5547333", "0.55467695", "0.5544265", "0.5540394", "0.55396837", "0.5530002", "0.55294687", "0.5525599", "0.551798", "0.5515361" ]
0.7016802
7
Normalise all values in the matrix in the range between 0 and 1.
public void normalize() { // determine the maximum value Double max = getMaxValue(); if(max!=null) { normalize(max); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void normalize()\n {\n int sum;\n\n for(int i=0;i<12;i++)\n {\n for(int j=0;j<12;j++) {\n sum = sumAll(i,j);\n if (sum != 0)\n for (int n = 0; n < 12; n++)\n weights[i][j][n] /= sum;\n }\n }\n }", "private static double[] normalize(double[] data)\n {\n double sum = 0;\n \n for (double d : data)\n sum += d;\n \n if (sum != 1 && sum != 0)\n {\n for (int i = 0; i < data.length; i++)\n data[i] /= sum;\n }\n \n return data;\n }", "public double[][] normalize( double[][] data )\n {\n double[][] result = new double[ data.length ][];\n\n for( int i=0; i<data.length; i++ )\n {\n result[ i ] = normalize( data[ i ], 1 );\n }\n\n return result;\n }", "public final void normalize() {\n\tsvd(this);\n }", "private double[][] normalize255(RealMatrix realMatrix) {\n\t\tdouble[][] input = realMatrix.getData();\n\t\tdouble[][] normalized = new double[realMatrix.getRowDimension()][realMatrix.getColumnDimension()];\n\t\tdouble minimum = 99999.99;\n\t\tdouble maximum = -9999.99;\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tminimum = Math.min(minimum, input[i][j]);\n\t\t\t\tmaximum = Math.max(maximum, input[i][j]);\n\t\t\t}\n\t\t}\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tnormalized[i][j] = ((input[i][j] - minimum)*(255/(maximum-minimum)));\n\t\t\t}\n\t\t}\n\t\treturn normalized;\n\t}", "public static void normalise(double[] v) {\n double tot = 0;\r\n for (int i=0; i<v.length; i++) {\r\n tot += v[i] * v[i];\r\n }\r\n double div = Math.sqrt(tot);\r\n if (div > 0) {\r\n for (int i=0; i<v.length; i++) {\r\n v[i] /= div;\r\n }\r\n }\r\n }", "public Double[][] normalize(Double[][] dataSet) {\n Double maxVal = Collections.max(DataClean.twoDArrToArrList(dataSet));\n Double minVal = Collections.min(DataClean.twoDArrToArrList(dataSet)); \n \n Double[][] newData = new Double[dataSet.length][dataSet[0].length];\n for (int i=0; i<dataSet.length; i++) {\n for (int j=0; j<dataSet[0].length; j++) {\n newData[i][j]= (dataSet[i][j]-minVal)/(maxVal-minVal);\n }\n }\n return newData;\n }", "public static void normalization(double[] array)\r\n\t{\r\n\t\tdouble sum = Σ(array);\r\n\r\n\t\tif (sum == 0 || array.length == 0)\r\n\t\t\treturn;\r\n\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = array[i] / sum;\r\n\t}", "public double[] Normalizar01(int[] v){\n double[] result=new double[v.length];\n double s=v[0];\n double max=v[0];\n double min=v[0];\n for (int i=1;i<v.length;i++){\n s+=v[i];\n //minimo\n if (v[i]<min)\n min=v[i];\n if (v[i]>max)\n max=v[i];\n //maximo\n }\n for (int i=0;i<v.length;i++){\n result[i]=((double)v[i]-min)/(max-min);\n }\n\n return result;\n }", "public void normalize(double normalizingFactor) {\n //System.out.println(\"norm: \" + normalizingFactor);\n for (T value : getFirstDimension()) {\n for (T secondValue : getMatches(value)) {\n double d = get(value, secondValue) / normalizingFactor;\n set(value, secondValue, d);\n }\n }\n }", "private void normalize(DMatrixRMaj M) {\n double suma=0;\n Equation eq = new Equation();\n eq.alias(M, \"M\");\n eq.alias(suma,\"s\");\n\n// for (int i=0;i<M.numRows;i++) {\n// for (int j = 0; j < M.numCols; j++) {\n// eq.alias(i, \"i\");\n// eq.alias(j, \"j\");\n// eq.process(\"s = s + M(i,j)\");\n//// suma = suma + M.get(i,j);\n// }\n// }\n// for (int i=0;i<M.numRows;i++){\n// for (int j=0;j<M.numCols;j++){\n//// eq.alias(i,\"i\");\n//// eq.alias(j,\"j\");\n//// eq.process(\"s = s + M(i,j)\");\n// M.set(i,j,M.get(i,j)/suma);\n// }\n for(int i=0; i < M.numRows; i++){\n eq.alias(i, \"i\");\n //eq.process(\"M(i,:) = exp(M(i,:) - max(M(i,:)))\"); // to prevent high values in exp(M)\n //eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n// eq.process(\"M(i,:) = M(i,:) / s\");\n }\n }", "public final void normalize(Matrix3f m1) {\n\tset(m1);\n\tsvd(this);\n }", "public void histNormalize() {\n\n double max = max();\n double min = min();\n max = max - min;\n for (int i = 0; i < pixelData.length; i++) {\n double value = pixelData[i] & 0xff;\n pixelData[i] = (byte) Math.floor((value - min) * 255 / max);\n }\n }", "public Vector normalize ( );", "public double l1_norm()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += Math.abs(c);\r\n\r\n return sum;\r\n }", "public double oneNorm(){\r\n \tdouble norm = 0.0D;\r\n \tdouble sum = 0.0D;\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tsum+=Math.abs(this.matrix[i][j]);\r\n \t\t}\r\n \t\tnorm=Math.max(norm,sum);\r\n \t}\r\n \treturn norm;\r\n \t}", "static void normalize(double[] state) {\r\n double norm = 1/Math.sqrt(state[0]*state[0]+state[2]*state[2]+state[4]*state[4]+state[6]*state[6]);\r\n state[0] *= norm;\r\n state[2] *= norm;\r\n state[4] *= norm;\r\n state[6] *= norm;\r\n }", "public double[] Normalizar(int[] v){\n double[] result=new double[v.length];\n double s=0;\n for (int i=0;i<v.length;i++){\n s+=v[i];\n }\n for (int i=0;i<v.length;i++){\n result[i]=(double)v[i]/(double)s;\n }\n\n return result;\n }", "public ArrayList<Double> normalize( ArrayList<Double> data, double scale )\n {\n double min = Double.MAX_VALUE;\n double max = Double.MIN_VALUE;\n ArrayList<Double> result = new ArrayList<Double>();\n\n // First, need to find the min value in the array\n for( double value : data )\n {\n if( value < min )\n {\n min = value;\n }\n }\n\n // Next, translate by the min amount\n for( double value : data )\n {\n double temp = (value - min);\n result.add( temp );\n if( temp > max )\n {\n max = temp;\n }\n }\n\n // Finally, scale by max\n for( int i=0; i<result.size(); i++ )\n {\n result.set( i, (scale * ( result.get( i ) / max )) );\n }\n\n return result;\n }", "public Vector normalize() {\n double num=1/length();\n head = scale(num).head;\n return this;\n }", "private double[] normalize(double[] p) {\n double sum = 0;\n double[] output = new double[p.length];\n for (double i : p) {\n sum += i;\n }\n for (int i = 0; i < output.length; i++) {\n output[i] = p[i]/sum;\n }\n return output;\n }", "public Vector Normalize(){\n float magnitude = Magnitude();\n for(int i = 0; i < axis.length; i++){\n axis[i] /= magnitude;\n }\n return this;\n }", "public final void mulNormalize(Matrix3f m1) {\n\tmul(m1);\n\tsvd(this);\n }", "public static double normalise(double in, double min, double max) {\n if (in < min) {\n return 0.0;\n } else if (in > max) {\n return 1.0;\n } else {\n return (min == max) ? 0.0 : (in - min) / (max - min);\n }\n }", "public double[] getNormalizedInputValues(){\r\n\t\tdouble [] norm = new double[realValues[0].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[0][i])\r\n\t\t\t\tnorm[i] = Attributes.getInputAttribute(i).normalizeValue(realValues[0][i]);\r\n\t\t\telse \r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "public void normalize() {}", "float norm();", "public void normalize() {\n\t\tdouble norm = norm();\n\t\tif (DoubleComparison.eq(norm, 0)) {\n\t\t\tthrow new RuntimeException(\"Failed to normalize: length is zero\");\n\t\t}\n\t\tthis.x = this.x / norm;\n\t\tthis.y = this.y / norm;\n\t\tthis.z = this.z / norm;\n\t}", "public static float[] l2normalize(float[] v, boolean throwOnZero) {\n double squareSum = IMPL.dotProduct(v, v);\n int dim = v.length;\n if (squareSum == 0) {\n if (throwOnZero) {\n throw new IllegalArgumentException(\"Cannot normalize a zero-length vector\");\n } else {\n return v;\n }\n }\n double length = Math.sqrt(squareSum);\n for (int i = 0; i < dim; i++) {\n v[i] /= length;\n }\n return v;\n }", "public void normalize() {\r\n\t\tfor (int i = 0; i<no_goods; i++) {\t\t\t\r\n\t\t\tfor (IntegerArray r : prob[i].keySet()) {\t\t\t\t\r\n\t\t\t\tdouble[] p = prob[i].get(r);\r\n\t\t\t\tint s = sum[i].get(r);\r\n\t\t\t\t\r\n\t\t\t\tfor (int j = 0; j<p.length; j++)\r\n\t\t\t\t\tp[j] /= s;\r\n\t\t\t}\r\n\r\n\t\t\t// compute the marginal distribution for this good\r\n\t\t\tfor (int j = 0; j<no_bins; j++)\r\n\t\t\t\tmarg_prob[i][j] /= marg_sum;\r\n\t\t}\r\n\t\t\r\n\t\tready = true;\r\n\t}", "public void normalize()\n\t{\n\t\tif (this.getDenom() < 0)\n\t\t{\n\t\t\tthis.setDenom(this.getDenom() * (-1));\n\t\t\tthis.setNumer(this.getNumer() * (-1));\n\t\t}\n\t}", "public Vector3D normalize()\r\n {\r\n float oneOverMagnitude = 0;\r\n float mag = magnitude();\r\n \r\n if (mag!=0) {\r\n oneOverMagnitude = 1 / mag;\r\n }\r\n\r\n return this.product(oneOverMagnitude);\r\n }", "public void normalize() {\n float length = (float)Math.sqrt(nx * nx + ny * ny);\n nx/=length;\n ny/=length;\n }", "public double[] normalize( double[] data, double scale )\n {\n double min = Double.MAX_VALUE;\n double max = Double.MIN_VALUE;\n double[] result = new double[ data.length ];\n\n // First, need to find the min value in the array\n for( int i=0; i<data.length; i++ )\n {\n double value = data[ i ];\n if( value < min )\n {\n min = value;\n }\n }\n\n // Next, translate by the min amount\n for( int i=0; i<data.length; i++ )\n {\n double value = data[ i ];\n double temp = (value - min);\n result[ i ] = temp;\n if( temp > max )\n {\n max = temp;\n }\n }\n\n // Finally, scale by max\n for( int i=0; i<result.length; i++ )\n {\n result[ i ] = ( scale * ( result[ i ] / max ) );\n }\n\n return result;\n }", "public static float norm(float[] array) {\n float retval = 0;\n for (int i = 0; i < array.length; i++) {\n retval += array[i] * array[i];\n }\n return (float) Math.sqrt(retval);\n }", "public static Vector<Double> norm(Vector<Double> a) {\n\t\tdouble x = TransEInitializer.vec_len(a);\n\t\tif (x > 1){\n\t\t\t\n\t\t\tfor (int ii = 0; ii < a.size(); ii++)\n\t\t\t\ta.set(ii, a.get(ii) / x);\n\t\t\n\n\t\t}\n\n//\t\tif(x > 1)\n//\t\t\treturn true;\n//\t\treturn false;\n\t\treturn a;\n\t}", "private double[][] normalize (float[][] in) {\n\n\t\tdouble[][] temp = new double[in.length][2];\n\n\t\t// Get centroid\n\t\tfloat[] centroid = getCentroid(in);\n\n\t\t// Normalize\n\t\tfor(int i = 0; i < in.length; i++) {\n\t\t\ttemp[i][0] = in[i][0] - centroid[0];\n\t\t\ttemp[i][1] = in[i][1] - centroid[1];\n\t\t}\n\n\t\treturn temp;\n\t}", "public float[] normalisePNs(int[] image) {\n double sum = 0;\n float[] float_image = new float[image.length];\n for ( int i = 0; i < image.length; ++i ){ sum+=image[i]; }\n sum = Math.sqrt(sum);\n for ( int i = 0; i < image.length; ++i ){ float_image[i] = (float) image[i] / (float) sum; }\n\n return float_image;\n }", "public void normalizeColumn(final int columnIndex) {\r\n double max = Double.NEGATIVE_INFINITY;\r\n double min = Double.POSITIVE_INFINITY;\r\n for (int i = 0; i < this.getRowCount(); i++) {\r\n double val = getLogicalValueAt(i, columnIndex);\r\n if (val > max) {\r\n max = val;\r\n }\r\n if (val < min) {\r\n min = val;\r\n }\r\n }\r\n for (int i = 0; i < this.getRowCount(); i++) {\r\n setLogicalValue(i, columnIndex, (getLogicalValueAt(i, columnIndex) - min)\r\n / (max - min), false);\r\n }\r\n this.fireTableDataChanged();\r\n }", "private double[] normalizeHistogram(double[] inputHistogram, int totalPixels) {\n\t\tdouble[] normalized=new double[inputHistogram.length];\n\t\tfor(int i=0;i<inputHistogram.length&&start;i++){\n\t\t\tnormalized[i]=inputHistogram[i]/totalPixels;\n\t\t}\n\t\treturn normalized;\n\t}", "public void normalize() { sets length to 1\n //\n double length = Math.sqrt(x * x + y * y);\n\n if (length != 0.0) {\n float s = 1.0f / (float) length;\n x = x * s;\n y = y * s;\n }\n }", "private void normalize() {\r\n // GET MAX PRICE \r\n for (Alternative alt : alternatives) {\r\n if (alt.getPrice() > 0 && alt.getPrice() < minPrice) {\r\n minPrice = alt.getPrice();\r\n }\r\n }\r\n\r\n for (Alternative alt : alternatives) {\r\n // NORMALIZE PRICE - NON BENIFICIAL using max - min \r\n double price = alt.getPrice();\r\n double value = minPrice / price;\r\n alt.setPrice(value);\r\n // BENITIFICIAL v[i,j] = x[i,j] / x[max,j]\r\n double wood = alt.getWood();\r\n value = wood / maxWood;\r\n alt.setWood(value);\r\n\r\n double brand = alt.getBrand();\r\n value = wood / maxBrand;\r\n alt.setBrand(value);\r\n\r\n double origin = alt.getOrigin();\r\n value = origin / maxOrigin;\r\n alt.setOrigin(value);\r\n\r\n }\r\n }", "private static void normalizeFromLog10(double[] array) {\n double maxValue = findMaxEntry(array).first;\n for (int i = 0; i < array.length; i++)\n array[i] = Math.pow(10, array[i] - maxValue);\n \n // normalize\n double sum = 0.0;\n for (int i = 0; i < array.length; i++)\n sum += array[i];\n for (int i = 0; i < array.length; i++)\n array[i] /= sum;\n }", "private void normalize(double[] scores, boolean wantSmall) {\n\n // Yes\n double randomLowValue = 0.00001;\n\n if (wantSmall) {\n double min = Double.MAX_VALUE;\n for (double score : scores) {\n if (score < min) min = score;\n }\n\n for (int i = 0; i < scores.length; i++) {\n scores[i] = min / Math.max(scores[i], randomLowValue);\n }\n\n } else {\n double max = Double.MIN_VALUE;\n for (double score : scores) {\n if (score > max) max = score;\n }\n\n if (max == 0) max = randomLowValue;\n for (int i = 0; i < scores.length; i++) {\n scores[i] = scores[i] / max;\n }\n }\n }", "public double infinityNorm(){\r\n \tdouble norm = 0.0D;\r\n \tdouble sum = 0.0D;\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tsum+=Math.abs(this.matrix[i][j]);\r\n \t\t}\r\n \t\tnorm=Math.max(norm,sum);\r\n \t}\r\n \treturn norm;\r\n \t}", "public Vec2double normalise() {\n\t\tdouble len = (double) (1 / Math.sqrt(x*x + y*y));\n//\t\tx *= len;\n//\t\ty *= len;\n\t\treturn new Vec2double(x*len, y*len);\n\t}", "public static double[] normalize(double[] v) {\n double[] tmp = new double[3];\n tmp[0] = v[0] / VectorMath.length(v); \n tmp[1] = v[1] / VectorMath.length(v); \n tmp[2] = v[2] / VectorMath.length(v); \n return tmp; \n }", "private void zScoreNormalize(List<Double> data)\n\t{\n\t\tdouble mean=Statistics.mean(data);\n\t\tdouble sd=Statistics.sd(data);\n\t\tfor(int i=0; i!= data.size(); ++i)\n\t\t{\n\t\t\tdata.set(i, (data.get(i)-mean)/sd);\n\t\t}\n\n\t}", "public ArrayList<DataPoint> normalizeFeatures(ArrayList<DataPoint> datapoints) {\n\t\t\n\t\tdouble[] vector = new double[featureCount];\n\t\t// now normalize ALL the points!\n\t\tfor (DataPoint aPoint : datapoints) {\n\t\t\tvector = aPoint.vector;\n\t\t\tfor (int i = 0; i < featureCount; ++i) {\n\t\t\t\tvector[i] = (vector[i] - meansOfFeatures.get(i))\n\t\t\t\t\t\t/ stdevOfFeatures.get(i);\n\t\t\t}\n\t\t\taPoint.setVector(vector);\n\t\t}\n\t\treturn datapoints;\n\t}", "public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }", "IVec3 normalized();", "private static void normalize(boolean[][] robot) {\n int n = robot.length;\n for (int i = 1; i < n; i++) {\n robot[i][i] = false;\n }\n for (int i = 1; i < n; i++) {\n normalize(robot, i);\n }\n }", "public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}", "public double frobeniusNorm(){\r\n \tdouble norm=0.0D;\r\n \tfor(int i=0; i<this.ncol; i++){\r\n \t\tfor(int j=0; j<this.nrow; j++){\r\n \t\tnorm=hypot(norm, Math.abs(matrix[i][j]));\r\n \t\t}\r\n \t}\r\n \treturn norm;\r\n \t}", "public void normalize(List<RankList> samples) {\n/* 667 */ for (RankList sample : samples) nml.normalize(sample);\n/* */ \n/* */ }", "public double[] getNormalizedOutputValues(){\r\n\t\tdouble [] norm = new double[realValues[1].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[1][i])\r\n\t\t\t\tnorm[i] = Attributes.getOutputAttribute(i).normalizeValue(realValues[1][i]);\r\n\t\t\telse\r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "public void normalize() {\r\n\t\tfloat length = (float) this.lenght();\r\n\t\tif (length > 0) {\r\n\t\t\tx /= length;\r\n\t\t\ty /= length;\r\n\t\t\tz /= length;\r\n\t\t}\r\n\t}", "public Array2DRowRealMatrix getNormalisedData() {\r\n\t\t\r\n\t\t//declare variables\r\n\t\tdouble dataVal;\r\n\t\tdouble normalisationVal;\r\n\t\tdouble finalVal;\r\n\t\r\n\t\tArray2DRowRealMatrix returnMatrix = new Array2DRowRealMatrix(noOfWavelengths,2);\r\n\t\t\r\n\t\t//iterate through data\r\n\t\tfor(int rowIndex=0; rowIndex < noOfWavelengths; rowIndex++) {\r\n\t\t\t\r\n\t\t\t//normalised data value = (recorded data value / recorded normalisation value) * calibration ratio\r\n\t\t\tdouble[] normalData = new double[2];\r\n\r\n\t\t\tdataVal = data.getRow(rowIndex)[1];\r\n\t\t\tnormalisationVal = normalisationData.getRow(rowIndex)[1];\r\n\t\t\t\r\n\t\t\tnormalData[0] = data.getRow(rowIndex)[0];\r\n\t\t\tnormalData[1] = (dataVal / normalisationVal) * calibRatio;\r\n\t\t\t\r\n\t\t\treturnMatrix.setRow(rowIndex, normalData);\r\n\t\t}\r\n\r\n\t\treturn returnMatrix;\r\n\t}", "public double[] getNormalizedInputValues( InstanceAttributes instAttributes ){\r\n\t\tdouble [] norm = new double[realValues[0].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[0][i])\r\n\t\t\t\tnorm[i] = instAttributes.getInputAttribute(i).normalizeValue(realValues[0][i]);\r\n\t\t\telse \r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "@Override \n public double[] fastApply(double[] x) {\n double d = dot.norm(x);\n scale.fastDivide(x, d);\n return x;\n }", "static void normalize(double[][] plane) {\n int rows = plane.length;\n int cols = plane[0].length;\n\n //Begin by converting all negative values to positive\n // values. This is equivalent to the computation of\n // the magnitude for purely real data.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] < 0) {\n plane[row][col] = -plane[row][col];\n }//end if\n }//end inner loop\n }//end outer loop\n\n //Convert the values to log base 10 to preserve the\n // dynamic range of the plotting system. Set negative\n // values to 0.\n\n //First eliminate or change any values that are\n // incompatible with log10 method.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] == 0.0) {\n plane[row][col] = 0.0000001;\n } else if (plane[row][col] == Double.NaN) {\n plane[row][col] = 0.0000001;\n } else if (plane[row][col] ==\n Double.POSITIVE_INFINITY) {\n plane[row][col] = 9999999999.0;\n }//end else\n }//end inner loop\n }//end outer loop\n\n //Now convert the data to log base 10 setting all\n // negative results to 0.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n plane[row][col] = log10(plane[row][col]);\n if (plane[row][col] < 0) {\n plane[row][col] = 0;\n }//end if\n }//end inner loop\n }//end outer loop\n\n\n //Now set everything below X-percent of the maximum\n // value to X-percent of the maximum value where X is\n // determined by the value of scale.\n double scale = 1.0 / 7.0;\n //First find the maximum value.\n double max = Double.MIN_VALUE;\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] > max) {\n max = plane[row][col];\n }//end if\n }//end inner loop\n }//end outer loop\n\n //Now set everything below X-percent of the maximum to\n // X-percent of the maximum value and slide\n // everything down to cause the new minimum to be\n // at 0.0\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] < scale * max) {\n plane[row][col] = scale * max;\n }//end if\n plane[row][col] -= scale * max;\n }//end inner loop\n }//end outer loop\n\n //Now scale the data so that the maximum value is 255.\n\n //First find the maximum value\n max = Double.MIN_VALUE;\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] > max) {\n max = plane[row][col];\n }//end if\n }//end inner loop\n }//end outer loop\n //Now scale the data.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n plane[row][col] = plane[row][col] * 255.0 / max;\n }//end inner loop\n }//end outer loop\n\n }", "private static double minMaxNormalization(final double value) {\n return (((value - Configuration.ACTUAL_MIN) / (Configuration.ACTUAL_MAX - Configuration.ACTUAL_MIN)) * (Configuration.NORMALIZED_MAX - Configuration.NORMALIZED_MIN)) + Configuration.NORMALIZED_MIN;\n }", "final static public FloatArray2D SequenceToFloatArray2DNormalize(final Sequence seq) {\n\t\tFloatArray2D fa = SequenceToFloatArray2D(seq);\r\n\t\tFloatArray2D fa_normalized = fa.clone();\r\n\r\n\t\tList<Float> list = Arrays.asList(ArrayUtils.toObject(fa.data));\r\n\t\tfloat min = Collections.min(list);\r\n\t\tfloat max = Collections.max(list);\r\n\r\n\t\tfloat scale = (float) (1.0 / (max - min));\r\n\r\n\t\tfor (int i = 0; i < fa_normalized.data.length; ++i) {\r\n\t\t\tfa_normalized.data[i] = (fa_normalized.data[i] - min) * scale;\r\n\t\t}\r\n\r\n\t\treturn fa_normalized;\r\n\t}", "public static native double norm(double a[]);", "public void normalize()\n {\n double magnitude = this.magnitude();\n this.x = x / (float)magnitude;\n this.y = y / (float)magnitude;\n this.z = z / (float)magnitude;\n this.w = w / (float)magnitude;\n }", "public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }", "public Vector normalized(){\r\n\t\tfloat len = this.length();\r\n\t\tif( len != 0.0f && len != 1.0f ){\r\n\t\t\treturn new Vector( this.x / len, this.y / len, this.z / len );\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "private double normalizeImageValue(double value){\n return value/(31);\n }", "public void normalize(){\n\tstrength = 50;\n\tdefense = 55;\n\tattRating = 0.4\t;\n }", "private void normalizeLambda_mode3(double[] origLambda) {\n double max = NegInf;\n double min = PosInf;\n double scaling = 0.0;\n\n for (int i = 1; i < origLambda.length; i++) {\n if (origLambda[i] > max) max = origLambda[i];\n if (origLambda[i] < min) min = origLambda[i];\n }\n\n if (Math.abs(max) > 1e-30 || Math.abs(min) > 1e-30) // not all weights are\n // zero\n {\n if (max > 0 && min > 0)\n scaling = max;\n else if (max > 0 && min < 0) {\n if (Math.abs(max) > Math.abs(min))\n scaling = max;\n else\n scaling = Math.abs(min);\n } else if (max <= 0) scaling = Math.abs(min);\n\n for (int i = 1; i < origLambda.length; i++)\n origLambda[i] /= scaling;\n }\n }", "public void normalize(){\r\n \tif(!normal){\r\n\t attack/=2;\r\n\t defense*=2;\r\n\t normal=true;\r\n\t}\r\n }", "public void normalize(){\r\n \tif(!normal){\r\n\t attack/=2;\r\n\t defense*=2;\r\n\t normal=true;\r\n\t}\r\n }", "public static Vector normalize(Vector input) {\n return input.divide(input.euclideanNorm());\n }", "@Override\n\tpublic double\n\tnormalize()\n\t{\n\t\tdouble len = length();\n\n\t\tif( len != 0 )\n\t\t{\n\t\t\tdata[0] /= len;\n\t\t\tdata[1] /= len;\n\t\t\tdata[2] /= len;\n\t\t}\n\t\t\n\t\treturn len;\n\t}", "private double valueToNormalized(T value) {\n if (0 == absoluteCriticalValuePrim - absoluteWarningValuePrim) {\n // prevent division by zero, simply return 0.\n return 0d;\n }\n return (value.doubleValue() - absoluteWarningValuePrim) / (absoluteCriticalValuePrim - absoluteWarningValuePrim);\n }", "public static double[][] normaliseColumns (double[][] dataArray){\n\t\t\n\t\tint rows = dataArray.length;\n\t\tint cols = dataArray[0].length;\n\t\tdouble[][] returnData = new double[rows][cols];\n\t\tdouble[] colMaxValues = new double[cols];\n\t\tdouble[] colMinValues = new double[cols];\n\t\tdouble[] colDiffValues = new double[cols];\n\t\t\n\t\t//find max in each column\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < cols; j++ ) {\n\t\t\t\t\n\t\t\t\t//initialise with first values\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tcolMaxValues[j] = dataArray[i][j];\n\t\t\t\t\tcolMinValues[j] = dataArray[i][j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (dataArray[i][j] > colMaxValues[j]) {\n\t\t\t\t\tcolMaxValues[j] = dataArray[i][j];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (dataArray[i][j] < colMinValues[j]) {\n\t\t\t\t\tcolMinValues[j] = dataArray[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get difference values \n\t\tfor (int i = 0; i < cols; i++) {\n\t\t\tcolDiffValues[i] = colMaxValues[i] - colMinValues[i];\n\t\t}\n\t\t\n\t\t//normalise\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < cols; j++ ) {\n\t\t\t\treturnData[i][j] = (dataArray[i][j]-colMinValues[j])/colDiffValues[j];\n\t\t\t}\n\t\t}\n\t\treturn returnData;\n\t}", "public double[] zNormalise(double[] input, boolean classValOn)\r\n {\r\n float mean;\r\n float stdv;\r\n\r\n int classValPenalty = classValOn ? 1 : 0;\r\n int inputLength = input.length - classValPenalty;\r\n\r\n double[] output = new double[input.length];\r\n float seriesTotal = 0;\r\n\r\n for (int i = 0; i < inputLength; i++)\r\n {\r\n seriesTotal = (float) (seriesTotal + input[i]);\r\n }\r\n\r\n mean = seriesTotal / (float) inputLength;\r\n stdv = 0;\r\n float temp;\r\n for (int i = 0; i < inputLength; i++)\r\n {\r\n temp = (float) (input[i] - mean);\r\n stdv = (float) (stdv + temp * temp);\r\n }\r\n\r\n stdv /= (float) inputLength;\r\n\r\n // if the variance is less than the error correction, just set it to 0, else calc stdv.\r\n stdv = (float) ((stdv < ROUNDING_ERROR_CORRECTION) ? 0.0 : Math.sqrt(stdv));\r\n\r\n for (int i = 0; i < inputLength; i++)\r\n {\r\n //if the stdv is 0 then set to 0, else normalise.\r\n output[i] = (stdv == 0.0) ? 0.0 : ((input[i] - mean) / stdv);\r\n }\r\n\r\n if (classValOn)\r\n {\r\n output[output.length - 1] = input[input.length - 1];\r\n }\r\n\r\n return output;\r\n }", "public double[][] normalisedHistogram(BufferedImage image) {\r\n double[][] rgbCount = getHistogram(image);\r\n int size = image.getHeight() * image.getWidth();\r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j <= 255; j++) {\r\n rgbCount[i][j] /= size; //normalise\r\n }\r\n }\r\n return rgbCount;\r\n }", "private void normalizePrior(NumericSequenceData prior) {\n double sum=0;\n int length=prior.getSize();\n for (int i=0;i<length;i++) {\n sum+=prior.getValueAtRelativePosition(i);\n }\n for (int i=0;i<length;i++) {\n double oldvalue=prior.getValueAtRelativePosition(i); \n //if (sum==0) prior.setValueAtRelativePosition(i,1.0/(double)length);\n if (sum==0) prior.setValueAtRelativePosition(i,0);\n else prior.setValueAtRelativePosition(i, oldvalue/sum);\n } \n }", "public Vector330Class normalize(){\n if(this.magnitude() <= EPS){\n return new Vector330Class(0, 0);\n }\n else{\n return new Vector330Class(this.x * (1/this.magnitude()), this.y * (1/this.magnitude()));\n }\n }", "public float[] computeNormalMatrix(float[] modelMatrix) {\n\t\tfloat[] tmpMatrix = new float[16];\n\t\tfloat[] tmp2Matrix = new float[16];\n\t\tMatrix.multiplyMM(tmpMatrix, 0, viewMatrix, 0, modelMatrix, 0);\n\t\tMatrix.invertM(tmp2Matrix, 0, tmpMatrix, 0);\n\t\tMatrix.transposeM(tmpMatrix, 0, tmp2Matrix, 0);\n\t\t\n\t\treturn tmpMatrix;\n\t}", "public static float[] l2normalize(float[] v) {\n l2normalize(v, true);\n return v;\n }", "@Override\r\n\t\tpublic void normalize()\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public double[] preprocessDataNormalizationOnly(double[] data) {\n return dataNormalization.normalizeNewData(data);\n }", "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "public static final double[] normalize(final double[] V)\n {\n double []vec = new double[periodNum];\t\n\t//Vector vec = new Vector(periodNum);\n\t//Double zero = new Double(0);\n\t//for(int i=0;i<periodNum;i++)\n\t// vec.insertElementAt(zero,i);\n\n\tdouble sum =0;\n\t\n\tfor(int i=0;i<periodNum;i++)\n\t{\n\t\tsum += V[i];\n\t\t//sum += ((Double)V.elementAt(i)).doubleValue();\n\t}\n\t// if sum is 0, can't divide using it\n\tif(sum ==0)\n\t return V;\n\n\n\tfor(int i=0;i<periodNum;i++)\n\t{\n\t double d = V[i];//((Double)V.elementAt(i)).doubleValue();\n\t double dd = d/sum;\n\n\t vec[i] = dd;\n\t //vec.addElement(new Double(dd));\n\t}\n\t \n\treturn vec;\n }", "private void scaleToPositive() {\r\n // Obtain min value\r\n double minScalarization = Double.MAX_VALUE;\r\n for (S solution : solutions()) {\r\n if (scalarization.getAttribute(solution) < minScalarization) {\r\n minScalarization = scalarization.getAttribute(solution);\r\n }\r\n }\r\n if (minScalarization < 0) {\r\n // Avoid scalarization values of 0\r\n double eps = 10e-6;\r\n for (S solution : solutions()) {\r\n scalarization.setAttribute(solution, eps + scalarization.getAttribute(solution) + minScalarization);\r\n }\r\n }\r\n }", "public Vector normalized() {\n double size = this.length();\n return new Vector(this.getHead().getX() / size, this.getHead().getY() / size, this.getHead().getZ() / size);\n }", "void normalizeSafe()\r\n {\r\n float fLengthSquared = lengthSquared();\r\n if ( 0.0f == fLengthSquared )\r\n {\r\n set(ZERO);\r\n }\r\n else\r\n {\r\n scale(1.0f/(float)Math.sqrt(fLengthSquared));\r\n }\r\n }", "public void normalize()\n {\n\tdef += 200*counter;\n\tdmg -= 0.5*counter;\n\tcounter = 0;\n }", "public void invert() {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n Double sim = get(first, second);\n \n if(sim!=null && sim > 0.0) {\n set(first, second, 1.0/sim);\n }\n \n }\n \n }\n }", "public double norm() {\n\t\thomogenize();\n\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n\t}", "public void normalize(){\n\t_defense = originalDefense;\n\t_strength = originalStrength;\n }", "public double[] getNormalizedOutputValues( InstanceAttributes instAttributes ){\r\n\t\tdouble [] norm = new double[realValues[1].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[1][i])\r\n\t\t\t\tnorm[i] = instAttributes.getOutputAttribute(i).normalizeValue(realValues[1][i]);\r\n\t\t\telse\r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "public Double[][] standardize(Double[][] dataSet) {\n Double sum=0.0;\n for (int i=0;i<dataSet.length;i++){\n for (int j=0; j<dataSet[0].length;j++){\n sum += dataSet[i][j];\n }\n }\n Double mean = sum/(dataSet.length*dataSet[0].length);\n Double std = 0.0;\n //compute standard deviation\n for (Double[] i: dataSet) {\n for (Double ij: i) {\n std += Math.pow(ij-mean,2.0); \n }\n }\n std = Math.sqrt(std/ (dataSet.length * dataSet[0].length));\n\n \n Double[][] newData = new Double[dataSet.length][dataSet[0].length];\n for (int i=0; i<dataSet.length; i++) {\n for (int j=0; j<dataSet[0].length; j++) {\n newData[i][j]= (dataSet[i][j]-mean)/std;\n }\n }\n return newData;\n }", "private float getScalingFactorX(Matrix matrix) {\n\t\tif (Float.compare(matrix.get(1), 0.0f) != 0) {\n\t\t\treturn (float) Math.sqrt(Math.pow(matrix.get(0), 2) + Math.pow(matrix.get(1), 2));\n\t\t}\n\t\treturn matrix.get(0);\n\t}", "private Matrix gaussianEliminate(){\r\n\t\t//Start from the 0, 0 (top left)\r\n\t\tint rowPoint = 0;\r\n\t\tint colPoint = 0;\r\n\t\t// instantiate the array storing values for new Matrix\r\n\t\tDouble[][] newVal = deepCopy(AllVal);\r\n\t\twhile (rowPoint < row && colPoint < col) {\r\n\t\t\t// find the index with max number (absolute value) from rowPoint to row\r\n\t\t\tDouble max = Math.abs(newVal[rowPoint][colPoint]);\r\n\t\t\tint index = rowPoint;\r\n\t\t\tint maxindex = rowPoint;\r\n\t\t\twhile (index < row) {\r\n\t\t\t\tif (max < Math.abs(newVal[index][colPoint])) {\r\n\t\t\t\t\tmax = newVal[index][colPoint];\r\n\t\t\t\t\tmaxindex = index;\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t\t// if max is 0 then that must mean there are no pivots\r\n\t\t\tif (max == 0) {\r\n\t\t\t\tcolPoint++;\r\n\t\t\t}else {\r\n\t\t\t\t//TODO: refactor into method\r\n\t\t\t\tDouble[] Temp = newVal[rowPoint];\r\n\t\t\t\tnewVal[rowPoint] = newVal[maxindex];\r\n\t\t\t\tnewVal[maxindex] = Temp;\r\n\t\t\t\t// Fill 0 lower part of pivot\r\n\t\t\t\tfor(int lower = rowPoint + 1; lower < row; lower++) {\r\n\t\t\t\t\tDouble ratio = newVal[lower][colPoint]/newVal[rowPoint][colPoint];\r\n\t\t\t\t\tnewVal[lower][colPoint] = (Double) 0.0;\r\n\t\t\t\t\t// adjust for the remaining element\r\n\t\t\t\t\tfor (int remain = colPoint + 1; remain < col; remain++) {\r\n\t\t\t\t\t\tnewVal[lower][remain] = newVal[lower][remain] - newVal[lower][remain]*ratio;\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\trowPoint++;\r\n\t\t\t\tcolPoint++;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Matrix(newVal);\r\n\t}", "public abstract void recalcNormalizationExtrema();", "public final void normalizeCP() {\n\t// domain error may occur\n\tdouble s = Math.pow(determinant(), -1.0/3.0);\n\tmul((float)s);\n }", "public void normaliseVertexColors()\r\n\t{\r\n\t for(int i=0; i<3; i++)\r\n vertices[i].normaliseVertexColor();\r\n\t}" ]
[ "0.7131027", "0.6875127", "0.67674977", "0.66926336", "0.6688856", "0.6684296", "0.667518", "0.66524404", "0.65409404", "0.6458332", "0.64429337", "0.6442334", "0.640064", "0.6390301", "0.6361758", "0.63532996", "0.63196594", "0.62636715", "0.62440056", "0.6209142", "0.62019306", "0.6173745", "0.6118392", "0.60744876", "0.60487986", "0.6038417", "0.6034481", "0.5995656", "0.59651333", "0.59357554", "0.59204054", "0.5903432", "0.5898372", "0.5886041", "0.5881315", "0.5873715", "0.58568764", "0.58519405", "0.5849396", "0.5848859", "0.58379406", "0.583553", "0.5830567", "0.58296365", "0.5815472", "0.5798795", "0.57582563", "0.57433456", "0.57353544", "0.5728822", "0.5709218", "0.5700778", "0.56814027", "0.5676698", "0.56751233", "0.56743336", "0.5673878", "0.56646836", "0.5659337", "0.5657744", "0.56526935", "0.5642633", "0.56392014", "0.563567", "0.56260717", "0.56185263", "0.560327", "0.55735683", "0.5566571", "0.55526763", "0.55449605", "0.55449605", "0.55337894", "0.5532667", "0.55302376", "0.55188984", "0.55104655", "0.54999226", "0.5499795", "0.546292", "0.5447236", "0.542395", "0.5414229", "0.54010475", "0.54007596", "0.53974545", "0.5394967", "0.53616065", "0.5360238", "0.5333403", "0.531881", "0.531573", "0.5315186", "0.5310089", "0.53059727", "0.5303077", "0.5276302", "0.52733016", "0.5272642", "0.5255862" ]
0.64164114
12
Changes the values of the matrix such that all values sum to 1, preserving the relative differences of the values
public void makeStochastic() { double sum = 0.0; for(T row : getFirstDimension()) { // sum all values for(T col : getMatches(row)) { if(get(row, col)!=null) { sum += get(row, col); } } } for(T row : getFirstDimension()) { // sum all values for(T col : getMatches(row)) { if(get(row, col)!=null) { set(row, col, get(row, col)/sum); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[][] updateMatrix(int[][] matrix) {\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) continue;\n matrix[i][j] = 10; // You can use any integer bigger than 1 except Integer.MAX_VALUE, overflow.\n if(i > 0) matrix[i][j] = Math.min(matrix[i - 1][j] + 1, matrix[i][j]);\n if(j > 0) matrix[i][j] = Math.min(matrix[i][j - 1] + 1, matrix[i][j]);\n }\n }\n\n for(int i = matrix.length - 1; i >= 0; i--) {\n for(int j = matrix[0].length - 1; j >= 0; j--) {\n if(i < matrix.length - 1) matrix[i][j] = Math.min(matrix[i + 1][j] + 1, matrix[i][j]);\n if(j < matrix[0].length - 1) matrix[i][j] = Math.min(matrix[i][j + 1] + 1, matrix[i][j]);\n }\n }\n return matrix;\n }", "private static void setMatrixOnes(int[][] matrix) {\n\n\t\tint row = matrix.length;\n\t\tint col = matrix[0].length;\n\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\n\t\tfor (int i = 0; i < row; i++) {\n\t\t\tfor (int j = 0; j < col; j++) {\n\n\t\t\t\t/* next two if conditions take special care for first row and first column */\n\n\t\t\t\t/* Scan the first row and set a variable rowFlag to indicate whether we need to set all 1s in first row or not. */\n\t\t\t\tif (i == 0 && matrix[i][j] == 1) {\t/* if any values in first row is 1, set rowFlag true */\n\t\t\t\t\trowFlag = true;\n\t\t\t\t}\n\n\t\t\t\t/* Scan the first column and set a variable colFlag to indicate whether we need to set all 1s in first column or not. */\n\t\t\t\tif (j == 0 && matrix[i][j] == 1) {\t/* if any values in first col is 1, set colFlag true */\n\t\t\t\t\tcolFlag = true;\n\t\t\t\t}\n\n\t\t\t\t/* Use first row and first column as the auxiliary arrays row[] and col[] respectively,\n\t\t\t\t * consider the matrix as sub matrix starting from second row and second column\n\t\t\t\t * */\n\t\t\t\tif (matrix[i][j] == 1) {\n\t\t\t\t\tmatrix[0][j] = 1;\n\t\t\t\t\tmatrix[i][0] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Modify the given input matrix using the first row and first column of this matrix itself */\n\t\tfor (int i = 1; i < row; i++) {\n\t\t\tfor (int j = 1; j < col; j++) {\n\t\t\t\tif (matrix[0][j] == 1 || matrix[i][0] == 1) {\n\t\t\t\t\tmatrix[i][j] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* modify first row if there was any 1 */\n\t\tif (rowFlag) {\n\t\t\tfor (int j = 0; j < col; j++) {\n\t\t\t\tmatrix[0][j] = 1;\n\t\t\t}\n\t\t}\n\n\t\t/* modify first col if there was any 1 */\n\t\tif (colFlag) {\n\t\t\tfor (int i = 0; i < row; i++) {\n\t\t\t\tmatrix[i][0] = 1;\n\t\t\t}\n\t\t}\n\n\t\tprintTheMatrix(matrix);\n\t}", "private void reduceMatrix( final double[][] matrix )\n\t{\n\n\t\tfor ( int i = 0; i < matrix.length; i++ )\n\t\t{\n\n\t\t\t// find the min value in the row\n\t\t\tdouble minValInRow = Double.MAX_VALUE;\n\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t{\n\t\t\t\tif ( minValInRow > matrix[ i ][ j ] )\n\t\t\t\t{\n\t\t\t\t\tminValInRow = matrix[ i ][ j ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// subtract it from all values in the row\n\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t{\n\t\t\t\tmatrix[ i ][ j ] -= minValInRow;\n\t\t\t}\n\t\t}\n\n\t\tfor ( int i = 0; i < matrix[ 0 ].length; i++ )\n\t\t{\n\t\t\tdouble minValInCol = Double.MAX_VALUE;\n\t\t\tfor ( int j = 0; j < matrix.length; j++ )\n\t\t\t{\n\t\t\t\tif ( minValInCol > matrix[ j ][ i ] )\n\t\t\t\t{\n\t\t\t\t\tminValInCol = matrix[ j ][ i ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( int j = 0; j < matrix.length; j++ )\n\t\t\t{\n\t\t\t\tmatrix[ j ][ i ] -= minValInCol;\n\t\t\t}\n\n\t\t}\n\n\t}", "static void update(int[][] matrix){\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\t\tint n = matrix.length;\n int m = matrix[0].length;\n for(int i=0;i<n;i++){\n for(int j=0;j<m;j++){\n if(i==0 && matrix[i][j]==0){\n rowFlag =true;\n }\n if(j==0 && matrix[i][j]==0){\n colFlag = true;\n }\n if(matrix[i][j]==0){\n matrix[0][j] = 0;\n matrix[i][0] = 0;\n }\n }\n }\n for(int i=1;i<n;i++){\n for(int j=1;j<m;j++){\n if(matrix[i][0]==0||matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n if(rowFlag){\n for(int i=0;i<m;i++){\n matrix[0][i] =0 ;\n }\n }\n if(colFlag){\n for(int j=0;j<n;j++){\n matrix[j][0] = 0;\n }\n }\n\n\t}", "public static void normalize()\n {\n int sum;\n\n for(int i=0;i<12;i++)\n {\n for(int j=0;j<12;j++) {\n sum = sumAll(i,j);\n if (sum != 0)\n for (int n = 0; n < 12; n++)\n weights[i][j][n] /= sum;\n }\n }\n }", "static void reducedSingular (double[][] S, int p)\n {\n\tfor (int i=p; i<S.length; i++) {\n\t S[i][i] = 0;\n\t}\n }", "protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }", "public void setZeroes1(int[][] matrix) {\n boolean col00 = false;\n\n int row, col;\n int rows = matrix.length;\n int cols = matrix[0].length;\n for (row = 0; row < rows; ++row) {\n for (col = 0; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n if (col != 0) {\n matrix[0][col] = 0;\n matrix[row][0] = 0;\n } else {\n col00 = true;\n }\n }\n }\n }\n for (row = rows - 1; row >= 0; --row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][0] == 0 || matrix[0][col] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (col00) {\n for (row = rows - 1; row >= 0; --row) {\n matrix[row][0] = 0;\n }\n }\n }", "public double l1_norm()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += Math.abs(c);\r\n\r\n return sum;\r\n }", "public void invert() {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n Double sim = get(first, second);\n \n if(sim!=null && sim > 0.0) {\n set(first, second, 1.0/sim);\n }\n \n }\n \n }\n }", "public void update(int row, int col, int val) {\n int n = matrix[0].length;\n \n for(int i = col; i < n; i++){\n rowSums[row][i] = rowSums[row][i] - matrix[row][col] + val;\n }\n\n matrix[row][col] = val;\n }", "public static void betterApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\tboolean auxR[] = new boolean[m];\n\t\tboolean auxC[] = new boolean[n];\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tauxR[i] = false;\n\t\t}\n\t\t\n\t\tfor(int j = 0;j<n;j++){\n\t\t\tauxC[j] = false;\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tauxR[i] = true;\n\t\t\t\t\tauxC[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(auxR[i] == true || auxC[j] == true){\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void SetMatrixToOnes() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 1;\tthis.mat_f_m[0][2] = 1;\t this.mat_f_m[0][3] = 1;\n\tthis.mat_f_m[1][0] = 1;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 1;\t this.mat_f_m[1][3] = 1;\n\tthis.mat_f_m[2][0] = 1;\t this.mat_f_m[2][1] = 1;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 1;\n\tthis.mat_f_m[3][0] = 1;\t this.mat_f_m[3][1] = 1;\tthis.mat_f_m[3][2] = 1;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public static void plus1(int[]arr)\r\n\t{\r\n\t\tint i=arr.length-1;\r\n\t\twhile(i>=0&&arr[i]==1)\r\n\t\t\tarr[i--]=0;\r\n\t\tif(i>=0)\r\n\t\t\tarr[i]=1;\r\n\t}", "int absoluteValuesSumMinimization(int[] a) {\n return a[(a.length-1)/2];\n }", "public double oneNorm(){\r\n \tdouble norm = 0.0D;\r\n \tdouble sum = 0.0D;\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tsum+=Math.abs(this.matrix[i][j]);\r\n \t\t}\r\n \t\tnorm=Math.max(norm,sum);\r\n \t}\r\n \treturn norm;\r\n \t}", "public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }", "public static void bestApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\t\n\t\t//Taking two variables for storing status of first row and column\n\t\tboolean firstRow = false;\n\t\tboolean firstColumn = false;\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tif(i == 0) firstRow == true;\n\t\t\t\t\tif(j == 0) firstColumn == true;\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 1;i<m;i++){\n\t\t\t\n\t\t\tfor(int j = 1;j<n;j++){\n\t\t\t\t//based on first row and first column making the entire column and row as zero\n\t\t\t\tif(matrix[0][j] == 0 || matrix[i][0] == 0){\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Making every column value to 0 in first row\n\t\tif(firstRow){\n\t\t\t\n\t\t\tfor(int j = 0;j <n;j++){\n\t\t\t\tmatrix[0][j] = 0;\n\t\t\t}\n\t\t}\n\t\t//Making every row value to 0 in first column\n\t\tif(firstColumn){\n\t\t\t\n\t\t\tfor(int i = 0;i <m;i++){\n\t\t\t\tmatrix[i][0] = 0;\n\t\t\t}\n\t\t}\n\t}", "public void setZeroes(int[][] matrix) {\n if (matrix == null || matrix.length == 0) {\n return;\n }\n int[] m = new int[matrix.length];\n int[] n = new int[matrix[0].length];\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) {\n m[i]++;\n n[j]++;\n }\n }\n }\n for (int i = 0; i < m.length; i++) {\n if (m[i] > 0) {\n Arrays.fill(matrix[i], 0);\n }\n }\n for (int j = 0; j < n.length; j++) {\n if (n[j] > 0) {\n for (int k = 0; k < matrix.length; k++) {\n matrix[k][j] = 0;\n }\n }\n }\n }", "private void normalize(DMatrixRMaj M) {\n double suma=0;\n Equation eq = new Equation();\n eq.alias(M, \"M\");\n eq.alias(suma,\"s\");\n\n// for (int i=0;i<M.numRows;i++) {\n// for (int j = 0; j < M.numCols; j++) {\n// eq.alias(i, \"i\");\n// eq.alias(j, \"j\");\n// eq.process(\"s = s + M(i,j)\");\n//// suma = suma + M.get(i,j);\n// }\n// }\n// for (int i=0;i<M.numRows;i++){\n// for (int j=0;j<M.numCols;j++){\n//// eq.alias(i,\"i\");\n//// eq.alias(j,\"j\");\n//// eq.process(\"s = s + M(i,j)\");\n// M.set(i,j,M.get(i,j)/suma);\n// }\n for(int i=0; i < M.numRows; i++){\n eq.alias(i, \"i\");\n //eq.process(\"M(i,:) = exp(M(i,:) - max(M(i,:)))\"); // to prevent high values in exp(M)\n //eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n// eq.process(\"M(i,:) = M(i,:) / s\");\n }\n }", "private static double[] normalize(double[] data)\n {\n double sum = 0;\n \n for (double d : data)\n sum += d;\n \n if (sum != 1 && sum != 0)\n {\n for (int i = 0; i < data.length; i++)\n data[i] /= sum;\n }\n \n return data;\n }", "public void timesEquals(double constant){\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tthis.matrix[i][j] *= constant;\r\n \t\t}\r\n \t}\r\n \t}", "public static int[] reduce (int []n1) {\n\t\tfor (int i = 0; i < n1.length; i++) {\n\t\t\tif (n1[i] != 0) {\n\t\t\t\tif (i == 0) return copy(n1);\n\t\t\t\t\n\t\t\t\tint []newVal = new int[n1.length-i];\n\t\t\t\textract(newVal,0,n1,i,n1.length-i);\n\t\t\t\treturn newVal;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// just zero.\n\t\treturn new int[]{0};\n\t}", "public void setZeroes_ok(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\n\t\tif (m == 1) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[0][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\t\tmatrix[0][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (n == 1) {\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tif (matrix[i][0] == 0) {\n\t\t\t\t\tfor (int k = 0; k < m; k++) {\n\t\t\t\t\t\tmatrix[k][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint idx = 0;\n\t\tboolean[][] visit = new boolean[m][n];\n\t\twhile (idx <= m * n - 1) {\n\t\t\tint i = idx / n;\n\t\t\tint j = idx % n;\n\t\t\tif (i < m && j < n && matrix[i][j] == 0 && visit[i][j] == false) {\n\t\t\t\t// set whole row to 0\n\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\tif (matrix[i][k] != 0) {\n\t\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t\t\tvisit[i][k] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set whole col to 0\n\t\t\t\tfor (int l = 0; l < m; l++) {\n\t\t\t\t\tif (matrix[l][j] != 0) {\n\t\t\t\t\t\tmatrix[l][j] = 0;\n\t\t\t\t\t\tvisit[l][j] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t}", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "public void matrizInversa(){\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n //System.out.println(\"\");getDeter();\n getMatriz()[i][j] = getMatrizAdjunta()[i][j]/getDeter();\n }\n }\n mostrarMatriz(getMatriz(),\"Matriz inversa\");\n }", "private Matrix gaussianEliminate(){\r\n\t\t//Start from the 0, 0 (top left)\r\n\t\tint rowPoint = 0;\r\n\t\tint colPoint = 0;\r\n\t\t// instantiate the array storing values for new Matrix\r\n\t\tDouble[][] newVal = deepCopy(AllVal);\r\n\t\twhile (rowPoint < row && colPoint < col) {\r\n\t\t\t// find the index with max number (absolute value) from rowPoint to row\r\n\t\t\tDouble max = Math.abs(newVal[rowPoint][colPoint]);\r\n\t\t\tint index = rowPoint;\r\n\t\t\tint maxindex = rowPoint;\r\n\t\t\twhile (index < row) {\r\n\t\t\t\tif (max < Math.abs(newVal[index][colPoint])) {\r\n\t\t\t\t\tmax = newVal[index][colPoint];\r\n\t\t\t\t\tmaxindex = index;\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t\t// if max is 0 then that must mean there are no pivots\r\n\t\t\tif (max == 0) {\r\n\t\t\t\tcolPoint++;\r\n\t\t\t}else {\r\n\t\t\t\t//TODO: refactor into method\r\n\t\t\t\tDouble[] Temp = newVal[rowPoint];\r\n\t\t\t\tnewVal[rowPoint] = newVal[maxindex];\r\n\t\t\t\tnewVal[maxindex] = Temp;\r\n\t\t\t\t// Fill 0 lower part of pivot\r\n\t\t\t\tfor(int lower = rowPoint + 1; lower < row; lower++) {\r\n\t\t\t\t\tDouble ratio = newVal[lower][colPoint]/newVal[rowPoint][colPoint];\r\n\t\t\t\t\tnewVal[lower][colPoint] = (Double) 0.0;\r\n\t\t\t\t\t// adjust for the remaining element\r\n\t\t\t\t\tfor (int remain = colPoint + 1; remain < col; remain++) {\r\n\t\t\t\t\t\tnewVal[lower][remain] = newVal[lower][remain] - newVal[lower][remain]*ratio;\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\trowPoint++;\r\n\t\t\t\tcolPoint++;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Matrix(newVal);\r\n\t}", "public int[][] removeOne(int[][] matrix, int x, int y) {\n while(x < matrix.length){\n if(matrix[x][y] == 1)\n matrix[x][y] = 0;\n x++;\n }\n return matrix;\n }", "public R1toConstantMatrix(Matrix A) {\n this.A = new ImmutableMatrix(A);\n }", "public static Matrix sinc(Matrix matrix)\n {\n double[][] M = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n if (M[i][j] == 0.0d)\n {\n C[i][j] = 1.0;\n }\n else\n {\n C[i][j] = Math.sin(M[i][j]) / M[i][j];\n }\n }\n }\n return X;\n }", "public void correctWeights() {\n double tmp;\n\n for(int i = 0; i < inputs; ++i) {\n //temporary store old value\n tmp = weights[i];\n // correct weight's value using MOMENTUM parameter\n weights[i] += changes[i] + MOMENTUM * (weights[i] - exWeights[i]);\n //store old value in class member\n exWeights[i] = tmp;\n // clear corrections value\n changes[i] = 0.0;\n }\n\n // const input weight correction if const input is enabled\n if (enableConstAddend) {\n // temporary store old value\n tmp = weights[inputs];\n // change weight's value using MOMENTUM parameter\n weights[inputs] += changes[inputs] + MOMENTUM * (weights[inputs] - exWeights[inputs]);\n // store old value\n exWeights[inputs] = tmp;\n // clear value of calculated change\n changes[inputs] = 0.0;\n }\n }", "public void plusEquals(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tthis.matrix[i][j] += bmat.matrix[i][j];\r\n\t \t}\r\n \t}\r\n \t}", "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "public double negativeElementsSum(double[] arr) {\n return 0;\n }", "private void reduce(){\n int min;\n //Subtract min value from rows\n for (int i = 0; i < rows; i++) {\n min = source[i][0];\n for (int j = 1; j < cols; j++)\n if(source[i][j] < min) min = source[i][j];\n\n for (int j = 0; j < cols; j++)\n source[i][j] -= min;\n }\n\n //Subtract min value from cols\n for (int j = 0; j < cols; j++) {\n min = source[0][j];\n for (int i = 1; i < rows; i++)\n if(source[i][j] < min) min = source[i][j];\n\n for (int i = 0; i < rows; i++)\n source[i][j] -= min;\n\n }\n }", "public static void gaussElimination(Matriks m) {\n swapCount = 0;\n constant = 1;\n\n if (m.baris > m.kolom-1) {\n m.baris = m.kolom-1;\n }\n\n for (int iBrs = 0; iBrs < m.baris; iBrs++) {\n int iKol = iBrs;\n while (allElmtColUnderIs0(m,iBrs,iKol) && (iKol<m.kolom-1)) {\n iKol++;\n }\n if (m.ELMT[iBrs][iKol] == 0) {\n orderRow(m, iBrs, iKol);\n }\n // mengubah elemen baris dibawah berdasar baris-iBrs (referensi)\n if (!((iKol==m.kolom-1) && allElmtColUnderIs0(m,iBrs,iKol))) {\n // jika sudah di kolom terakhir dan elemen kolomnya kebawah adalah 0\n // maka tidak perlu dievaluasi lagi ntuk menghindari NaN\n for (int j = iBrs+1; j<m.baris; j++) {\n double coeff = m.ELMT[j][iKol]/m.ELMT[iBrs][iKol];\n for (int k=iKol; k<m.kolom; k++) {\n m.ELMT[j][k] -= m.ELMT[iBrs][k] * coeff;\n }\n }\n }\n }\n\n // Membuat leading one tiap baris (jika elemen baris tidak all 0)\n for(int i=0; i<m.baris; i++) {\n if (!allElmtRowIs0(m, i)) {\n int iLead=0;\n while (iLead<m.kolom && m.ELMT[i][iLead]==0) {\n iLead++;\n }\n double factor = m.ELMT[i][iLead];\n constant /= factor;\n for (int j=iLead; j<m.kolom; j++) {\n if (m.ELMT[i][j] != 0) {\n m.ELMT[i][j] /= factor;\n }\n }\n }\n }\n //displayMatrix(m);\n }", "protected static double seqArraySum(final double[] input) {\n double sum = 0;\n\n // Compute sum of reciprocals of array elements\n for (int i = 0; i < input.length; i++) {\n sum += 1 / input[i];\n }\n\n return sum;\n }", "public void permutate(double[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "private double[][] normalize255(RealMatrix realMatrix) {\n\t\tdouble[][] input = realMatrix.getData();\n\t\tdouble[][] normalized = new double[realMatrix.getRowDimension()][realMatrix.getColumnDimension()];\n\t\tdouble minimum = 99999.99;\n\t\tdouble maximum = -9999.99;\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tminimum = Math.min(minimum, input[i][j]);\n\t\t\t\tmaximum = Math.max(maximum, input[i][j]);\n\t\t\t}\n\t\t}\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tnormalized[i][j] = ((input[i][j] - minimum)*(255/(maximum-minimum)));\n\t\t\t}\n\t\t}\n\t\treturn normalized;\n\t}", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "public static void bruteForceSolution(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\t\n\t\tint aux[][] = new int [m][n];\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\taux[i][j] = 1;\n\t\t\t}\n\t\t}\n\t\t// if found 0 in main array making row and column in the auxilary row and column as 0\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\t\n\t\t\t\t\tfor(int k = 0;k<m;k++){\n\t\t\t\t\t\taux[k][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 0;k<n;k++){\n\t\t\t\t\t\taux[i][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//copying elements back to main array\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tmatrix[i][j] = aux[i][j];\n\t\t\t}\n\t\t}\n\t}", "public static double[] Jordan(Matriks M) {\r\n int i, j, k = 0, c;\r\n int flag = 0;\r\n int n = M.BrsEff; \r\n\t\tdouble[][] a = new double[n][n+1];\r\n\t\tdouble[] x;\r\n \r\n for (i = 0; i < M.BrsEff; i++){\r\n for (j = 0; j < M.KolEff; j++){\r\n a[i][j] = M.Elmt[i][j];\r\n }\r\n }\r\n\r\n for (i = 0; i < n; i++){ \r\n if (a[i][i] == 0){ \r\n c = 1; \r\n while ((i + c) < n && a[i + c][i] == 0){ \r\n c++;\r\n } \r\n if ((i + c) == n){\r\n flag = 1; \r\n break; \r\n }\r\n for (j = i, k = 0; k <= n; k++){\r\n double temp =a[j][k]; \r\n a[j][k] = a[j+c][k]; \r\n a[j+c][k] = temp; \r\n }\r\n } \r\n \r\n for (j = 0; j < n; j++){ \r\n if (i != j){ \r\n double p = a[j][i] / a[i][i];\r\n for (k = 0; k <= n; k++){ \r\n a[j][k] = a[j][k] - (a[i][k]) * p;\r\n } \r\n } \r\n } \r\n }\r\n for (i = 0; i < M.BrsEff; i++){\r\n if ((a[i][i]!=0) && (a[i][i]!=1)){\r\n for (j = i; j < M.KolEff; j++){\r\n M.Elmt[i][j] = a[i][j] / a[i][i];\r\n }\r\n }\r\n }\r\n if (flag == 1){\r\n flag = 3;\r\n \t for (i = 0; i < n; i++) { \r\n \t double sum = 0; \r\n \t for (j = 0; j < n; j++){ \r\n \t sum = sum + M.Elmt[i][j]; \r\n \t }\r\n \t if (sum == M.Elmt[i][n]) { \r\n \t flag = 2; \r\n \t }\r\n \t }\r\n \t if (flag == 3){\r\n \t x = new double[n+3];\r\n for (i = 0; i < n; i++){\r\n x[i] = 0;\r\n }\r\n \t }\r\n \t else {\r\n \t x = new double[n+2];\r\n for (i = 0; i < n; i++){\r\n x[i] = 0;\r\n }\r\n \t }\r\n }\r\n else{\r\n x = new double[n];\r\n for (i = 0; i < n; i++){\r\n x[i] = a[i][M.KolEff-1] / a[i][i];\r\n }\r\n }\r\n return x;\r\n }", "private void sigmoid(double[][] matrix) {\n\t\t// Sigmoid function:\n\t\t// = 1/(1+e^(-(inputs.weights)))\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\t\tmatrix[i][j] = 1.0 / (1.0 + Math.exp(-matrix[i][j]));\n\t\t\t}\n\t\t}\n\t}", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "private static void changeSubMatrix(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++){\n if(matrix[i][0]==0 || matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n }", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}", "public boolean isSumEquals1() throws InvalidProbabilityRangeException {\r\n//\t\t\tif (!isToNormalize()) {\r\n//\t\t\t\treturn true;\t// just return a default value if we don't need normalization\r\n//\t\t\t}\r\n\t\t\tfloat value = this.getProbCellSum();\r\n\t\t\t// (this.leastCellValue/2) is the error margin\r\n\t\t\tif ( (value >= 1f - (this.leastCellValue/2f)) && (value <= 1f + (this.leastCellValue/2f)) ) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "void patchArray(long array[][], long scale)\n {\n // patch all numbers up by 100 to keep the order but to rid the negative\n // numbers\n for (int i = 0; i < array.length; i++)\n {\n array[i][0] += scale;\n array[i][1] += scale;\n }\n }", "private static int[][] updateTTT(int[][] ttt) {\n\t\t\n\t\t\n\t\tfor (int i = 0; i<ttt.length;i++){\n\t\t\tfor (int j = 0; j<ttt[i].length;j++){\n\t\t\t\tif (ttt[i][j]==0){\n\t\t\t\t\t\n\t\t\t\t\tchangeValuesTTT(ttt, i, j);\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i<ttt.length;i++){\n\t\t\tfor (int j = 0; j<ttt[i].length;j++){\n\t\t\t\tif (ttt[i][j]==-1){\n\t\t\t\t\t\n\t\t\t\t\tttt[i][j]=0;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn ttt;\n\t}", "public void antiderivative (double constant) {\n // do last index first since it requires adding a term to the list\n int size = myCoefficients.size();\n double last = myCoefficients.get(size - 1) / (size);\n\n for (int i = myCoefficients.size() - 2; i >= 0; --i) {\n myCoefficients.set(i + 1, myCoefficients.get(i) / (i + 1));\n }\n myCoefficients.set(0, constant);\n myCoefficients.add(last);\n }", "public void resetChangeableArrays(int[] reg)\n {\n valList = new LinkedList<Integer>();\n possibilityList = new LinkedList<Point>();\n for(int j = 0; j<accumulator.length; j ++)Arrays.fill(accumulator[j],0);\n //accumulator = zeroAccumulator;\n region = reg;\n \n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public void setZeroes(int[][] matrix) {\n\t\t\tint m = matrix.length;\n\t\t\tint n = matrix[0].length;\n\t\t\t\n\t\t\tboolean fc = false, fr = false; // first row, first column as markers\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (matrix[i][j] == 0) {\n\t\t\t\t\t\tif (i == 0) fr = true;\n\t\t\t\t\t\tif (j == 0) fc = true;\n\t\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 1; i < m; i++) {\n\t\t\t\tfor (int j = 1; j < n; j++) {\n\t\t\t\t\tif (matrix[0][j] == 0 || matrix[i][0] == 0) {\n\t\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fr) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fc) {\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected void updateArrayBySumOfElements(int arr[], int n) { \n\n\t\tif (n <= 1) { \n\t\t return; \n\t\t} \n\t\tint prev = arr[0]; \n\t\tarr[0] = arr[0] + arr[1]; \n \n\n \tfor (int i = 1; i < n - 1; i++) { \n \t\tint curr = arr[i]; \n \t\tarr[i] = prev + arr[i + 1]; \n \t\tprev = curr; \n \t} \n \tarr[n - 1] = prev + arr[n - 1]; \n\t}", "static private double[][] initMatrix(double[][] c) {\n final int N = c.length;\n final double value = 1 / Math.sqrt(2.0);\n\n for (int i = 1; i < N; i++) {\n for (int j = 1; j < N; j++) {\n c[i][j] = 1;\n }\n }\n\n for (int i = 0; i < N; i++) {\n c[i][0] = value;\n c[0][i] = value;\n }\n c[0][0] = 0.5;\n return c;\n }", "public void permutate(float[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public static void solution1(int[][] grid) {\n int M = grid.length;\n int N = grid[0].length;\n\n // Loop through 2-d grid to figure out which rows & columns have a 0\n boolean[] rows = new boolean[M];\n boolean[] cols = new boolean[N];\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (grid[row][col] == 0) {\n rows[row] = true;\n cols[col] = true;\n }\n }\n }\n\n // Re-loop through 2-d matrix and set whichever entries are necessary to 0\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (rows[row] == true || cols[col] == true) {\n grid[row][col] = 0;\n }\n }\n }\n }", "public static Matrix cosh(Matrix matrix)\n {\n double[][] M = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double val = 1.0;\n double[][] C = X.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n val = Math.exp(M[i][j]);\n val = 0.5 * (val + 1 / val);\n C[i][j] = val;\n }\n }\n return X;\n }", "@Override\n\tpublic int[][] computeAssignments( final double[][] matrix )\n\t{\n\t\tfinal int nlines = matrix.length;\n\t\tif ( nlines == 0 )\n\t\t{\n\t\t\t// no spot\n\t\t\treturn new int[][] { {} };\n\t\t}\n\t\tfinal int ncols = matrix[ 0 ].length;\n\t\tif ( nlines <= 1 && ncols <= 1 )\n\t\t\treturn new int[][] { {} };\n\n\t\t// subtract minimum value from rows and columns to create lots of zeroes\n\t\treduceMatrix( matrix );\n\n\t\t// non negative values are the index of the starred or primed zero in\n\t\t// the row or column\n\t\tfinal int[] starsByRow = new int[ matrix.length ];\n\t\tArrays.fill( starsByRow, -1 );\n\t\tfinal int[] starsByCol = new int[ matrix[ 0 ].length ];\n\t\tArrays.fill( starsByCol, -1 );\n\t\tfinal int[] primesByRow = new int[ matrix.length ];\n\t\tArrays.fill( primesByRow, -1 );\n\n\t\t// 1s mean covered, 0s mean not covered\n\t\tfinal int[] coveredRows = new int[ matrix.length ];\n\t\tfinal int[] coveredCols = new int[ matrix[ 0 ].length ];\n\n\t\t// star any zero that has no other starred zero in the same row or\n\t\t// column\n\t\tinitStars( matrix, starsByRow, starsByCol );\n\t\tcoverColumnsOfStarredZeroes( starsByCol, coveredCols );\n\n\t\twhile ( !allAreCovered( coveredCols ) )\n\t\t{\n\n\t\t\tint[] primedZero = primeSomeUncoveredZero( matrix, primesByRow, coveredRows, coveredCols );\n\n\t\t\twhile ( primedZero == null )\n\t\t\t{\n\t\t\t\t// keep making more zeroes until we find something that we can\n\t\t\t\t// prime (i.e. a zero that is uncovered)\n\t\t\t\tmakeMoreZeroes( matrix, coveredRows, coveredCols );\n\t\t\t\tprimedZero = primeSomeUncoveredZero( matrix, primesByRow, coveredRows, coveredCols );\n\t\t\t}\n\n\t\t\t// check if there is a starred zero in the primed zero's row\n\t\t\tfinal int columnIndex = starsByRow[ primedZero[ 0 ] ];\n\t\t\tif ( -1 == columnIndex )\n\t\t\t{\n\n\t\t\t\t// if not, then we need to increment the zeroes and start over\n\t\t\t\tincrementSetOfStarredZeroes( primedZero, starsByRow, starsByCol, primesByRow );\n\t\t\t\tArrays.fill( primesByRow, -1 );\n\t\t\t\tArrays.fill( coveredRows, 0 );\n\t\t\t\tArrays.fill( coveredCols, 0 );\n\t\t\t\tcoverColumnsOfStarredZeroes( starsByCol, coveredCols );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t// cover the row of the primed zero and uncover the column of\n\t\t\t\t// the starred zero in the same row\n\t\t\t\tcoveredRows[ primedZero[ 0 ] ] = 1;\n\t\t\t\tcoveredCols[ columnIndex ] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// ok now we should have assigned everything\n\t\t// take the starred zeroes in each column as the correct assignments\n\n\t\tfinal int[][] retval = new int[ matrix.length ][];\n\t\tfor ( int i = 0; i < starsByCol.length; i++ )\n\t\t{\n\t\t\tretval[ i ] = new int[] { starsByCol[ i ], i };\n\t\t}\n\t\treturn retval;\n\n\t}", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "private static void changeValuesTTT(int[][] ttt, int i, int j) {\n\t\tfor (int k = 0; k<ttt[i].length;k++){\n\t\t\tttt[i][k]=ttt[i][k]==0?0:-1;\n\t\t\t\n\t\t\t}\n\t\t\n\n\t\tfor (int l = 0; l<ttt.length;l++){\n\t\t\tttt[l][j]=ttt[l][j]==0?0:-1;\n\t\t\t\n\t\t}\n\t}", "public void identity(){\n for (int j = 0; j<4; j++){\n \tfor (int i = 0; i<4; i++){\n \t\tif (i == j)\n \t\t\tarray[i][j] = 1;\n \t\telse\n \t\t\tarray[i][j] = 0;\n \t }\n \t }\n\t}", "float DetGauss(Matrix m){\r\n Matrix mtemp = new Matrix(m.M);\r\n float hasil=1;\r\n int count = 0;\r\n int swap = -1;\r\n for(int i=0;i<mtemp.rows-1;i++){\r\n for(int j=i+1; j<mtemp.rows; j++){\r\n if(mtemp.M[i][i]<mtemp.M[j][i]){\r\n count++;\r\n swapRow(mtemp,i,j);\r\n\r\n }\r\n }\r\n for(int k=i+1; k<mtemp.rows; k++){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=0;j<mtemp.cols;j++){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n for(int i=0; i<mtemp.rows; i++){\r\n hasil *= mtemp.M[i][i];\r\n }\r\n if(count==0){\r\n swap = 1;\r\n }else{\r\n for(int i=1; i<count; i++){\r\n swap = swap * (-1);\r\n }\r\n }\r\n return hasil*swap;\r\n }", "private static void changeFirstRowAndColumn(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++) {\n if(matrix[i][j]==0){\n matrix[i][0]=0;\n matrix[0][j]=0;\n }\n }\n }\n }", "private static void normalize(boolean[][] robot) {\n int n = robot.length;\n for (int i = 1; i < n; i++) {\n robot[i][i] = false;\n }\n for (int i = 1; i < n; i++) {\n normalize(robot, i);\n }\n }", "private void makeMoreZeroes( final double[][] matrix, final int[] coveredRows, final int[] coveredCols )\n\t{\n\t\tdouble minUncoveredValue = Double.MAX_VALUE;\n\t\tfor ( int i = 0; i < matrix.length; i++ )\n\t\t{\n\t\t\tif ( 0 == coveredRows[ i ] )\n\t\t\t{\n\t\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t\t{\n\t\t\t\t\tif ( 0 == coveredCols[ j ] && matrix[ i ][ j ] < minUncoveredValue )\n\t\t\t\t\t{\n\t\t\t\t\t\tminUncoveredValue = matrix[ i ][ j ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add the min value to all covered rows\n\t\tfor ( int i = 0; i < coveredRows.length; i++ )\n\t\t{\n\t\t\tif ( 1 == coveredRows[ i ] )\n\t\t\t{\n\t\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t\t{\n\t\t\t\t\tmatrix[ i ][ j ] += minUncoveredValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// subtract the min value from all uncovered columns\n\t\tfor ( int i = 0; i < coveredCols.length; i++ )\n\t\t{\n\t\t\tif ( 0 == coveredCols[ i ] )\n\t\t\t{\n\t\t\t\tfor ( int j = 0; j < matrix.length; j++ )\n\t\t\t\t{\n\t\t\t\t\tmatrix[ j ][ i ] -= minUncoveredValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void add(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] += skalar;\r\n }\r\n }\r\n }", "private void reset(double[][] distTo) {\n /**\n *reset all the values to maxvalue.\n */\n for (int i = 0; i < distTo.length; i++) {\n for (int j = 0; j < distTo[i].length; j++) {\n distTo[i][j] = Double.MAX_VALUE;\n }\n }\n }", "private void scaleToPositive() {\r\n // Obtain min value\r\n double minScalarization = Double.MAX_VALUE;\r\n for (S solution : solutions()) {\r\n if (scalarization.getAttribute(solution) < minScalarization) {\r\n minScalarization = scalarization.getAttribute(solution);\r\n }\r\n }\r\n if (minScalarization < 0) {\r\n // Avoid scalarization values of 0\r\n double eps = 10e-6;\r\n for (S solution : solutions()) {\r\n scalarization.setAttribute(solution, eps + scalarization.getAttribute(solution) + minScalarization);\r\n }\r\n }\r\n }", "protected void expand() {\n matrix = matrix.power(e);\n }", "@Override\n\tpublic void algorithm() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\t\n\t\tint change = 2;\n\t\t\n\t\tfor(int i=0; i<this.getGridGame().getGridRow(); i++) {\n\t\t\t\n\t\t\tfor(int j=0; j<this.getGridGame().getGridCol(); j++) {\n\t\t\t\t\n\t\t\t\tif(j > 0 && j < this.getGridGame().getGridCol()) {\n\t\t\t\t\t\n\t\t\t\t\tif(this.getGridGame().getPattern(i,j-1) != this.getGridGame().getPattern(i,j)) {\n\t\t\t\t\t\n\t\t\t\t\t\tchange--;\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\t\n\t\t\t\tif(change > 0) {\n\t\t\t\t\t\n\t\t\t\t\tthis.getArray()[i][0] += this.getGridGame().getPattern(i,j);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tthis.getArray()[i][1] += this.getGridGame().getPattern(i,j);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(change + \" \");\n\t\t\tchange = 2;\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=0; i<this.getGridGame().getGridRow(); i++) {\n\t\t\t\n\t\t\tif(this.getArray()[i][1] == 0) {\n\t\t\t\t\n\t\t\t\tthis.getArray()[i][1] = this.getArray()[i][0];\n\t\t\t\tthis.getArray()[i][0] = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=0; i<this.getGridGame().getGridRow(); i++) {\n\t\t\t\n\t\t\tfor(int j=0; j<2; j++) {\n\t\t\t\n\t\t\t\tSystem.out.print(this.getArray()[i][j] + \" \");\n\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t\t\n\t\t}\n\t\t\n\t\n\t}", "public int[] ZeroOutNegs(int[] arr) {\r\n for (int x = 0; x < arr.length; x++) {\r\n if (arr[x] < 0) {\r\n arr[x] = 0;\r\n }\r\n }\r\n return arr;\r\n }", "private double determinanteCuadrada(){\n\t\tdouble deter = 1;\n\t\tdouble [][] matriz = this.clone().getComponentes();\n\t\t\t\t\n\t\tfor(int i=0;i<this.dimensionCol;i++){\n\t\t\tif(matriz[i][i]==0){\n\t\t\t\tif(this.intercambiarConRenglonNoNuloPorDebajo(matriz, i)==true){\n\t\t\t\t\tdeter *= (-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.llevarACeroPosicionesPorDebajo(matriz, i);\n\t\t\tdeter*=matriz[i][i];\n\t\t}\n\t\t\t\t\n\t\treturn deter;\n\t}", "public void fillArrayWithNeg1(){\n\t\t\n\t\tArrays.fill(this.theArray, \"-1\");\n\t\t\n\t}", "@Override\n\tpublic double calculaDiagonal() {\n\t\treturn 0;\n\t}", "public static void normalization(double[] array)\r\n\t{\r\n\t\tdouble sum = Σ(array);\r\n\r\n\t\tif (sum == 0 || array.length == 0)\r\n\t\t\treturn;\r\n\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = array[i] / sum;\r\n\t}", "static void move_1 (int[] nums) {\n\t\t\n\t\tint j = 0;\n\t\t\n\t\t// Copy all non 0 numbs to start of arry \n\t\t// j will keep count of nums of zeros \n\t\tfor(int i=0; i< nums.length; i++) {\n\t\t\t\n\t\t\tif(nums[i] != 0) {\n\t\t\t\tnums[j] = nums[i];\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// add j number of zeros to end of array\n\t\tfor(int i=j ; i<nums.length; i++) {\n\t\t\t\n\t\t\tnums[i] = 0;\n\t\t}\n\t\t\n\t}", "public static int noDiagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i != j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public static void findMultipleDupes(int[] arr){\n\n for(int i : arr){\n \n if(arr[Math.abs(i)] > 0){\n arr[Math.abs(i)] = -arr[Math.abs(i)];\n }else\n System.out.println(Math.abs(i));\n }\n\n}", "public double [][] reduceVectors(RealMatrix inputMatrix) {\n double [][] d1 = inputMatrix.getData();\n double [][] outputArray = new double [d1.length][4];\n for (int i = 0; i < outputArray.length; i++) {\n for (int j = 0; j < outputArray[0].length; j++) {\n outputArray[i][j] = d1[i][j];\n }\n }\n return outputArray;\n }", "public void minusEquals(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tthis.matrix[i][j] -= bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \t}", "private void normalizePrior(NumericSequenceData prior) {\n double sum=0;\n int length=prior.getSize();\n for (int i=0;i<length;i++) {\n sum+=prior.getValueAtRelativePosition(i);\n }\n for (int i=0;i<length;i++) {\n double oldvalue=prior.getValueAtRelativePosition(i); \n //if (sum==0) prior.setValueAtRelativePosition(i,1.0/(double)length);\n if (sum==0) prior.setValueAtRelativePosition(i,0);\n else prior.setValueAtRelativePosition(i, oldvalue/sum);\n } \n }", "@Override\n Matrix applyAdjustment(final Matrix A, final double svAdjustment) {\n final Primitive64Store result\n = Primitive64Store.FACTORY.copy((Primitive64Store) A.getRawObject());\n svd(Matrix.wrap(result), true);\n\n for (int i = 0; i < (k_ - 1); ++i) {\n final double val = sv_[i];\n final double adjSV = Math.sqrt((val * val) + svAdjustment);\n S_.set(i, i, adjSV);\n }\n for (int i = k_ - 1; i < S_.countColumns(); ++i) {\n S_.set(i, i, 0.0);\n }\n\n S_.multiply(Vt_, result);\n\n return Matrix.wrap(result);\n }", "public void fixNumbers(){\n\t\tfor (int i = 0; i < size*size; i++){\n\t\t\tfor (int j = 0; j < size*size; j++){\n\t\t\t\tif (numbers[i][j] != 0)\n\t\t\t\t\tfixedNumbers[i][j] = true;\n\t\t\t}\n\t\t}\n\t}", "public void initial()\n\t{ \n\t\tint i,j; \n\t\tint tempValue=0;\n\t\tfor(i=0; i<n; i++) \n\t\t{ \n\t\t\tfor(j=0; j<n; j++)\n\t\t\t {\n\t\t\t\tif(j==0)\n\t\t\t\t{\n\t\t\t\t\ttempValue = cost[i][j];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(tempValue> cost[i][j])\n\t\t\t\t\t{\n\t\t\t\t\t\ttempValue = cost[i][j];\n\t\t\t\t\t}\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tfor (j=0; j<n;j++)\n\t\t\t{\n\t\t\t\tcost[i][j] = cost[i][j]- tempValue;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tfor(j=0;j<n;j++)\n\t\t{\n\t\t\tfor (i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tif(i==0)\n\t\t\t\t{\n\t\t\t\t\ttempValue = cost[i][j];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t if(tempValue> cost[i][j])\n\t\t\t\t {\n\t\t\t\t \ttempValue = cost[i][j];\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tcost[i][j] = cost[i][j] - tempValue;\n\t\t\t}\n\t\t}\t\n\t}", "public static MatrixAccumulator asSumAccumulator(double neutral) {\n return new SumMatrixAccumulator(neutral);\n }", "public double infinityNorm(){\r\n \tdouble norm = 0.0D;\r\n \tdouble sum = 0.0D;\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tsum+=Math.abs(this.matrix[i][j]);\r\n \t\t}\r\n \t\tnorm=Math.max(norm,sum);\r\n \t}\r\n \treturn norm;\r\n \t}", "private void convoluteMatrix(){\n\t\tDoubleFFT_2D fft = new DoubleFFT_2D(CELL_SIDE_COUNT,CELL_SIDE_COUNT);\n\t\tdouble[][] convolutedDoubles = Complex.complexToDoubleArray2D(convolutedMatrix);\n\t\tfft.complexForward(convolutedDoubles);\n\t\tconvolutedMatrix = Complex.doubleToComplexArray2D(convolutedDoubles); //F(B C F^-1(Q)) Pg. 182 Lee[05]\n\t}", "public int manhattan() {\n int sum = 0;\n for (int i = 0; i < blocks.length; i++){\n for (int j = 0; j < blocks.length; j++){\n int value = blocks[i][j];\n if (value == 0)\n continue;\n\n sum += Math.abs((value-1) / dimension() - i);\n sum += Math.abs((value-1) % dimension() - j);\n }\n }\n return sum;\n }", "public int matrixScore(int[][] A) {\n int n = A.length, m = A[0].length, ans = 0;\n for (int i = 0; i < n; ++i) {\n if (A[i][0] == 0) {\n flipRow(A, i);\n }\n }\n for (int j = 1; j < m; ++j) {\n int cnt = 0;\n for (int i = 0; i < n; ++i) {\n cnt += A[i][j];\n }\n if (cnt * 2 < n) {\n flipCol(A, j);\n }\n }\n for (int i = 0; i < n; ++i) {\n int cur = 0;\n for (int j = 0; j < m; ++j) {\n cur = (cur << 1) + A[i][j];\n }\n ans += cur;\n }\n return ans;\n}", "public int[][] zeroMatrix(int[][] matrix){\n\tboolean[][] zeros = new boolean[matrix.length][matrix[0].length];\n\tfor (int i = 0; i < matrix.length; i++){\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (matrix[i][j] == 0) zeros[i][j] = true;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < matrix.length; i++) {\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (zeros[i][j]){\n\t\t\t\tfor (int k = 0; k < matrix.length; k++){\n\t\t\t\t\tmatrix[k][j] = 0;\n\t\t\t\t}\n\t\t\t\tfor (int k = 0; k < matrix[0].length; k++){\n\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn matrix;\n}", "public static float different_same_sum(float x)\n\t{\n\n\t\tfloat forward_sum = 0;\n\t\tfloat backward_sum = 0;\n\n\t\tfor (float i = 1; i <= 100; i++)\n\t\t{\n\t\t\tforward_sum += ((float)Math.pow(x - 1f, i) * (float)Math.pow(-1f, i + 1f) / i);\n\t\t}\n\t\tfor (float i = 100; i >= 1; i--)\n\t\t{\n\t\t\tbackward_sum += ((float)Math.pow(x - 1f, i) * (float)Math.pow(-1f, i + 1f) / i);\n\t\t}\n\n\t\treturn forward_sum - backward_sum;\n\t\t/*\n\t\t * Da nur eine begrenzte Anzahl Nachkommastellen gespeichert werden kann gibt es\n\t\t * bei float-addition oft kleine Fehler, hier häufen sich diese Fehler an.\n\t\t * Aufgrund dieser Rundungsfehler spielt die Reihenfolge der Addition eine\n\t\t * Rolle, deswegen erhalten wir hier zwei verschiedene Ergebnise.\n\t\t */\n\t}", "public void setZeroes2(int[][] matrix) {\n boolean row00 = false;\n boolean col00 = false;\n\n int row = 0, col = 0;\n int rows = matrix.length;\n int cols = matrix[0].length;\n while (col < cols && !row00) {\n row00 = matrix[0][col++] == 0;\n }\n while (row < rows && !col00) {\n col00 = matrix[row++][0] == 0;\n }\n\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n matrix[row][0] = 0;\n matrix[0][col] = 0;\n }\n }\n }\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[0][col] == 0 || matrix[row][0] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (row00) {\n for (col = 0; col < cols; ++col) {\n matrix[0][col] = 0;\n }\n }\n if (col00) {\n for (row = 0; row < rows; ++row) {\n matrix[row][0] = 0;\n }\n }\n }", "public void matrixSetter(int i, int j, double v) {\n\t\t// Keep function invariant true\n\t\tassertInd(i,j);\n\n\t\ttry {\n\t\t\t// The range of value(colInd) = [start, end]\n\t\t\tint start = rowPtr.get(i);\n\t\t\tint end = rowPtr.get(j);\n\n\t\t\t// Flag: containing this value: 1; vice: 0\n\t\t\tboolean found = false;\n\n\t\t\t// Value(colInd) array's index for the to-be-set element\n\t\t\tint index = 0;\n\t\t\tfor(int k=start; k<end; k++) {\n\t\t\t\tif(j == colInd.get(k)) {\n\t\t\t\t\tindex = k;\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Update element(i, j), iff its original value != 0 (found in this sparse matrix): */\n\t\t\tif(found) {\n\t\t\t\t// Update element(i,j) with value v, when v != 0\n\t\t\t\tif(v != 0) {value.set(index, v);}\n\n\t\t\t\t// Set element(i,j) to 0, and update matrix's data structures, when v == 0\n\t\t\t\telse {\n\t\t\t\t\t//Delete from value[], and colInd[]\n\t\t\t\t\tvalue.remove(index);\n\t\t\t\t\tcolInd.remove(index);\n\n\t\t\t\t\t//Decrement what's after rowPtr[i+1] by 1\n\t\t\t\t\tfor(int k=i+1; i<rowPtr.size(); k++) {rowPtr.set(k, rowPtr.get(k) - 1);}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Insert new non-zero element(i,j), iff original value == 0 (not found):*/\n\t\t\telse {\n\t\t\t\tif(v!=0) {\n\t\t\t\t\t//Insert into value[], colInd:\n\t\t\t\t\tvalue.add(rowPtr.get(i), v);\n\t\t\t\t\tcolInd.add(rowPtr.get(i), j);\n\n\t\t\t\t\t//Increment rowPtr[i+1] and the elements after it:\n\t\t\t\t\tfor(int k=i+1; k<rowPtr.size(); k++) {rowPtr.set(k, rowPtr.get(k)+1);}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}catch(IndexOutOfBoundsException e) {\n\t\t\t// Insert new element into empty Sparse Matrix\n\t\t\tif(v!=0) {\n\t\t\t\t//Insert into value[], colInd[]:\n\t\t\t\tvalue.add(v);\n\t\t\t\tcolInd.add(j);\n\n\t\t\t\t//Increment rowPtr[r+1] and the elements after it:\n\t\t\t\tfor(int k=i+1; k<rowPtr.size(); k++) {rowPtr.set(k, rowPtr.get(k)+1);}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public static double sumMajorDiagonal(double[][] m) {\n double total = 0;\n for (int i = 0; i < m.length; i++) {\n total += m[i][i];\n }\n return total;\n }", "@Override\n\tpublic void abs1_m1() {\n\t\t\n\t}", "public final void normalize() {\n\tsvd(this);\n }", "public static void getConsicutiveOnes(int[] arr) {\n int pointerVar;\n int i;\n int counter = 0;\n int oldCounter = 0;\n\n for (i = 0; i < arr.length; i++) {\n pointerVar = 0;\n while (pointerVar < arr.length) {\n if (arr[i] == 1 && arr[i] == arr[pointerVar]) {\n counter++;\n } else {\n counter = 0;\n }\n pointerVar++;\n }\n\n }\n System.out.println(\"Counter Value :Old counter\" + counter);\n\n }" ]
[ "0.6298712", "0.60110104", "0.577948", "0.56320226", "0.55723", "0.55377394", "0.5495121", "0.5455145", "0.5384571", "0.5375287", "0.5354568", "0.53533304", "0.5332296", "0.5314682", "0.5280479", "0.52502406", "0.52234614", "0.52162874", "0.51452297", "0.5143713", "0.5126355", "0.51222074", "0.51084775", "0.50851154", "0.50730664", "0.5072333", "0.50718373", "0.504457", "0.50300723", "0.5028179", "0.50165594", "0.5011205", "0.5002978", "0.4973484", "0.49477285", "0.4946209", "0.493496", "0.49092272", "0.48959792", "0.48881605", "0.48872185", "0.48789394", "0.487191", "0.48521417", "0.48490945", "0.48456413", "0.48343956", "0.48314974", "0.48084903", "0.48072836", "0.47979265", "0.4774404", "0.47743982", "0.47737294", "0.47619894", "0.47609243", "0.4747048", "0.47437534", "0.4741826", "0.47336707", "0.47319922", "0.4729201", "0.47273573", "0.4718018", "0.4705107", "0.46969333", "0.46965086", "0.46915555", "0.46902582", "0.46849436", "0.46833882", "0.4666158", "0.46618217", "0.46612328", "0.46581247", "0.46579438", "0.46518022", "0.46412092", "0.463919", "0.46362066", "0.46343556", "0.46336582", "0.46320605", "0.46129838", "0.4604866", "0.45953223", "0.4594314", "0.4592727", "0.4584871", "0.45846537", "0.4581547", "0.45810357", "0.45809034", "0.458009", "0.457718", "0.45707327", "0.45620626", "0.45590958", "0.4558518", "0.45447472" ]
0.460918
84
Changes the values of the matrix such that each row sums to 1, preserving the relative differences of the values in each row
public void makeRowStochastic() { for(T row : getFirstDimension()) { double sum = 0.0; // sum all values of the current row for(T col : getMatches(row)) { sum += get(row, col); } // divide each value by the sum for(T col : getMatches(row)) { set(row, col, get(row, col) / sum); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[][] updateMatrix(int[][] matrix) {\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) continue;\n matrix[i][j] = 10; // You can use any integer bigger than 1 except Integer.MAX_VALUE, overflow.\n if(i > 0) matrix[i][j] = Math.min(matrix[i - 1][j] + 1, matrix[i][j]);\n if(j > 0) matrix[i][j] = Math.min(matrix[i][j - 1] + 1, matrix[i][j]);\n }\n }\n\n for(int i = matrix.length - 1; i >= 0; i--) {\n for(int j = matrix[0].length - 1; j >= 0; j--) {\n if(i < matrix.length - 1) matrix[i][j] = Math.min(matrix[i + 1][j] + 1, matrix[i][j]);\n if(j < matrix[0].length - 1) matrix[i][j] = Math.min(matrix[i][j + 1] + 1, matrix[i][j]);\n }\n }\n return matrix;\n }", "private void reduceMatrix( final double[][] matrix )\n\t{\n\n\t\tfor ( int i = 0; i < matrix.length; i++ )\n\t\t{\n\n\t\t\t// find the min value in the row\n\t\t\tdouble minValInRow = Double.MAX_VALUE;\n\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t{\n\t\t\t\tif ( minValInRow > matrix[ i ][ j ] )\n\t\t\t\t{\n\t\t\t\t\tminValInRow = matrix[ i ][ j ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// subtract it from all values in the row\n\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t{\n\t\t\t\tmatrix[ i ][ j ] -= minValInRow;\n\t\t\t}\n\t\t}\n\n\t\tfor ( int i = 0; i < matrix[ 0 ].length; i++ )\n\t\t{\n\t\t\tdouble minValInCol = Double.MAX_VALUE;\n\t\t\tfor ( int j = 0; j < matrix.length; j++ )\n\t\t\t{\n\t\t\t\tif ( minValInCol > matrix[ j ][ i ] )\n\t\t\t\t{\n\t\t\t\t\tminValInCol = matrix[ j ][ i ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( int j = 0; j < matrix.length; j++ )\n\t\t\t{\n\t\t\t\tmatrix[ j ][ i ] -= minValInCol;\n\t\t\t}\n\n\t\t}\n\n\t}", "private static void setMatrixOnes(int[][] matrix) {\n\n\t\tint row = matrix.length;\n\t\tint col = matrix[0].length;\n\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\n\t\tfor (int i = 0; i < row; i++) {\n\t\t\tfor (int j = 0; j < col; j++) {\n\n\t\t\t\t/* next two if conditions take special care for first row and first column */\n\n\t\t\t\t/* Scan the first row and set a variable rowFlag to indicate whether we need to set all 1s in first row or not. */\n\t\t\t\tif (i == 0 && matrix[i][j] == 1) {\t/* if any values in first row is 1, set rowFlag true */\n\t\t\t\t\trowFlag = true;\n\t\t\t\t}\n\n\t\t\t\t/* Scan the first column and set a variable colFlag to indicate whether we need to set all 1s in first column or not. */\n\t\t\t\tif (j == 0 && matrix[i][j] == 1) {\t/* if any values in first col is 1, set colFlag true */\n\t\t\t\t\tcolFlag = true;\n\t\t\t\t}\n\n\t\t\t\t/* Use first row and first column as the auxiliary arrays row[] and col[] respectively,\n\t\t\t\t * consider the matrix as sub matrix starting from second row and second column\n\t\t\t\t * */\n\t\t\t\tif (matrix[i][j] == 1) {\n\t\t\t\t\tmatrix[0][j] = 1;\n\t\t\t\t\tmatrix[i][0] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Modify the given input matrix using the first row and first column of this matrix itself */\n\t\tfor (int i = 1; i < row; i++) {\n\t\t\tfor (int j = 1; j < col; j++) {\n\t\t\t\tif (matrix[0][j] == 1 || matrix[i][0] == 1) {\n\t\t\t\t\tmatrix[i][j] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* modify first row if there was any 1 */\n\t\tif (rowFlag) {\n\t\t\tfor (int j = 0; j < col; j++) {\n\t\t\t\tmatrix[0][j] = 1;\n\t\t\t}\n\t\t}\n\n\t\t/* modify first col if there was any 1 */\n\t\tif (colFlag) {\n\t\t\tfor (int i = 0; i < row; i++) {\n\t\t\t\tmatrix[i][0] = 1;\n\t\t\t}\n\t\t}\n\n\t\tprintTheMatrix(matrix);\n\t}", "static void update(int[][] matrix){\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\t\tint n = matrix.length;\n int m = matrix[0].length;\n for(int i=0;i<n;i++){\n for(int j=0;j<m;j++){\n if(i==0 && matrix[i][j]==0){\n rowFlag =true;\n }\n if(j==0 && matrix[i][j]==0){\n colFlag = true;\n }\n if(matrix[i][j]==0){\n matrix[0][j] = 0;\n matrix[i][0] = 0;\n }\n }\n }\n for(int i=1;i<n;i++){\n for(int j=1;j<m;j++){\n if(matrix[i][0]==0||matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n if(rowFlag){\n for(int i=0;i<m;i++){\n matrix[0][i] =0 ;\n }\n }\n if(colFlag){\n for(int j=0;j<n;j++){\n matrix[j][0] = 0;\n }\n }\n\n\t}", "public static void normalize()\n {\n int sum;\n\n for(int i=0;i<12;i++)\n {\n for(int j=0;j<12;j++) {\n sum = sumAll(i,j);\n if (sum != 0)\n for (int n = 0; n < 12; n++)\n weights[i][j][n] /= sum;\n }\n }\n }", "public void update(int row, int col, int val) {\n int n = matrix[0].length;\n \n for(int i = col; i < n; i++){\n rowSums[row][i] = rowSums[row][i] - matrix[row][col] + val;\n }\n\n matrix[row][col] = val;\n }", "public void setZeroes1(int[][] matrix) {\n boolean col00 = false;\n\n int row, col;\n int rows = matrix.length;\n int cols = matrix[0].length;\n for (row = 0; row < rows; ++row) {\n for (col = 0; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n if (col != 0) {\n matrix[0][col] = 0;\n matrix[row][0] = 0;\n } else {\n col00 = true;\n }\n }\n }\n }\n for (row = rows - 1; row >= 0; --row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][0] == 0 || matrix[0][col] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (col00) {\n for (row = rows - 1; row >= 0; --row) {\n matrix[row][0] = 0;\n }\n }\n }", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public static void betterApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\tboolean auxR[] = new boolean[m];\n\t\tboolean auxC[] = new boolean[n];\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tauxR[i] = false;\n\t\t}\n\t\t\n\t\tfor(int j = 0;j<n;j++){\n\t\t\tauxC[j] = false;\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tauxR[i] = true;\n\t\t\t\t\tauxC[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(auxR[i] == true || auxC[j] == true){\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }", "static void reducedSingular (double[][] S, int p)\n {\n\tfor (int i=p; i<S.length; i++) {\n\t S[i][i] = 0;\n\t}\n }", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }", "private void reduce(){\n int min;\n //Subtract min value from rows\n for (int i = 0; i < rows; i++) {\n min = source[i][0];\n for (int j = 1; j < cols; j++)\n if(source[i][j] < min) min = source[i][j];\n\n for (int j = 0; j < cols; j++)\n source[i][j] -= min;\n }\n\n //Subtract min value from cols\n for (int j = 0; j < cols; j++) {\n min = source[0][j];\n for (int i = 1; i < rows; i++)\n if(source[i][j] < min) min = source[i][j];\n\n for (int i = 0; i < rows; i++)\n source[i][j] -= min;\n\n }\n }", "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "public double oneNorm(){\r\n \tdouble norm = 0.0D;\r\n \tdouble sum = 0.0D;\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tsum+=Math.abs(this.matrix[i][j]);\r\n \t\t}\r\n \t\tnorm=Math.max(norm,sum);\r\n \t}\r\n \treturn norm;\r\n \t}", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "public void invert() {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n Double sim = get(first, second);\n \n if(sim!=null && sim > 0.0) {\n set(first, second, 1.0/sim);\n }\n \n }\n \n }\n }", "public void setZeroes(int[][] matrix) {\n if (matrix == null || matrix.length == 0) {\n return;\n }\n int[] m = new int[matrix.length];\n int[] n = new int[matrix[0].length];\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) {\n m[i]++;\n n[j]++;\n }\n }\n }\n for (int i = 0; i < m.length; i++) {\n if (m[i] > 0) {\n Arrays.fill(matrix[i], 0);\n }\n }\n for (int j = 0; j < n.length; j++) {\n if (n[j] > 0) {\n for (int k = 0; k < matrix.length; k++) {\n matrix[k][j] = 0;\n }\n }\n }\n }", "public static void bestApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\t\n\t\t//Taking two variables for storing status of first row and column\n\t\tboolean firstRow = false;\n\t\tboolean firstColumn = false;\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tif(i == 0) firstRow == true;\n\t\t\t\t\tif(j == 0) firstColumn == true;\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 1;i<m;i++){\n\t\t\t\n\t\t\tfor(int j = 1;j<n;j++){\n\t\t\t\t//based on first row and first column making the entire column and row as zero\n\t\t\t\tif(matrix[0][j] == 0 || matrix[i][0] == 0){\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Making every column value to 0 in first row\n\t\tif(firstRow){\n\t\t\t\n\t\t\tfor(int j = 0;j <n;j++){\n\t\t\t\tmatrix[0][j] = 0;\n\t\t\t}\n\t\t}\n\t\t//Making every row value to 0 in first column\n\t\tif(firstColumn){\n\t\t\t\n\t\t\tfor(int i = 0;i <m;i++){\n\t\t\t\tmatrix[i][0] = 0;\n\t\t\t}\n\t\t}\n\t}", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "int absoluteValuesSumMinimization(int[] a) {\n return a[(a.length-1)/2];\n }", "public static void plus1(int[]arr)\r\n\t{\r\n\t\tint i=arr.length-1;\r\n\t\twhile(i>=0&&arr[i]==1)\r\n\t\t\tarr[i--]=0;\r\n\t\tif(i>=0)\r\n\t\t\tarr[i]=1;\r\n\t}", "public double l1_norm()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += Math.abs(c);\r\n\r\n return sum;\r\n }", "public static int[] reduce (int []n1) {\n\t\tfor (int i = 0; i < n1.length; i++) {\n\t\t\tif (n1[i] != 0) {\n\t\t\t\tif (i == 0) return copy(n1);\n\t\t\t\t\n\t\t\t\tint []newVal = new int[n1.length-i];\n\t\t\t\textract(newVal,0,n1,i,n1.length-i);\n\t\t\t\treturn newVal;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// just zero.\n\t\treturn new int[]{0};\n\t}", "public void matrizInversa(){\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n //System.out.println(\"\");getDeter();\n getMatriz()[i][j] = getMatrizAdjunta()[i][j]/getDeter();\n }\n }\n mostrarMatriz(getMatriz(),\"Matriz inversa\");\n }", "private void normalize(DMatrixRMaj M) {\n double suma=0;\n Equation eq = new Equation();\n eq.alias(M, \"M\");\n eq.alias(suma,\"s\");\n\n// for (int i=0;i<M.numRows;i++) {\n// for (int j = 0; j < M.numCols; j++) {\n// eq.alias(i, \"i\");\n// eq.alias(j, \"j\");\n// eq.process(\"s = s + M(i,j)\");\n//// suma = suma + M.get(i,j);\n// }\n// }\n// for (int i=0;i<M.numRows;i++){\n// for (int j=0;j<M.numCols;j++){\n//// eq.alias(i,\"i\");\n//// eq.alias(j,\"j\");\n//// eq.process(\"s = s + M(i,j)\");\n// M.set(i,j,M.get(i,j)/suma);\n// }\n for(int i=0; i < M.numRows; i++){\n eq.alias(i, \"i\");\n //eq.process(\"M(i,:) = exp(M(i,:) - max(M(i,:)))\"); // to prevent high values in exp(M)\n //eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n// eq.process(\"M(i,:) = M(i,:) / s\");\n }\n }", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "public double negativeElementsSum(double[] arr) {\n return 0;\n }", "public int matrixScore(int[][] A) {\n int n = A.length, m = A[0].length, ans = 0;\n for (int i = 0; i < n; ++i) {\n if (A[i][0] == 0) {\n flipRow(A, i);\n }\n }\n for (int j = 1; j < m; ++j) {\n int cnt = 0;\n for (int i = 0; i < n; ++i) {\n cnt += A[i][j];\n }\n if (cnt * 2 < n) {\n flipCol(A, j);\n }\n }\n for (int i = 0; i < n; ++i) {\n int cur = 0;\n for (int j = 0; j < m; ++j) {\n cur = (cur << 1) + A[i][j];\n }\n ans += cur;\n }\n return ans;\n}", "public static int noDiagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i != j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public void setZeroes_ok(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\n\t\tif (m == 1) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[0][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\t\tmatrix[0][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (n == 1) {\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tif (matrix[i][0] == 0) {\n\t\t\t\t\tfor (int k = 0; k < m; k++) {\n\t\t\t\t\t\tmatrix[k][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint idx = 0;\n\t\tboolean[][] visit = new boolean[m][n];\n\t\twhile (idx <= m * n - 1) {\n\t\t\tint i = idx / n;\n\t\t\tint j = idx % n;\n\t\t\tif (i < m && j < n && matrix[i][j] == 0 && visit[i][j] == false) {\n\t\t\t\t// set whole row to 0\n\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\tif (matrix[i][k] != 0) {\n\t\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t\t\tvisit[i][k] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set whole col to 0\n\t\t\t\tfor (int l = 0; l < m; l++) {\n\t\t\t\t\tif (matrix[l][j] != 0) {\n\t\t\t\t\t\tmatrix[l][j] = 0;\n\t\t\t\t\t\tvisit[l][j] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t}", "public void plusEquals(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tthis.matrix[i][j] += bmat.matrix[i][j];\r\n\t \t}\r\n \t}\r\n \t}", "private static double[] normalize(double[] data)\n {\n double sum = 0;\n \n for (double d : data)\n sum += d;\n \n if (sum != 1 && sum != 0)\n {\n for (int i = 0; i < data.length; i++)\n data[i] /= sum;\n }\n \n return data;\n }", "public static void bruteForceSolution(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\t\n\t\tint aux[][] = new int [m][n];\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\taux[i][j] = 1;\n\t\t\t}\n\t\t}\n\t\t// if found 0 in main array making row and column in the auxilary row and column as 0\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\t\n\t\t\t\t\tfor(int k = 0;k<m;k++){\n\t\t\t\t\t\taux[k][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 0;k<n;k++){\n\t\t\t\t\t\taux[i][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//copying elements back to main array\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tmatrix[i][j] = aux[i][j];\n\t\t\t}\n\t\t}\n\t}", "private void makeMoreZeroes( final double[][] matrix, final int[] coveredRows, final int[] coveredCols )\n\t{\n\t\tdouble minUncoveredValue = Double.MAX_VALUE;\n\t\tfor ( int i = 0; i < matrix.length; i++ )\n\t\t{\n\t\t\tif ( 0 == coveredRows[ i ] )\n\t\t\t{\n\t\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t\t{\n\t\t\t\t\tif ( 0 == coveredCols[ j ] && matrix[ i ][ j ] < minUncoveredValue )\n\t\t\t\t\t{\n\t\t\t\t\t\tminUncoveredValue = matrix[ i ][ j ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add the min value to all covered rows\n\t\tfor ( int i = 0; i < coveredRows.length; i++ )\n\t\t{\n\t\t\tif ( 1 == coveredRows[ i ] )\n\t\t\t{\n\t\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t\t{\n\t\t\t\t\tmatrix[ i ][ j ] += minUncoveredValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// subtract the min value from all uncovered columns\n\t\tfor ( int i = 0; i < coveredCols.length; i++ )\n\t\t{\n\t\t\tif ( 0 == coveredCols[ i ] )\n\t\t\t{\n\t\t\t\tfor ( int j = 0; j < matrix.length; j++ )\n\t\t\t\t{\n\t\t\t\t\tmatrix[ j ][ i ] -= minUncoveredValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected static double seqArraySum(final double[] input) {\n double sum = 0;\n\n // Compute sum of reciprocals of array elements\n for (int i = 0; i < input.length; i++) {\n sum += 1 / input[i];\n }\n\n return sum;\n }", "public static double sumMajorDiagonal(double[][] m) {\n double total = 0;\n for (int i = 0; i < m.length; i++) {\n total += m[i][i];\n }\n return total;\n }", "public void SetMatrixToOnes() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 1;\tthis.mat_f_m[0][2] = 1;\t this.mat_f_m[0][3] = 1;\n\tthis.mat_f_m[1][0] = 1;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 1;\t this.mat_f_m[1][3] = 1;\n\tthis.mat_f_m[2][0] = 1;\t this.mat_f_m[2][1] = 1;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 1;\n\tthis.mat_f_m[3][0] = 1;\t this.mat_f_m[3][1] = 1;\tthis.mat_f_m[3][2] = 1;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "public int[][] removeOne(int[][] matrix, int x, int y) {\n while(x < matrix.length){\n if(matrix[x][y] == 1)\n matrix[x][y] = 0;\n x++;\n }\n return matrix;\n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "public static Matrix sinc(Matrix matrix)\n {\n double[][] M = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n if (M[i][j] == 0.0d)\n {\n C[i][j] = 1.0;\n }\n else\n {\n C[i][j] = Math.sin(M[i][j]) / M[i][j];\n }\n }\n }\n return X;\n }", "private Matrix gaussianEliminate(){\r\n\t\t//Start from the 0, 0 (top left)\r\n\t\tint rowPoint = 0;\r\n\t\tint colPoint = 0;\r\n\t\t// instantiate the array storing values for new Matrix\r\n\t\tDouble[][] newVal = deepCopy(AllVal);\r\n\t\twhile (rowPoint < row && colPoint < col) {\r\n\t\t\t// find the index with max number (absolute value) from rowPoint to row\r\n\t\t\tDouble max = Math.abs(newVal[rowPoint][colPoint]);\r\n\t\t\tint index = rowPoint;\r\n\t\t\tint maxindex = rowPoint;\r\n\t\t\twhile (index < row) {\r\n\t\t\t\tif (max < Math.abs(newVal[index][colPoint])) {\r\n\t\t\t\t\tmax = newVal[index][colPoint];\r\n\t\t\t\t\tmaxindex = index;\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t\t// if max is 0 then that must mean there are no pivots\r\n\t\t\tif (max == 0) {\r\n\t\t\t\tcolPoint++;\r\n\t\t\t}else {\r\n\t\t\t\t//TODO: refactor into method\r\n\t\t\t\tDouble[] Temp = newVal[rowPoint];\r\n\t\t\t\tnewVal[rowPoint] = newVal[maxindex];\r\n\t\t\t\tnewVal[maxindex] = Temp;\r\n\t\t\t\t// Fill 0 lower part of pivot\r\n\t\t\t\tfor(int lower = rowPoint + 1; lower < row; lower++) {\r\n\t\t\t\t\tDouble ratio = newVal[lower][colPoint]/newVal[rowPoint][colPoint];\r\n\t\t\t\t\tnewVal[lower][colPoint] = (Double) 0.0;\r\n\t\t\t\t\t// adjust for the remaining element\r\n\t\t\t\t\tfor (int remain = colPoint + 1; remain < col; remain++) {\r\n\t\t\t\t\t\tnewVal[lower][remain] = newVal[lower][remain] - newVal[lower][remain]*ratio;\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\trowPoint++;\r\n\t\t\t\tcolPoint++;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Matrix(newVal);\r\n\t}", "public static void gaussElimination(Matriks m) {\n swapCount = 0;\n constant = 1;\n\n if (m.baris > m.kolom-1) {\n m.baris = m.kolom-1;\n }\n\n for (int iBrs = 0; iBrs < m.baris; iBrs++) {\n int iKol = iBrs;\n while (allElmtColUnderIs0(m,iBrs,iKol) && (iKol<m.kolom-1)) {\n iKol++;\n }\n if (m.ELMT[iBrs][iKol] == 0) {\n orderRow(m, iBrs, iKol);\n }\n // mengubah elemen baris dibawah berdasar baris-iBrs (referensi)\n if (!((iKol==m.kolom-1) && allElmtColUnderIs0(m,iBrs,iKol))) {\n // jika sudah di kolom terakhir dan elemen kolomnya kebawah adalah 0\n // maka tidak perlu dievaluasi lagi ntuk menghindari NaN\n for (int j = iBrs+1; j<m.baris; j++) {\n double coeff = m.ELMT[j][iKol]/m.ELMT[iBrs][iKol];\n for (int k=iKol; k<m.kolom; k++) {\n m.ELMT[j][k] -= m.ELMT[iBrs][k] * coeff;\n }\n }\n }\n }\n\n // Membuat leading one tiap baris (jika elemen baris tidak all 0)\n for(int i=0; i<m.baris; i++) {\n if (!allElmtRowIs0(m, i)) {\n int iLead=0;\n while (iLead<m.kolom && m.ELMT[i][iLead]==0) {\n iLead++;\n }\n double factor = m.ELMT[i][iLead];\n constant /= factor;\n for (int j=iLead; j<m.kolom; j++) {\n if (m.ELMT[i][j] != 0) {\n m.ELMT[i][j] /= factor;\n }\n }\n }\n }\n //displayMatrix(m);\n }", "private void calculateRestore(double[] in, int row) {\n double[] org = new double[in.length];\n System.arraycopy(in, 0, org, 0, in.length);\n for (int idx = 0; idx < row ; idx++) {\n double diff = org[idx+row];\n in[idx*2] = org[idx] + diff;\n in[idx*2 + 1] = org[idx] - diff;\n }\n }", "public static long checksum(int[][] m){\n long s = 0;\n for (int i = 0; i < m.length; i++)\n for (int j = 0; j < m[0].length; j++)\n s += m[i][j];\n return s;\n }", "private static void removeRowLeadingNumber(double factor, int rowRoot,\r\n int row, double[][] matrix, double[] vector) {\r\n\r\n for (int column = 0; column < matrix[row].length; column++) {\r\n\r\n matrix[row][column] = matrix[row][column] - factor\r\n * matrix[rowRoot][column];\r\n }\r\n\r\n vector[row] = vector[row] - factor * vector[rowRoot];\r\n }", "public static void setRowsToZeroes(int[][] matrix, int row) {\n for (int j = 0; j < matrix[0].length; j++) {\n matrix[row][j] = 0;\n }\n }", "void patchArray(long array[][], long scale)\n {\n // patch all numbers up by 100 to keep the order but to rid the negative\n // numbers\n for (int i = 0; i < array.length; i++)\n {\n array[i][0] += scale;\n array[i][1] += scale;\n }\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "public static void solution1(int[][] grid) {\n int M = grid.length;\n int N = grid[0].length;\n\n // Loop through 2-d grid to figure out which rows & columns have a 0\n boolean[] rows = new boolean[M];\n boolean[] cols = new boolean[N];\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (grid[row][col] == 0) {\n rows[row] = true;\n cols[col] = true;\n }\n }\n }\n\n // Re-loop through 2-d matrix and set whichever entries are necessary to 0\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (rows[row] == true || cols[col] == true) {\n grid[row][col] = 0;\n }\n }\n }\n }", "public static void method1(int numRows) {\n List<List<Integer>> pt = new ArrayList<>();\n List<Integer> row, pre = null;\n for (int i = 0; i < numRows; ++i) {\n row = new ArrayList<>();\n for (int j = 0; j <= i; ++j) {\n if (j == 0 || j == i) {\n row.add(1);\n } else {\n row.add(pre.get(j - 1) + pre.get(j));\n }\n }\n pre = row;\n pt.add(row);\n }\n\n for (List<Integer> a : pt) {\n for (int i: a) {\n System.out.print(i + \" \");\n }\n System.out.println();\n }\n }", "public void add(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] += skalar;\r\n }\r\n }\r\n }", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "private double[][] normalize255(RealMatrix realMatrix) {\n\t\tdouble[][] input = realMatrix.getData();\n\t\tdouble[][] normalized = new double[realMatrix.getRowDimension()][realMatrix.getColumnDimension()];\n\t\tdouble minimum = 99999.99;\n\t\tdouble maximum = -9999.99;\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tminimum = Math.min(minimum, input[i][j]);\n\t\t\t\tmaximum = Math.max(maximum, input[i][j]);\n\t\t\t}\n\t\t}\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tnormalized[i][j] = ((input[i][j] - minimum)*(255/(maximum-minimum)));\n\t\t\t}\n\t\t}\n\t\treturn normalized;\n\t}", "public double [][] reduceVectors(RealMatrix inputMatrix) {\n double [][] d1 = inputMatrix.getData();\n double [][] outputArray = new double [d1.length][4];\n for (int i = 0; i < outputArray.length; i++) {\n for (int j = 0; j < outputArray[0].length; j++) {\n outputArray[i][j] = d1[i][j];\n }\n }\n return outputArray;\n }", "public void permutate(double[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public void setZeroes(int[][] matrix) {\n\t\t\tint m = matrix.length;\n\t\t\tint n = matrix[0].length;\n\t\t\t\n\t\t\tboolean fc = false, fr = false; // first row, first column as markers\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (matrix[i][j] == 0) {\n\t\t\t\t\t\tif (i == 0) fr = true;\n\t\t\t\t\t\tif (j == 0) fc = true;\n\t\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 1; i < m; i++) {\n\t\t\t\tfor (int j = 1; j < n; j++) {\n\t\t\t\t\tif (matrix[0][j] == 0 || matrix[i][0] == 0) {\n\t\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fr) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fc) {\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void correctWeights() {\n double tmp;\n\n for(int i = 0; i < inputs; ++i) {\n //temporary store old value\n tmp = weights[i];\n // correct weight's value using MOMENTUM parameter\n weights[i] += changes[i] + MOMENTUM * (weights[i] - exWeights[i]);\n //store old value in class member\n exWeights[i] = tmp;\n // clear corrections value\n changes[i] = 0.0;\n }\n\n // const input weight correction if const input is enabled\n if (enableConstAddend) {\n // temporary store old value\n tmp = weights[inputs];\n // change weight's value using MOMENTUM parameter\n weights[inputs] += changes[inputs] + MOMENTUM * (weights[inputs] - exWeights[inputs]);\n // store old value\n exWeights[inputs] = tmp;\n // clear value of calculated change\n changes[inputs] = 0.0;\n }\n }", "public void timesEquals(double constant){\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tthis.matrix[i][j] *= constant;\r\n \t\t}\r\n \t}\r\n \t}", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "protected void updateArrayBySumOfElements(int arr[], int n) { \n\n\t\tif (n <= 1) { \n\t\t return; \n\t\t} \n\t\tint prev = arr[0]; \n\t\tarr[0] = arr[0] + arr[1]; \n \n\n \tfor (int i = 1; i < n - 1; i++) { \n \t\tint curr = arr[i]; \n \t\tarr[i] = prev + arr[i + 1]; \n \t\tprev = curr; \n \t} \n \tarr[n - 1] = prev + arr[n - 1]; \n\t}", "private static void changeSubMatrix(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++){\n if(matrix[i][0]==0 || matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n }", "public static double[] Jordan(Matriks M) {\r\n int i, j, k = 0, c;\r\n int flag = 0;\r\n int n = M.BrsEff; \r\n\t\tdouble[][] a = new double[n][n+1];\r\n\t\tdouble[] x;\r\n \r\n for (i = 0; i < M.BrsEff; i++){\r\n for (j = 0; j < M.KolEff; j++){\r\n a[i][j] = M.Elmt[i][j];\r\n }\r\n }\r\n\r\n for (i = 0; i < n; i++){ \r\n if (a[i][i] == 0){ \r\n c = 1; \r\n while ((i + c) < n && a[i + c][i] == 0){ \r\n c++;\r\n } \r\n if ((i + c) == n){\r\n flag = 1; \r\n break; \r\n }\r\n for (j = i, k = 0; k <= n; k++){\r\n double temp =a[j][k]; \r\n a[j][k] = a[j+c][k]; \r\n a[j+c][k] = temp; \r\n }\r\n } \r\n \r\n for (j = 0; j < n; j++){ \r\n if (i != j){ \r\n double p = a[j][i] / a[i][i];\r\n for (k = 0; k <= n; k++){ \r\n a[j][k] = a[j][k] - (a[i][k]) * p;\r\n } \r\n } \r\n } \r\n }\r\n for (i = 0; i < M.BrsEff; i++){\r\n if ((a[i][i]!=0) && (a[i][i]!=1)){\r\n for (j = i; j < M.KolEff; j++){\r\n M.Elmt[i][j] = a[i][j] / a[i][i];\r\n }\r\n }\r\n }\r\n if (flag == 1){\r\n flag = 3;\r\n \t for (i = 0; i < n; i++) { \r\n \t double sum = 0; \r\n \t for (j = 0; j < n; j++){ \r\n \t sum = sum + M.Elmt[i][j]; \r\n \t }\r\n \t if (sum == M.Elmt[i][n]) { \r\n \t flag = 2; \r\n \t }\r\n \t }\r\n \t if (flag == 3){\r\n \t x = new double[n+3];\r\n for (i = 0; i < n; i++){\r\n x[i] = 0;\r\n }\r\n \t }\r\n \t else {\r\n \t x = new double[n+2];\r\n for (i = 0; i < n; i++){\r\n x[i] = 0;\r\n }\r\n \t }\r\n }\r\n else{\r\n x = new double[n];\r\n for (i = 0; i < n; i++){\r\n x[i] = a[i][M.KolEff-1] / a[i][i];\r\n }\r\n }\r\n return x;\r\n }", "public int manhattan() {\n int sum = 0;\n for (int i = 0; i < blocks.length; i++){\n for (int j = 0; j < blocks.length; j++){\n int value = blocks[i][j];\n if (value == 0)\n continue;\n\n sum += Math.abs((value-1) / dimension() - i);\n sum += Math.abs((value-1) % dimension() - j);\n }\n }\n return sum;\n }", "@Override\n\tpublic int[][] computeAssignments( final double[][] matrix )\n\t{\n\t\tfinal int nlines = matrix.length;\n\t\tif ( nlines == 0 )\n\t\t{\n\t\t\t// no spot\n\t\t\treturn new int[][] { {} };\n\t\t}\n\t\tfinal int ncols = matrix[ 0 ].length;\n\t\tif ( nlines <= 1 && ncols <= 1 )\n\t\t\treturn new int[][] { {} };\n\n\t\t// subtract minimum value from rows and columns to create lots of zeroes\n\t\treduceMatrix( matrix );\n\n\t\t// non negative values are the index of the starred or primed zero in\n\t\t// the row or column\n\t\tfinal int[] starsByRow = new int[ matrix.length ];\n\t\tArrays.fill( starsByRow, -1 );\n\t\tfinal int[] starsByCol = new int[ matrix[ 0 ].length ];\n\t\tArrays.fill( starsByCol, -1 );\n\t\tfinal int[] primesByRow = new int[ matrix.length ];\n\t\tArrays.fill( primesByRow, -1 );\n\n\t\t// 1s mean covered, 0s mean not covered\n\t\tfinal int[] coveredRows = new int[ matrix.length ];\n\t\tfinal int[] coveredCols = new int[ matrix[ 0 ].length ];\n\n\t\t// star any zero that has no other starred zero in the same row or\n\t\t// column\n\t\tinitStars( matrix, starsByRow, starsByCol );\n\t\tcoverColumnsOfStarredZeroes( starsByCol, coveredCols );\n\n\t\twhile ( !allAreCovered( coveredCols ) )\n\t\t{\n\n\t\t\tint[] primedZero = primeSomeUncoveredZero( matrix, primesByRow, coveredRows, coveredCols );\n\n\t\t\twhile ( primedZero == null )\n\t\t\t{\n\t\t\t\t// keep making more zeroes until we find something that we can\n\t\t\t\t// prime (i.e. a zero that is uncovered)\n\t\t\t\tmakeMoreZeroes( matrix, coveredRows, coveredCols );\n\t\t\t\tprimedZero = primeSomeUncoveredZero( matrix, primesByRow, coveredRows, coveredCols );\n\t\t\t}\n\n\t\t\t// check if there is a starred zero in the primed zero's row\n\t\t\tfinal int columnIndex = starsByRow[ primedZero[ 0 ] ];\n\t\t\tif ( -1 == columnIndex )\n\t\t\t{\n\n\t\t\t\t// if not, then we need to increment the zeroes and start over\n\t\t\t\tincrementSetOfStarredZeroes( primedZero, starsByRow, starsByCol, primesByRow );\n\t\t\t\tArrays.fill( primesByRow, -1 );\n\t\t\t\tArrays.fill( coveredRows, 0 );\n\t\t\t\tArrays.fill( coveredCols, 0 );\n\t\t\t\tcoverColumnsOfStarredZeroes( starsByCol, coveredCols );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t// cover the row of the primed zero and uncover the column of\n\t\t\t\t// the starred zero in the same row\n\t\t\t\tcoveredRows[ primedZero[ 0 ] ] = 1;\n\t\t\t\tcoveredCols[ columnIndex ] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// ok now we should have assigned everything\n\t\t// take the starred zeroes in each column as the correct assignments\n\n\t\tfinal int[][] retval = new int[ matrix.length ][];\n\t\tfor ( int i = 0; i < starsByCol.length; i++ )\n\t\t{\n\t\t\tretval[ i ] = new int[] { starsByCol[ i ], i };\n\t\t}\n\t\treturn retval;\n\n\t}", "private static int[][] updateTTT(int[][] ttt) {\n\t\t\n\t\t\n\t\tfor (int i = 0; i<ttt.length;i++){\n\t\t\tfor (int j = 0; j<ttt[i].length;j++){\n\t\t\t\tif (ttt[i][j]==0){\n\t\t\t\t\t\n\t\t\t\t\tchangeValuesTTT(ttt, i, j);\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i<ttt.length;i++){\n\t\t\tfor (int j = 0; j<ttt[i].length;j++){\n\t\t\t\tif (ttt[i][j]==-1){\n\t\t\t\t\t\n\t\t\t\t\tttt[i][j]=0;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn ttt;\n\t}", "private static void changeFirstRowAndColumn(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++) {\n if(matrix[i][j]==0){\n matrix[i][0]=0;\n matrix[0][j]=0;\n }\n }\n }\n }", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "public void setZeroes2(int[][] matrix) {\n boolean row00 = false;\n boolean col00 = false;\n\n int row = 0, col = 0;\n int rows = matrix.length;\n int cols = matrix[0].length;\n while (col < cols && !row00) {\n row00 = matrix[0][col++] == 0;\n }\n while (row < rows && !col00) {\n col00 = matrix[row++][0] == 0;\n }\n\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n matrix[row][0] = 0;\n matrix[0][col] = 0;\n }\n }\n }\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[0][col] == 0 || matrix[row][0] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (row00) {\n for (col = 0; col < cols; ++col) {\n matrix[0][col] = 0;\n }\n }\n if (col00) {\n for (row = 0; row < rows; ++row) {\n matrix[row][0] = 0;\n }\n }\n }", "@Override\n\tprotected void computeSumSq(double[] c, int nRows) {\n\t\tc[0] += _dict.sumSqWithReference(getCounts(), _reference);\n\t\tfinal double refSum = FORUtil.refSumSq(_reference);\n\t\t// Square sum of the reference values only for the rows that is not represented in the Offsets.\n\t\tc[0] += refSum * (_numRows - _data.size());\n\t}", "@Override\n\tpublic void algorithm() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\t\n\t\tint change = 2;\n\t\t\n\t\tfor(int i=0; i<this.getGridGame().getGridRow(); i++) {\n\t\t\t\n\t\t\tfor(int j=0; j<this.getGridGame().getGridCol(); j++) {\n\t\t\t\t\n\t\t\t\tif(j > 0 && j < this.getGridGame().getGridCol()) {\n\t\t\t\t\t\n\t\t\t\t\tif(this.getGridGame().getPattern(i,j-1) != this.getGridGame().getPattern(i,j)) {\n\t\t\t\t\t\n\t\t\t\t\t\tchange--;\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\t\n\t\t\t\tif(change > 0) {\n\t\t\t\t\t\n\t\t\t\t\tthis.getArray()[i][0] += this.getGridGame().getPattern(i,j);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tthis.getArray()[i][1] += this.getGridGame().getPattern(i,j);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(change + \" \");\n\t\t\tchange = 2;\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=0; i<this.getGridGame().getGridRow(); i++) {\n\t\t\t\n\t\t\tif(this.getArray()[i][1] == 0) {\n\t\t\t\t\n\t\t\t\tthis.getArray()[i][1] = this.getArray()[i][0];\n\t\t\t\tthis.getArray()[i][0] = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=0; i<this.getGridGame().getGridRow(); i++) {\n\t\t\t\n\t\t\tfor(int j=0; j<2; j++) {\n\t\t\t\n\t\t\t\tSystem.out.print(this.getArray()[i][j] + \" \");\n\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t\t\n\t\t}\n\t\t\n\t\n\t}", "@Override\n\tpublic IDoubleVector sumRows() {\n\t\treturn null;\n\t}", "public static Matrix cosh(Matrix matrix)\n {\n double[][] M = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double val = 1.0;\n double[][] C = X.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n val = Math.exp(M[i][j]);\n val = 0.5 * (val + 1 / val);\n C[i][j] = val;\n }\n }\n return X;\n }", "public Matrix[] palu() {\n\t\tHashMap<Integer, Integer> permutations = new HashMap<Integer,Integer>();\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tpermutations.put(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tMatrix p = identity(m.M);\n\t\tfor (Integer rowI : permutations.keySet()) {\n\t\t\tp.rowSwitch(rowI, permutations.get(rowI));\n\t\t}\n\t\tMatrix l = identity(m.M);\n\t\tMatrix u = p.multiply(copy());\n\t\t\n\t\tpivotRow = 0;\n\t\tfor (int col = 0; col < u.N; col++) {\n\t\t\tif (pivotRow < u.M) {\n\t\t\t\t// Should not have to do any permutations\n\t\t\t\tif (!u.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < u.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = u.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = u.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tu = u.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t\tl = l.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tl = l.inverse();\n\t\tMatrix[] palu = {p, this, l, u};\n\t\treturn palu;\n\t}", "public static MatrixAccumulator asSumAccumulator(double neutral) {\n return new SumMatrixAccumulator(neutral);\n }", "public static int minPathSum(int[][] grid) {\n if (grid == null || grid.length == 0 || grid[0].length == 0)\n return 0;\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (i == 0 && j == 0) {\n } else if (i == 0 && j > 0)\n grid[i][j] += grid[i][j-1];\n else if (j == 0 && i > 0)\n grid[i][j] += grid[i-1][j];\n else \n grid[i][j] += Math.min(grid[i][j-1], grid[i-1][j]);\n }\n }\n return grid[grid.length-1][grid[0].length-1];\n }", "private static void subtractRows (double[][] augmentedMatrix, int n, int i, double[] currRow) {\n for (int j = i + 1; j < n; j++) {\n double times = augmentedMatrix[j][i] / currRow[i];\n for (int k = 0; k < n + 1; k++) {\n // Subtract currRow from this row\n augmentedMatrix[j][k] -= times * currRow[k];\n }\n }\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}", "public static int[][] preProcess(int mat[][]) {\n int[][] prefixSumMatrix = new int[mat.length][mat[0].length];\n\n int count = 0;\n // PrePopulate 1st Row\n for (int[] row : mat) {\n for (int i : row) {\n prefixSumMatrix[0][count++] = i;\n }\n break;\n }\n // Run through all cols\n for (int i = 1; i < mat.length; i++) {\n for (int j = 0; j < mat[i].length; j++) {\n prefixSumMatrix[i][j] = mat[i][j] + prefixSumMatrix[i - 1][j];\n }\n }\n LogUtil.logIt(\"Col Prefix Sum.....\");\n LogUtil.printMultiDimensionArray(prefixSumMatrix);\n\n // Now Row Prefix Sum\n for (int i = 0; i < mat.length; i++) {\n for (int j = 1; j < mat[i].length; j++) {\n prefixSumMatrix[i][j] = prefixSumMatrix[i][j - 1] + prefixSumMatrix[i][j];\n }\n }\n\n LogUtil.logIt(\"Col Prefix Sum.....\");\n LogUtil.printMultiDimensionArray(prefixSumMatrix);\n return prefixSumMatrix;\n }", "public static void makeRowsCols0(int [][]input) {\n\t\tint previ=-1,prevj=-1;\n\t\tfor(int i=0;i<input.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<input[0].length;j++)\n\t\t\t{\n\t\t\t\tif(input[i][j]==0)\n\t\t\t\t{\t\n\t\t\t\t\tif(i!=previ&&j!=prevj)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int k=0;k<input.length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[k][j]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int k=0;k<input[0].length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[i][k]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprevi=i;\n\t\t\t\t\t\tprevj=j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void calculateArray() {\n\n for (int i = 0; i < array.length; i++) {\n sum += array[i];\n }\n }", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "float DetGauss(Matrix m){\r\n Matrix mtemp = new Matrix(m.M);\r\n float hasil=1;\r\n int count = 0;\r\n int swap = -1;\r\n for(int i=0;i<mtemp.rows-1;i++){\r\n for(int j=i+1; j<mtemp.rows; j++){\r\n if(mtemp.M[i][i]<mtemp.M[j][i]){\r\n count++;\r\n swapRow(mtemp,i,j);\r\n\r\n }\r\n }\r\n for(int k=i+1; k<mtemp.rows; k++){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=0;j<mtemp.cols;j++){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n for(int i=0; i<mtemp.rows; i++){\r\n hasil *= mtemp.M[i][i];\r\n }\r\n if(count==0){\r\n swap = 1;\r\n }else{\r\n for(int i=1; i<count; i++){\r\n swap = swap * (-1);\r\n }\r\n }\r\n return hasil*swap;\r\n }", "public int[][] zeroMatrix(int[][] matrix){\n\tboolean[][] zeros = new boolean[matrix.length][matrix[0].length];\n\tfor (int i = 0; i < matrix.length; i++){\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (matrix[i][j] == 0) zeros[i][j] = true;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < matrix.length; i++) {\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (zeros[i][j]){\n\t\t\t\tfor (int k = 0; k < matrix.length; k++){\n\t\t\t\t\tmatrix[k][j] = 0;\n\t\t\t\t}\n\t\t\t\tfor (int k = 0; k < matrix[0].length; k++){\n\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn matrix;\n}", "@Override\n\tpublic double calculaDiagonal() {\n\t\treturn 0;\n\t}", "public void permutate(float[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public static double [][] inv(double [][] a) {\n int N = a.length;\n double [] col = new double[N];\n int [] indx = new int[N];\n double [][] y = new double[N][N];\n \n double d = ludcmp(a, indx);\n for (int j=0; j<N; j++ ) {\n for (int i=0; i<N; i++) \n col[i] = 0.0;\n col[j] = 1.0;\n lubksb(a, indx, col);\n for (int i=0; i<N; i++)\n y[i][j] = col[i];\n }\n return y; \n }", "void markRowAndColumnZero(int[][] matrix) {\n HashSet<Integer> rows = new HashSet<Integer>();\n HashSet<Integer> columns = new HashSet<Integer>();\n for(int i=0; i< matrix.length;i++) {\n for(int j =0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) {\n rows.add(i);\n columns.add(j);\n }\n }\n }\n Iterator<Integer> rowsIterator = rows.iterator();\n while(rowsIterator.hasNext()) {\n int rowToBeSetToZero = rowsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[rowToBeSetToZero][0] = 0;\n }\n }\n\n Iterator<Integer> columnsIterator = columns.iterator();\n while(columnsIterator.hasNext()) {\n int columnToBeSetToZero = columnsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[i][columnToBeSetToZero] = 0;\n }\n }\n\n return;\n\n\n }", "public static void findMultipleDupes(int[] arr){\n\n for(int i : arr){\n \n if(arr[Math.abs(i)] > 0){\n arr[Math.abs(i)] = -arr[Math.abs(i)];\n }else\n System.out.println(Math.abs(i));\n }\n\n}", "static int diagonalDifference(int[][] matrix) {\n int ltr = 0;\n int rtl = 0;\n for (int i = 0; i < matrix.length; i++) {\n System.out.println(\"matrix[\" + i + \"][\" + i + \"]: \" + matrix[i][i]);\n ltr += matrix[i][i];\n System.out.println(\"matrix[ \" + (i) + \"][\" + (matrix.length - 1 - i) + \"]: \" + matrix[matrix.length - 1 - i][matrix.length - 1 - i]);\n rtl += matrix[i][matrix.length - 1 - i];\n }\n int result = ltr - rtl;\n return result < 0 ? result * -1 : result;\n }", "public static int sumRow1( int r, int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t//initialize variable to store sum of a row\n\n\t for ( int i = 0; i < a[r].length; i++) {\t//loop through the specific \"row\" (array) given\n\n\t\t\tsum += a[r][i];\t\t\t\t\t\t//add each value to our sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t//return the sum variable\n }", "static int performSum(int[][] ar){\n\n int pDia = 0;\n int sDia = 0;\n int counter = ar.length;\n for (int i = 0; i < ar.length; i++) {\n\n pDia = pDia + ar[i][i];\n\n // keeping track of counter for second diagonal\n counter = counter-1;\n\n sDia = sDia + ar[i][counter];\n\n }\n System.out.println(sDia);\n return pDia;\n }", "static void roundTable(final List<double[]> table) {\n if (table.size() == 0) return;\n \n\tint numRows = table.size();\n\tint numCols = table.get(0).length;\n\t\n\tdouble[] rowSum = new double[numRows];\n\tdouble[] colSum = new double[numCols];\n\tdouble[][] newTable = new double[numRows][numCols];\n\t\n\tfor (int i = 0; i < numRows; i++) {\n\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\tnewTable[i][j] = table.get(i)[j];\n\t\t\trowSum[i] += table.get(i)[j];\n\t\t\tcolSum[j] += table.get(i)[j];\n\t\t}\n\t}\n\t\n\tInteger source = -numCols - 1;\n\tInteger sink = numRows + 1;\n\tList<Integer> nodes = new ArrayList<Integer>();\n\t\n for (int i = 0; i < numRows + 1; i++) {\n \tnodes.add(i);\n }\n for (int i = 0; i < numCols + 1; i++) {\n \tnodes.add(-i);\n }\n \n\tToDoubleBiFunction<Integer, Integer> minEdgeFlow = (a, b) -> {\n\t\tif (a.equals(source) && (b < 0 && b >= -numCols)) {\n\t\t\treturn Math.floor(colSum[-b - 1]);\n\t\t} else if ((a > 0 && a <= numRows) && b.equals(sink)) {\n\t\t\treturn Math.floor(rowSum[a - 1]);\n\t\t} else if ((b > 0 && b <= numRows) && (a < 0 && a >= -numCols)) {\n\t\t\treturn Math.floor(newTable[b - 1][-a - 1]);\n\t\t}\n\t\treturn 0.0;};\n\t\n\tToDoubleBiFunction<Integer, Integer> maxEdgeFlow = (a, b) -> {\n\t\tif (a.equals(source) && (b < 0 && b >= -numCols)) {\n\t\t\treturn Math.ceil(colSum[-b - 1]);\n\t\t} else if ((a > 0 && a <= numRows) && b.equals(sink)) {\n\t\t\treturn Math.ceil(rowSum[a - 1]);\n\t\t} else if ((b > 0 && b <= numRows) && (a < 0 && a >= -numCols)) {\n\t\t\treturn Math.ceil(newTable[b - 1][-a - 1]);\n\t\t}\n\t\treturn 0.0;};\n\t\n\tToDoubleBiFunction<Integer, Integer> flow = findFeasibleBoundedFlow(source, sink, nodes,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tminEdgeFlow, maxEdgeFlow);\n\tfor (int i = 0; i < numCols; i++) {\n\t\tfor (int j = 0; j < numRows; j++) {\n\t\t\ttable.get(j)[i] = flow.applyAsDouble(-i - 1, j + 1);\n\t\t}\n\t}\n }", "@Override\n\tprotected void computeSum(double[] c, int nRows) {\n\t\tsuper.computeSum(c, nRows);\n\t\t// and add all sum of reference multiplied with nrows.\n\t\tfinal double refSum = FORUtil.refSum(_reference);\n\t\tc[0] += refSum * nRows;\n\t}", "public static void zeroMatrix(int[][] matrix) {\n printMatrix(matrix);\n\n boolean [] rowZero = new boolean[matrix.length];\n boolean [] colZero = new boolean[matrix[0].length];\n\n for (int row = 0; row < matrix.length; row++) {\n for (int col = 0; col < matrix[0].length; col++) {\n if (matrix[row][col] == 0) {\n rowZero[row] = true;\n colZero[col] = true;\n }\n }\n }\n\n for (int r = 0; r < rowZero.length; r++) {\n if (rowZero[r]) {\n for (int i = 0; i < colZero.length; i++) {\n matrix[r][i] = 0;\n }\n }\n }\n\n for (int c = 0; c < colZero.length; c++) {\n if (colZero[c]) {\n for (int i = 0; i < rowZero.length; i++) {\n matrix[i][c] = 0;\n }\n }\n }\n\n printMatrix(matrix);\n }", "public int[] ZeroOutNegs(int[] arr) {\r\n for (int x = 0; x < arr.length; x++) {\r\n if (arr[x] < 0) {\r\n arr[x] = 0;\r\n }\r\n }\r\n return arr;\r\n }" ]
[ "0.6476286", "0.59915596", "0.59007823", "0.5780978", "0.5755143", "0.57137465", "0.55312574", "0.54701984", "0.541703", "0.5391173", "0.5358767", "0.5347729", "0.53202176", "0.5294637", "0.5271346", "0.5268816", "0.52601224", "0.5253896", "0.5253093", "0.52449304", "0.5242146", "0.5229152", "0.5160708", "0.513595", "0.51321435", "0.5128921", "0.51282156", "0.5120445", "0.5101021", "0.5090733", "0.5085463", "0.50746715", "0.50736177", "0.5072775", "0.5067794", "0.5052875", "0.5041986", "0.5040363", "0.5024724", "0.50246716", "0.5012172", "0.50023365", "0.49655703", "0.49649525", "0.4964744", "0.4951961", "0.49392545", "0.49375919", "0.49338156", "0.4931864", "0.49201477", "0.49194947", "0.49114662", "0.49065003", "0.4901542", "0.49007818", "0.48916936", "0.48743817", "0.48626637", "0.4854503", "0.48481658", "0.482733", "0.4825872", "0.48254764", "0.4823684", "0.48197684", "0.48158604", "0.48109323", "0.480989", "0.48087668", "0.4797489", "0.4793992", "0.4783628", "0.47821483", "0.47804844", "0.47730675", "0.47718003", "0.47714657", "0.4765911", "0.47610924", "0.47595835", "0.47584072", "0.47566465", "0.47550783", "0.4743943", "0.4743745", "0.47397116", "0.47321898", "0.47213373", "0.47190413", "0.47175643", "0.470885", "0.4705888", "0.4703753", "0.4699871", "0.4697607", "0.46887934", "0.4683723", "0.46836096", "0.46760786" ]
0.5123556
27
Changes the values of the matrix such that each column sums to 1, preserving the relative differences of the values in each column
public void makeColumnStochastic() { for(T col : getSecondDimension()) { double sum = 0.0; // sum all values of the current column for(T row : getFirstDimension()) { sum += get(row, col); } // divide each value by the sum for(T row : getFirstDimension()) { set(row, col, get(row, col) / sum); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[][] updateMatrix(int[][] matrix) {\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) continue;\n matrix[i][j] = 10; // You can use any integer bigger than 1 except Integer.MAX_VALUE, overflow.\n if(i > 0) matrix[i][j] = Math.min(matrix[i - 1][j] + 1, matrix[i][j]);\n if(j > 0) matrix[i][j] = Math.min(matrix[i][j - 1] + 1, matrix[i][j]);\n }\n }\n\n for(int i = matrix.length - 1; i >= 0; i--) {\n for(int j = matrix[0].length - 1; j >= 0; j--) {\n if(i < matrix.length - 1) matrix[i][j] = Math.min(matrix[i + 1][j] + 1, matrix[i][j]);\n if(j < matrix[0].length - 1) matrix[i][j] = Math.min(matrix[i][j + 1] + 1, matrix[i][j]);\n }\n }\n return matrix;\n }", "public static void normalize()\n {\n int sum;\n\n for(int i=0;i<12;i++)\n {\n for(int j=0;j<12;j++) {\n sum = sumAll(i,j);\n if (sum != 0)\n for (int n = 0; n < 12; n++)\n weights[i][j][n] /= sum;\n }\n }\n }", "private static void setMatrixOnes(int[][] matrix) {\n\n\t\tint row = matrix.length;\n\t\tint col = matrix[0].length;\n\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\n\t\tfor (int i = 0; i < row; i++) {\n\t\t\tfor (int j = 0; j < col; j++) {\n\n\t\t\t\t/* next two if conditions take special care for first row and first column */\n\n\t\t\t\t/* Scan the first row and set a variable rowFlag to indicate whether we need to set all 1s in first row or not. */\n\t\t\t\tif (i == 0 && matrix[i][j] == 1) {\t/* if any values in first row is 1, set rowFlag true */\n\t\t\t\t\trowFlag = true;\n\t\t\t\t}\n\n\t\t\t\t/* Scan the first column and set a variable colFlag to indicate whether we need to set all 1s in first column or not. */\n\t\t\t\tif (j == 0 && matrix[i][j] == 1) {\t/* if any values in first col is 1, set colFlag true */\n\t\t\t\t\tcolFlag = true;\n\t\t\t\t}\n\n\t\t\t\t/* Use first row and first column as the auxiliary arrays row[] and col[] respectively,\n\t\t\t\t * consider the matrix as sub matrix starting from second row and second column\n\t\t\t\t * */\n\t\t\t\tif (matrix[i][j] == 1) {\n\t\t\t\t\tmatrix[0][j] = 1;\n\t\t\t\t\tmatrix[i][0] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Modify the given input matrix using the first row and first column of this matrix itself */\n\t\tfor (int i = 1; i < row; i++) {\n\t\t\tfor (int j = 1; j < col; j++) {\n\t\t\t\tif (matrix[0][j] == 1 || matrix[i][0] == 1) {\n\t\t\t\t\tmatrix[i][j] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* modify first row if there was any 1 */\n\t\tif (rowFlag) {\n\t\t\tfor (int j = 0; j < col; j++) {\n\t\t\t\tmatrix[0][j] = 1;\n\t\t\t}\n\t\t}\n\n\t\t/* modify first col if there was any 1 */\n\t\tif (colFlag) {\n\t\t\tfor (int i = 0; i < row; i++) {\n\t\t\t\tmatrix[i][0] = 1;\n\t\t\t}\n\t\t}\n\n\t\tprintTheMatrix(matrix);\n\t}", "private void reduceMatrix( final double[][] matrix )\n\t{\n\n\t\tfor ( int i = 0; i < matrix.length; i++ )\n\t\t{\n\n\t\t\t// find the min value in the row\n\t\t\tdouble minValInRow = Double.MAX_VALUE;\n\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t{\n\t\t\t\tif ( minValInRow > matrix[ i ][ j ] )\n\t\t\t\t{\n\t\t\t\t\tminValInRow = matrix[ i ][ j ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// subtract it from all values in the row\n\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t{\n\t\t\t\tmatrix[ i ][ j ] -= minValInRow;\n\t\t\t}\n\t\t}\n\n\t\tfor ( int i = 0; i < matrix[ 0 ].length; i++ )\n\t\t{\n\t\t\tdouble minValInCol = Double.MAX_VALUE;\n\t\t\tfor ( int j = 0; j < matrix.length; j++ )\n\t\t\t{\n\t\t\t\tif ( minValInCol > matrix[ j ][ i ] )\n\t\t\t\t{\n\t\t\t\t\tminValInCol = matrix[ j ][ i ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( int j = 0; j < matrix.length; j++ )\n\t\t\t{\n\t\t\t\tmatrix[ j ][ i ] -= minValInCol;\n\t\t\t}\n\n\t\t}\n\n\t}", "static void update(int[][] matrix){\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\t\tint n = matrix.length;\n int m = matrix[0].length;\n for(int i=0;i<n;i++){\n for(int j=0;j<m;j++){\n if(i==0 && matrix[i][j]==0){\n rowFlag =true;\n }\n if(j==0 && matrix[i][j]==0){\n colFlag = true;\n }\n if(matrix[i][j]==0){\n matrix[0][j] = 0;\n matrix[i][0] = 0;\n }\n }\n }\n for(int i=1;i<n;i++){\n for(int j=1;j<m;j++){\n if(matrix[i][0]==0||matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n if(rowFlag){\n for(int i=0;i<m;i++){\n matrix[0][i] =0 ;\n }\n }\n if(colFlag){\n for(int j=0;j<n;j++){\n matrix[j][0] = 0;\n }\n }\n\n\t}", "public void setZeroes1(int[][] matrix) {\n boolean col00 = false;\n\n int row, col;\n int rows = matrix.length;\n int cols = matrix[0].length;\n for (row = 0; row < rows; ++row) {\n for (col = 0; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n if (col != 0) {\n matrix[0][col] = 0;\n matrix[row][0] = 0;\n } else {\n col00 = true;\n }\n }\n }\n }\n for (row = rows - 1; row >= 0; --row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][0] == 0 || matrix[0][col] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (col00) {\n for (row = rows - 1; row >= 0; --row) {\n matrix[row][0] = 0;\n }\n }\n }", "public void update(int row, int col, int val) {\n int n = matrix[0].length;\n \n for(int i = col; i < n; i++){\n rowSums[row][i] = rowSums[row][i] - matrix[row][col] + val;\n }\n\n matrix[row][col] = val;\n }", "public static void betterApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\tboolean auxR[] = new boolean[m];\n\t\tboolean auxC[] = new boolean[n];\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tauxR[i] = false;\n\t\t}\n\t\t\n\t\tfor(int j = 0;j<n;j++){\n\t\t\tauxC[j] = false;\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tauxR[i] = true;\n\t\t\t\t\tauxC[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(auxR[i] == true || auxC[j] == true){\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected int sumAll() {\n\t\tint total = 0;\n\t\t//iterate all rows\n\t\tfor(int i = 0;i<size();i++){\n\t\t\t//itreate all columns\n\t\t\tfor(int j = 0;j<size();j++){\n\t\t\t\tInteger cell = matrix.get(i).get(j);\n\t\t\t\ttotal+=cell;\n\t\t\t}\n\t\t}\n\t\treturn total;\n\t}", "public static void bestApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\t\n\t\t//Taking two variables for storing status of first row and column\n\t\tboolean firstRow = false;\n\t\tboolean firstColumn = false;\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tif(i == 0) firstRow == true;\n\t\t\t\t\tif(j == 0) firstColumn == true;\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//any element except for first row and first column is zero\n\t\tfor(int i = 1;i<m;i++){\n\t\t\t\n\t\t\tfor(int j = 1;j<n;j++){\n\t\t\t\t//based on first row and first column making the entire column and row as zero\n\t\t\t\tif(matrix[0][j] == 0 || matrix[i][0] == 0){\n\t\t\t\t\t//Making first row and first column as zero\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Making every column value to 0 in first row\n\t\tif(firstRow){\n\t\t\t\n\t\t\tfor(int j = 0;j <n;j++){\n\t\t\t\tmatrix[0][j] = 0;\n\t\t\t}\n\t\t}\n\t\t//Making every row value to 0 in first column\n\t\tif(firstColumn){\n\t\t\t\n\t\t\tfor(int i = 0;i <m;i++){\n\t\t\t\tmatrix[i][0] = 0;\n\t\t\t}\n\t\t}\n\t}", "private int[] columnSum(int[][] matrix) {\n int[] result = new int[matrix.length];\n for(int i = 0; i < matrix.length; i++) {\n result[i] = 0;\n for(int j = 0; j < matrix[i].length; j++) {\n result[i] += matrix[i][j];\n }\n }\n return result;\n }", "public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }", "public double oneNorm(){\r\n \tdouble norm = 0.0D;\r\n \tdouble sum = 0.0D;\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tsum+=Math.abs(this.matrix[i][j]);\r\n \t\t}\r\n \t\tnorm=Math.max(norm,sum);\r\n \t}\r\n \treturn norm;\r\n \t}", "public void setZeroes(int[][] matrix) {\n if (matrix == null || matrix.length == 0) {\n return;\n }\n int[] m = new int[matrix.length];\n int[] n = new int[matrix[0].length];\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n if (matrix[i][j] == 0) {\n m[i]++;\n n[j]++;\n }\n }\n }\n for (int i = 0; i < m.length; i++) {\n if (m[i] > 0) {\n Arrays.fill(matrix[i], 0);\n }\n }\n for (int j = 0; j < n.length; j++) {\n if (n[j] > 0) {\n for (int k = 0; k < matrix.length; k++) {\n matrix[k][j] = 0;\n }\n }\n }\n }", "static void reducedSingular (double[][] S, int p)\n {\n\tfor (int i=p; i<S.length; i++) {\n\t S[i][i] = 0;\n\t}\n }", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "private void normalize(DMatrixRMaj M) {\n double suma=0;\n Equation eq = new Equation();\n eq.alias(M, \"M\");\n eq.alias(suma,\"s\");\n\n// for (int i=0;i<M.numRows;i++) {\n// for (int j = 0; j < M.numCols; j++) {\n// eq.alias(i, \"i\");\n// eq.alias(j, \"j\");\n// eq.process(\"s = s + M(i,j)\");\n//// suma = suma + M.get(i,j);\n// }\n// }\n// for (int i=0;i<M.numRows;i++){\n// for (int j=0;j<M.numCols;j++){\n//// eq.alias(i,\"i\");\n//// eq.alias(j,\"j\");\n//// eq.process(\"s = s + M(i,j)\");\n// M.set(i,j,M.get(i,j)/suma);\n// }\n for(int i=0; i < M.numRows; i++){\n eq.alias(i, \"i\");\n //eq.process(\"M(i,:) = exp(M(i,:) - max(M(i,:)))\"); // to prevent high values in exp(M)\n //eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n eq.process(\"M(i,:) = M(i,:) / sum(M(i,:))\");\n// eq.process(\"M(i,:) = M(i,:) / s\");\n }\n }", "private int getSumD1(int[][] a) {\n int sum = 0;\n for (int j = 0; j < a.length; j++) {\n sum += a[j][j];\n }\n return sum;\n }", "public int matrixScore(int[][] A) {\n int n = A.length, m = A[0].length, ans = 0;\n for (int i = 0; i < n; ++i) {\n if (A[i][0] == 0) {\n flipRow(A, i);\n }\n }\n for (int j = 1; j < m; ++j) {\n int cnt = 0;\n for (int i = 0; i < n; ++i) {\n cnt += A[i][j];\n }\n if (cnt * 2 < n) {\n flipCol(A, j);\n }\n }\n for (int i = 0; i < n; ++i) {\n int cur = 0;\n for (int j = 0; j < m; ++j) {\n cur = (cur << 1) + A[i][j];\n }\n ans += cur;\n }\n return ans;\n}", "public double l1_norm()\r\n {\r\n double sum = 0.0;\r\n for (Double c : this.values())\r\n sum += Math.abs(c);\r\n\r\n return sum;\r\n }", "Matrix sumRows(){\n Matrix matrix_to_return = new Matrix(1, this.cols);\n double[][] tmp = this.asArray();\n int k=0;\n for(int i=0; i<this.cols; i++){\n for(int j=0; j<this.rows; j++) {\n matrix_to_return.data[k] += tmp[j][i];\n }\n k++;\n }\n return matrix_to_return;\n }", "public void invert() {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n Double sim = get(first, second);\n \n if(sim!=null && sim > 0.0) {\n set(first, second, 1.0/sim);\n }\n \n }\n \n }\n }", "private void reduce(){\n int min;\n //Subtract min value from rows\n for (int i = 0; i < rows; i++) {\n min = source[i][0];\n for (int j = 1; j < cols; j++)\n if(source[i][j] < min) min = source[i][j];\n\n for (int j = 0; j < cols; j++)\n source[i][j] -= min;\n }\n\n //Subtract min value from cols\n for (int j = 0; j < cols; j++) {\n min = source[0][j];\n for (int i = 1; i < rows; i++)\n if(source[i][j] < min) min = source[i][j];\n\n for (int i = 0; i < rows; i++)\n source[i][j] -= min;\n\n }\n }", "public static void SumRowsColumns(int[][] array) {\n\n }", "public void plusEquals(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tthis.matrix[i][j] += bmat.matrix[i][j];\r\n\t \t}\r\n \t}\r\n \t}", "private static long[] sums(Mat m,boolean byRow) {\r\n\t\tint rows = m.rows();\r\n\t\tint cols = m.cols();\r\n\t\tbyte[] data = new byte[rows*cols];\r\n\t\tlong[] retSums = null;\r\n\t\t\r\n\t\tint status = m.get(0, 0,data);\r\n\t\t\r\n\t\tlong total = 0;\r\n\t\tfor (int k=0;k<data.length;k++) {\r\n\t\t\ttotal += Byte.toUnsignedInt(data[k]);\r\n\t\t}\r\n\t\tif (byRow) {\r\n\t\t\tretSums = new long[cols];\r\n\t\t\tfor (int col=0;col<cols;col++) {\r\n\t\t\t\tretSums[col] = 0;\r\n\t\t\t\tfor (int row=0;row<rows;row++) {\r\n\t\t\t\t\tint k = row*cols+col;\r\n\t\t\t\t\tretSums[col] += Byte.toUnsignedInt(data[k]);\r\n\t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n \t\t\tretSums = new long[rows];\r\n \t\t\tfor (int row=0;row<rows;row++) {\r\n \t\t\t\tretSums[row] = 0;\r\n \t\t\t\tfor (int col=0;col<cols;col++) {\r\n \t\t\t\t\tint k = row*cols+col;\r\n \t\t\t\t\tretSums[row] += Byte.toUnsignedInt(data[k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\t\t\r\n\t\tint total1 = 0;\r\n\t\tfor (int k=0; k < retSums.length; k++) {\r\n\t\t\ttotal1 += retSums[k];\r\n\t\t}\r\n\t\r\n\t\treturn retSums;\r\n\t}", "public static double sumMajorDiagonal(double[][] m) {\n double total = 0;\n for (int i = 0; i < m.length; i++) {\n total += m[i][i];\n }\n return total;\n }", "public void SetMatrixToOnes() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 1;\tthis.mat_f_m[0][2] = 1;\t this.mat_f_m[0][3] = 1;\n\tthis.mat_f_m[1][0] = 1;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 1;\t this.mat_f_m[1][3] = 1;\n\tthis.mat_f_m[2][0] = 1;\t this.mat_f_m[2][1] = 1;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 1;\n\tthis.mat_f_m[3][0] = 1;\t this.mat_f_m[3][1] = 1;\tthis.mat_f_m[3][2] = 1;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public static int noDiagSum(int[][] a) {\r\n\t\tint rowNum = a.length;\r\n\t\tint colNum = a[0].length;\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < rowNum; i++) {\r\n\t\t\tfor (int j = 0; j < colNum; j++) {\r\n\t\t\t\tif (i != j) {\r\n\t\t\t\t\tsum += a[i][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public void setZeroes_ok(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\n\t\tif (m == 1) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[0][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\t\tmatrix[0][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (n == 1) {\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tif (matrix[i][0] == 0) {\n\t\t\t\t\tfor (int k = 0; k < m; k++) {\n\t\t\t\t\t\tmatrix[k][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint idx = 0;\n\t\tboolean[][] visit = new boolean[m][n];\n\t\twhile (idx <= m * n - 1) {\n\t\t\tint i = idx / n;\n\t\t\tint j = idx % n;\n\t\t\tif (i < m && j < n && matrix[i][j] == 0 && visit[i][j] == false) {\n\t\t\t\t// set whole row to 0\n\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\tif (matrix[i][k] != 0) {\n\t\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t\t\tvisit[i][k] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set whole col to 0\n\t\t\t\tfor (int l = 0; l < m; l++) {\n\t\t\t\t\tif (matrix[l][j] != 0) {\n\t\t\t\t\t\tmatrix[l][j] = 0;\n\t\t\t\t\t\tvisit[l][j] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t}", "public static void bruteForceSolution(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\t\n\t\tint aux[][] = new int [m][n];\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\taux[i][j] = 1;\n\t\t\t}\n\t\t}\n\t\t// if found 0 in main array making row and column in the auxilary row and column as 0\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\t\n\t\t\t\t\tfor(int k = 0;k<m;k++){\n\t\t\t\t\t\taux[k][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 0;k<n;k++){\n\t\t\t\t\t\taux[i][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//copying elements back to main array\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tmatrix[i][j] = aux[i][j];\n\t\t\t}\n\t\t}\n\t}", "protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }", "public void matrizInversa(){\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n //System.out.println(\"\");getDeter();\n getMatriz()[i][j] = getMatrizAdjunta()[i][j]/getDeter();\n }\n }\n mostrarMatriz(getMatriz(),\"Matriz inversa\");\n }", "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "private static double[] normalize(double[] data)\n {\n double sum = 0;\n \n for (double d : data)\n sum += d;\n \n if (sum != 1 && sum != 0)\n {\n for (int i = 0; i < data.length; i++)\n data[i] /= sum;\n }\n \n return data;\n }", "public static long checksum(int[][] m){\n long s = 0;\n for (int i = 0; i < m.length; i++)\n for (int j = 0; j < m[0].length; j++)\n s += m[i][j];\n return s;\n }", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "private void makeMoreZeroes( final double[][] matrix, final int[] coveredRows, final int[] coveredCols )\n\t{\n\t\tdouble minUncoveredValue = Double.MAX_VALUE;\n\t\tfor ( int i = 0; i < matrix.length; i++ )\n\t\t{\n\t\t\tif ( 0 == coveredRows[ i ] )\n\t\t\t{\n\t\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t\t{\n\t\t\t\t\tif ( 0 == coveredCols[ j ] && matrix[ i ][ j ] < minUncoveredValue )\n\t\t\t\t\t{\n\t\t\t\t\t\tminUncoveredValue = matrix[ i ][ j ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add the min value to all covered rows\n\t\tfor ( int i = 0; i < coveredRows.length; i++ )\n\t\t{\n\t\t\tif ( 1 == coveredRows[ i ] )\n\t\t\t{\n\t\t\t\tfor ( int j = 0; j < matrix[ i ].length; j++ )\n\t\t\t\t{\n\t\t\t\t\tmatrix[ i ][ j ] += minUncoveredValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// subtract the min value from all uncovered columns\n\t\tfor ( int i = 0; i < coveredCols.length; i++ )\n\t\t{\n\t\t\tif ( 0 == coveredCols[ i ] )\n\t\t\t{\n\t\t\t\tfor ( int j = 0; j < matrix.length; j++ )\n\t\t\t\t{\n\t\t\t\t\tmatrix[ j ][ i ] -= minUncoveredValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void changeFirstRowAndColumn(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++) {\n if(matrix[i][j]==0){\n matrix[i][0]=0;\n matrix[0][j]=0;\n }\n }\n }\n }", "public static Matrix sum(Matrix m) {\n int rows_c = m.rows(), cols_c = m.cols();\n Matrix d;\n if (rows_c == 1) {\n return m;\n } else {\n d = MatrixFactory.getMatrix(1, cols_c,m);\n for (int col = 1; col <= cols_c; col++) {\n double sumCol = 0D;\n for (int row = 1; row <= rows_c; row++) {\n sumCol += m.get(row, col);\n }\n d.set(1, col, sumCol);\n }\n }\n return d;\n }", "public static void gaussElimination(Matriks m) {\n swapCount = 0;\n constant = 1;\n\n if (m.baris > m.kolom-1) {\n m.baris = m.kolom-1;\n }\n\n for (int iBrs = 0; iBrs < m.baris; iBrs++) {\n int iKol = iBrs;\n while (allElmtColUnderIs0(m,iBrs,iKol) && (iKol<m.kolom-1)) {\n iKol++;\n }\n if (m.ELMT[iBrs][iKol] == 0) {\n orderRow(m, iBrs, iKol);\n }\n // mengubah elemen baris dibawah berdasar baris-iBrs (referensi)\n if (!((iKol==m.kolom-1) && allElmtColUnderIs0(m,iBrs,iKol))) {\n // jika sudah di kolom terakhir dan elemen kolomnya kebawah adalah 0\n // maka tidak perlu dievaluasi lagi ntuk menghindari NaN\n for (int j = iBrs+1; j<m.baris; j++) {\n double coeff = m.ELMT[j][iKol]/m.ELMT[iBrs][iKol];\n for (int k=iKol; k<m.kolom; k++) {\n m.ELMT[j][k] -= m.ELMT[iBrs][k] * coeff;\n }\n }\n }\n }\n\n // Membuat leading one tiap baris (jika elemen baris tidak all 0)\n for(int i=0; i<m.baris; i++) {\n if (!allElmtRowIs0(m, i)) {\n int iLead=0;\n while (iLead<m.kolom && m.ELMT[i][iLead]==0) {\n iLead++;\n }\n double factor = m.ELMT[i][iLead];\n constant /= factor;\n for (int j=iLead; j<m.kolom; j++) {\n if (m.ELMT[i][j] != 0) {\n m.ELMT[i][j] /= factor;\n }\n }\n }\n }\n //displayMatrix(m);\n }", "int absoluteValuesSumMinimization(int[] a) {\n return a[(a.length-1)/2];\n }", "public double [][] reduceVectors(RealMatrix inputMatrix) {\n double [][] d1 = inputMatrix.getData();\n double [][] outputArray = new double [d1.length][4];\n for (int i = 0; i < outputArray.length; i++) {\n for (int j = 0; j < outputArray[0].length; j++) {\n outputArray[i][j] = d1[i][j];\n }\n }\n return outputArray;\n }", "public static int[] reduce (int []n1) {\n\t\tfor (int i = 0; i < n1.length; i++) {\n\t\t\tif (n1[i] != 0) {\n\t\t\t\tif (i == 0) return copy(n1);\n\t\t\t\t\n\t\t\t\tint []newVal = new int[n1.length-i];\n\t\t\t\textract(newVal,0,n1,i,n1.length-i);\n\t\t\t\treturn newVal;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// just zero.\n\t\treturn new int[]{0};\n\t}", "private double[][] normalize255(RealMatrix realMatrix) {\n\t\tdouble[][] input = realMatrix.getData();\n\t\tdouble[][] normalized = new double[realMatrix.getRowDimension()][realMatrix.getColumnDimension()];\n\t\tdouble minimum = 99999.99;\n\t\tdouble maximum = -9999.99;\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tminimum = Math.min(minimum, input[i][j]);\n\t\t\t\tmaximum = Math.max(maximum, input[i][j]);\n\t\t\t}\n\t\t}\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tnormalized[i][j] = ((input[i][j] - minimum)*(255/(maximum-minimum)));\n\t\t\t}\n\t\t}\n\t\treturn normalized;\n\t}", "public static void solution1(int[][] grid) {\n int M = grid.length;\n int N = grid[0].length;\n\n // Loop through 2-d grid to figure out which rows & columns have a 0\n boolean[] rows = new boolean[M];\n boolean[] cols = new boolean[N];\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (grid[row][col] == 0) {\n rows[row] = true;\n cols[col] = true;\n }\n }\n }\n\n // Re-loop through 2-d matrix and set whichever entries are necessary to 0\n for (int row = 0; row < M; row++) {\n for (int col = 0; col < N; col++) {\n if (rows[row] == true || cols[col] == true) {\n grid[row][col] = 0;\n }\n }\n }\n }", "private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}", "public void setZeroes(int[][] matrix) {\n\t\t\tint m = matrix.length;\n\t\t\tint n = matrix[0].length;\n\t\t\t\n\t\t\tboolean fc = false, fr = false; // first row, first column as markers\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (matrix[i][j] == 0) {\n\t\t\t\t\t\tif (i == 0) fr = true;\n\t\t\t\t\t\tif (j == 0) fc = true;\n\t\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 1; i < m; i++) {\n\t\t\t\tfor (int j = 1; j < n; j++) {\n\t\t\t\t\tif (matrix[0][j] == 0 || matrix[i][0] == 0) {\n\t\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fr) {\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tmatrix[0][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (fc) {\n\t\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\t\tmatrix[i][0] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static Matrix sinc(Matrix matrix)\n {\n double[][] M = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double[][] C = X.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n if (M[i][j] == 0.0d)\n {\n C[i][j] = 1.0;\n }\n else\n {\n C[i][j] = Math.sin(M[i][j]) / M[i][j];\n }\n }\n }\n return X;\n }", "public double negativeElementsSum(double[] arr) {\n return 0;\n }", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "public void correctWeights() {\n double tmp;\n\n for(int i = 0; i < inputs; ++i) {\n //temporary store old value\n tmp = weights[i];\n // correct weight's value using MOMENTUM parameter\n weights[i] += changes[i] + MOMENTUM * (weights[i] - exWeights[i]);\n //store old value in class member\n exWeights[i] = tmp;\n // clear corrections value\n changes[i] = 0.0;\n }\n\n // const input weight correction if const input is enabled\n if (enableConstAddend) {\n // temporary store old value\n tmp = weights[inputs];\n // change weight's value using MOMENTUM parameter\n weights[inputs] += changes[inputs] + MOMENTUM * (weights[inputs] - exWeights[inputs]);\n // store old value\n exWeights[inputs] = tmp;\n // clear value of calculated change\n changes[inputs] = 0.0;\n }\n }", "public int manhattan() {\n int sum = 0;\n for (int i = 0; i < blocks.length; i++){\n for (int j = 0; j < blocks.length; j++){\n int value = blocks[i][j];\n if (value == 0)\n continue;\n\n sum += Math.abs((value-1) / dimension() - i);\n sum += Math.abs((value-1) % dimension() - j);\n }\n }\n return sum;\n }", "@Override\n\tpublic int[][] computeAssignments( final double[][] matrix )\n\t{\n\t\tfinal int nlines = matrix.length;\n\t\tif ( nlines == 0 )\n\t\t{\n\t\t\t// no spot\n\t\t\treturn new int[][] { {} };\n\t\t}\n\t\tfinal int ncols = matrix[ 0 ].length;\n\t\tif ( nlines <= 1 && ncols <= 1 )\n\t\t\treturn new int[][] { {} };\n\n\t\t// subtract minimum value from rows and columns to create lots of zeroes\n\t\treduceMatrix( matrix );\n\n\t\t// non negative values are the index of the starred or primed zero in\n\t\t// the row or column\n\t\tfinal int[] starsByRow = new int[ matrix.length ];\n\t\tArrays.fill( starsByRow, -1 );\n\t\tfinal int[] starsByCol = new int[ matrix[ 0 ].length ];\n\t\tArrays.fill( starsByCol, -1 );\n\t\tfinal int[] primesByRow = new int[ matrix.length ];\n\t\tArrays.fill( primesByRow, -1 );\n\n\t\t// 1s mean covered, 0s mean not covered\n\t\tfinal int[] coveredRows = new int[ matrix.length ];\n\t\tfinal int[] coveredCols = new int[ matrix[ 0 ].length ];\n\n\t\t// star any zero that has no other starred zero in the same row or\n\t\t// column\n\t\tinitStars( matrix, starsByRow, starsByCol );\n\t\tcoverColumnsOfStarredZeroes( starsByCol, coveredCols );\n\n\t\twhile ( !allAreCovered( coveredCols ) )\n\t\t{\n\n\t\t\tint[] primedZero = primeSomeUncoveredZero( matrix, primesByRow, coveredRows, coveredCols );\n\n\t\t\twhile ( primedZero == null )\n\t\t\t{\n\t\t\t\t// keep making more zeroes until we find something that we can\n\t\t\t\t// prime (i.e. a zero that is uncovered)\n\t\t\t\tmakeMoreZeroes( matrix, coveredRows, coveredCols );\n\t\t\t\tprimedZero = primeSomeUncoveredZero( matrix, primesByRow, coveredRows, coveredCols );\n\t\t\t}\n\n\t\t\t// check if there is a starred zero in the primed zero's row\n\t\t\tfinal int columnIndex = starsByRow[ primedZero[ 0 ] ];\n\t\t\tif ( -1 == columnIndex )\n\t\t\t{\n\n\t\t\t\t// if not, then we need to increment the zeroes and start over\n\t\t\t\tincrementSetOfStarredZeroes( primedZero, starsByRow, starsByCol, primesByRow );\n\t\t\t\tArrays.fill( primesByRow, -1 );\n\t\t\t\tArrays.fill( coveredRows, 0 );\n\t\t\t\tArrays.fill( coveredCols, 0 );\n\t\t\t\tcoverColumnsOfStarredZeroes( starsByCol, coveredCols );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t// cover the row of the primed zero and uncover the column of\n\t\t\t\t// the starred zero in the same row\n\t\t\t\tcoveredRows[ primedZero[ 0 ] ] = 1;\n\t\t\t\tcoveredCols[ columnIndex ] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// ok now we should have assigned everything\n\t\t// take the starred zeroes in each column as the correct assignments\n\n\t\tfinal int[][] retval = new int[ matrix.length ][];\n\t\tfor ( int i = 0; i < starsByCol.length; i++ )\n\t\t{\n\t\t\tretval[ i ] = new int[] { starsByCol[ i ], i };\n\t\t}\n\t\treturn retval;\n\n\t}", "public static void plus1(int[]arr)\r\n\t{\r\n\t\tint i=arr.length-1;\r\n\t\twhile(i>=0&&arr[i]==1)\r\n\t\t\tarr[i--]=0;\r\n\t\tif(i>=0)\r\n\t\t\tarr[i]=1;\r\n\t}", "public void timesEquals(double constant){\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\tthis.matrix[i][j] *= constant;\r\n \t\t}\r\n \t}\r\n \t}", "public void setZeroes2(int[][] matrix) {\n boolean row00 = false;\n boolean col00 = false;\n\n int row = 0, col = 0;\n int rows = matrix.length;\n int cols = matrix[0].length;\n while (col < cols && !row00) {\n row00 = matrix[0][col++] == 0;\n }\n while (row < rows && !col00) {\n col00 = matrix[row++][0] == 0;\n }\n\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n matrix[row][0] = 0;\n matrix[0][col] = 0;\n }\n }\n }\n for (row = 1; row < rows; ++row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[0][col] == 0 || matrix[row][0] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (row00) {\n for (col = 0; col < cols; ++col) {\n matrix[0][col] = 0;\n }\n }\n if (col00) {\n for (row = 0; row < rows; ++row) {\n matrix[row][0] = 0;\n }\n }\n }", "@Override\n\tpublic void computeColSums(double[] c, int nRows) {\n\t\tsuper.computeColSums(c, nRows);\n\t\t// and add reference multiplied with number of rows.\n\t\tfor(int i = 0; i < _colIndexes.length; i++)\n\t\t\tc[_colIndexes[i]] += _reference[i] * nRows;\n\t}", "public static void makeRowsCols0(int [][]input) {\n\t\tint previ=-1,prevj=-1;\n\t\tfor(int i=0;i<input.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<input[0].length;j++)\n\t\t\t{\n\t\t\t\tif(input[i][j]==0)\n\t\t\t\t{\t\n\t\t\t\t\tif(i!=previ&&j!=prevj)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int k=0;k<input.length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[k][j]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int k=0;k<input[0].length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[i][k]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprevi=i;\n\t\t\t\t\t\tprevj=j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void add(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] += skalar;\r\n }\r\n }\r\n }", "private static void changeSubMatrix(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++){\n if(matrix[i][0]==0 || matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n }", "protected static double seqArraySum(final double[] input) {\n double sum = 0;\n\n // Compute sum of reciprocals of array elements\n for (int i = 0; i < input.length; i++) {\n sum += 1 / input[i];\n }\n\n return sum;\n }", "@Override\n\tpublic IDoubleVector sumColumns() {\n\t\treturn null;\n\t}", "public static void method1(int numRows) {\n List<List<Integer>> pt = new ArrayList<>();\n List<Integer> row, pre = null;\n for (int i = 0; i < numRows; ++i) {\n row = new ArrayList<>();\n for (int j = 0; j <= i; ++j) {\n if (j == 0 || j == i) {\n row.add(1);\n } else {\n row.add(pre.get(j - 1) + pre.get(j));\n }\n }\n pre = row;\n pt.add(row);\n }\n\n for (List<Integer> a : pt) {\n for (int i: a) {\n System.out.print(i + \" \");\n }\n System.out.println();\n }\n }", "float DetGauss(Matrix m){\r\n Matrix mtemp = new Matrix(m.M);\r\n float hasil=1;\r\n int count = 0;\r\n int swap = -1;\r\n for(int i=0;i<mtemp.rows-1;i++){\r\n for(int j=i+1; j<mtemp.rows; j++){\r\n if(mtemp.M[i][i]<mtemp.M[j][i]){\r\n count++;\r\n swapRow(mtemp,i,j);\r\n\r\n }\r\n }\r\n for(int k=i+1; k<mtemp.rows; k++){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=0;j<mtemp.cols;j++){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n for(int i=0; i<mtemp.rows; i++){\r\n hasil *= mtemp.M[i][i];\r\n }\r\n if(count==0){\r\n swap = 1;\r\n }else{\r\n for(int i=1; i<count; i++){\r\n swap = swap * (-1);\r\n }\r\n }\r\n return hasil*swap;\r\n }", "private void convoluteMatrix(){\n\t\tDoubleFFT_2D fft = new DoubleFFT_2D(CELL_SIDE_COUNT,CELL_SIDE_COUNT);\n\t\tdouble[][] convolutedDoubles = Complex.complexToDoubleArray2D(convolutedMatrix);\n\t\tfft.complexForward(convolutedDoubles);\n\t\tconvolutedMatrix = Complex.doubleToComplexArray2D(convolutedDoubles); //F(B C F^-1(Q)) Pg. 182 Lee[05]\n\t}", "public int[][] removeOne(int[][] matrix, int x, int y) {\n while(x < matrix.length){\n if(matrix[x][y] == 1)\n matrix[x][y] = 0;\n x++;\n }\n return matrix;\n }", "public void makeRowStochastic() {\n \n for(T row : getFirstDimension()) {\n \n double sum = 0.0;\n \n // sum all values of the current row\n for(T col : getMatches(row)) {\n \n sum += get(row, col);\n \n }\n \n // divide each value by the sum\n for(T col : getMatches(row)) {\n \n set(row, col, get(row, col) / sum);\n \n }\n }\n \n }", "public static double [][] inv(double [][] a) {\n int N = a.length;\n double [] col = new double[N];\n int [] indx = new int[N];\n double [][] y = new double[N][N];\n \n double d = ludcmp(a, indx);\n for (int j=0; j<N; j++ ) {\n for (int i=0; i<N; i++) \n col[i] = 0.0;\n col[j] = 1.0;\n lubksb(a, indx, col);\n for (int i=0; i<N; i++)\n y[i][j] = col[i];\n }\n return y; \n }", "public double elementSum() {\n return ops.elementSum(mat);\n }", "private Matrix gaussianEliminate(){\r\n\t\t//Start from the 0, 0 (top left)\r\n\t\tint rowPoint = 0;\r\n\t\tint colPoint = 0;\r\n\t\t// instantiate the array storing values for new Matrix\r\n\t\tDouble[][] newVal = deepCopy(AllVal);\r\n\t\twhile (rowPoint < row && colPoint < col) {\r\n\t\t\t// find the index with max number (absolute value) from rowPoint to row\r\n\t\t\tDouble max = Math.abs(newVal[rowPoint][colPoint]);\r\n\t\t\tint index = rowPoint;\r\n\t\t\tint maxindex = rowPoint;\r\n\t\t\twhile (index < row) {\r\n\t\t\t\tif (max < Math.abs(newVal[index][colPoint])) {\r\n\t\t\t\t\tmax = newVal[index][colPoint];\r\n\t\t\t\t\tmaxindex = index;\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t\t// if max is 0 then that must mean there are no pivots\r\n\t\t\tif (max == 0) {\r\n\t\t\t\tcolPoint++;\r\n\t\t\t}else {\r\n\t\t\t\t//TODO: refactor into method\r\n\t\t\t\tDouble[] Temp = newVal[rowPoint];\r\n\t\t\t\tnewVal[rowPoint] = newVal[maxindex];\r\n\t\t\t\tnewVal[maxindex] = Temp;\r\n\t\t\t\t// Fill 0 lower part of pivot\r\n\t\t\t\tfor(int lower = rowPoint + 1; lower < row; lower++) {\r\n\t\t\t\t\tDouble ratio = newVal[lower][colPoint]/newVal[rowPoint][colPoint];\r\n\t\t\t\t\tnewVal[lower][colPoint] = (Double) 0.0;\r\n\t\t\t\t\t// adjust for the remaining element\r\n\t\t\t\t\tfor (int remain = colPoint + 1; remain < col; remain++) {\r\n\t\t\t\t\t\tnewVal[lower][remain] = newVal[lower][remain] - newVal[lower][remain]*ratio;\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\trowPoint++;\r\n\t\t\t\tcolPoint++;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Matrix(newVal);\r\n\t}", "public void normalizeTable() {\r\n for (int i = 0; i < this.getLogicalColumnCount(); i++) {\r\n normalizeColumn(i);\r\n }\r\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n //System.out.println(N);\n int[][] array = new int[N][N];\n for(int i = 0 ; i < N ; i++){\n for(int j =0 ; j < N; j++){\n int val = in.nextInt();\n array[i][j] = val; \n } \n }\n int sum1 = 0;\n for(int i = 0 ; i < N ; i++){\n sum1+= array[i][i];\n }\n //System.out.println(sum1);\n int sum2 = 0;\n int tempCol =N-1;\n for(int i =0 ; i < N ; i++){\n sum2+= array[i][tempCol];\n tempCol--;\n }\n //System.out.println(sum2);\n sum1 = Math.abs(sum1-sum2);\n System.out.println(sum1);\n }", "public static int sum1( int[][] a )\n {\n\t int sum = 0;\t\t\t\t\t\t\t\t\t//initiate variable to hold value of sum \n\n\t for (int i = 0; i < a.length; i++) {\t\t\t//iterate over each array\n\n\t\t for (int n = 0; n < a[i].length; n++) {\t//iterate over the contents of each array\n\t\t\t sum += a[i][n];\t\t\t\t\t\t//add each value to the sum variable\n\t\t }\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t\t\t//return said sum variable\n }", "public void minusEquals(Matrix bmat){\r\n \tif((this.nrow!=bmat.nrow)||(this.ncol!=bmat.ncol)){\r\n \t\tthrow new IllegalArgumentException(\"Array dimensions do not agree\");\r\n \t}\r\n \tint nr=bmat.nrow;\r\n \tint nc=bmat.ncol;\r\n\r\n \tfor(int i=0; i<nr; i++){\r\n \t\tfor(int j=0; j<nc; j++){\r\n \t\tthis.matrix[i][j] -= bmat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \t}", "public static double[] sumEachColumn(double[][] a) {\n \n double[] out = new double[a[0].length];\n for (int r = 0; r < a.length; ++r) {\n for (int c = 0; c < a[r].length; ++c) {\n out[c] += a[r][c];\n }\n }\n \n return out;\n }", "static private double[][] initMatrix(double[][] c) {\n final int N = c.length;\n final double value = 1 / Math.sqrt(2.0);\n\n for (int i = 1; i < N; i++) {\n for (int j = 1; j < N; j++) {\n c[i][j] = 1;\n }\n }\n\n for (int i = 0; i < N; i++) {\n c[i][0] = value;\n c[0][i] = value;\n }\n c[0][0] = 0.5;\n return c;\n }", "public static Matrix cosh(Matrix matrix)\n {\n double[][] M = matrix.getArray();\n int row = matrix.getRowDimension(), col = matrix.getColumnDimension();\n Matrix X = new Matrix(row, col);\n double val = 1.0;\n double[][] C = X.getArray();\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n val = Math.exp(M[i][j]);\n val = 0.5 * (val + 1 / val);\n C[i][j] = val;\n }\n }\n return X;\n }", "public static int sum2( int [][] m )\n {\n int sum = 0; //initialize sum\n int v = 0; //initialize a row counter\n for (int[] i : m) { //for each array in m, make an array called i\n\t sum += sumRow( v, m); //add the sumRow of the row counter and\n\t //original array to the stated sum\n\t v++; //add 1 to the counter\n }\n return sum; //return sum, an int\n }", "static int diagonalDifference(int[][] matrix) {\n int ltr = 0;\n int rtl = 0;\n for (int i = 0; i < matrix.length; i++) {\n System.out.println(\"matrix[\" + i + \"][\" + i + \"]: \" + matrix[i][i]);\n ltr += matrix[i][i];\n System.out.println(\"matrix[ \" + (i) + \"][\" + (matrix.length - 1 - i) + \"]: \" + matrix[matrix.length - 1 - i][matrix.length - 1 - i]);\n rtl += matrix[i][matrix.length - 1 - i];\n }\n int result = ltr - rtl;\n return result < 0 ? result * -1 : result;\n }", "public void permutate(double[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public void nullifyMatrixEfficient(int[][] mat) {\r\n boolean hasRow=false, hasCol=false;\r\n //checking first row and colmun about having any zero so later we can nullify it\r\n for (int i=0;i<mat[0].length;i++ ) {\r\n if(mat[0][i] == 0) {\r\n hasRow = true;\r\n break;\r\n }\r\n }\r\n for (int i=0;i<mat.length;i++ ) {\r\n if(mat[i][0] == 0) {\r\n hasCol = true;\r\n break;\r\n }\r\n }\r\n //checking zeros existance and marking their coresponding first row and col to zero\r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n mat[0][j] = 0;\r\n mat[i][0] = 0;\r\n }\r\n }\r\n }\r\n //nullify all columns with first element is zero\r\n for(int i=0; i<mat[0].length; i++) {\r\n if(mat[0][i] == 0)\r\n helperNullifyColumn(mat, i);\r\n }\r\n \r\n //nullify all rows with first element is zero\r\n for(int i=0; i<mat.length; i++) {\r\n if(mat[i][0] == 0)\r\n helperNullifyRow(mat, i);\r\n }\r\n printMat(mat);\r\n }", "private void sigmoid(double[][] matrix) {\n\t\t// Sigmoid function:\n\t\t// = 1/(1+e^(-(inputs.weights)))\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\t\tmatrix[i][j] = 1.0 / (1.0 + Math.exp(-matrix[i][j]));\n\t\t\t}\n\t\t}\n\t}", "public static int sum1( int[][] a )\n {\n int sum = 0; //initialize sum\n for (int[] i : a) { //for each array a, turn into an array called i\n\t for (int j : i) { //and then for each value in i...\n\t sum += j; //add the value of it to the sum\n\t }\n }\n return sum; //return the sum, an int\n }", "void markRowAndColumnZero(int[][] matrix) {\n HashSet<Integer> rows = new HashSet<Integer>();\n HashSet<Integer> columns = new HashSet<Integer>();\n for(int i=0; i< matrix.length;i++) {\n for(int j =0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) {\n rows.add(i);\n columns.add(j);\n }\n }\n }\n Iterator<Integer> rowsIterator = rows.iterator();\n while(rowsIterator.hasNext()) {\n int rowToBeSetToZero = rowsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[rowToBeSetToZero][0] = 0;\n }\n }\n\n Iterator<Integer> columnsIterator = columns.iterator();\n while(columnsIterator.hasNext()) {\n int columnToBeSetToZero = columnsIterator.next();\n for(int i=0;i< matrix[0].length;i++) {\n matrix[i][columnToBeSetToZero] = 0;\n }\n }\n\n return;\n\n\n }", "@Override\n\tprotected void computeSumSq(double[] c, int nRows) {\n\t\tc[0] += _dict.sumSqWithReference(getCounts(), _reference);\n\t\tfinal double refSum = FORUtil.refSumSq(_reference);\n\t\t// Square sum of the reference values only for the rows that is not represented in the Offsets.\n\t\tc[0] += refSum * (_numRows - _data.size());\n\t}", "public static int[][] preProcess(int mat[][]) {\n int[][] prefixSumMatrix = new int[mat.length][mat[0].length];\n\n int count = 0;\n // PrePopulate 1st Row\n for (int[] row : mat) {\n for (int i : row) {\n prefixSumMatrix[0][count++] = i;\n }\n break;\n }\n // Run through all cols\n for (int i = 1; i < mat.length; i++) {\n for (int j = 0; j < mat[i].length; j++) {\n prefixSumMatrix[i][j] = mat[i][j] + prefixSumMatrix[i - 1][j];\n }\n }\n LogUtil.logIt(\"Col Prefix Sum.....\");\n LogUtil.printMultiDimensionArray(prefixSumMatrix);\n\n // Now Row Prefix Sum\n for (int i = 0; i < mat.length; i++) {\n for (int j = 1; j < mat[i].length; j++) {\n prefixSumMatrix[i][j] = prefixSumMatrix[i][j - 1] + prefixSumMatrix[i][j];\n }\n }\n\n LogUtil.logIt(\"Col Prefix Sum.....\");\n LogUtil.printMultiDimensionArray(prefixSumMatrix);\n return prefixSumMatrix;\n }", "public Matrix[] palu() {\n\t\tHashMap<Integer, Integer> permutations = new HashMap<Integer,Integer>();\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tpermutations.put(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tMatrix p = identity(m.M);\n\t\tfor (Integer rowI : permutations.keySet()) {\n\t\t\tp.rowSwitch(rowI, permutations.get(rowI));\n\t\t}\n\t\tMatrix l = identity(m.M);\n\t\tMatrix u = p.multiply(copy());\n\t\t\n\t\tpivotRow = 0;\n\t\tfor (int col = 0; col < u.N; col++) {\n\t\t\tif (pivotRow < u.M) {\n\t\t\t\t// Should not have to do any permutations\n\t\t\t\tif (!u.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < u.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = u.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = u.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tu = u.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t\tl = l.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tl = l.inverse();\n\t\tMatrix[] palu = {p, this, l, u};\n\t\treturn palu;\n\t}", "protected void updateArrayBySumOfElements(int arr[], int n) { \n\n\t\tif (n <= 1) { \n\t\t return; \n\t\t} \n\t\tint prev = arr[0]; \n\t\tarr[0] = arr[0] + arr[1]; \n \n\n \tfor (int i = 1; i < n - 1; i++) { \n \t\tint curr = arr[i]; \n \t\tarr[i] = prev + arr[i + 1]; \n \t\tprev = curr; \n \t} \n \tarr[n - 1] = prev + arr[n - 1]; \n\t}", "public int[][] zeroMatrix(int[][] matrix){\n\tboolean[][] zeros = new boolean[matrix.length][matrix[0].length];\n\tfor (int i = 0; i < matrix.length; i++){\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (matrix[i][j] == 0) zeros[i][j] = true;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < matrix.length; i++) {\n\t\tfor (int j = 0; j < matrix[0].length; j++) {\n\t\t\tif (zeros[i][j]){\n\t\t\t\tfor (int k = 0; k < matrix.length; k++){\n\t\t\t\t\tmatrix[k][j] = 0;\n\t\t\t\t}\n\t\t\t\tfor (int k = 0; k < matrix[0].length; k++){\n\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn matrix;\n}", "public void timesEquals(Matrix bmat){\r\n \tif(this.ncol!=bmat.nrow)throw new IllegalArgumentException(\"Nonconformable matrices\");\r\n\r\n \tdouble sum = 0.0D;\r\n\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<bmat.ncol; j++){\r\n \t\tsum=0.0D;\r\n \t\tfor(int k=0; k<this.ncol; k++){\r\n \t\t\tsum += (this.matrix[i][k]*bmat.matrix[k][j]);\r\n \t\t}\r\n \t\tthis.matrix[i][j] = sum;\r\n \t\t}\r\n \t}\r\n \t}", "@Override\n\tpublic double calculaDiagonal() {\n\t\treturn 0;\n\t}", "static void setFirstColumnToZero(int[][] matrix,int numberOfRows){\n for(int i=0;i<numberOfRows;i++){\n matrix[i][0]=0;\n }\n }", "@Override\n\tpublic void algorithm() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\t\n\t\tint change = 2;\n\t\t\n\t\tfor(int i=0; i<this.getGridGame().getGridRow(); i++) {\n\t\t\t\n\t\t\tfor(int j=0; j<this.getGridGame().getGridCol(); j++) {\n\t\t\t\t\n\t\t\t\tif(j > 0 && j < this.getGridGame().getGridCol()) {\n\t\t\t\t\t\n\t\t\t\t\tif(this.getGridGame().getPattern(i,j-1) != this.getGridGame().getPattern(i,j)) {\n\t\t\t\t\t\n\t\t\t\t\t\tchange--;\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\t\n\t\t\t\tif(change > 0) {\n\t\t\t\t\t\n\t\t\t\t\tthis.getArray()[i][0] += this.getGridGame().getPattern(i,j);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tthis.getArray()[i][1] += this.getGridGame().getPattern(i,j);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(change + \" \");\n\t\t\tchange = 2;\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=0; i<this.getGridGame().getGridRow(); i++) {\n\t\t\t\n\t\t\tif(this.getArray()[i][1] == 0) {\n\t\t\t\t\n\t\t\t\tthis.getArray()[i][1] = this.getArray()[i][0];\n\t\t\t\tthis.getArray()[i][0] = 0;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i=0; i<this.getGridGame().getGridRow(); i++) {\n\t\t\t\n\t\t\tfor(int j=0; j<2; j++) {\n\t\t\t\n\t\t\t\tSystem.out.print(this.getArray()[i][j] + \" \");\n\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t\t\n\t\t}\n\t\t\n\t\n\t}", "public static int sum2( int [][] m )\n {\n\t int sum = 0;\t\t\t\t\t\t\t//initialize variable to hold/track sum so far\n\t\n\t for (int i = 0; i < m.length; i++) { \t//loop through the arrays\n\n\t\t sum += sumRow1(i, m);\t\t\t\t//procure the sum of each row, and add it to the sum variable\n\n\t }\n\n\t return sum;\t\t\t\t\t\t\t//return the sum\n }", "public static void flipHorizontalAxis(int[][] matrix) {\n for(int i = matrix.length - 1; i >= matrix.length/2; i-- ){\n for(int j = 0; j < matrix[i].length; j++){\n int temp = matrix[i][j];\n matrix[i][j] = matrix[(matrix.length - 1) - i][j];\n matrix[(matrix.length - 1) - i][j] = temp;\n }\n }\n}", "public static void zeroMatrix(int[][] matrix) {\n printMatrix(matrix);\n\n boolean [] rowZero = new boolean[matrix.length];\n boolean [] colZero = new boolean[matrix[0].length];\n\n for (int row = 0; row < matrix.length; row++) {\n for (int col = 0; col < matrix[0].length; col++) {\n if (matrix[row][col] == 0) {\n rowZero[row] = true;\n colZero[col] = true;\n }\n }\n }\n\n for (int r = 0; r < rowZero.length; r++) {\n if (rowZero[r]) {\n for (int i = 0; i < colZero.length; i++) {\n matrix[r][i] = 0;\n }\n }\n }\n\n for (int c = 0; c < colZero.length; c++) {\n if (colZero[c]) {\n for (int i = 0; i < rowZero.length; i++) {\n matrix[i][c] = 0;\n }\n }\n }\n\n printMatrix(matrix);\n }", "private static void setFirstRowToZero(int[][] matrix,int numberOfColumns){\n for(int i=0;i<numberOfColumns;i++){\n matrix[0][i]=0;\n }\n }", "public double[][] normalize( double[][] data )\n {\n double[][] result = new double[ data.length ][];\n\n for( int i=0; i<data.length; i++ )\n {\n result[ i ] = normalize( data[ i ], 1 );\n }\n\n return result;\n }", "void patchArray(long array[][], long scale)\n {\n // patch all numbers up by 100 to keep the order but to rid the negative\n // numbers\n for (int i = 0; i < array.length; i++)\n {\n array[i][0] += scale;\n array[i][1] += scale;\n }\n }" ]
[ "0.64276797", "0.6040256", "0.600995", "0.60059667", "0.58816737", "0.5712948", "0.5594243", "0.54852194", "0.5460857", "0.54240584", "0.5417672", "0.5401478", "0.5400236", "0.52935684", "0.5289466", "0.52881235", "0.52757263", "0.527161", "0.5257389", "0.5252812", "0.52177876", "0.52158624", "0.52008134", "0.51973075", "0.5196637", "0.51952225", "0.51925784", "0.5187476", "0.5128009", "0.5126969", "0.51185036", "0.51074046", "0.51019907", "0.5096402", "0.50834846", "0.5068874", "0.50360775", "0.5026393", "0.49968198", "0.49874476", "0.49792853", "0.4979203", "0.4946216", "0.49459407", "0.4943804", "0.4943504", "0.49385205", "0.4926195", "0.49240804", "0.49233922", "0.49201614", "0.49077672", "0.49018678", "0.48986864", "0.48938456", "0.48926604", "0.48872647", "0.48832738", "0.4880117", "0.48673725", "0.48667708", "0.4865829", "0.4863582", "0.48609126", "0.48571745", "0.4846532", "0.48453242", "0.48443627", "0.48409104", "0.48330504", "0.48301536", "0.48226294", "0.48130363", "0.48061067", "0.48039278", "0.48006818", "0.47996604", "0.47994548", "0.47936806", "0.47768965", "0.47753912", "0.47701284", "0.47692016", "0.47670162", "0.47633722", "0.47621265", "0.47618088", "0.47500634", "0.47486323", "0.47471744", "0.47470114", "0.47462323", "0.47366735", "0.4733102", "0.47295943", "0.47258982", "0.47175553", "0.47042954", "0.46983984", "0.46952617" ]
0.4914108
51
inverts each value of the matrix x by replacing it with 1/x
public void invert() { for(T first : getFirstDimension()) { for(T second : getMatches(first)) { Double sim = get(first, second); if(sim!=null && sim > 0.0) { set(first, second, 1.0/sim); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "public static double invert(double x){\n\t\tif (x == 0)\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "public final void invert() {\n\tdouble s = determinant();\n\tif (s == 0.0)\n\t return;\n\ts = 1/s;\n\t// alias-safe way.\n\tset(\n\t m11*m22 - m12*m21, m02*m21 - m01*m22, m01*m12 - m02*m11,\n\t m12*m20 - m10*m22, m00*m22 - m02*m20, m02*m10 - m00*m12,\n\t m10*m21 - m11*m20, m01*m20 - m00*m21, m00*m11 - m01*m10\n\t );\n\tmul((float)s);\n }", "public static int invert(int x){\n\t\tif (x == 0)\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "@Override\n public void Invert() {\n\t \n }", "void invertAllBits();", "public void invert() {\n int len= currentIm.getRows() * currentIm.getCols();\n \n // invert all pixels (leave alpha/transparency value alone)\n \n // invariant: pixels 0..p-1 have been complemented.\n for (int p= 0; p < len; p= p+1) {\n int rgb= currentIm.getPixel(p);\n int red= 255 - DM.getRed(rgb);\n int blue= 255 - DM.getBlue(rgb);\n int green= 255 - DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n currentIm.setPixel(p,\n (alpha << 24) | (red << 16) | (green << 8) | blue);\n }\n }", "public void invert() {\n\t\tthis.vector.setXYZ(-this.vector.x(), -this.vector.y(), -this.vector.z());\n\t\tthis.energy = -this.energy;\n\t}", "public static void normalize()\n {\n int sum;\n\n for(int i=0;i<12;i++)\n {\n for(int j=0;j<12;j++) {\n sum = sumAll(i,j);\n if (sum != 0)\n for (int n = 0; n < 12; n++)\n weights[i][j][n] /= sum;\n }\n }\n }", "public static double [][] inv(double [][] a) {\n int N = a.length;\n double [] col = new double[N];\n int [] indx = new int[N];\n double [][] y = new double[N][N];\n \n double d = ludcmp(a, indx);\n for (int j=0; j<N; j++ ) {\n for (int i=0; i<N; i++) \n col[i] = 0.0;\n col[j] = 1.0;\n lubksb(a, indx, col);\n for (int i=0; i<N; i++)\n y[i][j] = col[i];\n }\n return y; \n }", "public void permutate(float[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public final void invert() {\r\n\t\tRadical1 s = determinant();\r\n\t\tif (s.equals(Radical1.ZERO))\r\n\t\t\treturn;\r\n\r\n\t\tif (!s.equals(Radical1.ONE))\r\n\t\t\tthrow new ArithmeticException(\"can't invert radical expressions that have non-1 determinant (i.e. that rescale)\");\r\n\r\n\t\t// see Matrix4f.invert for an explination\r\n\r\n\t\tl1.setZero();\r\n\t\tl2.setZero();\r\n\t\tl3.setZero();\r\n\t\tl4.setZero();\r\n\t\tl5.setZero();\r\n\t\tl6.setZero();\r\n\t\tl7.setZero();\r\n\t\tl8.setZero();\r\n\t\tl9.setZero();\r\n\t\tl10.setZero();\r\n\t\tl11.setZero();\r\n\t\tl12.setZero();\r\n\t\tl13.setZero();\r\n\t\tl14.setZero();\r\n\t\tl15.setZero();\r\n\t\tl16.setZero();\r\n\r\n\t\tcalcPartInverse(5, 10, 15, 11, 14, op1, op2, op3, op4, l1);\r\n\t\tcalcPartInverse(6, 11, 13, 9, 15, op1, op2, op3, op4, l1);\r\n\t\tcalcPartInverse(7, 9, 14, 10, 13, op1, op2, op3, op4, l1);\r\n\r\n\t\tcalcPartInverse(9, 2, 15, 3, 14, op1, op2, op3, op4, l2);\r\n\t\tcalcPartInverse(10, 3, 13, 1, 15, op1, op2, op3, op4, l2);\r\n\t\tcalcPartInverse(11, 1, 14, 2, 13, op1, op2, op3, op4, l2);\r\n\r\n\t\tcalcPartInverse(13, 2, 7, 3, 6, op1, op2, op3, op4, l3);\r\n\t\tcalcPartInverse(14, 3, 5, 1, 7, op1, op2, op3, op4, l3);\r\n\t\tcalcPartInverse(15, 1, 6, 2, 5, op1, op2, op3, op4, l3);\r\n\r\n\t\tcalcPartInverse(1, 7, 10, 6, 11, op1, op2, op3, op4, l4);\r\n\t\tcalcPartInverse(2, 5, 11, 7, 9, op1, op2, op3, op4, l4);\r\n\t\tcalcPartInverse(3, 6, 9, 5, 10, op1, op2, op3, op4, l4);\r\n\r\n\t\tcalcPartInverse(6, 8, 15, 11, 12, op1, op2, op3, op4, l5);\r\n\t\tcalcPartInverse(7, 10, 12, 8, 14, op1, op2, op3, op4, l5);\r\n\t\tcalcPartInverse(4, 11, 14, 10, 15, op1, op2, op3, op4, l5);\r\n\r\n\t\tcalcPartInverse(10, 0, 15, 3, 12, op1, op2, op3, op4, l6);\r\n\t\tcalcPartInverse(11, 2, 12, 0, 14, op1, op2, op3, op4, l6);\r\n\t\tcalcPartInverse(8, 3, 14, 2, 15, op1, op2, op3, op4, l6);\r\n\r\n\t\tcalcPartInverse(14, 0, 7, 3, 4, op1, op2, op3, op4, l7);\r\n\t\tcalcPartInverse(15, 2, 4, 0, 6, op1, op2, op3, op4, l7);\r\n\t\tcalcPartInverse(12, 3, 6, 2, 7, op1, op2, op3, op4, l7);\r\n\r\n\t\tcalcPartInverse(2, 7, 8, 4, 11, op1, op2, op3, op4, l8);\r\n\t\tcalcPartInverse(3, 4, 10, 6, 8, op1, op2, op3, op4, l8);\r\n\t\tcalcPartInverse(0, 6, 11, 7, 10, op1, op2, op3, op4, l8);\r\n\r\n\t\tcalcPartInverse(7, 8, 13, 9, 12, op1, op2, op3, op4, l9);\r\n\t\tcalcPartInverse(4, 9, 15, 11, 13, op1, op2, op3, op4, l9);\r\n\t\tcalcPartInverse(5, 11, 12, 8, 15, op1, op2, op3, op4, l9);\r\n\r\n\t\tcalcPartInverse(11, 0, 13, 1, 12, op1, op2, op3, op4, l10);\r\n\t\tcalcPartInverse(8, 1, 15, 3, 13, op1, op2, op3, op4, l10);\r\n\t\tcalcPartInverse(9, 3, 12, 0, 15, op1, op2, op3, op4, l10);\r\n\r\n\t\tcalcPartInverse(15, 0, 5, 1, 4, op1, op2, op3, op4, l11);\r\n\t\tcalcPartInverse(12, 1, 7, 3, 5, op1, op2, op3, op4, l11);\r\n\t\tcalcPartInverse(13, 3, 4, 0, 7, op1, op2, op3, op4, l11);\r\n\r\n\t\tcalcPartInverse(3, 5, 8, 4, 9, op1, op2, op3, op4, l12);\r\n\t\tcalcPartInverse(0, 7, 9, 5, 11, op1, op2, op3, op4, l12);\r\n\t\tcalcPartInverse(1, 4, 11, 7, 8, op1, op2, op3, op4, l12);\r\n\r\n\t\tcalcPartInverse(4, 10, 13, 9, 14, op1, op2, op3, op4, l13);\r\n\t\tcalcPartInverse(5, 8, 14, 10, 12, op1, op2, op3, op4, l13);\r\n\t\tcalcPartInverse(6, 9, 12, 8, 13, op1, op2, op3, op4, l13);\r\n\r\n\t\tcalcPartInverse(8, 2, 13, 1, 14, op1, op2, op3, op4, l14);\r\n\t\tcalcPartInverse(9, 0, 14, 2, 12, op1, op2, op3, op4, l14);\r\n\t\tcalcPartInverse(10, 1, 12, 0, 13, op1, op2, op3, op4, l14);\r\n\r\n\t\tcalcPartInverse(12, 2, 5, 1, 6, op1, op2, op3, op4, l15);\r\n\t\tcalcPartInverse(13, 0, 6, 2, 4, op1, op2, op3, op4, l15);\r\n\t\tcalcPartInverse(14, 1, 4, 0, 5, op1, op2, op3, op4, l15);\r\n\r\n\t\tcalcPartInverse(0, 5, 10, 6, 9, op1, op2, op3, op4, l16);\r\n\t\tcalcPartInverse(1, 6, 8, 4, 10, op1, op2, op3, op4, l16);\r\n\t\tcalcPartInverse(2, 4, 9, 5, 8, op1, op2, op3, op4, l16);\r\n\r\n\t\tvalues[0].set(l1);\r\n\t\tvalues[1].set(l2);\r\n\t\tvalues[2].set(l3);\r\n\t\tvalues[3].set(l4);\r\n\t\tvalues[4].set(l5);\r\n\t\tvalues[5].set(l6);\r\n\t\tvalues[6].set(l7);\r\n\t\tvalues[7].set(l8);\r\n\t\tvalues[8].set(l9);\r\n\t\tvalues[9].set(l10);\r\n\t\tvalues[10].set(l11);\r\n\t\tvalues[11].set(l12);\r\n\t\tvalues[12].set(l13);\r\n\t\tvalues[13].set(l14);\r\n\t\tvalues[14].set(l15);\r\n\t\tvalues[15].set(l16);\r\n\r\n\t\tif (s.equals(Radical1.MINUS_ONE))\r\n\t\t\tnegate();\r\n\t}", "public double[] Normalizar(int[] v){\n double[] result=new double[v.length];\n double s=0;\n for (int i=0;i<v.length;i++){\n s+=v[i];\n }\n for (int i=0;i<v.length;i++){\n result[i]=(double)v[i]/(double)s;\n }\n\n return result;\n }", "public Matrix inverse(){\r\n \tint n = this.nrow;\r\n \tif(n!=this.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble[] col = new double[n];\r\n \tdouble[] xvec = new double[n];\r\n \tMatrix invmat = new Matrix(n, n);\r\n \tdouble[][] invarray = invmat.getArrayReference();\r\n \tMatrix ludmat;\r\n\r\n\t \tludmat = this.luDecomp();\r\n \tfor(int j=0; j<n; j++){\r\n \t\tfor(int i=0; i<n; i++)col[i]=0.0D;\r\n \t\tcol[j]=1.0;\r\n \t\txvec=ludmat.luBackSub(col);\r\n \t\tfor(int i=0; i<n; i++)invarray[i][j]=xvec[i];\r\n \t}\r\n \t\treturn invmat;\r\n \t}", "public void permutate(double[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "public static void invert(int[] a) {\r\n\t\tint n = a.length;\r\n\t\tint j = n - 1;\r\n\t\tfor (int i = 0; i < j; i++) {\r\n\t\t\tint tmp = a[i];\r\n\t\t\ta[i] = a[j];\r\n\t\t\ta[j] = tmp;\r\n\t\t\tj--;\r\n\t\t}\r\n\t}", "public int inverse(int x ) {\n\t\treturn exp[max_value - log[x]];\n\t}", "public static void flipHorizontalAxis(int[][] matrix) {\n for(int i = matrix.length - 1; i >= matrix.length/2; i-- ){\n for(int j = 0; j < matrix[i].length; j++){\n int temp = matrix[i][j];\n matrix[i][j] = matrix[(matrix.length - 1) - i][j];\n matrix[(matrix.length - 1) - i][j] = temp;\n }\n }\n}", "@Override\n public void invert() {\n getInvertibles().parallelStream().forEach(Invertible::invert);\n }", "public static double[][] matrixInversion(double[][] a) {\r\n\t\t// Code for this function and the functions it calls was adapted from\r\n\t\t// http://mrbool.com/how-to-use-java-for-performing-matrix-operations/26800\r\n\t\t\r\n\t\treturn (divideBy(transpose(cofactor(a)), determinant(a)));\r\n\t}", "static public int[][] flipAndInvertImage(int[][] A) {\n for(int i =0;i<A.length;i++){\n processARow(A[i]);\n }\n return A;\n }", "public final void normalize() {\n\tsvd(this);\n }", "public void flipNormal() {\n int i, j;\n\n for (i = 0; i < nr_of_segments; i++) {\n for (j = 0; j < points_per_segment; j++) {\n points[i][j].z = -points[i][j].z;\n }\n }\n\n for (i = 0; i < (int) ((double) nr_of_segments / step); i++) {\n for (j = 0; j < (int) ((double) points_per_segment / step); j++) {\n evaluated_points[i][j].z = -evaluated_points[i][j].z;\n }\n }\n\n }", "public void matrizInversa(){\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n //System.out.println(\"\");getDeter();\n getMatriz()[i][j] = getMatrizAdjunta()[i][j]/getDeter();\n }\n }\n mostrarMatriz(getMatriz(),\"Matriz inversa\");\n }", "@Override \n public double[] fastApply(double[] x) {\n double d = dot.norm(x);\n scale.fastDivide(x, d);\n return x;\n }", "static void reducedSingular (double[][] S, int p)\n {\n\tfor (int i=p; i<S.length; i++) {\n\t S[i][i] = 0;\n\t}\n }", "static int[][] inverse(int A[][]) \n { \n int inverse[][] = new int[4][4];\n // Find determinant of A[][] \n int det = determinant(A, N)%26; \n System.out.println(det);\n if (det == 0) \n { \n System.out.print(\"Singular matrix, can't find its inverse\"); \n return null; \n } \n \n // Find adjoint \n int [][]adj = new int[N][N]; \n adjoint(A, adj); \n \n // Find Inverse using formula \"inverse(A) = adj(A)/det(A)\" \n for (int i = 0; i < N; i++) \n for (int j = 0; j < N; j++) {\n inverse[i][j] = adj[i][j]/det; \n inverse[i][j] = inverse[i][j]%26;\n System.out.print(inverse[i][j]);\n }\n return inverse; \n }", "Matrix inverse(Matrix m){\r\n Matrix mtemp = new Matrix(m.M);\r\n Matrix miden = new Matrix(m.rows,m.cols);\r\n miden = miden.identity();\r\n for(int i=0;i<mtemp.rows-1;i++){\r\n for(int j=i+1; j<mtemp.rows; j++){\r\n if(mtemp.M[i][i]<mtemp.M[j][i]){\r\n swapRow(mtemp,i,j);\r\n swapRow(miden,i,j);\r\n }\r\n }\r\n for(int k=i+1; k<mtemp.rows; k++){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=0;j<mtemp.cols;j++){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n miden.M[k][j] -= ratio*miden.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n for(int i=mtemp.rows-1;i>0;i--){\r\n for(int k=i-1; k>-1; k--){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=mtemp.cols-1;j>-1;j--){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n miden.M[k][j] -= ratio*miden.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n \r\n\r\n for(int i=0; i<mtemp.rows; i++){\r\n for(int j=0; j<mtemp.cols; j++){\r\n miden.M[i][j] /= mtemp.M[i][i];\r\n }\r\n }\r\n return miden;\r\n\r\n }", "public static Matrix inverse(Matrix amat){\r\n \tint n = amat.nrow;\r\n \tif(n!=amat.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble[] col = new double[n];\r\n \tdouble[] xvec = new double[n];\r\n \tMatrix invmat = new Matrix(n, n);\r\n \tdouble[][] invarray = invmat.getArrayReference();\r\n \tMatrix ludmat;\r\n\r\n\t \tludmat = amat.luDecomp();\r\n \tfor(int j=0; j<n; j++){\r\n \t\tfor(int i=0; i<n; i++)col[i]=0.0D;\r\n \t\tcol[j]=1.0;\r\n \t\txvec=ludmat.luBackSub(col);\r\n \t\tfor(int i=0; i<n; i++)invarray[i][j]=xvec[i];\r\n \t}\r\n \treturn invmat;\r\n \t}", "private static void normalize(boolean[][] robot) {\n int n = robot.length;\n for (int i = 1; i < n; i++) {\n robot[i][i] = false;\n }\n for (int i = 1; i < n; i++) {\n normalize(robot, i);\n }\n }", "public void permutate(int[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public static void normalise(double[] v) {\n double tot = 0;\r\n for (int i=0; i<v.length; i++) {\r\n tot += v[i] * v[i];\r\n }\r\n double div = Math.sqrt(tot);\r\n if (div > 0) {\r\n for (int i=0; i<v.length; i++) {\r\n v[i] /= div;\r\n }\r\n }\r\n }", "public Matrix inverse() {\n\t\tMatrix a = copy();\n\t\tif (a.M != a.N) {\n\t\t\tthrow new RuntimeException(\"This matrix is not square!\");\n\t\t}\n\t\tMatrix i = identity(a.N);\n\t\tMatrix ai = a.augment(i);\n\t\tai = ai.specialrref();\n\t\tMatrix[] split = ai.split(a.N);\n\t\tif (split[0].equals(i)) {\n\t\t\treturn split[1];\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"This matrix is not invertible!\");\n\t\t}\n\t}", "private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }", "protected double[] negate(ColumnVector vector) {\r\n double[] v = vector.getVector();\r\n for(int i = 0; i < v.length; i++) {\r\n v[i] *= -1.0;\r\n }\r\n return v;\r\n }", "public void setInverted(boolean inv) {\n/* 69 */ int dat = getData() & 0x7;\n/* 70 */ if (inv) {\n/* 71 */ dat |= 0x8;\n/* */ }\n/* 73 */ setData((byte)dat);\n/* */ }", "public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public double[][] inverse(double[][] X, int n) {\n\t\tdouble[][] adj = adjoint(X, n);\n\t\tdouble[][] inv = new double[n][n];\n\t\tdouble det = determinant(X, n);\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\tinv[i][j] = adj[i][j] / det;\n\t\treturn inv;\n\t}", "public void identity(){\n for (int j = 0; j<4; j++){\n \tfor (int i = 0; i<4; i++){\n \t\tif (i == j)\n \t\t\tarray[i][j] = 1;\n \t\telse\n \t\t\tarray[i][j] = 0;\n \t }\n \t }\n\t}", "static void normalize(double[] state) {\r\n double norm = 1/Math.sqrt(state[0]*state[0]+state[2]*state[2]+state[4]*state[4]+state[6]*state[6]);\r\n state[0] *= norm;\r\n state[2] *= norm;\r\n state[4] *= norm;\r\n state[6] *= norm;\r\n }", "private static double[] normalize(double[] data)\n {\n double sum = 0;\n \n for (double d : data)\n sum += d;\n \n if (sum != 1 && sum != 0)\n {\n for (int i = 0; i < data.length; i++)\n data[i] /= sum;\n }\n \n return data;\n }", "public Squarelotron inverseDiagonalFlip(int ring);", "public Vector normalize ( );", "public static Optional<Double> inverse(Double x) {\n return x == 0 ? Optional.empty() : Optional.of(1 / x);\n }", "public final void invert(Matrix4rad toInvert) {\r\n\t\tthis.set(toInvert);\r\n\t\tinvert();\r\n\t}", "public void flipV() {\r\n int tmp, sym;\r\n for (int col = 0; col < pixels.length; ++col) {\r\n for (int row = 0; row < pixels[col].length / 2; ++row) {\r\n // find the column index of the vertically symmetric pixel\r\n sym = pixels[col].length - 1 - row;\r\n // swap the pixel value between the two\r\n tmp = pixels[col][row];\r\n pixels[col][row] = pixels[col][sym];\r\n pixels[col][sym] = tmp;\r\n }\r\n }\r\n this.pix2img();\r\n }", "public T invert() {\n T ret = createLike();\n\n if (!ops.invert(mat, ret.mat))\n throw new SingularMatrixException();\n if (ops.hasUncountable(ret.mat))\n throw new SingularMatrixException(\"Solution contains uncountable numbers\");\n\n return ret;\n }", "public Fraction inverse() {\n return new Fraction (denominator, numerator).reduce();\n }", "public float normalizeAileron(float x) {\n return (x-((this.beginWid +this.endWid)/2))/((this.endWid-this.beginWid)/2);\n }", "public Double inverse(Double advNum1){\n answer = 1 / advNum1;\n return answer;\n }", "Matrix InverseT()\n {\n Matrix ad = new Matrix( y.cross(z), z.cross(x), x.cross(y) );\n float inv_det = 1.0f / ( x.dot( ad.x ) );\n ad.timesEqual( inv_det );\n return ad;\n }", "private static int[] invMultRow(int[] column)\n\t{\n\t\tint[] result = new int[column.length];\n\t\t\n\t\tfor(int row=0; row<invMultCon.length; row++)\n\t\t\tfor(int col=0; col<invMultCon[row].length; col++)\n\t\t\t\tresult[row] ^= galoisMult(invMultCon[row][col],column[col]);\n\t\t\n\t\treturn result;\n\t}", "public static double inverseFunction(Double num) {\n// try {\n// return 1 / num;\n// } catch (Exception e) {\n// Console.println(\"Err\");\n// }\n return 1 / num;\n }", "public void invert()\n {\n assert isComplete;\n \n isInverted = !isInverted;\n }", "@Override\n\tpublic Squarelotron inverseDiagonalFlip(int ring) {\n\t\tint[] array = numbers();\n\t\t//converts the array into a new Squarelotron\n\t\tSquarelotron copySquarelotron = makeSquarelotron(array);\n\t\tint[][] newSquarelotron = copySquarelotron.squarelotron;\n\t\t//finds length of squarelotron and takes the square root\n\t\tint length = array.length;\n\t\tdouble sqrtLength = Math.sqrt(length);\n\t\tint size =(int) sqrtLength;\n\t\t//loops through and flips with the inverse diagonal\n\t\tfor(int i = ring-1; i <= (size-ring); i++){\n\t\t\tint numberRt = newSquarelotron[ring-1][i];\n\t\t\tnewSquarelotron[ring-1][i] = newSquarelotron[size-i-1][size-ring];\n\t\t\tnewSquarelotron[size-i-1][size-ring]=numberRt;\n\t\t}\n\t\tfor(int i = ring; i <= (size-ring); i++){\n\t\t\tint numberLft = newSquarelotron[i][ring-1];\n\t\t\tnewSquarelotron[i][ring-1] = newSquarelotron[size-ring][size-i-1];\n\t\t\tnewSquarelotron[size-ring][size-i-1]=numberLft;\n\t\t}\n\t\tcopySquarelotron.squarelotron = newSquarelotron;\n\t\treturn copySquarelotron;\n\t}", "protected void resetProjectionMatrix()\n {\n float tan = (float)Math.tan(myHalfFOVx);\n synchronized (this)\n {\n resetProjectionMatrixClipped();\n myProjectionMatrix = new float[16];\n myProjectionMatrix[0] = 1f / tan;\n myProjectionMatrix[5] = (float)(myAspectRatio / tan);\n myProjectionMatrix[10] = -1f;\n myProjectionMatrix[11] = -1f;\n myProjectionMatrix[14] = -2f;\n clearModelToWindowTransform();\n }\n }", "public void normalize()\n\t{\n\t\tif (this.getDenom() < 0)\n\t\t{\n\t\t\tthis.setDenom(this.getDenom() * (-1));\n\t\t\tthis.setNumer(this.getNumer() * (-1));\n\t\t}\n\t}", "public Vector3 invert()\n {\n this.scale(-1);\n return this;\n }", "int ainverse(int z)\n {\n return (65536-z);\n }", "public double[] Normalizar01(int[] v){\n double[] result=new double[v.length];\n double s=v[0];\n double max=v[0];\n double min=v[0];\n for (int i=1;i<v.length;i++){\n s+=v[i];\n //minimo\n if (v[i]<min)\n min=v[i];\n if (v[i]>max)\n max=v[i];\n //maximo\n }\n for (int i=0;i<v.length;i++){\n result[i]=((double)v[i]-min)/(max-min);\n }\n\n return result;\n }", "private double normalizeImageValue(double value){\n return value/(31);\n }", "public void reverseXVelocity() {\n xVelocity *= -1;\n }", "public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }", "static void pregenInverse() \n\t{ \n\t\tinvfact[0] = invfact[1] = 1; \n\n\t\t// calculates the modInverse of \n\t\t// the last factorial \n\t\tinvfact[1000000] = modInverse(fact[1000000], mod); \n\n\t\t// precalculates the modInverse of \n\t\t// all factorials by formulae \n\t\tfor (int i = 999999; i > 1; --i) \n\t\t{ \n\t\t\tinvfact[i] = (int) (((long) invfact[i + 1] \n\t\t\t\t\t* (long) (i + 1)) % mod); \n\t\t} \n\t}", "public final void negate() {\n \n \tthis.m00 = -this.m00;\n \tthis.m01 = -this.m01;\n \tthis.m02 = -this.m02;\n this.m10 = -this.m10;\n this.m11 = -this.m11;\n this.m12 = -this.m12;\n this.m20 = -this.m20;\n this.m21 = -this.m21;\n this.m22 = -this.m22;\n }", "private void dec_x()\n {\n synchronized(mLock_IndexX) { set_x(get_x() - 1); }\n }", "private DoubleMatrix invertCholesky(DoubleMatrix matrix) {\n int numOfRows = matrix.rows;\n double sum;\n int i, j, k;\n // ______ Compute inv(L) store in lower of A ______\n for (i = 0; i < numOfRows; ++i) {\n matrix.put(i, i, 1. / matrix.get(i, i));\n for (j = i + 1; j < numOfRows; ++j) {\n sum = 0.;\n for (k = i; k < j; ++k) {\n sum -= matrix.get(j, k) * matrix.get(k, i);\n }\n matrix.put(j, i, sum / matrix.get(j, j));\n }\n }\n // ______ Compute inv(A)=inv(LtL) store in lower of A ______\n for (i = 0; i < numOfRows; ++i) {\n for (j = i; j < numOfRows; ++j) {\n sum = 0.;\n for (k = j; k < numOfRows; ++k) {\n sum += matrix.get(k, i) * matrix.get(k, j); // transpose\n }\n matrix.put(j, i, sum);\n }\n }\n return matrix;\n }", "public Vector normalize() {\n double num=1/length();\n head = scale(num).head;\n return this;\n }", "public void histNormalize() {\n\n double max = max();\n double min = min();\n max = max - min;\n for (int i = 0; i < pixelData.length; i++) {\n double value = pixelData[i] & 0xff;\n pixelData[i] = (byte) Math.floor((value - min) * 255 / max);\n }\n }", "static void update(int[][] matrix){\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\t\tint n = matrix.length;\n int m = matrix[0].length;\n for(int i=0;i<n;i++){\n for(int j=0;j<m;j++){\n if(i==0 && matrix[i][j]==0){\n rowFlag =true;\n }\n if(j==0 && matrix[i][j]==0){\n colFlag = true;\n }\n if(matrix[i][j]==0){\n matrix[0][j] = 0;\n matrix[i][0] = 0;\n }\n }\n }\n for(int i=1;i<n;i++){\n for(int j=1;j<m;j++){\n if(matrix[i][0]==0||matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n if(rowFlag){\n for(int i=0;i<m;i++){\n matrix[0][i] =0 ;\n }\n }\n if(colFlag){\n for(int j=0;j<n;j++){\n matrix[j][0] = 0;\n }\n }\n\n\t}", "public void divide(double skalar) {\r\n for (int i = 0; i < matrix.length; i++) {\r\n for (int j = 0; j < matrix[0].length; j++) {\r\n matrix[i][j] /= skalar;\r\n }\r\n }\r\n }", "public void invertFastEqual()\r\n\t{\r\n\t\tE3DMatrix4x4F scratchMatrix = new E3DMatrix4x4F();\r\n\t\t\r\n//\t\tscratchMatrix.matrix4x4[0][0] = scratchMatrix.matrix4x4[]\r\n\t\tscratchMatrix.matrix4x4[0][1] = matrix4x4[1][0];\r\n\t\tscratchMatrix.matrix4x4[0][2] = matrix4x4[2][0];\r\n\t\tscratchMatrix.matrix4x4[1][0] = matrix4x4[0][1];\r\n//\t\tscratchMatrix.matrix4x4[1][1] = \r\n\t\tscratchMatrix.matrix4x4[1][2] = matrix4x4[2][1];\r\n\t\tscratchMatrix.matrix4x4[2][0] = matrix4x4[0][2];\r\n\t\tscratchMatrix.matrix4x4[2][1] = matrix4x4[1][2];\r\n//\t\tscratchMatrix.matrix4x4[2][2] =\r\n\t\t\r\n\t\tmatrix4x4[0][1] = scratchMatrix.matrix4x4[0][1];\r\n\t\tmatrix4x4[0][2] = scratchMatrix.matrix4x4[0][2];\r\n\t\tmatrix4x4[1][0] = scratchMatrix.matrix4x4[1][0];\r\n\t\tmatrix4x4[1][2] = scratchMatrix.matrix4x4[1][2];\r\n\t\tmatrix4x4[2][0] = scratchMatrix.matrix4x4[2][0];\r\n\t\tmatrix4x4[2][1] = scratchMatrix.matrix4x4[2][1];\r\n\t}", "public Vector Normalize(){\n float magnitude = Magnitude();\n for(int i = 0; i < axis.length; i++){\n axis[i] /= magnitude;\n }\n return this;\n }", "public void cinv_() {\n TH.THTensor_(cinv)(this, this);\n }", "public static void switchRow(boolean[] row, int x){\n\t\tfor(int i = -1; i < 2; i++){\r\n\t \tif(x+i >= 0 && x+i < row.length)\r\n\t \t\trow[x+i] = !row[x+i]; \r\n\t }\r\n\t}", "public void setInvert (boolean invert) {\r\n\t\tthis.invert = invert;\r\n\t}", "public void SetMatrixToOnes() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 1;\tthis.mat_f_m[0][2] = 1;\t this.mat_f_m[0][3] = 1;\n\tthis.mat_f_m[1][0] = 1;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 1;\t this.mat_f_m[1][3] = 1;\n\tthis.mat_f_m[2][0] = 1;\t this.mat_f_m[2][1] = 1;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 1;\n\tthis.mat_f_m[3][0] = 1;\t this.mat_f_m[3][1] = 1;\tthis.mat_f_m[3][2] = 1;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public final void invert(Matrix3f m1) {\n\tset(m1);\n\tinvert();\n }", "public void inverseScale(Point3 scale) {\r\n\t\tx /= scale.x;\r\n\t\ty /= scale.y;\r\n\t\tz /= scale.z;\r\n\t}", "public Matrix inverseMatrix(Matrix L, Matrix U, Matrix P, int n)\n {\n\tMatrix Uinv = new Matrix(n,n);\n\tMatrix Linv = new Matrix(n,n);\n\tfor (int k = 0; k < n; k++)\n\t{\n\t\tVector temp = new Vector(n);\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tif (i == k)\n\t\t\t\ttemp.vector[i] = 1;\n\t\t\telse\n\t\t\t\ttemp.vector[i] = 0;\n\t\t}\n\t\t// forward substitution for L y = b.\n\t\tfor (int i = 1; i < n; i++)\n\t\t\tfor (int j = 0; j < i; j++)\n\t\t\t\ttemp.vector[i] -= L.matrix[i][j] * temp.vector[j];\n\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tLinv.matrix[i][k] = temp.vector[i];\n\t\t}\n\n\t}\n\n\tfor (int k = 0; k < n; k++)\n\t{\n\t\tVector temp = new Vector(n);\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tif (i == k)\n\t\t\t\ttemp.vector[i] = 1;\n\t\t\telse\n\t\t\t\ttemp.vector[i] = 0;\n\t\t}\n\t\t// back substitution for U x = y. \n\t\tfor (int i = n - 1; i >= 0; i--) {\n\t\t\tfor (int j = i + 1; j < n; j++) \n temp.vector[i] -= U.matrix[i][j] * temp.vector[j];\n\t\t\ttemp.vector[i] /= U.matrix[i][i];\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++)\n\t\t{\n\t\t\tUinv.matrix[i][k] = temp.vector[i];\n\t\t}\n\n\t}\n Matrix LinP = new Matrix();\n\tLinP = LinP.multiplication(Linv, P);\n Matrix results = new Matrix();\n results = results.multiplication(Uinv, LinP);\n\treturn results;\n\n }", "public double[][] normalize( double[][] data )\n {\n double[][] result = new double[ data.length ][];\n\n for( int i=0; i<data.length; i++ )\n {\n result[ i ] = normalize( data[ i ], 1 );\n }\n\n return result;\n }", "private double[][] normalize255(RealMatrix realMatrix) {\n\t\tdouble[][] input = realMatrix.getData();\n\t\tdouble[][] normalized = new double[realMatrix.getRowDimension()][realMatrix.getColumnDimension()];\n\t\tdouble minimum = 99999.99;\n\t\tdouble maximum = -9999.99;\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tminimum = Math.min(minimum, input[i][j]);\n\t\t\t\tmaximum = Math.max(maximum, input[i][j]);\n\t\t\t}\n\t\t}\n\t\tfor (int i=0; i < realMatrix.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < realMatrix.getColumnDimension(); j++) {\n\t\t\t\tnormalized[i][j] = ((input[i][j] - minimum)*(255/(maximum-minimum)));\n\t\t\t}\n\t\t}\n\t\treturn normalized;\n\t}", "public void invScale(Color rhs) {\n\n\t\tthis.r /= rhs.r;\n\t\tthis.g /= rhs.g;\n\t\tthis.b /= rhs.b;\n\t}", "public void normalize() { sets length to 1\n //\n double length = Math.sqrt(x * x + y * y);\n\n if (length != 0.0) {\n float s = 1.0f / (float) length;\n x = x * s;\n y = y * s;\n }\n }", "private static void removeRowLeadingNumber(double factor, int rowRoot,\r\n int row, double[][] matrix, double[] vector) {\r\n\r\n for (int column = 0; column < matrix[row].length; column++) {\r\n\r\n matrix[row][column] = matrix[row][column] - factor\r\n * matrix[rowRoot][column];\r\n }\r\n\r\n vector[row] = vector[row] - factor * vector[rowRoot];\r\n }", "static int[] modifiedArrayWithoutDivision(int[] original) {\n\t\tint[] newArr = new int[original.length];\n\t\tint tempProduct = 1;\n\t\t\n\t\t// For each index in new array\n\t\tfor (int i = 0; i < newArr.length; i++) {\n\t\t\t// For each int in original array\n\t\t\tfor (int j = 0; j < original.length; j++) {\n\t\t\t\t// If not the current index, multiply number by tempProduct\n\t\t\t\tif (j != i) {\n\t\t\t\t\ttempProduct *= original[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tnewArr[i] = tempProduct; // Store product in current array index\n\t\t\ttempProduct = 1; // Reset product\n\t\t}\n\t\treturn newArr;\n\t}", "public void setInverted(boolean invert) {\r\n inverted = invert;\r\n }", "public void normalize() {\r\n\t\tfloat length = (float) this.lenght();\r\n\t\tif (length > 0) {\r\n\t\t\tx /= length;\r\n\t\t\ty /= length;\r\n\t\t\tz /= length;\r\n\t\t}\r\n\t}", "public Matrix inverse() throws JPARSECException {\n return solve(identity(m,m));\n }", "private double[] normalize(double[] p) {\n double sum = 0;\n double[] output = new double[p.length];\n for (double i : p) {\n sum += i;\n }\n for (int i = 0; i < output.length; i++) {\n output[i] = p[i]/sum;\n }\n return output;\n }", "public Matrix inverse() {\n int n = L.getNrows();\n Matrix inv = Matrix.identity(n);\n solve(inv);\n return inv;\n }", "public void normalize()\n {\n double magnitude = this.magnitude();\n this.x = x / (float)magnitude;\n this.y = y / (float)magnitude;\n this.z = z / (float)magnitude;\n this.w = w / (float)magnitude;\n }", "public void flip() {\n flipRecur(root);\n }", "default DiscreteDoubleMap2D reciprocal() {\r\n\t\treturn (x, y) -> 1. / this.getValueAt(x, y);\r\n\t}", "public void normaliseVertexColors()\r\n\t{\r\n\t for(int i=0; i<3; i++)\r\n vertices[i].normaliseVertexColor();\r\n\t}", "public TreeNode invertTree(TreeNode root) {\n\n invertTreeNode(root);\n\n return root;\n }", "public static double inverseSquare(double z){ //TODO: This needs a little love. Should probably use the repel method instead.\n boolean positive = z >= 0;\n z += positive? 1:(-1);\n double square = Math.pow(z,2);\n return positive? 1/square:square;\n }", "public void normalize() {\n float length = (float)Math.sqrt(nx * nx + ny * ny);\n nx/=length;\n ny/=length;\n }", "public Vector330Class normalize(){\n if(this.magnitude() <= EPS){\n return new Vector330Class(0, 0);\n }\n else{\n return new Vector330Class(this.x * (1/this.magnitude()), this.y * (1/this.magnitude()));\n }\n }" ]
[ "0.7088552", "0.6996313", "0.66947055", "0.639802", "0.6074871", "0.6068334", "0.5989733", "0.5963447", "0.5963153", "0.59480166", "0.5893439", "0.58668596", "0.58319896", "0.582544", "0.5819787", "0.57521784", "0.57156605", "0.57116973", "0.5705485", "0.57005167", "0.56979245", "0.56814784", "0.56740016", "0.5660258", "0.56265146", "0.5542437", "0.5532861", "0.5523147", "0.55099", "0.54976887", "0.549536", "0.5465218", "0.546078", "0.54336023", "0.54300845", "0.54183066", "0.5417596", "0.5408571", "0.540593", "0.5404", "0.53932226", "0.5357079", "0.5356736", "0.5339448", "0.53266245", "0.5321737", "0.53203666", "0.53181267", "0.531408", "0.53034115", "0.52858084", "0.52810127", "0.5277282", "0.5263622", "0.526137", "0.52573204", "0.52514803", "0.5241299", "0.5227044", "0.52251047", "0.52086043", "0.519201", "0.5180752", "0.51726675", "0.5164196", "0.515512", "0.5154904", "0.515389", "0.5152791", "0.5151913", "0.51514316", "0.514737", "0.5144363", "0.5138966", "0.51356524", "0.5134139", "0.5125417", "0.51223207", "0.5108961", "0.5102144", "0.5085614", "0.50796425", "0.5078952", "0.50638264", "0.5062082", "0.5052541", "0.5046045", "0.5040273", "0.5039913", "0.50337976", "0.5032792", "0.50218046", "0.50181586", "0.49988553", "0.49945876", "0.499324", "0.4993221", "0.49915755", "0.49869332", "0.4971502" ]
0.682248
2
Changes the values of the matrix such that each value is either 1 (if above the threshold) or 0. returns this instance
public SimilarityMatrix<T> makeBinary(double threshold) { for(T first : getFirstDimension()) { for(T second : getMatches(first)) { if(get(first, second)>threshold) { set(first, second, 1.0); } else { set(first, second, 0.0); } } } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Grid filterSmallValues(int threshold) {\n\t\n\t\tassert(threshold > 0);\n\t\t\n\t\tint[][] newGrid = new int[width()][height()];\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\tif (Math.abs(valueAt(i, j)) < threshold) {\n\t\t\t\t\tnewGrid[i][j] = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewGrid[i][j] = valueAt(i, j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Grid(newGrid);\n\t}", "void setThreshold(float value);", "public ThresholdActivationFunction(double threshold) {\n this.threshold = threshold;\n }", "public BinaryMatrixNew() {\n\t\t\tsuper(Matrixes.<R, C>newValidating(PredicateUtils.inBetween(0d, 1d)));\n\t\t}", "public void setThreshold(float threshold){\n this.threshold = threshold;\n }", "private static void setMatrixOnes(int[][] matrix) {\n\n\t\tint row = matrix.length;\n\t\tint col = matrix[0].length;\n\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\n\t\tfor (int i = 0; i < row; i++) {\n\t\t\tfor (int j = 0; j < col; j++) {\n\n\t\t\t\t/* next two if conditions take special care for first row and first column */\n\n\t\t\t\t/* Scan the first row and set a variable rowFlag to indicate whether we need to set all 1s in first row or not. */\n\t\t\t\tif (i == 0 && matrix[i][j] == 1) {\t/* if any values in first row is 1, set rowFlag true */\n\t\t\t\t\trowFlag = true;\n\t\t\t\t}\n\n\t\t\t\t/* Scan the first column and set a variable colFlag to indicate whether we need to set all 1s in first column or not. */\n\t\t\t\tif (j == 0 && matrix[i][j] == 1) {\t/* if any values in first col is 1, set colFlag true */\n\t\t\t\t\tcolFlag = true;\n\t\t\t\t}\n\n\t\t\t\t/* Use first row and first column as the auxiliary arrays row[] and col[] respectively,\n\t\t\t\t * consider the matrix as sub matrix starting from second row and second column\n\t\t\t\t * */\n\t\t\t\tif (matrix[i][j] == 1) {\n\t\t\t\t\tmatrix[0][j] = 1;\n\t\t\t\t\tmatrix[i][0] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Modify the given input matrix using the first row and first column of this matrix itself */\n\t\tfor (int i = 1; i < row; i++) {\n\t\t\tfor (int j = 1; j < col; j++) {\n\t\t\t\tif (matrix[0][j] == 1 || matrix[i][0] == 1) {\n\t\t\t\t\tmatrix[i][j] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* modify first row if there was any 1 */\n\t\tif (rowFlag) {\n\t\t\tfor (int j = 0; j < col; j++) {\n\t\t\t\tmatrix[0][j] = 1;\n\t\t\t}\n\t\t}\n\n\t\t/* modify first col if there was any 1 */\n\t\tif (colFlag) {\n\t\t\tfor (int i = 0; i < row; i++) {\n\t\t\t\tmatrix[i][0] = 1;\n\t\t\t}\n\t\t}\n\n\t\tprintTheMatrix(matrix);\n\t}", "float getThreshold();", "@Updatable\n public Double getThreshold() {\n return threshold;\n }", "public void setThreshold(double t)\n {\n this.threshold = t;\n }", "public float getThreshold() {\n return threshold;\n }", "public double getThreshold() {\r\n return threshold;\r\n }", "public void SetMatrixToOnes() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 1;\tthis.mat_f_m[0][2] = 1;\t this.mat_f_m[0][3] = 1;\n\tthis.mat_f_m[1][0] = 1;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 1;\t this.mat_f_m[1][3] = 1;\n\tthis.mat_f_m[2][0] = 1;\t this.mat_f_m[2][1] = 1;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 1;\n\tthis.mat_f_m[3][0] = 1;\t this.mat_f_m[3][1] = 1;\tthis.mat_f_m[3][2] = 1;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public double getThreshold() {\n return threshold;\n }", "double getLowerThreshold();", "void modThresh1(int theValue){\n\t threshold1=10*theValue;\n\t // threshold2 = threshold1 + 1;\n\t println(\"mod t1: \" + threshold1) ;\n\t}", "public Binarization(int threshold) {\n this.threshold = threshold;\n }", "protected static void adaptivaeThresholdCalc() {\n\t\tif (triggerCount > 3) {\n\t\t\tthreshold /= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold up to \" + threshold);\n\t\t}\n\t\tif (triggerCount < 2) {\n\t\t\tthreshold *= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold down to \" + threshold);\n\t\t}\n\n\t\tif (threshold < 1.5f)\n\t\t\tthreshold = 1.5f;\n\t}", "@OpMethod(\n\t\top = net.imagej.ops.threshold.apply.ApplyConstantThreshold.class)\n\tpublic <T extends RealType<T>> Iterable<BitType> apply(\n\t\tfinal Iterable<BitType> out, final Iterable<T> in, final T threshold)\n\t{\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal Iterable<BitType> result =\n\t\t\t(Iterable<BitType>) ops().run(\n\t\t\t\tnet.imagej.ops.Ops.Threshold.Apply.class,\n\t\t\t\tout, in, threshold);\n\t\treturn result;\n\t}", "public int getThreshold() {\n return threshold; \n }", "public Builder withThreshold(final Integer threshold) {\n this.threshold = threshold;\n return this;\n }", "public final void updateThreshold(double newThreshold){\n\t\t\n\t\tif(newThreshold != SignalSmoother.NO_RECOMMENDED_THRESHOLD){\n\t\t\t\n\t\t\tif(newThreshold == Double.valueOf(0)){\n\t\t\t\tthis.isThresholdUsingEnabled = THRESHOLD_STATE_DISABLED;\n\t\t\t}else\n\t\t\t\tthis.threshold = Math.abs(newThreshold);\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void setMinThreshold() {\n minThreshold = value + value * postBoundChange / 100;\n }", "public BloomFilterJunior(int capacity) {\n if (capacity < MIN_INIT_CAPACITY) {\n // throws IllegalArgumentException if capacity < 50\n throw new IllegalArgumentException();\n }\n\n // Initialize boolean table of specified capacity\n table = new boolean[capacity];\n }", "public Thresholding(ThresholdsState ts) { // Sets the constants for thresholding for each pitch \n\t\tredBallThresh[0][0] = 130;\n\t\tredBallThresh[0][1] = 90;\n\t\tredBallThresh[0][2] = 90;\n\t\tredBallThresh[1][0] = 170;\n\t\tredBallThresh[1][1] = 170;\n\t\tredBallThresh[1][2] = 170;\n\t\tyellowRobotThresh[0][0] = 140;\n\t\tyellowRobotThresh[0][1] = 140;\n\t\tyellowRobotThresh[0][2] = 170;\n\t\tyellowRobotThresh[1][0] = 150;\n\t\tyellowRobotThresh[1][1] = 190;\n\t\tyellowRobotThresh[1][2] = 140;\n\t\tblueRobotThresh[0][0] = 120;\n\t\tblueRobotThresh[0][1] = 170;\n\t\tblueRobotThresh[0][2] = 90;\n\t\tblueRobotThresh[1][0] = 160;\n\t\tblueRobotThresh[1][1] = 230;\n\t\tblueRobotThresh[1][2] = 215;\n\n\n\t\tgreenPlatesThresh[0][0] = 120;\n\t\tgreenPlatesThresh[1][0] = 205;\n\n\n\t\tthis.ts = ts;\n\n\t}", "public int getThreshold()\n {\n return threshold;\n }", "public native boolean thresholdImage(double threshold)\n\t\t\tthrows MagickException;", "private float applyThreshold(float input) {\n return abs(input) > THRESHOLD_MOTION ? input : 0;\n }", "public Precision() {\n\t\tthis.threshold = 1.0;\n\t}", "public double getLowThreshold(){\n return lowThreshold;\n }", "QualityGateBuilder setNewUnstableThreshold(final ThresholdSet newUnstableThreshold) {\n this.newUnstableThreshold = newUnstableThreshold;\n return this;\n }", "public BufferedImage simpleThresholding(BufferedImage timg) {\n\n int[][][] ImageArray1 = convertToArray(timg);\n\n return convertToBimage(ImageArray1);\n }", "public void setThreshold(int inputThreshold) {\r\n\t\tthis.threshold = inputThreshold;\r\n\t}", "public void setThreshold(int threshold) {\n lastNeuron().setThreshold(threshold);\n }", "private static native void niBlackThreshold_0(long _src_nativeObj, long _dst_nativeObj, double maxValue, int type, int blockSize, double k, int binarizationMethod);", "public boolean isOverThreshold(){return isOverThreshold;}", "public void setThreshold(int t) {\r\n\t\t\tthis.t = t;\r\n\t\t}", "public final ArrayList<Boolean> getItensityValues() {\r\n return this.passIntensityThreshold;\r\n }", "public SparseBooleanArray() {\r\n\t\tthis(10);\r\n\t}", "public static void setThreshold(int threshold) {\n EvalutionUtil.ifFalseCrash(threshold>0, \n \"The threshold for the relevant documents in the ranking should be bigger than 0\");\n thres = threshold;\n }", "public void prune(double belowThreshold) {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n if(get(first, second)<belowThreshold) {\n set(first, second, 0.0);\n }\n \n }\n \n }\n \n }", "public final void updateThreshold(double newThreshold, boolean thresholdState){\n\t\tthis.updateThreshold(newThreshold);\n\t\tthis.isThresholdUsingEnabled = thresholdState;\n\t}", "public ThresholdingOutputStream(int threshold)\n {\n this.threshold = threshold;\n }", "public LogicalVector(Boolean[] values) {\r\n this.values = new int[values.length];\r\n for (int i = 0; i != values.length; ++i) {\r\n this.values[i] = values[i] ? 1 : 0;\r\n }\r\n }", "@AbstractCustomGlobal.GlobalMethod(menuText=\"Set Threshold Probability\")\n public void setThreshold() {\n if(Tools.getGlobalTime()!=0){\n JOptionPane.showMessageDialog(null, \"You can change this probability only when the simulation start\",\"Alert\", JOptionPane.INFORMATION_MESSAGE);\n return;\n }\n String answer = JOptionPane.showInputDialog(null, \"Set the probability that a node can be selected to run.\");\n // Show an information message\n try{\n double k = Double.parseDouble(answer);\n Iterator<Node> it = Tools.getNodeList().iterator();\n while(it.hasNext()){\n Node n = it.next();\n if(n.getClass() == MSNode.class){\n MSNode n1 = (MSNode)n;\n n1.setThresholdProbability(k);\n }\n if(n.getClass() == MS2Node.class){\n MS2Node n1 = (MS2Node)n;\n n1.setThresholdProbability(k);\n }\n }\n JOptionPane.showMessageDialog(null, \"Well done you have set this value:\"+k,\"Notice\", JOptionPane.INFORMATION_MESSAGE);\n }catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null, \"You must insert a valid double \", \"Alert\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "public void setLowerThreshold(int lowerThreshold) {\n this.lowerThreshold = lowerThreshold;\n }", "public LightCruiser () {\n \tthis.setLength(5);\n \tint length = this.getLength();\n \tboolean hit[] = new boolean[length]; \n \tfor (int i = 0; i < length; i++) {\n \t hit[i] = false;\n \t}this.setHit(hit);\n }", "public double[][] activateFunction(){\n\t\n\t\tboolean run = true;\n\t\tint count = 0;\n\t\tdouble[][] output = null;\n\t\twhile(run){\n\t\t\toutput = sign(subtract(multiply(weights, entryCoord), thresholds));\n\t\t\t\tfor(int i = 0; i < trainingList.size(); i++){\n\t\t\t\t\tfor(int j = 0; j < (XDIMENSION * YDIMENSION); j++){\n\t\t\t\t\t\tif(trainingList.get(i)[j][0] == output[j][0]){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(count == (XDIMENSION * YDIMENSION)){\n\t\t\t\t\t\t\trun = false;\n\t\t\t\t\t\t\tfor(int k = 0; k < output.length; k++){\n\t\t\t\t\t\t\t\tSystem.out.print(output[k][0] + \" \");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\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\tcount = 0;\n\t\t\t\t}\t\n\t\n\t\t}\n\t\treturn makeGrid(output);\n\t}", "public R1toConstantMatrix(Matrix A) {\n this.A = new ImmutableMatrix(A);\n }", "public void setLowerThreshold(int setLowerThreshold) {\r\n\t\tthis.lowerThreshold = setLowerThreshold;\t\t\r\n\t}", "public void changeConstraintsToMoreThan() throws IloException {\n /*\n IloRange notes:\n for expr == rhs, set lb = ub = rhs\n for expr <= rhs, set lb = -infinity and ub = rhs\n for expr >= rhs, set lb = rhs and ub = infinity\n */\n for (int i = 0; i < matrix.getNrows(); i++) {\n IloRange rangedExpression = matrix.getRange(i);\n if (rangedExpression.getLB() <= Double.NEGATIVE_INFINITY) {\n rangedExpression.setBounds(-rangedExpression.getLB(), Double.POSITIVE_INFINITY);\n for (int j = 0; j < matrix.getNrows(); j++) {\n matrix.setNZ(i, j, -matrix.getNZ(i, j));\n }\n }\n }\n }", "private double getMinThreshold() {\n return minThreshold;\n }", "private void setLowSensitivity() {\n\t\tbuttonLowOn.setVisibility(View.VISIBLE);\n\t\tbuttonMedOn.setVisibility(View.INVISIBLE);\n\t\tbuttonHighOn.setVisibility(View.INVISIBLE);\n\t\t\n\t\tLUT[0] = 2;\n\t\tLUT[1] = (float)6;\n\t\tLUT[2] = (float)10;\n\t\tLUT[3] = (float)20;\n\t\tLUT[4] = (float)30;\n\t\tLUT[5] = (float)150;\n\t\tLUT[6] = (float)700;\n\t\tLUT[7] = (float)2000;\n\t\tLUT[8] = (float)4000;\n\t}", "public void setZeroes1(int[][] matrix) {\n boolean col00 = false;\n\n int row, col;\n int rows = matrix.length;\n int cols = matrix[0].length;\n for (row = 0; row < rows; ++row) {\n for (col = 0; col < cols; ++col) {\n if (matrix[row][col] == 0) {\n if (col != 0) {\n matrix[0][col] = 0;\n matrix[row][0] = 0;\n } else {\n col00 = true;\n }\n }\n }\n }\n for (row = rows - 1; row >= 0; --row) {\n for (col = 1; col < cols; ++col) {\n if (matrix[row][0] == 0 || matrix[0][col] == 0) {\n matrix[row][col] = 0;\n }\n }\n }\n if (col00) {\n for (row = rows - 1; row >= 0; --row) {\n matrix[row][0] = 0;\n }\n }\n }", "public int[][] updateMatrix(int[][] matrix) {\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) continue;\n matrix[i][j] = 10; // You can use any integer bigger than 1 except Integer.MAX_VALUE, overflow.\n if(i > 0) matrix[i][j] = Math.min(matrix[i - 1][j] + 1, matrix[i][j]);\n if(j > 0) matrix[i][j] = Math.min(matrix[i][j - 1] + 1, matrix[i][j]);\n }\n }\n\n for(int i = matrix.length - 1; i >= 0; i--) {\n for(int j = matrix[0].length - 1; j >= 0; j--) {\n if(i < matrix.length - 1) matrix[i][j] = Math.min(matrix[i + 1][j] + 1, matrix[i][j]);\n if(j < matrix[0].length - 1) matrix[i][j] = Math.min(matrix[i][j + 1] + 1, matrix[i][j]);\n }\n }\n return matrix;\n }", "@Test\n public void testThreshold() {\n final ThresholdCircuitBreaker circuit = new ThresholdCircuitBreaker(threshold);\n circuit.incrementAndCheckState(9L);\n assertFalse(\"Circuit opened before reaching the threshold\", circuit.incrementAndCheckState(1L));\n }", "private void updateChildesValues(int value){\n\n for (int i = 0; i < mDataSize; i++) {\n\n if(((value >> i) & 1) == 1){\n mChildTags.get(i).setValue(true);}\n else {mChildTags.get(i).setValue(false);}\n }\n }", "public void identity(){\n for (int j = 0; j<4; j++){\n \tfor (int i = 0; i<4; i++){\n \t\tif (i == j)\n \t\t\tarray[i][j] = 1;\n \t\telse\n \t\t\tarray[i][j] = 0;\n \t }\n \t }\n\t}", "public float update(PImage newFrame) {\n\t\tthresholdBuffer.copy(newFrame, 0, 0, newFrame.width, newFrame.height, 0, 0, thresholdBuffer.width, thresholdBuffer.height);\n\n\t\t// run threshold filter\n\t\tThresholdFilter.instance().setCutoff(cutoff);\n\t\tThresholdFilter.instance().applyTo(thresholdBuffer);\n\t\t\n\t\t// analyze diff pixels\n\t\tfloat numPixels = thresholdBuffer.width * thresholdBuffer.height;\n\t\tfloat whitePixels = 0;\n\t\tthresholdBuffer.loadPixels();\n\t\tfor (int x = 0; x < thresholdBuffer.width; x++) {\n\t\t\tfor (int y = 0; y < thresholdBuffer.height; y++) {\n\t\t\t\tint pixelColor = ImageUtil.getPixelColor(thresholdBuffer, x, y);\n\t\t\t\tfloat r = ColorUtil.redFromColorInt(pixelColor) / 255f;\n\t\t\t\tif(r > 0.5f) whitePixels += r;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t// update float buffer\n\t\tthresholdCalc.update(whitePixels / numPixels);\n\t\treturn thresholdCalc.average();\n\t}", "public void setThreshold(int threshold) {\n/* 357 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public double getThresholdMultiplier() {\n\t\treturn m_thresholdMultiplier;\n\t}", "public List<Output<TInt32>> thresholdsList() {\n return thresholdsList;\n }", "static void update(int[][] matrix){\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\t\tint n = matrix.length;\n int m = matrix[0].length;\n for(int i=0;i<n;i++){\n for(int j=0;j<m;j++){\n if(i==0 && matrix[i][j]==0){\n rowFlag =true;\n }\n if(j==0 && matrix[i][j]==0){\n colFlag = true;\n }\n if(matrix[i][j]==0){\n matrix[0][j] = 0;\n matrix[i][0] = 0;\n }\n }\n }\n for(int i=1;i<n;i++){\n for(int j=1;j<m;j++){\n if(matrix[i][0]==0||matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n if(rowFlag){\n for(int i=0;i<m;i++){\n matrix[0][i] =0 ;\n }\n }\n if(colFlag){\n for(int j=0;j<n;j++){\n matrix[j][0] = 0;\n }\n }\n\n\t}", "public void useFilter() {\r\n\t\t\tif(src.channels() > 1) {\r\n\t\t\t\tImgproc.cvtColor(src, bwsrc, Imgproc.COLOR_BGR2GRAY);\r\n\t\t\t\tdst = new Mat(bwsrc.size(),CvType.CV_8U);\r\n\t\t\t\tfor(int i = 0; i<bwsrc.rows();i++) {\r\n\t\t\t\t\tfor(int j = 0; j <bwsrc.cols();j++) {\r\n\t\t\t\t\t\tif(bwsrc.get(i,j)[0]>=t) {\r\n\t\t\t\t\t\t\tdst.put(i, j, 255);\r\n\t\t\t\t\t\t}else dst.put(i, j, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\tdst = new Mat(src.size(),CvType.CV_8U);\r\n\t\t\t\tfor(int i = 0; i<src.rows();i++) {\r\n\t\t\t\t\tfor(int j = 0; j <src.cols();j++) {\r\n\t\t\t\t\t\tif(src.get(i,j)[0]>=t) {\r\n\t\t\t\t\t\t\tdst.put(i, j, 255);\r\n\t\t\t\t\t\t}else dst.put(i, j, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "double getUpperThreshold();", "State[][] getSatisfactionMatrix(Actor[][] world, final double threshold) {\n State[][] satisfactionMatrix = new State[world.length][world.length];\n\n for (int i = 0; i < world.length; i++) {\n for (int j = 0; j < world.length; j++) {\n boolean active = activeCell(world, i, j);\n if (active == true) {\n boolean satisfaction = checkSatisfaction(world, i, j, threshold);\n if (satisfaction == true) {\n satisfactionMatrix[i][j] = State.SATISFIED;\n } else {\n satisfactionMatrix[i][j] = State.UNSATISFIED;\n }\n } else {\n satisfactionMatrix[i][j] = State.NA;\n }\n }\n }\n return satisfactionMatrix;\n }", "public void setThresholdMultiplier(double multiplier) {\n\t\tm_thresholdMultiplier = (multiplier > 0) ? multiplier : 1.0;\n\t}", "public int setCameraMotionThreshold(float threshold) {\n return native_setCameraMotionThreshold(threshold);\n }", "@Override\npublic Image operate (Image source)\n{\n final Image thresholdImage = NIVision\n .imaqCreateImage(ImageType.IMAGE_U8, 0);\n\n // @TODO: Store NIVision.Range instead of integers so we don't make a\n // new one every time.\n NIVision.imaqColorThreshold(thresholdImage, source, 255,\n NIVision.ColorMode.HSL, this.hueRange, this.satRange,\n this.lumRange);\n source.free();\n return thresholdImage;\n}", "@Override\r\n\t\tpublic String toString() {\r\n\t\t\t// TODO Auto-generated method stub\r\n\t\t\treturn \"Threshold:\"+t+\"\\tMat:[\"+src.rows()+\",\"+src.cols()+\":\"+src.channels()+\"]\";\r\n\t\t}", "public int getLowerThreshold() {\n return lowerThreshold;\n }", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "private void updateStateOnce() {\n for(int i = 0; i < maskArray.length; i++) {\n for (int j = 0; j < maskArray[i].length; j++) {\n\n if (maskArray[i][j] == 1){\n stateArray[i][j] = stateGenerator.generateElementState();\n }\n\n }\n }\n }", "@Override\r\n\tpublic void setThresholds(int itemthreshold, int timethreshold) {\n\t\t\r\n\t}", "private static int[][] toAjacencyMatrix(int[][] matrixWeigthed) {\r\n\t\tint[][] matrix = new int[matrixWeigthed.length][matrixWeigthed[0].length];\r\n\t\tfor (int i = 0; i < matrixWeigthed.length; i++) {\r\n\t\t\tfor (int j = 0; j < matrixWeigthed[0].length; j++) {\r\n\t\t\t\tif (matrixWeigthed[i][j] == 0) {\r\n\t\t\t\t\tmatrix[i][j] = 1;\r\n\t\t\t\t} else if (matrixWeigthed[i][j] >= Integer.MAX_VALUE) {\r\n\t\t\t\t\tmatrix[i][j] = 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmatrix[i][j] = 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn matrix;\r\n\t}", "@Test\n public void testThresholdEqualsZero() {\n final ThresholdCircuitBreaker circuit = new ThresholdCircuitBreaker(zeroThreshold);\n assertTrue(\"When the threshold is zero, the circuit is supposed to be always open\", circuit.incrementAndCheckState(0L));\n }", "public void refresh() {\r\n numberThreshold = hasNumberThreshold();\r\n dateThreshold = hasDateThreshold();\r\n }", "boolean incLowValue() { return true; }", "public LogicalVector(boolean... values) {\r\n this.values = new int[values.length];\r\n for (int i = 0; i != values.length; ++i) {\r\n this.values[i] = values[i] ? 1 : 0;\r\n }\r\n }", "private void grayscale(){\n int len= currentIm.getRows() * currentIm.getCols();\n \n for (int p= 0; p < len; p= p+1) {\n int rgb= currentIm.getPixel(p);\n int red= DM.getRed(rgb);\n int blue= DM.getBlue(rgb);\n int green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n double brightness = 0.3 * red + 0.6 * green + 0.1 * blue;\n \n currentIm.setPixel(p,\n (alpha << 24) | ((int)brightness << 16) | ((int)brightness << 8) | (int)brightness);\n \n }\n }", "public void setThreshold(int aThreshold) {\n if(0 <= threshold && threshold <= 100) {\n threshold = aThreshold;\n } else {\n throw new IllegalArgumentException(\"Threshold must be in the interval <1..100> inclusive. Actual Value: \" + aThreshold);\n } \n }", "public static void betterApproach(int matrix[][]){\n\t\t\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\tboolean auxR[] = new boolean[m];\n\t\tboolean auxC[] = new boolean[n];\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tauxR[i] = false;\n\t\t}\n\t\t\n\t\tfor(int j = 0;j<n;j++){\n\t\t\tauxC[j] = false;\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(matrix[i][j] == 0){\n\t\t\t\t\tauxR[i] = true;\n\t\t\t\t\tauxC[j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<m;i++){\n\t\t\tfor(int j = 0;j<n;j++){\n\t\t\t\tif(auxR[i] == true || auxC[j] == true){\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public final void setThresholdEnable(boolean thresholdState){\n\t\tthis.isThresholdUsingEnabled = thresholdState;\n\t}", "public double getPercentThreshold()\n {\n return percentThreshold;\n }", "private final void init(int[] priorityArray, boolean useThreshold, double giftThreshold){\n\t\t\t\n\t\tthis.maxValueCount = priorityArray.length;\n\t\tthis.priorities = new int[maxValueCount];\n\t\t\n\t\tpriorities = priorityArray;\n\t\t\n\t\tthis.valueCount = 0;\n\t\tthis.values = new double[this.maxValueCount];\n\t\tthis.resultValue = 0;\n\t\tthis.lastResultValue = 0;\n\t\tisThresholdUsingEnabled = useThreshold;\n\t\tthis.threshold = giftThreshold;\n\t\t\t\t\n\t}", "public NaiveBayesCountMinSketch(int nbOfHashes, int logNbOfBuckets, double threshold){\n this.nbOfHashes = nbOfHashes;\n this.logNbOfBuckets=logNbOfBuckets;\n this.threshold = threshold;\n\n /* FILL IN HERE */\n\n \n this.seeds = new int[nbOfHashes];\n Random rand = new Random();\n for (int i = 0; i<nbOfHashes; i++) {\n this.seeds[i] = rand.nextInt();\n }\n \n counts = new int[2][nbOfHashes][1 << logNbOfBuckets];\n classCounts =new int[2];\n \n \n for (int i = 0; i<2; i++) {\n for (int h = 0; h<nbOfHashes; h++) {\n \tArrays.fill(counts[i][h], 1);\n \n }\n \tclassCounts[i] = 1;\n } \n \n }", "public void setZeroes_ok(int[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\n\t\tif (m == 1) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[0][j] == 0) {\n\t\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\t\tmatrix[0][k] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (n == 1) {\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tif (matrix[i][0] == 0) {\n\t\t\t\t\tfor (int k = 0; k < m; k++) {\n\t\t\t\t\t\tmatrix[k][0] = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tint idx = 0;\n\t\tboolean[][] visit = new boolean[m][n];\n\t\twhile (idx <= m * n - 1) {\n\t\t\tint i = idx / n;\n\t\t\tint j = idx % n;\n\t\t\tif (i < m && j < n && matrix[i][j] == 0 && visit[i][j] == false) {\n\t\t\t\t// set whole row to 0\n\t\t\t\tfor (int k = 0; k < n; k++) {\n\t\t\t\t\tif (matrix[i][k] != 0) {\n\t\t\t\t\t\tmatrix[i][k] = 0;\n\t\t\t\t\t\tvisit[i][k] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set whole col to 0\n\t\t\t\tfor (int l = 0; l < m; l++) {\n\t\t\t\t\tif (matrix[l][j] != 0) {\n\t\t\t\t\t\tmatrix[l][j] = 0;\n\t\t\t\t\t\tvisit[l][j] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t}", "public void setMinThreshold(double minThreshold) {\n this.minThreshold = minThreshold;\n }", "public void mo1087b() {\n this.f1007h = new SparseBooleanArray();\n notifyDataSetChanged();\n }", "public Integer successThreshold() {\n return this.successThreshold;\n }", "public Threshold ( TargetBehavior behavior, float threshold, int c ) {\n\t\tsuper(c);\n\t\tbehavior_ = behavior;\n\t\ttarget_ = behavior.getTarget();\n\t\tthreshold_ = threshold;\n\t}", "public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public double threshold(double z) {\n\t\tif(z>=0) {\n\t\t\treturn 1;\n\t\t}else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public native void solarizeImage(double threshold) throws MagickException;", "public void setZeroes(int[][] matrix) {\n int MOD = -1000000;\n //no of rows\n int m = matrix.length;\n //no of columns\n int n = matrix[0].length;\n //Iterate over the matrix\n for (int i = 0; i<m; i++)\n {\n for (int j = 0; j<n; j++)\n {\n //check if element is 0\n if(matrix[i][j] == 0)\n {\n \n //for all the values in that row i which contains the 0 element \n for (int k = 0; k < n ; k++)\n {\n //Check for non zero elements in that row \n if(matrix[i][k] !=0)\n {\n //Assign dummy value to it\n matrix[i][k] = MOD;\n }\n }\n //all the values in that column j which contains the 0 element\n for (int k=0; k< m; k++)\n { \n //Check for non zero elements in that column\n if(matrix[k][j]!=0)\n {\n //Assign dummy value to it\n matrix[k][j] = MOD;\n } \n }\n }\n }\n }\n //Iterate again for final output matrix\n for (int i = 0; i< m ; i++)\n {\n for (int j = 0; j< n; j++ )\n {\n //Check if the value of element is MOD\n if (matrix[i][j] == MOD)\n {\n //if so Change to 0\n matrix[i][j] = 0;\n }\n }\n }\n \n }", "public RainCollectorSensor() {\r\n\t\trecalibrateData();\r\n\t\tmetric = true; \r\n\t}", "private boolean m(){\r\n int m = countColors - maxSat;\r\n if (m <= TH){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "boolean incHighValue() { return true; }", "public void maximizeIntensity()\r\n {\r\n\tint rows = getHeight();\r\n\tint cols = getWidth();\r\n\tdouble dbL = (double)(L-1);\r\n\tfor (int row = 0; row < rows; row++)\r\n\t{\r\n\t for (int col = 0; col < cols; col++)\r\n\t {\r\n\t\tintensity[row][col] = (short)Math.min(L-1, \r\n\t\t Math.round((L-1) * maxIntensity(hue[row][col]/dbL,\r\n\t\t saturation[row][col]/dbL)));\r\n\t }\r\n\t}\r\n }", "public LessThan() {\n this.toCompare = new double[2];\n this.index = 0;\n }", "public int getMyNearbyThreshold() {\n return myNearbyThreshold;\n }" ]
[ "0.5903197", "0.5795374", "0.57242054", "0.5615834", "0.555381", "0.54959595", "0.53504646", "0.53308445", "0.53031784", "0.52972424", "0.5243679", "0.522729", "0.5209822", "0.5186727", "0.5150065", "0.5144063", "0.5115986", "0.51108307", "0.51000905", "0.508195", "0.5072702", "0.50627816", "0.5049574", "0.5046827", "0.50235605", "0.5009819", "0.49858773", "0.49793068", "0.49562737", "0.49529988", "0.49490827", "0.49250996", "0.4863354", "0.4834193", "0.48327166", "0.48286873", "0.4801998", "0.4785097", "0.47835842", "0.47688326", "0.47642785", "0.4762199", "0.47568828", "0.4752936", "0.4733018", "0.47214264", "0.47017685", "0.46994317", "0.46886918", "0.46868485", "0.4674094", "0.46690312", "0.46450126", "0.4639975", "0.46359575", "0.4634471", "0.4614867", "0.45977247", "0.4594311", "0.4584586", "0.4581116", "0.45793796", "0.45760965", "0.4569381", "0.45556778", "0.45405388", "0.4536315", "0.4517166", "0.45126557", "0.45054764", "0.45032787", "0.45022655", "0.4495347", "0.44910476", "0.44888237", "0.4475957", "0.44665667", "0.44663852", "0.44605932", "0.44321495", "0.4425836", "0.44136986", "0.439869", "0.4390635", "0.43731546", "0.43693602", "0.43593022", "0.43577054", "0.435672", "0.43555322", "0.43504637", "0.4338256", "0.43332657", "0.43300077", "0.4327622", "0.43242744", "0.4312361", "0.4302674", "0.42928314", "0.42832473" ]
0.6983653
0
removes all elements below the given threshold
public void prune(double belowThreshold) { for(T first : getFirstDimension()) { for(T second : getMatches(first)) { if(get(first, second)<belowThreshold) { set(first, second, 0.0); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeSmallRoots(int threshold) {\n\t\tArrayList<Root> smallRoots = new ArrayList<Root>();\n\t\tfor (Root r: allRoots) {\n\t\t\tif (r.volume() < threshold) {\n\t\t\t\tsmallRoots.add(r);\n\t\t\t}\n\t\t}\n\t\tfor (Root r: smallRoots) {\n\t\t\tallRoots.remove(r);\n\t\t}\n\t}", "public Grid filterSmallValues(int threshold) {\n\t\n\t\tassert(threshold > 0);\n\t\t\n\t\tint[][] newGrid = new int[width()][height()];\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\tif (Math.abs(valueAt(i, j)) < threshold) {\n\t\t\t\t\tnewGrid[i][j] = 0;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewGrid[i][j] = valueAt(i, j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Grid(newGrid);\n\t}", "private Element removeHiElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findHiElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element hi = (Element)elems.get(i);\n\n removeHiElement(hi);\n }\n\n return p_seg;\n }", "public void deleteIfGreater(int target){\n\t\tNode tmp = head;\n\t\twhile(true){\n\t\t\tif(tmp == null){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(tmp.getElement() > target) {\n\t\t\t\tdelete(tmp.getElement());\n\t\t\t}\n\t\t\ttmp = tmp.getNext();\n\t\t}\n\t}", "public T removeBest();", "void removeNearbyPixels(Stroke theStroke){\n\t\tint index;\n\t\tint CurvIndex;\n\t\tint SpeedIndex;\n\t\tVector ptList = theStroke.getM_ptList();\n\t\tfor(index=0; index < CommonSegmentPts.size(); index++){\n\t\t\tPoint CommonPt = (PixelInfo)ptList.get((Integer)CommonSegmentPts.get(index));\n\t\t\tfor(CurvIndex = 0; CurvIndex < CurvVector.size(); CurvIndex++){\n\t\t\t\tPoint CurvPt = (PixelInfo)ptList.get((Integer)CurvVector.get(CurvIndex));\n\t\t\t\tif(CommonPt.distance(CurvPt) <= TolerantDistance){\n\t\t\t\t\tCurvVector.remove(CurvIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(SpeedIndex = 0; SpeedIndex < SpeedVector.size(); SpeedIndex++){\n\t\t\t\tPoint SpeedPt = (PixelInfo)ptList.get((Integer)SpeedVector.get(SpeedIndex));\n\t\t\t\tif(CommonPt.distance(SpeedPt) <= TolerantDistance){\n\t\t\t\t\tSpeedVector.remove(SpeedIndex--);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void removeAllGreater(int target){\n\t\twhile(head!=null && head.getData()>target){\n\t\t\thead = head.getNext();\n\t\t}\n\t\t\n\t\t// check if no node exists\n\t\tif(head==null) return;\n\t\t\n\t\tNode current = head;\n\t\t\n\t\t// check for next nodes and remove them if greater than target\n\t\twhile(current.getNext()!=null){\n\t\t\t// if next's data is greater than target then set current.next = current.next.next\n\t\t\t// else set current = current.next\n\t\t\tif(current.getNext().getData()>target)\n\t\t\t\tcurrent.setNext(current.getNext().getNext());\n\t\t\telse \n\t\t\t\tcurrent = current.getNext();\n\t\t}\n\t}", "public static void removeAllNumbersGreaterThan10(Set<Integer> set) {\n Iterator<Integer> iterator = set.iterator();\n while (iterator.hasNext()) {\n Integer integer = iterator.next();\n if (integer.intValue() > 10) {\n iterator.remove();\n }\n }\n }", "public void setThreshold(float threshold){\n this.threshold = threshold;\n }", "private void removeLargeValues(ArrayList<Integer> myList)\n {\n // sort list to make removing values easy\n Collections.sort(myList);\n\n while (myList.size() > 1)\n {\n if (myList.get(myList.size() - 1) > 21)\n myList.remove(myList.size() - 1);\n else\n break;\n }\n }", "private void removeweak(final List<Level> levels) {\n \n final List<Integer> removeIdx = Lists.newArrayList();\n\n for (int i = 0; i < (levels.size()); i++) {\n final Level currentLevel = levels.get(i);\n final Float strength = currentLevel.getStrength();\n if (strength.intValue() < STRENGTH) {\n removeIdx.add(i);\n }\n }\n\n CollectionUtils.remove(levels, removeIdx);\n }", "private void deletePeak(double peak)\n {\n \tfor (int i = 0; i < peakList.size(); i++) {\n\t\t\tif(peakList.get(i).getMass() == peak)\n\t\t\t{\n\t\t\t\tpeakList.remove(i);\n\t\t\t\t//set new minimum weight\n\t\t\t\tthis.minWeight = Double.MAX_VALUE;\n\t\t\t\tsetMinWeight();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n }", "@Override\n public void prune(long boundaryValue)\n {\n Iterator<MemorySegment> iterator = segments.iterator();\n while(iterator.hasNext())\n {\n MemorySegment segment = iterator.next();\n if(segment.lastVal() < boundaryValue)\n {\n iterator.remove();\n }\n }\n\n //Note: This maintains a currentSegment even if all segments have\n // been pruned.\n if(segments.size() == 0)\n {\n addSegment();\n }\n }", "public void RemoveRowsIfStackedTooHigh() {\n \t\t\n while (rowHasBlocks(Parameters.RemoveBiggestPartialRowIfBlockInRow)) {\n int NoOfPiecesRemoved = \n eraseBiggestRowGreaterThan(Parameters.RemoveBiggestPartialRowIfBlockInRow);\n //remove points for each empty square\n ComputeScoreAndDelay(-(COLUMNS - NoOfPiecesRemoved) * Parameters.PointsSubtractedPerEmptySpaceFromPartialRow);\n \n }\n game_grid.repaint();\n LogEvent(\"row_removed\");\n }", "public void cull(int targetSize) {\r\n Validate.nonNegative(targetSize, \"target size\");\r\n\r\n while (numElements > targetSize) {\r\n Fitness worst = elementsByFitness.firstKey();\r\n List<Element> list = elementsByFitness.get(worst);\r\n int listSize = list.size();\r\n assert listSize > 0 : listSize;\r\n if (numElements - listSize >= targetSize) {\r\n List<Element> old = elementsByFitness.remove(worst);\r\n assert old != null;\r\n numElements -= listSize;\r\n } else {\r\n Iterator<Element> it = list.iterator();\r\n while (it.hasNext()) {\r\n it.next();\r\n if (numElements > targetSize) {\r\n it.remove();\r\n --numElements;\r\n }\r\n }\r\n }\r\n }\r\n }", "@Test\n\tpublic void testEliminationByMediumBox(){\n\t\tsetBoardUp();\n\t\tMediumBox mBox = new MediumBox(board, 1, 1);\n\t\talgorithm.applyEliminationInMediumBox(mBox);\n\t\tint[] toBeRemoved = {1, 2, 8, 9};\n\t\tint[] fromCells = {0, 1, 4, 7, 8};\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCells.length; j++)\n\t\t\t\tcondition &= !mBox.cell[fromCells[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\t\n\t\tassertTrue(condition);\n\t}", "public void removeOverTime(){\r\n\t\tlong latest = timeQueue.getLast();\r\n\t\twhile( !timeQueue.isEmpty() && overlapRatioQueue.isEmpty() ){\r\n\t\t\tlong temp = timeQueue.getFirst();\r\n\t\t\tif( latest - temp > SMOOTING_INTERVAL ){\r\n\t\t\t\ttimeQueue.removeFirst();\r\n\t\t\t\toverlapRatioQueue.removeFirst();\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static public Set<Employee> removeWithWageAbove(Set<Employee> company, Float maximumWage){\n\t\tfor(Iterator<Employee> iterator = company.iterator(); iterator.hasNext(); ){\n\t\t\tEmployee currentEmpl = iterator.next();\n\t\t\tif(currentEmpl.getSalary() > maximumWage) {\n\t\t\t\titerator.remove();\n\t\t\t}\n\t\t}\n\t\treturn company;\n\t}", "private void removeInvalidFromPool()\r\n\t{\r\n\t\tint i;\r\n\t\tint size_mature_pool;\r\n\t\tint idx_1st_oldest;//index of the oldest individual\r\n\t\tint idx_2nd_oldest;//index of the 2nd oldest individual\r\n\t\tint idx_to_remove;//index of an chromosome which has to be removed\r\n\t\tint idx_current;//index of currently checked genotype\r\n\t\tint num_errors;//number of errors of the current chromosome\r\n\t\tint max_num_errors;//maximum numbers of stored errors among checked chromosomes\r\n\t\tdouble error_1st_oldest;//average error of the oldest individual\r\n\t\tdouble error_2nd_oldest;//average error of the 2nd oldest individual\r\n\t\tdouble max_error;//largest error among the oldest individuals\r\n\t\tVector<Integer> idx_oldest;//indices of all chromosomes with a life span larger than a predefined threshold\r\n\t\t\r\n\t\tsize_mature_pool = _pool_of_bests.size();\r\n\t\t\r\n\t\t//if the maturity pool is full and none of the genotypes could be removed above because of module outputs\r\n\t\t//then remove one of the oldest individuals according to the errors\r\n\t\tif(_pool_of_bests.size()==_size_pool_of_bests)\r\n\t\t{\r\n\t\t\tidx_oldest = new Vector<Integer>(0, 1);\r\n\t\t\t\r\n\t\t\t//find all oldest genotypes\r\n\t\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t\t{\r\n\t\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\t\tif(num_errors>=_min_life_span)\r\n\t\t\t\t{\r\n\t\t\t\t\tidx_oldest.add(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//1) find the worst oldest gentypes with a span above a threshold\r\n\t\t\t//2) do not remove a single genotype without comparison;\r\n\t\t\t// it could have very high performance\r\n\t\t\tif(idx_oldest.size() > 1)\r\n\t\t\t{\r\n\t\t\t\tidx_to_remove = idx_oldest.get(0);\r\n\t\t\t\tmax_error = _pool_of_bests.get(idx_to_remove)._error.getAverageError();\r\n\t\t\t\tfor(i=idx_to_remove+1; i<idx_oldest.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tidx_current = idx_oldest.get(i);\r\n\t\t\t\t\tif(max_error < _pool_of_bests.get(idx_current)._error.getAverageError())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tidx_to_remove = idx_current;\r\n\t\t\t\t\t\tmax_error = _pool_of_bests.get(idx_to_remove)._error.getAverageError();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse//remove the worst of two oldest genotypes if none of genotypes had span above the threshold\r\n\t\t\t{\r\n\t\t\t\t//find the oldest and 2nd oldest individuals\r\n\t\t\t\tidx_1st_oldest = -1;\r\n\t\t\t\tmax_num_errors = 0;\r\n\t\t\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//\"[0]\" because the number of errors is equal for all sub-individuals of the same individual\r\n\t\t\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\t\t\tif(max_num_errors < num_errors)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmax_num_errors = num_errors;\r\n\t\t\t\t\t\tidx_1st_oldest = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//find the 2nd oldest individuals\r\n\t\t\t\tidx_2nd_oldest = -1;\r\n\t\t\t\tif(size_mature_pool > 1)//the 2nd oldest individual exists if there are 2 or more individuals\r\n\t\t\t\t{\r\n\t\t\t\t\tmax_num_errors = 0;\r\n\t\t\t\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i!=idx_1st_oldest)//the oldest individual should be ignored\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//\"[0]\" because the number of errors is equal for all sub-individuals of the same individual\r\n\t\t\t\t\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\t\t\t\t\tif(max_num_errors < num_errors)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tmax_num_errors = num_errors;\r\n\t\t\t\t\t\t\t\tidx_2nd_oldest = i;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//compare performances of both oldest genotypes using their average errors;\r\n\t\t\t\terror_1st_oldest = _pool_of_bests.get(idx_1st_oldest)._error.getAverageError();\r\n\t\t\t\tif(idx_2nd_oldest!=-1)\r\n\t\t\t\t{\r\n\t\t\t\t\terror_2nd_oldest = _pool_of_bests.get(idx_2nd_oldest)._error.getAverageError();\r\n\r\n\t\t\t\t\tif(error_1st_oldest < error_2nd_oldest)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tidx_to_remove = idx_2nd_oldest;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tidx_to_remove = idx_1st_oldest;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse//a single individual must always be replaced\r\n\t\t\t\t{\r\n\t\t\t\t\tidx_to_remove = idx_1st_oldest;\r\n\t\t\t\t}\r\n\t\t\t}//are there genotypes with life span above a threshold?\r\n\t\t\t\r\n\t\t\t_pool_of_bests.remove(idx_to_remove);\r\n\t\t}//is maturity pool full?\r\n\t}", "void prune() {\n\n }", "void removeMatching(MetricFilter filter);", "public T removeMin ();", "public static void removeAllNumbersGreaterThan10(Set<Integer> set) {\n SortedSet<Integer> sortedSet = new TreeSet<>();\n sortedSet.addAll(set);\n set.clear();\n set.addAll(sortedSet.headSet(11));\n }", "public int[] filterBySharpness(double lower_threshold, double upper_threshold) {\n ArrayList<Integer> newPeaks = new ArrayList<Integer>();\n int[] keep = new int[this.midpoints.length];\n Arrays.fill(keep, 1);\n\n for (int i=0; i<this.sharpness[0].length; i++) {\n double minVal = Math.min(this.sharpness[0][i], this.sharpness[1][i]);\n if (minVal < lower_threshold) {\n keep[i] = 0;\n }\n }\n for (int i=0; i<this.sharpness[0].length; i++) {\n double maxVal = Math.max(this.sharpness[0][i], this.sharpness[1][i]);\n if (maxVal > upper_threshold) {\n keep[i] = 0;\n }\n }\n for (int i=0; i<keep.length; i++) {\n if(keep[i] == 1) {\n newPeaks.add(this.midpoints[i]);\n }\n }\n return UtilMethods.convertToPrimitiveInt(newPeaks);\n }", "public void removeSmaller(double value){\r\n\t DoubleNode cursor2; \r\n\tfor(cursor = head; cursor != null; cursor = cursor.getLink()){\r\n\t\tif(cursor.getData() < value){\r\n\t\t\tif(cursor == head){\r\n\t\t\t\thead = head.getLink(); \r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcursor2 = cursor; \r\n\t\t\t\tthis.removeCurrent();\r\n\t\t\t\tcursor = cursor2;\r\n\t\t\t\tmanyNodes--; \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n }", "private void cleanConditionally(Element e, String tag) {\n\n if (!cleanConditionally) {\n return;\n }\n\n Elements tagsList = e.getElementsByTag(tag);\n int curTagsLength = tagsList.size();\n\n /**\n * Gather counts for other typical elements embedded within. Traverse backwards so we can remove nodes\n * at the same time without effecting the traversal. TODO: Consider taking into account original\n * contentScore here.\n **/\n for (int i = curTagsLength - 1; i >= 0; i--) {\n Element ee = tagsList.get(i);\n if (ee.ownerDocument() == null) {\n continue; // it a child of something we've already killed, so it\n // has no document.\n }\n double weight = getClassWeight(ee);\n double contentScore = getContentScore(ee);\n\n LOG.debug(\"Cleaning Conditionally [\" + ee.getClass() + \"] (\" + ee.className() + \":\" + ee.id()\n + \")\" + contentScore);\n\n if (weight + contentScore < 0) {\n LOG.debug(\"Negative content score\");\n ee.remove();\n } else if (getCharCount(ee, ',') < 10) {\n /**\n * If there are not very many commas, and the number of non-paragraph elements is more than\n * paragraphs or other ominous signs, remove the element.\n **/\n int p = ee.getElementsByTag(\"p\").size();\n int img = ee.getElementsByTag(\"img\").size();\n int li = ee.getElementsByTag(\"li\").size() - 100;\n int input = ee.getElementsByTag(\"input\").size();\n\n Elements embeds = ee.getElementsByTag(\"embed\");\n int embedCount = embeds.size();\n // removed code that pays specific attention to youtube.\n double linkDensity = getLinkDensity(ee);\n int contentLength = ee.text().length();\n boolean toRemove = false;\n\n if (img > p) {\n toRemove = true;\n } else if (li > p && !\"ul\".equals(tag) && !\"ol\".equals(tag)) {\n toRemove = true;\n } else if (input > Math.floor(p / 3)) {\n toRemove = true;\n } else if (contentLength < 25 && (img == 0 || img > 2)) {\n toRemove = true;\n } else if (weight < 25 && linkDensity > 0.2) {\n toRemove = true;\n } else if (weight >= 25 && linkDensity > 0.5) {\n toRemove = true;\n } else if ((embedCount == 1 && contentLength < 75) || embedCount > 1) {\n toRemove = true;\n }\n\n if (toRemove) {\n LOG.debug(\"failed keep tests.\");\n ee.remove();\n }\n }\n }\n }", "public static void main(String[] args) {\r\n\t\t\r\n\tList<Integer> myList = new ArrayList<>();\r\n\tmyList.add(0);\r\n\tmyList.add(1);\r\n\tmyList.add(5);\r\n\tmyList.add(115);\r\n\tmyList.add(100);\r\n\tmyList.add(26);\r\n\tmyList.add(5555);\r\n\tmyList.add(-12);\r\n\t\r\n\tSystem.out.println(myList);\r\n\t\r\n\tfor(int i = 0; i<myList.size(); i++) {\r\n\t\tif(myList.get(i) > 100 || myList.get(i) < 1) {\r\n\t\t\tmyList.remove(i);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\t\r\n\tSystem.out.println(myList);\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t}", "protected void removeAlarmsIf(@NonNull Predicate<K> predicate) {\n boolean removed = false;\n synchronized (mLock) {\n Pair[] alarms = mAlarmPriorityQueue.toArray(new Pair[mAlarmPriorityQueue.size()]);\n for (int i = alarms.length - 1; i >= 0; --i) {\n final K key = (K) alarms[i].first;\n if (predicate.test(key)) {\n mAlarmPriorityQueue.remove(alarms[i]);\n removed = true;\n }\n }\n if (removed) {\n setNextAlarmLocked();\n }\n }\n }", "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "private static void prune(ArrayList<Morphism> candidates,\n\t\t\tAutomaton automaton) {\n\t\t// this is really inefficient!\n\t\t// at a minimum, we could avoid recomputing lessThan twice for each\n\t\t// candidate.\n\t\tMorphism least = candidates.get(0);\n\t\tfor (Morphism candidate : candidates) {\n\t\t\tif (lessThan(candidate, least, automaton)) {\n\t\t\t\tleast = candidate;\n\t\t\t}\n\t\t}\n\n\t\tint diff = 0;\n\t\tfor (int i = 0; i != candidates.size(); ++i) {\n\t\t\tMorphism candidate = candidates.get(i);\n\t\t\tif (lessThan(least, candidate, automaton)) {\n\t\t\t\tdiff = diff + 1;\n\t\t\t} else {\n\t\t\t\tcandidates.set(i - diff, candidate);\n\t\t\t}\n\t\t}\n\n\t\t// now actually remove those bypassed.\n\t\tint last = candidates.size();\n\t\twhile (diff > 0) {\n\t\t\tcandidates.remove(--last);\n\t\t\tdiff = diff - 1;\n\t\t}\n\t}", "public void removeMissiles(){\n nunMissiles--;\n }", "void remove(int v){\n if(isEmpty()!=1){\n for(int i=0;i<size;i++){\n if(values[i]==v){\n int j = i;\n while((j+1)!=size){\n values[j] = values[j+1];\n j++;\n\n }\n values[j] = (-1);\n break;\n }\n }\n }\n }", "void removeDecisionSightDistance(int i);", "public void removeAllElements();", "void removeScans(int i);", "@Test\r\n public void lowerHigherDoNotContains() throws Exception {\r\n TreeSet<Integer> check = new TreeSet<>();\r\n check.addAll(sInt);\r\n check.remove(3);\r\n assertEquals(2, (int) check.lower(3));\r\n assertEquals(4, (int) check.higher(3));\r\n assertEquals(4, (int) check.ceiling(3));\r\n assertEquals(2, (int) check.floor(3));\r\n }", "protected synchronized void prune()\n {\n long ldtStart = Base.getSafeTimeMillis();\n int cCur = getUnits();\n int cMin = getLowUnits();\n if (cCur < cMin)\n {\n return;\n }\n\n int nType = getEvictionType();\n switch (nType)\n {\n default:\n case EVICTION_POLICY_HYBRID:\n {\n // sum the entries' units per priority\n int[] acUnits;\n while (true)\n {\n try\n {\n acUnits = new int[11];\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n Entry entry = (Entry) iter.next();\n int cUnits = entry.getUnits();\n try\n {\n acUnits[entry.getPriority()] += cUnits;\n }\n catch (IndexOutOfBoundsException e)\n {\n acUnits[Math.max(0, Math.min(entry.getPriority(), 10))] += cUnits;\n }\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n int cTotal = 0;\n int nPrunePriority = 0;\n while (nPrunePriority <= 10)\n {\n cTotal += acUnits[nPrunePriority];\n if (cTotal > cMin)\n {\n break;\n }\n ++nPrunePriority;\n }\n\n // build a list of entries to discard\n Entry entryDiscardHead = null;\n Entry entryDiscardTail = null;\n\n // determine the number at the cut-off priority that must be pruned\n int cAdditional = Math.max(0, cTotal - cMin);\n\n while (cCur > cMin)\n {\n try\n {\n for (Iterator iter = entrySet().iterator(); iter.hasNext() && cCur > cMin; )\n {\n Entry entry = (Entry) iter.next();\n int nPriority = entry.getPriority();\n if (nPriority >= nPrunePriority)\n {\n int cUnits = entry.getUnits();\n if (nPriority == nPrunePriority)\n {\n if (cAdditional <= 0)\n {\n continue;\n }\n cAdditional -= cUnits;\n }\n cCur -= cUnits;\n\n // remove the entry from the map\n super.removeEntryInternal(entry);\n\n // link the entry into the list of deferred\n // removals, but without changing its \"next\"\n // reference because the iterator that we are\n // using here is counting on that \"next\" ref\n if (entryDiscardHead == null)\n {\n entryDiscardHead = entry;\n }\n else\n {\n entryDiscardTail.setNext(entry);\n }\n entryDiscardTail = entry;\n }\n }\n\n // seal the end of the linked list of entries to discard\n if (entryDiscardTail != null)\n {\n entryDiscardTail.setNext(null);\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // process the list of deferred removals\n for (Entry entryDiscard = entryDiscardHead; entryDiscard != null; )\n {\n // unlink it altogether\n Entry entryNext = entryDiscard.getNext();\n entryDiscard.setNext(null);\n\n // discard it\n removeExpired(entryDiscard, false);\n\n entryDiscard = entryNext;\n }\n }\n break;\n\n case EVICTION_POLICY_LRU:\n case EVICTION_POLICY_LFU:\n {\n boolean fLRU = (nType == EVICTION_POLICY_LRU);\n SparseArray array;\n while (true)\n {\n try\n {\n array = new SparseArray();\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n Entry entry = (Entry) iter.next();\n long lOrder = fLRU ? entry.getLastTouchMillis()\n : entry.getTouchCount();\n Object oPrev = array.set(lOrder, entry);\n if (oPrev != null)\n {\n // oops, more than one entry with the same order;\n // make a list of entries\n List list;\n if (oPrev instanceof List)\n {\n list = (List) oPrev;\n }\n else\n {\n list = new ArrayList();\n list.add((Entry) oPrev);\n }\n list.add(entry);\n array.set(lOrder, list);\n }\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n for (Iterator iter = array.iterator();\n getUnits() > cMin && iter.hasNext(); )\n {\n Object o = iter.next();\n if (o instanceof Entry)\n {\n Entry entry = (Entry) o;\n removeExpired(entry, true);\n }\n else\n {\n List list = (List) o;\n for (Iterator iterList = list.iterator();\n getUnits() > cMin && iterList.hasNext(); )\n {\n Entry entry = (Entry) iterList.next();\n removeExpired(entry, true);\n }\n }\n }\n }\n break;\n\n case EVICTION_POLICY_EXTERNAL:\n getEvictionPolicy().requestEviction(cMin);\n break;\n }\n m_stats.registerCachePrune(ldtStart);\n }", "public void cullPopulation(){\n\t\t// sort the population by the fitness function from low to high\n\t\tCollections.sort(population);\n\t\t\n\t\t// remove 10% of the weakest part of the population\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i++){\n\t\t\tpopulation.remove(0);\n\t\t}\n\n\t}", "void removeTrafficVolume(int i);", "public void discard(){\n for(int i = 1 ; i <= 110 ; i++) cardDeck.remove(i);\n }", "private void trimX() {\n\t\tint indexIntoBranches = 0;\n\t\tfor (int i = 0; i < this.branches.size(); i++) {\n\t\t\tif (this.branches.get(i).size() == this.numXVertices) {\n\t\t\t\tindexIntoBranches = i;\n\t\t\t}\n\t\t}\n\n\t\tthis.allX = (ArrayList) this.branches.get(indexIntoBranches).clone(); // We need this for a set difference above\n\n\t\tfor (int k = 0; k < this.branches.get(indexIntoBranches).size(); k++) {\n\t\t\tfor (int j = 0; j < this.branches.get(indexIntoBranches).size(); j++) {\n\t\t\t\t// Ignore if the index is the same - otherwise remove the edges\n\t\t\t\tif (!(k == j)) {\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(k)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(j));\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(j)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void removeDeadVampires() {\n\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n if (lista[i].getVida() <= 0)\n delVampire(i);\n }\n }", "private static ArrayList<Result> pruneResults(ArrayList<Result> pruneThis, int limit){\n\t\tArrayList<Result> sortednodups = sortByScore(pruneThis);\n\t\tArrayList<Result> pruned = new ArrayList<Result>();\n\t\tfor (int i = 0; i<limit && i < pruneThis.size(); i++){\n\t\t\tpruned.add(sortednodups.get(i));\n\t\t}\n\t\treturn pruned; \n\t}", "public void deleteMin();", "void deleteMedian () {\n if (fillLength > 0) {\n for (int i = fillLength / 2; i < fillLength - 1; i++) {\n array[i] = array[i + 1];\n }\n array[fillLength - 1] = 0;\n fillLength--;\n }\n }", "public int[] filterByPlateauSize(double lower_threshold, double upper_threshold) {\n ArrayList<Integer> newPeaks = new ArrayList<Integer>();\n for (int i=0; i<this.plateau_size.length; i++) {\n if (this.plateau_size[i] >= lower_threshold && this.plateau_size[i] <= upper_threshold) {\n newPeaks.add(this.midpoints[i]);\n }\n }\n return UtilMethods.convertToPrimitiveInt(newPeaks);\n }", "public void f6(List<Book> a) {\r\n double min = a.get(0).getPrice();\r\n for (Book o : a) {\r\n if (o.getPrice() < min) {\r\n min = o.getPrice();\r\n }\r\n }\r\n int acc = a.size();\r\n for (int i = acc-1; i > 0; i--) {\r\n a.remove(i);\r\n break;\r\n }\r\n }", "private static void removeElementsFromArray(JSONObject root, String arrName, Predicate<JSONObject> toRemove)\n\t{\n\t\tJSONArray arr = root.optJSONArray(arrName);\n\t\tif (arr != null)\n\t\t\tfor (Iterator<Object> vals = arr.iterator(); vals.hasNext();) {\n\t\t\t\tif (toRemove.test((JSONObject)vals.next())) {\n\t\t\t\t\tvals.remove();\n\t\t\t\t}\n\t\t\t}\n\t}", "public void cleanupOldBlocks (long threshTime) ;", "default boolean removeIf(LongPredicate filter) {\n/* 193 */ Objects.requireNonNull(filter);\n/* 194 */ boolean removed = false;\n/* 195 */ LongIterator each = iterator();\n/* 196 */ while (each.hasNext()) {\n/* 197 */ if (filter.test(each.nextLong())) {\n/* 198 */ each.remove();\n/* 199 */ removed = true;\n/* */ } \n/* */ } \n/* 202 */ return removed;\n/* */ }", "void setThreshold(float value);", "void removeBefore(double when,DystoreField fld)\n{\n if (fld == time_field && next_time >= when || tuple_data.size() == 0) return;\n\n if (tuple_data.size() > 1000000) {\n System.err.println(\"TUPLE SET SIZE = \" + tuple_data.size() + \" \" + when + \" \" + next_time +\n\t\t\t \" \" + last_check);\n for (DystoreTuple dt : tuple_data) {\n\t System.err.println(\"\\t\" + dt);\n }\n }\n\n time_field = fld;\n next_time = -1;\n for (Iterator<DystoreTuple> it = tuple_data.iterator(); it.hasNext(); ) {\n DystoreTuple dt = it.next();\n double t0 = dt.getTimeValue(fld);\n if (t0 < when) {\n\t // System.err.println(\"DYSTORE: REMOVE \" + t0 + \" \" + when + \" \" + dt);\n\t it.remove();\n }\n else if (next_time < 0 || t0 < next_time) next_time = t0;\n }\n\n last_check = when;\n}", "private void removeEvicted() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n removeMap.putAll(toEvictMap);\n toEvictMap.clear();\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.evictedElement(entry.getKey());\n }\n }\n }", "public void setThreshold(double t)\n {\n this.threshold = t;\n }", "public void remove(int index) {\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\r\n\t\t\tfor (int k=index;k<size;k++) {\t//shifting element\r\n\t\t\t\tlist[k]=list[k+1];\r\n\t\t\t}\r\n\t\t\tsize--;\t\t//decreases size\r\n\t\t\t//checks if the size of array is not 0 and less than 25% of the capacity of the array\r\n\t\t\tif (size!=0 && capacity/size >=4)\r\n\t\t\t\tresize(this.capacity/2);\t//decreasing size of array\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}", "void removeSpeeds(int i);", "public void performSuppression() {\n \n for (int row = 0; row < dataOutput.getNumRows(); row++) {\n if (privacyModelDefinesSubset == null || privacyModelDefinesSubset.contains(row)) {\n final int hash = dataOutput.hashCode(row);\n final int index = hash & (hashTableBuckets.length - 1);\n HashGroupifyEntry m = hashTableBuckets[index];\n while ((m != null) && ((m.hashcode != hash) || !dataOutput.equalsIgnoringOutliers(row, m.row))) {\n m = m.next;\n }\n if (m == null) {\n throw new RuntimeException(\"Invalid state! Group the data before suppressing records!\");\n }\n if (!m.isNotOutlier || this.isCompletelyGeneralized(m)) {\n dataOutput.or(row, Data.OUTLIER_MASK);\n m.isNotOutlier = false;\n }\n } else {\n dataOutput.or(row, Data.OUTLIER_MASK);\n }\n }\n }", "public void trimToSize() {\r\n for (int i=size(); i-->0;)\r\n if (get(i)==null)\r\n remove(i);\r\n }", "@OpMethod(\n\t\top = net.imagej.ops.threshold.apply.ApplyConstantThreshold.class)\n\tpublic <T extends RealType<T>> Iterable<BitType> apply(\n\t\tfinal Iterable<BitType> out, final Iterable<T> in, final T threshold)\n\t{\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal Iterable<BitType> result =\n\t\t\t(Iterable<BitType>) ops().run(\n\t\t\t\tnet.imagej.ops.Ops.Threshold.Apply.class,\n\t\t\t\tout, in, threshold);\n\t\treturn result;\n\t}", "public static void remove1() {\n\t\tSystem.out.println(\">>>>>>>>>>>>\");\n\t\tArrayList<Integer> class0 = new ArrayList<Integer>();\n\t\tclass0.add(1);\n\t\tclass0.add(2);\n class0.add(3);\n class0.add(4);\n class0.add(5);\n\t\tassert (class0.contains(1) == true);\n\t\tassert (class0.contains(2) == true);\n assert (class0.contains(3) == true);\n assert (class0.contains(4) == true);\n assert (class0.contains(5) == true);\n\t\tfor(int i = 0; i < class0.size(); i++) {\n\t\t\tint temp = (int)class0.get(i);\n\t\t\tSystem.out.println(temp + \" \");\n\t\t}\n\t\t\n\t\tclass0.remove(2);\n\t\tassert (class0.contains(1) == true);\n\t\tassert (class0.contains(2) == true);\n assert (class0.contains(3) == false);\n assert (class0.contains(4) == true);\n assert (class0.contains(5) == true);\n\t\tfor(int i = 0; i < class0.size(); i++) {\n\t\t\tint temp = (int)class0.get(i);\n\t\t\tSystem.out.println(temp + \" \");\n\t\t}\n\t\tret0 = class0;\n\t}", "private void cleanHeaders(Element e) {\n for (int headerIndex = 1; headerIndex < 3; headerIndex++) {\n Elements headers = e.getElementsByTag(\"h\" + headerIndex);\n for (int i = headers.size() - 1; i >= 0; i--) {\n if (getClassWeight(headers.get(i)) < 0 || getLinkDensity(headers.get(i)) > 0.33) {\n headers.get(i).remove();\n }\n }\n }\n }", "private static void task4(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\tdouble search_start = 0, search_end = 0;\n\n\t System.out.println(\"SPLAY DELETION Started...\");\n\t search_start = System.nanoTime();\n\t int count = 0;\n\t \t\n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (t.contains(checker)) {\n\t t.remove(checker);\n//\t System.out.println(\"INT Removed\");\n\t count++;\n\t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each deletion: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t \n\t System.out.println(\"TOTAL REMOVES\" + count);\n\n\t\t\n\t\t\n\t}", "public int[] filterByWidth(double lower_threshold, double upper_threshold) {\n ArrayList<Integer> newPeaks = new ArrayList<Integer>();\n for (int i=0; i<this.width.length; i++) {\n if (this.width[i] >= lower_threshold && this.width[i] <= upper_threshold) {\n newPeaks.add(this.midpoints[i]);\n }\n }\n return UtilMethods.convertToPrimitiveInt(newPeaks);\n }", "public void remove(int n) {\n\tif(!contains(n)){\n\t\treturn; //Check\n\t}\t\n\telse{\n\t\tint index = 0;\n\t\tfor(int i = 0; i < size; i++){\n \t\tif(elements[i] == n){\n \t\t\tindex = i;\n \t\t}\n \t\t}\n\t\tfor(int c = 0;c < (size - index) - 1; c++){\n\t\t\telements[index+c] = elements[index+c+1];\n\t\t}\n\t\tsize--;\n\t}\n\n System.out.println(\"Removing \" + n + \"...\");\n }", "public int[] filterBySharpness(double threshold, String mode) throws IllegalArgumentException {\n ArrayList<Integer> newPeaks = new ArrayList<Integer>();\n int[] keep = new int[this.midpoints.length];\n Arrays.fill(keep, 1);\n\n if (mode.equals(\"upper\")) {\n for (int i=0; i<this.sharpness[0].length; i++) {\n double maxVal = Math.max(this.sharpness[0][i], this.sharpness[1][i]);\n if (maxVal > threshold) {\n keep[i] = 0;\n }\n }\n }\n else if (mode.equals(\"lower\")) {\n for (int i=0; i<this.sharpness[0].length; i++) {\n double minVal = Math.min(this.sharpness[0][i], this.sharpness[1][i]);\n if (minVal < threshold) {\n keep[i] = 0;\n }\n }\n }\n else {\n throw new IllegalArgumentException(\"Mode must either be lower or upper\");\n }\n for (int i=0; i<keep.length; i++) {\n if(keep[i] == 1) {\n newPeaks.add(this.midpoints[i]);\n }\n }\n return UtilMethods.convertToPrimitiveInt(newPeaks);\n }", "void unsetMaximum();", "public void removeWritten(byte[] value) {\n\n writeSetLock.lock();\n \n Set<TimestampValuePair> temp = (HashSet<TimestampValuePair>) writeSet.clone();\n \n for (TimestampValuePair rv : temp) {\n\n if (Arrays.equals(rv.getValue(), value)) writeSet.remove(rv);\n }\n writeSetLock.unlock();\n\n }", "void removeHas_certainty(Object oldHas_certainty);", "public void remove(int num) {\n // find the index of num\n for (int i = 0; i < count; i++) {\n if (list[i] == num) {\n // shift the elements leftward and decrement count\n for (int j = 0; j < count - 1; j++) {\n list[i+j] = list[i+j+1];\n }\n count--;\n return;\n }\n }\n }", "float getThreshold();", "boolean remMinEltTester(IHeap Heap, IBinTree Tree){\n\t\t\tLinkedList<Integer> treeResult2 = Tree.getTreeList();\n\t\t\tLinkedList<Integer> newHeapList2 = Heap.getTreeList();\n\t\t\t\n\t\t\tnewHeapList2.sort(null);\n\t\t\t\n\t\t\tif (newHeapList2.size() > 0) {\n\t\t\t\tnewHeapList2.remove(0);\n\t\t\t}\n\t\t\t\n\t\t\ttreeResult2.sort(null);\n\t\t\t\n\t\t\t\n\t\t\treturn ((treeResult2.equals(newHeapList2)) && Heap.isHeap());\n\t\t}", "default boolean removeItemsAbsolute(int amount, Predicate<ItemStack> filter) {\n for (IInventoryAdapter inventoryObject : this) {\n InventoryManipulator im = InventoryManipulator.get(inventoryObject);\n if (im.canRemoveItems(filter, amount)) {\n im.removeItems(filter, amount);\n return true;\n }\n }\n return false;\n }", "public T deleteMin();", "private void sweepChunk(Chunk chunk) {\n for (Entity entity : chunk.getEntities()) {\n\n // Constrain entities to be removed to limitable mobs, excluding villagers\n if (entity.isDead() || !EntityHelper.isLimitableMob(entity) || entity instanceof Villager) continue;\n\n // Exempt special mobs\n if (EntityHelper.isSpecialMob((LivingEntity) entity)) {\n if (plugin.getConfiguration().debug()) {\n plugin.getLogger().info(\"Special mob exempted from removal: \" + EntityHelper.getMobDescription(entity));\n }\n continue;\n }\n\n // Leave two of any farm animals\n if (EntityHelper.isBreedingPair(entity)) continue;\n\n // If relative ages are on, and the mob is targeting a player, don't remove it\n if (isTargetingPlayer(entity)) continue;\n\n // Remove mobs\n ConfiguredMob limits = plugin.getConfiguration().getLimits(entity);\n if (!entity.isDead() && adjustedAge(entity) > limits.getAge() && limits.getAge() > -1) {\n ((LivingEntity) entity).damage(1000); // Kill the entity and drop its items\n removed++;\n lastTargeted.remove(entity.getUniqueId());\n plugin.getLogBlock().logEntityRemoval(entity, 347);\n if (plugin.getConfiguration().debug()) {\n plugin.getLogger().info(\"Removed mob (age limit): \" + EntityHelper.getMobDescription(entity));\n }\n }\n\n }\n }", "private void pruneIfNeeded(int neededSpace) {\n\t\tif ((mTotalSize + neededSpace) < mMaxCacheSizeInBytes) {\n\t\t\treturn;\n\t\t}\n\t\tif (VolleyLog.DEBUG) {\n\t\t\tVolleyLog.v(\"Pruning old cache entries.\");\n\t\t}\n\n\t\tlong before = mTotalSize;\n\t\tint prunedFiles = 0;\n\t\tlong startTime = SystemClock.elapsedRealtime();\n\n\t\tIterator<Map.Entry<String, CacheHeader>> iterator = mEntries.entrySet()\n\t\t\t\t.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<String, CacheHeader> entry = iterator.next();\n\t\t\tCacheHeader e = entry.getValue();\n\t\t\tboolean deleted = getFileForKey(e.key).delete();\n\t\t\tif (deleted) {\n\t\t\t\tmTotalSize -= e.size;\n\t\t\t} else {\n\t\t\t\tVolleyLog.d(\n\t\t\t\t\t\t\"Could not delete cache entry for key=%s, filename=%s\",\n\t\t\t\t\t\te.key, getFilenameForKey(e.key));\n\t\t\t}\n\t\t\titerator.remove();\n\t\t\tprunedFiles++;\n\n\t\t\tif ((mTotalSize + neededSpace) < mMaxCacheSizeInBytes\n\t\t\t\t\t* HYSTERESIS_FACTOR) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (VolleyLog.DEBUG) {\n\t\t\tVolleyLog.v(\"pruned %d files, %d bytes, %d ms\", prunedFiles,\n\t\t\t\t\t(mTotalSize - before), SystemClock.elapsedRealtime()\n\t\t\t\t\t\t\t- startTime);\n\t\t}\n\t}", "public void removeAt(int index){\n E[] array2 = (E[]) new Object[capacity*2];\n int j=0;\n for(int i=0;i<size;i++){\n if(i!=index) {\n array2[j] = array[i];\n j++;\n }\n }\n array=array2;\n size--;\n }", "@Override\n\tpublic void clear() {\n\t\t\n\t\tsuperset.removeRange(lower, upper, fromInclusive, toInclusive);\n\t\t\n\t\t//Alternative direct implementation:\n\t\t//while (pollFirst() != null) {\n\t\t//}\n\t\t\n\t}", "default boolean removeItemsAbsolute(int amount, ItemStack... filter) {\n return removeItemsAbsolute(amount, StackFilters.anyOf(filter));\n }", "public void intervalDelete(Double min, Double max) {\n\t\tcurrent = front;\n\t\tboolean DataFound = false;\n\t\tint TrueCounter = 0;\n\n\t\tif (isEmpty()) {\n\t\t\tSystem.out.println(\"The queue is empty.\");\n\t\t}\n\n\t\ttry {\n\t\t\twhile (isFull()) {\n\t\t\t\tif (current.data.getGDPperCapita() >= min && current.data.getGDPperCapita() <= max) {\n\t\t\t\t\tDataFound = true;\n\t\t\t\t\tif (DataFound == true) {\n\t\t\t\t\t\tTrueCounter++;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (current == front) {\n\t\t\t\t\t\tremoveFront();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrent.previous.next = current.next;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (current == end) {\n\t\t\t\t\t\tremoveEnd();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrent.next.previous = current.previous;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\t\t} catch (NullPointerException e) {\n\t\t\t;\n\t\t}\n\n\t\tif (TrueCounter >= 1) {\n\t\t\tSystem.out.println(\"*****Values within the interval were found and deleted.*****\");\n\t\t\tSystem.out.println(\"\");\n\t\t} else {\n\t\t\tSystem.out.println(\"*****No values within the interval were found.*****\");\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void pruneHands(List<Hand> hands, int handSize) {\n //Prune the power set to exclude all hands with size != size\n Iterator<Hand> it = hands.iterator();\n while(it.hasNext())\n if(it.next().size() != handSize)\n it.remove();\n\n }", "void unsetMultipleBetMinimum();", "public void removeElement(klasse o) {\n int i = indexOf(o);\n if (i < 0) return;\n O[i] = null;\n ON--;\n if (Gap < 0 || Gap > i) Gap = i;\n if (i == OLast - 1) OLast--;\n while (OLast > 0 && O[OLast - 1] == null) OLast--;\n if (Gap >= OLast) Gap = -1;\n }", "@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 Binarization(int threshold) {\n this.threshold = threshold;\n }", "private static void remove(int[]data,int size){\n int temp = data[0];\n data[0] = data[size-1];\n data[size-1] = temp;\n pushDown(data, size-1, 0);\n }", "void unsetWagerMinimum();", "public void remove(int data) {\n for (int i = 0; i < dataSize; i++)\n if (array[i] == data)\n removeAt(i--);\n }", "void remove (int offset, int size);", "public int remove(E toRemove) {\n\t\tint numRemoved = 0;\n\t\tfor(int x = 0; x < numElements; x++) {\n\t\t\tif(elements[x].equals(toRemove)) {\n\t\t\t\tfor(int i = 0; i < numElements; i++) {\n\t\t\t\t\telements[x] = elements[x+1];\n\t\t\t\t}\n\t\t\t\tnumRemoved++;\n\t\t\t}\n\t\t}\n\t\tnumElements -= numRemoved;\n\t\treturn numRemoved;\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 }", "public void remove(int k) {\n\t\tcontains[k] = false;\n\t}", "private static void removeOldParticles(int maxAge) {\n\t\t// Track the whole array\n\t\tfor (int i = 0; i < particles.length; i++) {\n\t\t\t// If the particle is null reference, continue to track\n\t\t\tif (particles[i] == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// If the particle's age is greater than 80\n\t\t\t// change it to a null reference\n\t\t\telse if (particles[i].getAge() > maxAge) {\n\t\t\t\tparticles[i] = null;\n\t\t\t}\n\t\t}\n\t}", "void unsetSingleBetMinimum();", "@Test\n public void testRemoveAll_Size_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 instance.removeAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "double getUpperThreshold();", "public void pruneMessages(List<Message> ml, int max) {\n\t\tint count = ml.size();\n\t\tif (count > max) {\n\t\t\tint remove = count - max;\n\t\t\tLog.d(\"MESSAGE\", \"Pruning messages: \" + remove + \" count: \" + count + \" max: \" + max);\n\t\t\tfor (int i = 0; i < remove; i++) {\n\t\t\t\tml.remove(0);\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testRemove_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 = 1;\n boolean expResult = true;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }", "public HuffmanTree removeMin();", "public void removeAll(Object element);", "private void cleanPassedWaves(\n Point2D.Double targetLocation, long time\n ) {\n for (int i=0; i < myWaves.size(); i++)\n {\n BulletWave currentWave = myWaves.get(i);\n if (currentWave.getDistanceTraveled(time)\n > currentWave.startLocation.distance(targetLocation) + 10)\n {\n trackPass(currentWave, targetLocation);\n myWaves.remove(i);\n i--;\n }\n }\n }" ]
[ "0.71341497", "0.599843", "0.59401405", "0.5817138", "0.57376975", "0.5718247", "0.57146543", "0.5693097", "0.56883836", "0.56417704", "0.5523364", "0.5520942", "0.5469651", "0.54378676", "0.54375255", "0.5431291", "0.54241705", "0.5404881", "0.53486127", "0.5323508", "0.5307824", "0.5303769", "0.5282553", "0.5279951", "0.52763665", "0.5262679", "0.52583605", "0.5249409", "0.52433896", "0.52398545", "0.5231395", "0.5213263", "0.5192082", "0.51858693", "0.51748264", "0.5163046", "0.51493627", "0.51330334", "0.51295835", "0.51291794", "0.5091795", "0.5086555", "0.50827646", "0.50823337", "0.5081953", "0.50811213", "0.50577533", "0.5054221", "0.504396", "0.50020105", "0.50006413", "0.4999685", "0.49809903", "0.49795547", "0.496234", "0.49604365", "0.49570936", "0.4947689", "0.49424532", "0.49334264", "0.4930772", "0.491173", "0.4908593", "0.48984987", "0.48929024", "0.48776805", "0.48774862", "0.48634574", "0.485134", "0.48501006", "0.484775", "0.4847219", "0.48453104", "0.4841343", "0.48383033", "0.48358694", "0.48320144", "0.48307538", "0.48287448", "0.48238155", "0.48149508", "0.48141855", "0.48137185", "0.48134023", "0.4813398", "0.48023593", "0.4795318", "0.47925928", "0.47890142", "0.47865674", "0.47829512", "0.47819918", "0.47759554", "0.4774281", "0.47700462", "0.47664633", "0.4765882", "0.47635335", "0.47552958", "0.47479206" ]
0.77027243
0
returns the label of an instance that is part of the first or second dimension
public Object getLabel(T instance) { if (labels.containsKey(instance)) { return labels.get(instance); } else { return ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DatasetLabel getLabel();", "default String getLabel() { return ((TensorImpl<?>) this).find(NDFrame.class).map(NDFrame::getLabel).orElse(\"\"); }", "Label getLabel();", "Label getLabel();", "Label getLabel();", "java.lang.String getLabel();", "String getLabel();", "String getLabel();", "public int getNodeLabel ();", "public String getLabel();", "public String getLabel();", "public String getLabel();", "public String getLabel();", "public java.lang.String getLabel();", "String getShapeLabel();", "public String getLabel() {\r\n\t\tif (label != null)\r\n\t\t\treturn label;\r\n\t\tif (classSimpleName==null)\r\n\t\t\treturn null;\r\n\t\treturn classSimpleName.replace('.', '_');\r\n\t}", "String nameLabel();", "public abstract String getLabel();", "public Object getLabel() \n {\n return label;\n }", "public L getLabel() {\n\t\tcheckRep();\n\t\treturn this.label;\n\t}", "public abstract String[] getLabels();", "public int getDimension() {\n\treturn id2label.size();\n }", "public String label() {\n\t\treturn \"LABEL_\" + (labelCount++);\n\t}", "@Override\n \tpublic String getSliceLabel(int n) {\n \t\tif (n < 1 || n > layers.size()) return null;\n \t\treturn layers.get(n-1).getTitle();\n \t}", "public static Nuc2D\ngetFromLabel(DrawObject drawObject)\n{\n\tif (drawObject == null)\n\t\treturn (null);\n\tDrawObjectCollection parent =\n\t\t(DrawObjectCollection)drawObject.getParentCollection();\n\n\tif ((parent == null) || !(parent instanceof Nuc2D))\n\t\treturn (null);\n\t\n\treturn ((Nuc2D)parent);\n}", "double getLabel();", "public String getLabel() {\n return _label == null ? name() : _label;\n }", "public String getLabel()\n { \n return label;\n }", "public String getLabel(){\n return label;\n }", "java.lang.String getViewsLabel();", "public Label\ngetStartLabel();", "public String getLabel()\n {\n return label;\n }", "public String getLabel()\r\n {\r\n return label;\r\n }", "public String getLabel()\r\n {\r\n return label;\r\n }", "public int getLabel() {\n\t\treturn label;\n\t}", "public T2 getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\n return label;\n }", "public String toString() {\n return label;\n }", "com.google.ads.googleads.v6.resources.Label getLabel();", "public String getLabel()\n {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "LabeledShape getLabeledShape();", "public String getLabel() {\r\n return lbl;\r\n }", "@DISPID(32)\r\n\t// = 0x20. The runtime will prefer the VTID if present\r\n\t@VTID(37)\r\n\tjava.lang.String label();", "public String getLabel() {\n return label == null ? StringUtils.EMPTY : label;\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String label() {\n return this.label;\n }", "private DenseMatrix extractLabels(Instances instances){\n\n int numInstances = instances.numInstances();\n int numClasses = instances.numClasses();\n\n\n Attribute classAtt = instances.classAttribute();\n labels = new String[numClasses];\n\n\n if (m_typeOfELM == 1) {\n for (int i = 0; i < numClasses; i++) {\n\n labels[i] = classAtt.value(i);\n if (m_debug == 1){\n System.out.print(labels[i]+\", \");\n }\n }\n }\n\n\n if (m_typeOfELM == 0) numClasses = 1;\n\n\n\n DenseMatrix LabelsMatrix = new DenseMatrix(numClasses, numInstances);\n\n\n for (int i = 0; i < numInstances; i++) {\n\n if (m_typeOfELM == 1){\n for (int j = 0; j < numClasses; j++) { //labels: 0, 1, 2 ......\n\n String label = instances.instance(i).stringValue(classIndex);\n\n\n LabelsMatrix.set(j, i, label.equals(labels[j]) ? 1 : -1); // fill all non-label with -1\n }\n }else if (m_typeOfELM == 0){\n LabelsMatrix.set(0,i,instances.instance(i).value(classIndex));\n }\n\n }\n\n\n\n\n\n\n return LabelsMatrix;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabelText();", "com.microsoft.schemas.xrm._2011.contracts.Label getLabel();", "public String getLabel()\n\t{\n\t\treturn label;\n\t}", "public Object getLabel() {\n if (this.label != null) {\n return this.label;\n }\n\n return this.getDefaultLabel();\n }", "public String getLabel(){\n\t\treturn label;\n\t}", "Collection<? extends Object> getLabel();", "Collection<? extends Object> getLabel();", "public double getLabel() {\n\t\treturn label;\n\t}", "public String toString()\n {\n return label;\n }", "@DISPID(74)\r\n\t// = 0x4a. The runtime will prefer the VTID if present\r\n\t@VTID(72)\r\n\tjava.lang.String label();", "public Label getLabel() {\n\t\treturn label;\n\t}", "public Label getLabel() {\n\t\treturn label;\n\t}", "private String labelFeature(int feature) {\r\n\t\treturn label[feature];\r\n\t}", "public Instance getLabeledInstance(){\n\t\tif(isLabeled()){\n\t\t\treturn this;\n\t\t}\n\t\treturn this._labeledInstance;\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public BoardCell getLabelCell() {\n\t\treturn null;\n\t}", "String getLabel() {\n return label;\n }", "public String getLabel() {\r\n return layout.label;\r\n }", "public String getLabel() {\n return name().toLowerCase().replace(\"_\", \"\");\n }", "public String getLabel()\n {\n return m_label;\n }", "public Point getLabelPosition();", "public LabelModel getLabel(String aName);", "public\t\tMiPart\t\tgetLabel()\n\t\t{\n\t\treturn(label);\n\t\t}", "public String getLabel() {\n\t\treturn label;\n\t}", "abstract String classify(Instance inst);", "public String getLabelName() {\r\n if( this.jlblHolder != null )\r\n return this.jlblHolder.getText();\r\n else\r\n return label;\r\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public abstract String getLabelText();", "public String getLabel() {\n\t\treturn myLabel;\n\t}", "public Label getLabel() {\n return this.label;\n }", "@Override\n\tpublic String toString() {\n\t\treturn label;\n\t}", "public Label getLabel() {\n\t\treturn this.label;\n\t}", "public String getLabel() {\n return this.label;\n }", "private String getLabel() {\n return this.label;\n }", "boolean hasLabel();", "boolean hasLabel();", "boolean hasLabel();", "public String getLabel() {\n return getElement().getChildren()\n .filter(child -> child.getTag().equals(\"label\")).findFirst()\n .get().getText();\n }", "@Nullable\n public final CharSequence getLabel1() {\n return mLabel1;\n }" ]
[ "0.68461597", "0.66859806", "0.6536105", "0.6536105", "0.6536105", "0.6451124", "0.6441916", "0.6441916", "0.63729197", "0.63341206", "0.63341206", "0.63341206", "0.63341206", "0.632414", "0.6294165", "0.61182815", "0.6117993", "0.61065567", "0.60962003", "0.60606086", "0.60424554", "0.6033843", "0.60286194", "0.60062194", "0.59691703", "0.595655", "0.5946264", "0.59282047", "0.59089535", "0.5901548", "0.589826", "0.58965945", "0.5896409", "0.5896409", "0.5892278", "0.5866621", "0.58563846", "0.5847227", "0.583961", "0.5834837", "0.58263105", "0.58174664", "0.5798542", "0.5795378", "0.5791934", "0.5778869", "0.57766825", "0.577483", "0.577483", "0.577483", "0.5760539", "0.5759771", "0.57474536", "0.57474536", "0.57474536", "0.5746683", "0.57466227", "0.5742781", "0.57366055", "0.572785", "0.57270145", "0.57270145", "0.5726448", "0.5718037", "0.57161963", "0.5683383", "0.5683383", "0.56696934", "0.56691885", "0.566099", "0.566099", "0.566099", "0.566099", "0.56582963", "0.5643976", "0.5643643", "0.564141", "0.5638559", "0.56378824", "0.56365114", "0.56292164", "0.56275827", "0.561913", "0.5609151", "0.5606995", "0.5606995", "0.5606995", "0.5606995", "0.56056225", "0.55969477", "0.5593053", "0.5579876", "0.5561318", "0.5547996", "0.5526739", "0.5524176", "0.5524176", "0.5524176", "0.5518814", "0.5518572" ]
0.645129
5
Because if .isPresent() returns true, .getAnnotation is obviously null. Obviously
@SuppressWarnings({"argument.type.incompatible"}) protected static <T extends Metric> AnnotatedMetric<T> metricAnnotation(Method method, Class<? extends Annotation> clazz, MetricFactory<T> factory) { if (method.isAnnotationPresent(clazz)) { final Annotation annotation = method.getAnnotation(clazz); final @Nullable T metric = factory.metric(metricAnnotationName(annotation), metricAnnotationAbsolute(annotation)); if (metric != null) { return new AnnotatedMetric.IsPresent<>(metric, annotation); } } return new AnnotatedMetric.IsNotPresent<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasAnnotationValue();", "boolean hasAnnotationMetadata();", "@Override\n\tpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass) {\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass) {\n\t\t\t\treturn null;\n\t\t\t}", "default boolean isPresent() {\n return get() != null;\n }", "default boolean isPresent() {\n return get() != null;\n }", "boolean hasExplicitAnnotation();", "boolean hasExplicitAnnotation();", "public Annotation getAnnotation() {\n return annotation;\n }", "private static FieldTypePair getAnnotatedFieldIfPresent(final Class clazz, Class<? extends Annotation> annotationClass) {\n for (final FieldTypePair fieldTypePair : getDeclaredAndInheritedFieldTypePairs(clazz, true)) {\n Field field = fieldTypePair.getField();\n if (field.isAnnotationPresent(annotationClass)) {\n return fieldTypePair;\n }\n }\n return null;\n }", "private Optional<AnnotationMirror> kotlinMetadataAnnotation(Element element) {\n return element.getAnnotationMirrors().stream()\n .filter(\n a ->\n asTypeElement(a.getAnnotationType())\n .getQualifiedName()\n .contentEquals(KOTLIN_METADATA_NAME))\n .<AnnotationMirror>map(a -> a) // get rid of that stupid wildcard\n .findFirst();\n }", "@Override\r\n\tpublic Annotation annotate() {\n\t\treturn null;\r\n\t}", "Annotation getAnnotation();", "public String annotation() {\n return this.innerProperties() == null ? null : this.innerProperties().annotation();\n }", "@Override\n public String getAnnotation() {\n return annotation;\n }", "public boolean isAnnotation() {\n return cut.isAnnotation();\n }", "public AnnotationMirror getAnnotation(Class<? extends Annotation> annotation) {\n\t\tString jvmName = ClassUtils.getJVMName(annotation);\n\t\tfor(AnnotationMirror a : getAnnotations()) {\n\t\t\tif(a.getType().getJVMName().equals(jvmName)) {\n\t\t\t\treturn a;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private boolean isAnnotationPresent(Annotation[] annotations,\n Class<? extends Annotation> cls) {\n for (Annotation annotation : annotations) {\n if (cls.isInstance(annotation)) {\n return true;\n }\n }\n return false;\n }", "protected void applyOptionalAnnotation(Logger logger, GetterSpec result, AnnotationMirror mirror) {\n\t\tresult.optional = true;\n\t}", "@java.lang.Override\n public boolean hasMetadata() {\n return instance.hasMetadata();\n }", "public Annotation getAnnotation(Class<?> annotationClass){\n\t\tAnnotation annotation = null;\n\t\tif (annotations.containsKey(annotationClass)){\n\t\t\tannotation = annotations.get(annotationClass);\n\t\t}\n\t\treturn annotation;\n\t}", "private static boolean hasAnnotatedValue(Graph g){\n Iterator<String> nodeIterator = g.getNodes().keySet().iterator();\n while(nodeIterator.hasNext()){\n GraphNode currentNode = g.getNodes().get(nodeIterator.next());\n if(!currentNode.getType().equals(OPMWTemplate.WORFKLOW_TEMPLATE_PROCESS)&&\n !currentNode.getType().equals(OPMWTemplate.WORFKLOW_TEMPLATE_ARTIFACT)){\n return true;\n }\n }\n return false;\n }", "public boolean hasAnnotation(Class<? extends Annotation> annotation) {\n\t\treturn getAnnotation(annotation) != null;\n\t}", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "boolean hasMetadata();", "public Framework_annotation<T> build_annotation();", "private <T extends Annotation> T getMetaAnnotation(Class<T> metaAnnotation, Field field)\r\n {\r\n Annotation[] allAnnotations = field.getAnnotations();\r\n for (Annotation annotation : allAnnotations) {\r\n if (annotation.annotationType().isAnnotationPresent(metaAnnotation)) {\r\n return annotation.annotationType().getAnnotation(metaAnnotation);\r\n }\r\n }\r\n return null;\r\n }", "@Override\n\tpublic boolean isPresent()\n\t{\n\t\treturn present;\n\t}", "public String getAnnotation() {\n return annotation;\n }", "public String getAnnotation();", "@Override\n\tpublic boolean isPresent() {\n\t\treturn false;\n\t}", "public interface AnnotationValue {\n}", "public boolean hasAnnotation(Class<?> aTargetClass, Class<?> aAnnotation) {\n\t\treturn AnnotationsHelper.getAnnotation(aTargetClass, aAnnotation) != null;\n\t}", "public Class<? extends Annotation> annotationType() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Annotation[] getAnnotations() {\n\t\treturn null;\n\t}", "public A annotation() {\n\t\treturn proxy(annotation, loader, className, map);\n\t}", "private Element get(final Class<? extends Annotation> annotation) {\n return new MockElement(annotation);\n }", "public boolean hasAnnotatedQuery() {\n return getAnnotatedQuery() != null;\n }", "com.google.cloud.datalabeling.v1beta1.AnnotationMetadata getAnnotationMetadata();", "private static boolean isAnnotationPresent(Class<? extends Annotation> annotationClass, Set<Class<? extends Annotation>> processedTypes, Annotation... annotations)\n {\n for (Annotation annotation : annotations) {\n if (annotationClass.isInstance(annotation)) {\n return true;\n }\n }\n\n // are any of the annotations annotated with the specified annotation\n for (Annotation annotation : annotations) {\n if (processedTypes.add(annotation.annotationType()) && isAnnotationPresent(annotationClass, processedTypes, annotation.annotationType().getAnnotations())) {\n return true;\n }\n }\n\n return false;\n }", "private static void optionalIfPresent() {\n Optional<String> optionalOb = Optional.of(\"Yassir\");\n optionalOb.ifPresent(name -> {System.out.println(\"Name = \"+name);});\n }", "boolean hasMessageAnnotation();", "@java.lang.Override\n public boolean hasMetadata() {\n return metadata_ != null;\n }", "@java.lang.Override\n public boolean hasMetadata() {\n return metadata_ != null;\n }", "@java.lang.Override\n public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean isPresent() {\r\n\t\treturn value != null;\r\n\t}", "public String getAnnotation () {\n return annotation;\n }", "public boolean isAnnotated() {\n\t\treturn !this.categoriesTrained.isEmpty();\n\t}", "com.google.cloud.datalabeling.v1beta1.AnnotationValueOrBuilder getAnnotationValueOrBuilder();", "Optional<AnnotationMirror> scope() {\n return unwrapOptionalEquivalence(wrappedScope());\n }", "public static <A extends Annotation> boolean isPresent(\n AnnotatedElement annotatedElement, \n Class<A> annotationType) {\n\n return collect(annotatedElement).isPresent(annotationType);\n }", "public abstract boolean mo30680a(Annotation annotation);", "public static <A extends Annotation> boolean hasAnnotation(Class<?> theClass, Class<A> annotationClass) {\n // TODO: Align the implementation with CDI bean lookup algorithm (or check whether it is...)\n if (theClass.getAnnotationsByType(annotationClass).length != 0) {\n return true;\n }\n\n Set<Class<?>> interfaces = getInterfaceClosure(theClass);\n for (Class<?> intf : interfaces) {\n if (intf.getDeclaredAnnotationsByType(annotationClass).length != 0) {\n return true;\n }\n }\n\n return false;\n }", "private void getAnnotatedClass(Class<? extends Annotation> annotation, final Element element) {\n TypeElement typeElement = (TypeElement) element.getEnclosingElement();\n// String fullName = typeElement.getQualifiedName().toString();\n Map<Class<? extends Annotation>, List<Element>> classListMap = mAnnotation.get(typeElement);\n if (classListMap == null) {\n classListMap = new HashMap<>();\n ArrayList<Element> elements=new ArrayList<>();\n elements.add(element);\n classListMap.put(annotation,elements);\n mAnnotation.put(typeElement, classListMap);\n } else {\n List<Element> elements = classListMap.get(annotation);\n if (elements == null) {\n elements = new ArrayList<>();\n elements.add(element);\n classListMap.put(annotation,elements);\n mAnnotation.put(typeElement, classListMap);\n } else\n mAnnotation.get(typeElement).get(annotation).add(element);\n }\n\n// log(annotationList.size() + \"fdas\");\n }", "@Test\n public void canDetect_ParameterAnnotation_OneRuntimeRetention_OneClassRetention_ChangedAnnotationOrder() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"oneRuntimeRetention_OneClassRetention_ChangedAnnotationOrder\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n }", "private <T extends Annotation> T findAnnotation(Annotation[] annotations, Class<T> cls) {\n for (Annotation annotation : annotations) {\n if (cls.isInstance(annotation)) {\n //noinspection unchecked\n return (T) annotation;\n }\n }\n return null;\n }", "com.google.cloud.dialogflow.v2beta1.MessageAnnotationOrBuilder getMessageAnnotationOrBuilder();", "private String getMetaAnnotationType(Class<?> clazz, Collection<Class<? extends Annotation>> annotationSet) {\n for (Class<? extends Annotation> annotType : annotationSet) {\n Annotation annotInstance = clazz.getAnnotation(annotType);\n if (annotInstance != null) {\n return (String) invoke(annotInstance, \"value\", null, null);\n }\n }\n return null;\n }", "private static <T extends Annotation> T onElement(Class<T> clazz, T defaultValue, AnnotatedElement... elements) {\n for (AnnotatedElement element : elements) {\n T ann = element.getAnnotation(clazz);\n if (ann != null) return ann;\n }\n return defaultValue;\n }", "public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }", "@Test\n public void test0() throws Throwable {\n PermissionAnnotationHandler permissionAnnotationHandler0 = new PermissionAnnotationHandler();\n // Undeclared exception!\n try {\n permissionAnnotationHandler0.getAnnotationValue((Annotation) null);\n fail(\"Expecting exception: NullPointerException\");\n } catch(NullPointerException e) {\n }\n }", "private void defaultAnnotationShouldBeFound(String filter) throws Exception {\n restAnnotationMockMvc.perform(get(\"/api/annotations?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(annotation.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].start\").value(hasItem(DEFAULT_START.toString())))\n .andExpect(jsonPath(\"$.[*].end\").value(hasItem(DEFAULT_END.toString())))\n .andExpect(jsonPath(\"$.[*].annotationText\").value(hasItem(DEFAULT_ANNOTATION_TEXT)));\n\n // Check, that the count call also returns 1\n restAnnotationMockMvc.perform(get(\"/api/annotations/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadata_ != null;\n }", "public boolean present() {\n return isPresent;\n }", "@Override\n public Void visitPackage(PackageElement e, Void p) {\n validateAnnotations(e.getAnnotationMirrors());\n return null;\n }", "public static boolean Annotation(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Annotation\")) return false;\n if (!nextTokenIs(b, PERCENT)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, PERCENT);\n r = r && AnnotationName(b, l + 1);\n r = r && Annotation_2(b, l + 1);\n exit_section_(b, m, ANNOTATION, r);\n return r;\n }", "@Test\n public void canDetect_ParameterAnnotation_OneRuntimeRetention_OneClassRetention() {\n final MethodInfo methodInfo = classInfo.getMethodInfo()\n .getSingleMethod(\"oneRuntimeRetention_OneClassRetention\");\n\n assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class)).isTrue();\n }", "public static boolean hasAnnotation(HasMetadata resource, String annotation) {\n ObjectMeta metadata = resource.getMetadata();\n String str = annotation(annotation, null, metadata, null);\n return str != null;\n }", "public interface AnnotationReader\r\n{\r\n /**\r\n * Accessor for the annotations packages supported by this reader.\r\n * @return The annotations packages that will be processed.\r\n */\r\n String[] getSupportedAnnotationPackages();\r\n\r\n /**\r\n * Method to get the MetaData for a class from its annotations.\r\n * @param cls The class\r\n * @param pmd MetaData for the owning package (that this will be a child of)\r\n * @param clr ClassLoader resolver\r\n * @return The ClassMetaData (unpopulated and uninitialised)\r\n */\r\n AbstractClassMetaData getMetaDataForClass(Class cls, PackageMetaData pmd, ClassLoaderResolver clr);\r\n\r\n /**\r\n * Method to return whether this is reading in a persistence context.\r\n * @return Whether this is a persistence context\r\n */\r\n boolean isPersistenceContext();\r\n}", "@Override\n\tpublic Annotation[] getDeclaredAnnotations() {\n\t\treturn null;\n\t}", "public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }", "public boolean hasMetadata() {\n return metadataBuilder_ != null || metadata_ != null;\n }" ]
[ "0.6605087", "0.6515778", "0.62334013", "0.6211136", "0.61837924", "0.61837924", "0.60888684", "0.60888684", "0.59202456", "0.5905341", "0.5845325", "0.58420736", "0.57712996", "0.56814176", "0.56585515", "0.56328297", "0.5616458", "0.5598392", "0.5533657", "0.5517323", "0.5514232", "0.5484929", "0.54824704", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.5439182", "0.54388964", "0.5415242", "0.5408321", "0.54056275", "0.53919613", "0.5378783", "0.5345168", "0.5342608", "0.53422093", "0.5335025", "0.53241", "0.53076065", "0.5307309", "0.53052074", "0.53018373", "0.52986974", "0.5280094", "0.52760166", "0.52760166", "0.52760166", "0.5251036", "0.5248086", "0.52467924", "0.52259296", "0.5202928", "0.5199812", "0.51969314", "0.5167682", "0.5153793", "0.5147682", "0.51408464", "0.5134843", "0.5134024", "0.5111904", "0.5106724", "0.5098646", "0.50967354", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.50948334", "0.5092889", "0.508474", "0.50833505", "0.50804216", "0.5068216", "0.50562626", "0.5048823", "0.50374466", "0.50374466" ]
0.0
-1
if (Config.switch_log.equals(Config.OFF) || TextUtils.isEmpty(msg)) return;
private static void invokeLogMethod(String table, Level level, String msg) { MDC.put(MDC_TABLE, table); try { s_innerMethod.invoke(sLog, FQCN, null, level, msg, null, null); } catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { sLog.error("execute s_innerMethod failed, Exception:" + e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void fixLoggingControls(){\n if((hardware==null || (hardware!=null && !hardware.isOpen())) && playMode!=playMode.PLAYBACK ){ // we can log from live input or from playing file (e.g. after refiltering it)\n loggingButton.setEnabled(false);\n loggingMenuItem.setEnabled(false);\n return;\n }else{\n loggingButton.setEnabled(true);\n loggingMenuItem.setEnabled(true);\n }\n if(!loggingEnabled && playMode==PlayMode.PLAYBACK){\n loggingButton.setText(\"Start Re-logging\");\n loggingMenuItem.setText(\"Start Re-logging\");\n }else if(loggingEnabled){\n loggingButton.setText(\"Stop logging\");\n loggingButton.setSelected(true);\n loggingMenuItem.setText(\"Stop logging data\");\n }else{\n loggingButton.setText(\"Start logging\");\n loggingButton.setSelected(false);\n loggingMenuItem.setText(\"Start logging data\");\n }\n }", "private boolean noMessage() {\n\t\treturn nbmsg==0;\n\t}", "@FXML\n\tpublic void logRemoteWakeup() {\n\t\tcheckFieldEditOrNot = true;\n\t\tif (enableRemoteWakeup.isSelected()) {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Enable.<br>\");\n\t\t} else {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Disable.<br>\");\n\t\t}\n\t}", "String getLogHandled();", "private static void initLog() {\n LogManager.mCallback = null;\n if (SettingsManager.getDefaultState().debugToasts) {\n Toast.makeText(mContext, mContext.getClass().getCanonicalName(), Toast.LENGTH_SHORT).show();\n }\n if (SettingsManager.getDefaultState().debugLevel >= LogManager.LEVEL_ERRORS) {\n new TopExceptionHandler(SettingsManager.getDefaultState().debugMail);\n }\n //Si hubo un crash grave se guardo el reporte en el sharedpreferences, por lo que al inicio\n //levanto los posibles crashes y, si el envio por mail está activado , lo envio\n String possibleCrash = StoreManager.pullString(\"crash\");\n if (!possibleCrash.equals(\"\")) {\n OtherAppsConnectionManager.sendMail(\"Stack\", possibleCrash, SettingsManager.getDefaultState().debugMailAddress);\n StoreManager.removeObject(\"crash\");\n }\n }", "public static boolean log() {\n\t\tif ((xml == null) || (log == null)) return false;\n\t\treturn log.equals(\"yes\");\n\t}", "@Override\n public void printMessage(String msg) {\n if (msg.contains(\"Turno di :\")) {\n inTurno = false;\n for (boolean b : pawnEnabled) {\n b = true;\n }\n }\n final String msgapp = editString(msg);\n Platform.runLater(() -> {\n if (textArea != null) {\n textArea.appendText(msgapp + \"\\n\");\n }\n });\n\n }", "@Override\n public void onOkButtonClicked() {\n\n\n String reasonMsg1 = backToOrderView.editText.getText().toString();\n reasonMsg = reasonMsg1.trim();\n\n if (reasonMsg.length() == 0) {\n Toast.makeText(getApplicationContext(), \"Please give reason...\", Toast.LENGTH_LONG).show();\n\n } else {\n\n\n // sendNotificationToUser(\"driver_cancel\");\n updateTripStatusApi(\"driver_cancel_at_pickup\", controller.pref.getTRIP_ID(), reasonMsg);\n\n\n }\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tif(new String(buffer).equals(\"WRONG\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"wrong password\", Toast.LENGTH_LONG).show();\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if(new String(buffer).equals(\"ACCEPT\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"ACCEPTED\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\r\n\tpublic boolean handleMessage(Message msg) {\n\t\treturn false;\r\n\t}", "public static String getLog() {\n\t\tif ((xml == null) || (log == null) || !log.equals(\"yes\")) return \"no\";\n\t\treturn \"yes\";\n\t}", "private boolean checkBatteryLevelOK() {\n return true;\n }", "@Test\n public void testEmptyString() {\n assertEquals(\"Should return false\", false, val.validateTransportationModes(\"\"));\n }", "protected boolean statusIs(String state)\n { return call_state.equals(state); \n }", "protected boolean shouldStopCheck(String retMessage) {\n if (!returnImmediate) {\n return false;\n }\n \n if (retMessage != null && !retMessage.isEmpty()) {\n return true;\n }\n return false;\n }", "private void logAndToast(String msg) {\n Log.d(TAG, msg);\n if (logToast != null) {\n logToast.cancel();\n }\n logToast = Toast.makeText(this, msg, Toast.LENGTH_LONG);\n logToast.show();\n }", "final void out (String msg) { if (m_debugMode) { Logger.println (msg); } }", "protected void checkLog() {\n String keyword = \"Connected controllable Agent to the Introscope Enterprise Manager\";\n LogUtils util = utilities.createLogUtils(umAgentConfig.getLogPath(), keyword);\n assertTrue(util.isKeywordInLog());\n\t}", "@Override\n public void onClick(View v) {\n if (!messagetxt.getText().toString().isEmpty()) {\n socket.emit(\"messagedetection\", Nickname, messagetxt.getText().toString());\n\n messagetxt.setText(\" \");\n }\n\n\n }", "public boolean handleHwPrivateMsgInDefaultState(Message message) {\n int i = message.what;\n if (i == 131672) {\n return true;\n }\n if (i != 131899) {\n switch (i) {\n case 131874:\n this.mHwWifiStateMachineInner.setWifiBackgroundStatus(false);\n return true;\n case 131875:\n return true;\n default:\n switch (i) {\n case 131888:\n case 131889:\n case 131890:\n case 131891:\n break;\n case 131892:\n this.mHwWifiStateMachineInner.stopSelfCureWifi(message.arg1);\n if (message.arg1 < 0) {\n if (this.mHwWifiStateMachineInner.getCurrentState() != this.mHwWifiStateMachineInner.getDisconnectedState()) {\n this.mHwWifiStateMachineInner.getHandler().removeMessages(147459);\n this.mHwWifiStateMachineInner.sendMessage(131145);\n this.mHwWifiStateMachineInner.hwHandleNetworkDisconnect();\n } else {\n this.mHwWifiStateMachineInner.hwSetNetworkDetailedState(NetworkInfo.DetailedState.DISCONNECTED);\n this.mHwWifiStateMachineInner.hwSendNetworkStateChangeBroadcast((String) null);\n }\n }\n return true;\n case 131893:\n if (this.mHwWifiStateMachineInner.getNetworkAgent() != null) {\n this.mHwWifiStateMachineInner.getNetworkAgent().sendNetworkInfo(this.mHwWifiStateMachineInner.getNetworkInfo());\n } else {\n this.mHwWifiStateMachineInner.hwSetNetworkDetailedState(NetworkInfo.DetailedState.DISCONNECTED);\n this.mHwWifiStateMachineInner.getNewWifiNetworkAgent().sendNetworkInfo(this.mHwWifiStateMachineInner.getNetworkInfo());\n }\n return true;\n default:\n switch (i) {\n }\n }\n this.mHwWifiStateMachineInner.notifySelfCureComplete(false, message.arg1);\n return true;\n }\n } else {\n HwHiLog.d(TAG, false, \"reset wifi mode because of CMD_ASSOCIATE_ASSISTANTE_TIMEOUT\", new Object[0]);\n ClientModeImpl clientModeImpl = this.mHwWifiStateMachineInner;\n if (clientModeImpl instanceof ClientModeImpl) {\n clientModeImpl.setWifiMode(\"android\", 0);\n }\n }\n return false;\n }", "@Override\r\n public void handleMessage(Message msg) {\n Log.d(\"Guardado en el servidor\",\"\"+msg.obj.toString());\r\n if(msg.obj.toString().length() > 1){\r\n\r\n Log.d(\"VALOR DEL SERVER\",\"\"+(String)msg.obj);\r\n\r\n }else{\r\n\r\n }\r\n\r\n }", "private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}", "public boolean is_set_msg() {\n return this.msg != null;\n }", "@Override\r\n public void handleMessage(Message msg) {\n if (msg.what == Configuration.MSG_DISCONNECT_REMOTE_SERVER) {\r\n serviceStatus = false;\r\n }\r\n if (msg.what == Configuration.MSG_CONNECT_REMOTE_SERVER) {\r\n serviceStatus = true;\r\n }\r\n if (adbMainHandler != null) {\r\n // adbMainHandler.obtainMessage(msg.what,\r\n // msg.obj).sendToTarget();\r\n adbMainHandler.sendMessage(Message.obtain(msg));\r\n }\r\n }", "private boolean messageFilter(NettyMessage message)\n {\n try\n {\n\n String[] splits = message.getFormatStrings();;\n if ((message.getHeader().equals(\"FA\")||message.getHeader().equals(\"GB\"))&&splits.length==4)\n {\n isReconnect = false;\n close(false);\n currentMsg = message;\n Log.e(\"\",\n \"切换服务器\" + splits[splits.length - 2] + \"\" + Integer\n .valueOf(splits[splits.length - 1]));\n Thread.sleep(500);\n connect(splits[splits.length - 2],\n Integer.valueOf(splits[splits.length - 1]));\n return false;\n }\n else if (AppServerType.EX.toString()\n .equals(message.getHeader()) && \"100\".equals(splits[0]))\n {\n user = null;\n setCallingUser(null);\n isConnected = false;\n isReconnect = false;\n close(false);\n }\n else if (AppServerType.EX.toString()\n .equals(message.getHeader()) && \"0\".equals(splits[0]))\n {\n sleepTime = 10 * 1000;\n isLooping = false;\n reconnect();\n }\n else if (AppServerType.AB.toString()\n .equals(message.getHeader()))\n {\n NettyServer server = getServer(message.getCtxUTF8String());\n Log.e(\"Dudu_SDK\", \" NS:\" + (server == null));\n if (server != null)\n {\n connect(server.getIp(), server.getPort());\n }\n return false;\n }\n else if (AppServerType.RS.toString()\n .equals(message.getHeader()))\n {\n Responbean bean = (Responbean) parser.parseObject(splits[0],\n Responbean.class);\n if (\"FS\".equals(bean.getHeader()))\n {\n if (!splits[1].equals(callingUser.getUserid()))\n {\n return false;\n }\n }\n }\n commadFilter(message);\n // 处理特殊消息\n ServerFacoty.getInstance()\n .getUserserver()\n .CommadFilter(mChannel, message, parser);\n }\n catch (Exception e)\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return true;\n }", "@Override\n public void OnMosSdkStop(boolean flag) {\n MyLog.log(\"stop??????\" + flag);\n\n }", "@Override\n public void onClick(View view) {\n if (socket != null && Bluetooth.isStillConnected()) {\n try {\n arduino_logging = !arduino_logging;\n OutputStream outStream = socket.getOutputStream();\n Commands.sendCommand(outStream, \"logfile\", \"\");\n\n if(arduino_logging)\n Snackbar.make(view, \"Logging sensor data, press again to stop logging\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n else Snackbar.make(view, \"Stopped logging sensor data, press again to start logging\" +\n \" to a new file\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n } catch (IOException e) {\n Log.d(\"IOException\", \"Exception sending logfile\");\n }\n }\n else{\n Snackbar.make(view, \"Not connected\",\n Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }\n }", "@Override\n\tpublic void msgTurnOff() {\n\t\t\n\t}", "boolean isDefaultMessage();", "private void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "private void catcher() {\n String text;\n\n if (getTextFromEditText(R.id.distanceEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_distance);\n } else if (getTextFromEditText(R.id.fuelEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_fuel);\n } else {\n text = getResourceString(R.string.err_wrong_vals);\n }\n\n makeToast(text);\n }", "public void onReceive(android.content.Context r9, android.content.Intent r10) {\n /*\n r8 = this;\n java.lang.String r0 = r10.getAction()\n int r1 = r0.hashCode()\n r2 = 4\n r3 = 3\n r4 = 2\n r5 = 1\n r6 = 0\n switch(r1) {\n case -1897205914: goto L_0x0039;\n case -1727841388: goto L_0x002f;\n case -837322541: goto L_0x0025;\n case -615389090: goto L_0x001b;\n case 798292259: goto L_0x0011;\n default: goto L_0x0010;\n }\n L_0x0010:\n goto L_0x0043\n L_0x0011:\n java.lang.String r1 = \"android.intent.action.BOOT_COMPLETED\"\n boolean r1 = r0.equals(r1)\n if (r1 == 0) goto L_0x0010\n r1 = r2\n goto L_0x0044\n L_0x001b:\n java.lang.String r1 = \"com.samsung.android.SwitchBoard.STOP\"\n boolean r1 = r0.equals(r1)\n if (r1 == 0) goto L_0x0010\n r1 = r5\n goto L_0x0044\n L_0x0025:\n java.lang.String r1 = \"com.samsung.android.SwitchBoard.ENABLE_DEBUG\"\n boolean r1 = r0.equals(r1)\n if (r1 == 0) goto L_0x0010\n r1 = r4\n goto L_0x0044\n L_0x002f:\n java.lang.String r1 = \"com.samsung.android.SwitchBoard.SWITCH_INTERVAL\"\n boolean r1 = r0.equals(r1)\n if (r1 == 0) goto L_0x0010\n r1 = r3\n goto L_0x0044\n L_0x0039:\n java.lang.String r1 = \"com.samsung.android.SwitchBoard.START\"\n boolean r1 = r0.equals(r1)\n if (r1 == 0) goto L_0x0010\n r1 = r6\n goto L_0x0044\n L_0x0043:\n r1 = -1\n L_0x0044:\n java.lang.String r7 = \"SwitchBoardReceiver.onReceive: action=\"\n if (r1 == 0) goto L_0x011d\n if (r1 == r5) goto L_0x00f3\n if (r1 == r4) goto L_0x00d5\n if (r1 == r3) goto L_0x008d\n if (r1 == r2) goto L_0x0066\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"SwitchBoardReceiver.onReceive: undefined case: action=\"\n r1.append(r2)\n r1.append(r0)\n java.lang.String r1 = r1.toString()\n com.samsung.android.server.wifi.SwitchBoardService.logd(r1)\n goto L_0x015c\n L_0x0066:\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n r1.append(r7)\n r1.append(r0)\n java.lang.String r1 = r1.toString()\n com.samsung.android.server.wifi.SwitchBoardService.logv(r1)\n com.samsung.android.server.wifi.SwitchBoardService r1 = com.samsung.android.server.wifi.SwitchBoardService.this\n com.samsung.android.server.wifi.SwitchBoardService$SwitchBoardHandler r1 = r1.mHandler\n com.samsung.android.server.wifi.SwitchBoardService r2 = com.samsung.android.server.wifi.SwitchBoardService.this\n com.samsung.android.server.wifi.SwitchBoardService$SwitchBoardHandler r2 = r2.mHandler\n android.os.Message r2 = r2.obtainMessage(r3)\n r1.sendMessage(r2)\n goto L_0x015c\n L_0x008d:\n com.samsung.android.server.wifi.SwitchBoardService r1 = com.samsung.android.server.wifi.SwitchBoardService.this\n java.lang.String r2 = \"WifiToLteDelayMs\"\n int r2 = r10.getIntExtra(r2, r6)\n int unused = r1.mWifiToLteDelayMs = r2\n com.samsung.android.server.wifi.SwitchBoardService r1 = com.samsung.android.server.wifi.SwitchBoardService.this\n r2 = 5000(0x1388, float:7.006E-42)\n java.lang.String r3 = \"LteToWifiDelayMs\"\n int r2 = r10.getIntExtra(r3, r2)\n int unused = r1.mLteToWifiDelayMs = r2\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n r1.append(r7)\n r1.append(r0)\n java.lang.String r2 = \", mWifiToLteDelayMs: \"\n r1.append(r2)\n com.samsung.android.server.wifi.SwitchBoardService r2 = com.samsung.android.server.wifi.SwitchBoardService.this\n int r2 = r2.mWifiToLteDelayMs\n r1.append(r2)\n java.lang.String r2 = \", mLteToWifiDelayMs: \"\n r1.append(r2)\n com.samsung.android.server.wifi.SwitchBoardService r2 = com.samsung.android.server.wifi.SwitchBoardService.this\n int r2 = r2.mLteToWifiDelayMs\n r1.append(r2)\n java.lang.String r1 = r1.toString()\n com.samsung.android.server.wifi.SwitchBoardService.logd(r1)\n goto L_0x015c\n L_0x00d5:\n com.samsung.android.server.wifi.SwitchBoardService r1 = com.samsung.android.server.wifi.SwitchBoardService.this\n com.samsung.android.server.wifi.SwitchBoardService$SwitchBoardHandler r1 = r1.mHandler\n com.samsung.android.server.wifi.SwitchBoardService r2 = com.samsung.android.server.wifi.SwitchBoardService.this\n com.samsung.android.server.wifi.SwitchBoardService$SwitchBoardHandler r2 = r2.mHandler\n java.lang.String r3 = \"DEBUG\"\n boolean r3 = r10.getBooleanExtra(r3, r6)\n java.lang.Boolean r3 = java.lang.Boolean.valueOf(r3)\n android.os.Message r2 = r2.obtainMessage(r4, r3)\n r1.sendMessage(r2)\n goto L_0x015c\n L_0x00f3:\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n r1.append(r7)\n r1.append(r0)\n java.lang.String r1 = r1.toString()\n com.samsung.android.server.wifi.SwitchBoardService.logd(r1)\n com.samsung.android.server.wifi.SwitchBoardService r1 = com.samsung.android.server.wifi.SwitchBoardService.this\n com.samsung.android.server.wifi.SwitchBoardService$SwitchBoardHandler r1 = r1.mHandler\n com.samsung.android.server.wifi.SwitchBoardService r2 = com.samsung.android.server.wifi.SwitchBoardService.this\n com.samsung.android.server.wifi.SwitchBoardService$SwitchBoardHandler r2 = r2.mHandler\n java.lang.Boolean r3 = java.lang.Boolean.valueOf(r6)\n android.os.Message r2 = r2.obtainMessage(r5, r3)\n r1.sendMessage(r2)\n goto L_0x015c\n L_0x011d:\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n r1.append(r7)\n r1.append(r0)\n java.lang.String r2 = \"AlwaysPolling\"\n r1.append(r2)\n boolean r3 = r10.getBooleanExtra(r2, r6)\n r1.append(r3)\n java.lang.String r1 = r1.toString()\n com.samsung.android.server.wifi.SwitchBoardService.logd(r1)\n com.samsung.android.server.wifi.SwitchBoardService r1 = com.samsung.android.server.wifi.SwitchBoardService.this\n boolean r2 = r10.getBooleanExtra(r2, r6)\n boolean unused = r1.mWifiInfoPollingEnabledAlways = r2\n com.samsung.android.server.wifi.SwitchBoardService r1 = com.samsung.android.server.wifi.SwitchBoardService.this\n com.samsung.android.server.wifi.SwitchBoardService$SwitchBoardHandler r1 = r1.mHandler\n com.samsung.android.server.wifi.SwitchBoardService r2 = com.samsung.android.server.wifi.SwitchBoardService.this\n com.samsung.android.server.wifi.SwitchBoardService$SwitchBoardHandler r2 = r2.mHandler\n java.lang.Boolean r3 = java.lang.Boolean.valueOf(r5)\n android.os.Message r2 = r2.obtainMessage(r5, r3)\n r1.sendMessage(r2)\n L_0x015c:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.samsung.android.server.wifi.SwitchBoardService.SwitchBoardReceiver.onReceive(android.content.Context, android.content.Intent):void\");\n }", "public void logCommunalDeck()\n\t{\n\t\t\tlog += String.format(\"%nCOMMUNAL DECK UPDATED%nCOMMUNAL DECK NOW EMPTY\");\n\t\t\tlineBreak();\n\t}", "boolean hasMsg();", "private boolean isDistributedLogReplay(Configuration conf) {\n return false;\n }", "public synchronized void m29984l() {\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeatSlave \");\n }\n f23274i++;\n mo33398h();\n if (C6973b.m29763a().mo33291f(C6973b.m29776f())) {\n if (!C7048a.m30142d(C6973b.m29776f())) {\n C6864a.m29308i(Constants.ServiceLogTag, \"network is unreachable ,give up and go on slave service\");\n } else if (C6973b.m29776f() != null) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n boolean isForeiginPush = XGPushConfig.isForeiginPush(C6973b.m29776f());\n String str = Constants.ACTION_SLVAE_2_MAIN;\n String str2 = Constants.ServiceLogTag;\n if (isForeiginPush) {\n C6864a.m29308i(str2, \"isForeiginPush network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else if (C6979b.m29795a(C6973b.m29776f()).mo33300b()) {\n C6864a.m29308i(str2, \"network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else {\n C6864a.m29308i(str2, \"network is error , go on slave service\");\n }\n }\n });\n } else {\n C6864a.m29308i(Constants.ServiceLogTag, \"PushServiceManager.getInstance().getContext() is null\");\n }\n }\n }", "private static void doTest(boolean b, String msg) {\n if (b) {\n System.out.println(\"Good.\");\n } else {\n System.err.println(msg);\n }\n }", "public boolean handleMessage(Message msg) \r\n\t{\t\r\n\t\tswitch (msg.what)\r\n\t\t{\r\n\t\tcase TCPClient.MSG_COMSTATUSCHANGE:\r\n\t\tcase MSG_UIREFRESHCOM:\r\n\t\t\t{\r\n\t\t\t\tif (msg.arg2==uitoken)\r\n\t\t\t\t\tUI_RefreshConnStatus ();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\tcase TCPClient.MSG_NEWSTATUSMESSAGE:\r\n\t\tcase MSG_NEWSTATUSMESSAGE:\t\r\n\t\t\t{\r\n\t\t\t\tif (msg.arg2==uitoken)\r\n\t\t\t\t{\r\n\t\t\t\t\tLog.e(TAG,\"Status Message ACCE : \" + (String)msg.obj);\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\tcase TCPClient.MSG_CONNECTIONSTART:\r\n\t\t\t{\r\n\t\t\t\tif (msg.arg2==uitoken)\r\n\t\t\t\t{\r\n\t\t\t\t\tonRobotConnect (true);\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\tcase TCPClient.MSG_CONNECTIONSTOP:\r\n\t\t\t{\r\n\t\t\t\tif (msg.arg2==uitoken)\r\n\t\t\t\t{\r\n\t\t\t\t\tboolean bbNotify;\r\n\t\t\t\t\tsynchronized (this)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbbNotify=_bbCanSend;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tonRobotDisconnect (bbNotify);\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\tcase TCPClient.MSG_SENT:\r\n\t\t\t{\r\n\t\t\t\tif (msg.arg2==uitoken)\r\n\t\t\t\t\tlast_sent_msg = (String)msg.obj;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\tcase MSG_CENTER:\r\n\t\t\t{\r\n\t\t\t\tif (isConnecting())\r\n\t\t\t\t{\r\n\t\t\t\t\tstopConnection(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tstartConnection();\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean logAndReturnFalse(String errorMessage) {\n if (log.isDebugEnabled()) {\n log.debug(errorMessage);\n }\n return false;\n }", "final void out (String msg1, String msg2) { if (m_debugMode) { Logger.print (msg1); Logger.println (msg2); } }", "void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tebar.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\t\t\t\t\tesend.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Connection Error... Could not Send Doubt..\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}", "private void processMessage(String msg) {\n\t\t\tif (msg.equals(Message.TEST_SERVER)) {\n\t\t\t\tSystem.out.println(\"Server test passed. Testing client...\");\n\t\t\t\tpw.println(Message.TEST_CLIENT);\n\t\t\t}\n\t\t}", "@Override\n public void disabledInit() {\n //Diagnostics.writeString(\"State\", \"DISABLED\");\n }", "@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n SharedPreferences preferences = getSharedPreferences(\"logInfo\",\n Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);\n switch (msg.what) {\n case LOGIN_OK:\n application.isLogin = true;\n editor.putBoolean(\"isLogin\", true);\n editor.commit();\n break;\n case LOGOUT_OK:\n application.isLogin = false;\n editor.putBoolean(\"isLogin\", false);\n editor.commit();\n break;\n case PASSWORD_ERROR:\n application.isLogin = false;\n editor.putBoolean(\"isLogin\", false);\n editor.commit();\n startActivity(intent);\n Toast.makeText(getApplicationContext(), getString(R.string.try_again), Toast.LENGTH_SHORT).show();\n break;\n case NETWORK_ERROR:\n application.isLogin = false;\n editor.putBoolean(\"isLogin\", false);\n editor.commit();\n startActivity(intent);\n Toast.makeText(getApplicationContext(), getString(R.string.try_again), Toast.LENGTH_SHORT).show();\n break;\n case LOGIN_FAILED:\n application.isLogin = false;\n editor.putBoolean(\"isLogin\", false);\n editor.commit();\n startActivity(intent);\n Toast.makeText(getApplicationContext(), getString(R.string.try_again), Toast.LENGTH_SHORT).show();\n break;\n }\n showNotification();\n }", "public void onRecvServerStatus(WsMessage.ServerStatus msg) {\n if (msg == null) {\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n String message=\"\";\n\n if (action.equals(\"yes\")) message = \"yes\";\n else if (action.equals(\"no\")) message = \"no\";\n\n Toast.makeText(context, message, Toast.LENGTH_SHORT).show();\n }", "private void setDefulatMessage(){\n message.setText(\" Chess game is ready to play! White's turn \");\n }", "static void check(String msg, boolean value) {\n\t\tif (!value) throw new RuntimeException(msg);\n\t}", "private boolean m20199OooO00o(String str) {\n if (!TextUtils.isEmpty(str)) {\n return str.split(Constants.ACCEPT_TIME_SEPARATOR_SP).length == 3;\n }\n AbstractC8536oo00OO0O.OooO0O0(\"HiAnalytics/event\", \"event data is empty\");\n return false;\n }", "private String getTurnMessage(){\n if (board.turn ==0)\n return \"Black's turn\";\n else\n return \"White's turn\";\n }", "public void onClick(View v) {\n is_enabled=!is_enabled;\n if(!is_enabled){\n textView_current_Status.setText(R.string.switcher_is_being_enabled_please_wait);\n //sayHello();\n Set_Switch_On();\n }else{\n textView_current_Status.setText(R.string.switcher_is_currently_disabled);\n Set_Switch_Off();\n }\n }", "@Test\n public void checkStartupToast() {\n //run with airplane mode so no internet connectivity\n onView(withText(\"Ensure data connectivity\")).inRoot(new ToastMatcher())\n .check(matches(isDisplayed()));\n }", "private void checkLogLevel() {\n config.getString(\"log_level\");\n }", "private boolean poleSwitchEngaged(){\n return true; //poleSwitch.get();\n }", "boolean hasSkipMessage();", "private boolean isBtConnected(){\n \treturn false;\n }", "@Override\n public void run() {\n \tBTstatusTextView.setText(s);\n \t\n \tif(s.equals(\"BT-Ready\") && !(poll.getVisibility() == View.VISIBLE)){\n \t\tLog.d(\"poll buttion\", \"setting visible\");\n \t//Ready to poll\n \t\tpoll.setVisibility(View.VISIBLE);\n \t\n }\n }", "@Override\n\tpublic void teleopInit() {\n\t\tbeenEnabled = true;\n\t\tif(!socket){\n\t\t\tlogger.startSocket(); socket = true;\n\t\t}\n\t}", "@Override\n public int getLogMode() {\n return QRomLogBaseConfig.LOG_BOTH;\n }", "private void m1866c() {\n /*\n r10 = this;\n r2 = 0;\n r1 = 1;\n r0 = \"DCVpnService\";\n r3 = \"startVPN\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n monitor-enter(r10);\n r0 = r10.f1317a;\t Catch:{ all -> 0x0065 }\n if (r0 == 0) goto L_0x0017;\n L_0x000e:\n r0 = \"DCVpnService\";\n r1 = \"startVPN: already started\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n L_0x0016:\n return;\n L_0x0017:\n r0 = 1;\n r10.f1317a = r0;\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n r0 = \"DCVpnService\";\n r3 = \"startVPN: about to build\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n r0 = com.ppu.fba.FirewallApplication.m1851a();\n r0 = android.preference.PreferenceManager.getDefaultSharedPreferences(r0);\n r3 = \"data_caching_on\";\n r3 = r0.getBoolean(r3, r2);\n r4 = \"ad_blocking_on\";\n r4 = r0.getBoolean(r4, r1);\n r5 = \"malware_shield_on\";\n r6 = r0.getBoolean(r5, r2);\n if (r3 == 0) goto L_0x0068;\n L_0x003e:\n r5 = r1;\n L_0x003f:\n if (r4 == 0) goto L_0x006a;\n L_0x0041:\n r4 = r1;\n L_0x0042:\n if (r6 == 0) goto L_0x006c;\n L_0x0044:\n r0 = r1;\n L_0x0045:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x0054;\n L_0x0049:\n r3 = new com.ppu.fba.g;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x006e }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x006e }\n L_0x0054:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x00b6;\n L_0x0058:\n r10.f1317a = r2;\n r0 = \"DCVpnService\";\n r1 = \"builder failed: stopSelf() now\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\n r10.stopSelf();\n goto L_0x0016;\n L_0x0065:\n r0 = move-exception;\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n throw r0;\n L_0x0068:\n r5 = r2;\n goto L_0x003f;\n L_0x006a:\n r4 = r2;\n goto L_0x0042;\n L_0x006c:\n r0 = r2;\n goto L_0x0045;\n L_0x006e:\n r3 = move-exception;\n r3 = new com.ppu.fba.q;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x007b }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x007b }\n goto L_0x0054;\n L_0x007b:\n r3 = move-exception;\n r6 = \"state\";\n r7 = \"vpnFail\";\n r8 = new java.lang.StringBuilder;\n r8.<init>();\n r9 = \"excEst: \";\n r8 = r8.append(r9);\n r9 = r3.getMessage();\n if (r9 != 0) goto L_0x00b1;\n L_0x0091:\n r3 = \"null\";\n L_0x0093:\n r3 = r8.append(r3);\n r3 = r3.toString();\n r8 = 0;\n r3 = com.google.analytics.tracking.android.MapBuilder.createEvent(r6, r7, r3, r8);\n r3 = r3.build();\n com.ppu.fba.p009d.Log1.LogAction(r3);\n r3 = com.ppu.fba.R.string.error_vpn_establish;\n r3 = android.widget.Toast.makeText(r10, r3, r1);\n r3.show();\n goto L_0x0054;\n L_0x00b1:\n r3 = r3.getMessage();\n goto L_0x0093;\n L_0x00b6:\n r3 = r10.m1868e();\n r10.startForeground(r1, r3);\n r3 = \"DCVpnService\";\n r6 = \"init\";\n com.ppu.fba.p009d.Log1.LogF1(r3, r6);\n r3 = r10.f1322g;\n r3 = r3.getFd();\n r6 = r10.getFilesDir();\n r6 = r6.getAbsolutePath();\n r0 = com.ppu.fba.NativeWrapper.jni_dicki(r3, r6, r5, r4, r0);\n if (r0 == 0) goto L_0x00e4;\n L_0x00d8:\n r0 = \"DCVpnService\";\n r2 = \"account_init failed!!!!!\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r2);\n r10.stopForeground(r1);\n goto L_0x0016;\n L_0x00e4:\n r10.f1321f = r2;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.d;\n r1.<init>(r10);\n r2 = \"t4\";\n r0.<init>(r1, r2);\n r10.f1324i = r0;\n r0 = r10.f1324i;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.e;\n r1.<init>(r10);\n r2 = \"t0\";\n r0.<init>(r1, r2);\n r10.f1323h = r0;\n r0 = r10.f1323h;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.f;\n r1.<init>(r10);\n r2 = \"t1\";\n r0.<init>(r1, r2);\n r10.f1319d = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.o;\n r1.<init>(r10);\n r2 = \"t2\";\n r0.<init>(r1, r2);\n r10.f1320e = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.p;\n r1.<init>(r10);\n r2 = \"t3\";\n r0.<init>(r1, r2);\n r10.f1318c = r0;\n r0 = r10.f1319d;\n r0.start();\n r0 = r10.f1320e;\n r0.start();\n r0 = r10.f1318c;\n r0.start();\n goto L_0x0016;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ppu.fba.FirewallVpnService.c():void\");\n }", "@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }", "public boolean isReady(){\n return !result.equals(\"\");\n }", "private void println(final String msg) {\n if (!mTestStop) {\n CUIOutputStream.println(msg);\n }\n }", "private void handleTrackingSwitchChecked() {\n mSwitchTracking.setText(R.string.switchStopTracking);\n if (mListener != null) {\n mListener.onStartFragmentStartTracking();\n }\n }", "public void pingDevice(View view) {\n if (!ready) {\n Toast.makeText(this, \"devices not ready\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (ConfigSetter.config[4] < 4) // see strings resource file for assignment of power values to ConfigSetter.config\n connToastsDeactivated = true;\n bleHandler.writeExperimentSettingsCharacteristic(\"!\".getBytes());\n }", "@Override\n public void updateLog(String msg) {\n\n setText2Log(msg);\n }", "private void addStateLog(){\n int state = GUIState.getState();\n if(state == 1){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n addText(\"Choose which card this card will affect!\");\n } if(state == 2){\n if(GUIState.command.equals(\"Summon\") || GUIState.command.equals(\"Defense\")){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n }\n addText(\"Choose where to put this card!\");\n }\n }", "private boolean printing_status() {\n\t\treturn _status_line != null;\n\t}", "private static void msg(Object msg) {\n msg(msg, true);\n }", "private static boolean checkmsg(SmsMessage smsmessage) {\n\t\tboolean isok = false;\n\t\t\n//\t private String MA_TYPE=\"\";\n//\t private String MESSAGE_TYPE=\"\";\n//\t private String TEL=\"\";\n//\t private String VBODY=\"\";\n//\t private String VTIME=\"\";\n\n\t\tif(null != smsmessage.getTEL() \n\t\t\t\t&& !\"\".equalsIgnoreCase(smsmessage.getTEL()) &&\n\t\t null != smsmessage.getVBODY()\n\t\t\t\t&& !\"\".equalsIgnoreCase(smsmessage.getVBODY())){\n\t\t\tisok = true;\n\t\t}\n\t\t\n\t\treturn isok;\n\t}", "private void checkEnabled() {\n }", "public String check_not_ready(Operator op){\n String positive = \"соблюдено\";\n String negative = \"не соблюдено\";\n int not_ready_time_seconds = (int) get_seconds(op.getLoged_out());\n int not_ready_value;\n if(op.getShift()==Shift.nine) {\n not_ready_value = (int) get_seconds(not_ready_9);\n if(not_ready_time_seconds<= not_ready_value)\n return positive;\n else\n {\n op.setBonus(op.getBonus()-500);\n return negative;\n }\n }\n if(op.getShift()==Shift.twelve) {\n not_ready_value = (int) get_seconds(not_ready_12);\n if(not_ready_time_seconds<= not_ready_value)\n return positive;\n else\n {\n op.setBonus(op.getBonus()-500);\n return negative;\n }\n }\n\n return positive;\n }", "public void powerOff() { //power_off\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.OFF));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.OFF) {\n isTurningOff = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n }\n }", "@Override\n public void testPeriodic() {\n //Diagnostics.writeString(\"State\", \"TEST\");\n }", "@Override\n public void run() {\n\t\t\t\t\t\t\tif (!wrapped)\n\t\t\t\t\t\t\t\thexEditor.getEditorSite().getActionBars().getStatusLineManager().setMessage(found == null && matchCount == 0 ? Messages.HexEditorControl_7 : matchCount > 0 ? Messages.HexEditorControl_8 + matchCount + Messages.HexEditorControl_9 : null);\n\t\t\t\t\t\t\tupdateStatusPanel();\n\t\t\t\t\t\t}", "int getMqttEnabledStateValue();", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlblstatus.setText(\"Hardware Problem\");\r\n\t\t\t\t\tToast.makeText(Main.mainstage, \"Hardware Problem\", 1000,\r\n\t\t\t\t\t\t\t100, 100);\r\n\r\n\t\t\t\t}", "@Override\n\t public void onReceive(Context context, Intent intent) {\n\t Toast.makeText(appContext, intent.getStringExtra(\"cmd_value\"), Toast.LENGTH_SHORT).show();\n\t }", "private void processCallStateOffhook () {\n\t\t\n\t\ttry {\n\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"OFFHOOK\");\t\n\t\t\t\n\t\t\tConfigAppValues.processRingCall = false;\n\t\t\t\n\t\t\tif (QSToast.DEBUG) QSToast.d(\n \t\tConfigAppValues.getContext().getApplicationContext(),\n \t\t\"OFFHOOK!!!!!!!!\",\n \t\tToast.LENGTH_SHORT);\t\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\n\t\t}\n\t}", "static void call_when_parity_not(String passed){\n\t\tif(!P)\n\t\t\tcomplete_call_req(passed.substring(4));\n\t}", "private void parserReciverMsg(String msg){\n String deviceMsg=null;\n\n if (!msg.startsWith(\"{\"))\n return;\n try {\n deviceMsg=new JSONObject(msg).getString(\"MSG\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n return;\n }\n if (deviceMsg==null)\n return;\n if (deviceMsg.equals(\"logout\"))\n return;\n if (deviceMsg.startsWith(\"upgrade\"))\n return;\n if (!deviceMsg.startsWith(\"SWITCH\"))\n return;\n\n String[] deviceInfoT = deviceMsg.split(\",\");\n Map<String,String> deviceInfo=new HashMap<>();\n String key=\"\";\n String value=\"\";\n for(int i=0;i<deviceInfoT.length;i++){\n key=deviceInfoT[i].substring(0,deviceInfoT[i].lastIndexOf(\":\"));\n value=deviceInfoT[i].substring(deviceInfoT[i].lastIndexOf(\":\") + 1);\n deviceInfo.put(key,value);\n }\n\n devSWITCH=deviceInfo.get(\"SWITCH\").equals(\"1\");\n if (devSWITCH!=mSeekCircle.isStart()){\n refreshDeviceImg(devSWITCH);\n }\n setTextMsg(deviceInfo.get(\"CURRENTTEMP\")+\"℃\\n当前温度\",txtCurT);\n setTextMsg(deviceInfo.get(\"SETTEMP\")+\"℃\\n设置温度\",txtSettingT);\n mSeekCircle.setProgress(Integer.parseInt(deviceInfo.get(\"CURRENTTEMP\")));\n\n String[] timeStart_1=deviceInfo.get(\"TIMER1OPEN\").split(\"\\\\.\");\n txtTimerStart[0].setText(timeStart_1[1]+\":\"+timeStart_1[2]);\n timerStartMap.put(\"0hh\",Integer.parseInt(timeStart_1[1]));\n timerStartMap.put(\"0mm\",Integer.parseInt(timeStart_1[2]));\n\n if (timeStart_1[0].equals(\"1\")){\n if (!tbTimeOpen[0].isToggleOn())\n tbTimeOpen[0].setToggleOn();\n }else {\n if (tbTimeOpen[0].isToggleOn())\n tbTimeOpen[0].setToggleOff();\n }\n\n String[] timeStart_2=deviceInfo.get(\"TIMER2OPEN\").split(\"\\\\.\");\n txtTimerStart[1].setText(timeStart_2[1]+\":\"+timeStart_2[2]);\n timerStartMap.put(\"1hh\",Integer.parseInt(timeStart_2[1]));\n timerStartMap.put(\"1mm\",Integer.parseInt(timeStart_2[2]));\n if (timeStart_2[0].equals(\"1\")){\n if (!tbTimeOpen[1].isToggleOn())\n tbTimeOpen[1].setToggleOn();\n }else {\n if (tbTimeOpen[1].isToggleOn())\n tbTimeOpen[1].setToggleOff();\n }\n\n String[] timeEnd_1=deviceInfo.get(\"TIMER1CLOSE\").split(\"\\\\.\");\n txtTimerEnd[0].setText(timeEnd_1[1]+\":\"+timeEnd_1[2]);\n timerEndMap.put(\"0hh\",Integer.parseInt(timeEnd_1[1]));\n timerEndMap.put(\"0mm\",Integer.parseInt(timeEnd_1[2]));\n if (timeEnd_1[0].equals(\"1\")){\n if (!tbTimeStop[0].isToggleOn())\n tbTimeStop[0].setToggleOn();\n }else {\n if (tbTimeStop[0].isToggleOn())\n tbTimeStop[0].setToggleOff();\n }\n\n String[] timeEnd_2=deviceInfo.get(\"TIMER2CLOSE\").split(\"\\\\.\");\n txtTimerEnd[1].setText(timeEnd_2[1]+\":\"+timeEnd_2[2]);\n timerEndMap.put(\"1hh\",Integer.parseInt(timeEnd_2[1]));\n timerEndMap.put(\"1mm\",Integer.parseInt(timeEnd_2[2]));\n if (timeEnd_2[0].equals(\"1\")){\n if (!tbTimeStop[1].isToggleOn())\n tbTimeStop[1].setToggleOn();\n }else {\n if (tbTimeStop[1].isToggleOn())\n tbTimeStop[1].setToggleOff();\n }\n faultmsg= deviceInfo.get(\"FAULTMSG\");\n if (faultmsg.equals(\"E00\")||faultmsg.equals(\"E00|E00\")){//正常\n layoutErr.setVisibility(View.INVISIBLE);\n }else {\n if (faultmsg.contains(\"|\")){\n String[] faults = faultmsg.split(\"\\\\|\");\n// L.MyLog(TAG,\"设备故障:faults:\"+faults[0]+\"-----\"+faults[1]);\n if (faults[0].equals(\"E00\")){\n faultmsg=faults[1];\n }\n if (faults[1].equals(\"E00\")){\n faultmsg=faults[0];\n }\n }\n\n M_Dev_Err dererr = dbDeviceErrManager.getErr(devHexId, faultmsg);\n long t=0;\n if (dererr!=null)\n t=(System.currentTimeMillis()-dererr.getErrDoneTime())/1000;\n L.MyLog(TAG,\"设备故障:\"+t+\"----\"+faultmsg);\n if (dererr==null){\n dererr = new M_Dev_Err();\n dererr.setErrCode(faultmsg);\n dererr.setErrTime(System.currentTimeMillis());\n dererr.setErrDoneTime(0);\n dererr.setErrDevIdHex(devHexId);\n dbDeviceErrManager.addErr(dererr);\n layoutErr.setVisibility(View.VISIBLE);\n }else if (t>30*30){\n layoutErr.setVisibility(View.VISIBLE);\n }else {\n layoutErr.setVisibility(View.INVISIBLE);\n }\n\n }\n\n }", "public void toggleLoginError() {\n TextView loginErrorTextView = findViewById(R.id.login_error);\n if (loginErrorTextView.getText().toString().equals(\"\")) {\n loginErrorTextView.setText(R.string.incorrectUsernamePassword);\n }\n }", "private void logStatusMessage(String string) {\n if (m_log != null) {\n m_log.statusMessage(string);\n if (string.contains(\"WARNING\") || string.contains(\"ERROR\")) {\n m_log.logMessage(string);\n }\n }\n }", "private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}", "public void onClick(View v) {\n switch (v.getId()) {\n case R.id.tb:\n\n String data = toggle.getText().toString();\n if (data.equals(\"On\")) {\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"A1 \" + passw);\n\n boolean b = db.insertOrUpdate_Activation_status(\"1\");\n if (b) {\n\n Toast.makeText(getApplicationContext(), \"1\", Toast.LENGTH_LONG).show();\n }\n }\n } else {\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"A0 \" + passw);\n boolean b = db.insertOrUpdate_Activation_status(\"0\");\n if (b) {\n Toast.makeText(getApplicationContext(), \"0\", Toast.LENGTH_LONG).show();\n }\n }\n\n }\n // Toast.makeText(getApplicationContext(),data,Toast.LENGTH_LONG).show();\n\n break;\n case R.id.deactivate:\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"D \" + passw);\n }\n\n break;\n case R.id.sn:\n dailog();\n\n break;\n case R.id.son:\n\n dailog_son();\n break;\n case R.id.cn:\n dailog_remove();\n\n break;\n case R.id.cp:\n\n\n break;\n case R.id.msts:\n\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"MSTS \" + passw);\n }\n\n break;\n case R.id.rst:\n db.opendb();\n String stt=db.get_De_status();\n if(stt!=null && stt.length()>0) {\n int st = Integer.parseInt(stt);\n if (st == 0) {\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"RST \" + passw);\n }\n } else {\n Toast.makeText(getApplicationContext(), \"Deactivate 1st and try Again\", Toast.LENGTH_LONG).show();\n }\n }\n\n break;\n\n case R.id.dab:\n dailod_dab();\n\n break;\n case R.id.sts:\n db.opendb();\n mobno = db.get_Mobileno();\n\n if (mobno != null && mobno.length() > 0) {\n sendSMS(mobno, \"STS\");\n }\n\n break;\n case R.id.ss:\n db.opendb();\n mobno = db.get_Mobileno();\n\n if (mobno != null && mobno.length() > 0) {\n sendSMS(mobno, \"SIG\");\n }\n\n break;\n case R.id.ver:\n db.opendb();\n mobno = db.get_Mobileno();\n\n if (mobno != null && mobno.length() > 0) {\n sendSMS(mobno, \"VER\");\n }\n\n break;\n case R.id.save:\n db.opendb();\n mobno = db.get_Mobileno();\n passw = db.get_PASS();\n if (mobno != null && mobno.length() > 0 && passw != null && passw.length() > 0) {\n sendSMS(mobno, \"SAVE \" + passw);\n }\n\n break;\n }\n }", "private void updateUI(String msg){\n if(msg != null) {\n textViewStatus.setText(msg);\n }\n }", "private static void print(Object msg){\n if (WAMClient.Debug){\n System.out.println(msg);\n }\n\n }", "boolean isQuiet();", "@Override\n public void handleMessage(Message msg) {\n sendEmptyMessageDelayed(0, 3000);\n if (resClient.getSendBufferFreePercent() <= 0.05) {\n Toast.makeText(StreamingActivity.this, \"sendbuffer is full,netspeed is low!\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\t\t\tpublic void handler(String param) {\n\t\t\t\ttry {\n\t\t\t\t\tif (param != null && param.contains(\"status\")) {\n\t\t\t\t\t\tJSONObject json = new JSONObject(param);\n\t\t\t\t\t\tif (json.getInt(\"status\") == 0) {\n\t\t\t\t\t\t\tif (isbind) {\n\t\t\t\t\t\t\t\tSPHelper.setBaseMsg(SettingActivity.this, \"bindkey\",typ);\n\t\t\t\t\t\t\t\tSPHelper.setBaseMsg(SettingActivity.this, \"bindval\",code);\n\t\t\t\t\t\t\t\tdown_data(); \n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSPHelper.setBaseMsg(SettingActivity.this, \"bindkey\",\"3\");\n\t\t\t\t\t\t\t\tSPHelper.setBaseMsg(SettingActivity.this, \"bindval\",\"\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\tinitBindStateView();\n\t\t\t\t\t\t\tbinddialog.dismiss();\n//\t\t\t\t\t\t\tIntent intent=new Intent(SettingActivity.this,TalkingMessageService.class);\n//\t\t\t\t\t\t\tSettingActivity.this.stopService(intent);\n\t\t\t\t\t\t} else { \n\t\t\t\t\t\t\tToastManager.show(SettingActivity.this,json.getString(\"description\"), 2000);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToastManager.show(SettingActivity.this, getResources().getString(R.string.wangluoyic), 2000);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tToastManager.show(SettingActivity.this,getResources().getString(R.string.wangluoyic), 2000);\n\t\t\t\t}\n\t\t\t}", "private void handleTrackingSwitchUnChecked() {\n mSwitchTracking.setText(R.string.switchStartTracking);\n if (mListener != null) {\n mListener.onStartFragmentStopTracking();\n }\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(MainActivity.this, \"已挂断电话\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"callShutDown\", \"已挂断电话\");\r\n }", "private void m57235e() {\n if (this.f41223d != null) {\n this.f41223d.sendEmptyMessage(1);\n }\n }", "@Override\r\n\tpublic net.floodlightcontroller.core.IListener.Command receive(\r\n\t\t\tIOFSwitch sw, OFMessage msg, FloodlightContext cntx) {\n\t\tif (!printedTopo) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"*** Print topology\");\r\n\t\t\tlinks = lds.getLinks();\r\n\t\t\tMap<Long, Set<Link>> switchList = lds.getSwitchLinks();\r\n\t\t\t\r\n\t\t\tfor(Map.Entry<Long, Set<Link>> entry : switchList.entrySet()) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"switch \" + entry.getKey() + \" neighbors: \");\r\n\t\t\t\tHashSet<Long> linkIds = new HashSet<Long>();\r\n\t\t\t\t\r\n\t\t\t\tfor(Link link : entry.getValue()) \r\n\t\t\t\t{\r\n\t\t\t\t\tif(entry.getKey() == link.getDst()) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlinkIds.add(link.getSrc());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlinkIds.add(link.getDst());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tboolean firstLink = true;\r\n\t\t\t\t\r\n\t\t\t\tfor(Long id : linkIds) \r\n\t\t\t\t{\r\n\t\t\t\t\tif(firstLink) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(id);\r\n\t\t\t\t\t\tfirstLink = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\", \" + id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\r\n\t\t\tprintedTopo = true;\r\n\t\t}\r\n\r\n\r\n\t\t// eth is the packet sent by a switch and received by floodlight.\r\n\t\tEthernet eth = IFloodlightProviderService.bcStore.get(cntx,\r\n\t\t\t\tIFloodlightProviderService.CONTEXT_PI_PAYLOAD);\r\n\r\n\t\t// We process only IP packets of type 0x0800.\r\n\t\tif (eth.getEtherType() != 0x0800) {\r\n\t\t\treturn Command.CONTINUE;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"*** New flow packet\");\r\n\r\n\t\t// Parse the incoming packet.\r\n\t\t\tOFPacketIn pi = (OFPacketIn)msg;\r\n\t\t\tOFMatch match = new OFMatch();\r\n\t\t match.loadFromPacket(pi.getPacketData(), pi.getInPort());\r\n\t\t\t\r\n\t\t\t// Obtain source and destination IPs.\r\n\t\t\t// ...\r\n\t\t\tSystem.out.println(\"srcIP: \" + match.getNetworkSourceCIDR());\r\n\t System.out.println(\"dstIP: \" + match.getNetworkDestinationCIDR());\r\n\r\n\t\t\t// Calculate the path using Dijkstra's algorithm.\r\n\t\t\tRoute route = null;\r\n\t\t\t\r\n\t\t\t// ...\r\n\t\t\tSystem.out.println(\"route: \" + \"1 2 3 ...\");\t\t\t\r\n\r\n\t\t\t// Write the path into the flow tables of the switches on the path.\r\n\t\t\tif (route != null) {\r\n\t\t\t\tinstallRoute(route.getPath(), match);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Command.STOP;\r\n\t\t}\r\n\t}", "@Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n String debugStr[]=settings.getLatestSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH);\n if(debugStr!=null) {\n boolean streamOn = Boolean.valueOf(debugStr[3]);\n if(!streamOn){\n //Check that we are connected to the device before try to send command\n if(MainActivity.deviceConnected) {\n overview.orientationSwitch.setChecked(true);\n settings.insertSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH, \"true\");\n sendStreamEnabledImuRequest();\n } else {\n overview.orientationSwitch.setChecked(false);\n }\n } else {\n overview.orientationSwitch.setChecked(false);\n settings.insertSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH, \"false\");\n sendStreamDisabledImuRequest();\n }\n\n } else {\n //The settings could not be found in the database, insert the setting\n settings.insertSetting(SettingsDbHelper.SETTINGS_TYPE_ORIENTATION_SWITCH, \"false\");\n }\n\n\n }", "static public void checkAndPrintIfLostDrone(Drone drone) {\n\n if (drone.isReturningToHome() && drone.getDistanceSource() == 0) {\n System.out.println(\"Drone[\" + drone.getLabel() + \"] \" + \"Return to home completed successfully\");\n LoggerController.getInstance().print(\"Drone[\" + drone.getLabel() + \"] \" + \"Return to home completed successfully\");\n return;\n }\n if (drone.getDistanceDestiny() == 0) {\n System.out.println(\"Drone[\" + drone.getLabel() + \"] \" + \"Arrived at destination\");\n LoggerController.getInstance().print(\"Drone[\" + drone.getLabel() + \"]\" + \"Arrived at destination\");\n return;\n }\n\n /* if(drone.isGoingManualToDestiny()){\n System.out.println(\"Drone[\"+getDroneLabel()+\"] \"+\"Arrived at destination\");\n loggerController.print(\"Drone[\"+getDroneLabel()+\"] \"+\"Arrived at destination\");\n return;\n }*/\n\n if (drone.isOnWater()) {\n System.out.println(\"Drone[\" + drone.getLabel() + \"] \" + \"Drone landed on water\");\n LoggerController.getInstance().print(\"Drone[\" + drone.getLabel() + \"] \" + \"Drone landed on water\");\n } else {\n System.out.println(\"Drone[\" + drone.getLabel() + \"] \" + \"Drone landed successfully\");\n LoggerController.getInstance().print(\"Drone[\" + drone.getLabel() + \"] \" + \"Drone landed successfully\");\n }\n\n\n }", "synchronized void endCriticalUse(){\nSC = false;\nJeton=false;\n\nif (procId==0){\n\tSyncMessage sm = new SyncMessage(MsgType.JETON, 0, procId);\n\tsendTo(0, sm);\n}else{\n\tSyncMessage sm = new SyncMessage(MsgType.JETON, 1, procId);\n\tsendTo(1, sm);\n}\n\n}", "@Test\n public void return_early_from_start_in_issues_mode() {\n Mockito.when(settings.getBoolean(SCM_DISABLED_KEY)).thenReturn(Optional.of(true));\n Mockito.when(analysisMode.isIssues()).thenReturn(true);\n underTest.start();\n assertThat(logTester.logs()).isEmpty();\n }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase LIGHTON:\n\t\t\t\tSystem.out.println(\"on\");\n\t\t\t\tsetWifi.setBackgroundResource(R.mipmap.cam_set_image_red);\n\t\t\t\tbreak;\n\t\t\tcase LIGHTOFF:\n\t\t\t\tSystem.out.println(\"off\");\n\t\t\t\tsetWifi.setBackgroundResource(R.mipmap.cam_set_image_default);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "static boolean shouldOutput(Configuration conf) {\n return conf.getBoolean(OUTPUT_FLAG, true);\n }" ]
[ "0.54554653", "0.5443868", "0.5407114", "0.5395305", "0.53735334", "0.5358448", "0.53492475", "0.5322807", "0.5320587", "0.52961004", "0.5197622", "0.51872885", "0.51867086", "0.51770234", "0.5172695", "0.5141041", "0.5122294", "0.51184934", "0.5114518", "0.5108191", "0.5102456", "0.509695", "0.50899583", "0.5071401", "0.50504935", "0.50329095", "0.5018595", "0.50148857", "0.49996978", "0.4996986", "0.4986017", "0.4970802", "0.49655044", "0.49628064", "0.4961348", "0.49559432", "0.49541256", "0.49524263", "0.4947016", "0.49468726", "0.49421898", "0.49394712", "0.49341252", "0.49283564", "0.49250555", "0.4914855", "0.49042523", "0.49038434", "0.4903489", "0.489027", "0.48881844", "0.4879107", "0.48781466", "0.48765725", "0.48763812", "0.48739013", "0.48726305", "0.4869491", "0.486739", "0.48640952", "0.4858025", "0.48539555", "0.48473254", "0.48352617", "0.48331004", "0.48323998", "0.48321402", "0.48314014", "0.482444", "0.48210442", "0.48201978", "0.4819669", "0.48191908", "0.48146993", "0.48139587", "0.48121753", "0.481092", "0.480873", "0.4806645", "0.48039764", "0.47975034", "0.47857186", "0.4782787", "0.47684303", "0.47680867", "0.47639692", "0.47636878", "0.47511238", "0.47458294", "0.4745508", "0.4745466", "0.4744934", "0.47408533", "0.47406816", "0.47364983", "0.47277468", "0.47263053", "0.47155893", "0.47145593", "0.4713938", "0.47121388" ]
0.0
-1
number of vertices The main method for this program
public static void main(String[] args) { if(args.length != 1) { usage(); } Vertex[] vertices; int capital; // the rank of the capital city Cities cities = new Cities(); cities.readFile(args[0]); vertices = cities.minSpanningTree(0); V = vertices.length; populateNeighbors(vertices); List<SimpleEntry<Integer, Double>> bc = betweennessCent(vertices); MathContext mc = new MathContext(6); // to format numbers to 6 sig digs capital = -1; // should never be -1 one when trying to access it, and we want to know if it is. System.out.println("Rank\tVertex\tBetweenness"); for(int i = 0; i < V; i++) { if(i < 40) { System.out.println((i+1) + "\t" + bc.get(i).getKey() + "\t" + new BigDecimal(bc.get(i).getValue(), mc)); } if(bc.get(i).getKey() == 0) { capital = i; } } System.out.println("\nCapital city:"); System.out.println((capital+1) + "\t" + bc.get(capital).getKey() + "\t" + new BigDecimal(bc.get(capital).getValue(), mc)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getNumberOfVertexes();", "public int numVertices();", "public int numVertices();", "public int numVertices() { return numV; }", "public int getNumberOfVertices();", "public int getNumVertices();", "public int getNumVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numVertices;\n\t}", "public int getVertexCount();", "public abstract int getNumberOfVertices();", "public int getNumVertices(){\n return numVertices;\n }", "public int getNumberOfVertices() {\n\t\treturn n;\n\t}", "public abstract int getVertexCount();", "public int getNumVertices() {\n return num_vertices;\n }", "@Override\r\n public int size() {\r\n return vertices.size();\r\n }", "public int getNumVertices() {\n\t\treturn vertices.size();\n\t}", "int getVertices();", "public int size() {\n\t\treturn vertices.size();\n\t}", "public void addVertices(int num){ \n this.nrVertices += num;\n }", "public int getVertexCount() {\n return vertexCount;\n }", "public long getVertexCount(){\n return vertexCount;\n }", "public int getVertices() {\n return verticesNumber;\n }", "public void addVertices(int n);", "public int getVertexCount() {\n\t\treturn vertexCount;\n\t}", "public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}", "public int getNrVertices(){\n return nrVertices;\n }", "@Test\r\n public void testNumVertices() {\r\n System.out.println(\"numVertices\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n int expResult = 0;\r\n int result = instance.numVertices();\r\n assertEquals(expResult, result);\r\n\r\n Object v1Element = 1;\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n\r\n expResult = 1;\r\n result = instance.numVertices();\r\n assertEquals(expResult, result);\r\n }", "private List<Integer> vertices(int num) {\n List<Integer> list = new LinkedList<>();\n for (int i = 0; i < num; i++) {\n list.add(i);\n }\n return list;\n }", "@Override\n\t\tpublic int getRowCount() {\n\t\t\treturn app.graph.verticesCount;\n\t\t}", "public void setNrVertices(int nrVertices){\n this.nrVertices = nrVertices;\n }", "public void testVerticesSet() {\n System.out.println(\"verticesSet\");\n\n Assert.assertTrue(generateGraph().verticesSet().size() == 25);\n }", "public int getVertexSize() {\n\t\treturn graph.vertexSet().size();\r\n\t}", "private void createNVertices() {\n\t\tfor (int i = 0; i < this.numNVertices; i++) {\n\t\t\tvertices.add(new Vertex('n', this.countNID++));\n\t\t}\n\t}", "void setVertices(int vertices);", "public String getVerticesCount() {\n long res = 0;\n Iterator<Vertex> itty = g.vertices();\n Vertex v;\n while (itty.hasNext()) {\n v = itty.next();\n res++;\n }\n return Long.toString(res);\n }", "public int getMinimumVertexCount()\r\n {\r\n return theMinimumVertexCount;\r\n }", "public int getVertexCount()\n\t{\n\t\tint count = 0;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tcount++;\n\t\t\titr.next();\n\t\t}\n\t\treturn count;\n\t}", "public int getVertexCount() {\n if (hasIndices())\n return indices.length;\n if (hasVertices())\n return vertices.length / 3;\n logger.warn(\"No indices or vertices set, vertex count returning 0!\");\n return 0;\n }", "@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}", "void getVertices() {\r\n\t\tSystem.out.println(\"Enter your vertices:\");\r\n\t\tarrIndexToVertexMap = new HashMap<>();\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < numberOfVertices; i++) {\r\n\t\t\t\tarrIndexToVertexMap.put(i, sc.next());\r\n\t\t\t}\r\n\t\t\tsc.close();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tSystem.out.println(\"Error at method:: getVertices || Description:\" + re);\r\n\t\t}\r\n\t}", "public static void main(String args[]) {\n\n\t\tBufferedReader objFileBR;\n\t\tString line, tempstr;\n\t\tStringTokenizer st;\n\n\t\tString objfName = args[0]; // get the object file name from first command line parameter\n\n\t\tfinal int MAX_VERTICES = 400;\n\t\tfinal int MAX_POLYS = 200;\n\t\tfinal int MAX_EDGES = 7;\n\n\t\tv = new Vertex[MAX_VERTICES];\n\t\t/* index is the vertex number,\n\t\t and the Vertex is (x, y, z, 1) coordinates of a vertex of the object */\n\n\t\tpolyColor= new double[MAX_POLYS][3];\n\t\t/* first index is the polygon number, the next index goes from 0 to 2\n\t\t representing the RGB values of that polygon */\n\n\t\tpolygon = new int[MAX_POLYS][MAX_EDGES + 1];\n\t\t/* polygon[i][0] stores the number of vertices that describes \n\t\t the polygon i.\n\t\t polygon[i][1] through polygon[i][polygon[i][0]] store the \n\t\t vertex numbers in counter clockwise order\n\t\t */\n\n\t\tnumVs = 0;\n\t\tnumPolys = 0;\n\n\t\ttry {\n\t\t\tobjFileBR = new BufferedReader(new FileReader(objfName));\n\n\t\t\tline = objFileBR.readLine(); // should be the VERTICES line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VERTICES\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tnumVs = Integer.parseInt(tempstr);\n\t\t\t} else {\n\t\t\t\tnumVs = 0;\n\t\t\t\tSystem.out.println(\"Expecting VERTICES line in file \"\n\t\t\t\t\t\t+ objfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = objFileBR.readLine(); // should be the POLYGONS line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"POLYGONS\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tnumPolys = Integer.parseInt(tempstr);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting POLYGONS line in file \"\n\t\t\t\t\t\t+ objfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = objFileBR.readLine(); // should be the VERTEX LIST line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VERTEX\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tif (!tempstr.equals(\"LIST\")) {\n\t\t\t\t\tSystem.out.println(\"Expecting VERTEX LIST line in file \"\n\t\t\t\t\t\t\t+ objfName);\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting VERTEX LIST line in file \"\n\t\t\t\t\t\t+ objfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t// if we get here we successfully processed the VERTEX LIST line\n\n\t\t\t// reads each of the vertex coordinates and creates a Vertex object for each one \n\t\t\tfor (int i = 0; i < numVs; i++) {\n\t\t\t\tline = objFileBR.readLine();\n\t\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tv[i] = new Vertex(x1,y1,z1,1.0);\n\t\t\t}\n\n\t\t\tline = objFileBR.readLine(); // should be the POLYGON LIST line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"POLYGON\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tif (!tempstr.equals(\"LIST\")) {\n\t\t\t\t\tSystem.out.println(\"Expecting POLYGON LIST line in file \"\n\t\t\t\t\t\t\t+ objfName);\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting POLYGON LIST line in file \"\n\t\t\t\t\t\t+ objfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t// if we get here we successfully processed the POLYGON LIST line\n\n\t\t\tfor (int i = 0; i < numPolys; i++) {\n\t\t\t\tline = objFileBR.readLine();\n\t\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\t\tst.nextToken(); // ignore the string COUNT \n\t\t\t\ttempstr = st.nextToken(); // this is the value of count (number of vertices for this poly)\n\t\t\t\tint numVsForThisPoly = Integer.parseInt(tempstr);\n\t\t\t\tpolygon[i][0] = numVsForThisPoly;\n\t\t\t\tst.nextToken(); // ignore the string VERTICES \n\n\t\t\t\t//example line: COUNT 5 VERTICES 5 4 3 2 1 COLOR .4 .2 .4\n\n\t\t\t\tfor (int j = 1; j <=numVsForThisPoly; j++) {\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tpolygon[i][j] = Integer.parseInt(tempstr) - 1;\n\t\t\t\t}\n\n\t\t\t\tst.nextToken(); // ignore the string COLOR\n\n\t\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tpolyColor[i][j] = Double.parseDouble(tempstr);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tobjFileBR.close();\n\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"couldn't read from file\");\n\t\t}\n\n\t\t// loops to print out the information just read ...\n\t\t// ******************************************************\n // ******************************************************\n // remove this printing before you submit the program\n // ******************************************************\n // ******************************************************\n\t\t\n\t\t// write code here to print out the vertices \n\n\t\tfor (int i = 0; i < numPolys; i++) {\n\t\t\tSystem.out.print(\"Polygon number \" + i + \" vertices:\");\n\t\t\tfor (int j = 1; j <= polygon[i][0]; j++)\n\t\t\t\tSystem.out.print(\" \" + polygon[i][j]);\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tfor (int i = 0; i < numPolys; i++) {\n\t\t\tSystem.out.print(\"Polygon number \" + i + \" RGB:\");\n\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\tSystem.out.print(\" \" + polyColor[i][j]);\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// ================================================================\n\t\t// ------READ VIEWING PARAMETER FILE \n\t\t// ================================================================\n\n\t\tString viewfName = args[1]; // second command line arg\n\t\tBufferedReader viewFileBR;\n\t\t/* Viewing parameters */\n\t\n\n\t\ttry {\n\t\t\tviewFileBR = new BufferedReader(new FileReader(viewfName));\n\n\t\t\tline = viewFileBR.readLine(); // should be the VRP line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VRP\")) {\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tvrp = new Vertex(x1,y1,z1,1.0);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting VRP line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = viewFileBR.readLine(); // should be the VPN line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VPN\")) {\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tvpn = new Vector(x1,y1,z1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting VPN line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = viewFileBR.readLine(); // should be the VUP line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VUP\")) {\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tvup = new Vector(x1,y1,z1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting VUP line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = viewFileBR.readLine(); // should be the PRP line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"PRP\")) {\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tprp = new Vertex(x1,y1,z1,1.0);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting PRP line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tline = viewFileBR.readLine(); // should be the WINDOW line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"WINDOW\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tumin = Double.parseDouble(tempstr);\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tumax = Double.parseDouble(tempstr);\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tvmin = Double.parseDouble(tempstr);\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tvmax = Double.parseDouble(tempstr);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting WINDOW line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = viewFileBR.readLine(); // should be the FRONT line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"FRONT\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tfrontClip = Double.parseDouble(tempstr);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting FRONT line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\tline = viewFileBR.readLine(); // should be the BACK line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"BACK\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tbackClip = Double.parseDouble(tempstr);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting BACK line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tviewFileBR.close();\n\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"couldn't read from file\");\n\t\t}\n\n\n\t\t// write code here to print out the VRP, PRP, VUP and VPN\n\t\t\n\t\tSystem.out.print(\"WINDOW =\");\n\t\tSystem.out.println(\" \" + umin + \" \" + umax + \" \" + vmin + \" \" + vmax);\n\n\t\tSystem.out.print(\"FRONT =\");\n\t\tSystem.out.println(\" \" + frontClip);\n\n\t\tSystem.out.print(\"BACK =\");\n\t\tSystem.out.println(\" \" + backClip);\n\n\t}", "public static void main(String[] args) {\n\tGraph g = new Graph(9);\n\tg.addEdge(0,2);\n\tg.addEdge(0,5);\n\tg.addEdge(2,3);\n\tg.addEdge(2,4);\n\tg.addEdge(5,3);\n\tg.addEdge(5,6);\n\tg.addEdge(3,6);\n\tg.addEdge(6,7);\n\tg.addEdge(6,8);\n\tg.addEdge(6,4);\n\tg.addEdge(7,8);\n\t \n\tg.printGraph();\n\tSystem.out.println(\"Number of edges: \" + numEdges(g));\n\t\n }", "Graph(int vertices) {\r\n this.numVertices = vertices;\r\n adjacencylist = new LinkedList[vertices];\r\n //initialize adjacency lists for all the vertices\r\n for (int i = 0; i <vertices ; i++) {\r\n adjacencylist[i] = new LinkedList<>();\r\n }\r\n }", "Graph(int size) {\n n = size;\n V = new Vertex[size + 1];\n // create an array of Vertex objects\n for (int i = 1; i <= size; i++)\n V[i] = new Vertex(i);\n }", "public void setVertexNumber(Integer num) {\n\t\t_vertexId = num;\n\t}", "public static void main(String[] args) throws Exception {\n BufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter w = new PrintWriter(System.out);\n\n String[] inputs = r.readLine().split(\" \");\n \n int start = Integer.parseInt(inputs[0]);\n int end = Integer.parseInt(inputs[1]); \n //today you learned that the distance between the eyes from years 10 to 15 expands from about 62 to 64mm.\n \n inputs = r.readLine().split(\" \");\n \n int n = Integer.parseInt(inputs[0]); //number of junktions\n int m = Integer.parseInt(inputs[1]); //number of rodes\n \n Vertex[] vertices = new Vertex[n + 1];\n for (int i = 0; i < n; i++) {\n inputs = r.readLine().split(\" \");\n boolean blue = inputs[0].equals(\"B\");\n vertices[i + 1] = new Vertex(i + 1, blue, Integer.parseInt(inputs[0]), Integer.parseInt(inputs[1]), Integer.parseInt(inputs[2]));\n }\n \n for (int i = 0; i < m; i++) {\n inputs = r.readLine().split(\" \");\n int a = Integer.parseInt(inputs[0]);\n int b = Integer.parseInt(inputs[1]);\n int c = Integer.parseInt(inputs[2]);\n vertices[a].addPath(b, c);\n vertices[b].addPath(a, c);\n }\n \n \n \n \n }", "public native int getVertexCount(GPolyline self)/*-{\r\n\t\treturn self.getVertexCount();\r\n\t}-*/;", "public int getMaximumVertexCount()\r\n {\r\n return theMaximumVertexCount;\r\n }", "public static void main(String[] args) {\n int n = 6;\n int[][] vertex = {{3, 6}, {4, 3}, {3, 2}, {1, 3}, {1, 2}, {2, 4}, {5, 2}};\n int result = new Lv3_49189().solution(n, vertex);\n System.out.println(\"result = \" + result);\n }", "public static void main(String[] args) {\n In in = new In(\"rosalind_bipartiteness.txt\");\n //First read in the number of graphs to check\n int graph_num = in.readInt();\n //For loop that calls the createGraph method once for every graph\n for (int i = 1; i <= graph_num ; i++) {\n createGraph(in);\n }\n }", "private int size() {\n assert _vertices.size() == _edges.size();\n return _edges.size();\n }", "public int getVertexCount() {\n return map.keySet().size();\n }", "public static void main(String[] args){\n Graph g = new Graph(13);\n //add vortexes and edges to construct the graph\n g.addEdge(0,1);\n g.addEdge(0,2);\n g.addEdge(0,6);\n g.addEdge(0,5);\n g.addEdge(6,4);\n g.addEdge(4,3);\n g.addEdge(4,5);\n g.addEdge(3,5);\n g.addEdge(7,8);\n g.addEdge(9,10);\n g.addEdge(9,11);\n g.addEdge(9,12);\n g.addEdge(11,12);\n\n //create a DepthFirstSearch object\n BreadthFirstSearch DFS = new BreadthFirstSearch(g,0);\n\n System.out.println(\"7 and 0 is connected: \"+ DFS.marked(7));\n System.out.println(\"10 and 0 is connected: \"+ DFS.marked(10));\n System.out.println(\"6 and 0 is connected: \"+ DFS.marked(6));\n System.out.println(\"4 and 0 is connected: \"+ DFS.marked(0));\n System.out.println(\"12 and 0 is connected: \"+ DFS.marked(12));\n\n System.out.println(DFS.count()+\" vortexes connect with the vortex 0.\");\n\n }", "@Test\n void test05_checkSize() {\n graph.addVertex(\"a\");\n graph.addVertex(\"b\");\n graph.addVertex(\"c\"); // adds three vertices\n graph.addEdge(\"a\", \"b\");\n graph.addEdge(\"b\", \"c\");\n graph.addEdge(\"c\", \"b\"); // add three edges\n if (graph.size() != 3) {\n fail(\"graph has counted incorrect number of edges\");\n }\n }", "public int numEdges();", "public static void main(String[] args) {\n\t\tVertex v1, v2, v3, v4, v5, v6, v7;\n\t\tv1 = new Vertex(\"v1\");\n\t\tv2 = new Vertex(\"v2\");\n\t\tv3 = new Vertex(\"v3\");\n\t\tv4 = new Vertex(\"v4\");\n\t\tv5 = new Vertex(\"v5\");\n\t\tv6 = new Vertex(\"v6\");\n\t\tv7 = new Vertex(\"v7\");\n\n\t\tv1.addAdjacency(v2, 2);\n\t\tv1.addAdjacency(v3, 4);\n\t\tv1.addAdjacency(v4, 1);\n\n\t\tv2.addAdjacency(v1, 2);\n\t\tv2.addAdjacency(v4, 3);\n\t\tv2.addAdjacency(v5, 10);\n\n\t\tv3.addAdjacency(v1, 4);\n\t\tv3.addAdjacency(v4, 2);\n\t\tv3.addAdjacency(v6, 5);\n\n\t\tv4.addAdjacency(v1, 1);\n\t\tv4.addAdjacency(v2, 3);\n\t\tv4.addAdjacency(v3, 2);\n\t\tv4.addAdjacency(v5, 2);\n\t\tv4.addAdjacency(v6, 8);\n\t\tv4.addAdjacency(v7, 4);\n\n\t\tv5.addAdjacency(v2, 10);\n\t\tv5.addAdjacency(v4, 2);\n\t\tv5.addAdjacency(v7, 6);\n\n\t\tv6.addAdjacency(v3, 5);\n\t\tv6.addAdjacency(v4, 8);\n\t\tv6.addAdjacency(v7, 1);\n\n\t\tv7.addAdjacency(v4, 4);\n\t\tv7.addAdjacency(v5, 6);\n\t\tv7.addAdjacency(v6, 1);\n\n\t\tArrayList<Vertex> weightedGraph = new ArrayList<Vertex>();\n\t\tweightedGraph.add(v1);\n\t\tweightedGraph.add(v2);\n\t\tweightedGraph.add(v3);\n\t\tweightedGraph.add(v4);\n\t\tweightedGraph.add(v5);\n\t\tweightedGraph.add(v6);\n\t\tweightedGraph.add(v7);\n\t\t\n\t\tdijkstra( weightedGraph, v7 );\n\t\tprintPath( v1 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v2 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v3 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v4 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v5 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v6 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v7 );\n\t\tSystem.out.println(\"\");\n\t}", "public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }", "public int getVertexCount() {\n \tif (vertBuf == null)\n \t\treturn 0;\n \treturn vertBuf.asFloatBuffer().limit()/3;\n }", "int getNumberOfEdges();", "public static void main(String [] args){\n\t\tSystem.out.println(\"Code by github: Vinay26k\");\n\t\t // create the graph given in above figure\n int V = 5;\n Graph graph = new Graph(V);\n addEdge(graph, 0, 1);\n addEdge(graph, 0, 4);\n addEdge(graph, 1, 2);\n addEdge(graph, 1, 3);\n addEdge(graph, 1, 4);\n addEdge(graph, 2, 3);\n addEdge(graph, 3, 4);\n \n // print the adjacency list representation of \n // the above graph\n printGraph(graph);\n\t}", "private int createEdges() {\n\t\t// Use random numbers to generate random number of edges for each vertex\n\t\tint avgNumEdgesPerVertex = this.desiredTotalEdges / this.vertices.size();\n\t\tint countSuccessfulEdges = 0;\n\t\t// In order to determine the number of edges to create for each vertex\n\t\t// get a random number between 0 and 2 times the avgNumEdgesPerVertex\n\t\t// then add neighbors (edges are represented by the number of neighbors each\n\t\t// vertex has)\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\tfor (int j = 0; j <= (this.randomGen(avgNumEdgesPerVertex * 50) + 1); j++) {\n\t\t\t\t// select a random vertex from this.vertices (vertex list) and add as neighbor\n\t\t\t\t// ensure we don't add a vertex as a neighbor of itself\n\t\t\t\tint neighbor = this.randomGen(this.vertices.size());\n\t\t\t\tif (neighbor != i)\n\t\t\t\t\tif (this.vertices.get(i).addNeighbor(this.vertices.get(neighbor))) {\n\t\t\t\t\t\tthis.vertices.get(neighbor).addNeighbor(this.vertices.get(i));\n\t\t\t\t\t\tcountSuccessfulEdges++;\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn countSuccessfulEdges;\n\t}", "public int getNumberOfVerticesFound(){\n\t\t\treturn searchOrder.size();\n\t\t}", "public int getChildCount(V vertex);", "public int getEdgeCount() \n {\n return 3;\n }", "public static int loadAllVertices(String filePath) throws IOException{\r\n\t\tBufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));\r\n\t\tString line = bufferedReader.readLine();\r\n\t\tint index = 0;\r\n\t\twhile((line = bufferedReader.readLine()) != null){\r\n\t\t\tString[] details = line.split(\" \");\r\n\t\t\tVertex vertex = new Vertex(details[1],index,CONSTGREYCOL); // grey color\r\n\t\t\tallVertices.put(Integer.parseInt(details[1]), vertex);\r\n\t\t\tif(!allSC.containsKey(Integer.parseInt(details[1]))){\r\n\t\t\t\tdemandVertices.put(Integer.parseInt(details[1]),vertex);\r\n\t\t\t\tdnIDs.add(Integer.parseInt(details[1]));\r\n\t\t\t\t//\t\t\t\tSystem.out.println(\"It is demand node \"+vertex.getnodeID()+\" at Pos: \"+index+\"/\"+vertex.getVertexIndex());\r\n\t\t\t} else {\r\n\t\t\t\t//\t\t\t\tSystem.out.println(\"It is service node \"+vertex.getnodeID()+\" at Pos: \"+index+\"/\"+vertex.getVertexIndex());\r\n\t\t\t}\r\n\t\t\tindex++;\r\n\r\n\t\t}\r\n\t\tSystem.out.println(\"Total no of all vertices are \"+allVertices.size());\r\n\t\tSystem.out.println(\"Total no of demand vertices are \"+demandVertices.size());\r\n\t\tbufferedReader.close();\r\n\t\treturn allVertices.size();\r\n\t}", "int getEdgeCount();", "public int getNumberOfEdges();", "private int getAgentsVertexNumber(Vertex vertex){\n if (vertexAgentsNumber.get(vertex) == null)\n return 0;\n else\n return vertexAgentsNumber.get(vertex).size();\n }", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "public Integer numUnknownVerts()\n\t{\n\t\tif (total_verts == null) return null;\n\t\treturn total_verts - nodes.size();\n\t}", "@Test\n public void getVertexes() {\n\n for (int i = 0; i < 6; i++) {\n\n Vertex temp = new Vertex(i + \"\", \"Location number \" + i);\n assertTrue(temp.equals(testGraph.getVertices ().get(i)));\n\n }\n }", "public static void main(String[] args) {\r\n\t\tSystem.out.println(NumberOfPath(3, 4));\r\n\r\n\t}", "public int getNumEdges();", "public static void main(String[] args) {\n System.out.println(\"-------------------------\");\n //maze.print();\n // int count= obj.getnonVisits();\n // int percent=obj.getSizeTotal();\n // System.out.println(\"Cells: \"+percent+ \" Unvisited:\"+count);\n //if(count>0)\n // System.out.println(\"Percent unvisited: \"+((count*100)/percent)+\"%\");\n }", "private static int getNumTotalEdges(){\r\n\t\t//return getMutMap().keySet().size();\r\n\t\treturn numCols+1;\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tSystem.out.print(\"Enter a file name: \");\n\t\tScanner fileName = new Scanner(System.in);\n\t\tjava.io.File file = new java.io.File(fileName.nextLine());\n\n\t\t// Test if file exists\n\t\tif (!file.exists()) {\n\t\t\tSystem.out.println(\"The file \\\"\" + file + \"\\\" does not exist.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\t// Crate a Scanner for the file\n\t\tScanner input = new Scanner(file);\n\t\tint NUMBER_OF_VERTICES = input.nextInt();\n\n\t\t// Create a list of AbstractGraph.Edge objects\n\t\tArrayList<AbstractGraph.Edge> edgeList = new ArrayList<>();\n\n\t\t// Create an array of vertices\n\t\tString[] vertices = new String[NUMBER_OF_VERTICES];\n\n\t\t// Read data from file\n\t\tinput.nextLine();\n\t\tfor (int j = 0; j < NUMBER_OF_VERTICES; j++) {\n\t\t\tString s = input.nextLine();\n\t\t\tString[] line = s.split(\"[\\\\s+]\");\n\t\t\tString u = line[0];\n\t\t\tvertices[j] = u; // Add vertex\n\n\t\t\t// Add edges for vertex u\n\t\t\tfor (int i = 1; i < line.length; i++) {\n\t\t\t\tedgeList.add(new AbstractGraph.Edge(Integer.parseInt(u), \n\t\t\t\t\tInteger.parseInt(line[i])));\n\t\t\t}\t\n\t\t}\n\n\t\t// Crate a graph\n\t\tGraph<String> graph = new UnweightedGraph<>(\n\t\t\tArrays.asList(vertices), edgeList);\n\n\t\t// Display the number of vertices\n\t\tSystem.out.println(\"The number of vertices is \" + graph.getSize());\n\n\t\t// Display edges\n\t\tfor (int u = 0; u < NUMBER_OF_VERTICES; u++) {\n\t\t\tSystem.out.print(\"Vertex \" + graph.getVertex(u) + \":\");\n\t\t\tfor (Integer e : graph.getNeighbors(u))\n\t\t\t\tSystem.out.print(\" (\" + u + \", \" + e + \")\");\n\t\t\tSystem.out.println();\n\t\t}\t\t\n\n\t\t// Obtain an instance tree of AbstractGraph.Tree\n\t\tAbstractGraph.Tree tree = graph.dfs(0);\n\n\t\t// Test if graph is connected and print results\n\t\tSystem.out.println(\"The graph is \" +\n\t\t(tree.getNumberOfVerticesFound() != graph.getSize() ? \n\t\t\t\"not \" : \"\") + \"connected\");\n\n\t\t// Close the file\n\t\tinput.close();\n\t}", "@Test\r\n public void testGetVertices() {\r\n System.out.println(\"getVertices\");\r\n Polygon instance = new Polygon();\r\n int expResult = 0;\r\n int result = instance.getVertices().size();\r\n assertEquals(expResult, result);\r\n }", "public static void main(String[] args) {\n\n int vertices = 5;\n ArrayList<Edge> graph = new ArrayList<>();\n graph.add(new Edge(0, 1, 2));\n graph.add(new Edge(0, 3, 6));\n graph.add(new Edge(1, 3, 8));\n graph.add(new Edge(1, 2, 3));\n graph.add(new Edge(1, 4, 5));\n graph.add(new Edge(2, 4, 7));\n\n kruskalAlgo(graph, vertices);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint numberOfVertices = sc.nextInt();\n\t\tint numberOfEdges = sc.nextInt();\n\t\tint adjacencyMatrix[][] = new int[numberOfVertices][numberOfVertices];\n\t\tfor(int i=0;i<numberOfEdges;i++) {\n\t\t\tint fv = sc.nextInt();\n\t\t\tint sv = sc.nextInt();\n\t\t\tadjacencyMatrix[fv][sv] = 1;\n\t\t\tadjacencyMatrix[sv][fv] = 1;\n\t\t}\n\t\tBFS(adjacencyMatrix);\n//\t\tbfsTraversal(edges);\n\t}", "public int getVertices() {\n return mPolygonShapeSpec.getNumVertex();\n }", "void add(int vertex);", "public int order()\n {\n return numVertices;\n }", "public int numPartitions() {\n\t\treturn vertex_sets.size();\n\t}", "public int getNormalVerticesCount() {\n\t\treturn this.normalVertices.size();\n\t}", "public int colorVertices();", "public CPP(int vertices) {\t\n\t\tif( (N = vertices) <= 0 ) throw new Error(\"Graph is empty\");\n\t\tdelta = new int[N];\n\t\tdefined = new boolean[N][N];\n\t\tlabel = new Vector[N][N];\n\t\tc = new float[N][N];\n\t\tf = new int[N][N];\n\t\tarcs = new int[N][N];\n\t\tcheapestLabel = new Integer[N][N];\n\t\tpath = new int[N][N];\n\t\tbasicCost = 0;\n\t}", "public int getNumTriangles() {\n return numTriangles;\n }", "public int getVertexNumber() {\n\t\treturn _vertexId;\n\t}", "public void printVertices() {\r\n\t\tfor (int i = 0; i < vertices.size(); i++)\r\n\t\t\tSystem.out.print(vertices.get(i).label);\r\n\t}", "public static void main(final String[] args) {\n Scanner scan = new Scanner(System.in);\n int vertices = Integer.parseInt(scan.nextLine());\n int edges = Integer.parseInt(scan.nextLine());\n EdgeWeightedGraph eg = new EdgeWeightedGraph(vertices);\n while (edges > 0) {\n String[] tokens = scan.nextLine().split(\" \");\n int a = Integer.parseInt(tokens[0]);\n int b = Integer.parseInt(tokens[1]);\n double weight = Double.parseDouble(tokens[2]);\n Edge e = new Edge(a, b, weight);\n eg.addEdge(e);\n edges--;\n }\n LazyPrimMST l = new LazyPrimMST(eg);\n System.out.printf(\"%.5f\\n\", l.weight());\n }", "private void createWVertices() {\n\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\tvertices.add(new Vertex('w', this.countWID++));\n\t\t}\n\t}", "public void newVertex(String name)\r\n\t{\r\n\t\t// new vertex initialized here\r\n\t\tmyGraph[graphSize] = new Vertex();\r\n\t\tmyGraph[graphSize].name = name;\r\n\t\tmyGraph[graphSize].adjVertexHead = null;\r\n\t\t// maintain the size counter\r\n\t\tgraphSize++;\r\n\t}", "public int size()\n {\n return numEdges;\n }", "public static void main(String args[]) {\n Instant start = Instant.now();\n\n int Vertex = 9; // 0 through 8\n NetworkGraph myGraph = new NetworkGraph(Vertex);\n addVertexEdge(myGraph, 0, 3);\n addVertexEdge(myGraph, 0, 4);\n addVertexEdge(myGraph, 0, 7);\n addVertexEdge(myGraph, 1, 2);\n addVertexEdge(myGraph, 1, 3);\n addVertexEdge(myGraph, 1, 5);\n addVertexEdge(myGraph, 1, 8);\n addVertexEdge(myGraph, 5, 2);\n addVertexEdge(myGraph, 6, 7);\n addVertexEdge(myGraph, 6, 8);\n addVertexEdge(myGraph, 6, 0);\n\n // Output graph\n outputGraph(myGraph);\n\n // Save current date-time in UTC\n Instant end = Instant.now();\n System.out.println(\"\\nTime elapsed: \" + Duration.between(start, end).toMillis() + \" milliseconds.\");\n }", "public static void main(String args[])\n{\n\t// Create a graph\n\tGraph newGraph = new Graph(5);\n\t\n\t// Add each of the edges\n\tnewGraph.addEdge(0, 1);\n\tnewGraph.addEdge(0, 2);\n\tnewGraph.addEdge(1, 2);\n\tnewGraph.addEdge(2, 0);\n\tnewGraph.addEdge(2, 3);\n\t\n\t\n}", "public void setNumTriangles(final int numTriangles) {\n this.numTriangles = numTriangles;\n }", "@Test\r\n public void testNumEdges() {\r\n System.out.println(\"numEdges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n int expResult = 0;\r\n int result = instance.numEdges();\r\n assertEquals(expResult, result);\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1Element, v2Element, edgeElement);\r\n\r\n expResult = 1;\r\n result = instance.numEdges();\r\n assertEquals(expResult, result);\r\n }", "public void addVertex();", "public static void main(String[] args) {\n final GraphNode root=new GraphBuilderConcurentV0().build(XOField.Figure.X,new XOField(),0);\n\n System.out.println(root.getNode());\n// GraphHelper.show(root,0);\n System.out.println(GraphHelper.countNodes(root));\n }", "Vertex(int n) {\n name = n;\n duration = 0;\n LC = 0;\n EC = 0;\n slack = 0;\n color = null;\n top = 0;\n discoverytime = 0;\n order = 0;\n Adj = new LinkedList<>();\n }", "@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}", "@Override\n public long numParams(boolean backwards) {\n long numParams = super.numParams(backwards);\n for (GraphVertex vertex : getVertices()) {\n numParams += vertex.numParams();\n }\n return numParams;\n }" ]
[ "0.79435074", "0.7882393", "0.7882393", "0.78347355", "0.7817218", "0.77495426", "0.76550376", "0.7583614", "0.75277376", "0.7413618", "0.7398274", "0.73678845", "0.72019535", "0.7180756", "0.7179607", "0.7070744", "0.70427054", "0.69671124", "0.69639695", "0.68351865", "0.68305033", "0.6815524", "0.680281", "0.6792273", "0.67550236", "0.6718392", "0.66821814", "0.66574854", "0.65523165", "0.6536897", "0.65083826", "0.6453096", "0.6442384", "0.6390767", "0.6370331", "0.63639456", "0.6358528", "0.6347148", "0.6345408", "0.6315194", "0.63115245", "0.6255573", "0.6239872", "0.62376714", "0.6237284", "0.6223376", "0.6221941", "0.6208161", "0.61695755", "0.616038", "0.6160259", "0.6159643", "0.6100148", "0.609865", "0.60915697", "0.60469025", "0.6029449", "0.59865725", "0.59853077", "0.59818834", "0.5973624", "0.59715456", "0.5965742", "0.59299594", "0.5920234", "0.5918037", "0.58875227", "0.58857626", "0.58721554", "0.5844166", "0.58316964", "0.5827077", "0.5824931", "0.5805665", "0.58054245", "0.57778794", "0.5777765", "0.5775851", "0.5768821", "0.57603246", "0.57536316", "0.57521003", "0.574559", "0.57357824", "0.572914", "0.57207364", "0.57092106", "0.5696724", "0.5695005", "0.5693615", "0.5689673", "0.5685677", "0.5682977", "0.5681795", "0.5675399", "0.56737864", "0.56703746", "0.5666478", "0.56643564", "0.56561995", "0.56491476" ]
0.0
-1
Populate the neighbor field for each vertex if there are no "e" lines in the graph file
public static void populateNeighbors(Vertex[] vertices) { for(int i = 1; i < vertices.length; i++) { vertices[i].addNeighbor(vertices[i].getPredecessor()); vertices[vertices[i].getPredecessor()].addNeighbor(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addNeighborEdge(Edge e) {\n\t\t\t_neighborEdges.put(e,false);\n\t\t}", "public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}", "public void fillEdges() {\n\t\tfor (int y = 0; y < mapSize; y++) {\n\t\t\tfor (int x = 0; x < mapSize; x++) {\n\t\t\t\tCoordinates coordinates = new Coordinates(x, y);\n\t\t\t\tint vertexSrc = coordinateToVertex(coordinates);\n\n\t\t\t\tif (deletedVertices.contains(vertexSrc)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tDirection[] directions = Direction.values();\n\n\t\t\t\tfor (Direction direction : directions) {\n\t\t\t\t\tCoordinates destCoordinates = new Coordinates(x, y);\n\n\t\t\t\t\tdestCoordinates = destCoordinates.addCoordinates(direction.coordinates());\n\n\t\t\t\t\tif (destCoordinates.areCorrect(mapSize)) {\n\t\t\t\t\t\tint vertexDest = coordinateToVertex(destCoordinates);\n\t\t\t\t\t\tif (!deletedVertices.contains(vertexDest)) {\n\t\t\t\t\t\t\taddEdge(vertexSrc, vertexDest);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void createEdgeTables() {\n\t\tString line = null;\n\t\tString[] tmpArray;\n\n\t\tfor (int i = 0; i < Data.AmountEdges; i++) {\n\t\t\tline = Fileread.getLine();\n\t\t\ttmpArray = line.split(\" \");\n\t\t\tData.source[i] = Integer.parseInt(tmpArray[0]);\n\t\t\tData.target[i] = Integer.parseInt(tmpArray[1]);\n\t\t\tData.weight[i] = Integer.parseInt(tmpArray[2]);\n\t\t}\n\t}", "private void initializeEdges() {\n for (NasmInst inst : nasm.listeInst) {\n if (inst.source == null || inst.destination == null)\n return;\n Node from = inst2Node.get(label2Inst.get(inst.source.toString()));\n Node to = inst2Node.get(label2Inst.get(inst.destination.toString()));\n if (from == null || to == null)\n return;\n graph.addEdge(from, to);\n }\n }", "public Graph createGraph() {\n String fileName;\n// fileName =\"./428333.edges\";\n String line;\n Graph g = new Graph();\n// List<String> vertexNames = new ArrayList<>();\n// try\n// {\n// BufferedReader in=new BufferedReader(new FileReader(fileName));\n// line=in.readLine();\n// while (line!=null) {\n////\t\t\t\tSystem.out.println(line);\n// String src = line.split(\" \")[0];\n// String dst = line.split(\" \")[1];\n//// vertexNames.add(src);\n//// vertexNames.add(dst);\n//// System.out.println(src+\" \"+dst);\n// g.addEdge(src, dst, 1);\n// line=in.readLine();\n// }\n// in.close();\n// } catch (Exception e) {\n//\t\t\te.printStackTrace();\n// }\n\n fileName=\"./788813.edges\";\n// List<String> vertexNames = new ArrayList<>();\n try\n {\n BufferedReader in=new BufferedReader(new FileReader(fileName));\n line=in.readLine();\n while (line!=null) {\n//\t\t\t\tSystem.out.println(line);\n String src = line.split(\" \")[0];\n String dst = line.split(\" \")[1];\n g.addEdge(src, dst, 1);\n line=in.readLine();\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n// Graph g = new Graph(new String[]{\"v0\", \"v1\", \"v2\", \"v3\", \"v4\", \"v5\", \"v6\", \"v7\", \"v8\"});\n// // Add the required edges.\n// g.addEdge(\"v0\", \"v1\", 4); g.addEdge(\"v0\", \"v7\", 8);\n// g.addEdge(\"v1\", \"v2\", 8); g.addEdge(\"v1\", \"v7\", 11); g.addEdge(\"v2\", \"v1\", 8);\n// g.addEdge(\"v2\", \"v8\", 2); g.addEdge(\"v2\", \"v5\", 4); g.addEdge(\"v2\", \"v3\", 7);\n// g.addEdge(\"v3\", \"v2\", 7); g.addEdge(\"v3\", \"v5\", 14); g.addEdge(\"v3\", \"v4\", 9);\n// g.addEdge(\"v4\", \"v3\", 9); g.addEdge(\"v4\", \"v5\", 10);\n// g.addEdge(\"v5\", \"v4\", 10); g.addEdge(\"v5\", \"v3\", 9); g.addEdge(\"v5\", \"v2\", 4);\n// g.addEdge(\"v5\", \"v6\", 2);\n// g.addEdge(\"v6\", \"v7\", 1); g.addEdge(\"v6\", \"v8\", 6); g.addEdge(\"v6\", \"v5\", 2);\n// g.addEdge(\"v7\", \"v0\", 8); g.addEdge(\"v7\", \"v8\", 7); g.addEdge(\"v7\", \"v1\", 11);\n// g.addEdge(\"v7\", \"v6\", 1);\n// g.addEdge(\"v8\", \"v2\", 2); g.addEdge(\"v8\", \"v7\", 7); g.addEdge(\"v8\", \"v6\", 6);\n\n//\n return g;\n }", "private static void makeEdgesSet() {\n edges = new Edge[e];\r\n int k = 0;\r\n for (int i = 0; i < n; i++) {\r\n for (int j = 0; j < i; j++) {\r\n if (g[i][j] != 0)\r\n edges[k++] = new Edge(j, i, g[i][j]);\r\n }\r\n }\r\n }", "private void createEdges() throws IOException {\r\n\t\tString line;\r\n\t\tString fromVertex=null;\r\n\t\tString toVertex=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\ttoVertex= line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"is_a:\"))\r\n\t\t\t\t{\r\n\t\t\t\tfromVertex = nocomment(line.substring(colon+1));\r\n\t\t\t\t//System.out.println(fromVertex+\" to be connected to: \"+toVertex);\r\n\t\t\t\tTerm fromNode = terms.get(fromVertex);\r\n\t\t\t\tTerm toNode = terms.get(toVertex);\r\n\t\t\t\tif (fromNode.namespace.equals(\"molecular_function\") && toNode.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse if (fromNode.namespace.equals(\"biological_process\") && toNode.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addEdge(fromNode, toNode);\r\n\t\t\t\t} \r\n\t\t\t\telse if (fromNode.namespace.equals(\"cellular_component\") && toNode.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"FAILED TO ADD TO DAG, not belonging to the same NAMESPACE\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException {\n File file = new File(args[0]);\r\n //FileOutputStream f = new FileOutputStream(\"prat_dfs_data2.txt\");\r\n //System.setOut(new PrintStream(f));\r\n BufferedReader reader = new BufferedReader(new FileReader(file));\r\n String line;\r\n line = reader.readLine();\r\n int nodecount = 0;\r\n HashMap <String , Integer> nodeMap = new HashMap <String , Integer>(); \r\n while ((line = reader.readLine()) != null ) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n if (!nodeMap.containsKey(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"))){\r\n nodeMap.put(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"), nodecount);\r\n nodecount++;\r\n }\r\n }\r\n reader.close();\r\n Vertex adjList[] = new Vertex[nodecount];\r\n Vertex sortVer[] = new Vertex[nodecount];\r\n for(int it = 0; it < nodecount; it++){\r\n adjList[it] = new Vertex(it);\r\n }\r\n nodeMap.forEach((k, v) -> adjList[v].val = k);\r\n File file2 = new File(args[1]);\r\n BufferedReader reader2 = new BufferedReader(new FileReader(file2));\r\n line = reader2.readLine();\r\n while ((line = reader2.readLine()) !=null) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n String source = data[0].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n String target = data[1].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n\r\n int weight = Integer.parseInt(data[2]);\r\n Vertex current = adjList[nodeMap.get(source)];\r\n Vertex newbie = new Vertex(nodeMap.get(target));\r\n current.countN++;\r\n current.co_occur += weight;\r\n if (adjList[nodeMap.get(source)].next == null){\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n else{\r\n current.next.prev = newbie;\r\n newbie.next = current.next;\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n Vertex current1 = adjList[nodeMap.get(target)];\r\n Vertex newbie1 = new Vertex(nodeMap.get(source));\r\n current1.co_occur += weight;\r\n current1.countN++;\r\n if (current1.next == null){\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n else{\r\n current1.next.prev = newbie1;\r\n newbie1.next = current1.next;\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n }\r\n reader2.close();\r\n \r\n for(int it = 0; it < nodecount; it++){\r\n sortVer[it] = new Vertex(adjList[it].id);\r\n sortVer[it].val = adjList[it].val;\r\n sortVer[it].co_occur = adjList[it].co_occur;\r\n }\r\n if (args[2].equals(\"average\")){\r\n double countdeg = 0;\r\n for(int it = 0; it<nodecount; it++){\r\n countdeg+= (double) adjList[it].countN;\r\n }\r\n countdeg = countdeg / (double) (nodecount);\r\n System.out.printf(\"%.2f\", countdeg);\r\n System.out.println();\r\n //long toc= System.nanoTime();\r\n //System.out.println((toc- startTime)/1000000000.0);\r\n }\r\n \r\n if(args[2].equals(\"rank\")){\r\n Graph.mergesort(sortVer, 0, nodecount-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n System.out.print(sortVer[0].val);\r\n for(int kk=1; kk<nodecount; kk++){\r\n System.out.print(\",\" + sortVer[kk].val.toString());\r\n }\r\n System.out.println();\r\n }\r\n if(args[2].equals(\"independent_storylines_dfs\")){\r\n boolean visited[] = new boolean[nodecount];\r\n int ind = 0;\r\n ArrayList<ArrayList<Vertex>> comps = new ArrayList<ArrayList<Vertex>>();\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n visited[it1] = false;\r\n }\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n if (visited[it1] == false){\r\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\r\n Graph.dfs(it1, visited, ind, adjList, temp);\r\n ind++;\r\n Graph.mergesort2(temp, 0, temp.size()-1);\r\n comps.add(temp);\r\n }\r\n }\r\n Graph.mergesort3(comps, 0, comps.size()-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n for(int a1 = 0; a1 < ind; a1++){\r\n System.out.print(comps.get(a1).get(0).val);\r\n for(int j1 = 1; j1<comps.get(a1).size(); j1++){\r\n System.out.print(\",\" + comps.get(a1).get(j1).val);\r\n }\r\n System.out.println();\r\n }\r\n }\r\n }", "public void assignNeighbors(Vertex v) {\r\n\t\t\r\n\t\tif (v.y != 0) {\r\n\t\t\tv.neighbors.add(graph[v.x][v.y - 1]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.y != (mazeSize - 1)) {\r\n\t\t\tv.neighbors.add(graph[v.x][v.y + 1]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.x != 0) {\r\n\t\t\tv.neighbors.add(graph[v.x - 1][v.y]);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif (v.x != mazeSize - 1) {\r\n\t\t\tv.neighbors.add(graph[v.x + 1][v.y]);\r\n\t\t}\r\n\t}", "public Graph() // constructor\n{\n vertexList = new Vertex[MAX_VERTS];\n // adjacency matrix\n adjMat = new int[MAX_VERTS][MAX_VERTS];\n nVerts = 0;\n for (int j = 0; j < MAX_VERTS; j++) // set adjacency\n for (int k = 0; k < MAX_VERTS; k++) // matrix to 0\n adjMat[j][k] = INFINITY;\n}", "public void readEdges(){\n for ( j= 0;j<edgesNum;j++){\n lineElements = lines.get(j+2).split(\" \");\n // System.out.println(lineElements[0]+\" \"+lineElements[1]);\n int start = Integer.parseInt(lineElements[0])-1;\n int end = Integer.parseInt(lineElements[1])-1;\n vertices.get(start).addAdj(vertices.get(end));\n vertices.get(end).addAdj(vertices.get(start));\n }\n\n // Read the edges for AI agents\n\n for ( j= 0;j<edgesNum;j++){\n lineElements = lines.get(j+2).split(\" \");\n // System.out.println(lineElements[0]+\" \"+lineElements[1]);\n int start = Integer.parseInt(lineElements[0]);\n int end = Integer.parseInt(lineElements[1]);\n allSCountries.get(start).adj.add(end);\n allSCountries.get(end).adj.add(start);\n }\n }", "private static void readGraph() throws FileNotFoundException{ \n\n @SuppressWarnings(\"resource\")\n\tScanner scan = new Scanner (new FileReader(file)); \n scan.nextLine();\n\n while (scan.hasNextLine()){\n \n String ligne = scan.nextLine();\n\n if (ligne.equals(\"$\")){break;}\n\n \n String num1=ligne.substring(0,4);\n String num2=ligne.substring(4,ligne.length());\n\n Station st = new Station (num1,num2);\n //remplir les stations voisines ds le tableau Array\n ParisMetro.voisins[Integer.parseInt(st.getStationNum())]= st;\n //remplir les stations \n ParisMetro.stations.add(st);\n \n }\n \n\n while(scan.hasNextLine()){\n String temp = scan.nextLine();\n \n StringTokenizer st; \n\t\t st=new StringTokenizer(temp);\n\t\t \n\t\t int num =Integer.parseInt(st.nextToken());\n\t\t int voisinNum =Integer.parseInt(st.nextToken());\n\t\t int time=Integer.parseInt(st.nextToken());\n\t\t\n \n Chemin che = new Chemin (ParisMetro.voisins[num],ParisMetro.voisins[voisinNum],time);//create a new edge\n \n \n //ajout des chemins\n ParisMetro.chemins.add(che); \n //ajout des sorties stations voisines\n ParisMetro.voisins[num].addSortie(che);\n //ajout des sorties stations voisines\n ParisMetro.voisins[voisinNum].addArrivee(che);\n }\n \n }", "private void loadNeighbours(String file){\n\t\tString neighbour = null;\n\t\ttry{\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tScanner sc = new Scanner(br);\n\t\t\t\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\tString planetName = sc.nextLine();\n\t\t\t\tneighbour = sc.nextLine();\n\t\n\t\t\t\twhile(!(neighbour.equals(\"#\"))){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString split [] = neighbour.split(\",\");\n\t\t\t\t\t\tasignNeighbours(split, planetName);\n\t\t\t\t\t\t\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\tSystem.out.println(\"Data can't be loaded\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\tneighbour = sc.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\tsc.close();\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"File not found: SpaceProgramNeghbours.txt\");\n\t\t}\n\t}", "public void fillAdjacencyMap(ColEdge[] edges) {\n for (ColEdge edge : edges) {\n edgeMake(edge.u - 1, edge.v - 1);\n }\n\n }", "private void addVertexNonEdgeConstraint(){\n for (int i=0; i < g.nonEdges.size(); i++){\n Edge edge = g.nonEdges.get(i);\n int vertex1 = edge.from;\n int vertex2 = edge.to;\n for (int pCount =0; pCount < positionCount-1; pCount++){\n ArrayList<Integer> values = new ArrayList<>();\n values.add((variables[vertex1][pCount] * -1));\n values.add((variables[vertex2][pCount+1] * -1));\n clauses.add(values);\n values = new ArrayList<>();\n values.add((variables[vertex1][pCount+1] * -1));\n values.add((variables[vertex2][pCount] * -1));\n clauses.add(values);\n }\n\n }\n }", "public void addEdge(){\n Node[] newAdjacent = new Node[adjacent.length + 1];\n for (int i = 0; i < adjacent.length; i++) {\n newAdjacent[i] = adjacent[i];\n }\n adjacent = newAdjacent;\n }", "public void readInput(String fileName){\n\n BufferedReader reader;\n try {\n reader = new BufferedReader(new FileReader(fileName));\n String line = reader.readLine(); //read first line\n int numLine =1; //keep track the number of line\n while (line != null) {\n String[] tokens = line.trim().split(\"\\\\s+\"); //split line into token\n if(numLine==1){ //for the first line\n intersection = Integer.parseInt(tokens[0]); //set the number of intersection\n roadways = Integer.parseInt(tokens[1]); // set the number of roadways\n coor = new Coordinates[intersection];\n g = new Graph(intersection);//create a graph\n line = reader.readLine();\n numLine++;\n }\n else if(numLine>1&&numLine<intersection+2){ //for all intersection\n while(numLine>1&&numLine<intersection+2){\n tokens = line.trim().split(\"\\\\s+\");\n coor[Integer.parseInt(tokens[0])] = new Coordinates(Integer.parseInt(tokens[1]),Integer.parseInt(tokens[2])); //add into coor array to keep track the coor of intersection\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine ==intersection+2){ //skip the space line\n line = reader.readLine();\n numLine++;\n while(numLine<roadways+intersection+3){ // for all the roadways, only include the number of roadways mention in the first line\n tokens = line.trim().split(\"\\\\s+\");\n int fst = Integer.parseInt(tokens[0]);\n int snd = Integer.parseInt(tokens[1]);\n g.addEgde(fst,snd,coor[fst].distTo(coor[snd]));\n line = reader.readLine();\n numLine++;\n }\n }\n else if(numLine >= roadways+intersection+3)\n break;\n }\n reader.close();\n } catch (FileNotFoundException e){\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected void processEdge(Edge e) {\n\t}", "private static void parseEdges(File fileNameWithPath) throws Exception{\n\n\t\ttry {\n\n BufferedReader in = new BufferedReader(new FileReader(fileNameWithPath));\n\n\t\t /*\n\t\t * Read the first five lines from file as follows\n\t\t *\n\t\t * NAME: berlin52\n\t\t * COMMENT: 52 locations in Berlin (Groetschel)\n\t\t * DIMENSION: 52\n\t\t * EDGE_WEIGHT_TYPE: EUC_2D\n\t\t * OPTIMAL_COST: 7542\n\t\t * NODE_COORD_SECTION\n\t\t */ \n\t\t for (int i=0;i<6;i++){\n \tString str = in.readLine().trim();\n\t\t\tString[] strArray = str.split(\":\\\\s+\");\n\t\t\tif (strArray[0].equals(\"NAME\")) {\n\t\t\t\tProject.name = strArray[1]; \n\t\t\t} else if (strArray[0].equals(\"DIMENSION\")) {\n\t\t\t\tProject.dimension = new Integer(Integer.parseInt(strArray[1]));\n\t\t\t} else if (strArray[0].equals(\"OPTIMAL_COST\")) {\n\t\t\t\tProject.optimalCost = new Double(Double.parseDouble(strArray[1])); \n\t\t\t} else if (strArray[0].equals(\"EDGE_WEIGHT_TYPE\")) {\n\t\t\t\tProject.edgeWeightType = strArray[1]; }\n\t\t }\n\n\t\t if ( dimension == -1 ){\n\t\t\t throw new Exception(\"ERROR:Failed to read the file contents correctly from \"+fileNameWithPath.getPath());\n\t\t }\n\n\t\t /* read each vertex and its coordinates */\n\t\t Integer[] vertices = new Integer[Project.dimension];\n\t\t Double[] xCord = new Double[Project.dimension];\n\t\t Double[] yCord = new Double[Project.dimension];\n\t\t int vertexCount = 0;\n\n\t\t String str;\n while ((str = in.readLine().trim()) != null) {\n\t\t\tif (str.equals(\"EOF\"))\n\t\t\t\tbreak;\n\n\t\t \tString[] ar=str.split(\"\\\\s+\");\n\n\t\t\tvertices[vertexCount] =new Integer(Integer.parseInt(ar[0]));\n\t\t\txCord[vertexCount] =new Double(Double.parseDouble(ar[1]));\n\t\t\tyCord[vertexCount] =new Double(Double.parseDouble(ar[2]));\n\n\t\t\tvertexCount++;\n\t\t}\n\n in.close();\n\n\t\t/* \n\t\t * Generate the cost matrix between each pair of vertices\n\t\t * as a java HashMap<Integer,HashMap<Integer,Double>>\n\t\t*/\n\t\tfor (int i=0;i<Project.dimension;i++) {\n\t\t\tint vi = vertices[i].intValue();\n\t\t\tfor (int j=i+1;j<Project.dimension;j++) {\n\n\t\t\t\tint vj = vertices[j].intValue();\n\t\t\t\tdouble cost_ij = 0;\n\t\t\t\tif ( vi != vj)\n\t\t\t\t{\n\n\t\t\t\t\tif (Project.edgeWeightType.equals(\"GEO\")){\n\t\t\t\t\t\tint deg;\n\t\t\t\t\t\tdouble min;\n\t\n\t \t\t\t\t\tdeg = (int)(xCord[i].doubleValue());\n\t \t\t\t\t\tmin = xCord[i]- deg; \n\t \t\t\t\t\tdouble latitude_i = PI * (deg + 5.0 * min/ 3.0) / 180.0; \n\t\n\t \t\t\t\t\tdeg = (int)(yCord[i].doubleValue());\n\t \t\t\t\t\tmin = yCord[i]- deg; \n\t \t\t\t\t\tdouble longitude_i = PI * (deg + 5.0 * min/ 3.0) / 180.0; \n\t\n\t \t\t\t\t\tdeg = (int)(xCord[j].doubleValue());\n\t \t\t\t\t\tmin = xCord[j]- deg; \n\t \t\t\t\t\tdouble latitude_j = PI * (deg + 5.0 * min/ 3.0) / 180.0; \n\t\n\t \t\t\t\t\tdeg = (int)(yCord[j].doubleValue());\n\t \t\t\t\t\tmin = yCord[j]- deg; \n\t \t\t\t\t\tdouble longitude_j = PI * (deg + 5.0 * min/ 3.0) / 180.0; \n\t\n\t \t\t\t\t\tdouble q1 = Math.cos( longitude_i - longitude_j ); \n\t \t\t\t\t\tdouble q2 = Math.cos( latitude_i - latitude_j ); \n\t \t\t\t\t\tdouble q3 = Math.cos( latitude_i + latitude_j ); \n\n\t \t\t\t\t\tcost_ij = Math.floor( earthRadius * Math.acos( 0.5*((1.0+q1)*q2 - (1.0-q1)*q3) ) + 1.0);\n\n\t\t\t\t\t} else if (Project.edgeWeightType.equals(\"EUC_2D\")){\n\t\t\t\t\t\tdouble xd = xCord[i]-xCord[j];\n\t\t\t\t\t\tdouble yd = yCord[i]-yCord[j];\n\t\t\t\t\t\t\n\t\t\t\t\t\t//cost_ij = new Double(Math.sqrt( (xd*xd) + (yd*yd))).intValue();\n\t\t\t\t\t\tcost_ij = Math.round(Math.sqrt( (xd*xd) + (yd*yd)));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"ERROR:EDGE_WEIGHT_TYPE of GEO and EUC_WD are implemented , not implemented \"+Project.edgeWeightType);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\n\t\t \t\tif (!sourceGTree.containsKey(vi)){\n\t\t \t\t\tsourceGTree.put(vi,new HashMap<Integer,Double>());\n\t\t \t\t}\n\n\t\t \t\tif (!sourceGTree.containsKey(vj)){\n\t\t \t\t\tsourceGTree.put(vj,new HashMap<Integer,Double>());\n\t\t \t\t}\n\n\t\t \t\tsourceGTree.get(vi).put(vj,cost_ij);\n\t\t \t\tsourceGTree.get(vj).put(vi,cost_ij);\n\n\t\t\t}\n\t\t}\n\n } catch (IOException e) {\n System.out.println(\"ERROR: Failed reading file \" + fileNameWithPath.getPath());\n\t\t throw e;\n }\n\n\t}", "private static void InitializeEdges()\n {\n edges = new ArrayList<Edge>();\n\n for (int i = 0; i < Size -1; i++)\n {\n for (int j = 0; j < Size; j++)\n {\n edges.add(new Edge(cells[i][j].Point, cells[i + 1][ j].Point));\n edges.add(new Edge(cells[j][i].Point, cells[j][ i + 1].Point));\n }\n }\n\n for (Edge e : edges)\n {\n if ((e.A.X - e.B.X) == -1)\n {\n e.Direction = Edge.EdgeDirection.Vertical;\n }\n else\n {\n e.Direction = Edge.EdgeDirection.Horizontal;\n }\n }\n }", "public void addEdgeFrom(char v, int e) {\r\n\t\t// does an edge from v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (currentVertex.inList.get(i).vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e; \r\n\t\t\t\tfindNeighbor(findVertex(v).outList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.inList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.outList.add(current);\r\n\r\n\t\tedges++;\r\n\t}", "Graph(List<Edge> edges) {\n\n //one pass to find all vertices\n // this step avoid add isolated coordinates to the graph\n for (Edge e : edges) {\n if (!graph.containsKey(e.startNode)) {\n graph.put(e.startNode, new Node(e.startNode));\n }\n if (!graph.containsKey(e.endNode)) {\n graph.put(e.endNode, new Node(e.endNode));\n }\n }\n\n //another pass to set neighbouring vertices\n for (Edge e : edges) {\n graph.get(e.startNode).neighbours.put(graph.get(e.endNode), e.weight);\n //graph.get(e.v2).neighbours.put(graph.get(e.v1), e.dist); // also do this for an undirected graph\n }\n }", "public static void main(String[] args) throws IOException{\n\t\tintersections = new HashMap<Integer,LatLong>();\n\t\t/*nodeIDs = new ArrayList<Integer>();\n\t\tnodeCoordinates = new ArrayList<LatLong>();*/\n\t\t\n\t\tString intersectionsFileName = \"data/CENTRELINE_INTERSECTION_WGS84.csv\";\n\t\tScanner input = new Scanner(new File(intersectionsFileName));\n\t\t//System.out.println(\"intersection\");\n\t\t//System.out.println(input.hasNextLine());\n\t\tString[] throwout = input.nextLine().split(\",\");\n\t\twhile (input.hasNextLine()){\n\t\t\tString[] line = input.nextLine().split(\",\");\n\t\t\tLatLong l = new LatLong(Double.parseDouble(line[16]), Double.parseDouble(line[15]));\n\t\t\t\n\t\t\tInteger data = Integer.parseInt(line[0]);\n\t\t\t\n\t\t\tintersections.put(data,l);\n\t\t\t\n\t\t\t/*nodeIDs.add(data);\n\t\t\tnodeCoordinates.add(l);*/\n\t\t\t\n\t\t}\n\t\tinput.close();\n\t\t\n\t\t\n\t\t//Create graph based on centreline data, which tells us which nodes/intersections are connected\n\t\tG = new Graph();\n\t\tString centrelineFileName = \"data/CENTRELINE_WGS84.csv\";\n\t\tinput = new Scanner(new File(centrelineFileName));\n\n\t\tthrowout = input.nextLine().split(\",\");\n\t\twhile (input.hasNextLine()){\n\t\t\tString[] line = input.nextLine().split(\",\");\n\t\t\tInteger fnode = Integer.parseInt(line[11]);\n\t\t\tInteger tnode = Integer.parseInt(line[12]);\n\t\t\t\n\t\t\t//Look up corresponding lat/long points\n\t\t\tdouble fnodeLat = intersections.get(fnode).getLatitude();\n\t\t\tdouble fnodeLon = intersections.get(fnode).getLongitude();\n\t\t\tdouble tnodeLat = intersections.get(tnode).getLatitude();\n\t\t\tdouble tnodeLon = intersections.get(tnode).getLongitude();\n\t\t\t\n\t\t\tG.addEdge(fnode, fnodeLat, fnodeLon, tnode, tnodeLat, tnodeLon);\n\t\t}\n\t\tinput.close();\n\t\t\n\t\t\n\t\t//Import bike parking on street\n\t\tbikeParkingCoordinates = new ArrayList<LatLong>();\n\t\tbikeParkingNodeIDs = new ArrayList<Integer>();\n\t\tbikeNodes = new HashMap<Integer, LatLong>();\n\t\tString bikeParkingOnStreetFileName = \"data/BICYCLE_PARKING_ON_STREET_WGS84.csv\";\n\t\tinput = new Scanner(new File(bikeParkingOnStreetFileName));\n\t\tSystem.out.println(\"hello\" + \"\\n\" + \"Testing Client.java\" +\"\\n\");\n\t\t//System.out.println(input.hasNextLine());\n\t\tthrowout = input.nextLine().split(\",\");\n\t\t\n\t\twhile (input.hasNextLine()){\n\t\t\tString[] line = input.nextLine().split(\",\");\n\t\t\tLatLong l = new LatLong(Double.parseDouble(line[6]), Double.parseDouble(line[5]));\n\t\t\t\n\t\t\t//Find intersection closest to bike parking\n\t\t\tInteger bpNodeID = PathCalculation.closestIntersection(l, intersections);\n\t\t\tbikeParkingNodeIDs.add(bpNodeID);\n\t\t\tbikeParkingCoordinates.add(intersections.get(bpNodeID));\n\t\t\t\n\t\t\t//System.out.println(l + \" \" + intersections.get(bpNodeID));\n\t\t\t\n\t\t\tbikeNodes.put(bpNodeID, intersections.get(bpNodeID));\n\t\t\t\n\t\t\t\n\t\t}\n\t\tinput.close();\n\t\t\n\t\t\n\t\t\n\t\t/*for (Integer e : bikeNodes.keySet()){\n\t\t\tSystem.out.println(e);\n\t\t}*/\n\t\t\n\t\t\n\t\t//Ask user for beginning and end address\n\t\tString userString = null; //for storage of user's desired input\n\t\t\n\t\tScanner s = new Scanner(new File(\"data/testData.txt\")); //Data file with addresses, source and destination\n\t\tint n = 1; // Test case number\n\t\twhile(s.hasNextLine()){\n\t\t\tBoolean INvalidinput = true; // used for while loop, loop while the input is not good\n\t\t\t\n\t\t\tLatLong StartCoords = new LatLong(0,0);\n\t\t\tLatLong EndCoords = new LatLong(0,0);\n\t\t\tAddresses.init();\n\t\t\twhile(INvalidinput){\n\t\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Testing case: \" + n);\n\t\t\t\tuserString = s.nextLine();\n\t\t\t\tStartCoords = Addresses.getLatLong(userString);\n\t\t\t\tINvalidinput = false; // essentially if it GETS one it's valid. OTHERWISE it will throw an exception\n\t\t\t\t}\n\t\t\t\tcatch(InvalidStreetException | NumberFormatException e){\n\t\t\t\t\tSystem.out.println(\"INVALID STREET: \" + userString + \"\\n\");\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"PLEASE ENTER: StreetNumber,StreetName\" + \"\\n\");\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t\tcatch(StringIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"PLEASE ENTER: StreetNumber,StreetName\" + \"\\n\");\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tINvalidinput = true;\n\t\t\twhile(INvalidinput){\n\t\t\t\ttry{\n\t\t\t\tuserString = s.nextLine();\n\t\t\t\tEndCoords = Addresses.getLatLong(userString);\n\t\t\t\tINvalidinput = false; // essentially if it GETS one it's valid. OTHERWISE it will throw an exception\n\t\t\t\t}\n\t\t\t\tcatch(InvalidStreetException | NumberFormatException e){\n\t\t\t\t\tSystem.out.println(\"INVALID STREET\" + \"\\n\");\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"PLEASE ENTER: StreetNumber,StreetName\" + \"\\n\");\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t\tcatch(StringIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"PLEASE ENTER: StreetNumber,StreetName\" + \"\\n\");\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t//Call path calculation --> should return list of lat/long points given two lat/long points and a graph\n\t\t\t\n\t\t/*\tInteger source = 30075902;\n\t\t\tInteger destination = 13469577;\n\t\t*/\n\t\t\tInteger source = PathCalculation.closestIntersection(StartCoords, intersections);\n\t\t\tInteger destination = PathCalculation.closestIntersection(EndCoords, intersections);\n\t\t\t\n\t\t\t/*Integer source = nodeIDs.get(nodeCoordinates.indexOf(StartCoords));\n\t\t\tInteger destination = nodeIDs.get(nodeCoordinates.indexOf(EndCoords));*/\n\t\t\t\n\t\t\t//Determine bike parking location by finding shortest path\n\t\t\t\t\t//Integer chosenBikeParkingNodeID = PathCalculation.closestBikeParking(destination, bikeParkingLocations);\n\t\t\t\n\t\t\tBreadthFirstSearch bfsDestinationToBikeParking = new BreadthFirstSearch(G, destination);\n\t\t\tInteger closestDistance = Integer.MAX_VALUE;\n\t\t\tInteger closestBPNodeID = 0;\n\t\t\t\n\t\t\tfor (Integer bpNodeID : bikeNodes.keySet()){\n\t\t\t\tInteger distance = bfsDestinationToBikeParking.distTo(bpNodeID);\n\t\t\t\tif (distance < closestDistance){\n\t\t\t\t\tclosestDistance = distance;\n\t\t\t\t\tclosestBPNodeID = bpNodeID;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/*for (Integer e : bfsDestinationToBikeParking.getDistTo().keySet()){\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t\t\t*/\n\t\t\t//Get path from bpNodeID to destination in array list\n\t\t\tArrayList<Integer> destToBP = bfsDestinationToBikeParking.pathToArray(closestBPNodeID); //path from dest --> BP\n\t\t\t\n\t\t\t//Get path from source to bpNodeID in array list\n\t\t\tBreadthFirstSearch bfsSourceToBikeParking = new BreadthFirstSearch(G, source);\n\t\t\tArrayList<Integer> sourceToBP = bfsSourceToBikeParking.pathToArray(closestBPNodeID);\n\t\t\t//create final path in nodeId's\n\t\t\tArrayList<Integer> finalPath = new ArrayList<Integer>();\n\t\t\t\n\t\t\tfor (int i = 0; i < sourceToBP.size(); i++){\n\t\t\t\tfinalPath.add(sourceToBP.get(i));\n\t\t\t}\n\t\t\t//want path from BP to dest, so reverse array list:\n\t\t\tfor (int i = destToBP.size() - 1; i < 0; i++){\n\t\t\t\tfinalPath.add(destToBP.get(i));\n\t\t\t}\t\t\n\t\t\t\n\t\t\t//create array list of lat/long points:\n\t\t\tArrayList<LatLong> finalLatLongPath = new ArrayList<LatLong>();\n\t\t\tfor (int i = 0; i < finalPath.size(); i++){\n\t\t\t\tfinalLatLongPath.add(intersections.get(finalPath.get(i)));\n\t\t\t}\n\t\t\t\n\t\t\tfor (LatLong e : finalLatLongPath){\n\t\t\t\t//System.out.print(e + \", \");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Test case \" +n + \" passed.\" + \"\\n\");\n\t\t\tn++;\n\t\t}\n\t\t\n//\t\tDesktop d = Desktop.getDesktop();\n//\t\ttry {\n//\t\t\td.browse(new URI(\"https://jsfiddle.net/rmLtu9t7/6/\"));\n//\t\t} catch (URISyntaxException e1) {\n//\t\t\tSystem.out.println(\"Invalid Website URL\");\n//\t\t}\n\t}", "public void fill() {\r\n\t\tint vertexNumber = 1;\r\n\r\n\t\t\r\n\t\tfor (int i = 0; i < mazeSize; i++) {\r\n\t\t\tfor (int j = 0; j < mazeSize; j++) {\r\n\t\t\t\tVertex v = new Vertex(j, i);\r\n\t\t\t\tgraph[j][i] = v;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\tfor (int i = 0; i < mazeSize; i++) {\r\n\t\t\tfor (int j = 0; j < mazeSize; j++) {\r\n\t\t\t\tgraph[j][i].label = vertexNumber;\r\n\t\t\t\tgraph[j][i].parent = null;\r\n\t\t\t\tvertexNumber++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\tfor (int i = 0; i < mazeSize; i++) {\r\n\t\t\tfor (int j = 0; j < mazeSize; j++) {\r\n\t\t\t\tassignNeighbors(graph[j][i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tmazeGenerator();\r\n\t}", "Set<Edge> getIncomingNeighborEdges(boolean onUpwardPass) {\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\treturn outgoingEdges;\n\t\t}", "public void neighhbors(Village vertex) {\n\t\tIterable<Edge> neighbors = g.getNeighbors(vertex);\n\t\tSystem.out.println(\"------------\");\n\t\tSystem.out.println(\"vertex: \" + vertex.getName());\n\t\tfor(Edge e : neighbors) {\n\t\t\tSystem.out.println(\"edge: \" + e.getName());\n\t\t\tSystem.out.println(\"transit: \" + e.getTransit() + \" color: \" + e.getColor());\n\t\t}\n\t}", "public void addedge(String fro, String to, int wt) {\r\n Edge e = new Edge(fro, to, wt);\r\n\r\n\r\n Set<String> keys = graph.keySet();\r\n// Object[] arr = keys.toArray();\r\n int f = 0;\r\n if(graph.containsKey(fro)&&graph.containsKey(to))\r\n {\r\n\r\n int[] bb2 = new int[2000];\r\n for(int zz=0;zz<5000;zz++){\r\n\r\n\r\n ArrayList<Integer> abcd = new ArrayList<>();\r\n abcd.add(zz);\r\n\r\n if(zz<2500)\r\n zz++;\r\n else\r\n zz++;\r\n\r\n bb2[zz%500]=zz;\r\n\r\n\r\n int qq= 5000;\r\n\r\n qq--;\r\n\r\n String nnn = \"aaa aa\";\r\n nnn+=\"df\";\r\n\r\n\r\n }\r\n\r\n }\r\n else\r\n {\r\n\r\n\r\n System.out.println(\"some vertices are not present\");\r\n return;\r\n }\r\n for ( String y : keys) {\r\n if (fro.compareTo(y) == 0) {\r\n f = 1;\r\n ArrayList<Edge> ee =graph.get(y);\r\n\r\n\r\n ee.add(e);\r\n }\r\n\r\n\r\n }\r\n if (f == 0) {}\r\n }", "private final void setupSkipEdges() {\n int nSkipVertices = markSkipVertices();\n if (nSkipVertices > 0) {\n connectSkipEdgesAndGroupLevelWEdges();\n }\n }", "GameBoardVertex(GameBoardVertex neighbor){this.neighbors.add(neighbor);}", "void addEdge(Edge e) {\n\t\t\tif(!_edges.containsKey(e.makeKey())) {\n\t\t\t\t_edges.put(e.makeKey(),e);\n\t\t\t\te._one.addNeighborEdge(e);\n\t\t\t\te._two.addNeighborEdge(e);\n\t\t\t}\n\t\t}", "public Vertex[] createGraph(){\n\t\t /* constructing a graph using matrices\n\t\t * If there is a connection between two adjacent LETTERS, the \n\t * cell will contain a num > 1, otherwise a 0. A value of -1 in the\n\t * cell denotes that the cities are not neighbors.\n\t * \n\t * GRAPH (with weights b/w nodes):\n\t * E+---12-------+B--------18-----+F----2---+C\n\t * +\t\t\t\t+\t\t\t\t +\t\t +\n\t * |\t\t\t\t|\t\t\t\t/\t\t |\n\t * |\t\t\t\t|\t\t\t |\t\t |\n\t * |\t\t\t\t|\t\t\t |\t\t 10\n\t * 24\t\t\t\t8\t\t\t 8\t |\n\t * |\t\t\t\t|\t\t\t |\t\t +\n\t * |\t\t\t\t|\t\t\t | H <+---11---I\n\t * |\t\t\t\t|\t\t\t /\n\t * +\t\t\t\t+\t\t\t +\n\t * G+---12----+A(start)+---10--+D\n\t * \n\t * NOTE: I is the only unidirectional node\n\t */\n\t\t\n\t\tint cols = 9;\n\t\tint rows = 9;\n\t\t//adjacency matrix\n\t\t\t\t //A B C D E F G H I\n\t int graph[][] = { {0,8,0,10,0,0,12,0,0}, //A\n\t {8,0,0,0,12,18,0,0,0}, //B\n\t {0,0,0,0,0,2,0,10,0}, //C\n\t {10,0,0,0,0,8,0,0,0}, //D\n\t {0,12,0,0,0,0,24,0,0}, //E\n\t {0,18,2,8,0,0,0,0,0}, //F\n\t {12,0,0,0,0,0,24,0,0}, //G\n\t {0,0,10,0,0,0,0,0,11}, //H\n\t {0,0,0,0,0,0,0,11,0}}; //I\n\t \n\t //initialize stores vertices\n\t Vertex[] vertices = new Vertex[rows]; \n\n\t //Go through each row and collect all [i,col] >= 1 (neighbors)\n\t int weight = 0; //weight of the neighbor\n\t for (int i = 0; i < rows; i++) {\n\t \tVector<Integer> vec = new Vector<Integer>(rows);\n\t\t\tfor (int j = 0; j < cols; j++) {\n\t\t\t\tif (graph[i][j] >= 1) {\n\t\t\t\t\tvec.add(j);\n\t\t\t\t\tweight = j;\n\t\t\t\t}//is a neighbor\n\t\t\t}\n\t\t\tvertices[i] = new Vertex(Vertex.getVertexName(i), vec);\n\t\t\tvertices[i].state = weight;\n\t\t\tvec = null; // Allow garbage collection\n\t\t}\n\t return vertices;\n\t}", "void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.outList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.inList.add(current);\r\n\r\n\t\tedges++;\r\n\t}", "public static strictfp void main(String... args) {\n\t\tArrayList<Vertex> graph = new ArrayList<>();\r\n\t\tHashMap<Character, Vertex> map = new HashMap<>();\r\n\t\t// add vertices\r\n\t\tfor (char c = 'a'; c <= 'i'; c++) {\r\n\t\t\tVertex v = new Vertex(c);\r\n\t\t\tgraph.add(v);\r\n\t\t\tmap.put(c, v);\r\n\t\t}\r\n\t\t// add edges\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tif (v.getNodeId() == 'a') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'b') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t} else if (v.getNodeId() == 'c') {\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'd') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'e') {\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t} else if (v.getNodeId() == 'f') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('d'));\r\n\t\t\t\tv.getAdjacents().add(map.get('e'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t} else if (v.getNodeId() == 'g') {\r\n\t\t\t\tv.getAdjacents().add(map.get('f'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'h') {\r\n\t\t\t\tv.getAdjacents().add(map.get('a'));\r\n\t\t\t\tv.getAdjacents().add(map.get('b'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('i'));\r\n\t\t\t} else if (v.getNodeId() == 'i') {\r\n\t\t\t\tv.getAdjacents().add(map.get('c'));\r\n\t\t\t\tv.getAdjacents().add(map.get('g'));\r\n\t\t\t\tv.getAdjacents().add(map.get('h'));\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t// graph created\r\n\t\t// create disjoint sets\r\n\t\tDisjointSet S = null, V_S = null;\r\n\t\tfor (Vertex v: graph) {\r\n\t\t\tchar c = v.getNodeId();\r\n\t\t\tif (c == 'a' || c == 'b' || c == 'd' || c == 'e') {\r\n\t\t\t\tif (S == null) {\r\n\t\t\t\t\tS = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (V_S == null) {\r\n\t\t\t\t\tV_S = v.getDisjointSet();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tDisjointSet set = DisjointSet.union(V_S, v.getDisjointSet());\r\n\t\t\t\t\tv.setDisjointSet(set);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Disjoint sets created\r\n\t\tfor (Vertex u: graph) {\r\n\t\t\tfor (Vertex v: u.getAdjacents()) {\r\n\t\t\t\tif (DisjointSet.findSet((DisjointSet) u.getDisjointSet()) == \r\n\t\t\t\t DisjointSet.findSet((DisjointSet) v.getDisjointSet())) {\r\n\t\t\t\t\tSystem.out.println(\"The cut respects (\" + u.getNodeId() + \", \" + v.getNodeId() + \").\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public AdjacentListGraph(String[] vertexes) {\n this.vertexes = Arrays.copyOf(vertexes, vertexes.length);\n this.heads = new LinkedList[vertexes.length];\n\n // init the heads to save code: if(heads != null)\n for (int i = 0; i < heads.length; i++) {\n this.heads[i] = new LinkedList<>();\n }\n }", "void parseline(){\n\t\ttry {\n\t\tString currentLine;\n\t\tBufferedReader freader = new BufferedReader(new FileReader(\"C:\\\\wt2g_inlinks.txt\")); //default to dataset\n\t//\tBufferedReader freader = new BufferedReader(new FileReader(\"C:\\\\inlink.txt\")); // Use this for Graph \n\t\tSet<String> ar ;\n\t\t\twhile((currentLine= freader.readLine()) != null){ \n\t\t\t\tSet<String> in_data = new HashSet<>();\n\t\t\t\tStringTokenizer st = new StringTokenizer(currentLine,\" \");\n\t\t\t\tString node = st.nextToken();\n\t\t\t\tif(!inlinks.containsKey(node)){\n\t\t\t\t\tinlinks.put(node, null); // All the nodes are stored in inlinks Map\n\t\t\t\t}\n\t\t\t\t\twhile(st.hasMoreTokens()){\n\t\t\t\t\t\tString edge = st.nextToken();\n\t\t\t\t\t if(!inlinks.containsKey(edge)){\n\t\t\t\t\t \tinlinks.put(edge, null);\n\t\t\t\t\t } \n\t\t\t\t\t if(inlinks.get(node)!=null){\n\t\t\t\t\t \tSet B = inlinks.get(node);\n\t\t\t\t\t \tB.add(edge);\n\t\t\t\t\t \tinlinks.put(node, B);\n\t\t\t\t\t }\n\t\t\t\t\t else{\n\t\t\t\t\t in_data.add(edge);\n\t\t\t\t\t inlinks.put(node, in_data);\n\t\t\t\t\t }\t\t\t\t\t \n\t\t\t\t\t if(!(outlinks.containsKey(edge))){ //Creating the outlinks Map \n\t\t\t\t\t\t Set<String > nd = new HashSet<>();\n\t\t\t\t\t\t nd.add(node);\n\t\t\t\t\t outlinks.put(edge, nd);\n\t\t\t\t\t }\t\n\t\t\t\t\t else{\n\t\t\t\t\t\t ar = outlinks.get(edge);\n\t\t\t\t\t\t ar.add(node);\n\t\t\t\t\t\t outlinks.put(edge, ar);\n\t\t\t\t\t }\n\t\t\t\t\t}\n \t\t\t\t \n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t }\n\t\t\n\t\tSystem.out.println(\"Total Nodes : \" +inlinks.size());\n\t\t\n for(String str : inlinks.keySet()){\n \tSet s1 = inlinks.get(str);\n \tif(s1 != null)\n \tinlinks_count.put(str, s1.size());\n \telse\n \t\tsource++;\n }\n System.out.println(\"Total Source \" +source);\n \n for(String str : outlinks.keySet()){\n \tSet s1 = outlinks.get(str);\n \toutlinks_count.put(str, s1.size());\n }\n\t}", "private void addUndirectedEdge(int i, int j) {\n\t\tNode first = nodeList.get(i-1);\r\n\t\tNode second = nodeList.get(j-1);\r\n//\t\tSystem.out.println(first.name);\r\n//\t\tSystem.out.println(second.name);\r\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\r\n\t\tsecond.getNeighbors().add(first);\r\n\t}", "private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}", "public Collection< VDataT > neighborData( VKeyT key )\n throws NoSuchVertexException;", "public void createEdges() {\n \tfor(String key : ways.keySet()) {\n \t Way way = ways.get(key);\n \t if(way.canDrive()) {\n \t\tArrayList<String> refs = way.getRefs();\n \t\t\t\n \t\tif(refs.size() > 0) {\n \t\t GPSNode prev = (GPSNode) this.getNode(refs.get(0));\n \t\t drivableNodes.add(prev);\n \t\t \n \t\t GPSNode curr = null;\n \t\t for(int i = 1; i <refs.size(); i++) {\n \t\t\tcurr = (GPSNode) this.getNode(refs.get(i));\n \t\t\tif(curr == null || prev == null)\n \t\t\t continue;\n \t\t\telse {\n \t\t\t double distance = calcDistance(curr.getLatitude(), curr.getLongitude(),\n \t\t\t\t prev.getLatitude(), prev.getLongitude());\n\n \t\t\t GraphEdge edge = new GraphEdge(prev, curr, distance, way.id);\n \t\t\t prev.addEdge(edge);\n \t\t\t curr.addEdge(edge);\n \t\t\t \n \t\t\t drivableNodes.add(curr);\n \t\t\t prev = curr;\n \t\t\t}\n \t\t }\t\n \t\t}\n \t }\n \t}\n }", "private void f0() \n\t{\n\t\tint elements = 0;\n\t\t\n\t\tfor(int i=0;i<f2.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t{\n\t\t\t\tif(f2[i][j])\n\t\t\t\t\telements++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(elements > 0){\n\t\t\tneighbors = new Neighbor[elements];\n\t\t\tint cy = (f2.length-1)/2; \n\t\t\tint cx = (f2[0].length-1)/2;\n\t\t\tint index=0;\n\t\t\t\n\t\t\tfor(int i=0;i<f2.length;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<f2[0].length;j++)\n\t\t\t\t{\n\t\t\t\t\tif(f2[i][j]){\n\t\t\t\t\t\tneighbors[index++] = new Neighbor(i-cy,j-cx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//No elements i.e all elements are false in the neighborhood buffer.\n\t\t\tneighbors = null;\n\t\t}\n\t\t\t\n\t}", "public void compute()\n {\n // initialize data structures to some preliminary values\n numberOfNodes = -1;\n ports = new int[1];\n graphTable = new int[1][1];\n\n\n // read the configuration file into the data structures numberOfNodes, ports, and graphTable\n FileInputStream fin = null;\n try\n {\n fin = new FileInputStream(configFile);\n Scanner fileReader = new Scanner(fin);\n\n // read first number: the number of nodes\n numberOfNodes = fileReader.nextInt();\n\n\n // this allows us to initiailze the ports array and the graphTable array\n ports = new int[numberOfNodes];\n graphTable = new int[numberOfNodes][numberOfNodes];\n haveReceivedVector = new boolean[numberOfNodes];\n\n for (int i = 0; i < ports.length; i++) {ports[i] = -1;} // initialize the ports array to -1\n\n for (int i = 0; i < graphTable.length; i++) // initialize the graphTable to all -1's\n {\n for (int j = 0; j < graphTable[0].length; j++)\n {\n graphTable[i][j] = 999;\n }\n }\n\n for (int i = 0; i < haveReceivedVector.length; i++) {haveReceivedVector[i] = false;} // initially we have not received any vectors\n\n // read the rest of the file into the appropriate data structures\n while (fileReader.hasNext())\n {\n fileReader.next(); // ignore the node label. i will work with the node ID\n int neighborID = fileReader.nextInt(); // the id of the neighbor\n int c = fileReader.nextInt(); // the cost of the edge\n // the cost from router #routerID to router #neighborID is c. update the graphTable\n graphTable[routerID][neighborID] = c;\n graphTable[neighborID][routerID] = c;\n\n ports[neighborID] = fileReader.nextInt();\n\n }\n\n // fill in the ports and graphTable with own information\n ports[routerID] = routerPort;\n graphTable[routerID][routerID] = 0; // the distance to myself is 0 \n haveReceivedVector[routerID] = true;\n\n\n }\n catch (Exception e){\n System.out.println(\"Exception reading file: \" + e.getMessage());\n System.exit(0); // exit\n }finally{\n try{if (fin != null){fin.close();}}\n catch (IOException ex){\n System.out.println(\"error closing file.\");\n System.exit(0); // exit\n }\n }\n\n try\n {\n udpSocket = new DatagramSocket(routerPort); // initialize socket\n\n routersIP = InetAddress.getByName(ipAddress);\n\n\n timer = new Timer(true); // initialize timer. make thread daemon\n\n // set timer task to send link state vector to neighbouring nodes every neighborUpdateFreq ms\n StateVectorSender svs = new StateVectorSender(this);\n timer.scheduleAtFixedRate(svs, 0, neighborUpdateFreq);\n\n // set timer task to update node's route information every dijkstraFreq ms\n RouteUpdater ru = new RouteUpdater(this);\n timer.scheduleAtFixedRate(ru, 0, dijkstraFreq);\n\n\n // allocate space for receiving a LinkState message\n byte[] messageSpace = new byte[LinkState.MAX_SIZE];\n DatagramPacket messagePacket = new DatagramPacket(messageSpace, messageSpace.length);\n\n while(true)\n {\n // recieve link state message from neighbor\n udpSocket.receive(messagePacket);\n processUpDateDS(messagePacket); // updates data structures according to received vector and forwards it to neighbors according\n // to life time left algorithm\n }\n\n }\n catch (Exception e)\n {\n System.out.println(\"An unexpected error occured. The program will terminate.\");\n System.exit(0);\n } \n\n }", "public static ArrayList<String> connectors2(Graph g) {\n boolean[] visits = new boolean[g.members.length]; \n for (int i=0;i<=g.members.length-1;i++) {\n \tvisits[i]=false;\n }\n int[] dfsnum = new int[g.members.length];\n int[] back = new int[g.members.length];\n ArrayList<String> answer = new ArrayList<String>();\n\n //driver portion\n for (Person person : g.members) {\n //if it hasn't been visited\n if (visits[g.map.get(person.name)]==false){\n //for different islands\n dfsnum = new int[g.members.length];\n dfs(g.map.get(person.name), g.map.get(person.name), g, visits, dfsnum, back, answer);\n }\n }\n \n //check if vertex has one neighbor\n for (int i = 0; i < answer.size(); i++) {\n Friend ptr = g.members[g.map.get(answer.get(i))].first;\n //counts number of neighbors\n int count = 0;\n while (ptr != null) {\n ptr = ptr.next;\n count++;\n }\n if (count == 1) answer.remove(i);\n if (count == 0) answer.remove(i);\n } \n for (Person member : g.members) {\n if (member.first!=null&& member.first.next == null) {\n if (answer.contains(g.members[member.first.fnum].name)==false)\n \t\t answer.add(g.members[member.first.fnum].name);\n }\n }\n answer=modify(answer,g);\n if (answer==null||answer.size()==0) return null;\n return answer;\n }", "public void followEdge(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge to \" + e + \" not exist.\");\r\n\t}", "public void readIn() throws FileNotFoundException{\n\t\tScanner sc;\n\t\tif (species.equals(\"Human\")){\n\t\t\tsc= new Scanner(PhenoGeneNetwork.class.getResourceAsStream(\"/GenePhenoEdgeList\"));\t\n\t\t}\t\t\n\t\telse{\n\t\t\tsc= new Scanner(PhenoGeneNetwork.class.getResourceAsStream(\"/GenePhenoEdgeListMouse\"));\t\n\t\t}\n\t\tnodeNameMap = new HashMap<String, CyNode>();\n\t\tproteinNameMap = new HashMap<String, CyNode>();\n\t\tphenotypeNameMap = new HashMap<String, CyNode>();\n\t\twhile (sc.hasNextLine()){\n\t\t\tString line = sc.nextLine();\n\t\t\tString [] nodes = line.split(\"\\t\");\n\t\t\tCyNode node1 = null;\n\t\t\tCyNode node2 = null;\n\t\t\t// for Node1\n\t\t\tif (nodeNameMap.containsKey(nodes[0])){\n\t\t\t\t\n\t\t\t\tnode1 = (CyNode) nodeNameMap.get(nodes[0]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tnode1 = network.addNode();\n\t\t\t\tCyRow attributes = network.getRow(node1);\n\t\t\t\tattributes.set(\"name\", nodes[0]);\n\t\t\t\tnodeNameMap.put(nodes[0], node1);\n\t\t\t\tphenotypeNameMap.put(nodes[0], node1);\t\t\t\t\n\t\t\t}\n\t\t\tif (nodeNameMap.containsKey(nodes[1])){\n\t\t\t\t\n\t\t\t\tnode2 = (CyNode) nodeNameMap.get(nodes[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tnode2 = network.addNode();\n\t\t\t\tCyRow attributes = network.getRow(node2);\n\t\t\t\tattributes.set(\"name\", nodes[1]);\n\t\t\t\tnodeNameMap.put(nodes[1], node2);\n\t\t\t\tproteinNameMap.put(nodes[1], node2);\n\t\t\t}\n\t\t\tif (!network.containsEdge(node1, node2)){\n\t\t\t\t\n\t\t\t\tCyEdge myEdge =network.addEdge(node1, node2, true);\n\t\t\t\tnetwork.getRow(myEdge).set(\"interaction\", \"phenotype\");\n\t\t\t\tnetwork.getRow(myEdge).set(\"name\", nodes[0]+ \" (phenotype) \" +nodes[1]);\n\t\t\t}\n\t\t\t\n\n\n\t\t}\n\n\t\tsc.close();\n\n\t}", "public void setNeighbors(Field[] neighbors) {\n this.neighbors = neighbors;\n }", "@Test\r\n void create_edge_between_null_vertexes() {\r\n graph.addEdge(null, \"B\");\r\n graph.addEdge(\"A\", null);\r\n graph.addEdge(null, null);\r\n vertices = graph.getAllVertices();\r\n List<String> adjacentA = graph.getAdjacentVerticesOf(\"A\");\r\n List<String> adjacentB = graph.getAdjacentVerticesOf(\"B\");\r\n if(!vertices.isEmpty() | !adjacentA.isEmpty() | !adjacentB.isEmpty()) {\r\n fail();\r\n } \r\n }", "public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }", "public Graph(){//constructor\n //edgemap\n srcs=new LinkedList<>();\n maps=new LinkedList<>();\n chkIntegrity(\"edgemap\");\n \n nodes=new LinkedList<>();\n //m=new EdgeMap();\n }", "public void fixEdges() {\n\tfor (LayoutEdge lEdge: edgeList) {\n\t // Get the underlying edge\n\t CyEdge edge = lEdge.getEdge();\n\t CyNode target = (CyNode) edge.getTarget();\n\t CyNode source = (CyNode) edge.getSource();\n\n\t if (nodeToLayoutNode.containsKey(source) && nodeToLayoutNode.containsKey(target)) {\n\t\t// Add the connecting nodes\n\t\tlEdge.addNodes((LayoutNode) nodeToLayoutNode.get(source),\n\t\t\t (LayoutNode) nodeToLayoutNode.get(target));\n\t }\n\t}\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void readData(String fileName) {\n\t\ttry {\n\t\t\tFile file = new File(fileName);;\n\t\t\tif( !file.isFile() ) {\n\t\t\t\tSystem.out.println(\"ERRO\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\tBufferedReader buffer = new BufferedReader( new FileReader(file) );\n\t\t\t/* Reconhece o valor do numero de vertices */\n\t\t\tString line = buffer.readLine();\n\t\t\tStringTokenizer token = new StringTokenizer(line, \" \");\n\t\t\tthis.num_nodes = Integer.parseInt( token.nextToken() );\n\t\t\tthis.nodesWeigths = new int[this.num_nodes];\n\t\t\t\n\t\t\t/* Le valores dos pesos dos vertices */\n\t\t\tfor(int i=0; i<this.num_nodes; i++) { // Percorre todas a linhas onde seta valorado os pesos dos vertices\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se existe a linha a ser lida\n\t\t\t\t\tbreak;\n\t\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\t\tthis.nodesWeigths[i] = Integer.parseInt( token.nextToken() ); // Adiciona o peso de vertice a posicao do arranjo correspondente ao vertice\n\t\t\t}\n\t\t\t\n\t\t\t/* Mapeia em um array de lista todas as arestas */\n\t\t\tthis.edges = new LinkedList[this.num_nodes];\n\t\t\tint cont = 0; // Contador com o total de arestas identificadas\n\t\t\t\n\t\t\t/* Percorre todas as linhas */\n\t\t\tfor(int row=0, col; row<this.num_nodes; row++) {\n\t\t\t\tif( (line = buffer.readLine()) == null ) // Verifica se ha a nova linha no arquivo\n\t\t\t\t\tbreak;\n\t\t\t\tthis.edges[row] = new LinkedList<Integer>(); // Aloca nova lista no arranjo, representado a linha o novo vertice mapeado\n\t\t\t\tcol = 0;\n\t\t\t\ttoken = new StringTokenizer(line, \" \"); // Divide a linha pelos espacos em branco\n\t\t\t\t\n\t\t\t\t/* Percorre todas as colunas */\n\t\t\t\twhile( token.hasMoreTokens() ) { // Enquanto ouver mais colunas na linha\n\t\t\t\t\tif( token.nextToken().equals(\"1\") ) { // Na matriz binaria, onde possui 1, e onde ha arestas\n//\t\t\t\t\t\tif( row != col ) { // Ignora-se os lacos\n\t\t\t\t\t\t\t//System.out.println(cont + \" = \" + (row+1) + \" - \" + (col+1) );\n\t\t\t\t\t\t\tthis.edges[row].add(col); // Adiciona no arranjo de listas a aresta\n\t\t\t\t\t\t\tcont++; // Incrementa-se o total de arestas encontradas\n//\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcol++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.num_edges = cont; // Atribui o total de arestas encontradas\n\n\t\t\tif(true) {\n//\t\t\t\tfor(int i=0; i<this.num_nodes; i++) {\n//\t\t\t\t\tSystem.out.print(this.nodesWeigths[i] + \"\\n\");\n//\t\t\t\t}\n\t\t\t\tSystem.out.print(\"num edges = \" + cont + \"\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tbuffer.close(); // Fecha o buffer\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "EdgeNode(VertexNode correspondingVertex){\n setCorrespondingVertex(correspondingVertex);\n }", "private void buildIndex(Collection<Edge> edges) {\n\t\tfor (Edge e : edges) {\r\n\t\t\tList<Integer> ids = getCells(e);\r\n\t\t\tfor (int j = 0; j < ids.size(); j++) {\r\n\t\t\t\tList<Edge> list = dict.get(ids.get(j));\r\n\t\t\t\tif (list == null) {\r\n\t\t\t\t\tlist = new ArrayList<Edge>();\r\n\t\t\t\t\tdict.put(ids.get(j), list);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(e);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void createAdjacencyLists(List<Edges> edges,int numberOfVertices){\n\t\t\n\t\tfor(int i=0;i<numberOfVertices;i++){\n\t\t\tneighbors.add(new ArrayList<Integer>());\n\t\t}\n\t\tfor(Edges edge:edges){\n\t\t\tneighbors.get(edge.u).add(edge.v);\n\t\t}\n\t\t\n\t}", "private void setNeighbors()\r\n {\r\n for (int x = 0; x < length+2; ++x)\r\n {\r\n for (int y = 0; y < width+2; ++y)\r\n {\r\n // North\r\n if (!this.board[x][y].northwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y-1]);\r\n }\r\n // South\r\n if (!this.board[x][y].southwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x][y+1]);\r\n }\r\n // East\r\n if (!this.board[x][y].eastwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x+1][y]);\r\n }\r\n // West\r\n if (!this.board[x][y].westwall)\r\n {\r\n this.board[x][y].neighbors.add(this.board[x-1][y]);\r\n }\r\n }\r\n }\r\n }", "public void initializeNeighbors() {\n\t\tfor (int r = 0; r < getRows(); r++) {\n\t\t\tfor (int c = 0; c < getCols(); c++) {\n\t\t\t\tList<Cell> nbs = new ArrayList<>();\n\t\t\t\tinitializeNF(shapeType, r, c);\n\t\t\t\tmyNF.findNeighbors();\n\t\t\t\tfor (int[] arr : myNF.getNeighborLocations()){\n\t\t\t\t\tif (contains(arr[0], arr[1])){\n\t\t\t\t\t\tnbs.add(get(arr[0], arr[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tget(r, c).setNeighbors(nbs);\n\t\t\t}\n\t\t}\n\t}", "private void setListOfEdges(int numberOfVertex) {\n this.edges = new LinkedList[numberOfVertex];\n }", "public void setEdges(List<E> edges) {\n\t\tthis.edges = edges;\n\t\tvirtualEdges = new ArrayList<E>();\n\t}", "@SuppressWarnings(\"null\")\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(Paths.get(\"C:\\\\Users\\\\RIZERO\\\\Desktop\\\\text.txt\"),\"UTF-8\");\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tString s = \"[a-z]*\", word1 = \"\", word2 = \"\";\n\t\tPattern pattern = Pattern.compile(s);\n\t\tMatcher ma;\n\t\tString str;\n\t\tboolean flag1 = true, flag2 = true;\n\t\t\n\t\tList<Vertex> verList = new LinkedList<Graph.Vertex>();\n\n\t\tMap<String, List<Edge>> ve_Map = new HashMap<String, List<Edge>>();\n\n\t\t\n\t\tVertex vertex = null;\n\n\t\twhile(sc.hasNext()) \n\t\t{\n\t str = sc.next().toLowerCase();\n\t ma = pattern.matcher(str);\n\t\t\twhile(ma.find()) \n\t\t\t\tif(!ma.group().equals(\"\"))\n\t\t\t\t list.add(ma.group());\n\t\t}\n\t\t\tfor(String word : list) {\n\t\t\t\tword1 = word2;\n\t\t\t\tword2 = word;\n\t\t\t\tflag1 = true;\n\t\t\t\tflag2 = true;\n\t\t\t\tvertex = new Vertex(word1);\n\t\t\t\tfor(Vertex ver : verList) {\n\t\t\t\t\tif (word1.equals(ver.getName())|| word1.equals(\"\")) {\n\t\t\t\t\t\tflag1 = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n if(flag1) {\n \tvertex = new Vertex(word1);\n\t\t\t\t\tverList.add(vertex);\n\t\t\t\t\tve_Map.put(vertex.getName(), new LinkedList<Graph.Edge>());\n\t\t\t\t}\n \n for(Edge edge : ve_Map.get(word1)) {\n\t\t\t\t\tif (word2.equals(edge.getEnd().getName())) {\n\t\n\t\t\t\t\t\tedge.upWeight();\n\t\t\t\t\t\tflag2 = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n if(flag2 && !(word1.equals(\"\"))) {\n \tvertex = new Vertex(word2);\n \tve_Map.get(word1).add(new Edge(vertex, 1));\n }\t\n\t\t\t}\n\t\t\n\t\tfor(Vertex ver : verList) {\n\t\t\tfor(Edge edge : ve_Map.get(ver.getName())) {\n\t\t\t\tSystem.out.println(ver.getName()+\"->\"+edge.getEnd().getName()+\" = \"+edge.getWeight());\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(list);\n\t\tSystem.out.println(new Date());\n\t\tsc.close();\n\t}", "List<WeightedEdge<Vertex>> neighbors(Vertex v);", "public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}", "public void addUndirectedEdge(int vertexOne, int vertexTwo) {\n\t\tGraphNode first = nodeList.get(vertexOne - 1);\n\t\tGraphNode second = nodeList.get(vertexTwo - 1);\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\n\t\tsecond.getNeighbors().add(first);//Neighbour of second is first. Store it.\n\t\tSystem.out.println(first.getNeighbors());\n\t\tSystem.out.println(second.getNeighbors());\n\t}", "void addEdge(Edge e) {\n if (e.getTail().equals(this)) {\n outEdges.put(e.getHead(), e);\n\n return;\n } else if (e.getHead().equals(this)) {\n indegree++;\n inEdges.put(e.getTail(), e);\n\n return;\n }\n\n throw new RuntimeException(\"Cannot add edge that is unrelated to current node.\");\n }", "public MyGraph(Collection<Vertex> v, Collection<Edge> e) {\n myGraph = new HashMap<Vertex, Collection<Edge>>();\n \n Iterator<Vertex> vertices = v.iterator();\n while(vertices.hasNext()) {\n //create a new vertex copy of each passes in vertex in Collection v to restrict any reference\n //to the internals of this class\n Vertex currV = new Vertex(vertices.next().getLabel()); //NEW\n //Vertex currV = vertices.next(); OLD\n if(!myGraph.containsKey(currV)){\n //add the copy of the vertex into the HashMap\n myGraph.put(currV, new ArrayList<Edge>());\n }\n }\n\n Iterator<Edge> edges = e.iterator();\n while(edges.hasNext()){\n //copies a new edge for each edge in Collection e to restrict any reference \n //to the internals of this class\n Edge parameterEdge = edges.next();\n Edge currE = new Edge(parameterEdge.getSource(), parameterEdge.getDestination(), parameterEdge.getWeight()); //NEW\n //Edge currE = edges.next(); OLD\n if(currE.getWeight() < 0){\n throw new IllegalArgumentException(\"Edge weight is negative\");\n }\n Vertex currESrc = currE.getSource();\n Vertex currEDest = currE.getDestination();\n if(v.contains(currESrc) && v.contains(currEDest)){\n Collection<Edge> outEdges = myGraph.get(currESrc);\n if(!outEdges.contains(currE)){\n //add the copy of the edge as a value in the HashMap\n outEdges.add(currE);\n }\n } else {\n throw new IllegalArgumentException(\"Vertex in edge is not valid\");\n }\n }\n }", "private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r, c);\n\t\t\t\t\tif (neighborCount > 0) {\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(true);\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines\n\t\t\t\t\t\t\t\t(neighborCount);\n\t\t\t\t\t} else if (neighborCount == 0) {\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines(0);\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(false);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void dft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> stack = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tstack.addFirst(rootpair);\r\n\t\t\twhile (stack.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = stack.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tstack.addFirst(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private List<Graph.Edge> getEdge(PathMap map) {\n // record the visited coordinates\n List<Coordinate> visited = new ArrayList<>();\n // get all coordinates from the map\n List<Coordinate> allCoordinates = map.getCoordinates();\n // for record all generated edges\n List<Graph.Edge> edges = new ArrayList<>();\n\n\n while (visited.size() <= allCoordinates.size() - 1) {\n for (Coordinate temp : allCoordinates) {\n\n if (visited.contains(temp)) {\n continue;\n }\n visited.add(temp);\n List<Coordinate> neighbors = map.neighbours(temp);\n for (Coordinate tempNeighbour : neighbors) {\n edges.add(new Graph.Edge(temp, tempNeighbour, tempNeighbour.getTerrainCost()));\n }\n }\n }\n // trim impassable coordinates\n List<Graph.Edge> fEdges = new ArrayList<>();\n for (Graph.Edge dd : edges) {\n if (dd.startNode.getImpassable() || dd.endNode.getImpassable()) {\n continue;\n }\n fEdges.add(dd);\n }\n return fEdges;\n }", "public void readGraph(String filename)\n {\n Scanner fileIn = null;\n int vertex1, vertex2;\n\n try {\n fileIn = new Scanner (new FileReader(filename));\n numVertices = fileIn.nextInt();\n clearGraph();\n vertex1 = fileIn.nextInt();\n while (vertex1 != -1) {\n vertex2 = fileIn.nextInt();\n addEdge(vertex1, vertex2);\n vertex1 = fileIn.nextInt();\n }\n fileIn.close();\n } catch (IOException ioe)\n {\n System.out.println (ioe.getMessage());\n System.exit(0);\n }\n }", "@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }", "public Set<Pair<V,V>> neighbourEdgesOf(V vertex);", "private void addLinkesToGraph()\n\t{\n\t\tString from,to;\n\t\tshort sourcePort,destPort;\n\t\tMap<Long, Set<Link>> mapswitch= linkDiscover.getSwitchLinks();\n\n\t\tfor(Long switchId:mapswitch.keySet())\n\t\t{\n\t\t\tfor(Link l: mapswitch.get(switchId))\n\t\t\t{\n\t\t\t\tfrom = Long.toString(l.getSrc());\n\t\t\t\tto = Long.toString(l.getDst());\n\t\t\t\tsourcePort = l.getSrcPort();\n\t\t\t\tdestPort = l.getDstPort();\n\t\t\t\tm_graph.addEdge(from, to, Capacity ,sourcePort,destPort);\n\t\t\t} \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}", "public void addEdge(FlowEdge e){\n int v = e.getFrom();\n int w = e.getTo();\n adj[v].add(e); //add forward edge\n adj[w].add(e); //add backward edge\n }", "void addEdge(int s1,int c,int s2)\r\n\t{\r\n\t\tg[s1][c][s2]=true;\r\n\t}", "private void e_Neighbours(int u){ \n int edgeDistance = -1; \n int newDistance = -1; \n \n // All the neighbors of v \n for (int i = 0; i < adj.get(u).size(); i++) { \n Node v = adj.get(u).get(i); \n \n // If current node hasn't already been processed \n if (!settled.contains(v.node)) { \n edgeDistance = v.cost; \n newDistance = dist[u] + edgeDistance; \n \n // If new distance is cheaper in cost \n if (newDistance < dist[v.node]) \n dist[v.node] = newDistance; \n \n // Add the current node to the queue \n pq.add(new Node(v.node, dist[v.node])); \n } \n } \n }", "public static void buildAdjacencyList(Maze m, int n){\n\n\t\tint mazeSize = n*n;\n\t\tgNode[] AL = new gNode[mazeSize]; \n\t\tfor(int i=0; i<AL.length-1; i++){\n\n\t\t\t//for the right and left walls\n\t\t\tif(!(i%AL.length == n-1)){\n\t\t\t\tif(m.check_wall(i, i+1, 'r') == false){\n\t\t\t\t\tAL[i] = new gNode(i+1, AL[i]);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t//for the upper and bottom walls (just to avoid another for-loop)\n\t\t\tif(i < AL.length-n){\n\t\t\t\tif(m.check_wall(i, i+n, 'u') == false){\n\t\t\t\t\tAL[i] = new gNode(i+n, AL[i]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tfor(int j=0; j<AL.length; j++){\n\t\t\tSystem.out.println(\"VERTEX \"+j);\n\t\t\tfor(gNode t= AL[j]; t!=null; t=t.dest){\n\t\t\t\tSystem.out.println(t.item);\n\t\t\t}\n\t\t}\n\n\n\t}", "void addVertex(Vertex v, ArrayList<Vertex> neighbors, ArrayList<Double> weights) throws VertexNotInGraphException;", "public void readNetworkFromFile() {\r\n\t\tFileReader fr = null;\r\n\t\t// open file with name given by filename\r\n\t\ttry {\r\n\t\t\ttry {\r\n\t\t\t\tfr = new FileReader (filename);\r\n\t\t\t\tScanner in = new Scanner (fr);\r\n\r\n\t\t\t\t// get number of vertices\r\n\t\t\t\tString line = in.nextLine();\r\n\t\t\t\tint numVertices = Integer.parseInt(line);\r\n\r\n\t\t\t\t// create new network with desired number of vertices\r\n\t\t\t\tnet = new Network (numVertices);\r\n\r\n\t\t\t\t// now add the edges\r\n\t\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\t\tline = in.nextLine();\r\n\t\t\t\t\tString [] tokens = line.split(\"[( )]+\");\r\n\t\t\t\t\t// this line corresponds to add vertices adjacent to vertex u\r\n\t\t\t\t\tint u = Integer.parseInt(tokens[0]);\r\n\t\t\t\t\t// get corresponding Vertex object\r\n\t\t\t\t\tVertex uu = net.getVertexByIndex(u);\r\n\t\t\t\t\tint i=1;\r\n\t\t\t\t\twhile (i<tokens.length) {\r\n\t\t\t\t\t\t// get label of vertex v adjacent to u\r\n\t\t\t\t\t\tint v = Integer.parseInt(tokens[i++]);\r\n\t\t\t\t\t\t// get corresponding Vertex object\r\n\t\t\t\t\t\tVertex vv = net.getVertexByIndex(v);\r\n\t\t\t\t\t\t// get capacity c of (uu,vv)\r\n\t\t\t\t\t\tint c = Integer.parseInt(tokens[i++]);\r\n\t\t\t\t\t\t// add edge (uu,vv) with capacity c to network \r\n\t\t\t\t\t\tnet.addEdge(uu, vv, c);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinally { \r\n\t\t\t\tif (fr!=null) fr.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.err.println(\"IO error:\");\r\n\t\t\tSystem.err.println(e);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public void addEdge(Edge e){\n\t\tadjacentEdges.add(e);\n\t}", "boolean ignoreExistingVertices();", "boolean containsJewel(Graph<V, E> g)\n {\n for (V v2 : g.vertexSet()) {\n for (V v3 : g.vertexSet()) {\n if (v2 == v3 || !g.containsEdge(v2, v3))\n continue;\n for (V v5 : g.vertexSet()) {\n if (v2 == v5 || v3 == v5)\n continue;\n\n Set<V> F = new HashSet<>();\n for (V f : g.vertexSet()) {\n if (f == v2 || f == v3 || f == v5 || g.containsEdge(f, v2)\n || g.containsEdge(f, v3) || g.containsEdge(f, v5))\n continue;\n F.add(f);\n }\n\n List<Set<V>> componentsOfF = findAllComponents(g, F);\n\n Set<V> X1 = new HashSet<>();\n for (V x1 : g.vertexSet()) {\n if (x1 == v2 || x1 == v3 || x1 == v5 || !g.containsEdge(x1, v2)\n || !g.containsEdge(x1, v5) || g.containsEdge(x1, v3))\n continue;\n X1.add(x1);\n }\n Set<V> X2 = new HashSet<>();\n for (V x2 : g.vertexSet()) {\n if (x2 == v2 || x2 == v3 || x2 == v5 || g.containsEdge(x2, v2)\n || !g.containsEdge(x2, v5) || !g.containsEdge(x2, v3))\n continue;\n X2.add(x2);\n }\n\n for (V v1 : X1) {\n if (g.containsEdge(v1, v3))\n continue;\n for (V v4 : X2) {\n if (v1 == v4 || g.containsEdge(v1, v4) || g.containsEdge(v2, v4))\n continue;\n for (Set<V> FPrime : componentsOfF) {\n if (hasANeighbour(g, FPrime, v1) && hasANeighbour(g, FPrime, v4)) {\n if (certify) {\n Set<V> validSet = new HashSet<>();\n validSet.addAll(FPrime);\n validSet.add(v1);\n validSet.add(v4);\n GraphPath<V, E> p = new DijkstraShortestPath<>(\n new AsSubgraph<>(g, validSet)).getPath(v1, v4);\n List<E> edgeList = new LinkedList<>();\n edgeList.addAll(p.getEdgeList());\n if (p.getLength() % 2 == 1) {\n edgeList.add(g.getEdge(v4, v5));\n edgeList.add(g.getEdge(v5, v1));\n\n } else {\n edgeList.add(g.getEdge(v4, v3));\n edgeList.add(g.getEdge(v3, v2));\n edgeList.add(g.getEdge(v2, v1));\n\n }\n\n double weight =\n edgeList.stream().mapToDouble(g::getEdgeWeight).sum();\n certificate = new GraphWalk<>(g, v1, v1, edgeList, weight);\n }\n return true;\n }\n }\n }\n }\n }\n }\n }\n\n return false;\n }", "void addEdge(Edge e) {\n edges.add(e);\n addVerticle(e.v1);\n addVerticle(e.v2);\n }", "GraphObj() {\n this._V = 0;\n this._E = 0;\n inListArray = new ArrayList<>();\n inListArray.add(null);\n outListArray = new ArrayList<>();\n outListArray.add(null);\n selfEdges = new ArrayList<>();\n selfEdges.add(-1);\n edgeList = new ArrayList<>();\n edgeList.add(null);\n }", "public void edgeHeadChanged(GraphEvent e);", "private void connectAll()\n {\n\t\tint i = 0;\n\t\tint j = 1;\n\t\twhile (i < getNodes().size()) {\n\t\t\twhile (j < getNodes().size()) {\n\t\t\t\tLineEdge l = new LineEdge(false);\n\t\t\t\tl.setStart(getNodes().get(i));\n\t\t\t\tl.setEnd(getNodes().get(j));\n\t\t\t\taddEdge(l);\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++; j = i+1;\n\t\t}\n\n }", "void readQueryGraph(boolean isProtein, File file, int queryID) throws IOException {\n if(isProtein) {\n FileReader fileReader = new FileReader(file.getPath());\n BufferedReader br = new BufferedReader(fileReader);\n String line = null;\n int lineread = -1;\n boolean edgesEncountered = false;\n while ((line = br.readLine()) != null) {\n lineread++;\n if (lineread == 0)\n continue;\n String lineData[] = line.split(\" \");\n if (lineData.length == 2) {\n if (!edgesEncountered) {\n int id = Integer.parseInt(lineData[0]);\n String label = lineData[1];\n vertexClass vc = new vertexClass();\n vc.id1 = id;\n vc.label = label;\n vc.isProtein = true;\n queryGraphNodes.put(id, vc);\n\n } else {\n int id1 = Integer.parseInt(lineData[0]);\n int id2 = Integer.parseInt(lineData[1]);\n queryGraphNodes.get(id1).edges.put(id2, -1);\n }\n } else {\n edgesEncountered = true;\n }\n\n }\n\n }\n else {\n FileReader fileReader = new FileReader(file);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String line = null;\n boolean reachedDest = false;\n while ((line = bufferedReader.readLine()) != null) {\n String[] lineData = line.split(\" \");\n if (lineData[0].equals(\"t\")) {\n // new graph\n if (Integer.parseInt(lineData[2]) == queryID) {\n reachedDest = true;\n nodesHuman = new HashMap<>();\n }\n else\n reachedDest = false;\n\n } else if (lineData[0].equals(\"v\")) {\n if (reachedDest) {\n // vertex in the graph\n int id1 = Integer.parseInt(lineData[1]);\n HashMap<String, Object> insertData = new HashMap<>();\n insertData.put(\"id\", id1);\n //insertData.put(\"graphID\", id);\n int count = 0;\n vertexClass vc = new vertexClass();\n for (int i = 2; i < lineData.length; i++) {\n vc.labels.add(Integer.parseInt(lineData[i]));\n\n }\n vc.id1 = id1;\n queryGraphNodes.put(id1, vc);\n }\n } else if (lineData[0].equals(\"e\")) {\n // edge in the graph\n if (reachedDest) {\n int id1 = Integer.parseInt(lineData[1]);\n int id2 = Integer.parseInt(lineData[2]);\n int label = Integer.parseInt(lineData[3]);\n queryGraphNodes.get(id1).edges.put(id2, label);\n }\n\n }\n }\n }\n }", "public void makeUndirected(Position ep) throws InvalidPositionException;", "private ProjectedVertex() {\n this.valid = false;\n this.edge = null;\n }", "public static void main(String[] args) throws IOException {\n\n // read in graph\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt(), m = scanner.nextInt();\n ArrayList<Integer>[] graph = new ArrayList[n];\n for (int i = 0; i < n; i++)\n graph[i] = new ArrayList<>();\n\n for (int i = 0; i < m; i++) {\n scanner.nextLine();\n int u = scanner.nextInt() - 1, v = scanner.nextInt() - 1; // convert to 0 based index\n graph[u].add(v);\n graph[v].add(u);\n }\n\n int[] dist = new int[n];\n Arrays.fill(dist, -1);\n // partition the vertices in each of the components of the graph\n for (int u = 0; u < n; u++) {\n if (dist[u] == -1) {\n // bfs\n Queue<Integer> queue = new LinkedList<>();\n queue.add(u);\n dist[u] = 0;\n while (!queue.isEmpty()) {\n int w = queue.poll();\n for (int v : graph[w]) {\n if (dist[v] == -1) { // unvisited\n dist[v] = (dist[w] + 1) % 2;\n queue.add(v);\n } else if (dist[w] == dist[v]) { // visited and form a odd cycle\n System.out.println(-1);\n return;\n } // otherwise the dist will not change\n }\n }\n }\n\n }\n\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));\n // vertices with the same dist are in the same group\n List<Integer>[] groups = new ArrayList[2];\n groups[0] = new ArrayList<>();\n groups[1] = new ArrayList<>();\n for (int u = 0; u < n; u++) {\n groups[dist[u]].add(u + 1);\n }\n for (List<Integer> g: groups) {\n writer.write(String.valueOf(g.size()));\n writer.newLine();\n for (int u: g) {\n writer.write(String.valueOf(u));\n writer.write(' ');\n }\n writer.newLine();\n }\n\n writer.close();\n\n\n }", "public void inIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}", "void addEdge(int source, int destination, int weight);", "public void addIncomingEdge(Edge e) {\n\t\tincomingEdges.add(e);\n\t\tconnectedNodes.add(e.getStart());\n\t\taddIncomingWeight(e.getWeight());\n\t}", "public Edge(){\n\t\tvertices = null;\n\t\tnext = this;\n\t\tprev = this;\n\t\tpartner = null;\n\t\tweight = 0;\n\t}", "public void initialize() {\n for (Location apu : this.locations) {\n Node next = new Node(apu.toString());\n this.cells.add(next);\n }\n \n for (Node helper : this.cells) {\n Location next = (Location)this.locations.searchWithString(helper.toString()).getOlio();\n LinkedList<Target> targets = next.getTargets();\n for (Target finder : targets) {\n Node added = this.path.search(finder.getName());\n added.setCoords(finder.getX(), finder.getY());\n helper.addEdge(new Edge(added, finder.getDistance()));\n }\n }\n \n this.startCell = this.path.search(this.source);\n this.goalCell = this.path.search(this.destination);\n \n /**\n * Kun lähtö ja maali on asetettu, voidaan laskea jokaiselle solmulle arvio etäisyydestä maaliin.\n */\n this.setHeuristics();\n }", "public void loadGraph2(String path) throws FileNotFoundException, IOException {\n\n\t\ttry (BufferedReader br = new BufferedReader(\n\n\t\t\t\tnew InputStreamReader(new FileInputStream(path), StandardCharsets.UTF_8), 1024 * 1024)) {\n\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tif (line == null) // end of file\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tint a = 0;\n\t\t\t\tint left = -1;\n\t\t\t\tint right = -1;\n\n\t\t\t\tfor (int pos = 0; pos < line.length(); pos++) {\n\t\t\t\t\tchar c = line.charAt(pos);\n\t\t\t\t\tif (c == ' ' || c == '\\t') {\n\t\t\t\t\t\tif (left == -1)\n\t\t\t\t\t\t\tleft = a;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tright = a;\n\n\t\t\t\t\t\ta = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (c < '0' || c > '9') {\n\t\t\t\t\t\tSystem.out.println(\"Erreur format ligne \");\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t\ta = 10 * a + c - '0';\n\t\t\t\t}\n\t\t\t\tright = a;\n\t\t\n\t\t\t\t// s'assurer qu'on a toujours de la place dans le tableau\n\t\t\t\tif (adjVertices.length <= left || adjVertices.length <= right) {\n\t\t\t\t\tensureCapacity(Math.max(left, right) + 1);\n\t\t\t\t}\n\n\t\t\t\tif (adjVertices[left] == null) {\n\t\t\t\t\tadjVertices[left] = new Sommet(left);\n\t\t\t\t}\n\n\t\t\t\tif (adjVertices[right] == null) {\n\t\t\t\t\tadjVertices[right] = new Sommet(right);\n\t\t\t\t}\n\n\t\t\t\tif (adjVertices[left].listeAdjacence.contains(adjVertices[right])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tadjVertices[left].listeAdjacence.add(adjVertices[right]);\n\t\t\t\t\tadjVertices[right].listeAdjacence.add(adjVertices[left]);\n\t\t\t\t\tnombreArrete++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; i < adjVertices.length; i++) {\n\t\t\tif (adjVertices[i] == null)\n\t\t\t\tnombreTrous++;\n\t\t}\n\t\tnumberOfNode = adjVertices.length - nombreTrous;\n\t\tSystem.out.println(\"-----------------------------------------------------------------\");\n\t\tSystem.out.println(\"Loading graph done !\");\n\t\tSystem.out.println(\"-----------------------------------------------------------------\");\n\n\t\tSystem.out.println(\"nombreTrous \" + nombreTrous);\n\t\tSystem.out.println(\"numberOfNode \" + numberOfNode);\n\t\t\n\t}", "EdgeIteratorState copyPropertiesFrom(EdgeIteratorState e);", "public void populateNeighbors(Cell[][] cells) {\n\t\tint limitHoriz = cells[0].length;\n\t\tint limitVert = cells.length;\n\t\t// above left\n\t\tif (myRow > 0 && myRow < limitVert - 1) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) {\n\t\t\t\tneighbors.add(cells[myRow][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol +1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol +1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol+1]);\n\t\t\t\t// ADD 8 cells to neighbors (see the diagram from the textbook)\n\t\t\t}\n\t\t\tif (myCol == 0) { // left edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow+1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow+1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol+1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // right edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow +1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow -1][myCol]);\n\t\t\t}\n\t\t}\n\t\tif (myRow == 0) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) { // top edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow][myCol + 1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow+1][myCol -1]);\n\t\t\t}\n\t\t\tif (myCol == 0) { // top left corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow][myCol + 1]);\n\t\t\t\tneighbors.add(cells[myRow + 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow + 1][myCol+1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // top right corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t}\n\t\t}\n\t\tif (myRow == limitVert - 1) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) { // bottom edge\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow][myCol +1]);\n\t\t\t}\n\t\t\tif (myCol == 0) { // bottom left corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow][myCol +1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // bottom right corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t}\n\t\t}\n\t}", "public void readMaze() throws FileNotFoundException, IOException {\r\n\r\n String line = null; // initialising the value of the line to null\r\n System.out.println(\"Provide name of the file\");// asking user to input the name of the maze file in question\r\n String fileName = input.next();\r\n FileReader fileReader = new FileReader(fileName+\".txt\");\r\n BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n while ((line = bufferedReader.readLine()) != null) {\r\n String[] locations = line.split(\" \");\r\n graph.addTwoWayVertex(locations[0], locations[1]);// making pairwise connection between two vertices\r\n }\r\n bufferedReader.close(); // BufferedReader must be closed after reading the file is implemented.\r\n }", "private void addEdge(AtomVertex v, AtomEdge... l) {\n for (AtomEdge e : l) {\n adjacencyMatrix.addEdge(v, e.getSinkVertex(), e.getWeight());\n }\n }", "public void addEdge(Edge e) {\n incident.add(e);\n }", "private ArrayList<Edge>getFullyConnectedGraph(){\n\t\tArrayList<Edge> edges = new ArrayList<>();\n\t\tfor(int i=0;i<nodes.size();i++){\n\t\t\tfor(int j=i+1;j<nodes.size();j++){\n\t\t\t\tEdge edge = new Edge(nodes.get(i), nodes.get(j),Utils.distance(nodes.get(i), nodes.get(j)));\n\t\t\t\tedges.add(edge);\n\t\t\t}\n\t\t}\n\t\treturn edges;\n\t}" ]
[ "0.64984", "0.63992894", "0.62327445", "0.6201069", "0.61966574", "0.61635864", "0.6106539", "0.5992693", "0.59597725", "0.59547895", "0.5953309", "0.59404117", "0.5794562", "0.5781659", "0.5753592", "0.57518065", "0.5730308", "0.57287437", "0.57008445", "0.5685278", "0.56833684", "0.56692266", "0.5640482", "0.56267154", "0.56159824", "0.56117415", "0.56053346", "0.56000656", "0.5582634", "0.5579657", "0.5568687", "0.55519944", "0.5544434", "0.5532435", "0.5521772", "0.5512625", "0.5501401", "0.5497676", "0.54946446", "0.5485526", "0.54716635", "0.5468403", "0.54471004", "0.54351825", "0.5431942", "0.54237807", "0.54200196", "0.5413198", "0.54125684", "0.541031", "0.5409497", "0.5407974", "0.5398173", "0.5381259", "0.53767836", "0.5366978", "0.5365888", "0.5361274", "0.5353692", "0.53437525", "0.53333175", "0.5320892", "0.5318942", "0.53100044", "0.53080076", "0.5302881", "0.53001094", "0.52892303", "0.5287768", "0.5287231", "0.52781266", "0.52748626", "0.52746826", "0.52745456", "0.5273807", "0.5269486", "0.52687776", "0.52624977", "0.52574027", "0.5256383", "0.5248711", "0.524576", "0.52448004", "0.524357", "0.5239828", "0.52387583", "0.52322567", "0.5230919", "0.5227609", "0.52189827", "0.521806", "0.52165127", "0.5213791", "0.52133673", "0.520853", "0.52065617", "0.5195331", "0.5192401", "0.519064", "0.5189895" ]
0.61235
6
Compute the betweenness centrality of every vertex
public static List<SimpleEntry<Integer, Double>> betweennessCent(Vertex[] vertices) { List<SimpleEntry<Integer, Double>> bc = new ArrayList<SimpleEntry<Integer, Double>>(); int countTotal = 0; for(int i = 0; i < V; i++) { for(int j = i; j < V; j++) { // if they are not the same vertex if(i != j) { bfs(vertices, i, j); countTotal++; } } } for(int i = 0; i < V; i++) { vertices[i].divideNumPaths(countTotal); bc.add(new SimpleEntry<Integer, Double>(i, vertices[i].getNumPaths())); } // sort the list according to the values (in this case, the betweenness) Collections.sort(bc, new Comparator<SimpleEntry<Integer, Double>>(){ /** * Compare the values of two of the entries of the comparator * @param arg0 * @param arg1 * @return a negative integer if arg0 < arg1 * zero if arg0 == arg1 * a positive integer if arg0 > arg1 */ @Override public int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1) { return arg1.getValue().compareTo(arg0.getValue()); } }); return bc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static double clusterVerticesOneStep(Mesh mesh) {\n\t\t\n\t\t// for each pair of the vertices\n\t\tdouble mindis = 1.0e+30;\n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\t\t\n\t\t\t\t// for each pair of the nodes\n\t\t\t\tdouble maxdis = 0.0;\n\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\t\tif(n1.getDisSim2(n2.getId()) > maxdis) {\n\t\t\t\t\t\t\tmaxdis = n1.getDisSim2(n2.getId());\n\t\t\t\t\t\t\tif(maxdis > mindis) {\n\t\t\t\t\t\t\t\tii = v1.nodes.size(); break;\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\n\t\t\t\t// update mindis\n\t\t\t\tif(mindis > maxdis) {\n\t\t\t\t\tmindis = maxdis;\n\t\t\t\t\t//System.out.println(\" updated mindis=\" + mindis);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Determine the threshold\n\t\tdouble threshold = mindis * clusteringThreshold;\n\t\t\n\t\t// Combine close two vertices \n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\t\t\n\t\t\t\t// for each pair of the nodes\n\t\t\t\tdouble maxdis = -1.0;\n\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\t\tif(n1.getDisSim2(n2.getId()) > maxdis) {\n\t\t\t\t\t\t\tmaxdis = n1.getDisSim2(n2.getId());\n\t\t\t\t\t\t\tif(maxdis > threshold) {\n\t\t\t\t\t\t\t\tii = v1.nodes.size(); break;\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\tif(maxdis > threshold) continue;\n\t\t\t\t\n\t\t\t\t//System.out.println(\" combine: i=\" + i + \" j=\" + j + \" names=\" + authors + \" maxdis=\" + maxdis + \" th=\" + threshold);\n\t\t\t\t\n\t\t\t\t// combine the two vertices\n\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\tv1.nodes.add(n2);\n\t\t\t\t\tn2.setVertex(v1);\n\t\t\t\t}\n\t\t\t\tmesh.removeOneVertex(v2);\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn threshold;\n\t}", "public void setDefaultBetweennessCentrality() {\n\t\tnormalizedBetweennessCentrality = new HashMap<Cell, Double>();\n\t\tfor (Cell cell : graph.getVertices()) {\n\t\t\tnormalizedBetweennessCentrality.put(cell, 1.00);\n\t\t}\n\t}", "public abstract int[] getConnected(int vertexIndex);", "public PVector cohesion (ArrayList<Shark> sharks) {\n float neighbordist = 50;\n PVector sum = new PVector(0, 0); // Start with empty vector to accumulate all positions\n int count = 0;\n for (Shark other : sharks) {\n float d = PVector.dist(position, other.position);\n if ((d > 0) && (d < neighbordist)) {\n sum.add(other.position); // Add position\n count++;\n }\n }\n if (count > 0) {\n sum.div(count);\n return seek(sum); // Steer towards the position\n } else {\n return new PVector(0, 0);\n }\n }", "public void calculate() {\n\t\t\n\t\tHashMap<Integer, Vertex> vertices = triangulation.getVertices();\n\t\tHashMap<Integer, Face> faces = triangulation.getFaces();\n\n\t\tHashMap<Integer, Integer> chords = new HashMap<Integer, Integer>();\n\t\tList<Vertex> onOuterCircle = new LinkedList<Vertex>();\n\t\tList<Edge> outerCircle = new LinkedList<Edge>();\n\n\t\tfor (Vertex v : vertices.values()) {\n\t\t\tchords.put(v.getId(), 0);\n\t\t\tchildren.put(v.getId(), new LinkedList<Integer>());\n\t\t}\n\n\t\t// determine outer face (randomly, use the first face)\n\t\tFace outerFace = null;\n\t\tfor (Face f : faces.values()) {\n\t\t\touterFace = f;\n\t\t\tbreak;\n\t\t}\n\t\tif (outerFace == null) {\n\t\t\t// there are no faces at all in the embedding\n\t\t\treturn;\n\t\t}\n\n\t\tEdge e = outerFace.getIncidentEdge();\n\t\tvertexOrder[1] = e.getSource();\n\t\tvertexOrder[0] = e.getTarget();\n\t\tonOuterCircle.add(e.getTarget());\n\t\tonOuterCircle.add(e.getNext().getTarget());\n\t\tonOuterCircle.add(e.getSource());\n\t\touterCircle.add(e.getNext().getNext().getTwin());\n\t\touterCircle.add(e.getNext().getTwin());\n\t\t\n\t\t//System.out.println(\"outerCircle 0 \" + outerCircle.get(0).getId() + \" - source: \" + outerCircle.get(0).getSource().getId() + \" - target: \" + outerCircle.get(0).getTarget().getId());\n\t\t//System.out.println(\"outerCircle 1 \" + outerCircle.get(1).getId() + \" - source: \" + outerCircle.get(1).getSource().getId() + \" - target: \" + outerCircle.get(1).getTarget().getId());\n\t\t\n\n\t\tfor (int k=vertexOrder.length-1; k>1; k--) {\n\t\t\t//System.out.println(\"k: \" + k + \" - outerCircle size: \" + outerCircle.size());\n\t\t\t// chose v != v_0,v_1 such that v on outer face, not considered yet and chords(v)=0\n\t\t\tVertex nextVertex = null;\n\t\t\tint nextVertexId = -1;\n\t\t\tfor (int i=0; i<onOuterCircle.size(); i++) {\n\t\t\t\tnextVertex = onOuterCircle.get(i);\n\t\t\t\tnextVertexId = nextVertex.getId();\n\t\t\t\tif (nextVertexId != vertexOrder[0].getId() && nextVertexId != vertexOrder[1].getId()\n\t\t\t\t\t\t&& chords.get(nextVertexId) == 0) {\n\t\t\t\t\t// remove from list\n\t\t\t\t\tonOuterCircle.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"nextVertexId: \" + nextVertexId);\n\n\t\t\t// found the next vertex; add it to the considered vertices\n\t\t\tvertexOrder[k] = nextVertex;\n\t\t\t\n\t\t\t// determine children\n\t\t\tList<Integer> childrenNextVertex = children.get(nextVertexId);\n\t\t\t\n\t\t\t// update edges of outer circle\n\t\t\tint index = 0;\n\t\t\t\n\t\t\twhile (outerCircle.get(index).getTarget().getId() != nextVertexId) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tEdge outofNextVertex = outerCircle.remove(index+1);\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"outOfNextVertex \" + outofNextVertex.getId() + \" - source: \" + outofNextVertex.getSource().getId() + \" - target: \" + outofNextVertex.getTarget().getId());\n\t\t\tEdge intoNextVertex = outerCircle.remove(index);\n\t\t\t//System.out.println(\"intoNextVertex \" + intoNextVertex.getId() + \" - source: \" + intoNextVertex.getSource().getId() + \" - target: \" + intoNextVertex.getTarget().getId());\n\t\t\tEdge current = intoNextVertex.getNext();\n\t\t\t//System.out.println(\"current \" + current.getId() + \" - source: \" + current.getSource().getId() + \" - target: \" + current.getTarget().getId());\n\t\t\t\n\t\t\tint endIndex = index;\n\t\t\t\n\t\t\twhile (current.getId() != outofNextVertex.getId()) {\n\t\t\t\tEdge onCircle = current.getNext().getTwin();\n\t\t\t\touterCircle.add(endIndex, onCircle);\n\t\t\t\t\n\t\t\t\tchildrenNextVertex.add(0, onCircle.getSource().getId());\n\t\t\t\t\n\t\t\t\tendIndex++;\n\t\t\t\tcurrent = current.getTwin().getNext();\n\t\t\t\tonOuterCircle.add(onCircle.getTarget());\n\t\t\t}\n\t\t\t\n\t\t\tEdge lastEdge = outofNextVertex.getNext().getTwin();\n\t\t\touterCircle.add(endIndex, lastEdge);\n\t\t\t\n\t\t\tchildrenNextVertex.add(0, lastEdge.getSource().getId());\n\t\t\tchildrenNextVertex.add(0, lastEdge.getTarget().getId());\n\n\t\t\t// update chords\n\t\t\tfor (Vertex v : onOuterCircle) {\n\t\t\t\tEdge incidentEdge = v.getOutEdge();\n\t\t\t\tint firstEdgeId = incidentEdge.getId();\n\t\t\t\tint chordCounter = -2; // the 2 neighbours are on the outer circle, but no chords\n\t\t\t\tdo {\n\t\t\t\t\tif (onOuterCircle.contains(incidentEdge.getTarget())) {\n\t\t\t\t\t\tchordCounter++;\n\t\t\t\t\t}\n\t\t\t\t\tincidentEdge = incidentEdge.getTwin().getNext();\n\t\t\t\t} while (incidentEdge.getId() != firstEdgeId);\n\t\t\t\tchords.put(v.getId(), chordCounter);\n\t\t\t}\n\t\t}\n\t}", "public Set<Vec3i> cisConnections();", "public PVector cohesion (ArrayList<Boid> boids) {\n float neighbordist = 50;\n PVector sum = new PVector(0, 0); // Start with empty vector to accumulate all positions\n int count = 0;\n for (Boid other : boids) {\n float d = PVector.dist(position, other.position);\n if ((d > 0) && (d < neighbordist)) {\n sum.add(other.position); // Add position\n count++;\n }\n }\n if (count > 0) {\n sum.div(count);\n return seek(sum); // Steer towards the position\n } else {\n return new PVector(0, 0);\n }\n }", "public boolean percolates() {\n return uf.connected(n*n, n*n+1);\r\n }", "public boolean percolates() {\n return myUF.connected(n*n, n*n + 1);\n }", "public int inDegree(int vertex) {\n int count = 0;\n//your code here\n for(int i=0; i<adjLists.length; i++){\n if(i==vertex){ continue;}\n if(isAdjacent(i,vertex)){\n count++;\n continue;\n }\n }\n return count;\n }", "public boolean percolates()\n {\n return uf.connected(topVirtualSite, bottomVirtualSite);\n }", "double getCostArc(K idVertexIni, K idVertexFin);", "@Override\n public long[ ][ ] count() {\n // precompute common nodes\n for (int x = 0; x < n; x++) {\n for (int n1 = 0; n1 < deg[x]; n1++) {\n int a = adj[x][n1];\n for (int n2 = n1 + 1; n2 < deg[x]; n2++) {\n int b = adj[x][n2];\n Tuple ab = createTuple(a, b);\n common2.put(ab, common2.getOrDefault(ab, 0) + 1);\n for (int n3 = n2 + 1; n3 < deg[x]; n3++) {\n int c = adj[x][n3];\n boolean st = adjacent(adj[a], b) ? (adjacent(adj[a], c) || adjacent(adj[b], c)) :\n (adjacent(adj[a], c) && adjacent(adj[b], c));\n if (!st) continue;\n Tuple abc = createTuple(a, b, c);\n common3.put(abc, common3.getOrDefault(abc, 0) + 1);\n }\n }\n }\n }\n\n // precompute triangles that span over edges\n int[ ] tri = countTriangles();\n\n // count full graphlets\n long[ ] C5 = new long[n];\n int[ ] neigh = new int[n];\n int[ ] neigh2 = new int[n];\n int nn, nn2;\n for (int x = 0; x < n; x++) {\n for (int nx = 0; nx < deg[x]; nx++) {\n int y = adj[x][nx];\n if (y >= x) break;\n nn = 0;\n for (int ny = 0; ny < deg[y]; ny++) {\n int z = adj[y][ny];\n if (z >= y) break;\n if (adjacent(adj[x], z)) {\n neigh[nn++] = z;\n }\n }\n for (int i = 0; i < nn; i++) {\n int z = neigh[i];\n nn2 = 0;\n for (int j = i + 1; j < nn; j++) {\n int zz = neigh[j];\n if (adjacent(adj[z], zz)) {\n neigh2[nn2++] = zz;\n }\n }\n for (int i2 = 0; i2 < nn2; i2++) {\n int zz = neigh2[i2];\n for (int j2 = i2 + 1; j2 < nn2; j2++) {\n int zzz = neigh2[j2];\n if (adjacent(adj[zz], zzz)) {\n C5[x]++;\n C5[y]++;\n C5[z]++;\n C5[zz]++;\n C5[zzz]++;\n }\n }\n }\n }\n }\n }\n\n int[ ] common_x = new int[n];\n int[ ] common_x_list = new int[n];\n int ncx = 0;\n int[ ] common_a = new int[n];\n int[ ] common_a_list = new int[n];\n int nca = 0;\n\n // set up a system of equations relating orbit counts\n for (int x = 0; x < n; x++) {\n for (int i = 0; i < ncx; i++) common_x[common_x_list[i]] = 0;\n ncx = 0;\n\n // smaller graphlets\n orbit[x][0] = deg[x];\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = adj[x][nx1];\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = adj[x][nx2];\n if (adjacent(adj[a], b)) orbit[x][3]++;\n else orbit[x][2]++;\n }\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n if (b != x && !adjacent(adj[x], b)) {\n orbit[x][1]++;\n if (common_x[b] == 0) common_x_list[ncx++] = b;\n common_x[b]++;\n }\n }\n }\n\n long f_71 = 0, f_70 = 0, f_67 = 0, f_66 = 0, f_58 = 0, f_57 = 0; // 14\n long f_69 = 0, f_68 = 0, f_64 = 0, f_61 = 0, f_60 = 0, f_55 = 0, f_48 = 0, f_42 = 0, f_41 = 0; // 13\n long f_65 = 0, f_63 = 0, f_59 = 0, f_54 = 0, f_47 = 0, f_46 = 0, f_40 = 0; // 12\n long f_62 = 0, f_53 = 0, f_51 = 0, f_50 = 0, f_49 = 0, f_38 = 0, f_37 = 0, f_36 = 0; // 8\n long f_44 = 0, f_33 = 0, f_30 = 0, f_26 = 0; // 11\n long f_52 = 0, f_43 = 0, f_32 = 0, f_29 = 0, f_25 = 0; // 10\n long f_56 = 0, f_45 = 0, f_39 = 0, f_31 = 0, f_28 = 0, f_24 = 0; // 9\n long f_35 = 0, f_34 = 0, f_27 = 0, f_18 = 0, f_16 = 0, f_15 = 0; // 4\n long f_17 = 0; // 5\n long f_22 = 0, f_20 = 0, f_19 = 0; // 6\n long f_23 = 0, f_21 = 0; // 7\n\n for (int nx1 = 0; nx1 < deg[x]; nx1++) {\n int a = inc[x][nx1]._1, xa = inc[x][nx1]._2;\n\n for (int i = 0; i < nca; i++) common_a[common_a_list[i]] = 0;\n nca = 0;\n for (int na = 0; na < deg[a]; na++) {\n int b = adj[a][na];\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = adj[b][nb];\n if (c == a || adjacent(adj[a], c)) continue;\n if (common_a[c] == 0) common_a_list[nca++] = c;\n common_a[c]++;\n }\n }\n\n // x = orbit-14 (tetrahedron)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || !adjacent(adj[b], c)) continue;\n orbit[x][14]++;\n f_70 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_71 += (tri[xa] > 2 && tri[xb] > 2) ? (common3.getOrDefault(createTuple(x, a, b), 0) - 1) : 0;\n f_71 += (tri[xa] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, a, c), 0) - 1) : 0;\n f_71 += (tri[xb] > 2 && tri[xc] > 2) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_67 += tri[xa] - 2 + tri[xb] - 2 + tri[xc] - 2;\n f_66 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(a, c), 0) - 2;\n f_66 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_58 += deg[x] - 3;\n f_57 += deg[a] - 3 + deg[b] - 3 + deg[c] - 3;\n }\n }\n\n // x = orbit-13 (diamond)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (!adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][13]++;\n f_69 += (tri[xb] > 1 && tri[xc] > 1) ? (common3.getOrDefault(createTuple(x, b, c), 0) - 1) : 0;\n f_68 += common3.getOrDefault(createTuple(a, b, c), 0) - 1;\n f_64 += common2.getOrDefault(createTuple(b, c), 0) - 2;\n f_61 += tri[xb] - 1 + tri[xc] - 1;\n f_60 += common2.getOrDefault(createTuple(a, b), 0) - 1;\n f_60 += common2.getOrDefault(createTuple(a, c), 0) - 1;\n f_55 += tri[xa] - 2;\n f_48 += deg[b] - 2 + deg[c] - 2;\n f_42 += deg[x] - 3;\n f_41 += deg[a] - 3;\n }\n }\n\n // x = orbit-12 (diamond)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][12]++;\n f_65 += (tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_63 += common_x[c] - 2;\n f_59 += tri[ac] - 1 + common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_54 += common2.getOrDefault(createTuple(a, b), 0) - 2;\n f_47 += deg[x] - 2;\n f_46 += deg[c] - 2;\n f_40 += deg[a] - 3 + deg[b] - 3;\n }\n }\n\n // x = orbit-8 (cycle)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int na = 0; na < deg[a]; na++) {\n int c = inc[a][na]._1, ac = inc[a][na]._2;\n if (c == x || adjacent(adj[x], c) || !adjacent(adj[b], c)) continue;\n orbit[x][8]++;\n f_62 += (tri[ac] > 0) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_53 += tri[xa] + tri[xb];\n f_51 += tri[ac] + common2.getOrDefault(createTuple(c, b), 0);\n f_50 += common_x[c] - 2;\n f_49 += common_a[b] - 2;\n f_38 += deg[x] - 2;\n f_37 += deg[a] - 2 + deg[b] - 2;\n f_36 += deg[c] - 2;\n }\n }\n\n // x = orbit-11 (paw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nx3 = 0; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (c == a || c == b || adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][11]++;\n f_44 += tri[xc];\n f_33 += deg[x] - 3;\n f_30 += deg[c] - 1;\n f_26 += deg[a] - 2 + deg[b] - 2;\n }\n }\n\n // x = orbit-10 (paw)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (!adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][10]++;\n f_52 += common_a[c] - 1;\n f_43 += tri[bc];\n f_32 += deg[b] - 3;\n f_29 += deg[c] - 1;\n f_25 += deg[a] - 2;\n }\n }\n\n // x = orbit-9 (paw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || !adjacent(adj[b], c) || adjacent(adj[x], c)) continue;\n orbit[x][9]++;\n f_56 += (tri[ab] > 1 && tri[ac] > 1) ? common3.getOrDefault(createTuple(a, b, c), 0) : 0;\n f_45 += common2.getOrDefault(createTuple(b, c), 0) - 1;\n f_39 += tri[ab] - 1 + tri[ac] - 1;\n f_31 += deg[a] - 3;\n f_28 += deg[x] - 1;\n f_24 += deg[b] - 2 + deg[c] - 2;\n }\n }\n\n // x = orbit-4 (path)\n for (int na = 0; na < deg[a]; na++) {\n int b = inc[a][na]._1, ab = inc[a][na]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == a || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][4]++;\n f_35 += common_a[c] - 1;\n f_34 += common_x[c];\n f_27 += tri[bc];\n f_18 += deg[b] - 2;\n f_16 += deg[x] - 1;\n f_15 += deg[c] - 1;\n }\n }\n\n // x = orbit-5 (path)\n for (int nx2 = 0; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (b == a || adjacent(adj[a], b)) continue;\n for (int nb = 0; nb < deg[b]; nb++) {\n int c = inc[b][nb]._1, bc = inc[b][nb]._2;\n if (c == x || adjacent(adj[a], c) || adjacent(adj[x], c)) continue;\n orbit[x][5]++;\n f_17 += deg[a] - 1;\n }\n }\n\n // x = orbit-6 (claw)\n for (int na1 = 0; na1 < deg[a]; na1++) {\n int b = inc[a][na1]._1, ab = inc[a][na1]._2;\n if (b == x || adjacent(adj[x], b)) continue;\n for (int na2 = na1 + 1; na2 < deg[a]; na2++) {\n int c = inc[a][na2]._1, ac = inc[a][na2]._2;\n if (c == x || adjacent(adj[x], c) || adjacent(adj[b], c)) continue;\n orbit[x][6]++;\n f_22 += deg[a] - 3;\n f_20 += deg[x] - 1;\n f_19 += deg[b] - 1 + deg[c] - 1;\n }\n }\n\n // x = orbit-7 (claw)\n for (int nx2 = nx1 + 1; nx2 < deg[x]; nx2++) {\n int b = inc[x][nx2]._1, xb = inc[x][nx2]._2;\n if (adjacent(adj[a], b)) continue;\n for (int nx3 = nx2 + 1; nx3 < deg[x]; nx3++) {\n int c = inc[x][nx3]._1, xc = inc[x][nx3]._2;\n if (adjacent(adj[a], c) || adjacent(adj[b], c)) continue;\n orbit[x][7]++;\n f_23 += deg[x] - 3;\n f_21 += deg[a] - 1 + deg[b] - 1 + deg[c] - 1;\n }\n }\n }\n\n // solve equations\n orbit[x][72] = C5[x];\n orbit[x][71] = (f_71 - 12 * orbit[x][72]) / 2;\n orbit[x][70] = (f_70 - 4 * orbit[x][72]);\n orbit[x][69] = (f_69 - 2 * orbit[x][71]) / 4;\n orbit[x][68] = (f_68 - 2 * orbit[x][71]);\n orbit[x][67] = (f_67 - 12 * orbit[x][72] - 4 * orbit[x][71]);\n orbit[x][66] = (f_66 - 12 * orbit[x][72] - 2 * orbit[x][71] - 3 * orbit[x][70]);\n orbit[x][65] = (f_65 - 3 * orbit[x][70]) / 2;\n orbit[x][64] = (f_64 - 2 * orbit[x][71] - 4 * orbit[x][69] - 1 * orbit[x][68]);\n orbit[x][63] = (f_63 - 3 * orbit[x][70] - 2 * orbit[x][68]);\n orbit[x][62] = (f_62 - 1 * orbit[x][68]) / 2;\n orbit[x][61] = (f_61 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][67]) / 2;\n orbit[x][60] = (f_60 - 4 * orbit[x][71] - 2 * orbit[x][68] - 2 * orbit[x][67]);\n orbit[x][59] = (f_59 - 6 * orbit[x][70] - 2 * orbit[x][68] - 4 * orbit[x][65]);\n orbit[x][58] = (f_58 - 4 * orbit[x][72] - 2 * orbit[x][71] - 1 * orbit[x][67]);\n orbit[x][57] = (f_57 - 12 * orbit[x][72] - 4 * orbit[x][71] - 3 * orbit[x][70] - 1 * orbit[x][67] - 2 * orbit[x][66]);\n orbit[x][56] = (f_56 - 2 * orbit[x][65]) / 3;\n orbit[x][55] = (f_55 - 2 * orbit[x][71] - 2 * orbit[x][67]) / 3;\n orbit[x][54] = (f_54 - 3 * orbit[x][70] - 1 * orbit[x][66] - 2 * orbit[x][65]) / 2;\n orbit[x][53] = (f_53 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63]);\n orbit[x][52] = (f_52 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59]) / 2;\n orbit[x][51] = (f_51 - 2 * orbit[x][68] - 2 * orbit[x][63] - 4 * orbit[x][62]);\n orbit[x][50] = (f_50 - 1 * orbit[x][68] - 2 * orbit[x][63]) / 3;\n orbit[x][49] = (f_49 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][62]) / 2;\n orbit[x][48] = (f_48 - 4 * orbit[x][71] - 8 * orbit[x][69] - 2 * orbit[x][68] - 2 * orbit[x][67] - 2 * orbit[x][64] - 2 * orbit[x][61] - 1 * orbit[x][60]);\n orbit[x][47] = (f_47 - 3 * orbit[x][70] - 2 * orbit[x][68] - 1 * orbit[x][66] - 1 * orbit[x][63] - 1 * orbit[x][60]);\n orbit[x][46] = (f_46 - 3 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][65] - 1 * orbit[x][63] - 1 * orbit[x][59]);\n orbit[x][45] = (f_45 - 2 * orbit[x][65] - 2 * orbit[x][62] - 3 * orbit[x][56]);\n orbit[x][44] = (f_44 - 1 * orbit[x][67] - 2 * orbit[x][61]) / 4;\n orbit[x][43] = (f_43 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59]) / 2;\n orbit[x][42] = (f_42 - 2 * orbit[x][71] - 4 * orbit[x][69] - 2 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][55]);\n orbit[x][41] = (f_41 - 2 * orbit[x][71] - 1 * orbit[x][68] - 2 * orbit[x][67] - 1 * orbit[x][60] - 3 * orbit[x][55]);\n orbit[x][40] = (f_40 - 6 * orbit[x][70] - 2 * orbit[x][68] - 2 * orbit[x][66] - 4 * orbit[x][65] - 1 * orbit[x][60] - 1 * orbit[x][59] - 4 * orbit[x][54]);\n orbit[x][39] = (f_39 - 4 * orbit[x][65] - 1 * orbit[x][59] - 6 * orbit[x][56]) / 2;\n orbit[x][38] = (f_38 - 1 * orbit[x][68] - 1 * orbit[x][64] - 2 * orbit[x][63] - 1 * orbit[x][53] - 3 * orbit[x][50]);\n orbit[x][37] = (f_37 - 2 * orbit[x][68] - 2 * orbit[x][64] - 2 * orbit[x][63] - 4 * orbit[x][62] - 1 * orbit[x][53] - 1 * orbit[x][51] - 4 * orbit[x][49]);\n orbit[x][36] = (f_36 - 1 * orbit[x][68] - 2 * orbit[x][63] - 2 * orbit[x][62] - 1 * orbit[x][51] - 3 * orbit[x][50]);\n orbit[x][35] = (f_35 - 1 * orbit[x][59] - 2 * orbit[x][52] - 2 * orbit[x][45]) / 2;\n orbit[x][34] = (f_34 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51]) / 2;\n orbit[x][33] = (f_33 - 1 * orbit[x][67] - 2 * orbit[x][61] - 3 * orbit[x][58] - 4 * orbit[x][44] - 2 * orbit[x][42]) / 2;\n orbit[x][32] = (f_32 - 2 * orbit[x][66] - 1 * orbit[x][60] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][43] - 2 * orbit[x][41] - 1 * orbit[x][40]) / 2;\n orbit[x][31] = (f_31 - 2 * orbit[x][65] - 1 * orbit[x][59] - 3 * orbit[x][56] - 1 * orbit[x][43] - 2 * orbit[x][39]);\n orbit[x][30] = (f_30 - 1 * orbit[x][67] - 1 * orbit[x][63] - 2 * orbit[x][61] - 1 * orbit[x][53] - 4 * orbit[x][44]);\n orbit[x][29] = (f_29 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][60] - 1 * orbit[x][59] - 1 * orbit[x][53] - 2 * orbit[x][52] - 2 * orbit[x][43]);\n orbit[x][28] = (f_28 - 2 * orbit[x][65] - 2 * orbit[x][62] - 1 * orbit[x][59] - 1 * orbit[x][51] - 1 * orbit[x][43]);\n orbit[x][27] = (f_27 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][45]) / 2;\n orbit[x][26] = (f_26 - 2 * orbit[x][67] - 2 * orbit[x][63] - 2 * orbit[x][61] - 6 * orbit[x][58] - 1 * orbit[x][53] - 2 * orbit[x][47] - 2 * orbit[x][42]);\n orbit[x][25] = (f_25 - 2 * orbit[x][66] - 2 * orbit[x][64] - 1 * orbit[x][59] - 2 * orbit[x][57] - 2 * orbit[x][52] - 1 * orbit[x][48] - 1 * orbit[x][40]) / 2;\n orbit[x][24] = (f_24 - 4 * orbit[x][65] - 4 * orbit[x][62] - 1 * orbit[x][59] - 6 * orbit[x][56] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][39]);\n orbit[x][23] = (f_23 - 1 * orbit[x][55] - 1 * orbit[x][42] - 2 * orbit[x][33]) / 4;\n orbit[x][22] = (f_22 - 2 * orbit[x][54] - 1 * orbit[x][40] - 1 * orbit[x][39] - 1 * orbit[x][32] - 2 * orbit[x][31]) / 3;\n orbit[x][21] = (f_21 - 3 * orbit[x][55] - 3 * orbit[x][50] - 2 * orbit[x][42] - 2 * orbit[x][38] - 2 * orbit[x][33]);\n orbit[x][20] = (f_20 - 2 * orbit[x][54] - 2 * orbit[x][49] - 1 * orbit[x][40] - 1 * orbit[x][37] - 1 * orbit[x][32]);\n orbit[x][19] = (f_19 - 4 * orbit[x][54] - 4 * orbit[x][49] - 1 * orbit[x][40] - 2 * orbit[x][39] - 1 * orbit[x][37] - 2 * orbit[x][35] - 2 * orbit[x][31]);\n orbit[x][18] = (f_18 - 1 * orbit[x][59] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][45] - 2 * orbit[x][36] - 2 * orbit[x][27] - 1 * orbit[x][24]) / 2;\n orbit[x][17] = (f_17 - 1 * orbit[x][60] - 1 * orbit[x][53] - 1 * orbit[x][51] - 1 * orbit[x][48] - 1 * orbit[x][37] - 2 * orbit[x][34] - 2 * orbit[x][30]) / 2;\n orbit[x][16] = (f_16 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][46] - 2 * orbit[x][36] - 2 * orbit[x][34] - 1 * orbit[x][29]);\n orbit[x][15] = (f_15 - 1 * orbit[x][59] - 2 * orbit[x][52] - 1 * orbit[x][51] - 2 * orbit[x][45] - 2 * orbit[x][35] - 2 * orbit[x][34] - 2 * orbit[x][27]);\n }\n\n return orbit;\n }", "void bellman_ford(int s)\n {\n int dist[]=new int[V]; \n \n //to track the path from s to all\n int parent[]=new int[V] ;\n //useful when a vertex has no parent\n for(int i=0;i<V;i++)\n parent[i]=-2;\n \n for(int i=0;i<V;i++) \n dist[i]=INF;\n \n //start from source vertex\n dist[s]=0;\n parent[s]=-1;\n \n //we have to iterate over all the edges for V-1 times\n //each ith iteration finds atleast ith path length dist\n //worst case each ith will find ith path length \n \n for(int i=1;i<V;i++) \n {\n for(int j=0;j<E;j++)\n {\n //conside for all edges (u,v), wt\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt; \n //since dist[u]=INF and adding to it=>overflow, therefore check first\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n dist[v]=dist[u]+wt;\n parent[v]=u;\n } \n }\n }\n \n //iterate for V-1 times, one more iteration necessarily gives a path length of atleast V in W.C=>cycle\n for(int j=0;j<E;j++) \n {\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt;\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n System.out.println(\"Graph has cycle\");\n return;\n } \n }\n \n //print the distance to all from s\n System.out.println(\"from source \"+s+\" the dist to all other\");\n print_dist(dist); \n print_path(parent,dist,s); \n \n }", "public boolean percolates() {\n return unionFind.connected(topRoot, bottomRoot);\n }", "public Set<Pair<V,V>> neighbourEdgesOf(V vertex);", "public boolean percolates() {\n\t\treturn linearGrid.connected(0, 1);\n\t}", "public void makeNeighboursOrientationConsistent(ScalarOperator sop,\n\t\t\tFlagMap flags) {\n\t\tStack<Object[]> upcoming = new Stack<Object[]>();\n\t\tTriangleElt3D current = this;\n\t\tdo {\n\t\t\t// set visited status\n\t\t\tflags.add(current);\n\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tTriangleElt3D nb = current.getNeighbour(i);\n\t\t\t\tif (nb != null && (!flags.check(nb))) {\n\t\t\t\t\tupcoming.push(new Object[] { i, nb, current });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tObject[] nbObj = null;\n\t\t\ttry {\n\t\t\t\tnbObj = upcoming.pop();\n\t\t\t} catch (EmptyStackException ese) {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tint index = -1;\n\t\t\tTriangleElt3D nb = null;\n\t\t\tTriangleElt3D current2 = null;\n\t\t\tif (nbObj != null) {\n\t\t\t\tindex = (Integer) nbObj[0];\n\t\t\t\tnb = (TriangleElt3D) nbObj[1];\n\t\t\t\tcurrent2 = (TriangleElt3D) nbObj[2];\n\t\t\t}\n\n\t\t\tif ((nb != null) && (!flags.check(nb))) {\n\t\t\t\t// if not already visited\n\n\t\t\t\t// point indices of common edge (common edge has (in this)\n\t\t\t\t// direction p1->p2)\n\t\t\t\tint p1 = (index + 1) % 3;\n\t\t\t\tint p2 = (index + 2) % 3;\n\n\t\t\t\tint j = 0;\n\n\t\t\t\t// find nb's index j for opposite point of common edge\n\t\t\t\tfor (j = 0; j < 3; j++)\n\t\t\t\t\tif (!(current2.getPoint(p1).isEqual(nb.getPoint(j), sop) || current2\n\t\t\t\t\t\t\t.getPoint(p2).isEqual(nb.getPoint(j), sop)))\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t// nb's index for first point of common edge\n\t\t\t\tj = (j + 1) % 3;\n\n\t\t\t\tif (current2.getPoint(p1).isEqual(nb.getPoint(j), sop))\n\t\t\t\t\tnb.invertOrientation();\n\n\t\t\t\t// orientNeighbours for nb\n\t\t\t}\n\t\t\tcurrent = nb;\n\n\t\t} while (upcoming.size() != 0 || current != null);\n\n\t}", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "BetweennessCentrality(UndirectedWeightedGraph graph, String nodeId) throws NotFoundNodeException {\r\n\r\n\t\t\r\n\t\tthis.nodeId = nodeId;\r\n\r\n\t\tif (!graph.containsNode(nodeId)) {\r\n\t\t\tthrow new NotFoundNodeException(graph, nodeId);\r\n\t\t}\r\n\t\t\r\n\t\tArrayList<String> nodeArrayList = new ArrayList<String>( graph.getNodeList().keySet() );\r\n\t\t\t\t\r\n\t\tShortestPathMatrix sMatrix = graph.getShortestPathMatrix();\r\n\r\n\t\tfor (int i = 0; i < nodeArrayList.size(); i++) {\r\n\t\t\t\r\n\t\t\tString startId = nodeArrayList.get(i);\r\n\t\t\tif (startId.equals(nodeId)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// for each end node, different from start node, nodeId\r\n\t\t\tfor (int j = i; j < nodeArrayList.size(); j++) {\r\n\t\t\t\tString endId = nodeArrayList.get(j);\r\n\t\t\t\tif (endId.equals(nodeId) ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// find the number and the list of shortest path between 1st and 2nd node\r\n\t\t\t\tShortestPath shortestPath = sMatrix.getShortestPath(startId, endId);\r\n\t\t\t\tArrayList<ArrayList<String>> pathList = shortestPath.getPathList();\r\n\t\t\t\t\t\r\n\t\t\t\tint sigma1 = 0;\r\n\t\t\t\tint sigma2 = pathList.size(); \r\n\t\t\t\t\t\r\n\t\t\t\t// find the number of SP go through third node\r\n\t\t\t\tfor (ArrayList<String> path : pathList) {\r\n\t\t\t\t\tif (path.contains(nodeId)) {\r\n\t\t\t\t\t\tsigma1 += 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// add sigma1 / sigma2 into bcl\r\n\t\t\t\tbcm += ((double) sigma1 / sigma2);\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public PVector cohesion (ArrayList<Boid> boids) {\n float neighbordist = 90.0f;\n PVector steer = new PVector(0,0); // Start with empty vector to accumulate all locations\n int count = 0;\n for (Boid other : boids) {\n float d = PVector.dist(location,other.location);\n if ((d > 0) && (d < neighbordist)) {\n steer.add(other.location); // Add location\n count++;\n }\n }\n if (count > 0) {\n steer.div((float)count);\n return seek(steer); // Steer towards the location\n }\n return steer;\n }", "@Override\n\t\tpublic double heuristic() {\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tsum += Math.abs(xGoals[i] - state[i]);\n\t\t\t\tsum += Math.abs(yGoals[i] - state[k + i]);\n\t\t\t}\n\t\t\treturn sum;\n\t\t}", "@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean isCentral() {\n return distanceToCentral() == 0;\n }", "public boolean percolates(){\r\n\t\treturn uf.connected(N * N, N * N + 1);\r\n\t}", "public boolean percolates() {\n return mainObject.connected(vsite1, vsite2);\n }", "public Vector getCenters(){\n\treturn synchroCenters;\n }", "boolean hasIsVertexOf();", "boolean hasIsCentralNode();", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "public Vector getAdjacentNodes()\n\t{\n\t\tVector vAdjNodes = new Vector();\n\t\t\n\t\tfor (int i = 0; i < m_vConnectedNodes.size(); i++)\n\t\t{\n\t\t\tif ( ((NodeConnection)m_vConnectedNodes.get(i)).getCost() > 0 )\n\t\t\t{\n\t\t\t\tvAdjNodes.add(((NodeConnection)m_vConnectedNodes.get(i)).getLinkedNode());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn vAdjNodes;\n\t}", "boolean hasNormal();", "private Vector3D convexCellBarycenter(final Vertex start) {\n\n int n = 0;\n Vector3D sumB = Vector3D.ZERO;\n\n // loop around the cell\n for (Edge e = start.getOutgoing(); n == 0 || e.getStart() != start; e = e.getEnd().getOutgoing()) {\n sumB = new Vector3D(1, sumB, e.getLength(), e.getCircle().getPole());\n n++;\n }\n\n return sumB.normalize();\n\n }", "private boolean checkConvexity()\r\n \t{\r\n\t\tswap(0, findLowest());\r\n\t\tArrays.sort(v, new Comparator() {\r\n\t\t\tpublic int compare(Object a, Object b)\r\n\t\t\t{\r\n\t\t\t\tint as = area_sign(v[0], (Pointd)a, (Pointd)b);\r\n\t\t\t\tif ( as > 0)\t\t/* left turn */\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\telse if (as < 0)\t/* right turn */\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\telse \t\t\t\t\t/* collinear */\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble x = Math.abs(((Pointd)a).getx() - v[0].getx()) - Math.abs(((Pointd)b).getx() - v[0].getx());\r\n\t\t\t\t\tdouble y = Math.abs(((Pointd)a).gety() - v[0].gety()) - Math.abs(((Pointd)b).gety() - v[0].gety());\r\n\t\t\t\t\tif ( (x < 0) || (y < 0) )\r\n\t\t\t\t\t\treturn -1;\r\n\t\t\t\t\telse if ( (x > 0) || (y > 0) )\r\n\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\telse\t\t// points are coincident\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n \t\tfor (int i=0; i < nv; i++)\r\n \t\t{\r\n \t\t\ti2 = next(i, nv);\r\n \t\t\ti3 = next(i2, nv);\r\n \t\t\tif ( !lefton(\tv[i], v[i2], v[i3]) )\r\n \t\t\t\treturn false;\r\n \t\t}\r\n \t\treturn true;\r\n\t}", "public boolean isCentral() {\n return (distanceToCentral() == 0);\n }", "public abstract int neighboursInBlock(Set<Integer> block, int vertexIndex);", "public int m(){\n int m = 0;\n // looping through adj matrix to check if edge.\n // increments counter if so.\n for (int i = 0; i < n; i++){\n for (int j = 0; j < n; j++){\n if (edges[i][j] > 0){\n m++;\n }\n }\n }\n return m / 2;\n }", "private static int nonIsolatedVertex(Graph G) {\n for (int v = 0; v < G.V(); v++)\n if (G.degree(v) > 0)\n return v;\n return -1;\n }", "public boolean percolates() {\n return mainUnion.connected(virtualTopId, virtualBottomId);\n }", "public static void calcDistancesForLayout(Mesh mesh, Graph graph) {\n\t\tgraph.setupDissimilarityForPlacement();\n\n\t\t// Setup an array for dissimilarity calculation\n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v = mesh.getVertex(i);\n\t\t\tv.dissim = new double[mesh.getNumVertices()];\n\t\t}\n\t\t\t\n\t\t// for each pair of the vertices\n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\n\t\t\t\t// calculate inner product\n\t\t\t\tdouble dis1 = 0.0;\n\t\t\t\tif(graph.attributeType == graph.ATTRIBUTE_VECTOR) {\n\t\t\t\t\tdouble average1[] = new double[graph.vectorname.length];\n\t\t\t\t\tdouble average2[] = new double[graph.vectorname.length];\n\t\t\t\t\tfor(int k = 0; k < graph.vectorname.length; k++) {\n\t\t\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\t\t\taverage1[k] += n1.getValue(k);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int ii = 0; ii < v2.nodes.size(); ii++) {\n\t\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(ii);\n\t\t\t\t\t\t\taverage2[k] += n2.getValue(k);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdouble d1 = 0.0, d2 = 0.0;\t\t\n\t\t\t\t\tfor(int k = 0; k < graph.vectorname.length; k++) {\n\t\t\t\t\t\tdis1 += (average1[k] * average2[k]);\n\t\t\t\t\t\td1 += (average1[k] * average1[k]);\n\t\t\t\t\t\td2 += (average2[k] * average2[k]);\n\t\t\t\t\t}\n\t\t\t\t\tif(dis1 < 0.0) dis1 = 0.0;\n\t\t\t\t\telse\n\t\t\t\t\t\tdis1 /= (Math.sqrt(d1) * Math.sqrt(d2));\n\t\t\t\t\tdis1 = 1.0 - dis1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// retrieve distance value\n\t\t\t\telse {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(0);\n\t\t\t\t\tNode n2 = (Node)v2.nodes.get(0);\n\t\t\t\t\tdis1 = n1.getDisSim1(n2.getId());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// for each pair of the nodes belonging to the two vertices\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int ii = 0; ii < v1.nodes.size(); ii++) {\n\t\t\t\t\tNode n1 = (Node)v1.nodes.get(ii);\n\t\t\t\t\tfor(int jj = 0; jj < v2.nodes.size(); jj++) {\n\t\t\t\t\t\tNode n2 = (Node)v2.nodes.get(jj);\n\t\t\t\t\t\tif(graph.isTwoNodeConnected(n1, n2) == true)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdouble dis2 = 1.0 / (double)(1 + count);\n\t\t\t\t\n\t\t\t\t//double dis = graph.distanceRatio * dis1 + (1.0 - graph.distanceRatio) * dis2;\n\t\t\t\tdouble dis = dis2;\n\t\t\t\tv1.dissim[j] = v2.dissim[i] = dis;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\n\t}", "private void computeSat(){\n addVertexVisitConstraint();\n //add clause for each vertex must be visited only once/ all vertices must be on path\n addVertexPositionConstraint();\n //add clause for every edge in graph to satisfy constraint of vertices not belonging to edge not part of successive positions\n addVertexNonEdgeConstraint();\n }", "public void balanceCentroids() {\n for(Cluster cluster : clusters)\n cluster.recalculateCentroid();\n }", "private void computeDependentCount() {\n dependentCountArray = new int[numNodes+1];\n for(int i = 0; i < dependentCountArray.length;i++){\n dependentCountArray[i] = 0;\n }\n for(int i = 0; i < adjMatrix.length; i++){\n int hasDependentCounter = 0;\n for(int j = 0; j < adjMatrix[i].length; j++){\n\n if(adjMatrix[i][j] == 1){\n if(!allNodes[i].orphan){\n hasDependentCounter++;\n }\n }\n\n }\n dependentCountArray[i] = hasDependentCounter;\n }\n\n for(int i = 0; i < dependentCountArray.length;i++){\n //System.out.println(i + \" has dependent \" + dependentCountArray[i]);\n }\n\n\n\n }", "public boolean percolates() {\n for (int i = n * n - n + 1; i <= n * n; i++) {\n if (weightedQuickUnionUF.connected(0, i)) {\n return true;\n }\n }\n return false;\n }", "public List<double[]> calculateCurvature(){\n List<double[]> values = new ArrayList<>();\n\n\n for(Node3D node: mesh.nodes){\n List<Triangle3D> t_angles = node_to_triangle.get(node);\n //all touching triangles.\n if(t_angles==null) continue;\n\n double[] curvature = getNormalAndCurvature(node, t_angles);\n double[] pt = node.getCoordinates();\n double mixedArea = calculateMixedArea(node);\n values.add(new double[]{\n pt[0], pt[1], pt[2],\n curvature[3],\n curvature[0], curvature[1], curvature[2],\n mixedArea\n });\n\n\n }\n return values;\n }", "@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public int getDegree(V vertex);", "private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}", "public abstract boolean isConnectedInDirection(N n1, E edgeValue, N n2);", "private void computeParentCount() {\n parentCountArray = new int[numNodes+1];\n for(int i = 0; i < parentCountArray.length;i++){\n parentCountArray[i] = 0;\n }\n for(int i = 0; i < adjMatrix.length; i++){\n int hasParentCounter = 0;\n for(int j = 0; j < adjMatrix[i].length; j++){\n if(allNodes[i].orphan){\n hasParentCounter = -1;\n break;\n }\n if(adjMatrix[j][i] == 1) {\n hasParentCounter++;\n }\n }\n parentCountArray[i] = hasParentCounter;\n }\n\n\n for(int i = 0; i < adjMatrix.length;i++){\n for(int j =0; j < adjMatrix[i].length;j++){\n if(adjMatrix[j][i] == 1){\n if(allNodes[j].orphan && allNodes[i].orphan == false){\n parentCountArray[i]--;\n }\n }\n }\n }\n\n\n\n\n for(int i = 0; i < parentCountArray.length; i++){\n // System.out.println(i + \" has parent \" +parentCountArray[i]);\n }\n\n\n\n\n\n }", "public double getClusterCoefficientJUNG()\r\n\t{\n\t\tMap<Entity, Double> coefficients = Metrics\r\n\t\t\t\t.clusteringCoefficients(undirectedGraph);\r\n\t\tdouble coefficientSum = 0.0;\r\n\t\t// logger.info(\"Clustering coefficients: \" + coefficients);\r\n\t\tfor (Entity vertex : coefficients.keySet()) {\r\n\t\t\t// logger.info(vertex + ((JUNGEntityVertex)\r\n\t\t\t// vertex).getVertexEntity());\r\n\t\t\tcoefficientSum += coefficients.get(vertex);\r\n\t\t}\r\n\t\treturn coefficientSum / getNumberOfNodes();\r\n\t}", "public float compare(Cluster other) {\n \treturn compare(center, other.center);\n }", "public static double computeClusterIndex(Map<String, List<String>> mCl) {\n\n\t\tdouble minCompactness = 0;\n\t\tdouble tempIsolation = 0;\n\t\tdouble maxIsolation = 0;\n\n\t\tList<String> arg1 = null;\n\t\tList<String> arg2 = null;\n\n\t\tdouble clusterGoodness = 0;\n\t\t// long n = (mCl.size()) * (mCl.size() - 1) / 2;\n\t\tfor (Entry<String, List<String>> e1 : mCl.entrySet()) {\n\n\t\t\tmaxIsolation = 0;\n\n\t\t\tfor (Entry<String, List<String>> e2 : mCl.entrySet()) {\n\t\t\t\tif (e2.getKey().hashCode() != e1.getKey().hashCode()) {\n\n\t\t\t\t\targ1 = e1.getValue();\n\t\t\t\t\targ2 = e2.getValue();\n\t\t\t\t\ttempIsolation = intraClusterScore(arg1, arg2);\n\n\t\t\t\t\t// get the maximum score, i.e the strongest intra-cluster\n\t\t\t\t\t// pair..\n\t\t\t\t\tmaxIsolation = (maxIsolation < tempIsolation) ? tempIsolation\n\t\t\t\t\t\t\t: maxIsolation;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// perform its own compactness\n\t\t\tminCompactness = getInterClusterScore(e1.getValue());\n\n\t\t\tclusterGoodness = clusterGoodness + (double) minCompactness\n\t\t\t\t\t/ ((maxIsolation == 0) ? Math.pow(10, -1) : maxIsolation);\n\n\t\t}\n\n\t\tclusterGoodness = (clusterGoodness == 0) ? (Math.pow(10, -8) - clusterGoodness)\n\t\t\t\t: clusterGoodness;\n\n\t\treturn (double) 1 / clusterGoodness;\n\n\t}", "public boolean percolates() {\n\t\treturn cellTree.connected(side * side, side * side + 1);\n\t}", "public boolean percolates() {\n return backwashQuickUnion.connected(virtualTop, virtualBottom);\n }", "public static Long neighborPairsSingle(Set<Integer>[] graph) {\n long triangleCount = 0;\n int degv, degu, degw;\n for (int v = 0; v < graph.length; v++) {\n degv = graph[v].size();\n for (Integer u : graph[v]) {\n degu = graph[u].size();\n if (degu > degv || (degu == degv && v < u)) {\n for (Integer w : graph[v]) {\n if (w <= u)\n continue;\n degw = graph[w].size();\n if (degw > degv || (degw == degv && v < w)) {\n if (graph[u].contains(w))\n triangleCount++;\n }\n }\n }\n }\n }\n return triangleCount;\n }", "private IntSet[] getNeighborhoodInitialization(\n Graph g,\n int numNeighborhoods,\n BiFunction<Graph, Integer, Double> scoreForNeighborhoodFn) {\n System.err.println(\"Going to get scores for all vertices\");\n double tic = System.currentTimeMillis();\n double[] conductanceScores = new double[this.numRows];\n Integer[] vertexIds = new Integer[this.numRows];\n for (int i = 0; i < this.numRows; i++) {\n conductanceScores[i] = scoreForNeighborhoodFn.apply(g, i);\n vertexIds[i] = i;\n if (i > 0 && i % 1000000 == 0) {\n System.err.format(\"Done getting scores for %d vertices\\r\", i);\n }\n }\n // Sort conductance scores in ascending order\n Arrays.sort(vertexIds,\n (i1, i2) -> (int) Math.signum(conductanceScores[i1] - conductanceScores[i2]));\n double toc = System.currentTimeMillis();\n System.err.println(\"Got scores for all vertices, time: \" + (toc - tic) / 1000 + \" secs\");\n\n // Loop over from lowest conductance, assign each neighborhood to a community\n IntSet[] initCommunity = new IntSet[numNeighborhoods];\n IntSet seen = new IntOpenHashSet(this.numRows);\n int kSoFar = 0;\n for (int i = 0; i < this.numRows; i++) {\n int vertexId = vertexIds[i];\n if (seen.contains(vertexId)) {\n continue;\n }\n IntSet c = new IntOpenHashSet(g.getDegree(vertexId));\n for (int l = 0; l < g.getDegree(vertexId); l++) {\n c.add(g.getNeighbors(vertexId)[l]);\n }\n c.add(vertexId);\n seen.addAll(c);\n initCommunity[kSoFar++] = c;\n if (kSoFar >= numNeighborhoods) {\n break;\n }\n }\n // Assign random vertex to empty community\n while (kSoFar < numNeighborhoods) {\n IntSet randomVertexIds = new IntOpenHashSet();\n randomVertexIds.add(ThreadLocalRandom.current().nextInt(this.numRows));\n initCommunity[kSoFar++] = randomVertexIds;\n }\n return initCommunity;\n }", "public Set<V> findCycles()\n {\n // ProbeIterator can't be used to handle this case,\n // so use StrongConnectivityAlgorithm instead.\n StrongConnectivityAlgorithm<V, E> inspector =\n new KosarajuStrongConnectivityInspector<>(graph);\n List<Set<V>> components = inspector.stronglyConnectedSets();\n\n // A vertex participates in a cycle if either of the following is\n // true: (a) it is in a component whose size is greater than 1\n // or (b) it is a self-loop\n\n Set<V> set = new LinkedHashSet<>();\n for (Set<V> component : components) {\n if (component.size() > 1) {\n // cycle\n set.addAll(component);\n } else {\n V v = component.iterator().next();\n if (graph.containsEdge(v, v)) {\n // self-loop\n set.add(v);\n }\n }\n }\n\n return set;\n }", "public boolean percolates() {\n return sitesUF.connected(upSiteIndex, downSiteIndex);\n }", "public boolean percolates() {\n \treturn weigtedJoin.connected(N * N, N * N + 1);\n }", "public abstract boolean isConnectedInDirection(N n1, N n2);", "public boolean percolates(){\n\t\treturn unionFind.connected(virtualBottom, virtualTop);\n\t}", "public static double calculateAverageCurvature(DeformableMesh3D sharedFaces) {\n double sum = 0;\n double area = 0;\n for(Node3D node: sharedFaces.nodes){\n List<Triangle3D> firstNeighbors = sharedFaces.triangles.stream().filter(\n t->t.containsNode(node)\n ).collect(Collectors.toList());\n if(firstNeighbors.size()==0){\n continue;\n }\n double[] row = getNormalAndCurvature(node, firstNeighbors);\n\n double ai = calculateMixedArea(node, firstNeighbors );\n area += ai;\n sum += row[3]*ai/2;\n\n }\n return sum/area;\n }", "int getDegree(V v);", "public boolean percolates(){\n return uf.connected(ufSize - 2, ufSize - 1);\n }", "@Override\r\n\tpublic int getNumberOfSymmetricLinks()\r\n\t{\r\n\t\tCollection<Entity> vertices = directedGraph.getVertices();\r\n\t\tint symLinksSum = 0;\r\n\r\n\t\t// this can be done still more efficiently if i put the nodes in a list\r\n\t\t// and remove from the\r\n\t\t// list current node as well as its children after each loop\r\n\t\t// int progress = 0;\r\n\t\t// int max = vertices.size();\r\n\r\n\t\tfor (Entity source : vertices) {\r\n\t\t\t// ApiUtilities.printProgressInfo(progress, max, 100,\r\n\t\t\t// ApiUtilities.ProgressInfoMode.TEXT, \"Counting symmetric links\");\r\n\t\t\tfor (Entity target : getChildren(source)) {\r\n\t\t\t\t// progress++;\r\n\r\n\t\t\t\tif (isSymmetricLink(source, target)) {\r\n\t\t\t\t\tsymLinksSum++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn symLinksSum / 2;\r\n\t}", "Collection<? extends Boolean> getIsCentralNode();", "public float influence(ArrayList<String> s)\n {\n HashMap<Integer, Integer> distances = new HashMap<>();\n HashMap<String, Integer> nodeDistances = new HashMap<>();\n\n for(String node : s){\n if(!graphVertexHashMap.containsKey(node)) continue;\n //At the end nodeDistances will contain min distance from all nodes to all other nodes\n getMinDistances(node, distances, nodeDistances);\n }\n distances = new HashMap<>();\n Iterator it = nodeDistances.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry entry = (Map.Entry) it.next();\n Integer distance = (Integer) entry.getValue();\n if(distances.containsKey(distance)){\n distances.put(distance, distances.get(distance)+1);\n }else{\n distances.put(distance, 1);\n }\n }\n return getTotal(distances);\n\n\n\n// float sum = 0.0f;\n// for(int i =0; i < numVertices; i++){\n// int y = gety(s, i);\n//// System.out.println(\"i is \" + i + \" and nodes at distance are \" + y);\n// sum += (1/(Math.pow(2,i)) * y);\n// }\n// return sum;\n }", "public void layout() {\n final int N = fNodes.length;\n final double k1 = 1.0;\n final double k2 = 100.0 * 100.0;\n\n double xc = 0.0;\n double yc = 0.0;\n for (int i = 0; i < N; i++) {\n NodeBase v = (NodeBase) fNodes[i];\n \n double xv = v.getX();\n double yv = v.getY();\n \n\t\t\tIterator uIter = fGraph.sourceNodeSet(v).iterator();\n\t\t\t\n double sumfx1 = 0.0;\n double sumfy1 = 0.0;\n while (uIter.hasNext() ) {\n NodeBase u = (NodeBase) uIter.next();\n double xu = u.getX();\n double yu = u.getY();\n double dx = xv - xu;\n double dy = yv - yu;\n double d = Math.sqrt(dx * dx + dy * dy);\n d = (d == 0) ? .0001 : d;\n double c = k1 * (d - fEdgeLen) / d;\n sumfx1 += c * dx;\n sumfy1 += c * dy;\n }\n\n uIter = fGraph.iterator();\n double sumfx2 = 0.0;\n double sumfy2 = 0.0;\n while (uIter.hasNext() ) {\n NodeBase u = (NodeBase) uIter.next();\n if (u == v )\n continue;\n// System.out.println(\"electrical u = \" + u.name());\n double xu = u.getX();\n double yu = u.getY();\n double dx = xv - xu;\n double dy = yv - yu;\n double d = dx * dx + dy * dy;\n if (d > 0 ) {\n double c = k2 / (d * Math.sqrt(d));\n sumfx2 += c * dx;\n sumfy2 += c * dy;\n }\n }\n // System.out.println(\"sumfx2 = \" + sumfx2);\n // System.out.println(\"sumfy2 = \" + sumfy2);\n\n // store new positions\n fXn[i] = xv - Math.max(-5, Math.min(5, sumfx1 - sumfx2));\n fYn[i] = yv - Math.max(-5, Math.min(5, sumfy1 - sumfy2));\n\n // for determining the center of the graph\n xc += fXn[i];\n yc += fYn[i];\n }\n\n // offset from center of graph to center of drawing area\n double dx = fWidth / 2 - xc / N;\n double dy = fHeight / 2 - yc / N;\n\n // use only small steps for smooth animation\n dx = Math.max(-5, Math.min(5, dx));\n dy = Math.max(-5, Math.min(5, dy));\n\n // set new positions\n for (int i = 0; i < N; i++) {\n NodeBase v = (NodeBase) fNodes[i];\n // move each node towards center of drawing area and keep\n // it within bounds\n double x = Math.max(fMarginX, Math.min(fWidth - fMarginX, fXn[i] + dx));\n double y = Math.max(fMarginY, Math.min(fHeight - fMarginY, fYn[i] + dy));\n v.setPosition(x, y);\n }\n }", "public Set<Set<Entity>> getEdgeBetweennessClusters(double ratioEdgesToRemove)\r\n\t{\r\n\t\tint numEdgesToRemove = (int) (getNumberOfEdges() * ratioEdgesToRemove);\r\n\t\tEdgeBetweennessClusterer<Entity, EntityGraphEdge> betweenClusterer = new EdgeBetweennessClusterer<Entity, EntityGraphEdge>(\r\n\t\t\t\tnumEdgesToRemove);\r\n\r\n\t\tList<Set<Entity>> clusters = new ArrayList<Set<Entity>>(\r\n\t\t\t\tbetweenClusterer.transform(directedGraph));\r\n\t\tlogger.info(\"Number of edge-betweenness clusters: \" + clusters.size());\r\n\t\tCollections.sort(clusters, sortListBySizeDescending);\r\n\r\n\t\tIterator<Set<Entity>> clusterIter = clusters.iterator();\r\n\t\tSet<Set<Entity>> clusterSet = new HashSet<Set<Entity>>();\r\n\r\n\t\twhile (clusterIter.hasNext()) {\r\n\t\t\tSet<Entity> nodeCluster = clusterIter.next();\r\n\t\t\tSet<Entity> entCluster = new HashSet<Entity>();\r\n\t\t\tfor (Entity node : nodeCluster) {\r\n\t\t\t\tentCluster.add(node);\r\n\t\t\t}\r\n\t\t\tlogger.info(\"Cluster's size: \" + entCluster.size());\r\n\t\t\tclusterSet.add(entCluster);\r\n\t\t}\r\n\t\treturn clusterSet;\r\n\t}", "abstract boolean estValideDirection(Coup c);", "public int inDegree(N v) {\n return getInEdges(v).size();\n }", "ArrayList<Edge> getAdjacencies();", "int[] primMST(float graph[][])\n {\n // Array to store constructed MST\n int parent[] = new int[V];\n \n // Key values used to pick minimum weight edge in cut\n float key[] = new float[V];\n \n // To represent set of vertices included in MST\n Boolean mstSet[] = new Boolean[V];\n \n // Initialize all keys as INFINITE\n for (int i = 0; i < V; i++) {\n key[i] = Integer.MAX_VALUE;\n mstSet[i] = false;\n }\n \n // Always include first 1st vertex in MST.\n key[0] = 0; // Make key 0 so that this vertex is\n // picked as first vertex\n parent[0] = 0; // First node is always root of MST\n \n // The MST will have V vertices\n for (int count = 0; count < V - 1; count++) {\n // Pick thd minimum key vertex from the set of vertices\n // not yet included in MST\n int u = minKey(key, mstSet);\n \n // Add the picked vertex to the MST Set\n mstSet[u] = true;\n \n // Update key value and parent index of the adjacent\n // vertices of the picked vertex. Consider only those\n // vertices which are not yet included in MST\n for (int v = 0; v < V; v++)\n \n // graph[u][v] is non zero only for adjacent vertices of m\n // mstSet[v] is false for vertices not yet included in MST\n // Update the key only if graph[u][v] is smaller than key[v]\n if (graph[u][v] != 0 && mstSet[v] == false && graph[u][v] < key[v]) {\n parent[v] = u;\n key[v] = graph[u][v];\n }\n }\n return parent;\n }", "Boolean isCollinearTo(IVec3 v);", "static int[] connectedCities(int n, int g, int[] originCities, int[] destinationCities) {\n Map<Integer, TreeSet<Integer>> m1 = new HashMap<>();\n\n Map<Integer, TreeSet<Integer>> m2 = new HashMap<>();\n\n for (int i = 0; i <originCities.length ; i++) {\n TreeSet<Integer> s1 = new TreeSet<>();\n int c=originCities[i];\n for (int j = c; j>=1 ; j--) {\n if(c%j==0)\n s1.add(j);\n }\n m1.put(c,s1);\n }\n\n\n for (int i = 0; i <destinationCities.length ; i++) {\n TreeSet<Integer> s1 = new TreeSet<>();\n int c=destinationCities[i];\n for (int j = c/2; j>=1 ; j--) {\n if(c%j==0)\n s1.add(j);\n }\n m2.put(c,s1);\n }\n\n\n int result [] = new int[originCities.length];\n for (int i = 0; i <originCities.length ; i++) {\n\n int max1 =m1.get(originCities[i]).last();\n\n int max2 =m2.get(destinationCities[i]).last();\n if(max1 <=g)\n result[i]=0;\n else if(max2 <=g)\n result[i]=0;\n else{\n TreeSet<Integer> s1 =m1.get(originCities[i]);\n TreeSet<Integer> s2 =m2.get(destinationCities[i]);\n for (Integer x: s1) {\n if(s2.contains(x)) {\n result[i] = 1;\n break;\n }\n\n }\n }\n\n }\n\n return result;\n\n }", "double dist(pair p1){\n\t\tdouble dx=(p1.x-centre.x);\n\t\tdouble dy=(p1.y-centre.y);\n\t\tcount++;\n\t\treturn java.lang.Math.sqrt((dx*dx)+(dy*dy));\n\t}", "public Set<V> getNeighbours(V vertex);", "public static void checkConsistency(){\n double[] aNormalW=new double[numberOfObjectives];\n double randomIndex=0;\n double sum=0;\n for (int row=0;row<numberOfObjectives;row++){\n for (int column=0;column<numberOfObjectives;column++){\n\n sum+=weights[column]*objectives[row][column];\n }\n df.setRoundingMode(RoundingMode.UP);\n aNormalW[row]= Double.valueOf(df.format(sum));\n sum=0;\n }\n double awtDividedByWt=0;\n for (int i=0;i<numberOfObjectives;i++){\n awtDividedByWt+=aNormalW[i]/weights[i];\n decimalFormat.setRoundingMode(RoundingMode.HALF_UP);\n Double.valueOf(decimalFormat.format(awtDividedByWt));\n }\n double reciprocalNumber=(double) 1/numberOfObjectives;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n Double.valueOf(decimalFormat.format(reciprocalNumber));\n double step3=reciprocalNumber*awtDividedByWt;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double numerator=Double.valueOf(decimalFormat.format(step3))-numberOfObjectives;\n double denominator=numberOfObjectives-1;\n decimalFormat.setRoundingMode(RoundingMode.UP);\n double ci=Double.valueOf(decimalFormat.format(numerator)) /denominator;\n decimalFormat.setRoundingMode(RoundingMode.CEILING);\n System.out.println(\"Consistency Index (CI)= \"+Double.valueOf(decimalFormat.format(ci)));\n System.out.println();\n double ciDividedByRI=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n // Double.valueOf(df.format(ciDividedByRI));\n if (ciDividedByRI<0.10){\n randomIndex=ci/table23(numberOfObjectives);\n decimalFormat.setRoundingMode(RoundingMode.UP);\n System.out.println(\"Random Index (RI)= \"+Double.valueOf(decimalFormat.format(randomIndex)));\n System.out.println(\"degree of consistency is satisfactory !!\");\n }else {\n System.out.println(\"the AHP may not yield meaningful results !!\");\n }\n System.out.println();\n }", "public abstract boolean isConnected(N n1, N n2);", "public PVector Cohesion(ArrayList<Animal> animals)\n {\n float desiredMaxDistance = cohesionDist; \n PVector sum = new PVector();\n int count = 0;\n for (Animal other : animals)\n {\n float distance = PVector.dist(pos, other.pos);\n if((distance > 0) && (distance > desiredMaxDistance) && (distance < alignDist)) // here is the main difference from seperation distance > desiredMaxDistanca\n {\n PVector diff = PVector.sub(other.pos, pos);\n diff.normalize();\n diff.mult(distance); // The further away the other animal is, the mere we should steer away from it\n sum.add(diff);\n count++; // increments each time another animals has been accounted for\n }\n } \n if (count > 0)\n {\n // make an average of all the directions by dividing with the total number of animals accounted for\n sum.div(count);\n sum.normalize();\n sum.mult(maxSpeed);\n sum.sub(velocity);\n sum.limit(maxForce);\n } \n \n return sum; \n }", "public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}", "public boolean esDeterministico(){\n NodoA x, y;\n x = primerElemento();\n y = x.getLigaDer();\n boolean bandera = true;\n while(x != cabeza){\n while(y != cabeza){\n if(y.getSimbolo().equals( x.getSimbolo())){\n \n if(!listaND.contains(x)){\n listaND.add(x);\n }\n \n bandera= false;\n }\n y = y.getLigaDer();\n }\n \n x = x.getLigaDer();\n y = x.getLigaDer();\n \n \n }\n \n return bandera;\n \n }", "@Test\r\n\tpublic void testDistancia0() \r\n\t{\r\n\t\tAssert.assertEquals(1.41, new Ponto(3,3).dist(new Ponto(4,2)), EPSILON);\r\n\t\tAssert.assertEquals(26.20, new Ponto(-7,-4).dist(new Ponto(17,6.5)), EPSILON);\t\r\n\t\tAssert.assertEquals(0.00, new Ponto(0,0).dist(new Ponto(0,0)), EPSILON);\t\r\n\t}", "public static boolean isAllVertexConnected(ArrayList<Edge>[] graph)\n {\n int count = 0;\n int n = graph.length;\n boolean[] vis = new boolean[n];\n\n for(int v = 0; v < n; v++) {\n if(vis[v] == false) {\n count++;\n\n //if number of connected components is greater than 1 then graph is not connected\n if(count > 1) {\n return false;\n }\n gcc(graph, v, vis);\n }\n }\n return true;\n\n }", "public static double getAverageBetweenessCentrality(GraphModel graphModel, AttributeModel attributeModel) {\n return getAverageGraphDistance(graphModel, attributeModel, GraphDistance.BETWEENNESS);\n }", "public float getCohesion() {\n\treturn 0;\n }", "public void reinitiallizeDistanceFunctionInside() {\n\t\tint i, j;\r\n\t\tfor (i = 0; i < _levelSet.length; i++) {\r\n\t\t\tfor (j = 0; j < _levelSet[i].length; j++) {\r\n\t\t\t\tint iPlus = imposeBorder(i + 1, _iSize);\r\n\t\t\t\tint iMinus = imposeBorder(i - 1, _iSize);\r\n\t\t\t\tint jPlus = imposeBorder(j + 1, _iSize);\r\n\t\t\t\tint jMinus = imposeBorder(j - 1, _iSize);\r\n\t\t\t\tif (_levelSet[i][j] <= 0) // // the check for points in region\r\n\t\t\t\t\t// // the check for points in border\r\n\t\t\t\t\tif (MatrixMath.anyNeighborIsOutside(_levelSet, i, j, iPlus,\r\n\t\t\t\t\t\t\tiMinus, jPlus, jMinus)) {\r\n\t\t\t\t\t\t// points in border are placed in narrowband\r\n\t\t\t\t\t\t// _narrowBandInside.add(new Location(i, j));\r\n\t\t\t\t\t\t_narrowBandInside.add(new Location(i, j));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// and location in distance matrix is set to infinite\r\n\t\t\t\t\t\t_levelSet[i][j] = Double.NEGATIVE_INFINITY;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// iterate until narrow band is empty\r\n\t\t// OrderByLevelSetValue comparator = new OrderByLevelSetValue();\r\n\t\t// while (_narrowBandInside.size() > 0) {\r\n\t\twhile (_narrowBandInside.size() > 0) {\r\n\t\t\t// get the maximum value\r\n\t\t\t// Location maxVal = _narrowBandInside.last();\r\n\t\t\tLocation maxVal = _narrowBandInside.last();\r\n\t\t\t// System.out.println(\"maxVal \" + maxVal);\r\n\t\t\t// System.out.println(\"_narrowBandInside.contains(maxVal) \"\r\n\t\t\t// + _narrowBandInside.contains(maxVal));\r\n\t\t\t// System.out.println(\"maxVal.compareTo(maxVal) \"\r\n\t\t\t// + maxVal.compareTo(maxVal));\r\n\r\n\t\t\t// get the neighbors that are still in _faraway\r\n\t\t\tint iPlus = imposeBorder(maxVal.i + 1, _iSize);\r\n\t\t\tint iMinus = imposeBorder(maxVal.i - 1, _iSize);\r\n\t\t\tint jPlus = imposeBorder(maxVal.j + 1, _iSize);\r\n\t\t\tint jMinus = imposeBorder(maxVal.j - 1, _iSize);\r\n\t\t\ttransferNeighborInside(iPlus, maxVal.j);\r\n\t\t\ttransferNeighborInside(iMinus, maxVal.j);\r\n\t\t\ttransferNeighborInside(maxVal.i, jPlus);\r\n\t\t\ttransferNeighborInside(maxVal.i, jMinus);\r\n\t\t\t// remove the value from the narrowband\r\n\t\t\t// _narrowBandInside.remove(maxVal);\r\n\t\t\t_narrowBandInside.remove(maxVal);\r\n\t\t}\r\n\t\t// done\r\n\t}", "public double calculateCurvatureGradient(int i){\n Node3D node = mesh.nodes.get(i);\n Set<Node3D> neighbors = getNeighbors(node);\n\n double[] k1 = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n double kh = Vector3DOps.normalize(k1)/2;\n double[] k2 = new double[k1.length];\n double kneighbors = 0;\n for(Node3D neighbor: neighbors){\n double[] ki = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n\n }\n\n return 0;\n }", "int getNumberOfVertexes();", "public boolean isEquilateral() {\r\n double d1 = pointA.distance(pointB);\r\n double d2 = pointA.distance(pointC);\r\n double d3 = pointB.distance(pointC);\r\n \r\n return(Math.abs(d1 - d2) < EPSILON && Math.abs(d1 - d3) < EPSILON && (Math.abs(d2 - d3) < EPSILON));\r\n }", "public void floyd_warshall()\n{\n /*\n * We get the minimum tree again, but we allow cycles this time. This gives\n * us the complete tree, but with edges ranked by priority.\n */\n this.minimumTree = this._getKruskalTree(true);\n for (int loop = 0;\n loop < this.nVerts;\n loop++\n ) {\n this.bellman_ford(loop);\n }\n}", "static void printStatistics(Mesh mesh, Graph graph) {\n\t\t\n\t\t//System.out.println(\" Clustering result: vertices=\" + mesh.getNumVertices());\n\t\t\n\t\tint sumEdges = 0, sumConnected = 0;\n\t\tint sumHubCsize = 0, sumHub = 0;\n\t\t\n\t\tfor(int i = 0; i < mesh.getNumVertices(); i++) {\n\t\t\tVertex v1 = mesh.getVertex(i);\n\t\t\tArrayList<Node> nodes1 = v1.getNodes();\n\t\t\tfor(int j = (i + 1); j < mesh.getNumVertices(); j++) {\n\t\t\t\tVertex v2 = mesh.getVertex(j);\n\t\t\t\tArrayList<Node> nodes2 = v2.getNodes();\n\t\t\t\t\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int ii = 0; ii < nodes1.size(); ii++) {\n\t\t\t\t\tNode n1 = nodes1.get(ii);\t\n\t\t\t\t\tfor(int jj = 0; jj < nodes2.size(); jj++) {\n\t\t\t\t\t\tNode n2 = nodes2.get(jj);\n\t\t\t\t\t\tif(graph.isTwoNodeConnected(n1, n2) == true)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count > 0) {\n\t\t\t\t\tsumEdges += count; sumConnected++;\n\t\t\t\t\tint id = count / 1;\n\t\t\t\t\tid = (id > 10) ? 10 : id;\n\t\t\t\t\tnumedgeHisto[id]++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int ii = 0; ii < nodes1.size(); ii++) {\n\t\t\t\tNode n1 = nodes1.get(ii);\t\n\t\t\t\tint nc = n1.getNumConnectedEdge() + n1.getNumConnectingEdge();\n\t\t\t\tif(nc < graph.maxDegree * 0.333333) continue;\n\t\t\t\tsumHub++; sumHubCsize += nodes1.size();\n\t\t\t}\n\t\t}\n\t\t\n\t\tdouble aveHubCsize = (double)sumHubCsize / (double)sumHub;\n\t\t//System.out.println(\" ... sumHub=\" + sumHub + \" aveHubCsize=\" + aveHubCsize);\n\t\t\n\t\tdouble aveEdges = (double)sumEdges / (double)sumConnected;\n\t\t//System.out.println(\" ... sumEdges=\" + sumEdges + \" aveEdges=\" + aveEdges);\n\t\t\n\t\t/*\n\t\tfor(int i = 0; i <= 10; i++)\n\t\t\tSystem.out.print(\" histo[\" + i + \"]=\" + numedgeHisto[i]);\n\t\tSystem.out.println(\"\");\n\t\t*/\n\t\n\t\t/*\n\t\tint numInEdge = 0;\n\t\tfor(Edge edge : graph.edges) {\n\t\t\tNode nodes[] = edge.getNode();\n\t\t\tif(nodes[0].getVertex() == nodes[1].getVertex())\n\t\t\t\tnumInEdge++;\n\t\t}\n\t\tSystem.out.println(\" numInEdge=\" + numInEdge);\n\t\t*/\n\t}", "public int getVertexCount();", "@Test\n void testIsConnected(){\n weighted_graph g = new WGraph_DS();\n for(int i = 1; i <= 7; i++){\n g.addNode(i);\n }\n g.connect(1,2,20);\n g.connect(1,5,15);\n g.connect(2,3,20);\n g.connect(5,6,15);\n g.connect(3,4,20);\n g.connect(6,4,15);\n g.connect(1,7,2);\n g.connect(7,4,50);\n weighted_graph_algorithms ga = new WGraph_Algo();\n ga.init(g);\n assertTrue(ga.isConnected());\n g.removeEdge(7,4);\n g.removeEdge(6,4);\n g.removeEdge(3,4);\n assertFalse(ga.isConnected());\n }", "private double computeForcesWithNeighbourCells() {\r\n double potentialEnergy = 0;\r\n for (Cell[] cellPair: neighbourCells) { \r\n if (cellPair[1].firstMolecule == null) continue; // If cell2 is empty, skip\r\n \r\n for (Molecule m1 = cellPair[0].firstMolecule; m1 != null; m1 = m1.nextMoleculeInCell) {\r\n for (Molecule m2 = cellPair[1].firstMolecule; m2 != null; m2 = m2.nextMoleculeInCell) {\r\n double pe = computeForceBetweenMolecules(m1, m2);\r\n if (pe != 0) {\r\n potentialEnergy += pe;\r\n }\r\n }\r\n }\r\n }\r\n return potentialEnergy;\r\n }", "int getEdgeCount();", "void calculate_distance()\n {\n \t\n \tfor(int i = 0; i<V ; i++)\n \t{\n \t\tfor(int j = 0; j<E ; j++)\n \t\t{\n \t\t\trelax(edge[j].src, edge[j].destination, edge[j].weight);\n \t\t}\n \t\tsp[i] = dist[i];\n \t\tx[i] = dist[i];\n \t}\n \tSystem.out.println();\n }", "public int degreeOf(V vertex);", "public Clustering<V> compute() {\n if (graph.vertexSet().isEmpty()) {\n return new ClusteringImpl<>(Collections.emptyList());\n }\n\n matrix = Matrices.buildAdjacencyMatrix(graph, mapping, true);\n\n normalize();\n\n for (var i = 0; i < iterations; i++) {\n final var previous = matrix.copy();\n\n expand();\n inflate();\n normalize();\n\n if (matrix.equals(previous)) break;\n }\n\n // matrix can contain identical clusters of elements which are less than one\n final var clusters = new HashSet<Set<V>>(matrix.getRowDimension());\n\n for (var i = 0; i < matrix.getRowDimension(); i++) {\n final var cluster = new HashSet<V>();\n\n for (var j = 0; j < matrix.getColumnDimension(); j++) {\n if (matrix.getEntry(i, j) > 0) cluster.add(mapping.getIndexList().get(j));\n }\n\n if (!cluster.isEmpty()) clusters.add(cluster);\n }\n\n return new ClusteringImpl<>(new ArrayList<>(clusters));\n }" ]
[ "0.6419545", "0.5924837", "0.5618016", "0.558817", "0.55072", "0.5483494", "0.5439133", "0.5360266", "0.5315469", "0.5314519", "0.52891433", "0.52621806", "0.5261059", "0.5235556", "0.5202713", "0.5199867", "0.51828265", "0.51821077", "0.5174921", "0.5169872", "0.516605", "0.5148456", "0.5143009", "0.5143006", "0.51216215", "0.51021403", "0.50957423", "0.5093377", "0.5083135", "0.50742763", "0.5069347", "0.50445503", "0.5015841", "0.5011986", "0.5011746", "0.50101113", "0.50085664", "0.50050145", "0.49967185", "0.4986628", "0.49788457", "0.4977695", "0.49761298", "0.49659696", "0.4963719", "0.49462074", "0.49321032", "0.49259672", "0.49232653", "0.4916048", "0.4908079", "0.49044603", "0.48917374", "0.4888246", "0.48820513", "0.48772788", "0.48752365", "0.48731795", "0.48725277", "0.48651424", "0.48645848", "0.48557433", "0.48444766", "0.48404023", "0.48394075", "0.4837903", "0.48330268", "0.4827634", "0.48268706", "0.48223978", "0.48205152", "0.48138493", "0.48059812", "0.48041013", "0.4799354", "0.4799309", "0.47986022", "0.47852573", "0.4778447", "0.47769904", "0.47733182", "0.47610384", "0.47605094", "0.47580734", "0.4755525", "0.47514752", "0.47481173", "0.4746162", "0.47402206", "0.47392675", "0.47379863", "0.47298512", "0.4727213", "0.4726395", "0.4723175", "0.47167212", "0.4716132", "0.47154", "0.4713149", "0.47126967" ]
0.632739
1
Compare the values of two of the entries of the comparator
@Override public int compare(SimpleEntry<Integer, Double> arg0, SimpleEntry<Integer, Double> arg1) { return arg1.getValue().compareTo(arg0.getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int compararEntradas (Entry<K,V> e1, Entry<K,V> e2)\r\n\t{\r\n\t\treturn (comp.compare(e1.getKey(),e2.getKey()));\r\n\t}", "@Override\r\n\tpublic int compare(Entry<Integer, Integer> o1, Entry<Integer, Integer> o2) {\n\t\treturn o2.getValue().compareTo(o1.getValue());\r\n\t}", "@SuppressWarnings(\"ComparatorMethodParameterNotUsed\")\n @Override\n public int compare(Map.Entry<Integer, Integer> entry1, Map.Entry<Integer, Integer> entry2) {\n return entry2.getValue() > entry1.getValue() ? 1 : -1;\n }", "@Override\n public int compare(Entry<String, Integer> arg0, Entry<String, Integer> arg1) {\n if(arg0.getValue() == arg1.getValue()){\n return arg0.getKey().compareTo(arg1.getKey());\n } else {\n return arg1.getValue() - arg0.getValue();\n }\n }", "@Override\r\n\tpublic int compare(Map.Entry<Integer, Integer> o1,\r\n\t\t\tMap.Entry<Integer, Integer> o2) {\n\t\treturn o2.getValue() - o1.getValue();\r\n\t}", "@Override\n\t\t\tpublic int compare(Entry<String, Integer> o1,\n\t\t\t\t\tEntry<String, Integer> o2) {\n\t\t\t\tInteger v2 = o2.getValue();\n\t\t\t\tInteger v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {\n\t\t\t\treturn o2.getValue().compareTo(o1.getValue());\n\t\t\t}", "@Override\n public int compare(Map.Entry<String, Integer> o1,\n Map.Entry<String, Integer> o2) {\n return o1.getValue()-o2.getValue();\n }", "private void compare(K key, String comparator, List<V> val, LeafNode node) {\r\n if (comparator.contentEquals(\">=\")) {\r\n // to check every value in the leafnode\r\n for (V value : node.values) {\r\n int index = node.values.indexOf(value);\r\n if (key.compareTo(node.keys.get(index)) == 0 ) {\r\n val.add(value);\r\n } else if (key.compareTo(node.keys.get(index)) < 0){\r\n val.add(value);\r\n }\r\n }\r\n\r\n } else if (comparator.contentEquals(\"==\")) {\r\n for (V value : node.values) {\r\n int index = node.values.indexOf(value);\r\n if (key.compareTo(node.keys.get(index)) == 0) {\r\n val.add(value);\r\n }\r\n }\r\n\r\n } else if (comparator.contentEquals(\"<=\")) {\r\n for (V value : node.values) {\r\n int index = node.values.indexOf(value);\r\n if (key.compareTo(node.keys.get(index)) == 0 || key.compareTo(node.keys.get(index)) > 0) {\r\n val.add(value);\r\n }\r\n }\r\n\r\n }\r\n }", "@Override\n\t\t\tpublic int compare(Map.Entry<T, Integer> e1, Map.Entry<T, Integer> e2)\n\t\t\t{\n\n\t\t\t\treturn - (e1.getValue() - e2.getValue());\n\t\t\t}", "public int compare(Entry<Integer, Integer> o1,\n\t\t\t\t\tEntry<Integer, Integer> o2) {\n\t\t\t\treturn o1.getValue().compareTo(o2.getValue());\n\t\t\t}", "@Override\n // Compare values according to columns\n public int compare(final int[] entry1, final int[] entry2) {\n if (entry1[0] > entry2[0])\n return 1;\n else\n return -1;\n }", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1,\n\t\t\t\t\tEntry<Integer, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "@Override\n\t\t\t\t\tpublic int compare(Entry<Integer, String> o1, Entry<Integer, String> o2) {\n\t\t\t\t\t\treturn o1.getValue().compareTo(o2.getValue());\n\t\t\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1, Entry<String, Double> o2) {\n\t\t\t\treturn o1.getValue().compareTo(o2.getValue());\n\t\t\t}", "@Override\n public int compare(Pair<Channel, Double> lhs, Pair<Channel, Double> rhs) {\n return rhs.second.compareTo(lhs.second);\n }", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tDouble v2 = o2.getValue();\n\t\t\t\tDouble v1 = o1.getValue();\n\t\t\t\treturn v2.compareTo(v1);\n\t\t\t}", "@Override\n\t\t\tpublic int compare(Entry<String, Double> o1,\n\t\t\t\t\tEntry<String, Double> o2) {\n\t\t\t\tif(o1.getValue()>o2.getValue()){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.getValue()<o2.getValue()){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\t\t\tpublic int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {\n\t\t\t\t\treturn (o2.getValue()).compareTo(o1.getValue());\r\n\t\t\t\t}", "public int compare(Map.Entry<String, Integer> o1,\n Map.Entry<String, Integer> o2) {\n return o1.getValue().compareTo(o2.getValue());\n }", "public int compare(Map.Entry<String,Integer> o1, Map.Entry<String,Integer> o2){\n return o1.getValue().compareTo(o2.getValue());\n }", "@Override\r\n\t\tpublic int compare(Pair o1, Pair o2) {\r\n\t\t\treturn o2.val.compareTo(o1.val);\r\n\t\t}", "@Override\n\t\tpublic int compare(Object a, Object b) {\n\t\t\tif(hm.get(a)>hm.get(b))\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic int compare(Entry<Long, String> e1, Entry<Long, String> e2) {\n\t\t\t\t\n\t\t\t\treturn (int) (e1.getKey()-e2.getKey());\n\t\t\t}", "@Override\r\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\tif ((o1.getValue()-o2.getValue())>0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} else if ((o1.getValue()-o2.getValue())<0) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t}", "@Test\r\n public void testCompare() {\r\n\r\n double[] r1;\r\n double[] r2;\r\n Comparator<double[]> instance = new DoubleArrayComparator();\r\n \r\n r1 = new double[]{1,2,3};\r\n r2 = new double[]{1,2,3}; \r\n assertEquals(0, instance.compare(r1, r2));\r\n\r\n r1 = new double[]{1,2,3};\r\n r2 = new double[]{1,3,2}; \r\n assertEquals(-1, instance.compare(r1, r2));\r\n \r\n r1 = new double[]{1,3,3};\r\n r2 = new double[]{1,3,2}; \r\n assertEquals(1, instance.compare(r1, r2));\r\n \r\n }", "public int compare(Key<Double, Double> a, Key<Double, Double> b){\n\t\t\tif (a.getFirst() < b.getFirst()){\n\t\t\t\treturn -1;\n\t\t\t} else if (a.getFirst() == b.getFirst()){\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}", "@Override\r\n public int compare(Pair<Integer, Double> o1, Pair<Integer, Double> o2) {\r\n return o2.getValue().compareTo(o1.getValue());\r\n }", "@Override\n\t\t\tpublic int compare(Entry<Character, Integer> o1, Entry<Character, Integer> o2) {\n\t\t\t\treturn o2.getValue() - o1.getValue();\n\t\t\t}", "@Override\n public int compare(Object arg0, Object arg1) {\n int a = arg0.hashCode();\n int b = arg1.hashCode();\n int accum;\n if (a == b) {\n accum = 0;\n } else if (a > b) {\n accum = 1;\n } else {\n accum = -1;\n }\n return accum;\n }", "@Override\n\t\t\tpublic int compare(Entry<Integer, Double> o1, Entry<Integer, Double> o2) {\n\t\t\t\treturn -(int) (o1.getValue().compareTo(o2.getValue()));\n\t\t\t}", "@Override\n public int compare(T a, T b) {\n for (Comparator<T> comparator : comparators) {\n int cmp = comparator.compare(a, b);\n\n if (cmp != 0) {\n return cmp;\n }\n }\n return 0;\n }", "public int compare(E a, E b) {\n // Complete this method.\n\t\treturn -1 * ((Map.Entry<String,Integer>)a).getValue().compareTo(((Map.Entry<String,Integer>)b).getValue());\n }", "@Override\n\t\t\tpublic int compare( Entry<Exercice, Integer> o1, Entry<Exercice, Integer> o2 )\n\t\t\t{\n\t\t\t\treturn - o1.getValue().compareTo( o2.getValue() );\n\t\t\t}", "static void compare()\n {\n \tif(a < c)\n\t\t {\n\t\t\t comp_one = 1; //store this value , else zero default \n\t\t }\n\t\t if(c < b)\n\t\t {\n\t\t\t comp_two = 2; //store this value , else zero default\n\t\t }\n\t\t if(b < a)\n\t\t {\n\t\t\t comp_thr = 5; //store this value , else zero default\n\t\t }\n\t\t \n\t\t comp_val = comp_one + comp_two + comp_thr; //create a unique value by addition\n }", "@Override\n public int compare(Integer a, Integer b) {\n if (base.get(a) >= base.get(b)) {\n return 1;\n } else {\n return -1;\n } // returning 0 would merge keys\n }", "@Override\n\t\t\tpublic int compare(Entry<Character, Integer> o1,\n\t\t\t\t\tEntry<Character, Integer> o2) {\n\t\t\t\tif(o2.getValue()!=null&&o1.getValue()!=null&&o2.getValue().compareTo(o1.getValue())>0){ \n\t return 1; \n\t }else{ \n\t return -1; \n\t } \n\t\t\t}", "public Comparator<Integer> comparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n Http2PriorityNode n1 = nodesByID.get(o1);\n Http2PriorityNode n2 = nodesByID.get(o2);\n if(n1 == null && n2 == null) {\n return 0;\n }\n if(n1 == null) {\n return -1;\n }\n if(n2 == null) {\n return 1;\n }\n //do the comparison\n //this is kinda crap, but I can't really think of any better way to handle this\n\n double d1 = createWeightingProportion(n1);\n double d2 = createWeightingProportion(n2);\n return Double.compare(d1, d2);\n }\n };\n }", "@Override\n \t\t\t\t\tpublic int compare(Entry<Fooable, Integer> o1,\n \t\t\t\t\t\t\tEntry<Fooable, Integer> o2) {\n \t\t\t\t\t\tif (o1.getValue() < o2.getValue())\n \t\t\t\t\t\t\treturn -1;\n \n \t\t\t\t\t\tif (o1.getValue() > o2.getValue())\n \t\t\t\t\t\t\treturn 1;\n \n \t\t\t\t\t\t// Fallback sorting on String comparison\n \t\t\t\t\t\treturn o1.getKey().getName()\n \t\t\t\t\t\t\t\t.compareToIgnoreCase(o2.getKey().getName());\n \t\t\t\t\t}", "public HashMapValueComparator() {\n\t\tsuper();\n\t}", "@Test \n public void compareFunctionalEquals() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p1);\n \n assertEquals(0, a);\n }", "@Test\n public void testCompare() {\n AantalGastenComparator instance = new AantalGastenComparator();\n int expResult;\n int result;\n \n //test 1\n Accommodatie a1 = new Accommodatie(\"je moeder\", 30.00, 2, 1);\n Accommodatie a2 = new Accommodatie(\"je vader\", 40.00, 3, 1);\n expResult = -1;\n result = instance.compare(a1, a2);\n assertEquals(expResult, result);\n \n \n //test 2\n Accommodatie a3 = new Accommodatie(\"je moeder2\", 30.00, 2, 1);\n Accommodatie a4 = new Accommodatie(\"je vader2\", 40.00, 2, 1);\n expResult = 0;\n result = instance.compare(a3, a4);\n assertEquals(expResult, result);\n \n \n //test 3\n Accommodatie a5 = new Accommodatie(\"je moeder3\", 30.00, 3, 1);\n Accommodatie a6 = new Accommodatie(\"je vader3\", 40.00, 2, 1);\n expResult = 1;\n result = instance.compare(a5, a6);\n assertEquals(expResult, result);\n }", "@Override\n\t\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\t\tSystem.out.println(\"comparision occur\");\n\t\t\tif (a instanceof IntPair && b instanceof IntPair) {\n\t\t\t\treturn ((IntPair) a).id.compareTo(((IntPair) b).id);\n\t\t\t}\n\t\t\treturn super.compare(a, b);\n\t\t}", "@Override\r\n\t\t\tpublic int compare(Entry<Integer, LinkedList<Link>> o1, Entry<Integer, LinkedList<Link>> o2) {\n\t\t\t\treturn o1.getKey() - o2.getKey();\r\n\t\t\t}", "@Test\n public void compareFunctionalSmaller() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p2, p1);\n \n assertEquals(1, a);\n }", "@Override\n public int compare(Integer o1, Integer o2) {\n return map.get(o1)-map.get(o2);\n }", "@Test\n public void compareFunctionalBigger() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p2);\n \n assertEquals(-1, a);\n\n }", "@Override\n public int compare(Tuple2<String, Long> o1, Tuple2<String, Long> o2) {\n return -(o1.f1.compareTo(o2.f1));\n }", "@Test public void testCompareTo() {\r\n new LinkedHashMap<Entry<String, ComparisonResult>, Entry<Word, Word>>() {\r\n private static final long serialVersionUID = -114525477689441361L; {\r\n put(new SimpleEntry<>(\"test(Test)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w1, w2));\r\n put(new SimpleEntry<>(\"Test(test)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w2, w1));\r\n put(new SimpleEntry<>(\"Test(Te/t)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w2, w5));\r\n put(new SimpleEntry<>(\"Te/t(Test)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w5, w2));\r\n put(new SimpleEntry<>(\"Text(Te/t)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w7, w5));\r\n put(new SimpleEntry<>(\"Te/t(Text)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w5, w7));\r\n put(new SimpleEntry<>(\"testing(test'ing)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w3, w4));\r\n put(new SimpleEntry<>(\"test'ing(testing)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w4, w3));\r\n put(new SimpleEntry<>(\"test(testing)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w1, w3));\r\n put(new SimpleEntry<>(\"testing(test)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w3, w1));\r\n put(new SimpleEntry<>(\"test(test)\", ComparisonResult.EQUAL_TO), new SimpleEntry<>(w1, w6));\r\n }}.forEach((k, v) -> {\r\n assertTrue(String.format(\"%1$s should be %2$s\", k.getKey(), k.getValue().toString()),\r\n v.getKey().compareTo(v.getValue()) == k.getValue());\r\n });\r\n }", "@Override\n\tpublic int compare(HashMap<K, V> a, HashMap<K, V> b) {\n\t\tint comparison = 0;\n\t\tint counter = 0;\n\t\t/*\n\t\t * If the first keyToSortWith is the same in both HashMaps, sort by the\n\t\t * next keyToSortWith\n\t\t */\n\t\twhile ((comparison == 0) && (counter < keysToSortWith.length)) {\n\t\t\tcomparison = a.get(keysToSortWith[counter]).compareTo(\n\t\t\t\t\tb.get(keysToSortWith[counter]));\n\t\t\tcounter++;\n\t\t}\n\t\t/*\n\t\t * If the current keyToSortWith is supposed to be sorted negatively\n\t\t * (according to the reverse array), returns the opposite result\n\t\t */\n\t\tif (reverse[counter - 1] == true) {\n\t\t\treturn comparison * (-1);\n\t\t}\n\t\treturn comparison;\n\t}", "public abstract void compare();", "public int compare(GridCell a, GridCell b) {\n\t\treturn FloatUtil.compare(mapInfo.getHCost(a), mapInfo.getHCost(b));\n\t}", "public int compare(int[] a, int[] b) {\r\n return a[1] - b[1];\r\n }", "@Override\n\tpublic int compare(int slot1, int slot2) {\n\t\tfinal long v1 = mValues[slot1];\n\t\tfinal long v2 = mValues[slot2];\n\t\tif (v1 > v2) {\n\t\t\treturn 1;\n\t\t} else if (v1 < v2) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public int compare(String a, String b) {\n if (base.get(a) >= base.get(b)) {\n return -1;\n } else {\n return 1;\n } // returning 0 would merge keys\n }", "@Override\n public int compare(Object arg0, Object arg1) {\n return arg0.hashCode() - arg1.hashCode();\n }", "@Override\n\t\t\t\tpublic int compare(Integer a, Integer b) {\n\t\t\t\t\tInteger x= (Integer)P[a];\n\t\t\t\t\tInteger y= (Integer)P[b];\n\t\t\t\t\treturn x.compareTo(y);\n\t\t\t\t}", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "private Comparison compareValues(SimpleNode first, SimpleNode second) {\n return Objects.equals(first.jjtGetValue(), second.jjtGetValue()) ? Comparison.IS_EQUAL\n : Comparison.notEqual(\"Node values differ: \" + first.jjtGetValue() + \" vs \" + second.jjtGetValue());\n }", "public int compare(String a, String b) {\n\t if (base.get(a) >= base.get(b)) {\n\t return -1;\n\t } else {\n\t return 1;\n\t } // returning 0 would merge keys\n\t }", "@Override\n\tpublic int compare(WritableComparable a, WritableComparable b) {\n\t\tIntPaire o1 = (IntPaire) a;\n\t\tIntPaire o2 = (IntPaire) b;\n\t\tif(!o1.getFirstKey().equals(o2.getFirstKey())){\n\t\t\treturn o1.getFirstKey().compareTo(o2.getFirstKey());\n\t\t}else{\n\t\t\treturn o1.getSecondKey() - o2.getSecondKey();\n\t\t}\n\t}", "private boolean compare(ValueType first, ValueType second) {\r\n // TODO\r\n return false;\r\n }", "@Override\n public int compare(final E obj1, final E obj2) {\n return comparator.compare(obj2, obj1);\n }", "@Override\r\n public int compare(Element e1, Element e2) {\r\n\t\t//FIXME !!!!\r\n\t\treturn -1;\r\n//\t\t// first try to compare by type:\r\n//\t\tint result = compareType(e1, e2);\r\n//\t\tif(result != 0)\r\n//\t\t\treturn result;\r\n//\t\t\r\n//\t\t// results with matching case before results with different case then searched word\r\n//\t\tresult = compareCase(e1, e2);\r\n//\t\tif(result != 0) {\r\n//\t\t\treturn result;\r\n//\t\t}\r\n//\t\t// when they both do/don't match case, compare by label:\r\n//\t\tresult = compareLabel(e1, e2);\r\n//\t\tif(result != 0) {\r\n//\t\t\treturn result;\r\n//\t\t}\r\n//\r\n//\t\t// if the same label as well, compare by hashcode\r\n//\t\tresult = e1.compareTo(e2);\r\n//\t\treturn result;\r\n\r\n\t}", "private final boolean compareIntValues(final String data1, final String data2,\n\t\t\tfinal String colName, final String key){\n\t\tint tolerance = ContextComparatorConfigReferences.DEFAULT_TOLERANCE_PERCENTAGE;\n\t\ttry {\n\t\t\ttolerance = Integer.parseInt(\n\t\t\t\t\tconfig.get(\"tolerancePercent\").toString());\n\t\t} catch (NumberFormatException e) {\n\t\t\tLOGGER.warn(\"Unable to parse tolerance percentage, falling back to default.\", e);\n\t\t}\n\n\t\t// FIXME: What if values are decimals?\n\t\tint count1 = 0;\n\t\tint count2 = 0;\n\t\ttry {\n\t\t\tcount1 = Integer.parseInt(data1);\n\t\t\tcount2 = Integer.parseInt(data2);\n\t\t} catch (NumberFormatException e) {\n\t\t\tLOGGER.error(\"Unable to parse count in \" + colName + \" for key: \" + key, e);\n\t\t\tContextComparator.addResult(namespace,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_CATEGORY_COUNT_VALUES,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_STATUS_FAILED,\n\t\t\t\t\t\"Parse exception for \" + colName + \" and key \" + key);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (count1 == count2) {\n\t\t\treturn true;\n\t\t}\n\n\t\tfinal int error = Math.abs(count1 - count2)/count1*100;\n\t\tif (error < tolerance) {\n\t\t\treturn true;\n\t\t}\n\n\t\tContextComparator.addResult(namespace,\n\t\t\t\tContextComparatorConfigReferences.TEST_CATEGORY_COUNT_VALUES,\n\t\t\t\tContextComparatorConfigReferences.TEST_STATUS_FAILED,\n\t\t\t\terror + \"% error for \" + colName + \" and key \" + key\n\t\t\t\t+ \". \" + ContextComparator.CONTEXT_1.getName()\n\t\t\t\t+ \": \" + count1 + \", \" + ContextComparator.CONTEXT_2.getName()\n\t\t\t\t+ \": \" + count2);\n\t\treturn false;\n\t}", "@Override\n public int compare(int[] o1, int[] o2) {\n return o1[1] - o2[1];\n }", "@Override\n\t\t\tpublic int compare(MyInteger arg0, MyInteger arg1) {\n\t\t\t\treturn arg0.getValue() - arg1.getValue();\n\t\t\t}", "public int compare(Element e1, Element e2) {\n return e1.getKey() - e2.getKey();\n }", "@Override\n\t\t\tpublic int compare(ListNode o1, ListNode o2) {\n\t\t\t\treturn o1.val - o2.val;\n\t\t\t}", "public int compare(List<Integer> a, List<Integer> b) {\n return Integer.compare(b.get(1), a.get(1));\n }", "@Override\r\n\t\t\tpublic int compare(PrimsPair o1, PrimsPair o2) {\n\t\t\t\treturn o2.csf - o1.csf;\r\n\t\t\t}", "private boolean comps(int a, int b){\n\t\tthis.comparisons.add(new Integer[]{a, b});\n\t\treturn true;\n\t}", "public void testObjCompare()\n {\n assertEquals( Comparator.EQUAL, Util.objCompare(null,null) );\n assertEquals( Comparator.LESS, Util.objCompare(new Integer(10), new Integer(20)) );\n assertEquals( Comparator.GREATER, Util.objCompare(new Integer(25), new Integer(20)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(null,new Integer(1)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(new Integer(1),null) );\n }", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "public int compare(Element e1, Element e2) {\n return e2.getKey() - e1.getKey();\n }", "@Override\n\t\t public int compare(Map<String, Object> o1,Map<String, Object> o2) {\n\t\t\t int countO1 = Integer.valueOf(o1.get(\"count\").toString());\n\t\t\t int countO2 = Integer.valueOf(o2.get(\"count\").toString());\n\t\t\t double distanceO1 = Double.valueOf(o1.get(\"distance\").toString());\n\t\t\t double distanceO2 = Double.valueOf(o2.get(\"distance\").toString());\n\t\t\t\t\t\n\t\t\t //先排距离,再排接单数\n\t\t\t if(distanceO1 < distanceO2){\n\t\t\t\t return -1;\n\t\t\t }else if(countO1 < countO2){\n\t\t\t\t return -1;\n\t\t\t }else return 0;\n\t\t }", "@Override\n public int compare(CostVector o1, CostVector o2) {\n int i = 0;\n while (i < o1.getCosts().length && o1.getCosts()[i] == o2.getCosts()[i]) {\n i++;\n }\n if (i != o1.getCosts().length) {\n return o1.getCosts()[i] > o2.getCosts()[i] ? 1 : -1;\n } else {\n return 0;\n }\n }", "@Override\r\n\t\t\tpublic int compare(int[] o1, int[] o2) {\n\t\t\t\treturn o1[2] - o2[2];\r\n\t\t\t}", "protected abstract int doCompare(Object o1, Object o2);", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\t}", "@Override // java.util.Comparator\n public final /* bridge */ /* synthetic */ int compare(ScanResult scanResult, ScanResult scanResult2) {\n return scanResult.level - scanResult2.level;\n }", "public abstract int compare(final T l1, final T l2);", "@Override\n\tpublic int compareTo(Tuple o) {\n\t\treturn this.val-o.val;\n\t}", "@Override public int compare(int[] a, int[] b) {\n if (a[0] == b[0]) {\n if (a[1] == b[1]) return a[2] - b[2];\n return a[1] - b[1];\n }\n return a[0] - b[0];\n }", "@Override\r\n\t\t\tpublic int compare(DjikstraPair o1, DjikstraPair o2) {\n\t\t\t\treturn o2.csf - o1.csf;\r\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic int compare(SearchItem lhs, SearchItem rhs) {\n\t\t\t\t\t\t\tString first = lhs.get_text().toString();\n\t\t\t\t\t\t\tString sec = rhs.get_text().toString();\n\n\t\t\t\t\t\t\tint i1 = first.indexOf(constraint.toString());\n\t\t\t\t\t\t\tint i2 = sec.indexOf(constraint.toString());\n\n\t\t\t\t\t\t\treturn (i1 < i2) ? -1 : (i1 == i2) ? 0 : 1;\n\t\t\t\t\t\t}", "public int compare(Long one, Long two){ return one.compareTo(two); }", "@Override\n\t\t\tpublic int compare(KeyValueData o1, KeyValueData o2) {\n\t\t\t\tif(o1.value < o2.value){\n\t\t\t\t\treturn -1;\n\t\t\t\t}else if(o1.value > o2.value){\n\t\t\t\t\treturn 1;\n\t\t\t\t}else{\n\t\t\t\t\tif(o1.key.compareTo(o2.key) < 0){\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}else if(o1.key.compareTo(o2.key) > 0){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "public int compare (Object object1,Object object2)\r\n {\r\n Map map1 = (Map)object1;\r\n Map map2 = (Map)object2;\r\n\r\n /*Get sort info keys*/\r\n Map sortKeys = getSortKeys();\r\n\r\n String keyName = (String) sortKeys.get(\"name\");\r\n String keyDir = (String) sortKeys.get(\"dir\");\r\n\r\n String stringValue1 = (String) map1.get(keyName); \r\n String stringValue2 = (String) map2.get(keyName);\r\n\r\n boolean str1Empty = isEmpty(stringValue1);\r\n boolean str2Empty = isEmpty(stringValue2);\r\n \r\n /* \r\n * If both values are null or empty diff = 0\r\n * If first string is null or empty diff = -1\r\n * If second string is null or empty diff = 1\r\n * If both the strings are not empty then compare the strings\r\n */ \r\n int diff = str1Empty && str2Empty ? 0 : \r\n str1Empty ? -1 : \r\n str2Empty ? 1 : \r\n compareAnchorDataPart(stringValue1, stringValue2); \r\n \r\n /* If the direction is not ascending, then invert the sign of 'diff' value\r\n * */\r\n return \"ascending\".equals(keyDir)? diff : -diff ;\r\n }", "public int compare(Viewer viewer, Object o1, Object o2) {\n\n // Sort according to the locale-specific collation order.\n return collator.compare(labelProvider.getText(o1),\n labelProvider.getText(o2));\n }", "Comparator<? super K> comparator();", "public int compare(IComparableContribution c1, IComparableContribution c2) {\n int cat1 = category(c1);\n int cat2 = category(c2);\n if (cat1 != cat2) {\n return cat1 - cat2;\n }\n String name1 = c1.getLabel();\n String name2 = c2.getLabel();\n if (name1 == null) {\n //$NON-NLS-1$\n name1 = \"\";\n }\n if (name2 == null) {\n //$NON-NLS-1$\n name2 = \"\";\n }\n // use the comparator to compare the strings\n return Policy.getComparator().compare(name1, name2);\n }", "public static int bccomp (String _left_operand , String _right_operand, int _scale) {\n//\t\treturn _left_operand.compareTo(_right_operand);\n\t\treturn ZendUtils.natsort(_left_operand, _right_operand);\n\t}", "@Override\n public int compare(int[] o1, int[] o2) {\n \n if(o1[0] == o2[0]) {\n return Integer.compare(o1[1],o2[1]);\n }\n else \n return Integer.compare(o1[0], o2[0]);\n \n \n }", "@Override\n public int compareTo(Pair o) {\n return this.v-o.v;\n }", "@Override\r\n\t\t\tpublic int compare(int[] o1, int[] o2) {\n\t\t\t\treturn o1[1] - o2[1];\r\n\t\t\t}", "public int compare(ListNode o1, ListNode o2) {\n return o1.val-o2.val;\n }", "private int handleIncomparablePrimitives(Object x, Object y) {\n int xCost = getPrimitiveValueCost(x);\n int yCost = getPrimitiveValueCost(y);\n int res = Integer.compare(xCost, yCost);\n return ascending ? res : -res;\n }", "@Override\n public VectorEquality compareTo(PredicateVector vectorCmp) {\n try {\n PredicateVector vectorLarge;\n PredicateVector vectorSmall;\n VectorEquality cmpResult;\n \n if (flagged || vectorCmp.flagged) {\n return VectorEquality.UNIQUE;\n }\n \n // TODO: add size check\n \n if (this.size() > vectorCmp.size() && !this.values().iterator().next().isEmpty()) {\n vectorLarge = this;\n vectorSmall = vectorCmp;\n cmpResult = VectorEquality.SUPERSET;\n } else {\n vectorLarge = vectorCmp;\n vectorSmall = this;\n cmpResult = VectorEquality.SUBSET;\n }\n \n int largeVectorIter = 0;\n int numEq = 0;\n \n List<Integer> vectorSmallKeys = new ArrayList<Integer>(vectorSmall.keySet());\n Collections.sort(vectorSmallKeys);\n \n List<Integer> vectorLargeKeys = new ArrayList<Integer>(vectorLarge.keySet());\n Collections.sort(vectorLargeKeys);\n\n int i = 0;\n\n for (Integer smallVectorKey: vectorSmallKeys) {\n StateVector smallVectorState = vectorSmall.get(smallVectorKey);\n // Check if we have not iterated over all large vector states\n if (largeVectorIter >= vectorLargeKeys.size() && !smallVectorState.isEmpty()) {\n cmpResult = VectorEquality.UNIQUE;\n break;\n }\n \n \n for (i = largeVectorIter; i < vectorLargeKeys.size(); i++) {\n StateVector largeVectorState = vectorLarge.get(vectorLargeKeys.get(i));\n VectorEquality cmpVectorResult = smallVectorState.compareTo(largeVectorState); \n if (cmpVectorResult == VectorEquality.EQUAL) {\n numEq += 1;\n break;\n }\n \n if (cmpVectorResult == VectorEquality.SUPERSET || cmpVectorResult == VectorEquality.SUBSET) {\n cmpResult = cmpVectorResult;\n numEq += 1;\n break;\n }\n }\n \n largeVectorIter = i + 1; // TODO: double check i+1\n }\n \n if (numEq < vectorSmall.size() && !vectorSmall.values().iterator().next().isEmpty())\n cmpResult = VectorEquality.UNIQUE;\n \n return cmpResult;\n } catch (ArrayIndexOutOfBoundsException e) {\n e.printStackTrace();\n }\n \n return VectorEquality.UNIQUE;\n }", "@Override\n public int compare(E region1, E region2) {\n return Integer.compare(region2.getPriority(), region1.getPriority());\n }" ]
[ "0.6853438", "0.6831916", "0.6815696", "0.67683715", "0.6715142", "0.6647788", "0.66365695", "0.6629542", "0.6609829", "0.6546332", "0.6543217", "0.6519625", "0.6505852", "0.649254", "0.6465775", "0.6442113", "0.6433019", "0.6430944", "0.6415773", "0.6364207", "0.63639754", "0.6363688", "0.6335191", "0.6318662", "0.6307436", "0.63013244", "0.6291258", "0.6282915", "0.62790275", "0.6269976", "0.62658286", "0.6241975", "0.6219238", "0.62091386", "0.61929095", "0.61649084", "0.6135779", "0.61342466", "0.6071288", "0.6033669", "0.6007542", "0.59988976", "0.59495866", "0.58987427", "0.5896344", "0.58871454", "0.5869462", "0.58623147", "0.585102", "0.58161336", "0.5806998", "0.5797284", "0.5776145", "0.5765304", "0.5762249", "0.57595587", "0.5757809", "0.5750575", "0.57384837", "0.5730964", "0.5730852", "0.5701912", "0.5699804", "0.56917727", "0.5690154", "0.56635964", "0.56553686", "0.56530404", "0.56527", "0.5649994", "0.56498194", "0.564257", "0.56366193", "0.563506", "0.56344366", "0.5630079", "0.5608516", "0.56072164", "0.5585496", "0.55845684", "0.5578394", "0.5574602", "0.55663455", "0.555883", "0.55554485", "0.55550474", "0.5554267", "0.5542137", "0.5538274", "0.5535157", "0.55314505", "0.5529919", "0.5528115", "0.5525976", "0.5516618", "0.5513815", "0.5511793", "0.550644", "0.550622", "0.5503536" ]
0.60858315
38
Perform a breadthfirst search on an array of vertices
public static void bfs(Vertex[] vertices, int start, int dest) { int[] parent = new int[vertices.length]; boolean[] seen = new boolean[vertices.length]; LinkedList<Integer> queue; queue = new LinkedList<Integer>(); seen[start] = true; queue.add(start); int current = Integer.MIN_VALUE; while(!queue.isEmpty()) { current = queue.poll(); ArrayList<Integer> neighbors = vertices[current].getNeighbors(); for(int n = 0; n < neighbors.size(); n++) { if(!seen[neighbors.get(n)]) { seen[neighbors.get(n)] = true; queue.add(neighbors.get(n)); parent[neighbors.get(n)] = current; } } } // backtrack to update number of paths int y = dest; while(y != start) { if(parent[y] != start) { vertices[parent[y]].incrementNumPaths(); } y = parent[y]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void breadthFirst(Vertex[] vertices ){\n\t\t\n\t\tVertex temp = vertices[0];\n\t\ttemp.state=1; //for tracking the visited nodes, visited/discovered A\n\t\tboolean[] seen = new boolean[vertices.length];\n\t\tQueue<Vertex> q = new LinkedList<Vertex>(); //queue for breadth first traversal\n\t\t\n\t\tq.add(temp); //root node added to queue\n\t\tseen[0] = true;\n\t\tSystem.out.println(\"Begin breadth first traversal: \\n\" + \n\t\t\t\tq.toString());\n\t\t\t\t\n\t\tfor (int i = 0; i < vertices.length; i++){\n\t\t\ttemp = vertices[i];\n\t\t\twhile (!q.isEmpty() ) {\n\t Vertex v = q.remove();\n\t for (int j : v.neighbors) {\n\t if (!seen[j]) {\n\t q.add(vertices[j]);\n\t seen[j] = true;\n\t vertices[j].state=1;\n\t }\n\t }\n\t System.out.println(q.toString());\n \t}\n\t\t}\n\t}", "private void breadthFirstSearch (int start, int[] visited, int[] parent){\r\n Queue< Integer > theQueue = new LinkedList< Integer >();\r\n boolean[] identified = new boolean[getNumV()];\r\n identified[start] = true;\r\n theQueue.offer(start);\r\n while (!theQueue.isEmpty()) {\r\n int current = theQueue.remove();\r\n visited[current] = 1; //ziyaret edilmis vertexler queuedan cikarilan vertexlerdir\r\n Iterator < Edge > itr = edgeIterator(current);\r\n while (itr.hasNext()) {\r\n Edge edge = itr.next();\r\n int neighbor = edge.getDest();\r\n if (!identified[neighbor]) {\r\n identified[neighbor] = true;\r\n theQueue.offer(neighbor);\r\n parent[neighbor] = current;\r\n }\r\n }\r\n }\r\n }", "public void breadthFirstTraverse() {\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\t// store neighbors\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\n\t\t// arbitrarily add first element\n\t\tInteger current = (Integer) edges.keySet().toArray()[0];\n\t\tqueue.add(current);\n\n\t\twhile (queue.peek() != null) {\n\n\t\t\tcurrent = queue.remove();\n\t\t\tSystem.out.println(\"current: \" + current);\n\t\t\tvisited.put(current, true);\n\n\t\t\tfor (Integer neighbor: edges.get(current)) {\n\t\t\t\tif (!visited.get(neighbor)) {\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static int breadthFirstSearch(Vertex start) throws Queue.UnderflowException, Queue.EmptyException {\n boolean visited[] = new boolean[48];\n //Keep a queue of vertecies and a queue of the depth of the verticies - they will be added to and poped from identically\n ListQueue<Vertex> queue = new ListQueue<Vertex>();\n ListQueue<Integer> numQueue = new ListQueue<Integer>();\n //Set the starting node as visited\n visited[start.index()] = true;\n queue.enqueue(start);\n numQueue.enqueue(new Integer(1));\n\n //Keep last\n int last = -1;\n //While the queue isnt empty\n while (!queue.isEmpty()) {\n //Pop off the top from both queues and mark as visited\n start = queue.dequeue();\n int current = numQueue.dequeue();\n visited[start.index] = true;\n //For all neigbors\n for (Vertex v : start.neighbors) {\n //If we havent visited it make sure to visit it\n if (visited[v.index()] == false) {\n //As we keep adding new nodes to visit keep track of the depth\n queue.enqueue(v);\n numQueue.enqueue(current + 1);\n }\n }\n //Keep track of the most recent depth before we pop it off (queue will be empty when we exit)\n last = current;\n }\n //Return the max of the depth\n return last;\n }", "public String breadthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 1;\n //make new vertex to check if its in list\n //make queue to hold vertices\n SemiConstantTimeQueue<Vertex<AnyType>> queue = new SemiConstantTimeQueue<Vertex<AnyType>>();\n //loop through and set not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if it's in list then set exists to true\n //and set visited \n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n } \n //if doesn't exist then throw the exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //make new queue\n queue.add(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n counter = 1;\n int k=0;\n Vertex<AnyType>e;\n //while the queue isn't empty\n while(queue.peek() !=null){\n //make e the top of the queue \n e = queue.peek(); \n //go through the list and if you reach the begining it exits loop\n for( k = 0; k < vertex_adjacency_list.size()-1; k++){\n if(vertex_adjacency_list.get(k).compareTo(e)==0){\n break;\n }\n } \n //go through loop and check if visited, if not then add it to queue, set visited\n for( int j = 0; j< vertex_adjacency_list.get(k).numberOfAdjacentVertices(); j++){\n if(vertex_adjacency_list.get(k).getAdjacentVertex(j).hasBeenVisited()==false){\n counter++;\n queue.add(vertex_adjacency_list.get(k).getAdjacentVertex(j));\n vertex_adjacency_list.get(k).getAdjacentVertex(j).setVisited(counter);\n }\n }\n //remove from queue when through loop once\n k++;\n queue.remove();\n }\n //loop through list and print vertex and when it was visited\n for(int o = 0; o< vertex_adjacency_list.size(); o++){\n buffer.append(vertex_adjacency_list.get(o) + \":\" + vertex_adjacency_list.get(o).getVisited()+ \"\\n\");\n }\n return buffer.toString();\n }", "public int [] breadthFirstSearch (int start){\r\n int [] visited = new int[getNumV()];\r\n int[] order = new int[getNumV()];\r\n int index = 0;\r\n int[] parent = new int[getNumV()];\r\n\r\n // parent arrayi, visited arrayi ve order arrayi set edildi\r\n for(int i = start; i<getNumV(); i++){\r\n parent[i] = -1;\r\n visited[i] = -1;\r\n order[index] = i;\r\n index++;\r\n }\r\n //eger baslanilan vertex sifirdan farkli bir vertex ise bu vertex'e kadar ki vertexler de order arrayine eklendi.\r\n if(index<getNumV()-1)\r\n for(int i=0; i<start; i++){\r\n order[index] = i;\r\n index++;\r\n }\r\n\r\n // her vertex uzerinden breadthFirsSearch yapildi.\r\n for(int i = 0; i<getNumV(); i++) {\r\n if(visited[i] == -1)\r\n breadthFirstSearch(order[i], visited, parent);\r\n }\r\n return parent;\r\n }", "@Override\r\n public boolean breadthFirstSearch(T start, T end) {\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n Queue<Vertex<T>> queue = new LinkedList<Vertex<T>>();\r\n Set<Vertex<T>> visited = new HashSet<>();\r\n\r\n queue.add(startV);\r\n visited.add(startV);\r\n\r\n while(queue.size() > 0){\r\n Vertex<T> next = queue.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if(next == endV){\r\n return true;\r\n }\r\n\r\n for (Vertex<T> neighbor: next.getNeighbors()){\r\n if(!visited.contains(neighbor)){\r\n visited.add(neighbor);\r\n queue.add(neighbor);\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }", "private static void breadthFirstSearch(int source, ArrayList<ArrayList<Integer>> nodes) {\n\t\tArrayList<ArrayList<Integer>> neighbours = nodes;\n\t\tQueue<Integer> queue= new LinkedList<Integer>();\n\t\t\n\t\tboolean[] visited = new boolean[nodes.size()];\n\t\t\n\t\tqueue.add(source);\n\t\tvisited[source]=true;\n\t\t\n\t\twhile(!queue.isEmpty()) {\n\t\t\tint k =queue.remove();\n\t\t\tSystem.out.println(k);\n\t\t\tfor(int p : nodes.get(k)) {\n\t\t\t\tif(!visited[p]) {\n\t\t\t\t\tqueue.add(p);\n\t\t\t\t\tvisited[p]=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public ArrayList<Integer> breadthSearch(int i, int j) {\n markedVerts = new ArrayList<Integer>();\n visitedVerts = new ArrayList<Integer>();\n Queue<Integer> queue = new LinkedList<Integer>();\n queue.add(i);\n return new ArrayList(breadthSearch(i, j, queue, queue));\n }", "public List<String> breadthFirstSearch(List<String> array) {\n // Write your code here.\n Queue<Node> queue = new ArrayDeque<>();\n queue.add(this);\n // breadthFirstSearch(this, queue, array);\n while (queue.size() > 0) {\n Node node = queue.poll();\n array.add(node.name);\n queue.addAll(node.children);\n }\n return array;\n }", "public static void breadthFirstSearch(ArrayList<Node> graph) {\n\t\tSystem.out.println(\"BFS:\");\n\t\tif(graph.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tGraphUtils.cleanGraph(graph);\n\n\t\tQueue<Node> queue = new LinkedList<Node>();\n\t\tfor(Node node : graph) {\n\t\t\tif(node.state != Node.State.UNDISCOVERED) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnode.state = Node.State.DISCOVERED;\n\t\t\tqueue.add(node);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()) {\n\t\t\t\tnode = queue.remove();\n\t\t\t\t\n\t\t\t\t//process node\n\t\t\t\tSystem.out.print(node.name + \" -> \");\n\t\t\t\t\n\t\t\t\tfor(Edge e : node.edges) {\n\t\t\t\t\t//process edge\n\t\t\t\t\tNode neighbor = e.getNeighbor(node);\n\t\t\t\t\t\n\t\t\t\t\t//first time we see this node it gets added to the queue for later processing\n\t\t\t\t\tif(neighbor.state == Node.State.UNDISCOVERED) {\n\t\t\t\t\t\tneighbor.state = Node.State.DISCOVERED;\n\t\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//finished with this node\n\t\t\t\tnode.state = Node.State.COMPLETE;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println();\n\t\tGraphUtils.cleanGraph(graph);\n\t}", "public void breadthFirstSearch(int vertexIndex) {\n Queue<Integer> queue = new LinkedList<Integer>();\n vertexList[vertexIndex].wasVisited = true;\n displayVertex(vertexIndex);\n int unvisitedIndex;\n do {\n\n do {\n unvisitedIndex = getAdjacentUnvisitedVertexIndex(vertexIndex);\n if(unvisitedIndex != -1) {\n vertexList[unvisitedIndex].wasVisited = true;\n displayVertex(unvisitedIndex);\n queue.add(unvisitedIndex);\n\n }\n } while(unvisitedIndex != -1);\n if(!queue.isEmpty()) {\n vertexIndex = queue.remove();\n\n }\n\n } while(!queue.isEmpty());\n\n for (int i = 0; i < vertexCount; i++) {\n vertexList[i].wasVisited = false;\n\n }\n }", "static void bfs(int[][] G){\n\t\tQueue<Integer> q = new LinkedList<Integer>();\t\t\n\t\tfor (int ver_start = 0; ver_start < N; ver_start ++){\n\t\t\tif (visited[ver_start]) continue;\n\t\t\tq.add(ver_start);\n\t\t\tvisited[ver_start] = true;\n\n\t\t\twhile(!q.isEmpty()){\n\t\t\t\tint vertex = q.remove();\n\t\t\t\tSystem.out.print((vertex+1) + \" \");\n\t\t\t\tfor (int i=0; i<N; i++){\n\t\t\t\t\tif (G[vertex][i] == 1 && !visited[i]){\n\t\t\t\t\t\t// find neigbor of current vertex and not visited\n\t\t\t\t\t\t// add into the queue\n\t\t\t\t\t\tq.add(i);\n\t\t\t\t\t\tvisited[i] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"--\");\t\t\t\n\t\t}\n\t}", "Bfs_search(int v) \r\n { \r\n V = v; \r\n \r\n adj = new LinkedList[v]; \r\n \r\n for (int i=0; i<v; ++i) \r\n adj[i] = new LinkedList(); \r\n }", "private void BFS() {\n\n int fruitIndex = vertices.size()-1;\n Queue<GraphNode> bfsQueue = new LinkedList<>();\n bfsQueue.add(vertices.get(0));\n while (!bfsQueue.isEmpty()) {\n GraphNode pollNode = bfsQueue.poll();\n pollNode.setSeen(true);\n for (GraphNode node : vertices) {\n if (node.isSeen()) {\n continue;\n } else if (node.getID() == pollNode.getID()) {\n continue;\n } else if (!los.isIntersects(pollNode.getPoint(), node.getPoint())) {\n pollNode.getNeigbours().add(node);\n if (node.getID() != fruitIndex) {\n bfsQueue.add(node);\n node.setSeen(true);\n }\n }\n }\n }\n }", "public static Set<List<Vertex>> breadthFirstSearch(Graph graph) {\n\n Set<List<Vertex>> arrayListHashSet=new HashSet<>();\n\n for(Vertex v : graph.getVertices()){\n ArrayList<Vertex> visitedArrayList=new ArrayList<>();\n Queue<Vertex> vertexQueue=new ArrayDeque<>();\n visitedArrayList.add(v);\n vertexQueue.offer(v);\n while (!vertexQueue.isEmpty()){\n for(Vertex v1:graph.getNeighbors(vertexQueue.poll())){\n if(!visitedArrayList.contains(v1)){\n visitedArrayList.add(v1);\n vertexQueue.offer(v1);\n }\n }\n }\n arrayListHashSet.add(visitedArrayList);\n }\n return arrayListHashSet; // this should be changed\n }", "public static int[] breadth_first_search(graphNode[] graph) {\n\t\tboolean[] visited = new boolean[graph.length];\n\t\tint[] prev = new int[graph.length];\n\t\tfor(int i=0; i<graph.length; i++) {\n\t\t\tvisited[i] = false;\n\t\t\tprev[i] = -1;\n\t\t}\n\t\tQueue Q = new Queue();\n\t\tQ.enqueue(0);\n\t\tvisited[0] = true;\n\t\twhile(!Q.isEmpty()) {\n\t\t\tint u = Q.dequeue();\n\t\t\tfor(graphNode i=graph[u]; i!=null; i=i.next) {\n\t\t\t\tif(!visited[i.dest]) {\n\t\t\t\t\tvisited[i.dest] = true;\n\t\t\t\t\tprev[i.dest] = u;\n\t\t\t\t\tQ.enqueue(i.dest);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn prev;\n\t}", "public boolean breadthFirstSearch(int vertexA, int vertexB, HashMap<Integer, ArrayList<Integer>> adjMapList) {\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\t\tHashSet<Integer> visited = new HashSet<Integer>();\n\t\tqueue.add(vertexA);\n\t\tvisited.add(vertexA);\n\t\twhile (!queue.isEmpty()) {\n\t\t\tInteger curr = queue.remove();\n\t\t\tif (curr == vertexB) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tArrayList<Integer> neighbors = adjMapList.get(curr);\n\t\t\tfor (Integer vertex : neighbors) {\n\t\t\t\tif (!visited.contains(vertex)) {\n\t\t\t\t\tvisited.add(vertex);\n\t\t\t\t\tqueue.add(vertex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void doBreadthFirstSearch(String startVertexName, CallBack<E> callback)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertexName))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tSet<String> visited = new HashSet<String>();\r\n\t\tQueue<String> discovered = new PriorityQueue<String>();\r\n\t\t\r\n\t\tdiscovered.add(startVertexName);\r\n\t\t\r\n\t\twhile(!discovered.isEmpty())\r\n\t\t{\r\n\t\t\tString V = discovered.poll();\r\n\t\t\t\r\n\t\t\tif(!visited.contains(V))\r\n\t\t\t{\r\n\t\t\t\tcallback.processVertex(V, this.dataMap.get(V));\r\n\t\t\t\tvisited.add(V);\r\n\t\t\t\tSortedSet<String> neighbors = new TreeSet<String>(this.adjacencyMap.get(V).keySet());\r\n\t\t\t\t\r\n\t\t\t\tfor(String node : neighbors)\r\n\t\t\t\t{\r\n\t\t\t\t\tdiscovered.add(node);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "public void breadthFirstTraversal(final int startPoint) {\n\t\tfinal boolean[] isVerticesVisited = new boolean[adjacencyList.length];\n\t\tfinal Queue<Integer> queue = new LinkedList<>();\n\n\t\tisVerticesVisited[startPoint] = true;\n\t\tqueue.add(startPoint);\n\n\t\tint selectedVertice;\n\t\tint vertice;\n\t\twhile (!queue.isEmpty()) {\n\t\t\tselectedVertice = queue.poll();\n\n\t\t\tSystem.out.print(selectedVertice + \" \");\n\n\t\t\tIterator<Integer> edgeIterator = adjacencyList[selectedVertice].listIterator();\n\n\t\t\twhile (edgeIterator.hasNext()) {\n\t\t\t\tvertice = edgeIterator.next();\n\t\t\t\tif (!isVerticesVisited[vertice]) {\n\t\t\t\t\tqueue.add(vertice);\n\t\t\t\t\tisVerticesVisited[vertice] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private Queue<Integer> breadthSearch(int i, int j, Queue<Integer> queue, Queue<Integer> path) {\n while(queue.size() != 0) {\n queue.poll();\n }//while\n return new LinkedList();\n }", "public void BFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a queue for BFS\r\n\t\tQueue<Vertex> queue = new LinkedList<Vertex>();\r\n\r\n\t\tBFS(this.vertices[3], visited, queue); // BFS starting with 40\r\n\r\n\t\t// Call the helper function to print BFS traversal\r\n\t\t// starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\tBFS(this.vertices[i], visited, queue);\r\n\t}", "void Graph::BFS(int s)\n{\n bool *visited = new bool[V];\n for(int i = 0; i < V; i++)\n visited[i] = false;\n \n // Create a queue for BFS\n list<int> queue;\n \n // Mark the current node as visited and enqueue it\n visited[s] = true;\n queue.push_back(s);\n \n // 'i' will be used to get all adjacent vertices of a vertex\n list<int>::iterator i;\n \n while(!queue.empty())\n {\n // Dequeue a vertex from queue and print it\n s = queue.front();\n cout << s << \" \";\n queue.pop_front();\n \n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it visited\n // and enqueue it\n for(i = adj[s].begin(); i != adj[s].end(); ++i)\n {\n if(!visited[*i])\n {\n visited[*i] = true;\n queue.push_back(*i);\n }\n }\n }", "public void breadthFirstSearch(){\n Deque<Node> q = new ArrayDeque<>(); // In an interview just write Queue ? Issue is java 8 only has priority queue, \n // meaning I have to pass it a COMPARABLE for the Node class\n if (this.root == null){\n return;\n }\n \n q.add(this.root);\n while(q.isEmpty() == false){\n Node n = (Node) q.remove();\n System.out.print(n.val + \", \");\n if (n.left != null){\n q.add(n.left);\n }\n if (n.right != null){\n q.add(n.right);\n }\n }\n }", "void BFS(int s) {\n // Mark all the vertices as not visited(By default\n // set as false)\n boolean visited[] = new boolean[V];\n\n // Create a queue for BFS\n LinkedList<Integer> queue = new LinkedList<Integer>();\n\n // Mark the current node as visited and enqueue it\n visited [s] = true;\n queue.add(s);\n\n while (queue.size() != 0) {\n // Dequeue a vertex from queue and print it\n s = queue.poll();\n System.out.print(s + \" \");\n\n // Get all adjacent vertices of the dequeued vertex s\n // If a adjacent has not been visited, then mark it\n // visited and enqueue it\n Iterator<Integer> i = adj [s].listIterator();\n while (i.hasNext()) {\n int n = i.next();\n if (!visited [n]) {\n visited [n] = true;\n queue.add(n);\n }\n }\n }\n }", "public DSAQueue breadthFirstSearch(String start, String target)\n\t{\n\t\tif(!vertices.isEmpty())\n\t\t{\n\t\t\tDSAQueue queue = new DSAQueue();\n\t\t\tDSAStack visited = new DSAStack();\t//creates empty stack\n\t\t\tDSAGraphVertex vx = getVertex(start); //vertex to start on (root)\n\t\t\tDSAGraphVertex dest = getVertex(target); //vertex to start on (dest)\n\n\t\t\tclear(); //sets all visited on all vertices == false\n\t\t\tvx.setVisited(); // Marks root as visited\n\t\t\tqueue.enqueue(vx); //adds start point to queue\n\n\t\t\tbfs(vx, visited, queue, dest); //begin recursion\n\n\t\t\tqueue.enqueue(dest); //if successful adds destination to queue\n\n\t\t\treturn queue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"List is empty or start or end elements don't exist\");\n\t\t}\n\t}", "public void bfs(Queue<Integer> queue, int visited[]) {\n if (queue.isEmpty()) {\n return;\n }\n\n int root = queue.poll();\n\n if (visited[root] == 1) {\n bfs(queue, visited);\n return;//alreadu into consideration\n }\n\n\n System.out.printf(\"Exploring of node %d has started\\n\", root);\n visited[root] = 1;\n\n\n for (int i = 0; i < adjMatrix[root].size(); i++) {\n if (visited[adjMatrix[root].get(i)] == 1 || visited[adjMatrix[root].get(i)] == 2) {\n continue;\n }\n queue.add(adjMatrix[root].get(i));\n }\n bfs(queue, visited);\n System.out.printf(\"Exploring of node %d has end\\n\", root);\n visited[root] = 2;\n }", "public void depthFirstSearch() {\n List<Vertex> visited = new ArrayList<Vertex>();\r\n // start the recursive depth first search on the current vertex\r\n this.dfs(visited);\r\n }", "@Override\r\n public List<T> breadthFirstPath(T start, T end) {\r\n\r\n Vertex<T> startV = vertices.get(start);\r\n Vertex<T> endV = vertices.get(end);\r\n\r\n LinkedList<Vertex<T>> vertexList = new LinkedList<>();\r\n //Set<Vertex<T>> visited = new HashSet<>();\r\n ArrayList<Vertex<T>> visited = new ArrayList<>();\r\n\r\n LinkedList<Vertex<T>> pred = new LinkedList<>();\r\n int currIndex = 0;\r\n\r\n pred.add(null);\r\n\r\n vertexList.add(startV);\r\n visited.add(startV);\r\n\r\n LinkedList<T> path = new LinkedList<>();\r\n\r\n if (breadthFirstSearch(start, end) == false) {\r\n path = new LinkedList<>();\r\n return path;\r\n } else {\r\n while (vertexList.size() > 0) {\r\n Vertex<T> next = vertexList.poll();\r\n if(next == null){\r\n continue;\r\n }\r\n if (next == endV) {\r\n path.add(endV.getValue());\r\n break;\r\n }\r\n for (Vertex<T> neighbor : next.getNeighbors()) {\r\n if (!visited.contains(neighbor)) {\r\n pred.add(next);\r\n visited.add(neighbor);\r\n vertexList.add(neighbor);\r\n }\r\n }\r\n currIndex++;\r\n //path.add(next.getValue());\r\n\r\n }\r\n while (currIndex != 0) {\r\n Vertex<T> parent = pred.get(currIndex);\r\n path.add(parent.getValue());\r\n currIndex = visited.indexOf(parent);\r\n }\r\n }\r\n Collections.reverse(path);\r\n return path;\r\n }", "private static void depthFirstSearch(Vertex v, ArrayList<Vertex> visitedArrayList, Graph graph){\n visitedArrayList.add(v);\n Iterator<Vertex> iter=graph.getNeighbors(v).iterator();\n while (iter.hasNext()){\n Vertex v1=iter.next();\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n for(Vertex v1 : graph.getNeighbors(v)){\n if(!visitedArrayList.contains(v1)){\n depthFirstSearch(v1,visitedArrayList,graph);\n }\n }\n }", "void BFS(int s)\n {\n /* List of visited vertices; all false in the beginning) */\n boolean visited[] = new boolean[V];\n\n /* Queue data structure is used for BFS */\n LinkedList<Integer> queue = new LinkedList<>();\n\n /* Mark starting node s as visited and enqueue it */\n visited[s]=true;\n queue.add(s);\n\n /* Until queue is empty, dequeue a single node in queue and look for it's neighboring vertices.\n * If an adjecent node hasn't been visited yet, set it as visited and enqueue this node. s*/\n while (queue.size() != 0)\n {\n /* Dequeue */\n s = queue.poll();\n System.out.print( s + \" \");\n\n /* Get all adjacent vertices */\n Iterator<Integer> i = adj[s].listIterator();\n while (i.hasNext())\n {\n int n = i.next();\n if (!visited[n])\n {\n visited[n] = true;\n queue.add(n);\n }\n }\n }\n }", "private void breadthFirst(PathBetweenNodes graph, LinkedList<String> visited) {\r\n\r\n LinkedList<String> nodes = graph.adjacentNodes(visited.getLast());\r\n for (String node : nodes)\r\n {\r\n if (visited.contains(node))\r\n {\r\n continue;\r\n }\r\n if (node.equals(END))\r\n {\r\n \tif (mode1 && mode){\r\n visited.add(node);\r\n printPath(visited); \r\n graph.flag=false;\r\n mode=false;\r\n visited.removeLast();\r\n \t} else if(mode2){\r\n visited.add(node);\r\n printPath(visited); \r\n flag=mode2; \r\n visited.removeLast();\r\n \t} \r\n } \r\n }\r\n\r\n for (String node : nodes) { // implementing a for loop to call each node in the array nodes\r\n if (visited.contains(node) || node.equals(END)) { // if statement to see if node is already visited or it is the end node\r\n continue;\r\n }\r\n flag=true;\r\n visited.addLast(node); //adding the last node to visited array\r\n breadthFirst(graph, visited); // implementing the breath first search\r\n visited.removeLast(); // removing the last node from array visited\r\n }\r\n if (flag == false) {\r\n System.out.println(\"No path Exists between \" + START + \" and \" + END);\r\n flag = true;\r\n }\r\n }", "public String depthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n ConstantTimeStack<Vertex<AnyType>> stack = new ConstantTimeStack<Vertex<AnyType>>();\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 0;\n //loop through to set each vertex to not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if find the start vertex then set index position to counter\n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n }\n //if doesn't exist then through exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //if it does exist then push start node onto stack, set visited \n else if(exists){\n stack.push(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n Vertex <AnyType> e = vertex_adjacency_list.get(counter);\n counter = 2;\n int n = e.numberOfAdjacentVertices();\n try{\n \n while(true){\n //loop through e's adjacent vertices \n for (n = e.numberOfAdjacentVertices()-1; n >=0 ; n--){\n //if the adacent vertex has not been visited\n if(e.getAdjacentVertex(n).hasBeenVisited()==false){\n //change e to adjacent vertex and push onto stack\n e = e.getAdjacentVertex(n);\n stack.push(e);\n //set e as visited at counter\n e.setVisited(counter);\n counter++;\n //reset n to e's num of vertices\n n = e.numberOfAdjacentVertices();\n }\n //if it has been visited and it's the first node in list\n //then pop it off the stack and then set e to new top\n //set n to new num of vertices\n else if(e.getAdjacentVertex(n).hasBeenVisited() && n == 0){\n stack.pop();\n e = stack.peek();\n n = e.numberOfAdjacentVertices();\n }\n }\n }\n }catch(EmptyStackException m){\n }\n }\n //loop through the list and print each with when it was visited\n for(int k = 0; k< vertex_adjacency_list.size(); k++){\n buffer.append(vertex_adjacency_list.get(k) + \":\" + vertex_adjacency_list.get(k).getVisited()+ \"\\n\");\n }\n \n return buffer.toString();\n \n }", "private void getAllNodesBreadthFirstSearch(List<Expression> nodesList)\n/* */ {\n/* 156 */ int indx = 0;\n/* 157 */ nodesList.add(this);\n/* */ \n/* 159 */ while (indx < nodesList.size()) {\n/* 160 */ Expression node = (Expression)nodesList.get(indx++);\n/* 161 */ for (Expression child : node.childs) {\n/* 162 */ nodesList.add(child);\n/* */ }\n/* */ }\n/* */ }", "void bfs(SimpleVertex simpleVertex) {\n\t\twhile (true) {\n\t\t\tif (simpleVertex.isVisited == false) {\n\n\t\t\t\tif (simpleVertex.isAdded == false) {\n\t\t\t\t\tqueue.add(simpleVertex);\n\t\t\t\t\tsimpleVertex.isAdded = true;\n\t\t\t\t}\n\t\t\t\tsimpleVertex.isVisited = true;\n\t\t\t\tSystem.out.print(simpleVertex.Vertexname + \" \");\n\n\t\t\t\tfor (int i = 0; i < simpleVertex.neighborhood.size(); i++) {\n\t\t\t\t\tSimpleEdge node = simpleVertex.neighborhood.get(i);\n\n\t\t\t\t\tif (node.two.isAdded == false)\n\t\t\t\t\t\tqueue.add(node.two);\n\t\t\t\t\tnode.two.isAdded = true;\n\n\t\t\t\t}\n\t\t\t\tqueue.poll();\n\t\t\t\tif (!queue.isEmpty())\n\t\t\t\t\tbfs(queue.peek());\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}", "static int[] bfs(int n, int m, int[][] edges, int s) {\r\n \r\n HashSet<Integer> aList[] = new HashSet[n];\r\n // Array of the nodes of the tree\r\n\r\n Queue<Integer> bfsQueue = new LinkedList();\r\n\r\n boolean visited[] = new boolean[n];\r\n // check if a node is visited or not\r\n\r\n\r\n int cost[] = new int[n];\r\n // cost to travel from one node to other\r\n\r\n for (int i = 0; i < n; i++) {\r\n // intialising the values\r\n visited[i] = false;\r\n cost[i] = -1;\r\n\r\n aList[i] = new HashSet<Integer>();\r\n // Each element of aList is a Set\r\n // To store the neighbouring nodes of a particular node\r\n }\r\n\r\n for (int i = 0; i < m; i++) {\r\n // let node[i] <--> node[j]\r\n\r\n // adding node[j] to neighbours list of node[i]\r\n aList[edges[i][0] - 1].add(edges[i][1] - 1);\r\n\r\n // adding node[i] to neighbours list of node[j]\r\n aList[edges[i][1] - 1].add(edges[i][0] - 1);\r\n }\r\n\r\n //\r\n s = s - 1;\r\n bfsQueue.add(s);\r\n visited[s] = true;\r\n cost[s] = 0;\r\n //\r\n \r\n \r\n while (!bfsQueue.isEmpty()) {\r\n \r\n int curr = bfsQueue.poll();\r\n // takes the last element of the queue\r\n \r\n for (int neigh : aList[curr]) { // iterating the neighbours of node 'curr'\r\n if (!visited[neigh]) { // checking if node neigh id already visited during the search\r\n visited[neigh ] = true;\r\n bfsQueue.add(neigh); //add the node neigh to bfsqueue\r\n cost[neigh] = cost[curr] + 6; \r\n }\r\n }\r\n }\r\n\r\n int result[] = new int[n-1];\r\n\r\n for (int i=0, j=0; i<n && j<n-1; i++, j++) {\r\n if (i == s){\r\n i++;\r\n }\r\n result[j] = cost[i];\r\n }\r\n \r\n return result;\r\n }", "public void depthFirstSearch(Node vertex){\n vertex.visited = true;\n if(vertex.row == row_size-1 && vertex.col == col_size-1){\n while(!dfs_stack.isEmpty()){\n exitPath +=dfs_stack.peek(); \n dfs_stack.pop();\n } \n }\n if(vertex.north!=null && vertex.north.visited==false){\n dfs_stack.push(\"N\");\n vertex.depthFirstSearch(vertex.north);\n }\n if(vertex.south!=null && vertex.south.visited==false){\n dfs_stack.push(\"S\");\n vertex.depthFirstSearch(vertex.south);\n }\n if(vertex.west !=null && vertex.west.visited ==false){\n dfs_stack.push(\"W\");\n vertex.depthFirstSearch(vertex.west);\n }\n if(vertex.east !=null && vertex.east.visited==false){\n dfs_stack.push(\"E\");\n vertex.depthFirstSearch(vertex.east);\n }\n if (!dfs_stack.isEmpty()){\n dfs_stack.pop();\n }\n return;\n }", "public void BFS(int startingVertex) {\n boolean[] visited = new boolean[numberVertices];\n Queue<Integer> q = new LinkedList<>();\n\n //Add starting vertex\n q.add(startingVertex);\n visited[startingVertex] = true;\n\n //Go through queue adding vertex edges until everything is visited and print out order visited\n while (!q.isEmpty()) {\n int current = q.poll();\n System.out.println(current + \" \");\n for (int e : adj[current]) {\n if (!visited[e]) {\n q.add(e);\n visited[e] = true;\n }\n\n }\n }\n }", "void findSearchOrder() {\n boolean filled = false;\n for(int node: queryGraphNodes.keySet()) {\n\n vertexClass vc = queryGraphNodes.get(node);\n searchOrderSeq.add(node);\n for(int edge: queryGraphNodes.get(node).edges.keySet()) {\n filled = calcOrdering(edge);\n if (filled)\n break;\n }\n if(searchOrderSeq.size() == queryGraphNodes.size())\n break;\n\n }\n\n }", "private int[][] searchAdjNodes(int nodeA) {\n\t\tint[] backNodes = new int[vertices[nodeA].length];\n\t\tint backNodesIndex = 0;\n\t\tint[] forwardNodes = new int[vertices[nodeA].length];\n\t\tint forwardNodesIndex = 0;\n\t\tfor (int nodeB : vertices[nodeA]) {\n\t\t\tif (edgeVisited[connectivity[nodeA][nodeB]])\n\t\t\t\tcontinue;\n\t\t\telse if (nodeVisited[nodeB] >= 0)\n\t\t\t\tbackNodes[backNodesIndex++] = nodeB;\n\t\t\telse\n\t\t\t\tforwardNodes[forwardNodesIndex++] = nodeB;\n\t\t}\n\t\tint[][] result = new int[2][];\n\t\t// Then arrange backNodes with depth from small to large\n\t\tint[] backNodesKey = new int[backNodesIndex];\n\t\tfor (int i = 0; i < backNodesIndex; i++)\n\t\t\tbackNodesKey[i] = nodeVisited[backNodes[i]];\n\t\tresult[0] = SortIntSet.sort(Arrays.copyOf(backNodes, backNodesIndex),\n\t\t\t\tbackNodesKey);\n\n\t\t// arrange forward edge/nodes with label from small to large\n\t\tint[] forwardNodesKey = new int[forwardNodesIndex];\n\t\tint[] forwardEdgeKey = new int[forwardNodesIndex];\n\t\tfor (int i = 0; i < forwardNodesIndex; i++) {\n\t\t\tint nodeID = forwardNodes[i];\n\t\t\tforwardNodesKey[i] = connectivity[nodeID][nodeID];\n\t\t\tforwardEdgeKey[i] = edgeLabel[connectivity[nodeA][nodeID]];\n\t\t}\n\t\tresult[1] = SortIntSet.sort(\n\t\t\t\tArrays.copyOf(forwardNodes, forwardNodesIndex), forwardEdgeKey,\n\t\t\t\tforwardNodesKey);\n\t\treturn result;\n\t}", "private void breadthFirstSearch(Node sourceNode, Node destinationNode, String path, HashSet<Character> visited) {\n // Create a list of nodes to visit (children of nodes)\n LinkedList<Node> nextToVisit = new LinkedList<>();\n // Add the first node to the list\n nextToVisit.add(sourceNode);\n\n // Traverse level by level by traversing to all of its children first\n while(!nextToVisit.isEmpty()) {\n Node node = nextToVisit.remove();\n // If its visited already, continue to the next child\n if(visited.contains(node.charId)) {\n continue;\n }\n // Mark the node as visited\n path += \"->\" + node.charId;\n visited.add(node.charId);\n // If destination is reached\n if(node == destinationNode) {\n paths.add(path);\n return;\n }\n // Add all of its children to the next node to visit\n for(Node children : node.adjacent) {\n nextToVisit.add(children);\n }\n }\n\n }", "private void breadthHelper(Graph<VLabel, ELabel>.Vertex v) {\n LinkedList<Graph<VLabel, ELabel>.Vertex> fringe =\n new LinkedList<Graph<VLabel, ELabel>.Vertex>();\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n try {\n visit(curV);\n } catch (RejectException rExc) {\n fringe.add(curV);\n continue;\n }\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n Graph<VLabel, ELabel>.Vertex child = e.getV(curV);\n if (!_marked.contains(child)) {\n try {\n preVisit(e, curV);\n fringe.add(child);\n } catch (RejectException rExc) {\n int unused = 0;\n }\n }\n }\n fringe.add(curV);\n } else {\n postVisit(curV);\n while (fringe.remove(curV)) {\n continue;\n }\n }\n } catch (StopException sExc) {\n _finalVertex = curV;\n return;\n }\n }\n }", "public static void main(String[] args) {\n BreadthFirstSearch g = new BreadthFirstSearch(4);\n\n /* Add edges in graph */\n g.addEdge(0, 0);\n g.addEdge(0,1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n\n System.out.println(\"Traverse graph with BFS...\");\n System.out.println(\"Starting Vertex: 2\");\n\n g.BFS(2);\n }", "void BFS(int s, int d) \r\n { \r\n int source = s;\r\n int destination = d;\r\n boolean visited[] = new boolean[V];\r\n int parent[] = new int[V];\r\n \r\n // Create a queue for BFS \r\n LinkedList<Integer> queue = new LinkedList<Integer>(); \r\n \r\n // Mark the current node as visited and enqueue it \r\n \r\n visited[s]=true; \r\n queue.add(s); \r\n System.out.println(\"Search Nodes: \");\r\n while (queue.size() != 0) \r\n { \r\n int index = 0;\r\n \r\n // Dequeue a vertex from queue and print it \r\n \r\n s = queue.poll();\r\n \r\n System.out.print(convert2(s)); \r\n \r\n if(s == destination)\r\n {\r\n break;\r\n }\r\n \r\n System.out.print(\" -> \");\r\n while(index < adj[s].size()) \r\n { \r\n \r\n \r\n int n = adj[s].get(index); \r\n if (!visited[n]) \r\n { \r\n visited[n] = true;\r\n parent[n] = s;\r\n queue.add(n); \r\n }\r\n index = index+ 2;\r\n \r\n \r\n }\r\n \r\n \r\n \r\n }\r\n int check = destination;\r\n int cost = 0, first, second = 0;\r\n String string = \"\" + convert2(check);\r\n while(check!=source)\r\n {\r\n \r\n first = parent[check];\r\n string = convert2(first) + \" -> \" + string;\r\n while(adj[first].get(second) != check)\r\n {\r\n second++;\r\n }\r\n cost = cost + adj[first].get(second +1);\r\n check = first;\r\n second = 0;\r\n \r\n }\r\n \r\n System.out.println(\"\\n\\nPathway: \");\r\n \r\n System.out.println(string);\r\n \r\n \r\n System.out.println(\"\\nTotal cost: \" + cost);\r\n }", "int[] bfs(int[][] graph,int source){\n int len=graph.length;\n int shortest_path[]=new int[len];\n int parent[]=new int[len];\n Arrays.fill(shortest_path, Integer.MAX_VALUE/2);\n shortest_path[source]=0;\n Queue<Integer> q=new LinkedList<>();\n q.add(source);\n while (!q.isEmpty()) { \n int u=q.poll();\n for(int v:graph[u]){\n if(shortest_path[v]==Integer.MAX_VALUE/2){\n q.add(v);\n shortest_path[v]=shortest_path[u]+1;\n parent[v]=u;\n }\n }\n }\n return shortest_path;\n }", "static void FindPath(vertex s, vertex[] array){\r\n\t\tvertex v; \r\n\t\tint min = Integer.MAX_VALUE;\r\n\t\t//node wN; vertex wV; //wN= adjacent node in LinkedList; wV= find the values in the vertices for wL\r\n\t\tint j =0;\r\n\t\ts.known = true;\r\n\t\ts.dist = 0;\r\n\t\tShortestPath(s, array);\r\n\t\r\n\t\twhile(j<array.length-1 ){ //&& array[j].known== false){\r\n\t\t\tint count = 0; \r\n\t\t\tmin = Integer.MAX_VALUE;\r\n\t\t\tfor(int i = 0; i<array.length; i++){\r\n\t\t\t\tif(array[i].known== false && array[i].dist < min){\r\n\t\t\t\t\tmin = array[i].dist;\r\n\t\t\t\t\tcount = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tv = array[count];\r\n //System.out.println(\"count: \" + count + \"Next v: \" + v.name);\r\n\t\t\tShortestPath(v, array);\r\n\t\t\tj++; \t\t\r\n }\r\n\t}", "public void floyd_warshall()\n{\n /*\n * We get the minimum tree again, but we allow cycles this time. This gives\n * us the complete tree, but with edges ranked by priority.\n */\n this.minimumTree = this._getKruskalTree(true);\n for (int loop = 0;\n loop < this.nVerts;\n loop++\n ) {\n this.bellman_ford(loop);\n }\n}", "public static void main(String[] args) {\n\t\tint[][] m= { {197,130,139,188},{20,24,167,182},{108,78,169,193},{184,65,83,41} };\r\n\t\tint[][] m2= {{149,77,42,136},\r\n\t\t\t\t{145,155,45,0},\r\n\t\t\t\t{136,102,182,87},\r\n\t\t\t\t{178,183,143,60}};\r\n\t\tfor (int[] is : m2) {\r\n\t\t\tfor (int is2 : is) {\r\n\t\t\t\tSystem.out.print(is2+\",\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\t\t}\r\n\t\tSearchable matrix=new Matrix(m2,new MatrixState(\"0,0\"),new MatrixState(\"3,3\"));\r\n\t\tSearcher<String> sol=new BFS<>();\r\n\t\tSystem.out.println(sol.search(matrix));\r\n\t}", "void testSearches(Tester t) {\n Vertex v1 = new Vertex(10, 10);\n Vertex v2 = new Vertex(10, 11);\n Vertex v3 = new Vertex(10, 12);\n\n Edge e1 = new Edge(v1, v2, 1);\n Edge e2 = new Edge(v2, v3, 1);\n\n IList<Vertex> map = new Cons<Vertex>(v1, new Cons<Vertex>(v2, new Cons<Vertex>(\n v3, new Empty<Vertex>())));\n\n Player player = new Player(map);\n DepthFirst dp = new DepthFirst(map);\n BreadthFirst bp = new BreadthFirst(map);\n\n t.checkExpect(player.current, v1);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), true);\n t.checkExpect(bp.next(), new Queue<Vertex>());\n\n t.checkExpect(dp.hasNext(), true);\n t.checkExpect(dp.next(), new Stack<Vertex>());\n\n t.checkExpect(player.move(true, e1), v2);\n\n t.checkExpect(player.current, v2);\n t.checkExpect(player.finished, false);\n\n t.checkExpect(bp.hasNext(), false);\n t.checkExpect(bp.next(), v3);\n\n t.checkExpect(dp.hasNext(), false);\n t.checkExpect(dp.next(), v3);\n\n t.checkExpect(player.move(true, e2), v3);\n\n player.finished = true;\n\n t.checkExpect(player.current, v3);\n t.checkExpect(player.finished, true);\n\n Queue<Vertex> q = new Queue<Vertex>(map);\n\n q.enqueue(new Vertex(5, 5));\n\n Deque<Vertex> dq = new Deque<Vertex>();\n dq.addAtHead(v1);\n dq.addAtTail(v2);\n dq.addAtTail(new Vertex(5, 5));\n\n\n t.checkExpect(q.isEmpty(), false);\n t.checkExpect(q.contents, dq);\n\n Stack<Vertex> stack = new Stack<Vertex>(map);\n\n t.checkExpect(stack.isEmpty(), false);\n dq.removeFromHead();\n t.checkExpect(stack.pop(), dq);\n\n t.checkExpect(dp.next(), v2);\n t.checkExpect(bp.hasNext(), true);\n\n }", "public int breadthFirstSearch(T srcId, T destId)\n {\n if (nodeList.isEmpty())\n {\n System.out.println(\"Empty graph\");\n return -1;\n }\n \n // queue used during the traversal\n LinkedList<QueueNode> queue = new LinkedList();\n \n // keeps track of node which are visited and added into the queue\n HashMap<T, Integer> visited = new HashMap();\n \n // find srcNode with id = srcId in graph\n GraphNode srcNode = nodeList.get(srcId);\n \n // if srcNode is not there in graph, breadth first traversal which starts at srcNode cannot be done \n if (srcNode == null)\n {\n System.out.println(\"Source vertex not found\");\n return -1;\n }\n \n int minNumberTrials = -1;\n \n // add srcNode in queue, mark it as visited\n queue.add(new QueueNode(srcNode, 0));\n visited.put(srcNode.nodeId, 1);\n \n while (!queue.isEmpty())\n {\n QueueNode currentNode = queue.remove();\n \n // if destination node found\n if (currentNode.graphNode.nodeId == destId)\n {\n minNumberTrials = currentNode.level;\n break;\n }\n \n // first neighbor of current graph node\n GraphNode neighbor = currentNode.graphNode.next;\n \n // add all neighbors of current graph node into the queue\n while (neighbor != null)\n {\n // if this neighbor is not visited earlier, mark it as visited\n // add it to the queue at appropriate level\n if (visited.get(neighbor.nodeId) == null)\n {\n visited.put(neighbor.nodeId, 1);\n queue.add(new QueueNode(findGraphNode(neighbor.nodeId), currentNode.level + 1));\n }\n neighbor = neighbor.next; \n }\n }\n \n return minNumberTrials;\n }", "int bfs(Vertex start, Vertex goal) {\n // Create queue for holding upcoming vertices to check.\n Queue<Vertex> queue = new LinkedList<>();\n // Create list of vertices that have been checked.\n ArrayList<Vertex> visited = new ArrayList<>(verticesAndTheirEdges.size());\n\n // Create map for storing distance from start to each vertex.\n // Defaults to -1 (since we want to return -1 if no path can be found)\n HashMap<Vertex, Integer> distance = new HashMap<>();\n for (Map.Entry<Vertex, LinkedList<Vertex>> vertex : verticesAndTheirEdges.entrySet()) {\n distance.put(vertex.getKey(), -1);\n }\n distance.put(start, 0);\n\n // Add start vertex to queue to initiate search,\n // then add it to the 'visited' list so that we don't check it again.\n queue.add(start);\n visited.add(start);\n while (!queue.isEmpty()) {\n // Take the first vertex from the queue.\n Vertex v = queue.remove();\n // Get all the vertexes edges.\n List<Vertex> neighbours = verticesAndTheirEdges.get(v);\n for (Vertex n : neighbours) {\n // If we haven't visited the neighboring vertex:\n if (n != null && !visited.contains(n)) {\n // Save the neighbors distance as the previous vertex distance +1.\n distance.put(n, distance.get(v) + 1);\n // Add the vertex to the queue of upcoming vertices to check.\n queue.add(n);\n // Mark vertex as visited.\n visited.add(n);\n }\n }\n }\n // Return the distance between start and goal vertices in the graph.\n return distance.get(goal);\n }", "public void bft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<GeographicPoint> bfs(GeographicPoint start, \n\t\t\t \t\t\t\t\t GeographicPoint goal, Consumer<GeographicPoint> nodeSearched)\n\t{\n\t\t// TODO: Implement this method in WEEK 3\n\t\t\n\t\t// Hook for visualization. See writeup.\n\t\t//nodeSearched.accept(next.getLocation());\n\t\t\n\t\tSet<GeographicPoint> visited = new HashSet<GeographicPoint>();\n\t\tList<GeographicPoint> queue = new ArrayList<GeographicPoint>();\n\t\tHashMap<GeographicPoint, List<GeographicPoint>> prev = new HashMap<GeographicPoint, List<GeographicPoint>>();\n\t\t\n\t\tfor (GeographicPoint temp : map.keySet())\n\t\t\tprev.put(temp, new ArrayList<GeographicPoint>());\n\t\t\n\t\tif (!map.containsKey(start) || !map.containsKey(goal)) \n\t\t\treturn null;\n\t\t\n\t\tqueue.add(start);\n\t\twhile (!queue.isEmpty() && !visited.contains(goal)) {\n\t\t\t\n\t\t\tGeographicPoint currPoint = queue.get(0);\n\t\t\tMapNode currNode = map.get(currPoint);\n\t\t\tnodeSearched.accept(currPoint);\n\t\t\t\n\t\t\tqueue.remove(0);\n\t\t\tHashMap<MapEdge, GeographicPoint> neighbours = currNode.getNeighbours();\n\t\t\tfor (GeographicPoint n : neighbours.values()) {\n\t\t\t\tif (n.equals(start))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (!visited.contains(n)) {\n\t\t\t\t\tqueue.add(n);\n\t\t\t\t\tvisited.add(n);\n\t\t\t\t\tprev.get(n).add(currPoint);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn backTrack(prev, goal);\n\t}", "private static void search(graph M, graph D, Tuple[] h){\n\t\tint v = M.V[0];\n\t\tint q = 0; //q keeps track of the index in the Tuple array where a new tuple is placed\n\t\tfor(; q < h.length && h[q] != null; q++){\n\t\t\t;\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < D.V.length; i++){\n\t\t\tint w = D.V[i];\n\t\t \tTuple t = new Tuple(v, w);\n\t\t\th[q] = t; //add a new tuple\n\t\t\tboolean OK = true;\n\t\t\tfor (int k = 0; k < M.V.length; k++){\n\t\t\t\tboolean shouldBreak = false;\n\t\t\t\tfor (int j = 0; j < M.V.length; j++){\n\t\t\t\t\tif (M.matrix[M.V[k]][M.V[j]] == 0){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\tThis is part of the pseudo-code that I tried to incorporate\n\t\t\t\t\tI could not quite get it to work, I believe the problem is \n\t\t\t\t\tin the big if statement. Instead I wrote a different chunk of code\n\t\t\t\t\tthat determines in the th should be printed.\n\t\t\t\t\t*/\n// \t\t\t\t\tif ( (M.V[k] == v && searchH(M.V[j], h) != null) || (M.V[j] == v && searchH(M.V[k], h) != null) ){\n// \t\t\t\t\t\tif(D.matrix[searchH(M.V[k], h).y][searchH(M.V[j], h).y] == 0){\n// \t\t\t\t\t\t\tOK = false;\n// \t\t\t\t\t\t\tshouldBreak = true;\n// \t\t\t\t\t\t\tbreak;\n// \t\t\t\t\t\t}\n// \t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(shouldBreak == true){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (OK == true){\n\t\t\t\tif(M.V.length == 1){\n\t\t\t\tboolean isGood = true;\n\t\t\t\t/*\n\t\t\t\tThis is what determines if h should be printed.\n\t\t\t\tEssentially it checks h against the adjacency matrices,\n\t\t\t\tand if the edges are present, it prints them out.\n\t\t\t\t*/\n\t\t\t\t\tfor(int g = 0; g < h.length && isGood == true; g++){\n\t\t\t\t\t\tfor(int f = g+1; f < h.length && isGood == true; f++){\n\t\t\t\t\t\t\tif(M.matrix[h[g].x][h[f].x] == 1 && D.matrix[h[g].y][h[f].y] == 0){\n\t\t\t\t\t\t\t\tisGood = false;\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\tif(isGood == true){\n\t\t\t\t\t\tSystem.out.println(printH(h));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\tHere I rebuild the vertex arrays and attached them to a new graph\n\t\t\t\tfor use as an argument in the recursive call.\n\t\t\t\t*/\n\t\t\t\telse{\t\t\n\t\t\t\t\tint[] modelTemp = rebuildV(v, M.V);\n\t\t\t\t\tint[] dataTemp = rebuildV(D.V[i], D.V);\n\n\t\t\t\t\tTuple[] h2 = new Tuple[h.length];\n\t\t\t\t\tfor(int p = 0; p < h.length; p++){\n\t\t\t\t\t\th2[p] = h[p];\n\t\t\t\t\t}\n\t\t\t\t\tgraph M2 = new graph();\n\t\t\t\t\tgraph D2 = new graph();\n\t\t\t\t\t\n\t\t\t\t\tM2.V = modelTemp;\n\t\t\t\t\tD2.V = dataTemp;\n\t\t\t\t\tM2.matrix = M.matrix;\n\t\t\t\t\tD2.matrix = D.matrix;\n\t\t\t\t\t\n\t\t\t\t\t//recursive call\n\t\t\t\t\tsearch(M2, D2, h2);\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private static void DepthFirstSearch(int i, ArrayList<ArrayList<Integer>> nodes, boolean[] visited) {\n\t\tif(nodes == null) return;\n\t\tvisited[i] = true;\n\t\tSystem.out.println(i);\n\t\tfor(int p : nodes.get(i)) {\n\t\t\tif(!visited[p]) {\n\t\t\t\tDepthFirstSearch(p,nodes, visited);\n\t\t\t}\n\t\t}\n\t\t\t\n\t}", "int BFS(int source,int sink) \n {\n\tint first=0, last=0; \n int[] queue=new int[V]; \n int[] mark = new int[V]; \n \n for (int i = 0; i < V; i++) {\n mark[i] = 0; // Mark all vertices as not visited \n minFlow[i] = 10000000;\n }\n\n queue[last++] = source; //enqueue source vertex\n mark[source] = 1; //mark source vertex as visited\n //BFS Loop\n while (first != last) { // While queue is not empty.\n int v = queue[first++];\n for (int u = 0; u < V; u++){\n if (mark[u] == 0 && resCap[v][u] > 0) {\n minFlow[u] = Math.min(minFlow[v],resCap[v][u]);\n parent[u] = v;\n mark[u] = 1;\n if (u == sink) //If we reach sink starting from source, then return 1\n return 1;\n queue[last++] = u;\n }\n }\n }\n return 0; //else return 0\n }", "public void BFS() {\n visitedCells = 1;\n\n // Initialize the vertices\n for (int j = 0; j < maze.getGrid().length; j++) {\n for (int k = 0; k < maze.getGrid().length; k++) {\n Cell cell = maze.getGrid()[j][k];\n cell.setColor(\"WHITE\");\n cell.setDistance(0);\n cell.setParent(null);\n }\n }\n\n Cell sourceCell = maze.getGrid()[0][0];\n Cell neighbor = null;\n Cell currentCell;\n int distance = 0;\n\n // Initialize the source node\n sourceCell.setColor(\"GREY\");\n sourceCell.setDistance(0);\n sourceCell.setParent(null);\n\n queue.add(sourceCell);\n\n // Visits each cell until the queue is empty\n while (!queue.isEmpty()) {\n currentCell = queue.remove();\n\n for (int i = 0; i < currentCell.mazeNeighbors.size(); i++) {\n neighbor = currentCell.mazeNeighbors.get(i);\n\n // Stop the search if you reach the final cell\n if (neighbor.x == r - 1 && neighbor.y == r - 1) {\n distance++;\n if (distance == 10)\n distance = 0;\n neighbor.setDistance(distance);\n neighbor.setParent(currentCell);\n neighbor.visited = true;\n visitedCells++;\n break;\n }\n\n // Checks each neighbor and adds it to the queue if its color is white\n if (neighbor.getColor().equalsIgnoreCase(\"WHITE\")) {\n distance++;\n if (distance == 10)\n distance = 0;\n neighbor.setColor(\"GREY\");\n neighbor.setDistance(distance);\n neighbor.setParent(currentCell);\n neighbor.visited = true;\n queue.add(neighbor);\n visitedCells++;\n }\n }\n // Stop the search if you reach the final cell\n if (neighbor.x == r - 1 && neighbor.y == r - 1)\n break;\n\n currentCell.setColor(\"BLACK\");\n }\n }", "public void bfs(Vertex<T> start) {\n\t\t\t// BFS uses Queue data structure\n\t\t\tQueue<Vertex<T>> que = new LinkedList<Vertex<T>>();\n\t\t\tstart.visited = true;\n\t\t\tque.add(start);\n\t\t\tprintNode(start);\n\n\t\t\twhile (!que.isEmpty()) {\n\t\t\t\tVertex<T> n = (Vertex<T>) que.remove();\n\t\t\t\tVertex<T> child = null;\n\t\t\t\twhile ((child = getUnvisitedChildren(n)) != null) {\n\t\t\t\t\tchild.visited = true;\n\t\t\t\t\tque.add(child);\n\t\t\t\t\tprintNode(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "boolean contains(int vertex);", "public void breadthFirst() {\n\t\tQueue<Node> queue = new ArrayDeque<>();\n\t\tqueue.add(root);\n\t\twhile(!queue.isEmpty()) {\n\t\t\tif(queue.peek().left!=null)\n\t\t\t\tqueue.add(queue.peek().left);\n\t\t\tif(queue.peek().right!=null)\n\t\t\t\tqueue.add(queue.peek().right);\n\t\t\tSystem.out.println(queue.poll().data);\n\t\t}\n\t}", "public native VertexNode first();", "private boolean BFS(int i) {\n color[i] = 1;\n for (int j : alphabet.get(i)) {\n // Making sure we don't check one vertex twice\n if (color[j] != -1) {\n if (color[j] == 0) {\n if (BFS(j)) return true;\n }\n // Found visited vertex --> We found cycle\n if (color[j] == 1) {\n System.out.println(j);\n return true;\n }\n }\n }\n //Vertex checked\n color[i] = -1;\n return false;\n }", "public int depthFirstSearch(List<Integer>[] adj){\n int connected = 0;\n for(int i = 0; i < n; i++){\n if(visited[i] == false){\n connected ++;\n dfsRecursive(adj, i);\n }\n }\n return connected;\n }", "public static void bfs(gNode[] G, boolean[] visited, int[] path, int s){\n\t\tQueue<Integer> Q = new LinkedList<Integer>();\n\n\t\tQ.add(s);\n\t\tvisited[s] = true;\n\t\twhile(!Q.isEmpty()){\n\t\t\ts = Q.poll();\n\t\t\tfor(gNode t=G[s]; t!= null; t=t.dest){\n\t\t\t\tSystem.out.println(\"BFS\");\n\t\t\t\tif(!visited[t.item]){\t\t//once an item has been visited, set it equal to true\n\t\t\t\t\tvisited[t.item] = true;\n\t\t\t\t\tpath[t.item] = s;\t\t//change the int value of the path\n\t\t\t\t\tQ.add(t.item);\n\t\t\t\t\tSystem.out.println(t.item);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public List<Node<E>> breadthFirst(Node<E> start){\n\n //set that will contain visited nodes\n HashSet<Node<E>> visited = new HashSet<>();\n\n // resulting nodes\n List<Node<E>> result = new ArrayList<>();\n\n //queue for traversal\n Queue<Node<E>> nodeList = new LinkedList<>();\n //check if the node exists in the graph\n\n if(start == null){\n throw new IllegalArgumentException(\"Node cannot be null\");\n }\n\n if(nodes.containsKey(start)){\n nodeList.add(start);\n visited.add(start);\n result.add(start);\n } else{\n throw new IllegalArgumentException(\"Node is not in the graph\");\n }\n\n //traverse through the queue\n while(!nodeList.isEmpty()){\n Node<E> curNode = nodeList.poll();\n\n //check if the node has been visited, if not add to the result\n if(!visited.contains(curNode)){\n result.add(curNode);\n }\n\n //add the node to visited\n visited.add(curNode);\n //get all the neighbors of the node and add to the queue\n nodes.get(curNode).forEach( neighbor -> {\n if(!visited.contains(neighbor)) {\n nodeList.add(neighbor);\n }\n });\n\n }\n\n return result;\n }", "private static void bfs(int idx) {\n\t\t\n\t\tQueue<node> q =new LinkedList<node>();\n\t\tq.add(new node(idx,0,\"\"));\n\t\twhile (!q.isEmpty()) {\n\t\t\tnode tmp = q.poll();\n\t\t\tif(tmp.idx<0 ||tmp.idx > 200000) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(tmp.cnt> min) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tmp.idx == k) {\n\t\t\t\tif(tmp.cnt < min) {\n\t\t\t\t\tmin = tmp.cnt;\n\t\t\t\t\tminnode = tmp;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(!visit[tmp.idx] && tmp.idx<=100000) {\n\t\t\t\tvisit[tmp.idx]= true;\n\t\t\t\tq.add(new node(tmp.idx*2, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx-1, tmp.cnt+1,tmp.s));\n\t\t\t\tq.add(new node(tmp.idx+1, tmp.cnt+1,tmp.s));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void breadthFirstTraverse(Graph<VLabel, ELabel> G,\n Graph<VLabel, ELabel>.Vertex v) {\n _graph = G;\n _finalVertex = null;\n _curTraversal = \"bft\";\n _marked = new HashSet<Graph<VLabel, ELabel>.Vertex>();\n breadthHelper(v);\n }", "public void bfs(int s) {\n boolean[] visited = new boolean[v];\n int level = 0;\n parent[s] = 0;\n levels[s] = level;\n Queue<Integer> queue = new LinkedList<>();\n queue.add(s);\n visited[s] = true;\n while (!queue.isEmpty()){\n Integer next = queue.poll();\n System.out.print(next+\", \");\n Iterator<Integer> it = adj[next].listIterator();\n\n while (it.hasNext()){\n Integer i = it.next();\n if(!visited[i]){\n visited[i] = true;\n levels[i] = level;\n parent[i] = next;\n queue.add(i);\n }\n }\n\n level++;\n }\n }", "private static void BFS(int[][] adjacencyMatrix) {\n\t\tint n = adjacencyMatrix.length;\n\t\tboolean visited[] = new boolean[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(!visited[i]) {\n\t\t\tprintBFS(adjacencyMatrix,i,visited);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t\n\t}", "public static UniformCostSearchNode searchBnB(UniformCostSearchNode root){\n PriorityQueue<UniformCostSearchNode> frontier = new PriorityQueue<UniformCostSearchNode>();\n\n // hash set for fast verification of closed nodes\n HashSet<UniformCostSearchNode> closed = new HashSet<UniformCostSearchNode>();\n\n int upperBoundCost = Integer.MAX_VALUE;\n\n frontier.add(root);\n\n while(frontier.size() != 0){\n UniformCostSearchNode current = frontier.remove();\n if(current.isGoalState()){\n System.out.println(\"UCS B&B Nodes explored: \" + closed.size());\n return current;\n }\n\n // implicitly pruning the frontier\n if(current.getCost() >= upperBoundCost){\n // skipping due to bounding\n continue;\n }\n\n closed.add(current);\n\n PriorityQueue<UniformCostSearchNode> toAdd = new PriorityQueue<UniformCostSearchNode>();\n for(UniformCostSearchNode neighbor : current.getNeighbors()){\n toAdd.add(neighbor);\n }\n\n while(toAdd.size() != 0) {\n UniformCostSearchNode neighbor = toAdd.remove();\n if (neighbor.getCost() < upperBoundCost) {\n if (neighbor.isGoalState()) {\n // bounding\n upperBoundCost = neighbor.getCost();\n }\n frontier.add(neighbor);\n }\n }\n }\n\n System.out.println(\"UCS B&B Search failed, nodes explored: \" + closed.size());\n // search failed\n return null;\n }", "private static int bipartite(ArrayList<Integer>[] adj) {\n\t\tGraph g = new Graph(adj);\n\t\tg.traversBFS(0);\n\t\tif(g.isBipartite())\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n }", "private static int bSearch(int[] elements, int key) {\n int left = 0, right = elements.length - 1, mid = 0;\n while (left <= right) {\n mid = (left + right) / 2;\n\n if (key < elements[mid]) {\n right = mid - 1;\n } else if (key == elements[mid]) {\n return mid;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }", "abstract int binSearch(int[] array, int num, int left, int right);", "public List<Edge> breadthFirstTraverse(String v) {\n int start = indexOf(v);\n if (start == -1) return new LinkedList<>();\n\n List<Edge> path = new LinkedList<>();\n Queue<Integer> queue = new Queue<>();\n boolean[] visited = new boolean[vertexes.length];\n\n queue.enQueue(start);\n while(!queue.isEmpty()) {\n start = queue.deQueue();\n visited[start] = true;\n\n for (int i: this.heads[start]) {\n if (!visited[i]) { // not visited yet\n visited[i] = true;\n path.add(new Edge(start, i));\n\n queue.enQueue(i); // add to the queue for the next loop\n }\n }\n }\n\n return path;\n }", "private void bfs(int nodeKey) {\n Queue<Integer> q = new LinkedList<>();\n // initialize all the nodes\n for (node_data node : G.getV())\n node.setTag(0);\n\n int currentNode = nodeKey;\n\n // iterate the graph and mark nodes that have been visited\n while (G.getNode(currentNode) != null) {\n for (edge_data edge : G.getE(currentNode)) {\n node_data dest = G.getNode(edge.getDest());\n if (dest.getTag() == 0) {\n q.add(dest.getKey());\n }\n G.getNode(currentNode).setTag(1);\n }\n if(q.peek()==null)\n currentNode=-1;\n else\n currentNode = q.poll();\n }\n }", "int main()\n{\n // Create a graph given in the above diagram\n Graph g(4);\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n \n cout << \"Following is Breadth First Traversal \"\n << \"(starting from vertex 2) n\";\n g.BFS(2);\n \n return 0;\n}", "private boolean bfs(final int[][] resGraph, final int source, final int target, final int[] parent)\n {\n // Create a visited array and mark all vertices as not visited\n final boolean[] visited = new boolean[V];\n\n // Create a queue, enqueue source vertex\n // and mark source vertex as visited\n final Deque<Integer> queue= new ArrayDeque<>();\n //We start from s, marking as visited.\n queue.push(source);\n visited[source] = true;\n parent[source] = -1;\n\n // Standard BFS Loop\n while (!queue.isEmpty()) {\n final int u = queue.pollFirst();\n\n for (int v=0; v<V; v++) {\n if (!visited[v] && resGraph[u][v] > 0) {\n //Put the neighbors to the queue\n queue.push(v);\n //keep track for augmenting path\n parent[v] = u;\n visited[v] = true;\n }\n }\n }\n //augmenting path is found\n return visited[target];\n }", "private void depthFirstSearch(DirectedGraph graph, int vertex) {\r\n \r\n visited[vertex] = true;\r\n inRecursionStack[vertex] = true;\r\n \r\n for(int adjacentVertex: graph.adjacentVertices(vertex)) {\r\n if(inRecursionStack[adjacentVertex]) {\r\n throw new IllegalArgumentException(String.format(\"Graph contains a cycle: no topological sort possible: %s -> %s\", vertex, adjacentVertex));\r\n }\r\n \r\n if(!visited[adjacentVertex]) {\r\n depthFirstSearch(graph, adjacentVertex);\r\n }\r\n }\r\n\r\n reversePostOrder.push(vertex); \r\n inRecursionStack[vertex] = false;\r\n }", "public void depthFirstSearch(int vertexIndex) {\n Stack<Integer> stack = new Stack<Integer>();\n vertexList[vertexIndex].wasVisited = true;\n displayVertex(vertexIndex);\n stack.push(vertexIndex);\n while (!stack.isEmpty()) {\n int unvisitedVertexIndex = getAdjacentUnvisitedVertexIndex(stack.peek());\n if(unvisitedVertexIndex == -1) {\n stack.pop();\n } else {\n vertexList[unvisitedVertexIndex].wasVisited = true;\n displayVertex(unvisitedVertexIndex);\n stack.push(unvisitedVertexIndex);\n }\n }\n for (int i = 0; i < vertexCount; i++) {\n vertexList[i].wasVisited = false;\n\n }\n }", "void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }", "public static Node searchBFS(int mat[][], int i, int j, int x, int y) {\n\t\tfor (int n = 1; n < 30; n++) {\n\t\t\tfor (int p = 1; p < 30; p++) {\n\t\t\t\tvisited[n][p] = false;\n\t\t\t}\n\t\t}\n\n\t\t// create an empty queue\n\t\tQueue<Node> q = queue;\n\t\tq.clear();\n\t\t// mark source cell as visited and enqueue the source node\n\t\tvisited[j][i] = true;\n\t\tNode root = NodeFactory.createNode(i, j, 0, null, null);\n\t\tq.add(root);\n\n\t\t// stores length of longest path from source to destination\n\t\tint min_dist = Integer.MAX_VALUE;\n\t\tNode node = null;\n\n\t\t// run till queue is not empty\n\t\twhile (!q.isEmpty()) {\n\t\t\t// pop front node from queue and process it\n\n\t\t\tnode = q.poll();\n\t\t\ti = node.x;\n\t\t\tj = node.y;\n\t\t\tint dist = node.dist;\n\n\t\t\tif (i == x && j == y) {\n\t\t\t\tmin_dist = dist;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor (Direction dir : DIRECTIONS) {\n\t\t\t\tint nx = i + dir.x;\n\t\t\t\tint ny = j + dir.y;\n\n\t\t\t\tif (isValid(mat, visited, nx, ny)) {\n\t\t\t\t\t// mark next cell as visited and enqueue it\n\n\t\t\t\t\tvisited[ny][nx] = true;\n\t\t\t\t\tint ndist = dist + 1;\n\n\t\t\t\t\tNode newNode = NodeFactory.createNode(nx, ny, ndist, dir,\n\t\t\t\t\t\t\tnode);\n\n\t\t\t\t\t// Node newNode =new Node(node, nx, ny, ndist, dir);\n\n\t\t\t\t\tq.add(newNode);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (min_dist == Integer.MAX_VALUE){\n\t\t\treturn null;\n\t\t}\n\t\treturn node;\n\t}", "private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private void bfs(Node node, HashSet<Integer> visited) {\n\t\tLinkedList<Node> queue = new LinkedList<Node>();\n\t\tvisited.add(node.id);\n\t\tqueue.add(node);\n\t\twhile(!queue.isEmpty()) {\n\t\t\tNode s = queue.remove();\n\t\t\tSystem.out.println(s.id);\n\t\t\tfor(Node n : s.adj) {\n\t\t\t\tif(!visited.contains(n.id)) {\n\t\t\t\t\tqueue.add(n);\n\t\t\t\t\tvisited.add(n.id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void bfs(GraphNode source)\n {\n Queue<GraphNode> q = new ArrayDeque<>();\n q.add(source);\n HashMap<GraphNode,Boolean> visit =\n new HashMap<GraphNode,Boolean>();\n visit.put(source,true);\n while (!q.isEmpty())\n {\n GraphNode u = q.poll();\n System.out.println(\"Value of Node \" + u.val);\n System.out.println(\"Address of Node \" + u);\n if (u.neighbours != null)\n {\n List<GraphNode> v = u.neighbours;\n for (GraphNode g : v)\n {\n if (visit.get(g) == null)\n {\n q.add(g);\n visit.put(g,true);\n }\n }\n }\n }\n System.out.println();\n }", "private static boolean bfs(int u, int v) {\n int i;\n String[] color = new String[Graph.size()];\n // init the arr\n for (i = 0; i < color.length; i++) {\n color[i] = \"White\";\n }\n\n color[u] = \"Grey\";\n\n Queue<Integer> q = new LinkedList<>();\n q.add(u);\n\n while (!q.isEmpty()) {\n int current = q.poll();\n\n // iterating through the current neighbours\n for (i = 0; i < Graph.get(current).size(); i++) {\n int neighbour = Graph.get(current).get(i);\n\n // it means we reach v from another way so the graph is connected even tough we deleted an edge.\n if (neighbour == v) {\n return true;\n }\n\n // checking if the neighbours are white, if so turn them to grey.\n if (color[neighbour].equals(\"White\")) {\n color[neighbour] = \"Grey\";\n }\n\n // entering next neighbour to the queue.\n if (!color[neighbour].equals(\"Black\"))\n q.add(neighbour);\n }\n // after we finished with the current vertex.\n color[current] = \"Black\";\n\n\n }\n return false;\n }", "@Override\n\tpublic List<Node<E>> bfs(DirectedGraph<E> graph) {\n\t\tList<Node<E>> returnList = new ArrayList<>(); // O(1)\n\t\tHashSet<Node<E>> visitedList = new HashSet<>(); // O(1)\n\t\tHashSet<Node<E>> hashSet = new HashSet<>(); // O(1)\n\n\t\t// If the graph does contains heads, iterate from the head.\n\t\tif(graph.headCount() > 0) { // O(1)\n\t\t\tIterator<Node<E>> heads = graph.heads(); // O(1)\n\t\t\twhile(heads.hasNext()) { // O(n)\n\t\t\t\tNode<E> node = heads.next(); // O(1)\n\n\t\t\t\tif(!visitedList.contains(node)) { // O(1)\n\t\t\t\t\tnode.num = visitedList.size(); // O(1)\n\t\t\t\t\tvisitedList.add(node); // O(1)\n\t\t\t\t\thashSet.add(node); // O(1)\n\t\t\t\t\treturnList.add(node); // O(1)\n\t\t\t\t\treturnList = bfsRecursive(hashSet, visitedList, returnList); // O(1)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Else start from the first node in the graph.\n\t\telse {\n\t\t\thashSet.add(graph.getNodeFor(graph.allItems().get(0))); // O(1)\n\t\t\treturnList = bfsRecursive(hashSet, visitedList, returnList); // O(1)\n\t\t}\n\t\treturn returnList;\n\t}", "public static Integer[] LexBFS(Graph<Integer,String> g) {\n\t\tGraph<myVertex,String> h = new SparseGraph<myVertex,String>();\r\n\t\th = convertToWeighted(g);\r\n\t\tfinal int N = g.getVertexCount();\r\n\t\t//System.out.print(\"Done. Old graph: \"+N+\" vertices. New graph \" +h.getVertexCount()+\"\\n\");\r\n\t\t\r\n\t\t//System.out.print(\"New graph is:\\n\"+h+\"\\n\");\r\n\t\tmyVertex[] queue = new myVertex[N];\r\n\t\t\r\n\t\tIterator<myVertex> a = h.getVertices().iterator();\r\n\t\tqueue[0] = a.next(); // start of BFS search. Now add neighbours.\r\n\t\tint indexCounter = 1;\r\n\t\tint pivot = 0;\r\n\t\t//System.out.print(\"Initial vertex is: \"+queue[0]+\" \");\r\n\t\tSystem.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tIterator<myVertex> b = h.getNeighbors(queue[0]).iterator();\r\n\t\twhile (b.hasNext()) {\r\n\t\t\tqueue[indexCounter] = b.next();\r\n\t\t\tqueue[indexCounter].label.add(N);\r\n\t\t\tqueue[indexCounter].setColor(1); // 1 = grey = queued\r\n\t\t\tindexCounter++;\r\n\t\t}\r\n\t\t//System.out.print(\"with \"+(indexCounter-1) +\" neighbours\\n\");\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tqueue[0].setColor(2); // 2 = black = processed\r\n\t\t// indexCounter counts where the next grey vertex will be enqueued\r\n\t\t// pivot counts where the next grey vertex will be processed and turned black\r\n\r\n\t\tpivot = 1;\r\n\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\twhile (pivot < indexCounter) {\r\n\t\t\t// first, find the highest labelled entry in the rest of the queue\r\n\t\t\t// and move it to the pivot position. This should be improved upon\r\n\t\t\t// by maintaining sorted order upon adding elements to the queue\r\n\t\t\t\r\n\t\t\t//System.out.print(\"choosing next vertex...\\n\");\r\n\t\t\tint max = pivot;\r\n\t\t\tfor (int i = pivot+1; i<indexCounter; i++) {\r\n\t\t\t\t//indexCounter is the next available spot, so indexCounter-1 is the last\r\n\t\t\t\t//entry i.e. it is last INDEX where queue[INDEX] is non-empty.\r\n\t\t\t\tif (queue[i].comesBefore(queue[max])) {\r\n\t\t\t\t\tmax = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t// at the end of this for-loop, found the index \"max\" of the element of\r\n\t\t\t// the queue with the lexicographically largest label. Swap it with pivot.\r\n\t\t\tmyVertex temp = queue[pivot];\r\n\t\t\tqueue[pivot] = queue[max];\r\n\t\t\tqueue[max] = temp;\r\n\r\n\t\t\t//System.out.print(\"Chose vertex: \"+temp+\" to visit next\\n\");\r\n\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t\r\n\t\t\t// process the pivot point => find and mark its neighbours, turn it black.\r\n\t\t\tb = h.getNeighbors(queue[pivot]).iterator();\r\n\t\t\twhile (b.hasNext()) {\r\n\t\t\t\tmyVertex B = b.next();\r\n\t\t\t\tif (B.color == 0) {\r\n\t\t\t\t\t// found a vertex which has not been queued...\r\n\t\t\t\t\tqueue[indexCounter] = B;\r\n\t\t\t\t\tB.label.add(N-pivot);\r\n\t\t\t\t\tB.setColor(1);\r\n\t\t\t\t\tindexCounter++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (B.color == 1) {\r\n\t\t\t\t\t// found a vertex in the queue which has not been processed...\r\n\t\t\t\t\tB.label.add(N-pivot);\r\n\t\t\t\t}\r\n\t\t\t\telse if (B.color != 2) {\r\n\t\t\t\t\tSystem.out.print(\"Critical Error: found a vertex in LexBFS process \");\r\n\t\t\t\t\tSystem.out.print(\"which has been visited but is not grey or black.\\n\");\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t\t}\r\n\t\t\tqueue[pivot].setColor(2); //done processing current pivot\r\n\t\t\tpivot ++;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//LexBFS done; produce integer array to return;\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\tInteger[] LBFS = new Integer[N]; // N assumes the graph is connected...\r\n\t\tfor (int i = 0; i<N; i++) {\r\n\t\t\tLBFS[i] = queue[i].id;\r\n\t\t}\r\n\t\t//System.out.print(\"STATUS REPORT:\\n queue = \"+queue+\"\\n indexCounter=\" + indexCounter+\"\\n pivot=\"+pivot+\"\\n\");\r\n\t\t//System.out.print(\"Returning array: \" + LBFS);\r\n\t\treturn LBFS;\r\n\t}", "protected void search(V v) {\n if(markedVertices.get(v))\n return;\n markedVertices.put(v, true);\n for(V w : graph.adjVertices(v))\n search(w);\n }", "public Set<V> getNeighbours(V vertex);", "@Override\n\tpublic void search() {\n\t\tpq = new IndexMinPQ<>(graph.getNumberOfStations());\n\t\tpq.insert(startIndex, distTo[startIndex]);\n\t\twhile (!pq.isEmpty()) {\n\t\t\tint v = pq.delMin();\n\t\t\tnodesVisited.add(graph.getStation(v));\n\t\t\tnodesVisitedAmount++;\n\t\t\tfor (Integer vertex : graph.getAdjacentVertices(v)) {\t\n\t\t\t\trelax(graph.getConnection(v, vertex));\n\t\t\t}\n\t\t}\n\t\tpathWeight = distTo[endIndex];\n\t\tpathTo(endIndex);\n\t}", "public boolean bfs(Node start, String elementToFind) {\r\n if (!graph.containsNode(start)) {\r\n return false;\r\n }\r\n if (start.getElement().equals(elementToFind)) {\r\n return true;\r\n }\r\n Queue<Node> toExplore = new LinkedList<Node>();\r\n marked.add(start);\r\n toExplore.add(start);\r\n while (!toExplore.isEmpty()) {\r\n Node current = toExplore.remove();\r\n for (Node neighbor : graph.getNodeNeighbors(current)) {\r\n if (!marked.contains(neighbor)) {\r\n if (neighbor.getElement().equals(elementToFind)) {\r\n return true;\r\n }\r\n marked.add(neighbor);\r\n toExplore.add(neighbor);\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public static void bfs(int a, int b) {\n\t\t\r\n\t\tQueue<Node> q = new LinkedList<>();\r\n\t\t\r\n\t\tq.add(new Node(a,b));\r\n\t\t\r\n\t\twhile(!q.isEmpty()) {\r\n\t\t\t\r\n\t\t\tNode n = q.remove();\r\n\t\t\t\r\n\t\t\tint x = n.x;\r\n\t\t\tint y = n.y;\r\n\t\t\t\r\n\t\t\tif(x+1 <= N && map[x+1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x+1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x+1,y));\r\n\t\t\t\t\tvisited[x+1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(x-1 > 0 && map[x-1][y] > map[x][y]) {\r\n\t\t\t\tif(visited[x-1][y] != 1) {\r\n\t\t\t\t\tq.add(new Node(x-1,y));\r\n\t\t\t\t\tvisited[x-1][y] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y-1 > 0 && map[x][y-1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y-1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y-1));\r\n\t\t\t\t\tvisited[x][y-1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(y+1 <=N && map[x][y+1] > map[x][y]) {\r\n\t\t\t\tif(visited[x][y+1] != 1) {\r\n\t\t\t\t\tq.add(new Node(x,y+1));\r\n\t\t\t\t\tvisited[x][y+1] = cnt;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void BFS(Vertex start, Set<Vertex> visited, Queue<Vertex> queue) {\r\n\t\t// if(visited.contains(start)) return;\r\n\r\n\t\t// Mark the current node as visited and enqueue it\r\n\t\tvisited.add(start);\r\n\t\tqueue.offer(start);\r\n\r\n\t\tVertex currentNode;\r\n\t\tSet<Vertex> neighbors;\r\n\r\n\t\twhile (queue.size() != 0) { // or !queue.isEmpty()\r\n\t\t\t// Dequeue a vertex from queue and print it\r\n\t\t\tcurrentNode = queue.poll();\r\n\t\t\tSystem.out.print(currentNode + \" \");\r\n\r\n\t\t\t// Get all adjacent vertices of the dequeued vertex s\r\n\t\t\t// If a adjacent has not been visited, then mark it\r\n\t\t\t// visited and enqueue it\r\n\t\t\tneighbors = currentNode.getNeighbors();\r\n\r\n\t\t\tfor (Vertex n : neighbors) {\r\n\t\t\t\tif (!visited.contains(n)) {\r\n\t\t\t\t\tvisited.add(n);\r\n\t\t\t\t\tqueue.offer(n);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * neighbors.forEach(n -> { if (!visited.contains(n)){\r\n\t\t\t * visited.add(n); queue.offer(n); } });\r\n\t\t\t */\r\n\t\t}\r\n\t}", "public void testTrivialTraversal_breadthFirst() {\n List<String> breadthFirst = Lists.newArrayList(Iterables.transform(\n TreeIterables.breadthFirstTraversal(trivialTree, new TestElementTreeViewer()),\n new TestElementStringConvertor()));\n assertThat(breadthFirst, is((List<String>) Lists.newArrayList(\"a\", \"b\", \"c\", \"d\")));\n }", "@Override\r\n\tpublic boolean BFS(E src) {\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tVertex<E> s = vertices.get(src);\r\n\t\t\tlastSrc = s;\r\n\t\t\tvertices.forEach((E e, Vertex<E> u) -> {\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t});\r\n\t\t\ts.setColor(Color.GRAY);\r\n\t\t\ts.setDistance(0);\r\n\t\t\t//s.predecessor is already null so skip that step\r\n\t\t\tQueue<Vertex<E>> queue = new Queue<>();\r\n\t\t\tqueue.enqueue(s);\r\n\t\t\ttry {\r\n\t\t\t\twhile(!queue.isEmpty()) {\r\n\t\t\t\t\tVertex<E> u = queue.dequeue();\r\n\t\t\t\t\tArrayList<Edge<E>> adj = adjacencyLists.get(u.getElement());\r\n\t\t\t\t\tfor(Edge<E> ale: adj) {\r\n\t\t\t\t\t\tVertex<E> v = vertices.get(ale.getDst());\r\n\t\t\t\t\t\tif(v.getColor() == Color.WHITE) {\r\n\t\t\t\t\t\t\tv.setColor(Color.GRAY);\r\n\t\t\t\t\t\t\tv.setDistance(u.getDistance()+1);\r\n\t\t\t\t\t\t\tv.setPredecessor(u);\r\n\t\t\t\t\t\t\tqueue.enqueue(v);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception emptyQueueException) {\r\n\t\t\t\t//-_-\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "void BFS(String start){\n\t\tint iStart = index(start);\n\t\t\n\t\tFronta f = new Fronta(pocetVrcholu*2);\n\t\t\n\t\tvrchP[iStart].barva = 'S';\n\t\tvrchP[iStart].vzdalenost = 0;\n\t\t\n\t\tf.vloz(start);\n\t\t\n\t\twhile(!f.jePrazdna()){\n\t\t\tString u = f.vyber();\n\t\t\tint indexU = index(u);\n\t\t\tint pom = 0;\n\t\t\t\n\t\t\tfor(int i = 1;i<= vrchP[indexU].pocetSousedu;i++){\n\t\t\t\twhile(matice[indexU][pom] == 0){\n\t\t\t\t\tpom++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tint a = pom++;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(vrchP[a].barva =='B'){\n\t\t\t\t\tvrchP[a].barva = 'S';\n\t\t\t\t\tvrchP[a].vzdalenost = vrchP[indexU].vzdalenost + 1;\n\t\t\t\t\tvrchP[a].predchudce = u;\n\t\t\t\t\tf.vloz(vrchP[a].klic);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvrchP[indexU].barva = 'C';\n\t\t\tpole.add(vrchP[indexU].klic);\n\t\t}\n\t\t\n\t\t\n\t}", "public static List<Node> breadthFirstSearch(BinarySearchTree BST) {\n List<Node> breadthFirst = new LinkedList<Node>();\n LinkedList<Node> currentNodes = new LinkedList();\n Node currentNode;\n\n //Add the root node to get started\n currentNodes.add(BST.getRoot());\n //If they aren't null, add them to the queue, loop through, then remove the left-most child, add it to the\n // list, then continue looping until there are no more nodes\n while(currentNodes.size() > 0) {\n currentNode = currentNodes.removeFirst();\n breadthFirst.add(currentNode);\n if(currentNode.getLeftChild() != null) {\n currentNodes.add(currentNode.getLeftChild());\n }\n if(currentNode.getRightChild() != null) {\n currentNodes.add(currentNode.getRightChild());\n }\n }\n return breadthFirst;\n }", "public BreadthFirstTraversal(Graph<V> graph) {\n super(graph);\n }", "public void depthFirstTraverse() {\n\t\tInteger first = (Integer) edges.keySet().toArray()[0];\n\t\t// track whether vertex was visited\n\t\tHashMap<Integer, Boolean> visited = buildVisited();\n\t\tdepthFirstTraverse(first, visited);\n\t}", "public void doDepthFirstSearch(String startVertexName, CallBack<E> callback)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertexName))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tStack<String> discovered = new Stack<String>();\r\n\t\tSet<String> visited = new HashSet<String>();\r\n\t\t\r\n\t\tdiscovered.push(startVertexName);\r\n\t\t\r\n\t\twhile(!discovered.isEmpty()){\r\n\t\t\tString V = discovered.pop();\r\n\t\t\t\r\n\t\t\tif(!visited.contains(V))\r\n\t\t\t{\r\n\t\t\t\tcallback.processVertex(V, this.dataMap.get(V));\r\n\t\t\t\tvisited.add(V);\r\n\t\t\t\t\r\n\t\t\t\tSortedSet<String> nextV = new TreeSet<String>(this.adjacencyMap.get(V).keySet());\r\n\t\t\t\t\r\n\t\t\t\tfor(String next : nextV)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!visited.contains(next))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdiscovered.push(next);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t}" ]
[ "0.7219332", "0.71350074", "0.7027285", "0.6941065", "0.68927455", "0.6808603", "0.6679006", "0.65929", "0.6554381", "0.6510653", "0.64921385", "0.6458", "0.6372004", "0.6292312", "0.62628454", "0.6251247", "0.61886346", "0.612838", "0.6089639", "0.6074846", "0.6057227", "0.60039866", "0.5963071", "0.59222704", "0.591223", "0.59086543", "0.5907209", "0.5905119", "0.589292", "0.58598185", "0.5840199", "0.5839313", "0.58001196", "0.57959837", "0.57701147", "0.5767224", "0.5717384", "0.57112443", "0.56735134", "0.56698453", "0.5663537", "0.5663279", "0.564343", "0.563148", "0.5617731", "0.56176496", "0.5613279", "0.5601343", "0.55973905", "0.55960304", "0.5589138", "0.55776", "0.55411196", "0.55360276", "0.5527517", "0.55249774", "0.55208266", "0.55022615", "0.54750603", "0.54664916", "0.5448108", "0.54340506", "0.54292816", "0.5424088", "0.5423958", "0.5414882", "0.5413887", "0.5403351", "0.54019177", "0.5378115", "0.53768694", "0.5373864", "0.5363718", "0.5361498", "0.5354748", "0.53444684", "0.53298604", "0.532842", "0.53218263", "0.5320054", "0.52959037", "0.5283127", "0.5282323", "0.5275417", "0.52648747", "0.52562594", "0.52476424", "0.5244981", "0.5240718", "0.523694", "0.5234831", "0.52328694", "0.52171004", "0.5215856", "0.5208047", "0.5197032", "0.5195588", "0.51942515", "0.5192981", "0.51876414" ]
0.5770181
34
Print a usage message and exit
public static void usage() { System.err.println("Usage: java BetweennessCentrality <fileName>\n" + "<fileName> = a file in Graph File Format"); System.exit(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final private static void usage () {\n\t\t usage_print () ;\n\t\t System.exit (0) ;\n }", "private static void printUsageExitError(){\n\t\tSystem.out.println(usage);\n\t\tSystem.exit(1);\n\t}", "private static void help() {\n System.out.println(USAGE); \n System.exit(0);\n }", "private static void printUsageAndExit() {\n\t\t printUsageAndExit(null);\n\t\t }", "void printUsage(){\n\t\tSystem.out.println(\"Usage: RefactorCalculator [prettyPrint.tsv] [tokenfile.ccfxprep] [cloneM.tsv] [lineM.tsv]\");\n\t\tSystem.out.println(\"Type -h for help.\");\n\t\tSystem.exit(1); //error\n\t}", "private static void printUsage() \r\n\t{\r\n\t\tSystem.err.println(\"Usage: java GeneBankSearch \"\r\n\t\t\t\t+ \"<0/1(no/with Cache)> <btree file> <query file> \"\r\n\t\t\t\t+ \"[<cache size>] [<debug level>]\\n\");\r\n\t\tSystem.exit(1); \r\n\t}", "private static void usage()\n {\n System.out.println(\"usage:\");\n System.out.println(\" ??? clock [-bg color] [-f fontsize] [-fg color]\");\n System.out.println(\" ??? formats\");\n System.out.println(\" ??? print [-f fmt] time\");\n System.out.println(\" ??? now [-r] [-f fmt]\");\n System.exit(1);\n }", "private static void printUsageAndExit() {\n printUsageAndExit(null);\n }", "private static void printUsage() {\r\n\t\t//TODO: print out clear usage instructions when there are problems with\r\n\t\t// any command line args\r\n\t\tSystem.out.println(\"This program expects three command-line arguments, in the following order:\"\r\n\t\t\t\t+ \"\\n -q for storing as a queue, -c for console output, and the input file name.\");\r\n\t}", "private static void usage() {\n System.err.println(\"usage: Binomial degree(1..10)\");\n System.exit(-1);\n }", "private void usage(int exitStatus) {\n System.out.println(USAGE);\n System.exit(exitStatus);\n }", "private static void doUsage() {\r\n\t\tSystem.out.println(\"Usage: SpellChecker [-i] <dictionary> <document>\\n\"\r\n\t\t\t\t+ \" -d <dictionary>\\n\" + \" -h\");\r\n\t}", "private static void usage(String argv[]) {\n\tSystem.out.println(\"Usage: java Sudoku\");\n System.exit(-1);\n }", "private void displayUsage() {\r\n System.err.println(\"\\nUSAGE: java -classpath ... \" + \"DiscourseImportTool\");\r\n System.err.println(\"Option descriptions:\");\r\n System.err.println(\"\\t-h\\t usage info\");\r\n System.err.println(\"\\t-e, email\\t send email if major failure\");\r\n System.err.println(\"\\t-b\\t batchSize number of items to batch during import\");\r\n System.err.println(\"\\t-discourse\\t discourse id to run the generator on\");\r\n System.err.println(\"\\t-project\\t project id to add discourse to\");\r\n }", "private static void printUsage() {\n\t\tSystem.out.println(\"Usage: java UniqueUniqueChromosomeReconstructor [-h] input_file\");\n\t\tSystem.out.println(\" -h: Print usage information\");\n\t\tSystem.out.println(\" input_file: File containing input sequence data\");\n\t}", "private static void printUsage() {\n System.err.println(\"\\n\\nUsage:\\n\\tAnalyzeRandomizedDB [-p] [-v] [--enzyme <enzymeName> [--mc <number_of_missed_cleavages>]] <original_DB> <randomized_DB>\");\n System.err.println(\"\\n\\tFlag significance:\\n\\t - p : print all redundant sequences\\n\\t - v : verbose output (application flow and basic statistics)\\n\");\n System.exit(1);\n }", "private static void usage()\n {\n System.out.println(\"Lex\");\n System.exit(-1);\n }", "private void help() {\n usage(0);\n }", "private static void printUsage() {\n\t\tSystem.out.println(errorHeader + \"Incorrect parameters\\nUsage :\"\n\t\t\t\t+ \"\\njava DaemonImpl <server>\\n With server = address of the server\"\n\t\t\t\t+ \" the DaemonImpl is executed on\");\n\t}", "public void usageError(String msg) {\n System.err.println(\"Usage error: \" + msg + \"\\n\");\n printUsage(System.err);\n System.exit(1);\n }", "final private static void usage_print () {\n\t\tSystem.out.println (NAME + ' ' + VERSION + ' ' + COPYRIGHT) ;\n\t\tSystem.out.println () ;\n\n\t\tSystem.out.println (\n\t\t \"Usage: java bcmixin.Main [<options>] <modelname> <equationname>\"\n\t\t) ;\n\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where [<options>] include any of the following:\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" -help\") ;\n\t\tSystem.out.println (\" Prints this helpful message, then exits.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" where <modelname> means the model name that you want to work on.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where <equationname> provides the equation name, which must end with .equation.\") ;\n\t\tSystem.out.println () ;\n }", "private static void printUsage(String error, CmdLineParser parser) {\n\tSystem.out.println(error);\n\tSystem.out.print(\"Usage: Main \");\n\tparser.printSingleLineUsage(System.out);\n\tSystem.out.println(\"\");\n\treturn;\n }", "private static void usage( ) {\n System.err.\n\t println( \"Usage: java OnlineTicTacToe ipAddr ipPort(>=5000)\" );\n System.exit( -1 );\n }", "private static void usage() {\n System.out.println(\"Usage: java -jar ....jar [Options]\" + LINESEP + LINESEP);\n System.out.println(\"[Options]\" + LINESEP);\n System.out.println(\"-c --config\\tconfigfile\");\n System.out.println(\"-s --spectrum\\tspectrumfile\");\n System.out.println(\"-r --resultfile\\tWhere the result has to be written to.\");\n System.out.println(\"-q --sqlfile\\tWhere the query has to be written to.\");\n System.out.println(\"-p --ppm\\tThe ppm value which should be used for the spectrum.\");\n }", "private static void printUsage(){\n\t\tprintLine(USAGE_STRING);\n\t}", "private static void help() {\n System.out.println(\"usage: pgen <project name> <args>\");\n System.out.println(\"Arguments:\");\n System.out.println(\"\\t-h | -help : help menu\");\n System.out.println(\"\\t-s | -size <example file amount> : the amount of example files to create. Defaults to 2\");\n System.out.println(\"\\t-t | -template <template> : the template to use. Defaults to java_default\");\n System.out.println(\"\\t\\tValid Templates:\");\n System.out.println(\"\\t\\t\\t* java_default\");\n System.out.println(\"\\t\\t\\t* cpp_default\");\n System.out.println(\"\\t-kattis : fetches the problems from Kattis and creates a makefile and test script for them\");\n System.out.println(\"\\t-local : fetches nothing and creates empty example files\");\n System.exit(0);\n }", "public static void usage () {\n System.out.println(\"Usage:\");\n System.out.println(\" i[nformation]\");\n System.out.println(\" r[egister] <course>\");\n System.out.println(\" u[nregister] <course>\");\n System.out.println(\" q[uit]\");\n }", "public static void printUsage(){\n \n System.out.println(\"USAGE:\\njava -jar LMB.jar inputfilename\\n\"\n + \"\\nWhere: LMB is the executable of this program\"\n + \"\\ninputfilename is a plaintext file located in the ./text/ folder\"\n + \"\\nAll output files will be created and written to the \\\"lm\\\" directory in root\");\n System.exit(1);\n \n }", "private static void usage() {\n System.err.println(\"USAGE:\");\n System.err.println(\"\\tjava ConnectFour <HOST> <PORT> <PLAYER_NAME>\");\n System.err.println(\"\\t\\t<SERVER_HOST>: the host name or IP address of the server\");\n System.err.println(\"\\t\\t<SERVER_PORT>: the port number of the server\");\n System.err.println(\"\\t\\t<CLIENT_HOST>: the host name or IP address of the client\");\n System.err.println(\"\\t\\t<CLIENT_PORT>: the port number of the client\");\n System.err.println(\"\\t\\t<PLAYER_NAME>: the name of the player (must not include any whitespace)\");\n System.err.println(\"\\n\\t\\tExample: java ConnectFour localhost 6789 localhost 5678 Alex\");\n }", "protected static void printUsage() {\n\t}", "public void printUsage() {\n printUsage(System.out);\n }", "private static void DisplayHelp() {\r\n System.out.println();\r\n System.out.println(\"Usage: Consumes messages from a topic/queue\");\r\n System.out.println();\r\n System.out.println(\" SampleConsumerJava [ < response_file ]\");\r\n System.out.println();\r\n return;\r\n }", "public void printUsage() {\n System.out.println(\"\\nHelp Invoked on \");\n System.out.println(\"[-hfs] \");\n System.out.println(\"\");\n\n System.out.println(\"Usage: \");\n System.out.println(\"-d [true|false]\");\n System.out.println(\"-f URL-file-pathame\");\n System.out.println(\"-h: invoke help\");\n System.out.println(\"-i: URL-list-input-source [ DEFAULT | USER | FILE ]\");\n System.out.println(\"-s URL-list-separator\");\n }", "private static void help() {\n\t\tHelpFormatter formater = new HelpFormatter();\n\t\tformater.printHelp(\"Main\", options);\n\t\tSystem.exit(0);\n\t}", "private static void help(){\r\n System.out.println(\"\\n\\t Something Went Wrong\\nType\\t java -jar nipunpassgen.jar -h\\t for mor info\");\r\n System.exit(0);\r\n }", "private void help() {\n HelpFormatter formater = new HelpFormatter();\n\n formater.printHelp(\"Main\", options);\n System.exit(0);\n }", "private static void showHelpAndExit(){\n\n System.out.println(\"*****************************************\");\n System.out.println(\"Format to run: java DataLoadTool <<no_of_docs>> <<doc_size>>\");\n System.out.println(\" <no_of_docs> -> Number of JSON documents needed to populate in one batch\");\n System.out.println(\" <doc_size>> -> Document size in Bytes (this value can be any number but more than 15)\");\n\n System.out.println(\"\\n Eg: If you wan to poulate 10 docs each of 20 Bytes\\n\" +\n \"\\t java DataLoadTool 10 20\");\n\n System.out.println(\"*****************************************\\n\");\n System.exit(0);\n }", "public static void usage() {\n System.out.println(\"Usage: java <java-class> [-d] [-m <value>] FILENAME\");\n System.out.println(\"\\t -d \\t\\t Enable debug mode.\");\n System.out.println(\"\\t -m <value>\\t Set the maximum random value \" + \n \"to a specific integer value.\");\n System.out.println(\"\\t -n <value>\\t Set the number of iterations \" + \n \"for the test.\");\n System.out.println(\"\\n\");\n System.exit(1);\n }", "private static void printUsage() {\n\t\tSystem.out.println(\"[0] apk files directory\");\n\t\tSystem.out.println(\"[1] android-jar directory\");\n\t}", "public static void printUsage() {\n System.out.println(\"*****\\t*****\\t*****\");\n System.out.println(\"Usage:\");\n System.out.println(\"par/seq, L/B, N, M, C, output file\");\n System.out.println(\"Using type of calculation: par(parallel) or seq(sequential)\");\n System.out.println(\"Using numbers: L - Long, B - BigInteger\");\n System.out.println(\"Program finds all prime numbers in range [N, M]\");\n System.out.println(\"That ends with number C\");\n System.out.println(\"N, M, C should be whole numbers and N must be less than M!\");\n System.out.println(\"Output is written into file \\\"output file\\\", first number is \");\n System.out.println(\"The quantity of prime numbers and after - all found prime numbers\");\n System.out.println(\"*****\\t*****\\t*****\");\n }", "private static void printHelp(CmdLineParser parser) {\n\tSystem.out.print(\"Usage: Main \");\n\tparser.printSingleLineUsage(System.out);\n\tSystem.out.println(\"\\n\");\n\tparser.printUsage(System.out);\n\tSystem.out.println(\"\");\n\treturn;\n }", "public static void showUsage() {\n System.out.printf(\"java app.App (-a | -r | -c | +WORD | ?WORD)\");\n }", "private static void usage()\n {\n System.err.println( \"Usage: java at.ac.tuwien.dbai.pdfwrap.ProcessFile [OPTIONS] <PDF file> [Text File]\\n\" +\n \" -password <password> Password to decrypt document\\n\" +\n \" -encoding <output encoding> (ISO-8859-1,UTF-16BE,UTF-16LE,...)\\n\" +\n \" -xmillum output XMIllum XML (instead of XHTML)\\n\" +\n \" -norulinglines do not process ruling lines\\n\" +\n \" -spaces split low-level segments according to spaces\\n\" +\n \" -console Send text to console instead of file\\n\" +\n \" -startPage <number> The first page to start extraction(1 based)\\n\" +\n \" -endPage <number> The last page to extract(inclusive)\\n\" +\n \" <PDF file> The PDF document to use\\n\" +\n \" [Text File] The file to write the text to\\n\"\n );\n System.exit( 1 );\n }", "private static void usage()\r\n\t{\r\n\t\tSystem.err.println(\"Usage: java pj2 MonteCarloVSmp <seed> <lowerV> <upperV> <p> <T> <increment>\\n\" +\r\n\t\t\t\t\"<seed> = Random seed\\n\" + \r\n\t\t\t\t\"<lowerV> = Lower bound of number of vertices\\n\" +\r\n\t\t\t\t\"<upperV> = Upper bound of number of vertices\\n\" +\r\n\t\t\t\t\"<p> = Edge probability\\n\" +\r\n\t\t\t\t\"<T> = Number of trials\\n\" +\r\n\t\t\t\t\"<increment> = the value by which to increment V (an integer)\");\r\n\t\tthrow new IllegalArgumentException();\r\n\t}", "private static void printUsage()\n {\n StringBuilder usage = new StringBuilder();\n usage.append(String.format(\"semantika %s [OPTIONS...]\\n\", Environment.QUERYANSWER_OP));\n usage.append(\" (to execute query answer)\\n\");\n usage.append(String.format(\" semantika %s [OPTIONS...]\\n\", Environment.MATERIALIZE_OP));\n usage.append(\" (to execute RDB2RDF export)\");\n String header = \"where OPTIONS include:\"; //$NON-NLS-1$\n String footer =\n \"\\nExample:\\n\" + //$NON-NLS-1$\n \" ./semantika queryanswer -c application.cfg.xml -l 100 -sparql 'SELECT ?x WHERE { ?x a :Person }'\\n\" + //$NON-NLS-1$\n \" ./semantika rdb2rdf -c application.cfg.xml -o output.n3 -f N3\"; //$NON-NLS-1$\n mFormatter.setOptionComparator(null);\n mFormatter.printHelp(400, usage.toString(), header, sOptions, footer);\n }", "public static void usage()\n {\n System.out.println(\"usage: MdrCreater [help] [-t hour] [-o uri] [-m markets] [-p port] [-h servers]\");\n System.out.println(\"\\t-t\\t\\tYYYYMMDDHH Default last hour of the local time\");\n System.out.println(\"\\t-o\\t\\toutput stream for example file://tmp. Default: screen\");\n System.out.println(\"\\t-h\\t\\tcomma saparated list of cassandra hosts. Default: localhost\");\n System.out.println(\"\\t-p\\t\\tport to cassandra Default: 9160\");\n System.out.println(\"\\t-m\\t\\tcomma separated list of markets. Default: region1,region2,region3,region4\");\n System.out.println(\"\\t\\t\\turi file://<path>\");\n System.out.println(\"\\t\\t\\turi <username>@<host>:<path>\");\n }", "private static void printUsage(){\n\t\tSystem.err.println(\"USAGE : java -jar ExtractWebCamFeed <Web Cam Code> <Output File Path> <Image Count>\");\n\t\tSystem.err.println(\"Web Cam Code : \\n\\t1 : West Lawns Camera\");\n\t\tSystem.err.println(\"\\t2 : Memorial Union Camera Camera\");\n\t\tSystem.err.println(\"Output File Path : to store the path of the file ( must be .mov)\");\n\t\tSystem.err.println(\"Image Count : Specifies the length of the video \");\n\t}", "private static void printUsage()\n {\n HelpFormatter hf = new HelpFormatter();\n String header = String.format(\n \"%nAvailable commands: ring, cluster, info, cleanup, compact, cfstats, snapshot [name], clearsnapshot, bootstrap\");\n String usage = String.format(\"java %s -host <arg> <command>%n\", NodeProbe.class.getName());\n hf.printHelp(usage, \"\", options, header);\n }", "private static void help() {\n HelpFormatter formater = new HelpFormatter();\n formater.printHelp(\"SGD-SVM\", options);\n System.exit(0);\n }", "private void printUsage() {\n \n // new formatter\n HelpFormatter formatter = new HelpFormatter();\n \n // add the text and print\n formatter.printHelp(\"arara [file [--log] [--verbose] [--timeout N] [--language L] | --help | --version]\", commandLineOptions);\n }", "static int printUsage() {\n\t System.out.println(\"netflix1Driver [-m <maps>] [-r <reduces>] <input> <output>\");\n\t ToolRunner.printGenericCommandUsage(System.out);\n\t return -1;\n\t }", "private static void usage() {\n System.err.println(\"Usage: java org.apache.pdfbox.examples.pdmodel.PrintTextLocations <input-pdf>\");\n }", "private static void displayUsage() {\n System.out.println(\"\\n MEKeyTool argument combinations:\\n\\n\" +\n \" -help\\n\" +\n \" -import [-MEkeystore <filename>] \" +\n \"[-keystore <filename>]\\n\" +\n \" [-storepass <password>] -alias <key alias> \" +\n \"[-domain <domain>]\\n\" +\n \" -list [-MEkeystore <filename>]\\n\" +\n \" -delete [-MEkeystore <filename>]\\n\" +\n \" (-owner <owner name> | -number <key number>)\\n\" +\n \"\\n\" +\n \" The default for -MEkeystore is \\\"\" + \n System.getProperty(DEFAULT_MEKEYSTORE_PROPERTY, \"appdb/_main.ks\") +\n \"\\\".\\n\" +\n \" The default for -keystore is \\\"\" + \n System.getProperty(DEFAULT_KEYSTORE_PROPERTY, \"$HOME/.keystore\") + \n \"\\\".\\n\");\n }", "protected void showUsage() {\n\n\tStringBuffer usage = new StringBuffer();\n\tusage.append(\"------------------------------------------------------\\n\");\n\tusage.append(\" \" + APP_NAME + \" \" + APP_VERSION + \"\\n\");\n\tusage.append(\"------------------------------------------------------\\n\");\n\tusage.append(\"Prints the Tool Kit name for the given Branch and \\n\");\n\tusage.append(\"Component.\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\"USAGE:\\n\");\n\tusage.append(\"------\\n\");\n\tusage.append(APP_NAME + \" <-c component> <-b branch> [-y] [-h] [-db dbMode]\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\" component = Component name (ess, pds, model, einstimer ...).\\n\");\n\tusage.append(\" branch = Branch name.\\n\");\n\tusage.append(\" -y = (optional) Verbose mode (echo messages to screen)\\n\");\n\tusage.append(\" dbMode = (optional) DEV | PROD (defaults to PROD)\\n\");\n\tusage.append(\" -h = Help (shows this information)\\n\");\n\tusage.append(\"\\n\");\n\tusage.append(\"Return Codes\\n\");\n\tusage.append(\"------------\\n\");\n\tusage.append(\" 0 = application ran ok\\n\");\n\tusage.append(\" 1 = application error\\n\");\n\tusage.append(\"\\n\");\n\n\tSystem.out.println(usage);\n\n }", "public static void printHelp() {\n System.out.println(\"Usage:\");\n System.out.println(\"To create a user, post a message.\");\n System.out.println(\"<user name> [command] | <another user name>\");\n System.out.println(\"<user name> -> message - post a message\");\n System.out.println(\"<user name> - read timeline messages\");\n System.out.println(\"<user name> follows <another user name> - follow another user\");\n System.out.println(\"<user name> wall - display users wall\");\n System.out.println(\"-help - help\");\n System.out.println(\"exit - exit the program\");\n }", "public static void help() {\n\tSystem.out.println(\"-- Avaible options --\");\n\tSystem.out.println(\"-- [arg]: Required argument\");\n\tSystem.out.println(\"-- {arg}: Optional argument\");\n\tSystem.out.println(\"* -s {file} Save the game into a file\");\n\tSystem.out.println(\"* -r {file} Play or Replay a game from a file\");\n\tSystem.out.println(\"* -a [file] Play a binary file or a game file\");\n\tSystem.out.println(\"* -n [file] Create a random game file\");\n\tSystem.out.println(\"* -t [size] Specify the size of the board\");\n\tSystem.out.println(\"* -k Solve the game with the IA solver\");\n\tSystem.out.println(\"* -m Solve the game with the MinMax/AlphaBeta algorithm\");\n\tSystem.out.println(\"----------------------------------------------\");\n\tSystem.out.println(\". Press Enter to Start or Restart\");\n\tSystem.out.println(\". Press Z to Undo the last move\");\n\tSystem.out.println(\"\");\n }", "public static void main(String[] args) throws Exception {\n if (args.length != 1) {\n usage();\n } else {\n\n }\n }", "private void usageError(String error) {\n System.err.println(\"\\n\" + error);\n usage(-1);\n }", "void printHelp();", "public static void errorAndExit() {\n System.out.println(\"USAGE:\");\n System.out.println(\"java MonkeySim <num_monkeys>\");\n System.out.println(\"<num_monkeys> must be a positive signed 32-bit integer\");\n System.exit(1);\n }", "private static void printUsage(String error) {\n\t\tSystem.err.println(\"\\nError: \" + error);\n\t\tSystem.err.println(\"Usage:\" +\n\t\t\t\t\t\t \"\\nISAReferenceGenerator\" +\n\t\t\t\t\t\t \"\\nISAReferenceGenerator input output\" +\n\t\t\t\t\t\t \"\\n\\tinput The ISA file to read (default: isa.txt)\" +\n\t\t\t\t\t\t \"\\n\\toutput The reference file to write (default: reference.txt)\");\n\t}", "public static void usage() {\n\t\tSystem.err.println(\"Usage: java info.ziyan.net.httpserver.example.FileServer <port> <path>\");\n\t\tSystem.err.println();\n\t}", "private void print_help_and_exit() {\n System.out.println(\"A bunch of simple directus admin cli commands\");\n System.out.println(\"requires DIRECTUS_API_HOST and DIRECTUS_ADMIN_TOKEN environment variables to be set\");\n System.out.println();\n\n COMMAND_METHODS.values().forEach(c -> {\n for (String desriptionLine : c.descriptionLines) {\n System.out.println(desriptionLine);\n }\n System.out.println();\n });\n\n System.out.println();\n System.exit(-1);\n }", "static void printHelp(String processname)\r\n\t{\n\t\tHelpFormatter formatter = new HelpFormatter();\r\n\t\tformatter.printHelp(processname, options);\r\n\r\n\t\tSystem.exit(0);\r\n\t}", "public static void help() {\n\n\t\tSystem.out.println(\"--help--Input format should be as below\" + \n\t\t \"\\njava -jar passgen.jar -l\" + \n\t\t\t\t \"\\n\" +\n\t\t\t\t \"\\njava -jar passgen.jar -l\" + \"\\n(where l= length of password)\" + \n\t\t\t\t \"\\n\");\n\n\t}", "static void usage() {\n System.out.println(\"java -jar domainchecker.jar [StartDomain] [EndDomain] [Extension]\");\n System.out.println(\"Ex: java -jar DomainChecker.jar aaaa zzzz .com .vn\");\n }", "private static final void usage() {\n System.err.println(\n \"Usage:\\n\" +\n \" java sheffield.examples.BatchProcessApp -g <gappFile> [-e encoding]\\n\" +\n \" [-a annotType] [-a annotType] file1 file2 ... fileN\\n\" +\n \"\\n\" +\n \"-g gappFile : (required) the path to the saved application state we are\\n\" +\n \" to run over the given documents. This application must be\\n\" +\n \" a \\\"corpus pipeline\\\" or a \\\"conditional corpus pipeline\\\".\\n\" +\n \"\\n\" +\n \"-e encoding : (optional) the character encoding of the source documents.\\n\" +\n \" If not specified, the platform default encoding (currently\\n\" +\n \" \\\"\" + System.getProperty(\"file.encoding\") + \"\\\") is assumed.\\n\" +\n \"\\n\" +\n \"-a type : (optional) write out just the annotations of this type as\\n\" +\n \" inline XML tags. Multiple -a options are allowed, and\\n\" +\n \" annotations of all the specified types will be output.\\n\" +\n \" This is the equivalent of \\\"save preserving format\\\" in the\\n\" +\n \" GATE GUI. If no -a option is given the whole of each\\n\" +\n \" processed document will be output as GateXML (the equivalent\\n\" +\n \" of \\\"save as XML\\\").\"\n );\n\n System.exit(1);\n }", "public static void main(String[] args) {\n if (args == null || args.length != 2) {\n printUsage();\n }\n }", "private static void usage()\n/* */ {\n/* 245 */ log.info(\"Usage: java org.apache.catalina.startup.Tool [<options>] <class> [<arguments>]\");\n/* */ }", "private static void displayHelp()\r\n {\r\n System.out.println(\"Usage: \");\r\n System.out.println(\"======\");\r\n System.out.println(\"\");\r\n System.out.println(\" -i=<file> : The input file name\");\r\n System.out.println(\" -o=<file> : The output file name\");\r\n System.out.println(\" -e : Write the output as embedded glTF\");\r\n System.out.println(\" -b : Write the output as binary glTF\");\r\n System.out.println(\" -c=<type> : The indices component type. \"\r\n + \"The <type> may be GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT \"\r\n + \"or GL_UNSIGNED_INT. The default is GL_UNSIGNED_SHORT\");\r\n System.out.println(\" -m : Create one mesh per primitive, \"\r\n + \"each attached to its own node.\");\r\n System.out.println(\" -h : Print this message.\");\r\n System.out.println(\" -v=<number> : The target glTF version. \"\r\n + \"The <number> may be 1 or 2. The default is 2.\");\r\n System.out.println(\"\");\r\n System.out.println(\"Example: \");\r\n System.out.println(\"========\");\r\n System.out.println(\"\");\r\n System.out.println(\" ObjToGltf -b -i=C:/Input/Example.obj \" \r\n + \"-o=C:/Output/Example.glb\");\r\n }", "private String usage() {\n return command(\"usage\");\n }", "private static void printHelp() {\n getConsole().println(\"Keycheck\\n\" +\n \"\\n\" +\n \"Usage:\\n\" +\n \" keycheck.jar parameter1 parameter2 ... file1 file2 ...\\n\" +\n \"Example:\\n\" +\n \" java -jar keycheck.jar -\" + PARAMETER_BASE + \" -\" + PARAMETER_BITS + \" file1.csv file2.csv\" +\n \"\\n\" +\n \"Parameters:\\n\" +\n \" -\" + PARAMETER_GENERATE + \" [512|1024] Generate \" + GENERATED_KEY_COUNT + \" keys\\n\" +\n \" -\" + PARAMETER_NEW_FORMAT + \" New format will be use to load keys from file\\n\" +\n \" -\" + PARAMETER_TRANSFORM + \" Transform all keys to new format to file 'CARD_ICSN.csv'\\n\" +\n \" -\" + PARAMETER_BASE + \" Check base stats of keys\\n\" +\n \" -\" + PARAMETER_BITS + \" Generate statistics for all bits\\n\" +\n \" -\" + PARAMETER_BYTES + \" Generate statistics for all bytes\\n\" +\n \" -\" + PARAMETER_DIFFERENCE + \" Check primes difference\\n\" +\n \" -\" + PARAMETER_STRENGTH + \" Check primes strength\\n\" +\n \" -\" + PARAMETER_TIME + \" Generate time statistics\\n\" +\n \" -\" + PARAMETER_ALL + \" Generate all statistics and check all tests.\\n\");\n }", "public abstract void printHelp(List<String> args);", "private static void help(Options options) {\n\t\tHelpFormatter formater = new HelpFormatter();\n\n\t\tformater.printHelp(\"Main\", options);\n\t\tSystem.exit(0);\n\n\t}", "private static void printEmptyMessage() {\r\n\t\tSystem.out.println(\"usage: bfck [-p <filename>] [-i <filename>] [-o <filename>]\\n\"\r\n\t\t\t\t+ \" [--rewrite] [--translate] [--check] [--cgen]\\n\"\r\n\t\t\t\t+ \"BRAINFUCK [M\\u00fcl93] is a programming language created in 1993 by Urban M\\u00fcller,\"\r\n\t\t\t\t+ \" and notable for its extreme minimalism.\\nThis is the BrainFuck interpreter made by the group PolyStirN,\"\r\n\t\t\t\t+ \" composed of Jo\\u00ebl CANCELA VAZ, Pierre RAINERO, Aghiles DZIRI and Tanguy INVERNIZZI.\");\r\n\t}", "private static void displayHelp(){\n System.out.println(\"-host hostaddress: \\n\" +\n \" connect the host and run the game \\n\" +\n \"-help: \\n\" +\n \" display the help information \\n\" +\n \"-images: \\n\" +\n \" display the images directory \\n\" +\n \"-sound: \\n\" +\n \" display the sounds file directory \\n\"\n\n );\n }", "public void printArgsInterpretation() {\n StringBuilder usage = new StringBuilder();\n usage.append(\"You launched the CuratorClient with the following options:\");\n usage.append(\"\\n\");\n usage.append(\"\\tCurator host: \");\n usage.append(host);\n usage.append(\"\\n\");\n usage.append(\"\\tCurator port: \");\n usage.append(port);\n usage.append(\"\\n\");\n usage.append(\"\\tInput directory: \");\n usage.append(inputDir.toString());\n usage.append(\"\\n\");\n usage.append(\"\\tOutput directory: \");\n usage.append(outputDir.toString());\n usage.append(\"\\n\");\n usage.append(\"\\tRun in testing mode? \");\n usage.append(testing ? \"Yes.\" : \"No.\");\n usage.append(\"\\n\");\n\n System.out.println( usage.toString() );\n }", "void help();", "private void helpService() {\n output.println(\"Help command\");\n output.println(\"-calc <number> \\t Calculates the value of pi based on <number> points; quit \\t Exit from program \");\n }", "private static void help(){\n\t\tSystem.out.println(\"\\t\\tAge\\n\\tby Sayan Ghosh\\n\\n\"+\n\t\t\t\t\t\t\t\"Calculates Age of Person from Date of Birth (DD MM YYYY).\\n\"+\n\t\t\t\t\t\t\t\"Shows age in two forms:\\n\"+\n\t\t\t\t\t\t\t\t\"\\tAge in years, months, days\\n\"+\n\t\t\t\t\t\t\t\t\"\\tAge in years (as fraction)\\n\"+\n\t\t\t\t\t\t\t\"Syntax:\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age\\t\\t\\truns program and takes input\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age <dd mm yyyy>\\t\\tdirectly shows result taking dob as parameters\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age --help\\t\\t\\tshows this help\\n\");\n\t}", "void help() {\n System.err.println(\"Usage: java edu.rice.cs.cunit.record.Record [options] <class> [args]\");\n System.err.println(\"[options] are:\");\n System.err.println(\" -quiet No trace output\");\n System.err.println(\" -headless No GUI\");\n System.err.println(\" -output <filename> Output trace to <filename>\");\n System.err.println(\" -auto [n] Automatically update on thread starts/stops.\");\n System.err.println(\" Optional: n=delay in ms, n>=100. Default: 1000\");\n System.err.println(\" -obj Also process object sync points\");\n System.err.println(\" -debug Process compact sync points with debug information\");\n System.err.println(\" -methoddb <filename> Specify <filename> as method database\");\n System.err.println(\" -initsp Process sync points during VM initialization\");\n System.err.println(\" -termsp Process sync points during VM termination\");\n System.err.println(\" -D <dir> Set current directory (\\\"user.dir\\\") for debug JVM\");\n System.err.println(\" -cp <classpath> Set classpath (\\\"java.class.path\\\") for debug JVM\");\n System.err.println(\" -drj <filename> Set jar file used to start DrJava\");\n System.err.println(\" -sp <sourcepath> Set source path to find source files\");\n System.err.println(\" -help Print this help message\");\n System.err.println(\" -J Pass all following options to debug JVM\");\n System.err.println(\"<class> is the program to trace\");\n System.err.println(\"[args] are the arguments to <class>\");\n }", "private static void dealwithelp() {\r\n\t\tSystem.out.println(\"1 ) myip - to see your ip address.\");\r\n\t\tSystem.out.println(\"2 ) myport - to see your port number.\");\r\n\t\tSystem.out.println(\"3 ) connect <ip> <port> - connect to peer.\");\r\n\t\tSystem.out.println(\"4 ) list Command - list all the connected peer/peers.\");\r\n\t\tSystem.out.println(\"5 ) send <id> - to send message to peer.\");\r\n\t\tSystem.out.println(\"6 ) terminate <id> - terminate the connection\");\r\n\t\tSystem.out.println(\"7 ) exit - exit the program.\");\r\n\t}", "static void showHelp(int exitCode)\n {\n System.err.println(\"Usage: SsmController [-b <basedir>] [-c <config_file>] [-h]\\n\");\n System.err.println(\" -b The name of the base directory. Defaults to:\");\n System.err.println(\" /var/opt/totality/mgmt_sv/current/solaris\\n\");\n System.err.println(\" -c The name of the configuration file relative to the\");\n System.err.println(\" base directory. Defaults to: etc/SsmController.cfg\\n\");\n System.exit(exitCode);\n }", "@Test\n\tpublic void testHelpOption()\n\t{\n\t\tPrintStream outBkp = System.out;\n\t\tByteArrayOutputStream outBuf = new ByteArrayOutputStream ();\n\t\tSystem.setOut ( new PrintStream ( outBuf ) );\n\n\t\tApp.main ( \"--help\" );\n\t\t\n\t\tSystem.setOut ( outBkp ); // restore the original output\n\n\t\tlog.debug ( \"CLI output:\\n{}\", outBuf.toString () );\n\t\tassertTrue ( \"Can't find CLI output!\", outBuf.toString ().contains ( \"*** Command Line Example ***\" ) );\n\t\tassertEquals ( \"Bad exit code!\", 1, App.getExitCode () );\n\t}", "private void showHelp() {\n \tHelpFormatter formatter = new HelpFormatter();\n \tformatter.printHelp( \"java -cp moustache.jar Main\", options );\n }", "private static void printCliHelp(String message) {\n \t\tSystem.out.println(message);\n \t\tHelpFormatter formatter = new HelpFormatter();\n\t\tformatter.printHelp(\"java -jar OsmPbfMetadata.jar\", createOptions());\n \t\tSystem.exit(-1);\n \t}", "private static void help() {\n\t\tSystem.out.println(\"\\n----------------------------------\");\n\t\tSystem.out.println(\"---Regatta Calculator Commands----\");\n\t\tSystem.out.println(\"----------------------------------\");\n\t\tSystem.out.println(\"addtype -- Adds a boat type and handicap to file. Format: name:lowHandicap:highHandicap\");\n\t\tSystem.out.println(\"format -- Provides a sample format for how input files should be arranged.\");\n\t\tSystem.out.println(\"help -- Lists every command that can be used to process regattas.\");\n\t\tSystem.out.println(\"podium -- Lists the results of the regatta, assuming one has been processed.\");\n\t\tSystem.out.println(\"regatta [inputfile] -- Accepts an input file as a parameter, this processes the regatta results outlined in the file.\");\n\t\tSystem.out.println(\"types -- lists every available boat type.\");\n\t\tSystem.out.println(\"write [outputfile] -- Takes the results of the regatta and writes them to the file passed as a parameter.\");\n\t\tSystem.out.println(\"----------------------------------\\n\");\n\t}", "public static void showSynopsis() {\n System.out\n .println(\"Usage: findbugs [general options] -textui [command line options...] [jar/zip/class files, directories...]\");\n }", "@Override\n\tpublic void help() {\n\t\tCommandLine.instance().printError(\"The correct use is: removecar id\");\n\t}", "public void help();", "public void helpByParamsError() {\n System.err.println(\"The command syntax is wrong.\");\n System.err.println(\"You can write the command in the following way:\");\n System.err.println(\"java -jar portScanner-1.5.jar ipOrElseDomain minPortRange maxPortRange [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar 127.0.0.1 0 65535 file.txt\");\n System.err.println(\"or else\");\n System.err.println(\"java -jar PortScanner-1.5.jar ipOrElseDomain [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar cloudflare.com file.txt\");\n System.err.println(\"The file is not obligatory option.\");\n System.exit(1);\n }", "private static void showUsage(String arg) {\n char notA = 97;\n if (arg.equals(\"1337h\" + notA + \"ckerm\" + notA + \"n\")) {\n // don't worry about this!\n // this is a really insecure decryption function\n // Don't worry about how it works. If you really want to know,\n // come hang out with me in my office hours! ~Alex\n char[] ct = WHAT_IS_THIS.toCharArray();\n int n = ct.length - 2;\n // These are bitwise operators. Yikes!\n // You'll learn about them in CS2110 if you take it.\n java.util.Random r\n = new java.util.Random(((ct[0] << 8) & 0x0F00) | ct[1]);\n\n StringBuilder sb = new StringBuilder();\n\n // some nice java8 functional programming here\n r.ints(0, n).distinct().limit(n).forEachOrdered(\n i -> sb.append((char) (ct[i + 0x2] ^ 0x9)));\n System.out.println(sb.toString());\n } else {\n System.out.println(\"Usage is:\\t\"\n + \"java StraightAs <filename.csv> <separator> <displayMode>\"\n + \"\\n\\nSeparators: any valid java string. For example:\"\n + \"\\n\\tNOTACOMMA\\n\"\n + \"\\t,\\n\"\n + \"\\t4L3X1SK00L\\n\\nDisplay Modes (see instructions for\"\n + \" more info):\\n\"\n + \"\\tTABLE\\tdisplays a table of the names and grades in \"\n + \"the csv file\\n\\tHIST\\tdisplays the histogram of \"\n + \"the grades.\\n\\tBOTH\\tdisplays both the table and \"\n + \"the histogram\\n\"\n + \"\\nRunning the program with arguments:\"\n + \"\\n\\tjava StraightAs sample_data.csv , HIST\");\n }\n }", "@Test public void completeUsage() {\n\t\tfinal String[] args = new String[]{\"-verbose\", \"-speed\", \"4\", \"-filter\", \"a\", \"-filter\", \"b\", \"x\", \"y\", \"z\"};\n\t\tfinal CliActuators actuators = parser.parse(args, OPTIONS);\n\t\t// -verbose\n\t\tAssert.assertNotNull(actuators.getActuatorById(\"verbose\"));\n\t\t// -speed\n\t\tAssert.assertEquals(\"4\", actuators.getActuatorById(\"speed\").getValue());\n\t\t// -filter\n\t\tfinal CliActuator filter = actuators.getActuatorById(\"filter\");\n\t\tfinal List<String> filters = filter.getValues();\n\t\tAssert.assertEquals(2, filters.size());\n\t\tAssert.assertEquals(\"a\", filters.get(0));\n\t\tAssert.assertEquals(\"b\", filters.get(1));\n\t\t// rests\n\t\tfinal List<String> rests = actuators.getRests();\n\t\tAssert.assertEquals(3, rests.size());\n\t\tAssert.assertEquals(\"x\", rests.get(0));\n\t\tAssert.assertEquals(\"y\", rests.get(1));\n\t\tAssert.assertEquals(\"z\", rests.get(2));\n\t}", "public void help() {\n System.out.println(\"Type 'commands' to list all \" +\n \"available commands\");\n System.out.println(\"Type 'start' to play game\");\n System.out.println(\"Player to remove the last stone loses!\");\n System.out.println();\n }", "public static void help() {\n System.out.println(line(\"*\", 80));\n System.out.println(\"SUPPORTED COMMANDS\");\n System.out.println(\"All commands below are case insensitive\");\n System.out.println();\n System.out.println(\"\\tSELECT * FROM table_name; Display all records in the table.\");\n System.out.println(\"\\tSELECT * FROM table_name WHERE rowid = <value>; Display records whose rowid is <id>.\");\n System.out.println(\"\\tDROP TABLE table_name; Remove table data and its schema.\");\n System.out.println(\"\\tVERSION; Show the program version.\");\n System.out.println(\"\\tHELP; Show this help information\");\n System.out.println(\"\\tEXIT; Exit the program\");\n System.out.println();\n System.out.println();\n System.out.println(line(\"*\", 80));\n }", "protected static int printUsage ()\n {\n\t\tSystem.out.println(\"VecarrmatCache <left edge_path> <# of reducers> <right edge file> <m> <n>\");\n\n\t\tToolRunner.printGenericCommandUsage(System.out);\n\n\t\treturn -1;\n }", "private void printHelp() \n {\n Logger.Log(\"You have somehow ended up in this strange, magical land. But really you just want to go home.\");\n Logger.Log(\"\");\n Logger.Log(\"Your command words are:\");\n parser.showCommands();\n Logger.Log(\"You may view your inventory or your companions\");\n }", "private static void doHelp() {\r\n\t\tdoUsage();\r\n\t\tSystem.out.println(\"\\n\" + \"When passed a dictionary and a document, spell check the document. Optionally,\\n\"\r\n\t\t\t\t+ \"the switch -n toggles non-interactive mode; by default, the tool operates in\\n\"\r\n\t\t\t\t+ \"interactive mode. Interactive mode will write the corrected document to disk,\\n\"\r\n\t\t\t\t+ \"backing up the uncorrected document by concatenating a tilde onto its name.\\n\\n\"\r\n\t\t\t\t+ \"The optional -d switch with a dictionary parameter enters dictionary edit mode.\\n\"\r\n\t\t\t\t+ \"Dictionary edit mode allows the user to query and update a dictionary. Upon\\n\"\r\n\t\t\t\t+ \"completion, the updated dictionary is written to disk, while the original is\\n\"\r\n\t\t\t\t+ \"backed up by concatenating a tilde onto its name.\\n\\n\"\r\n\t\t\t\t+ \"The switch -h displays this help and exits.\");\r\n\t\tSystem.exit(0);\r\n\t}", "public void printHelp() \n {\n System.out.println(\"You are lost. You are alone. You wander\");\n System.out.println(\"around at the university.\");\n System.out.println();\n System.out.println(\"Your command words are:\");\n System.out.println(\" go quit help\");\n }", "public static void printUsage() {\n\t\tSystem.out.println(getVersions());\n\t\tSystem.out.println(\"Collect BE Metrics about Cache, Agent, and RTC\");\n\t\tSystem.out.println(\"BEJMX Usage:\");\n\t\tSystem.out.println(\"java com.tibco.metrics.bejmx.BEJMX -config <configFile> [-pid <pidList>]\");\n\t}" ]
[ "0.84305817", "0.8264497", "0.8158998", "0.80784404", "0.80384886", "0.8006775", "0.79717654", "0.79506624", "0.7900636", "0.7852513", "0.77124363", "0.7690167", "0.7680084", "0.76622444", "0.76435363", "0.76122874", "0.75799316", "0.7484735", "0.74725044", "0.7456015", "0.7441044", "0.7393407", "0.7324219", "0.72958755", "0.729306", "0.72738826", "0.7269894", "0.7258231", "0.7221621", "0.72125113", "0.7208332", "0.7199476", "0.7197068", "0.71531177", "0.7142173", "0.71018314", "0.70507383", "0.7037711", "0.70130914", "0.69900584", "0.69834", "0.6981551", "0.697642", "0.6969499", "0.6947948", "0.69439894", "0.69196194", "0.68966657", "0.68583554", "0.6855349", "0.6846029", "0.6835817", "0.68066216", "0.6774808", "0.675016", "0.674652", "0.67341703", "0.6698643", "0.66948825", "0.6691981", "0.66703564", "0.66588676", "0.66559315", "0.6646869", "0.6646401", "0.6643765", "0.6628766", "0.6626966", "0.65880996", "0.6540987", "0.653839", "0.65359974", "0.6517816", "0.6488544", "0.6479265", "0.64735615", "0.646987", "0.6424139", "0.6421", "0.6416228", "0.64113677", "0.6386556", "0.6380196", "0.6363962", "0.6360308", "0.6349635", "0.63402414", "0.63310957", "0.6304277", "0.6270893", "0.62688416", "0.62602854", "0.62532324", "0.62487227", "0.62484705", "0.62430966", "0.62419504", "0.6238181", "0.6217966", "0.62065643" ]
0.69999605
39
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.file_path
public String getFilePath() { return filePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@JsonProperty(\"filePath\")\n public WbExpression<StringValue> getFilePath() {\n return filePath;\n }", "public UploadedFileDTO getFile() {\r\n\t\ttype(ConfigurationItemType.FILE);\r\n\t\treturn fileValue;\r\n\t}", "java.lang.String getFilePath();", "@java.lang.Override\n public com.google.protobuf.ByteString\n getFilePathBytes() {\n return instance.getFilePathBytes();\n }", "@Column(length = 500, name = \"FILE_NAME\")\r\n public String getFileName() {\r\n return this.fileName == null ? null : this.fileName.substring(this.fileName.lastIndexOf(File.separator) + 1);\r\n }", "public String getFilePath() {\n\t\treturn Constants.CSV_DIR+getFileName();\n\t}", "public String getPath() {\n\t\treturn file.getPath();\n\t}", "public String getFilePath() {\n return this.filePath;\n }", "public String getFilePath() {\n return this.filePath;\n }", "public String getFilePath() {\n return this.filePath;\n }", "public String getFilePath() {\n return this.filePath;\n }", "@java.lang.Override\n public java.lang.String getFilePath() {\n return instance.getFilePath();\n }", "public String getFilepath() {\n\t\treturn this.filepath;\n\t}", "public String getFilePath() {\n return filePath;\n }", "@java.lang.Override\n public java.lang.String getFilePath() {\n return filePath_;\n }", "String getFilePath();", "public File getFileValue();", "public String getFilePath() {\n return null;\n }", "public String getFilePath()\n {\n return filePath;\n }", "public String getFilepath() {\n return filepath;\n }", "public String getFilepath() {\n return filepath;\n }", "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n return fileName;\n }", "File getFilePath()\r\n\t{\r\n\t\treturn fFilePath;\r\n\t}", "public String getFilePath()\n\t{\n\t\treturn filePath;\n\t}", "public String getFilePath() {\n\t\treturn filePath;\n\t}", "public Path getFilePath() {\n return filePath;\n }", "public java.lang.String getFilepath()\n {\n return filepath;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getFilePathBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(filePath_);\n }", "public String getFile() {\n return \"null\"; // getFileTopic().getCompositeValue().getTopic(FILE_PATH);\n }", "Path getFilePath();", "public String getFilePath() {\n return getString(CommandProperties.FILE_PATH);\n }", "public final String getFilePath() {\n\t\treturn m_info.getPath();\n\t}", "public String getFilepath() {\n\t\treturn filepath;\n\t}", "public String getFile() {\n \n // return it\n return theFile;\n }", "public String getFilepath()\n\t{\n\t\treturn filepath;\n\t}", "public String getFilePath() {\n return getSourceLocation().getFilePath();\n }", "public String filePath() {\n\t\treturn m_filePath;\n\t}", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String getLocalFilePath() {\n return loadConn.getProperty(\"filePath\");\n }", "public File getFile() {\n return this.path != null ? this.path.toFile() : null;\n }", "com.google.protobuf.ByteString\n getFilePathBytes();", "public abstract String getFotoPath();", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "String getFile() {\n\t\treturn file;\n\t}", "@Override\n\tpublic String getFileValue() {\n\t\treturn null;\n\t}", "public String getFilePath() {\n return theRemoteFilePath;\n }", "String getFilepath();", "public String file() {\n return this.file;\n }", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "public String getDataFilePath() {\r\n \t\treturn dataFile;\r\n \t}", "public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }", "public String getMappingFilePath();", "public String getFileUploadPath() {\n\t\treturn fileUploadPath;\n\t}", "public abstract String getFileLocation();", "SourceFilePath getFilePath();", "@Column(name = \"FILE_REAL_NAME\", length = 100 )\n\tpublic String getFileObjFileName() {\n\t\treturn fileObjFileName;\n\t}", "public File getPath() {\n return this.path;\n }", "@Override\r\n\tpublic Map<String, Object> fileSelectStoredFileName(int no) {\n\t\treturn sqlSession.selectOne(namespace + \"fileSelectStoredFileName\", no);\r\n\t}", "public String path() {\n return filesystem().pathString(path);\n }", "public String getPath();", "public String getPath();", "public String getPath();", "private String getFilePath(){\n\t\tif(directoryPath==null){\n\t\t\treturn System.getProperty(tmpDirSystemProperty);\n\t\t}\n\t\treturn directoryPath;\n\t}", "public String getOpenFilePath() {\n\t\treturn filePath.getText();\n\t}", "public String getPath() { return db.getPath(); }", "public String getSqlPath() {\n return (String) get(4);\n }", "@Nullable String getPath();", "@Column(name = \"FILE_CONTENT\" )\n @Lob\n public Byte[] getFileContent() {\n return fileContent;\n }", "@AutoEscape\n\tpublic String getFileUrl();", "public String getFilePath(int fileidx) {\n return null;\r\n }", "public List<String> getListFilePath() throws AncestryException {\n\t\tList<String> listFormKey = new ArrayList<String>();\n\t\tConnection con = null;\n\t\tString sql = \"\";\n\t\ttry {\n\t\t\tsql = \"SELECT filepath FROM \" + management + \" WHERE step =4 GROUP BY filepath ORDER BY filepath\";\n\t\t\tcon = db.getConnectByProject(project);\n\t\t\tlistFormKey = JdbcHelper.queryToSingleList(con, sql , true);\n\t\t} catch (Exception e) {\n\t\t\tthrow new AncestryException(\"getListFilePath : \" + e.toString() ,e);\n\t\t}\n\t\tfinally {\n\t\t\tJdbcHelper.close(con);\n\t\t}\n\t\treturn listFormKey;\n\t}", "private String getDatabaseFilePath(NotesDatabase db) {\n try {\n return db.getFilePath();\n } catch (RepositoryException ex) {\n LOGGER.log(Level.WARNING, \"Unable to retrieve database's file path\", ex);\n return null;\n }\n }", "java.lang.String getFileLoc();", "@JsonProperty(\"fileName\")\n public WbExpression<StringValue> getFileName() {\n return fileName;\n }", "public File getFile() { return file; }", "public File getFile() {\n return new File(this.filePath);\n }", "private String getSelectedFile() {\r\n\t\tString file = \"\";\r\n\t\tIFile selectedFile = fileResource.getSelectedIFile();\r\n\t\tif (selectedFile != null) {\r\n\t\t\tIPath selectedPath = selectedFile.getLocation();\r\n\t\t\tif (selectedPath != null) {\r\n\t\t\t\tfile = selectedPath.toFile().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn file;\r\n\t}", "public File getDirectoryValue();", "public ArrayList<String> getFiles() {\n\n\t\tif (m_db == null)\n\t\t\treturn new ArrayList<String>();\n\n\t\t//\n\t\t// query database\n\t\t//\n\t\tCursor cursor = m_db.query(FILE_TABLE_NAME,\n\t\t\t\tnew String[] { FILE_FIELD_PATH }, null, null, null, null, null);\n\n\t\t//\n\t\t// construct array list\n\t\t//\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\t//\n\t\t// collect result set\n\t\t//\n\t\tcollectResultSet(cursor, list);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn list;\n\t}", "public File getFile() {\r\n \t\treturn file;\r\n \t}", "public File getResultFile() {\r\n\t\treturn resultFile;\r\n\t}", "public String path() {\n return this.path;\n }", "public String path() {\n return this.path;\n }", "public String getPath(){\r\n\t\treturn path;\r\n\t}", "public String getLocationOfFiles() {\n\t\ttry {\n\t\t\tFile f = new File(\n\t\t\t\t\tgetRepositoryManager().getMetadataRecordsLocation() + \"/\" + getFormatOfRecords() + \"/\" + getKey());\n\t\t\treturn f.getAbsolutePath();\n\t\t} catch (Throwable e) {\n\t\t\tprtlnErr(\"Unable to get location of files: \" + e);\n\t\t\treturn \"\";\n\t\t}\n\t}", "public String getPath() {\n\t\treturn getString(\"path\");\n\t}", "public File getResultFile() {\n\t\treturn resultFile;\n\t}", "String getFile();", "String getFile();", "String getFile();", "public File getFile() {\n return file;\n }", "public File getFile() {\n return _file;\n }", "public String getProjectFilePath() {\n\t\tif (projectFileIO != null) {\n\t\t\treturn projectFileIO.getFilePath();\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public String getEventFilePath() {\r\n\t\treturn this.filePath;\r\n\t}" ]
[ "0.68283397", "0.67804515", "0.6752396", "0.6535575", "0.65290236", "0.6528429", "0.6511548", "0.6482272", "0.6482272", "0.6482272", "0.6482272", "0.64568746", "0.6418579", "0.63722235", "0.63688165", "0.636299", "0.6357435", "0.6345597", "0.6342811", "0.63312227", "0.63312227", "0.6324764", "0.6316737", "0.62850225", "0.62826854", "0.6266473", "0.6250096", "0.62499654", "0.62479216", "0.6223118", "0.6222758", "0.6222372", "0.6182598", "0.6172877", "0.61596483", "0.61570036", "0.6156195", "0.61376995", "0.61287814", "0.6121744", "0.6038761", "0.60289305", "0.6026931", "0.6026931", "0.60255533", "0.60090727", "0.60011107", "0.59900886", "0.5964183", "0.5955324", "0.5941431", "0.5934138", "0.5923376", "0.58826125", "0.5882272", "0.5867201", "0.5832283", "0.57929194", "0.576995", "0.5769701", "0.576519", "0.576519", "0.576519", "0.5753025", "0.5747958", "0.5744991", "0.5735625", "0.5708753", "0.56963944", "0.56907845", "0.56893915", "0.56864494", "0.56861734", "0.5685072", "0.56756365", "0.5666827", "0.5657616", "0.5647201", "0.56434953", "0.56387055", "0.5631403", "0.56287", "0.5628132", "0.5628132", "0.5615811", "0.5615009", "0.5608759", "0.5596875", "0.5579322", "0.5579322", "0.5579322", "0.55752265", "0.5571733", "0.55698127", "0.55683905" ]
0.63588756
21
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.file_path
public void setFilePath(String filePath) { this.filePath = filePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileRef() { this.fileRef = fileRef; }", "private void setFileNamePath(String value) {\n\t\tthis.fileNamePath = value;\n\t}", "public void setFile(UploadedFileDTO value) {\r\n\t\ttype(ConfigurationItemType.FILE);\r\n\t\tthis.fileValue = value;\r\n\t}", "public void setFile(String value){\n ((MvwDefinitionDMO) core).setFile(value);\n }", "public void setFilePath(String filePath) { this.filePath = filePath; }", "void setFilePath(String filePath);", "public void setFile(File file) {\n this.path = file != null ? file.toPath() : null;\n }", "public void setFilesPath(File path) {\r\n\t\tfilesPathProperty.set(path);\r\n\t}", "void setFilePath(Path filePath);", "private void setFile() {\n\t}", "public void setFilePath(String filePath){\r\n this.filePath = filePath;\r\n }", "public void setFile(File file);", "public void setFilePath(String path) {\n this.filePath = path;\n }", "public void setFile(File f) { file = f; }", "public void setFilePath(String filePath) {\n this.filePath = filePath;\n }", "public void setFile(File file)\n {\n this.file = file;\n }", "private void setFilePath(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000008;\n filePath_ = value;\n }", "public Builder setFilePath(\n java.lang.String value) {\n copyOnWrite();\n instance.setFilePath(value);\n return this;\n }", "public void setsFilePath(String value) {\n sFilePath = value;\n // // initialize these two\n CurrentFile = null;\n CurrentUri = null;\n // // If we have something real, setup the file and the Uri.\n if (!sFilePath.equalsIgnoreCase(\"\")) {\n CurrentFile = new File(sFilePath);\n CurrentUri = Uri.fromFile(CurrentFile);\n }\n }", "@JsonProperty(\"filePath\")\n public WbExpression<StringValue> getFilePath() {\n return filePath;\n }", "public void setNewFilePath(String newValue);", "@attribute(value = \"\", required = true)\t\r\n\tpublic void setFile(String file) {\r\n\t\tthis.file = file;\r\n\t}", "@Override\n public void setFile(File f) {\n \n }", "public void setFile(File file) {\n this.file = file;\n }", "public void setPath(File path) {\n this.path = path;\n }", "private void setFilePathBytes(\n com.google.protobuf.ByteString value) {\n filePath_ = value.toStringUtf8();\n bitField0_ |= 0x00000008;\n }", "public void setFilepath(java.lang.String _filepath)\n {\n filepath = _filepath;\n }", "public void setPath(String path);", "@JsonSetter(\"fileContent\")\r\n public void setFileContent (String value) { \r\n this.fileContent = value;\r\n }", "public void setFile(String key, File value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.getAbsolutePath());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "public void setOriginalFilePath(String newValue);", "public void setFilePath(String filePath) {\n this.filePath = filePath == null ? null : filePath.trim();\n }", "public void setFilePath(String filePath) {\n this.filePath = filePath == null ? null : filePath.trim();\n }", "public void setFile(String file) {\r\n this.file = file;\r\n }", "public void setFile(File file) {\n\t\tif (file != null && !file.isEmpty()) {\n\t\t\tthis.file = file;\n\t\t} else {\n\t\t\tthis.file = null;\n\t\t}\n\t}", "public void setFile(Object value) throws DmcValueException {\n ((MvwDefinitionDMO) core).setFile(value);\n }", "public void setFileUrl(String fileUrl);", "public void setFile(String fileName)\n {\n }", "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n return fileName;\n }", "void setPath(String path);", "public com.opentext.bn.converters.avro.entity.DocumentEvent.Builder setFileInfo(com.opentext.bn.converters.avro.entity.PayloadRef value) {\n validate(fields()[15], value);\n this.fileInfoBuilder = null;\n this.fileInfo = value;\n fieldSetFlags()[15] = true;\n return this;\n }", "public void setFilepath(String filepath) {\n this.filepath = filepath == null ? null : filepath.trim();\n }", "public void setFilepath(String filepath) {\n\t\tthis.filepath=filepath;\n\t}", "public void setFilepath(String filepath) {\r\n\t\tthis.filepath = filepath;\r\n\t}", "public void updatePathAndFile(String path, String file){\r\n\t\tthis.path = path;\r\n\t\tthis.file = file;\r\n\t}", "public void setPath(String path){\n mPath = path;\n }", "public Path getFilePath() {\n return filePath;\n }", "@JsonSetter(\"fileName\")\r\n public void setFileName (String value) { \r\n this.fileName = value;\r\n }", "public Builder setFile(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n file_ = value;\n onChanged();\n return this;\n }", "public void setFile(String filePath) {\n mFile = new File(filePath);\n }", "public void setFile(IFile file) {\n _file = file;\n }", "public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }", "public void setFile(byte[] file) {\n this.file = file;\n }", "public static void setPath(String path) {\n\t\tfilePath = path;\n\t}", "@Override\r\n protected void setPath() {\r\n filePath = CARD_PATH;\r\n }", "public void setFile(String file)\n\t{\n\t\tthis.file = file;\n\t}", "public Builder setObjectFile(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n objectFile_ = value;\n onChanged();\n return this;\n }", "public String getFilePath() {\n return filePath;\n }", "public void setPropertyFile(String value) {\n File f = (new File(value)).getAbsoluteFile();\n if (f.isDirectory()) {\n throw new IllegalArgumentException(\n String.format(\"The file %s is a directory.\", f));\n }\n File parent = f.getParentFile();\n if (parent != null) {\n if (!parent.isDirectory()) {\n throw new IllegalArgumentException(\n String.format(\"The directory %s does not exist.\", parent));\n }\n }\n propertyFile = f.getPath();\n }", "public String getFilePath() {\n return this.filePath;\n }", "public String getFilePath() {\n return this.filePath;\n }", "public String getFilePath() {\n return this.filePath;\n }", "public String getFilePath() {\n return this.filePath;\n }", "public void setFile(IFile srcFile) {\n\t\tthis.file = srcFile;\n\t}", "void setImagePath(String path);", "@java.lang.Override\n public java.lang.String getFilePath() {\n return filePath_;\n }", "void setNewFile(File file);", "@Accessor(qualifier = \"singleFile\", type = Accessor.Type.SETTER)\n\tpublic void setSingleFile(final Boolean value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(SINGLEFILE, value);\n\t}", "public void setFile(String file) {\n fileName = file;\n if (isHTTP(fileName)) {\n fileType = HTTP;\n } else {\n fileType = LOCAL;\n }\n }", "public void setPath(String fileName) {\n path = fileName;\n }", "@Override\n\tpublic void createFile(FileModel file) {\n\t\tString sql = \"INSERT INTO file VALUES (?,?,?,?,?,?,now(),now())\";\n\t\t\n\t\tthis.getJdbcTemplate().update(sql, new Object[] { \n\t\t\t\tfile.getFile_id(),\n\t\t\t\tfile.getFile_path(),\n\t\t\t\tfile.getFile_name(),\n\t\t\t\tfile.getFile_type(),\n\t\t\t\tfile.getFile_size(),\n\t\t\t\tfile.getCretd_usr()\n\t\t});\n\t}", "public void setPath(Path path) {\n this.path = path;\n }", "@Override\n\tpublic String getFileValue() {\n\t\treturn null;\n\t}", "public String getFilePath() {\n return null;\n }", "public String getFilePath() {\n return filePath;\n }", "public String getFilePath() {\n return filePath;\n }", "public String getFilePath() {\n return filePath;\n }", "public String getFilePath() {\n return filePath;\n }", "public String getFilePath() {\n return filePath;\n }", "public String getFilePath() {\n return filePath;\n }", "public void setFile(File file) {\r\n\t\tif (file!=null) this.input = null;\r\n\t\tthis.file = file;\r\n\t}", "void setFile(String i) {\n file = i;\n }", "private void setAssetPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n assetPath_ = value;\n }", "public void setPath(String path) {\r\n this.path = path;\r\n }", "public void setFileID(Long fileID)\n/* */ {\n/* 100 */ this.fileID = fileID;\n/* */ }", "public void setPath(String path) {\n this.path = path;\n }", "public String getFilePath()\n {\n return filePath;\n }", "public static void setFileType( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, FILETYPE, value);\r\n\t}", "public static void setOriginalFilename( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALFILENAME, value);\r\n\t}", "public void setPath(String path)\n {\n this.path = path;\n }", "public void setFileId(Long fileId) {\n/* 31:31 */ this.fileId = fileId;\n/* 32: */ }", "public void setFileType( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), FILETYPE, value);\r\n\t}", "public String getFilePath() {\n\t\treturn filePath;\n\t}", "public void setLocalMusicPath(String val) {\n\t\tref.edit().putString(COL_LOCAL_MP3_PATH, val).commit();\n\t}", "public void setFile(org.ow2.bonita.facade.runtime.AttachmentInstance file) {\r\n\t\tthis.file = file;\r\n\t}", "public void setPath(String path) {\r\n\t\tthis.path = path;\r\n\t}" ]
[ "0.62666553", "0.62581676", "0.6248962", "0.62053764", "0.61771744", "0.6163227", "0.61452764", "0.61094713", "0.6098675", "0.60870516", "0.6083963", "0.602266", "0.5992987", "0.58856416", "0.5878645", "0.5876644", "0.58588284", "0.5850428", "0.584325", "0.5808662", "0.58004487", "0.5780922", "0.5758298", "0.5751994", "0.57372344", "0.57257503", "0.57204443", "0.57159626", "0.56921583", "0.5652356", "0.5625056", "0.5622984", "0.5622984", "0.56182766", "0.5612511", "0.5585382", "0.5574836", "0.55674434", "0.5562304", "0.55606", "0.5550462", "0.5533301", "0.5531195", "0.55305034", "0.55139005", "0.550866", "0.54980636", "0.5489795", "0.5489675", "0.54801655", "0.54721326", "0.547176", "0.54470956", "0.54129684", "0.5411346", "0.5409715", "0.5407174", "0.53925794", "0.5391265", "0.5378849", "0.5378849", "0.5378849", "0.5378849", "0.537779", "0.53768194", "0.53745776", "0.5367014", "0.5366928", "0.536128", "0.5351935", "0.53436977", "0.53384703", "0.533807", "0.5329451", "0.532724", "0.532724", "0.532724", "0.532724", "0.532724", "0.532724", "0.5325756", "0.53239864", "0.5316187", "0.5312838", "0.5298587", "0.52872187", "0.5276016", "0.527545", "0.52705485", "0.52673703", "0.5261547", "0.5256038", "0.5250385", "0.5249389", "0.5249379", "0.52488273" ]
0.57764506
25
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.file_name
public String getFileName() { return fileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Column(length = 500, name = \"FILE_NAME\")\r\n public String getFileName() {\r\n return this.fileName == null ? null : this.fileName.substring(this.fileName.lastIndexOf(File.separator) + 1);\r\n }", "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n return fileName;\n }", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "@Column(name = \"FILE_REAL_NAME\", length = 100 )\n\tpublic String getFileObjFileName() {\n\t\treturn fileObjFileName;\n\t}", "@Override\r\n\tpublic Map<String, Object> fileSelectStoredFileName(int no) {\n\t\treturn sqlSession.selectOne(namespace + \"fileSelectStoredFileName\", no);\r\n\t}", "public StrColumn getDataFileName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"data_file_name\", StrColumn::new) :\n getBinaryColumn(\"data_file_name\"));\n }", "@JsonProperty(\"fileName\")\n public WbExpression<StringValue> getFileName() {\n return fileName;\n }", "public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}", "public String getFile_name() {\n\t\treturn file_name;\n\t}", "public String getFileName() {\n\t\treturn file.getFileName();\n\t}", "@JsonGetter(\"fileName\")\r\n public String getFileName ( ) { \r\n return this.fileName;\r\n }", "public String getFilename() {\n\treturn file.getFilename();\n }", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "public String getNameFile(){\n\t\t\treturn this.nameFile;\n\t\t}", "public UploadedFileDTO getFile() {\r\n\t\ttype(ConfigurationItemType.FILE);\r\n\t\treturn fileValue;\r\n\t}", "public String getFILE_NAME() { return FILE_NAME; }", "public String getFileName(){\n\t\treturn fileName;\n\t}", "public String nextFileName() {\n\n\t\t// Get the next file from the search\n\n\t\ttry {\n\t\t\tString fileName = null;\n\t\t\twhile (m_rs.next()) {\n\t\t\t\tfileName = m_rs.getString(\"name\");\n\t\t\t\tif (m_filter == null || m_filter.matchesPattern(fileName) == true)\n\t\t\t\t\treturn fileName;\n\t\t\t}\n\t\t} catch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public String getFileName(){\n\t\treturn _fileName;\n\t}", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}", "java.lang.String getFilename();", "java.lang.String getFilename();", "public String getFileName() \n {\n return fileName;\n }", "public String getFileName()\r\n {\r\n return fileName;\r\n }", "public String GetFileName() {\r\n\treturn fileName;\r\n }", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "public String getFileName()\r\n {\r\n return sFileName;\r\n }", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName();", "public String getFileName();", "public String getFile() {\n return \"null\"; // getFileTopic().getCompositeValue().getTopic(FILE_PATH);\n }", "public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}", "private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}", "@XmlElement\n @Nullable\n public String getFileName() {\n return this.fileName;\n }", "public String getFilename();", "public String getFileName() {\n\t\treturn mItems.getJustFileName();\n\t}", "public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}", "public String getFileName ();", "public String fileName() {\n return this.fileName;\n }", "public String fileName() {\n return this.fileName;\n }", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}", "public String getFileName() {\n return filename;\n }", "public String getFileName() {\n return mFileNameTextField == null ? \"\" : mFileNameTextField.getText(); //$NON-NLS-1$\n }", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "protected String getFileName() {\n\t\treturn fileName;\n\t}", "public String fileName () {\n\t\treturn fileName;\n\t}", "public String getFileName ()\n\t{\n\t\treturn FileName;\n\t}", "public String getFileRealName() {\n return fileRealName;\n }", "public final String getFilename() {\n return properties.get(FILENAME_PROPERTY);\n }", "public String getFileName() {\n/* 43:43 */ return this.fileName;\n/* 44: */ }", "public String getFileChosen() \n {\n return fileName.getText();\n }", "public final String getFileName()\r\n {\r\n return _fileName;\r\n }", "public String getSourceFileName() {\n\t\tStringIdMsType stringIdType =\n\t\t\tpdb.getTypeRecord(getSourceFileNameStringIdRecordNumber(), StringIdMsType.class);\n\t\tif (stringIdType == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn stringIdType.getString();\n\t}", "public String getName() {\r\n return mFile.getName();\r\n }", "@Nullable public String getFileName() {\n return getSourceLocation().getFileName();\n }", "public String getFilename() {\r\n return filename;\r\n }", "public Object fileName() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().fileName();\n }", "public final String getFileName() {\n return this.fileName;\n }", "public String getFile() {\n \n // return it\n return theFile;\n }", "public String getFileName() {\n return String.format(\"%s%o\", this.fileNamePrefix, getIndex());\n }", "@Override\n\tpublic String getFileValue() {\n\t\treturn null;\n\t}", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFileName() {\n java.lang.Object ref = fileName_;\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 fileName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }" ]
[ "0.7672715", "0.7390731", "0.6948022", "0.6792555", "0.6775567", "0.67606604", "0.67210835", "0.67070866", "0.6702193", "0.66783214", "0.6651994", "0.663233", "0.65792954", "0.65651757", "0.6537188", "0.6537188", "0.6537188", "0.6537188", "0.6537188", "0.6537188", "0.6537188", "0.6537188", "0.6537188", "0.65323937", "0.65309304", "0.6526249", "0.648727", "0.6486089", "0.6484235", "0.64750236", "0.6454562", "0.6454562", "0.6454562", "0.6451836", "0.6450072", "0.6450072", "0.64495766", "0.64489466", "0.64427876", "0.6438757", "0.64275086", "0.6427036", "0.6427036", "0.6414692", "0.6414692", "0.6409377", "0.63978237", "0.63749915", "0.636452", "0.636158", "0.6358108", "0.63552237", "0.6352575", "0.6349505", "0.6349505", "0.63327545", "0.63327545", "0.63327545", "0.6325089", "0.6325089", "0.6320902", "0.6319013", "0.63101816", "0.6301391", "0.6301391", "0.6301391", "0.6301391", "0.6301391", "0.6300008", "0.62961805", "0.6267924", "0.6267022", "0.6264852", "0.6239459", "0.6238955", "0.6237472", "0.6235957", "0.6219416", "0.6216447", "0.6214313", "0.6210077", "0.62026685", "0.6202128", "0.6197717", "0.6186714", "0.61851615", "0.61851615", "0.61851615", "0.61851615", "0.61851615", "0.61851615" ]
0.6406011
54
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.file_name
public void setFileName(String fileName) { this.fileName = fileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n return fileName;\n }", "@JsonSetter(\"fileName\")\r\n public void setFileName (String value) { \r\n this.fileName = value;\r\n }", "@Column(length = 500, name = \"FILE_NAME\")\r\n public String getFileName() {\r\n return this.fileName == null ? null : this.fileName.substring(this.fileName.lastIndexOf(File.separator) + 1);\r\n }", "private void setFileNamePath(String value) {\n\t\tthis.fileNamePath = value;\n\t}", "public void setFile(String value){\n ((MvwDefinitionDMO) core).setFile(value);\n }", "public Builder setFileName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n fileName_ = value;\n onChanged();\n return this;\n }", "public Builder setFileName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n fileName_ = value;\n onChanged();\n return this;\n }", "public Builder setFileName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n fileName_ = value;\n onChanged();\n return this;\n }", "public Builder setFileName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n fileName_ = value;\n onChanged();\n return this;\n }", "public Builder setFileName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n fileName_ = value;\n onChanged();\n return this;\n }", "public Builder setFileName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n fileName_ = value;\n onChanged();\n return this;\n }", "public void setFileName(String fileName) {\n/* 39:39 */ this.fileName = fileName;\n/* 40: */ }", "public void setFile(String fileName)\n {\n }", "void setFileName( String fileName );", "public void setFileName(String fileName)\r\n {\r\n sFileName = fileName;\r\n }", "public void setFileName(String fileName)\r\n/* 16: */ {\r\n/* 17:49 */ this.fileName = fileName;\r\n/* 18: */ }", "@Column(name = \"FILE_REAL_NAME\", length = 100 )\n\tpublic String getFileObjFileName() {\n\t\treturn fileObjFileName;\n\t}", "public void setOriginalFileName(String newValue);", "@attribute(value = \"\", required = true)\t\r\n\tpublic void setFile(String file) {\r\n\t\tthis.file = file;\r\n\t}", "public void setFileName(String fileName) {\r\n this.fileName = fileName;\r\n }", "public void setFileName(String fileName) {\n this.fileName = fileName;\n }", "public Builder setFileName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n fileName_ = value;\n onChanged();\n return this;\n }", "public Builder setFileName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n fileName_ = value;\n onChanged();\n return this;\n }", "public void setFileRef() { this.fileRef = fileRef; }", "void setFile(String i) {\n file = i;\n }", "public void setFile(String file) {\r\n this.file = file;\r\n }", "private void setFile() {\n\t}", "public void setFilename(String f){\n\t\tfilename = f;\n\t}", "public void setFileName(@Nullable String documentName) {\n this.fileName = documentName;\n }", "public Builder setFilename(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n filename_ = value;\n onChanged();\n return this;\n }", "public Builder setFilename(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n filename_ = value;\n onChanged();\n return this;\n }", "@JsonProperty(\"fileName\")\n public WbExpression<StringValue> getFileName() {\n return fileName;\n }", "public void setFileName( String name ) {\n\tfilename = name;\n }", "public void SetFileName(String fileName) {\r\n\tthis.fileName = fileName;\r\n }", "public void setFilename(String filename) {\n this.filename = filename;\n }", "public void setFilename(String filename) {\n this.filename = filename;\n }", "public void setFile(String file)\n\t{\n\t\tthis.file = file;\n\t}", "public void setFileName(String fileName)\r\n\t{\r\n\t\tm_fileName = fileName;\r\n\t}", "public String getFILE_NAME() { return FILE_NAME; }", "public void setFileName(String fileName) {\r\n this.fileName = fileName == null ? null : fileName.trim();\r\n }", "@JsonSetter(\"fileContent\")\r\n public void setFileContent (String value) { \r\n this.fileContent = value;\r\n }", "public void setFileName(String fileName) {\r\n\t\tthis.fileName = fileName;\r\n\t}", "public void setFileName(String fileName) {\r\n\t\tthis.fileName = fileName;\r\n\t}", "public void setNewFilePath(String newValue);", "public void setFile(String file) {\n fileName = file;\n if (isHTTP(fileName)) {\n fileType = HTTP;\n } else {\n fileType = LOCAL;\n }\n }", "@ApiModelProperty(value = \"Gets or sets File Name.\")\n public String getFileName() {\n return fileName;\n }", "public void setFileName(String fileName) {\n this.fileName = fileName == null ? null : fileName.trim();\n }", "public void setFileName(String fileName) {\n this.fileName = fileName == null ? null : fileName.trim();\n }", "public void setFileName(String fileName) {\n this.fileName = fileName == null ? null : fileName.trim();\n }", "public void setFile(File file)\n {\n this.file = file;\n }", "public void setFileName(String fileName)\n\t{\n\t\tthis.fileName = fileName;\n\t}", "public String getFileName(){\n\t\treturn fileName;\n\t}", "public void setOriginalFilename(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALFILENAME, value);\r\n\t}", "public void setFile(File file);", "public void setFilename(String filename) {\n this.filename = filename == null ? null : filename.trim();\n }", "public void setFilename( String name) {\n\tfilename = name;\n }", "public void setFile(File f) { file = f; }", "public String getFileName(){\n\t\treturn _fileName;\n\t}", "public FileName() {\n setFile(null);\n }", "public void setFileName(String filename)\n\t{\n\t\tsuper.setFileName(filename);\n\t\t\n\t\t//#CM702602\n\t\t// Generate the path name of Working data File. \n\t\tworkingDataFileName = wFileName.replaceAll(\"\\\\\\\\send\\\\\\\\\", \"\\\\\\\\recv\\\\\\\\\");\n\t}", "public FileName(String fn) {\n setFile(fn);\n }", "public void setFileName(final File filename) {\n fFileName = filename;\n }", "public void setFileName(String name)\n\t{\n\t\tfileName = name;\n\t}", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public void setFileName(final String fileName) {\r\n this.fileName = fileName;\r\n }", "public void setFileName(edu.umich.icpsr.ddi.FileNameType fileName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileNameType target = null;\n target = (edu.umich.icpsr.ddi.FileNameType)get_store().find_element_user(FILENAME$0, 0);\n if (target == null)\n {\n target = (edu.umich.icpsr.ddi.FileNameType)get_store().add_element_user(FILENAME$0);\n }\n target.set(fileName);\n }\n }", "public void setName(String filename) {\n\t\tthis.filename = filename;\n\t}", "@Override\r\n\tpublic Map<String, Object> fileSelectStoredFileName(int no) {\n\t\treturn sqlSession.selectOne(namespace + \"fileSelectStoredFileName\", no);\r\n\t}", "public String getFileName() \n {\n return fileName;\n }", "public void setFilename(String fn) {\n\t\tfilename = fn;\n\t}", "public String getFileName()\r\n {\r\n return fileName;\r\n }", "@XmlElement\n @Nullable\n public String getFileName() {\n return this.fileName;\n }", "public void setFileName(String fileName) {\n\t\tthis.fileName = fileName;\n\t}", "public void setFileName(String fileName) {\n\t\tthis.fileName = fileName;\n\t}", "public void setFile(UploadedFileDTO value) {\r\n\t\ttype(ConfigurationItemType.FILE);\r\n\t\tthis.fileValue = value;\r\n\t}", "public void setFile(File file) {\n this.file = file;\n }", "public void updateFileName()\n {\n\n String fn= presenter.getCurrentTrack().getFileName();\n if(fn!=null && !fn.isEmpty()) {\n File file = new File(fn);\n fn=file.getName();\n }\n if(fn==null || fn.isEmpty())\n fn=\"*\";\n fileNameTextView.setText(fn);\n }", "public void setFile(File file) {\n\t\tthis.file = file;\n\t\tthis.displayName.setValue(file.getName());\n\t}", "public void setFileName(String name) {\r\n this.fileName = name == null ? null : name.substring(name.lastIndexOf(File.separator) + 1);\r\n }", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "@Override\n\tpublic String getFileValue() {\n\t\treturn null;\n\t}", "public void setPropertyFileName(String propertyfileName)\r\n\t{\r\n\t\t// propertyfileName = propertyFileName;\r\n\t\tpropertyFileName = propertyfileName;\r\n\t}", "public void setFilename(String filename) {\n\t\tthis.filename = filename;\n\t}", "public void setFilename(String filename) {\n\t\tthis.filename = filename;\n\t}", "public void setFilename(String fileNameIn) {\n\t\tfileName = fileNameIn;\n\t}", "public void setFilename(String name){\n\t\tfilename = name;\n\t}", "public void setFileName(final String theName)\r\n {\r\n\r\n // this means we are currently in a save operation\r\n _modified = false;\r\n\r\n // store the filename\r\n _fileName = theName;\r\n\r\n // and use it as the name\r\n if (theName.equals(NewSession.DEFAULT_NAME))\r\n setName(theName);\r\n\r\n }", "@JsonGetter(\"fileName\")\r\n public String getFileName ( ) { \r\n return this.fileName;\r\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }" ]
[ "0.69381505", "0.6655652", "0.65819174", "0.6458672", "0.6424122", "0.6384905", "0.6384905", "0.6384905", "0.6384905", "0.6384905", "0.6384905", "0.63108057", "0.62993526", "0.6220773", "0.6173804", "0.61692756", "0.6160137", "0.6145101", "0.6135878", "0.6111256", "0.6100761", "0.6063755", "0.6061501", "0.605487", "0.6046544", "0.60224396", "0.6018196", "0.60112596", "0.59985757", "0.5972702", "0.5972702", "0.5958447", "0.5955039", "0.5942986", "0.5927302", "0.5927302", "0.5915288", "0.59117115", "0.58986485", "0.5894274", "0.58880776", "0.5883489", "0.5883489", "0.58808", "0.58698887", "0.58537585", "0.5843035", "0.5843035", "0.5843035", "0.58369637", "0.5833007", "0.5825589", "0.5822849", "0.5821485", "0.5798563", "0.57985204", "0.5795694", "0.57956564", "0.5788034", "0.5787889", "0.5775632", "0.57745385", "0.57639194", "0.57582825", "0.5757158", "0.5757158", "0.5757158", "0.57546407", "0.5753298", "0.57484424", "0.57427555", "0.5736878", "0.573229", "0.5729232", "0.5725617", "0.572247", "0.572247", "0.571725", "0.57171726", "0.57015985", "0.5700455", "0.56988794", "0.5695718", "0.56910956", "0.5688537", "0.5687684", "0.5687684", "0.5682175", "0.5675921", "0.56744653", "0.566381", "0.566224", "0.566224", "0.566224", "0.566224", "0.566224" ]
0.59954304
32
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.file_size
public String getFileSize() { return fileSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getFileSize();", "public long getFileSize();", "public long size() {\n return this.filePage.getSizeInfile();\n }", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "@XmlElement\n public long getFileSize() {\n return this.fileSize;\n }", "public long getFileSize() {\r\n return fileSize;\r\n }", "public long getFileSize() {\r\n\t\treturn dFileSize;\r\n\t}", "public int getFileSize(){\n\t\treturn fileSize;\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "public long size() {\n return file.length();\n }", "public long getFileSize() {\n\t\treturn mFileSize;\n\t}", "public long getFileSize() {\n return this.originalFileSize;\n }", "public long getFileSize()\r\n {\r\n return lFileSize;\r\n }", "public long getSize() {\r\n return mFile.getSize();\r\n }", "public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}", "long getFileSize();", "public float getFileSize() {\n return fileSize_;\n }", "public float getFileSize() {\n return fileSize_;\n }", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "public long getDbFileSize() {\r\n\tlong result = -1;\r\n\r\n\ttry {\r\n\t File dbFile = new File(fileName);\r\n\t if (dbFile.exists()) {\r\n\t\tresult = dbFile.length();\r\n\t }\r\n\t} catch (Exception e) {\r\n\t // nothing todo here\r\n\t}\r\n\r\n\treturn result;\r\n }", "public long getFileLength() {\n\n return fileLength;\n\n }", "public long getFileSize()\n throws IOException\n {\n return file.length();\n }", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public long length() {\n return _file.length();\n }", "@Override\n public long size() {\n if (!isRegularFile()) {\n throw new IllegalStateException(\"not a regular file!\");\n }\n return this.fileSize;\n }", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }", "public Long sizeInKB() {\n return this.sizeInKB;\n }", "public long size() {\n try {\n return Files.size(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to get the size of staged document!\", e);\n }\n }", "@NotPersistent\n public String getSize() {\n return size;\n }", "public int getFileSize (String filePath) throws RemoteException {\r\n\t\tint size;\r\n\t\tFile myFile = new File(filePath);\r\n\t\tsize = (int)myFile.length();\r\n\t\treturn size;\r\n\r\n\t\t\t\t\r\n\t}", "@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "@Override\n\tpublic long getSize()\n\t{\n\t\tif (size >= 0)\n\t\t{\n\t\t\treturn size;\n\t\t}\n\t\telse if (cachedContent != null)\n\t\t{\n\t\t\treturn cachedContent.length;\n\t\t}\n\t\telse if (dfos.isInMemory())\n\t\t{\n\t\t\treturn dfos.getData().length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn dfos.getFile().length();\n\t\t}\n\t}", "public static long size(File file) {\n\t\treturn file.length();\n\t}", "@ApiModelProperty(required = true, value = \"Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\\\"local\\\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\\\"not available\\\")\")\n\n public Long getSize() {\n return size;\n }", "public Long sizeInBytes() {\n return this.sizeInBytes;\n }", "public long getSizeFromFile(File file) {\n\t\tlong size = 0;\n\t\tif (file != null) {\n\t\t\tsize = file.length();\n\t\t}\n\t\treturn size;\n\t}", "public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }", "public long getSize() {\n // a char is two bytes\n int size = (key.length() * 2) + 4;\n\n if (id != null) {\n size += ((id.length() * 2) + 4);\n }\n\n if (content != null) {\n if (content.getClass() == String.class) {\n size += ((content.toString().length() * 2) + 4);\n } else if (content instanceof CacheContent) {\n size += ((CacheContent) content).getSize();\n } else {\n return -1;\n }\n\n //add created, lastUpdate, and wasFlushed field sizes (1, 8, and 8)\n return size + 17;\n } else {\n return -1;\n }\n }", "public Long getTargetFileSize() {\n return this.targetFileSize;\n }", "public long getFileSize(String filename) {\n\t\treturn 0;\n\t}", "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "public long getInstrumentedFileSize() {\n if (this.rewrittenFile != null) return this.rewrittenFile.length();\n else return -1;\n }", "public int getSize() {\n\t\treturn smilFiles.size();\n\t}", "long getFileSize(String path) throws NotFoundException;", "@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 double fileSizeMB(String filePath) throws NumberFormatException, IOException {\n \tFile file = new File(filePath.replace(\"\\\\\", \"/\"));\n if(file.exists()) {\n // fileWriterPrinter(\"FILE SIZE: \" + file.length() + \" Bit\");\n // fileWriterPrinter(\"FILE SIZE: \" + file.length()/1024 + \" Kb\");\n fileWriterPrinter(\"FILE SIZE: \" + ((double) file.length()/(1024*1024)) + \" Mb\");\n return (double) file.length()/(1024*1024);\n } else { fileWriterPrinter(\"File doesn't exist\"); return 0; }\n \n }", "public void determineFileSize() {\n \t//Creating scanner object\n \tScanner scan = new Scanner(System.in);\n \tSystem.out.println(\"Please enter the path of the file you'd like to determint the size of\");\n \t\n \t//Capturing file path as filePath variable\n \tString filePath = scan.next();\n \t//using Java Nio\n \tPath path = Paths.get(filePath);\n\t\t\n \ttry {\n\t\t\tLong fileSize = Files.size(path);\n\t\t\tSystem.out.println(String.format(\"%s, bytes\", fileSize));\n\t\t\tSystem.out.println(String.format(\"%s, kilobytes\", fileSize/1024));\n\n\t\t\t\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \tscan.close();\n \t\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 long getSize() {\n return size;\n }", "protected long getDataFileSize() throws IOException\r\n {\r\n long size = 0;\r\n\r\n storageLock.readLock().lock();\r\n\r\n try\r\n {\r\n if (dataFile != null)\r\n {\r\n size = dataFile.length();\r\n }\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n return size;\r\n }", "long getMaxFileSizeBytes();", "public Long getVolumeSizeInBytes() {\n return this.volumeSizeInBytes;\n }", "public long getSize() {\r\n return size;\r\n }", "public static long getFileSize(String filePath) {\n\t\treturn new File(filePath).length();\n\t}", "public long getSize() {\n\t\treturn size;\n\t}", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "fi.kapsi.koti.jpa.nanopb.Nanopb.IntSize getIntSize();", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public long getMaximumFileSize()\r\n\t{\r\n\t\treturn maxFileSize;\r\n\t}", "private int getFileSize(File file) {\r\n\t\tFileInputStream fis = null;\r\n\t\ttry {\r\n\t\t\tfis = new FileInputStream(file);\r\n\t\t\tint size = fis.available();\r\n\t\t\tfis.close();\r\n\t\t\treturn size;\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "public long getFileCompressedSize()\r\n {\r\n return lFileCompressedSize;\r\n }", "public String getSize() {\n return fullPhoto.getSize();\n }", "public int size() {\n return files.size();\n }", "public static long getDownloadingFileSize() {\n\t\treturn downloadingFileSize;\n\t}", "public Long getContentClaimFileSizeBytes() {\n return contentClaimFileSizeBytes;\n }", "public String getSize() {\r\n return size;\r\n }", "public Integer getFileSize(Long key) {\n File file = new File(MUSIC_FILE_PATH + File.separator + key + \".mp3\");\n return (int)file.length();\n }", "public long size(String path);", "public int getFileInfoCount() {\n if (fileInfoBuilder_ == null) {\n return fileInfo_.size();\n } else {\n return fileInfoBuilder_.getCount();\n }\n }", "@Element \n public String getSize() {\n return size;\n }", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "public int getSegmentFileSizeMB() {\n return _segmentFileSizeMB;\n }", "public long getSize() {\n return size.get();\n }", "@ApiModelProperty(required = true, value = \"The length of the file/folder.\")\n public Long getLength() {\n return length;\n }", "synchronized final long getMaxFileSize() {\n return this.maxFileSize;\n }", "public java.lang.Integer getApplicationFileLength() {\r\n return applicationFileLength;\r\n }", "public long getSize();", "public final long getSize() { return size; }", "@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 int getRecordSize(){\n return columns.get(0).size();\n }", "public long getFileSize(String fileName)\n {\n long size = -1;\n\n File file = new File(fileLocation.getAbsolutePath() + File.separatorChar\n + fileName);\n\n if (file.isFile())\n {\n size = file.length();\n }\n\n return size;\n }", "Long diskSizeBytes();", "public Long maxSizeInMegabytes() {\n return this.maxSizeInMegabytes;\n }", "public TSizeInBytes getSize() {\n\n\t\treturn size;\n\t}", "long getWorkfileSize();", "public long amountUploaded();", "public Number getFileCount() {\r\n\t\treturn (this.fileCount);\r\n\t}", "long getSize() throws IOException {\n return fileRWAccessSize.get();\n }", "@java.lang.Override\n public int getFileInfoCount() {\n return fileInfo_.size();\n }", "public int getSizeBytes() {\n if (getDataType() == DataType.SEQUENCE)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRING)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRUCTURE)\n return size * members.getStructureSize();\n // else if (this.isVariableLength())\n // return 0; // do not know\n else\n return size * getDataType().getSize();\n }", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "public void setFileSize(String fileSize) {\n this.fileSize = fileSize;\n }", "public void setFileSize(long fileSize) {\n this.fileSize = fileSize;\n }", "public long getSize() {\n return mSize;\n }" ]
[ "0.74358034", "0.74358034", "0.7351095", "0.7304791", "0.7269765", "0.7233439", "0.72325003", "0.72240734", "0.72167337", "0.7189581", "0.71873367", "0.7184369", "0.7154835", "0.7120055", "0.7116198", "0.7114335", "0.7108855", "0.7080546", "0.7066696", "0.700694", "0.6972132", "0.6859643", "0.678107", "0.67615014", "0.66783255", "0.6631573", "0.6597638", "0.6594086", "0.6574437", "0.65204763", "0.6501681", "0.6497463", "0.647295", "0.646924", "0.6450413", "0.6442405", "0.6439532", "0.6403742", "0.640241", "0.63869154", "0.63790596", "0.6337618", "0.63033336", "0.628314", "0.6279623", "0.6241607", "0.6221233", "0.62211347", "0.62091976", "0.6204683", "0.6204683", "0.6204683", "0.6204683", "0.61966753", "0.61934316", "0.6187753", "0.6178762", "0.61742264", "0.61431694", "0.6141002", "0.612529", "0.6120328", "0.6119044", "0.6119044", "0.611788", "0.6099896", "0.6097778", "0.60969394", "0.60835344", "0.60794353", "0.6078936", "0.6076795", "0.605363", "0.6048016", "0.6038983", "0.603628", "0.6033879", "0.60255384", "0.60212576", "0.6020469", "0.6019883", "0.6019401", "0.6018138", "0.601007", "0.60072", "0.6004857", "0.5994411", "0.597324", "0.5954358", "0.5947084", "0.59405905", "0.59395343", "0.5932753", "0.59163105", "0.590418", "0.5901783", "0.59009963", "0.5898072", "0.5896645", "0.5893112" ]
0.7228044
7
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.file_size
public void setFileSize(String fileSize) { this.fileSize = fileSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileSize(long fileSize) {\n this.fileSize = fileSize;\n }", "public void setFileSize(long fileSize)\r\n {\r\n lFileSize = fileSize;\r\n }", "public Builder setFileSize(long value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }", "public Builder setFileSize(float value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }", "public FileObject size(Integer size) {\n this.size = size;\n return this;\n }", "public void setAudiofileSize(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "public long getFileSize() {\r\n return fileSize;\r\n }", "public int getFileSize(){\n\t\treturn fileSize;\n\t}", "@XmlElement\n public long getFileSize() {\n return this.fileSize;\n }", "public void setAudiofileSize( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "private void setFileSize(final Long fileSize) {\n\t\t// almacenamos el tamano del fichero\n\t\tthis.fileSize = fileSize;\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "public static void setAudiofileSize( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, AUDIOFILESIZE, value);\r\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "public long getFileSize() {\r\n\t\treturn dFileSize;\r\n\t}", "public static void setAudiofileSize(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.Integer value) {\r\n\t\tBase.set(model, instanceResource, AUDIOFILESIZE, value);\r\n\t}", "public long getFileSize();", "public long getFileSize();", "public String getFileSize() {\n return fileSize;\n }", "public long getFileSize() {\n return this.originalFileSize;\n }", "public float getFileSize() {\n return fileSize_;\n }", "public long getFileSize()\r\n {\r\n return lFileSize;\r\n }", "public float getFileSize() {\n return fileSize_;\n }", "public long getFileSize() {\n\t\treturn mFileSize;\n\t}", "public Builder setMaxUploadSizeInBytes(long value) {\n \n maxUploadSizeInBytes_ = value;\n onChanged();\n return this;\n }", "public void setFileSize(long fileSize) {\n \t\n \t// Check if the file size has changed\n \t\n \tif ( getFileSize() != fileSize) {\n \t\t\n \t\t// Update the file size\n \t\t\n \t\tsuper.setFileSize( fileSize);\n \t\t\n \t\t// Queue a low priority state update\n \t\t\n \t\tqueueLowPriorityUpdate( UpdateFileSize);\n \t}\n }", "public void setMaxFileSize(String value)\r\n\t{\r\n\t\tmaxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);\r\n\t}", "long getFileSize();", "public synchronized void updateFileSize( long passedSize ){\n \n fileSize = passedSize;\n if( fileSize >= 0 && fileByteCounter >= fileSize )\n finishFileTransfer(); \n }", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public void setMaxFileSize(int sINGLESIZE) {\n\t\t\r\n\t}", "public long size() {\n return this.filePage.getSizeInfile();\n }", "@ApiModelProperty(required = true, value = \"Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\\\"local\\\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\\\"not available\\\")\")\n\n public Long getSize() {\n return size;\n }", "@Override\n\tpublic void setLen(ByteBuffer fileBytes) {\n\t\tthis.len = fileBytes.getInt();\n\t}", "@Test\n public void testFileSize() {\n System.out.println(\"fileSize\");\n RecordFile instance = new RecordFile();\n \n Assert.assertEquals(76, instance.fileSize());\n \n byte[] bytes = new byte[10];\n instance.insert(bytes, 0);\n Assert.assertEquals(86, instance.fileSize());\n \n bytes = new byte[12];\n instance.write(bytes, 0);\n Assert.assertEquals(88, instance.fileSize());\n \n bytes = new byte[100];\n instance.insert(bytes, 0);\n Assert.assertEquals(188, instance.fileSize());\n \n bytes = new byte[100];\n instance.remove(0);\n Assert.assertEquals(88, instance.fileSize());\n \n bytes = new byte[100];\n instance.remove(0);\n Assert.assertEquals(76, instance.fileSize());\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "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 }", "public void setSize(long value) {\n this.size = value;\n }", "public void testSetSize_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\t\tString value = \"\";\n\n\t\tfixture.setSize(value);\n\n\t\t\n\t}", "public void setTargetFileSize(Long targetFileSize) {\n this.targetFileSize = targetFileSize;\n }", "public Long getTargetFileSize() {\n return this.targetFileSize;\n }", "public long size() {\n return file.length();\n }", "public long getSize() {\r\n return mFile.getSize();\r\n }", "@Test\n public void fieldFileSize() throws Exception {\n Document doc = new Document(getMyDir() + \"Document.docx\");\n\n Assert.assertEquals(16222, doc.getBuiltInDocumentProperties().getBytes());\n\n DocumentBuilder builder = new DocumentBuilder(doc);\n builder.moveToDocumentEnd();\n builder.insertParagraph();\n\n // Below are three different units of measure\n // with which FILESIZE fields can display the document's file size.\n // 1 - Bytes:\n FieldFileSize field = (FieldFileSize) builder.insertField(FieldType.FIELD_FILE_SIZE, true);\n field.update();\n\n Assert.assertEquals(\" FILESIZE \", field.getFieldCode());\n Assert.assertEquals(\"16222\", field.getResult());\n\n // 2 - Kilobytes:\n builder.insertParagraph();\n field = (FieldFileSize) builder.insertField(FieldType.FIELD_FILE_SIZE, true);\n field.isInKilobytes(true);\n field.update();\n\n Assert.assertEquals(\" FILESIZE \\\\k\", field.getFieldCode());\n Assert.assertEquals(\"16\", field.getResult());\n\n // 3 - Megabytes:\n builder.insertParagraph();\n field = (FieldFileSize) builder.insertField(FieldType.FIELD_FILE_SIZE, true);\n field.isInMegabytes(true);\n field.update();\n\n Assert.assertEquals(\" FILESIZE \\\\m\", field.getFieldCode());\n Assert.assertEquals(\"0\", field.getResult());\n\n // To update the values of these fields while editing in Microsoft Word,\n // we must first save the changes, and then manually update these fields.\n doc.save(getArtifactsDir() + \"Field.FILESIZE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.FILESIZE.docx\");\n\n field = (FieldFileSize) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_FILE_SIZE, \" FILESIZE \", \"16222\", field);\n\n // These fields will need to be updated to produce an accurate result.\n doc.updateFields();\n\n field = (FieldFileSize) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_FILE_SIZE, \" FILESIZE \\\\k\", \"13\", field);\n Assert.assertTrue(field.isInKilobytes());\n\n field = (FieldFileSize) doc.getRange().getFields().get(2);\n\n TestUtil.verifyField(FieldType.FIELD_FILE_SIZE, \" FILESIZE \\\\m\", \"0\", field);\n Assert.assertTrue(field.isInMegabytes());\n }", "@Override\n public long size() {\n if (!isRegularFile()) {\n throw new IllegalStateException(\"not a regular file!\");\n }\n return this.fileSize;\n }", "public void setPackageSize(int size){\r\n }", "public void updateRecordCurrentSize(final Record record) {\n String recordPath = getPathForRecord(record);\n File recordFolder = new File(recordPath);\n if (recordFolder.exists()) {\n File[] recordFiles = recordFolder.listFiles();\n long totalSizeKB = 0;\n for (File eachRecordFile : recordFiles) {\n totalSizeKB += (eachRecordFile.length() / 1024);\n }\n record.recordSizeKB = totalSizeKB;\n record.totalSizeKB = Math.max(record.totalSizeKB, record.recordSizeKB);\n }\n }", "public void showFileSize(long size);", "public void setApplicationFileLength(java.lang.Integer applicationFileLength) {\r\n this.applicationFileLength = applicationFileLength;\r\n }", "public void setLocalSize(int size);", "public void set_fieldsize(AST fieldsize);", "public void setFile(UploadedFileDTO value) {\r\n\t\ttype(ConfigurationItemType.FILE);\r\n\t\tthis.fileValue = value;\r\n\t}", "public void setLogCollectionMaxFileSize(int size);", "public void addAudiofileSize(java.lang.Integer value) {\r\n\t\tBase.add(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "public void setSegmentFileSizeMB(int segmentFileSizeMB) {\n this._segmentFileSizeMB = segmentFileSizeMB;\n this._properties.setProperty(PARAM_SEGMENT_FILE_SIZE_MB, _segmentFileSizeMB+\"\");\n }", "public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}", "public FlowFileDTOBuilder setContentClaimFileSizeBytes(final Long contentClaimFileSizeBytes) {\n this.contentClaimFileSizeBytes = contentClaimFileSizeBytes;\n return this;\n }", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "@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 truncateFile(SrvSession sess, TreeConnection tree, NetworkFile file, long siz)\n throws java.io.IOException {\n \n // Debug\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"DB truncateFile()\");\n\n // Check that the network file is our type\n\n if (file instanceof DBNetworkFile) {\n\n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Get the JDBC file\n \n DBNetworkFile jfile = (DBNetworkFile) file;\n \n // Get, or create, the file state\n \n FileState fstate = jfile.getFileState();\n \n // Get the file details\n \n DBFileInfo dbInfo = getFileDetails(jfile.getFullName(),dbCtx,fstate);\n if ( dbInfo == null)\n throw new FileNotFoundException(jfile.getFullName());\n\n // Check if the new file size is greater than the maximum allowed file size, if enabled\n \n if ( dbCtx.hasMaximumFileSize() && siz > dbCtx.getMaximumFileSize()) {\n \n // Mark the file to delete on close\n \n file.setDeleteOnClose( true);\n\n // Return a disk full error\n \n throw new DiskFullException( \"Write is beyond maximum allowed file size\");\n }\n \n // Keep track of the allocation/release size in case the file resize fails\n \n long allocSize = 0L;\n long releaseSize = 0L;\n \n // Check if there is a quota manager\n\n QuotaManager quotaMgr = dbCtx.getQuotaManager();\n \n if ( dbCtx.hasQuotaManager()) {\n \n // Determine if the new file size will release space or require space allocating\n \n if ( siz > dbInfo.getAllocationSize()) {\n \n // Calculate the space to be allocated\n \n allocSize = siz - dbInfo.getAllocationSize();\n \n // Allocate space to extend the file\n \n quotaMgr.allocateSpace(sess, tree, file, allocSize);\n }\n else {\n \n // Calculate the space to be released as the file is to be truncated, release the space if\n // the file truncation is successful\n \n releaseSize = dbInfo.getAllocationSize() - siz;\n }\n }\n \n // Set the file length\n\n try {\n jfile.truncateFile(siz);\n }\n catch (IOException ex) {\n \n // Check if we allocated space to the file\n \n if ( allocSize > 0 && quotaMgr != null)\n quotaMgr.releaseSpace(sess, tree, file.getFileId(), null, allocSize);\n\n // Rethrow the exception\n \n throw ex; \n }\n \n // Check if space has been released by the file resizing\n \n if ( releaseSize > 0 && quotaMgr != null)\n quotaMgr.releaseSpace(sess, tree, file.getFileId(), null, releaseSize);\n \n // Update the file information\n \n if ( allocSize > 0)\n dbInfo.setAllocationSize(dbInfo.getAllocationSize() + allocSize);\n else if ( releaseSize > 0)\n dbInfo.setAllocationSize(dbInfo.getAllocationSize() - releaseSize);\n \n // Update the last file change date/time\n \n try {\n\n // Build the file information to set the change date/time\n \n FileInfo finfo = new FileInfo();\n \n finfo.setChangeDateTime(System.currentTimeMillis());\n finfo.setFileInformationFlags(FileInfo.SetChangeDate);\n \n // Set the file change date/time\n \n dbCtx.getDBInterface().setFileInformation(jfile.getDirectoryId(), jfile.getFileId(), finfo);\n \n // Update the cached file information\n \n dbInfo.setChangeDateTime(finfo.getChangeDateTime());\n dbInfo.setAllocationSize(siz);\n }\n catch (Exception ex) { \n }\n }\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 static void addAudiofileSize(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.Integer value) {\r\n\t\tBase.add(model, instanceResource, AUDIOFILESIZE, value);\r\n\t}", "Update withDiskSizeGB(Integer diskSizeGB);", "public void testGetFileSizeSuccess() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n String fileCreationId = filePersistence.createFile(VALID_FILELOCATION, FILENAME);\r\n assertTrue(\"fileCreationId shouldn't be null or empty\", fileCreationId != null\r\n && fileCreationId.trim().length() != 0);\r\n filePersistence.appendBytes(fileCreationId, new byte[10]);\r\n filePersistence.closeFile(fileCreationId);\r\n assertEquals(\"should be size of 10 bytes\", filePersistence.getFileSize(VALID_FILELOCATION, FILENAME), 10);\r\n filePersistence.deleteFile(VALID_FILELOCATION, FILENAME);\r\n }", "public void setSize(TSizeInBytes size) {\n\n\t\tthis.size = size;\n\t}", "public void addAudiofileSize( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), AUDIOFILESIZE, value);\r\n\t}", "public void setFileCompressedSize(long fileCompressedSize)\r\n {\r\n lFileCompressedSize = fileCompressedSize;\r\n }", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }", "public long getFileLength() {\n\n return fileLength;\n\n }", "public void setTotalMaxFileSize(int tOTALMAXSIZE) {\n\t\t\r\n\t}", "public FlowFileDTOBuilder setContentClaimFileSize(final String contentClaimFileSize) {\n this.contentClaimFileSize = contentClaimFileSize;\n return this;\n }", "public void setDocumentSize(int v) {\n if (SourceDocumentInformation_Type.featOkTst\n && ((SourceDocumentInformation_Type) jcasType).casFeat_documentSize == null)\n this.jcasType.jcas.throwFeatMissing(\"documentSize\", \"org.apache.uima.examples.SourceDocumentInformation\");\n jcasType.ll_cas.ll_setIntValue(addr,\n ((SourceDocumentInformation_Type) jcasType).casFeatCode_documentSize, v);\n }", "public void setVolumeSizeInBytes(Long volumeSizeInBytes) {\n this.volumeSizeInBytes = volumeSizeInBytes;\n }", "public static void addAudiofileSize( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, AUDIOFILESIZE, value);\r\n\t}", "private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}", "public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }", "public Builder setServerPayloadSizeBytes(int value) {\n \n serverPayloadSizeBytes_ = value;\n onChanged();\n return this;\n }", "public void setContentLength(Long contentLength) {\n\t\tif (!this.headerGenerated) {\n\t\t\tthis.contentLength = contentLength;\n\t\t}\n\t}", "public void setRecordSize(int recordSize)\r\n\t{\r\n\t\tthis.recordSize = recordSize;\r\n\t}", "public void setSize(int value) {\n\t\tthis.size = value;\n\t}", "public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}", "public void setFileId(Long fileId) {\n/* 31:31 */ this.fileId = fileId;\n/* 32: */ }", "public void setObjectSize(java.lang.Long value) {\n this.object_size = value;\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);", "long getMaxFileSizeBytes();", "@Override\n\tpublic long getSize()\n\t{\n\t\tif (size >= 0)\n\t\t{\n\t\t\treturn size;\n\t\t}\n\t\telse if (cachedContent != null)\n\t\t{\n\t\t\treturn cachedContent.length;\n\t\t}\n\t\telse if (dfos.isInMemory())\n\t\t{\n\t\t\treturn dfos.getData().length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn dfos.getFile().length();\n\t\t}\n\t}", "public void setContentLength(long contentLength)\r\n/* 175: */ {\r\n/* 176:260 */ set(\"Content-Length\", Long.toString(contentLength));\r\n/* 177: */ }", "public LogFileInner withSizeInKB(Long sizeInKB) {\n this.sizeInKB = sizeInKB;\n return this;\n }", "private void addLengthToCacheSize(final IndexedDiskElementDescriptor value)\r\n {\r\n contentSize.addAndGet((value.len + IndexedDisk.HEADER_SIZE_BYTES) / 1024 + 1);\r\n }", "public void setLength(long newLength) throws IOException {\n flush();\n this.randomAccessFile.setLength(newLength);\n if (newLength < this.fileOffset) {\n this.fileOffset = newLength;\n }\n }", "@NotPersistent\n public String getSize() {\n return size;\n }", "public void setFileID(Long fileID)\n/* */ {\n/* 100 */ this.fileID = fileID;\n/* */ }", "public long size() {\n try {\n return Files.size(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to get the size of staged document!\", e);\n }\n }", "public Builder clearFileSize() {\n \n fileSize_ = 0F;\n onChanged();\n return this;\n }", "public Builder clearFileSize() {\n \n fileSize_ = 0L;\n onChanged();\n return this;\n }", "public void determineFileSize() {\n \t//Creating scanner object\n \tScanner scan = new Scanner(System.in);\n \tSystem.out.println(\"Please enter the path of the file you'd like to determint the size of\");\n \t\n \t//Capturing file path as filePath variable\n \tString filePath = scan.next();\n \t//using Java Nio\n \tPath path = Paths.get(filePath);\n\t\t\n \ttry {\n\t\t\tLong fileSize = Files.size(path);\n\t\t\tSystem.out.println(String.format(\"%s, bytes\", fileSize));\n\t\t\tSystem.out.println(String.format(\"%s, kilobytes\", fileSize/1024));\n\n\t\t\t\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \tscan.close();\n \t\n }", "@java.lang.Override\n public long getMaxUploadSizeInBytes() {\n return maxUploadSizeInBytes_;\n }", "public long getMaximumFileSize()\r\n\t{\r\n\t\treturn maxFileSize;\r\n\t}", "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "@java.lang.Override\n public long getMaxUploadSizeInBytes() {\n return maxUploadSizeInBytes_;\n }" ]
[ "0.71331996", "0.70443964", "0.70098555", "0.6668414", "0.65637934", "0.6402416", "0.637842", "0.6351219", "0.6350422", "0.6341058", "0.63283867", "0.63112456", "0.62884206", "0.6285594", "0.627234", "0.62716407", "0.6251834", "0.6251834", "0.6249672", "0.6228174", "0.6225137", "0.6179942", "0.6131848", "0.6119464", "0.6039302", "0.5983035", "0.5946016", "0.59450924", "0.59380966", "0.5892435", "0.5875782", "0.58680063", "0.58339417", "0.5812509", "0.5801267", "0.57915443", "0.5781838", "0.5767232", "0.57532805", "0.57411176", "0.5728742", "0.5715716", "0.5706872", "0.5701395", "0.56868607", "0.5666774", "0.5641629", "0.56403375", "0.55884284", "0.5582575", "0.5555658", "0.55400443", "0.5536278", "0.5534135", "0.55297804", "0.55244267", "0.55216956", "0.5506839", "0.5502944", "0.549688", "0.54944324", "0.54926455", "0.5489528", "0.5487959", "0.5484884", "0.54761285", "0.54716426", "0.5466544", "0.54638535", "0.5446977", "0.5446232", "0.54431885", "0.5442796", "0.54352814", "0.5422726", "0.54076296", "0.5394931", "0.5393353", "0.5371223", "0.5362712", "0.53500926", "0.53496003", "0.5338897", "0.5326036", "0.53247917", "0.53216577", "0.53135693", "0.5309922", "0.5282705", "0.5263376", "0.5262866", "0.52563614", "0.52548176", "0.52500683", "0.52431595", "0.5240682", "0.5236553", "0.523414", "0.52057666", "0.5198153" ]
0.68077606
3
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.file_title
public String getFileTitle() { return fileTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Column(length = 500, name = \"FILE_NAME\")\r\n public String getFileName() {\r\n return this.fileName == null ? null : this.fileName.substring(this.fileName.lastIndexOf(File.separator) + 1);\r\n }", "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n return fileName;\n }", "public String getFileName()\n {\n return getString(\"FileName\");\n }", "public void setFileTitle(String fileTitle) {\n this.fileTitle = fileTitle;\n }", "public StrColumn getDataFileName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"data_file_name\", StrColumn::new) :\n getBinaryColumn(\"data_file_name\"));\n }", "public String getFilename() {\n\treturn file.getFilename();\n }", "public String filename (){\r\n\t\t\treturn _filename;\r\n\t\t}", "@Override\r\n\tpublic Map<String, Object> fileSelectStoredFileName(int no) {\n\t\treturn sqlSession.selectOne(namespace + \"fileSelectStoredFileName\", no);\r\n\t}", "public String getFileName() {\n return getCellContent(FILE).split(FILE_LINE_SEPARATOR)[0];\n }", "@Column(name = \"FILE_REAL_NAME\", length = 100 )\n\tpublic String getFileObjFileName() {\n\t\treturn fileObjFileName;\n\t}", "public String getFilename(){\n\t\treturn filename;\n\t}", "public String getFilename(){\n\t\treturn filename;\n\t}", "public String getFilename() {\n\treturn(filename);\n }", "public String getFilename() {\r\n return filename;\r\n }", "public String getFileName() {\n\t\treturn mItems.getJustFileName();\n\t}", "public String getFilename() {\n return filename;\n }", "public String getFilename() {\n return filename;\n }", "public String getFilename();", "@JsonProperty(\"fileName\")\n public WbExpression<StringValue> getFileName() {\n return fileName;\n }", "public String getFileName() {\n\t\treturn file.getFileName();\n\t}", "public String getFilename() {\n return filename;\n }", "public String getFilename() {\n return filename;\n }", "public String getFile_name() {\n\t\treturn file_name;\n\t}", "@JsonGetter(\"fileName\")\r\n public String getFileName ( ) { \r\n return this.fileName;\r\n }", "public StrColumn getTitle() {\n return delegate.getColumn(\"title\", DelegatingStrColumn::new);\n }", "public String getFilename()\n {\n return filename;\n }", "public String getFileName(){\n\t\treturn fileName;\n\t}", "private String getFilename() {\r\n\t\treturn (String) txtFlnm.getValue();\r\n\t}", "public String getFileName() {\n return filename;\n }", "public String getFileName() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.exists() && !this.isDirectory())\n\t\t\tresult = this.get(this.lenght - 1);\n\t\t\n\t\treturn result;\n\t}", "public String getFileName() \n {\n return fileName;\n }", "public String getFilename()\r\n\t{\r\n\t\treturn _filename; \r\n\t}", "public String getFilename() {\n\t\treturn this.filename;\n\t}", "public String getFilename() {\n\t\treturn this.filename;\n\t}", "public String getFileName() {\n return fileName;\n }", "public final String getFileName() {\n\t\treturn m_info.getFileName();\n\t}", "public String getFileName()\r\n {\r\n return fileName;\r\n }", "public String getFilename()\r\n\t{\r\n\t\treturn filename;\r\n\t}", "java.lang.String getFilename();", "java.lang.String getFilename();", "public abstract String getFileName();", "public String getFileName();", "public String getFileName();", "public String getProjectTitle() {\n\n\t\tif (projectTitle != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"project_title\" + TAB + projectTitle;\n\t\treturn null;\n\t}", "public String getFileName()\r\n {\r\n return sFileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String getFileName() {\r\n return fileName;\r\n }", "public String GetFileName() {\r\n\treturn fileName;\r\n }", "public final String getFilename() {\n return properties.get(FILENAME_PROPERTY);\n }", "public String getFileName(){\r\n\t\treturn linfo != null ? linfo.getFileName() : \"\";\r\n\t}", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "public String getFileName(){\n\t\treturn _fileName;\n\t}", "public String getFileName ();", "public String getFileName() {\n\t\treturn file.getName();\n\t}", "public String getFileName ()\n\t{\n\t\treturn FileName;\n\t}", "public final String getFileName() {\n\n\t\treturn getValue(FILE_NAME);\n\t}", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n return this.fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "public String getFileName() {\n return fileName;\n }", "@NotNull\r\n @Column(name = \"title\")\r\n public String getTitle() {\n return title;\r\n }", "@ApiModelProperty(value = \"Gets or sets File Name.\")\n public String getFileName() {\n return fileName;\n }", "public String getFilename() {\n\t\treturn filename;\n\t}", "public String getFilename() {\n\t\treturn filename;\n\t}", "public String getFilename() {\n\t\treturn filename;\n\t}", "public String getFilename() {\n\t\treturn filename;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getFileName()\n\t{\n\t\treturn fileName;\n\t}", "public String getDisplayFileName() {\r\n return fileName + \" (\" + FileItem.getDisplayFileSize(fileSize) + \")\";\r\n }", "protected String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFilename() {\n\t\treturn fileName;\n\t}", "public String getFILE_NAME() { return FILE_NAME; }", "public java.lang.String getTitle()\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(TITLE$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "String getFilename();", "@Override\n public String getFilename() {\n return filename;\n }", "@Override\n public String getFilename() {\n if (workflowMeta == null) {\n return null;\n }\n return workflowMeta.getFilename();\n }", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n\t\treturn fileName;\r\n\t}", "public String getFileName() {\r\n \t\tif (isFileOpened()) {\r\n \t\t\treturn curFile.getName();\r\n \t\t} else {\r\n \t\t\treturn \"\";\r\n \t\t}\r\n \t}", "private String getFileName() {\n\t\t// retornamos el nombre del fichero\n\t\treturn this.fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}", "public String getFileName() {\n\t\treturn fileName;\n\t}" ]
[ "0.68734586", "0.66372985", "0.6599865", "0.6340317", "0.6320024", "0.62110263", "0.6149563", "0.61369056", "0.61360925", "0.60999966", "0.6052206", "0.6052206", "0.6023526", "0.6023094", "0.60223067", "0.6021505", "0.6021505", "0.5999234", "0.5992126", "0.5972752", "0.59603375", "0.59603375", "0.5951231", "0.5946796", "0.59427565", "0.5937863", "0.5931988", "0.5924443", "0.59141123", "0.59140474", "0.5908057", "0.58981264", "0.5890255", "0.5890255", "0.58894354", "0.58884734", "0.58852917", "0.5884966", "0.5884362", "0.5884362", "0.5871462", "0.5868106", "0.5868106", "0.5866316", "0.58650684", "0.58594537", "0.58594537", "0.58594537", "0.5852547", "0.5844675", "0.5844657", "0.5840014", "0.5840014", "0.5840014", "0.5840014", "0.5840014", "0.5840014", "0.5840014", "0.5840014", "0.5840014", "0.5836627", "0.5833243", "0.5825146", "0.58200973", "0.58117825", "0.5810766", "0.5810766", "0.581003", "0.581003", "0.581003", "0.581003", "0.581003", "0.581003", "0.581003", "0.581003", "0.581003", "0.581003", "0.5806817", "0.58022666", "0.5798093", "0.5798093", "0.5798093", "0.5798093", "0.57913464", "0.57913464", "0.5783939", "0.5775938", "0.57734674", "0.5759876", "0.5759262", "0.5758366", "0.574246", "0.57398546", "0.5734641", "0.5734641", "0.5734641", "0.5722019", "0.57207984", "0.57020736", "0.57020736" ]
0.7303738
0
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.file_title
public void setFileTitle(String fileTitle) { this.fileTitle = fileTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFileTitle() {\n return fileTitle;\n }", "@Column(name = \"FILE_NAME\", nullable = false, length = 100 )\n public String getFileName() {\n return fileName;\n }", "public void setTitle(java.lang.String title)\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(TITLE$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TITLE$2);\n }\n target.setStringValue(title);\n }\n }", "public void setAlbumTitle(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), ALBUMTITLE, value);\r\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t\tthis.dirtyAttributes.add(Constants.TITLE);\n\t}", "public void resetFileTitle()\n\t{\n\t\tif(currentFile.length() == 0)\n\t\t{\n\t\t\tfileTitle.setTitle(\"Editor\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfileTitle.setTitle(currentFile.toString());\n\t\t}\n\t\ttextEditor.repaint();\n\t}", "protected void SetTitle(String newTitle){ title = newTitle; }", "public void setTitle(java.lang.String value) {\n this.title = value;\n }", "public void setAlbumTitle( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), ALBUMTITLE, value);\r\n\t}", "public void setOriginalAlbumTitle(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALALBUMTITLE, value);\r\n\t}", "void setFileName( String fileName );", "public void setFile(String value){\n ((MvwDefinitionDMO) core).setFile(value);\n }", "private void changeTitle(SingleDocumentModel model) {\n\t\tsetTitleAt(models.indexOf(model), model.getFilePath().getFileName().toString());\n\t}", "public void setOriginalAlbumTitle( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALALBUMTITLE, value);\r\n\t}", "public void setFileName(String fileName) {\n/* 39:39 */ this.fileName = fileName;\n/* 40: */ }", "public void setTitle_(String title_) {\n this.title_ = title_;\n }", "public void setFilename(String f){\n\t\tfilename = f;\n\t}", "public void doSetTitle(String newTitle) \n {\n this.title = newTitle;\n }", "public void setTitle(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), TITLE, value);\r\n\t}", "public static void setAlbumTitle(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, ALBUMTITLE, value);\r\n\t}", "public void setOriginalFileName(String newValue);", "public static void setOriginalAlbumTitle(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALALBUMTITLE, value);\r\n\t}", "public void setFilename(String filename) {\n this.filename = filename;\n }", "public void setFilename(String filename) {\n this.filename = filename;\n }", "public static void setAlbumTitle( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ALBUMTITLE, value);\r\n\t}", "public void setTitle(String title){\n \tthis.title = title;\n }", "@Column(length = 500, name = \"FILE_NAME\")\r\n public String getFileName() {\r\n return this.fileName == null ? null : this.fileName.substring(this.fileName.lastIndexOf(File.separator) + 1);\r\n }", "public void setTitle(String title){\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public static void setOriginalAlbumTitle( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALALBUMTITLE, value);\r\n\t}", "@JsonSetter(\"fileName\")\r\n public void setFileName (String value) { \r\n this.fileName = value;\r\n }", "private void setTitle(String userTitle){\n title = userTitle;\n }", "public void setTitle(String title){\n this.title = title;\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setFileName(String fileName)\r\n/* 16: */ {\r\n/* 17:49 */ this.fileName = fileName;\r\n/* 18: */ }", "@Element \n public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n\tthis.title = title;\n}", "public void setTitle(String title) {\r\n\tthis.title = title;\r\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String newTitle)\r\n {\r\n title = newTitle;\r\n }", "public void setTitle( String title )\n {\n _strTitle = title;\n }", "public void setTitle(String title) {\r\n _title = title;\r\n }", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "@Override\r\n\tpublic void setTitle(String title) {\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\n this.title = title;\n }", "protected void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) { this.title = title; }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n\t{\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title; \n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setFileName(String fileName)\r\n {\r\n sFileName = fileName;\r\n }", "public void setTitleAttribute(String titleAttribute) {\n this.titleAttribute = titleAttribute;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void updateFileName()\n {\n\n String fn= presenter.getCurrentTrack().getFileName();\n if(fn!=null && !fn.isEmpty()) {\n File file = new File(fn);\n fn=file.getName();\n }\n if(fn==null || fn.isEmpty())\n fn=\"*\";\n fileNameTextView.setText(fn);\n }", "public void setPropertyTitle(String propertyTitle) {\n\t\tthis.propertyTitle = propertyTitle;\n\t}", "public static void setOriginalFilename(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALFILENAME, value);\r\n\t}", "public void setTitle(Title title) {\r\n this.title = title;\r\n }", "@Override\n public void setTitle(String title) {\n this.title = title;\n }", "public static void setOriginalFilename( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALFILENAME, value);\r\n\t}", "private void updateTitle() {\n\t\tAbstractFolderModel folderModel = FolderModelManager.getInstance().getCurrentModel();\n\t\tTextView titleTV = (TextView) findViewById(R.id.title);\n\t\ttitleTV.setText(folderModel.title());\n\n\t\t\t\t\n\t\tint imgCount=FolderModelManager.getInstance().getCurrentModel().files().length;\n\t\tint folderCount=FolderModelManager.getInstance().getCurrentModel().subfolders().length-1;\n\t\t\n\t\tStringBuilder sb=new StringBuilder(); \n\t\tif (imgCount>0){\n\t\t\tsb.append(Utility.getResourceString(R.string.IMAGE));\n\t\t\tsb.append(\":\");\n\t\t\tsb.append(imgCount);\n\t\t}\n\t\tsb.append(' ');\n\t\tif (folderCount>0){\n\t\t\tsb.append(Utility.getResourceString(R.string.SUBFOLDER));\n\t\t\tsb.append(\":\");\n\t\t\tsb.append(folderCount);\n\t\t}\n\t\t\n\t\tTextView titleRight = (TextView) findViewById(R.id.title_right);\n\t\ttitleRight.setText(sb);\n\t\tsb=null;\t\n\t}", "@Test\n public void fieldTitle() throws Exception {\n Document doc = new Document();\n\n // Set a value for the \"Title\" built-in document property. \n doc.getBuiltInDocumentProperties().setTitle(\"My Title\");\n\n // We can use the TITLE field to display the value of this property in the document.\n DocumentBuilder builder = new DocumentBuilder(doc);\n FieldTitle field = (FieldTitle) builder.insertField(FieldType.FIELD_TITLE, false);\n field.update();\n\n Assert.assertEquals(field.getFieldCode(), \" TITLE \");\n Assert.assertEquals(field.getResult(), \"My Title\");\n\n // Setting a value for the field's Text property,\n // and then updating the field will also overwrite the corresponding built-in property with the new value.\n builder.writeln();\n field = (FieldTitle) builder.insertField(FieldType.FIELD_TITLE, false);\n field.setText(\"My New Title\");\n field.update();\n\n Assert.assertEquals(\" TITLE \\\"My New Title\\\"\", field.getFieldCode());\n Assert.assertEquals(\"My New Title\", field.getResult());\n Assert.assertEquals(\"My New Title\", doc.getBuiltInDocumentProperties().getTitle());\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.TITLE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.TITLE.docx\");\n\n Assert.assertEquals(\"My New Title\", doc.getBuiltInDocumentProperties().getTitle());\n\n field = (FieldTitle) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_TITLE, \" TITLE \", \"My New Title\", field);\n\n field = (FieldTitle) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_TITLE, \" TITLE \\\"My New Title\\\"\", \"My New Title\", field);\n Assert.assertEquals(\"My New Title\", field.getText());\n }", "public void setFile(String fileName)\n {\n }", "@Override\n\tpublic void setTitle(String title) {\n\t\tmodel.setTitle(title);\n\t}" ]
[ "0.63914764", "0.5906486", "0.58931464", "0.5882592", "0.58713955", "0.58114827", "0.5794053", "0.5776846", "0.57540965", "0.5733801", "0.57232904", "0.57034796", "0.5700487", "0.5691978", "0.5681685", "0.5677453", "0.56668824", "0.5655817", "0.5641099", "0.5631821", "0.56159383", "0.56141496", "0.55958146", "0.55958146", "0.55904174", "0.55640304", "0.55635214", "0.5551795", "0.5550205", "0.5550205", "0.55461735", "0.55335915", "0.55221903", "0.5521038", "0.5516476", "0.5516476", "0.55079126", "0.55064523", "0.55057484", "0.55043656", "0.5502816", "0.5502816", "0.5502816", "0.5502816", "0.54959303", "0.5489457", "0.54878867", "0.54804784", "0.54804784", "0.54804784", "0.54804784", "0.54804784", "0.54798347", "0.54770416", "0.54764116", "0.5476153", "0.5471015", "0.5471015", "0.5471015", "0.5469294", "0.5468416", "0.546613", "0.546613", "0.546613", "0.546613", "0.546613", "0.546613", "0.546613", "0.546613", "0.546613", "0.54651463", "0.5464543", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54632604", "0.54620993", "0.54511297", "0.54460907", "0.54309416", "0.5429964", "0.54286605", "0.54186606", "0.5418584", "0.54165685", "0.5410821" ]
0.72637963
0
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.regist_dt
public Date getRegistDt() { return registDt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Date getAttr_reg_dt() {\n\t\treturn super.getAttr_reg_dt();\r\n\t}", "public DTM getSystemEntryDateTime() { \r\n\t\tDTM retVal = this.getTypedField(22, 0);\r\n\t\treturn retVal;\r\n }", "public Date getFileDate()\r\n {\r\n return dFileDate;\r\n }", "public java.sql.Timestamp getRegdate()\n {\n return regdate; \n }", "@Override\n\tpublic Date getDbDate() {\n\t\treturn systemMapper.selectNow();\n\t}", "public String getMapLastUpdateDt() {\n\t\treturn this.mapLastUpdateDt;\n\t}", "public abstract java.sql.Timestamp getFecha_ingreso();", "public java.sql.Timestamp getFecha_envio();", "public int getDtRegistro() {\n return dtRegistro;\n }", "public Date getRegisterDatime() {\r\n return registerDatime;\r\n }", "public Date getRegisterDatime() {\r\n return registerDatime;\r\n }", "public abstract java.sql.Timestamp getFecha_fin();", "public java.lang.String getPatDt() {\n return patDt;\n }", "public String getFechaInsercion() { return (this.fechaInsercion == null) ? \"\" : this.fechaInsercion; }", "public String getFechaInsercion() { return (this.fechaInsercion == null) ? \"\" : this.fechaInsercion; }", "public String getDateCreationLibelle() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy hh:mm:ss\");\n\t\treturn this.dateCreation.format(format);\n\t}", "public HTMLElement getElementFechaInsercionEd() { return this.$element_FechaInsercionEd; }", "public Timestamp getBPJSRegistrationDate();", "public Date getFileupdate() {\n return fileupdate;\n }", "public java.sql.Timestamp getLastModified() {\r\n\t\treturn new java.sql.Timestamp(file.lastModified());\r\n\t}", "public String getSQLDateFormat();", "public String getMSDT() {\r\n for (int i = 0; i < eventFields.size(); i++) {\r\n EventDataEntry currentEntry = eventFields.get(i);\r\n if (currentEntry.getColumnName().equalsIgnoreCase(\"msdt\")) {\r\n return currentEntry.getValues().getFirst().toString();\r\n }\r\n }\r\n return null;\r\n }", "@JsonIgnore\n @DynamoDBAttribute(attributeName=\"updatedAt\")\n public Long getUpdatedAtDD() {\n return getUpdatedAt() == null ? null : getUpdatedAt().getTime();\n }", "public java.sql.Timestamp getFecha();", "public HTMLInputElement getElementFechaInsercion() { return this.$element_FechaInsercion; }", "public HTMLInputElement getElementFechaInsercion() { return this.$element_FechaInsercion; }", "public Date getInsertTime() {\r\n return insertTime;\r\n }", "public Date getInsertDate() {\r\n\t\treturn insertDate;\r\n\t}", "public Date getInsertTime() {\n return insertTime;\n }", "public Date getRegisterDateTime() { return registerDateTime; }", "public Date getInsertDate() {\n\t\treturn insertDate;\n\t}", "public DTM getRxa22_SystemEntryDateTime() { \r\n\t\tDTM retVal = this.getTypedField(22, 0);\r\n\t\treturn retVal;\r\n }", "public Date getModifiTime() {\n return modifiTime;\n }", "public Date getSupEntRegdate() {\n return supEntRegdate;\n }", "public Date getFcreatetime() {\n return fcreatetime;\n }", "public Date getDataNascimentoToSQL() {\r\n\t\treturn new Date(dataNascimento.getTimeInMillis());\r\n\t}", "private long getSyncDate(SQLiteDatabase db) throws JSONException {\n long ret = -1;\n String stmt = \"SELECT sync_date FROM sync_table;\";\n JSArray retQuery = selectSQL(db, stmt, new ArrayList<String>());\n List<JSObject> lQuery = retQuery.toList();\n if (lQuery.size() == 1) {\n long syncDate = lQuery.get(0).getLong(\"sync_date\");\n if (syncDate > 0) ret = syncDate;\n }\n return ret;\n }", "public Date getFechaInclusion()\r\n/* 150: */ {\r\n/* 151:170 */ return this.fechaInclusion;\r\n/* 152: */ }", "@Override\n public java.util.Date getRegistrationDate() {\n return _entityCustomer.getRegistrationDate();\n }", "public String getUpdYmd() {\n return updYmd;\n }", "@Override\r\n\tpublic Date getApp_latest_logon_dt() {\n\t\treturn super.getApp_latest_logon_dt();\r\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 }", "protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }", "@Override\r\n\tpublic Date getApp_first_logon_dt() {\n\t\treturn super.getApp_first_logon_dt();\r\n\t}", "public void setRegistDt(Date registDt) {\n this.registDt = registDt;\n }", "public long getDateRecordLastUpdated(){\n return dateRecordLastUpdated;\n }", "public Date getTimestamp() throws SQLException {\n\t\tloadFromDB();\n\t\treturn rev_timestamp;\n\t}", "long getContactRegistrationDate();", "public StrColumn getDateOfPDBRelease() {\n return delegate.getColumn(\"date_of_PDB_release\", DelegatingStrColumn::new);\n }", "public abstract java.lang.String getFecha_inicio();", "public String getDateType() {\r\n return dateType;\r\n }", "@Override\n\tpublic FdBusinessDate getCurrencyFdBusinessDate() {\n map.put(\"busiTypeCode\",\"02\");\n map.put(\"subBusiType\",\"01\");\n\t\treturn mapper.selectByPK(map);\n\t}", "public DateTime getUpdatedTimestamp() {\n\t\treturn getDateTime(\"sys_updated_on\");\n\t}", "public Long getCreateDatetime() {\n return createDatetime;\n }", "public Long getCreateDatetime() {\n return createDatetime;\n }", "public Date getdCreatetime() {\n return dCreatetime;\n }", "public String getREGN_DATE() {\r\n return REGN_DATE;\r\n }", "public Timestamp getDateTrx() \n{\nreturn (Timestamp)get_Value(\"DateTrx\");\n}", "public Date getCreationDate()\n {\n return (Date)getAttributeInternal(CREATIONDATE);\n }", "public java.sql.Timestamp getRecdate() {\n\treturn recdate;\n}", "public Date getUpdateDatetime();", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public String getFechaFinal(){\n\n\t\treturn campoFinal.getText();\n\n\t}", "public String getFileFormattedDateTime() {\n return this.optionalTime.map(x -> getFileFormattedDate() + \" | \" + x.format(DateTimeFormatter.ofPattern(\n \"HHmm\"))).orElse(getFileFormattedDate());\n }", "public Date getFlastupdatetime() {\n return flastupdatetime;\n }", "public Date getUpdateDt() {\n return updateDt;\n }", "public Date getUpdateDt() {\n return updateDt;\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Timestamp getStatementDate();", "public StrColumn getDateOfSfRelease() {\n return delegate.getColumn(\"date_of_sf_release\", DelegatingStrColumn::new);\n }", "public Date getUpdatime() {\n return updatime;\n }", "public String getFechaInicio(){\n\n\t\treturn campoInicio.getText();\n\n\t}", "public Date getUpdateTimeDb() {\r\n\t\treturn updateTimeDb;\r\n\t}", "public Timestamp getFechaEntrega() {\n return this.fechaEntrega.get();\n }", "public Date getUpdatedAt() {\n return (Date)getAttributeInternal(UPDATEDAT);\n }", "public Date getUpdatedAt() {\n return (Date)getAttributeInternal(UPDATEDAT);\n }", "Date getForLastUpdate();", "public Date getUpdatedAt()\n\t{\n\t\treturn getUpdatedAt( getSession().getSessionContext() );\n\t}", "public String getDatecreated() {\n return datecreated;\n }", "public Date getLastUpdateDt() {\n\t\treturn this.lastUpdateDt;\n\t}", "Date getDateUpdated();", "public String getInserttime() {\n\t\treturn inserttime;\n\t}", "public Date getDATE_CREATED() {\r\n return DATE_CREATED;\r\n }", "public Date getDATE_CREATED() {\r\n return DATE_CREATED;\r\n }", "public Date getDATE_CREATED() {\r\n return DATE_CREATED;\r\n }", "@Column(name = \"D_MTIME\", nullable = false)\n public Date getMtime() {\n return this.mtime;\n }", "public StrColumn getDateReleasedToPDB() {\n return delegate.getColumn(\"date_released_to_PDB\", DelegatingStrColumn::new);\n }", "Date getTimeField();", "public StrColumn getDateManuscript() {\n return delegate.getColumn(\"date_manuscript\", DelegatingStrColumn::new);\n }", "public java.util.Date getRecUpdTs () {\n\t\treturn recUpdTs;\n\t}", "public Date getDATE_UPDATED() {\r\n return DATE_UPDATED;\r\n }", "public Date getDATE_UPDATED() {\r\n return DATE_UPDATED;\r\n }", "public Date getCreateDt() {\n\t\treturn this.createDt;\n\t}", "public String getDateOfBirth(){\n return(this.dateOfBirth);\n }", "public Date getCreateDt() {\n return createDt;\n }", "private String getDateTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "public String getInsYmd() {\n return insYmd;\n }", "Timestamp nowDb() {\n return getJdbcOperations().queryForObject(getDialect().sqlSelectNow(), Timestamp.class);\n }" ]
[ "0.584179", "0.56644243", "0.5648647", "0.55710626", "0.55672884", "0.54837507", "0.54761404", "0.54342914", "0.5416175", "0.5393173", "0.5393173", "0.5392772", "0.5328485", "0.53131557", "0.53131557", "0.53069454", "0.52694464", "0.5266439", "0.5253683", "0.5240205", "0.52327657", "0.52250636", "0.5175348", "0.51560926", "0.51448864", "0.51448864", "0.5120603", "0.51195025", "0.5099155", "0.50988007", "0.50779086", "0.50754505", "0.5068622", "0.5054829", "0.50412136", "0.50337046", "0.502506", "0.50215596", "0.5005444", "0.500463", "0.5004408", "0.50025976", "0.50025976", "0.4998262", "0.49831596", "0.49809626", "0.4980405", "0.49791026", "0.49570155", "0.4944564", "0.49379", "0.49357867", "0.49336517", "0.49330488", "0.4932828", "0.4932828", "0.491974", "0.4917866", "0.49159598", "0.49159306", "0.49134395", "0.49106145", "0.49102777", "0.4905608", "0.4903476", "0.48999003", "0.48985377", "0.48985377", "0.4896861", "0.4896861", "0.4895671", "0.48934624", "0.48904946", "0.4889134", "0.48778903", "0.4874252", "0.4872676", "0.4872676", "0.4869006", "0.48662263", "0.48634082", "0.4861871", "0.4854381", "0.48425484", "0.48404685", "0.48404685", "0.48404685", "0.48356605", "0.4834515", "0.48311374", "0.4831098", "0.48207405", "0.48193833", "0.48193833", "0.48171037", "0.4816025", "0.48147374", "0.4813489", "0.48126832", "0.48095033" ]
0.56348956
3
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.regist_dt
public void setRegistDt(Date registDt) { this.registDt = registDt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileDate(Date fileDate)\r\n {\r\n dFileDate = fileDate;\r\n }", "public abstract void setFecha_fin(java.sql.Timestamp newFecha_fin);", "public abstract void setFecha_ingreso(java.sql.Timestamp newFecha_ingreso);", "public void setRegisterDateTime(Date dateTime) { this.registerDateTime = dateTime; }", "public void setDtRegistro(int dtRegistro) {\n this.dtRegistro = dtRegistro;\n }", "public void setFecha_envio(java.sql.Timestamp newFecha_envio);", "@Override\r\n\tpublic Date getAttr_reg_dt() {\n\t\treturn super.getAttr_reg_dt();\r\n\t}", "public void setFecha(java.sql.Timestamp newFecha);", "public void setFileupdate(Date fileupdate) {\n this.fileupdate = fileupdate;\n }", "public void setFechaInsercion(String p) { this.fechaInsercion = p; }", "public void setFechaInsercion(String p) { this.fechaInsercion = p; }", "public Date getRegistDt() {\n return registDt;\n }", "public void setRegisterDatime(Date registerDatime) {\r\n this.registerDatime = registerDatime;\r\n }", "public void setRegisterDatime(Date registerDatime) {\r\n this.registerDatime = registerDatime;\r\n }", "public void setRegdate(java.sql.Timestamp newVal) {\n if ((newVal != null && this.regdate != null && (newVal.compareTo(this.regdate) == 0)) || \n (newVal == null && this.regdate == null && regdate_is_initialized)) {\n return; \n } \n this.regdate = newVal; \n regdate_is_modified = true; \n regdate_is_initialized = true; \n }", "@Override\n\t\t\tpublic void setValue(Date value) {\n\t\t\t\tsuper.setValue(value);\n\t\t\t\tstart_cal_date = value.getTime();\n\t\t\t\tinfo_loader.load();\n\t\t\t}", "@NoProxy\n public void updateDtstamp() {\n setDtstamp(new DtStamp(new DateTime(true)).getValue());\n }", "public void setBPJSRegistrationDate (Timestamp BPJSRegistrationDate);", "public void registerLastModifiedDateForFile(File file) {\n if (file != null) {\n // Note that if the file doesn't exist, it will be registered with a 0\n // lastModified time by virtue of the semantics of File.lastModified.\n _lastModifiedByFilePath.setObjectForKey(cacheValueForFile(file), cacheKeyForFile(file));\n }\n }", "public Date getFileDate()\r\n {\r\n return dFileDate;\r\n }", "public abstract void setFecha_inicio(java.lang.String newFecha_inicio);", "public void setFechaInclusion(Date fechaInclusion)\r\n/* 155: */ {\r\n/* 156:174 */ this.fechaInclusion = fechaInclusion;\r\n/* 157: */ }", "private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}", "void setCreateDate(Date date);", "public void setLastTableRowEdit(java.util.Date value);", "public void setUpdateDatetime(Date updateDatetime);", "public HTMLElement getElementFechaInsercionEd() { return this.$element_FechaInsercionEd; }", "public void setStatementDate (Timestamp StatementDate);", "void setCreationDate(Date val)\n throws RemoteException;", "public boolean insertDateToDB() {\n return false;\n }", "@PrePersist\n\tprivate void setDateCreation() {\n\t\tthis.dateCreation = ZonedDateTime.now();\n\n\t}", "public Date getRegisterDatime() {\r\n return registerDatime;\r\n }", "public Date getRegisterDatime() {\r\n return registerDatime;\r\n }", "public HTMLInputElement getElementFechaInsercion() { return this.$element_FechaInsercion; }", "public HTMLInputElement getElementFechaInsercion() { return this.$element_FechaInsercion; }", "public void setSupEntRegdate(Date supEntRegdate) {\n this.supEntRegdate = supEntRegdate;\n }", "public void setMapLastUpdateDt(String mapLastUpdateDt) {\n\t\tthis.mapLastUpdateDt = mapLastUpdateDt;\n\t}", "@Override\n\tpublic void createFile(FileModel file) {\n\t\tString sql = \"INSERT INTO file VALUES (?,?,?,?,?,?,now(),now())\";\n\t\t\n\t\tthis.getJdbcTemplate().update(sql, new Object[] { \n\t\t\t\tfile.getFile_id(),\n\t\t\t\tfile.getFile_path(),\n\t\t\t\tfile.getFile_name(),\n\t\t\t\tfile.getFile_type(),\n\t\t\t\tfile.getFile_size(),\n\t\t\t\tfile.getCretd_usr()\n\t\t});\n\t}", "public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }", "public void setPatDt(java.lang.String patDt) {\n this.patDt = patDt;\n }", "public Date getSupEntRegdate() {\n return supEntRegdate;\n }", "public void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);", "@PreUpdate\r\n void updatedAt() {\r\n setDateRecordUpdated();\r\n }", "void setLastAccessDate();", "public java.sql.Timestamp getRegdate()\n {\n return regdate; \n }", "public void setInsertDate(Date insertDate) {\r\n\t\tthis.insertDate = insertDate;\r\n\t}", "public void setRegdate(long newVal) {\n setRegdate(new java.sql.Timestamp(newVal));\n }", "private void procurarData() {\n if (jDateIni.getDate() != null && jDateFim.getDate() != null) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String data = sdf.format(jDateIni.getDate());\n String data2 = sdf.format(jDateFim.getDate());\n carregaTable(id, data, data2);\n JBreg.setEnabled(false);\n }\n }", "public void setDateDoc (Timestamp DateDoc);", "public void setDateDoc (Timestamp DateDoc);", "public void setDateDoc (Timestamp DateDoc);", "@PrePersist\n protected void onPersist() {\n this.data = LocalDate.now();\n }", "public int getDtRegistro() {\n return dtRegistro;\n }", "public static void FormReadyForExport() throws ClassNotFoundException, SQLException {\r\n Statement s = DBConnect.connection.createStatement();\r\n String getCreatedDate = \"SELECT Date_Created As dateCreated FROM existing_forms WHERE Date_Created IS NOT NULL AND Form_Name = '\"+ InvAdj_Admin.frmNm + \"'\";\r\n s.execute(getCreatedDate); \r\n try (ResultSet rs3 = s.getResultSet()) {\r\n while (rs3.next()) {\r\n dateCreated = rs3.getString(\"dateCreated\");\r\n }\r\n } \r\n \r\n String updateExisting = \"UPDATE existing_forms \"\r\n + \"SET Status = 'Ready_for_Export', Last_Updated = '\" + GtDates.tdate + \"'\"\r\n + \"WHERE Form_Name = '\" + InvAdj_Admin.frmNm + \"'\";\r\n \r\n String insTable = \"INSERT INTO completed_forms\"\r\n + \"(Store, Form_Name, Date_Created, Last_Updated, Status) \"\r\n + \"VALUES(\"\r\n + \"'\" + InvAdj_Admin.frmNm.split(\"_\")[1] + \"'\" + \",\"\r\n + \"'\" + InvAdj_Admin.frmNm + \"'\" + \",\"\r\n // + \"'\" + InvAdj_Admin.frmDate + \"'\" + \",\"\r\n + \"'\" + dateCreated + \"'\" + \",\"\r\n + \"'\" + GtDates.tdate + \"'\" + \",\"\r\n + \"'\" + \"Ready_for_Export\" + \"'\"\r\n + \")\";\r\n \r\n \r\n s.execute(updateExisting); \r\n s.execute(insTable);\r\n \r\n }", "public void setModifiTime(Date modifiTime) {\n this.modifiTime = modifiTime;\n }", "private void addGeneratedTimestamp() {\n\t\tif (getConfig().skipGeneratedTimestamps()) {\n\t\t\treturn;\n\t\t}\n\t\tString value = Processor.class.getName();\n\t\tString date = new SimpleDateFormat(\"dd MMM yyyy hh:mm\").format(new Date());\n\t\tthis.pathBindingClass.addImports(Generated.class);\n\t\tthis.pathBindingClass.addAnnotation(\"@Generated(value = \\\"\" + value + \"\\\", date = \\\"\" + date + \"\\\")\");\n\t\tthis.rootBindingClass.addImports(Generated.class);\n\t\tthis.rootBindingClass.addAnnotation(\"@Generated(value = \\\"\" + value + \"\\\", date = \\\"\" + date + \"\\\")\");\n\t}", "public void setCreationDate(Date creationDate);", "void setFetchedDate(long time);", "void setDate(Date data);", "public Date getRegisterDateTime() { return registerDateTime; }", "public abstract java.sql.Timestamp getFecha_fin();", "public HTMLInputElement getElementFechaModificacion() { return this.$element_FechaModificacion; }", "public HTMLInputElement getElementFechaModificacion() { return this.$element_FechaModificacion; }", "public void setColumn(String column, java.util.Date d)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n if (d == null)\n {\n setColumnNull(canonicalize(column));\n return;\n }\n \n \n data.put(canonicalize(column), d);\n }", "public void setMtime(DateTime mtime) {\r\n this.mtime = mtime;\r\n }", "@Override\n\tpublic Long updateStartDate() {\n\t\treturn null;\n\t}", "public void setDateStart_CouponsTab_Marketing() {\r\n\t\tthis.dateStart_CouponsTab_Marketing.clear();\r\n\t\tSimpleDateFormat formattedDate = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tString today1 = (String) (formattedDate.format(c.getTime()));\r\n\t\tthis.dateStart_CouponsTab_Marketing.sendKeys(today1);\r\n\t}", "public void setUpdatime(Date updatime) {\n this.updatime = updatime;\n }", "public void insert(ProjectFiles record) {\r\n getSqlMapClientTemplate().insert(\"project_files.ibatorgenerated_insert\", record);\r\n }", "public void setCreateDate(Date createDate);", "public void setCreateDate(Date createDate);", "public void setCreateDate(Date createDate);", "public DTM getSystemEntryDateTime() { \r\n\t\tDTM retVal = this.getTypedField(22, 0);\r\n\t\treturn retVal;\r\n }", "public Date getInsertDate() {\r\n\t\treturn insertDate;\r\n\t}", "@Override\n\tpublic Date getDbDate() {\n\t\treturn systemMapper.selectNow();\n\t}", "public Date getFileupdate() {\n return fileupdate;\n }", "public void setUpdateDt(Date updateDt) {\n this.updateDt = updateDt;\n }", "public void setUpdateDt(Date updateDt) {\n this.updateDt = updateDt;\n }", "public void setCreateDate(Date createDate)\r\n/* */ {\r\n/* 165 */ this.createDate = createDate;\r\n/* */ }", "public void setCreationDate(Date value)\n {\n setAttributeInternal(CREATIONDATE, value);\n }", "public void setLastSynchronisationMoment(String newLastSynchronisationDate) {\n\n try (Connection connection = database.connect();\n PreparedStatement stmt = connection.prepareStatement(SET_LAST_SYNCHRONISATION_DAT_SQL)) {\n stmt.setString(1, newLastSynchronisationDate);\n\n stmt.executeUpdate();\n } catch (SQLException e) {\n logger.logToDatabase(getClass().getName(), \"setLastSynchronisationMoment\", e);\n throw new InternalServerErrorException(String.format(\"Error occurred while updating the last synchronisation date: %s\", e.getMessage()));\n }\n\n }", "public static void AddDateTimeAttribute( DataSet DS, Date date )\n {\n if( date == null )\n date = new Date( System.currentTimeMillis( ));\n \n java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat();\n \n sdf.applyPattern( \"dd-MMM-yy\" );\n \n DS.setAttribute( new StringAttribute( Attribute.END_DATE , sdf\n .format( date ) ) );\n \n sdf.applyPattern( \"HH:mm:ss\" );\n \n DS.setAttribute( new StringAttribute( Attribute.END_TIME , sdf\n .format( date ) ) );\n }", "public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }", "void setUpdatedDate(Date updatedDate);", "public static void AddDateTimeAttribute( DataSet DS, long date)\n {\n if( date <= 0 )\n date = System.currentTimeMillis( );\n \n Util.AddDateTimeAttribute( DS, new Date( date ));\n }", "public void setInsertTime(Date insertTime) {\r\n this.insertTime = insertTime;\r\n }", "public void setSysDate()\r\n\t{\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\r\n txtPDate.setText(sdf.format(new java.util.Date()));\r\n\t}", "public final void updateModifyDateTime() {\n \tm_modifyDate = System.currentTimeMillis();\n \tm_accessDate = m_modifyDate;\n }", "public void setCreacion(Date creacion) {\r\n this.creacion = creacion;\r\n }", "@PrePersist\r\n void createdAt() {\r\n setDateRecordAdded();\r\n setDateRecordUpdated();\r\n }", "public void setFechaModificacion(String p) { this.fechaModificacion = p; }", "public void setFechaModificacion(String p) { this.fechaModificacion = p; }", "public void setMtime(Date mtime) {\n this.mtime = mtime;\n }", "public Date getModifiTime() {\n return modifiTime;\n }", "public void setDateCreated(Date dateCreated);", "public void setCreationDate(Date creationDate) {\n }", "public void setUpdatedAt(final Date value)\n\t{\n\t\tsetUpdatedAt( getSession().getSessionContext(), value );\n\t}", "public java.lang.String getPatDt() {\n return patDt;\n }", "public Date getFechaInclusion()\r\n/* 150: */ {\r\n/* 151:170 */ return this.fechaInclusion;\r\n/* 152: */ }", "public void setCreatTime(Date creatTime) {\n this.creatTime = creatTime;\n }" ]
[ "0.55643976", "0.5549245", "0.54154956", "0.5327553", "0.5312102", "0.5256455", "0.5241557", "0.5183512", "0.51776266", "0.5159197", "0.5159197", "0.5157202", "0.510044", "0.510044", "0.50867313", "0.5078921", "0.5071289", "0.5027402", "0.49528378", "0.4898043", "0.48573688", "0.4849751", "0.48483354", "0.48257437", "0.4809874", "0.48009205", "0.47928524", "0.47873658", "0.47866687", "0.4769788", "0.47580588", "0.47444287", "0.47444287", "0.47346082", "0.47346082", "0.4730221", "0.472989", "0.47202906", "0.4715783", "0.46960223", "0.4693473", "0.46886155", "0.467376", "0.4668425", "0.4663958", "0.46578327", "0.4651237", "0.46467456", "0.46409908", "0.46409908", "0.46409908", "0.4635489", "0.46241418", "0.4623366", "0.46219724", "0.46190256", "0.46185258", "0.46061736", "0.46047226", "0.4602982", "0.4598787", "0.45974296", "0.45974296", "0.45881525", "0.45877182", "0.45785934", "0.457303", "0.45703447", "0.4564244", "0.45627093", "0.45627093", "0.45627093", "0.45461658", "0.45366934", "0.45283407", "0.45260853", "0.45249775", "0.45249775", "0.45233518", "0.45203337", "0.45184082", "0.45145014", "0.45121402", "0.45035785", "0.44993454", "0.4498657", "0.44942313", "0.44931835", "0.44898406", "0.4487509", "0.4486773", "0.4486773", "0.44849342", "0.44832572", "0.44825003", "0.4479337", "0.447563", "0.44752806", "0.44738007", "0.4471053" ]
0.6208117
0
This method was generated by MyBatis Generator. This method returns the value of the database column public.file.update_dt
public Date getUpdateDt() { return updateDt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getFileupdate() {\n return fileupdate;\n }", "public Date getUpdateDatetime();", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "@JsonIgnore\n @DynamoDBAttribute(attributeName=\"updatedAt\")\n public Long getUpdatedAtDD() {\n return getUpdatedAt() == null ? null : getUpdatedAt().getTime();\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "Date getDateUpdated();", "public Date getUpdatedDt() {\n\t\treturn updatedDt;\n\t}", "Date getUpdatedDate();", "public Timestamp getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}", "public DateTime getUpdatedTimestamp() {\n\t\treturn getDateTime(\"sys_updated_on\");\n\t}", "public Date getDATE_UPDATED() {\r\n return DATE_UPDATED;\r\n }", "public Date getDATE_UPDATED() {\r\n return DATE_UPDATED;\r\n }", "public java.sql.Timestamp getLastModified() {\r\n\t\treturn new java.sql.Timestamp(file.lastModified());\r\n\t}", "public Timestamp getUpdateddate() {\n return (Timestamp)getAttributeInternal(UPDATEDDATE);\n }", "public String getUpdYmd() {\n return updYmd;\n }", "public String getUpdateDate() {\r\n return updateDate;\r\n }", "public long getDateRecordLastUpdated(){\n return dateRecordLastUpdated;\n }", "public java.util.Date getUpdated()\r\n {\r\n return getSemanticObject().getDateProperty(swb_updated);\r\n }", "public java.util.Date getUpdated()\r\n {\r\n return getSemanticObject().getDateProperty(swb_updated);\r\n }", "public java.util.Date getUpdated()\r\n {\r\n return getSemanticObject().getDateProperty(swb_updated);\r\n }", "public Date getUpdatedOn();", "public Date getUpdated() {\r\n return updated;\r\n }", "public Date getUpdated() {\r\n return updated;\r\n }", "public Date getLastUpdateDt() {\n\t\treturn this.lastUpdateDt;\n\t}", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "@Basic( optional = false )\r\n\t@Column( name = \"updated_date\", nullable = false )\r\n\tpublic Date getUpdatedDate() {\r\n\t\treturn this.updatedDate;\r\n\t\t\r\n\t}", "public OffsetDateTime updatedDateTime() {\n return this.innerProperties() == null ? null : this.innerProperties().updatedDateTime();\n }", "public Long getUpdatedAt() {\n return updatedAt;\n }", "public Long getUpdateAt() {\n return updateAt;\n }", "public Date getUpdateDate() {\r\n return updateDate;\r\n }", "public Date getUpdated() {\n return updated;\n }", "public Date getUpdated() {\n return updated;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateTimeDb() {\r\n\t\treturn updateTimeDb;\r\n\t}", "public Date getUpdatedate() {\r\n return updatedate;\r\n }", "public Date getUpdated() {\n return updated;\n }", "public Date getUpdated() {\n return updated;\n }", "public Date getDateUpdated() {\n\t\treturn parseDate(getProperty(DATE_UPDATED_PROPERTY));\n\t}", "public Date getUpdatedAt() {\n return (Date)getAttributeInternal(UPDATEDAT);\n }", "public Date getUpdatedAt() {\n return (Date)getAttributeInternal(UPDATEDAT);\n }", "@Schema(description = \"The datetime on which the worklog was last updated.\")\n public OffsetDateTime getUpdated() {\n return updated;\n }", "@Schema(example = \"1592180992\", required = true, description = \"Time when labeling information was last changed (timestamp)\")\n public Long getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdated() {\r\n\t\treturn updated;\r\n\t}", "public Date getUpdatedAt() {\r\n return updatedAt;\r\n }", "public Date getUpdatedAt() {\r\n return updatedAt;\r\n }", "public Date getUpdatedAt() {\r\n return updatedAt;\r\n }", "public Date getUpdateDate() {\n\t\treturn updateDate;\n\t}", "public Date getUpdateDate() {\n\t\treturn updateDate;\n\t}", "Date getForLastUpdate();", "public Date getUpdatedate() {\n return updatedate;\n }", "public Date getUpdatedate() {\n return updatedate;\n }", "public Date getUpdatedAt() {\r\n\t\treturn updatedAt;\r\n\t}", "public Date getUpdatedAt() {\n\t\treturn updatedAt;\n\t}", "public Date getUpdateTimestamp() {\n return updateTimestamp;\n }", "public Date getUpdateTimestamp() {\r\n return updateTimestamp;\r\n }", "public Date getUpdatedDate() {\n return (Date) getAttributeInternal(UPDATEDDATE);\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Date getUpdatedAt() {\n return updatedAt;\n }", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Date getUpdatedDate() {\n return updatedDate;\n }", "public Date getUpdated() {\n return mUpdated;\n }", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}", "@ApiModelProperty(value = \"修改时间\")\n public Date getRowUpdateTime() {\n return rowUpdateTime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public DateTime updatedAt() {\n return this.updatedAt;\n }", "public java.lang.Long getTsUpdate() {\n return ts_update;\n }", "public void setFileupdate(Date fileupdate) {\n this.fileupdate = fileupdate;\n }", "public DateTime getUpdatedDateTime() {\n return updatedDateTime;\n }" ]
[ "0.7021968", "0.6709959", "0.6699826", "0.66170084", "0.66086966", "0.66086966", "0.66077185", "0.65447384", "0.65353817", "0.64641833", "0.6460455", "0.64320797", "0.6424721", "0.6424721", "0.636453", "0.632992", "0.62707853", "0.6270079", "0.6224299", "0.62072194", "0.62072194", "0.62072194", "0.61999434", "0.61822397", "0.61822397", "0.6182021", "0.61816555", "0.61816555", "0.6177138", "0.6175436", "0.61649346", "0.6154938", "0.61512715", "0.61450386", "0.61450386", "0.61425215", "0.61425215", "0.61425215", "0.61425215", "0.61425215", "0.61425215", "0.61425215", "0.61425215", "0.61425215", "0.61425215", "0.6140557", "0.613733", "0.6136557", "0.6136557", "0.6134374", "0.61316013", "0.61316013", "0.6122244", "0.6110342", "0.6099715", "0.60940844", "0.60940844", "0.60940844", "0.60850924", "0.60850924", "0.6084471", "0.6078285", "0.6078285", "0.60781443", "0.60745317", "0.60624564", "0.60546106", "0.60508454", "0.60477614", "0.60477614", "0.60477614", "0.60477614", "0.60477614", "0.60477614", "0.60477614", "0.604672", "0.604672", "0.604672", "0.604672", "0.604672", "0.604672", "0.604672", "0.604672", "0.604672", "0.604672", "0.604672", "0.604672", "0.604672", "0.6036908", "0.60254455", "0.6006692", "0.59941834", "0.59922665", "0.5992241", "0.5992241", "0.59874535", "0.5972316", "0.59657323", "0.59471506" ]
0.6829909
2
This method was generated by MyBatis Generator. This method sets the value of the database column public.file.update_dt
public void setUpdateDt(Date updateDt) { this.updateDt = updateDt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFileupdate(Date fileupdate) {\n this.fileupdate = fileupdate;\n }", "public void setUpdateDatetime(Date updateDatetime);", "void setUpdatedDate(Date updatedDate);", "public void setUpdatedDt(Date updatedDt) {\n\t\tthis.updatedDt = updatedDt;\n\t}", "public void setUpdatedOn(Date updatedOn);", "public Date getFileupdate() {\n return fileupdate;\n }", "@NoProxy\n public void updateDtstamp() {\n setDtstamp(new DtStamp(new DateTime(true)).getValue());\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 }", "@PreUpdate\r\n void updatedAt() {\r\n setDateRecordUpdated();\r\n }", "public Date getUpdateDt() {\n return updateDt;\n }", "public Date getUpdateDt() {\n return updateDt;\n }", "void setDateUpdated(final Date dateUpdated);", "public void setUpdated(Date updated) {\r\n this.updated = updated;\r\n }", "public void setUpdated(Date updated) {\r\n this.updated = updated;\r\n }", "public void setUpdated(Date updated) {\n this.updated = updated;\n }", "public void setUpdated(Date updated) {\n this.updated = updated;\n }", "public void setUpdatedate(Date updatedate) {\r\n this.updatedate = updatedate;\r\n }", "Date getDateUpdated();", "public void setUpdateDatetime(Date updateDatetime) {\r\n\t\tthis.updateDatetime = updateDatetime;\r\n\t}", "public void setDATE_UPDATED(Date DATE_UPDATED) {\r\n this.DATE_UPDATED = DATE_UPDATED;\r\n }", "public void setDATE_UPDATED(Date DATE_UPDATED) {\r\n this.DATE_UPDATED = DATE_UPDATED;\r\n }", "public Date getUpdateDatetime();", "public void setUpdateAt( Date updateAt ) {\n this.updateAt = updateAt;\n }", "public void setUpdatedDate(Date date) {\n\t\tthis.updatedDate=date;\r\n\t}", "public void setUpdateDatetime(Long updateDatetime) {\n this.updateDatetime = updateDatetime;\n }", "public void setUpdateDate(Date updateDate) {\r\n this.updateDate = updateDate;\r\n }", "public void setUpdateDate(Timestamp updateDate) {\n this.updateDate = updateDate;\n }", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public void setUpdateDate( Date updateDate ) {\n this.updateDate = updateDate;\n }", "public void setUpdateDate( Date updateDate ) {\n this.updateDate = updateDate;\n }", "public void setUpdated(Date updated) {\r\n\t\tthis.updated = updated;\r\n\t}", "public void setUpdatedAt(Date value) {\n setAttributeInternal(UPDATEDAT, value);\n }", "public void setUpdatedAt(Date value) {\n setAttributeInternal(UPDATEDAT, value);\n }", "public void setUpdatedate(Date updatedate) {\n this.updatedate = updatedate;\n }", "public void setUpdatedate(Date updatedate) {\n this.updatedate = updatedate;\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public void setUpdateDate(Date updateDate) {\n this.updateDate = updateDate;\n }", "public void setUpdateDate(Date updateDate) {\n this.updateDate = updateDate;\n }", "public void setUpdateDate(Date updateDate) {\n this.updateDate = updateDate;\n }", "public void setUpdateDate(Date updateDate) {\n this.updateDate = updateDate;\n }", "public void setUpdateDate(Date updateDate) {\n this.updateDate = updateDate;\n }", "public void setUpdateDate(Date updateDate) {\n this.updateDate = updateDate;\n }", "public void setUpdateDate(Date updateDate) {\n this.updateDate = updateDate;\n }", "public void setUpdateDate(Date updateDate) {\n this.updateDate = updateDate;\n }", "public void setUpdateDate(Date updateDate) {\n this.updateDate = updateDate;\n }", "public Date getUpdatedDt() {\n\t\treturn updatedDt;\n\t}", "private void setUpdateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value);\n }", "public void setFileDate(Date fileDate)\r\n {\r\n dFileDate = fileDate;\r\n }", "public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}", "public void setUpdated(java.util.Date value)\r\n {\r\n getSemanticObject().setDateProperty(swb_updated, value);\r\n }", "public void setUpdated(java.util.Date value)\r\n {\r\n getSemanticObject().setDateProperty(swb_updated, value);\r\n }", "public void setUpdated(java.util.Date value)\r\n {\r\n getSemanticObject().setDateProperty(swb_updated, value);\r\n }", "Date getUpdatedDate();", "public void setUpdatedon( Date updatedon )\n {\n this.updatedon = updatedon;\n }", "public void setUpdatedDate(Date value) {\n setAttributeInternal(UPDATEDDATE, value);\n }", "public final void updateModifyDateTime() {\n \tm_modifyDate = System.currentTimeMillis();\n \tm_accessDate = m_modifyDate;\n }", "public void setUpdateDate(String updateDate) {\r\n this.updateDate = updateDate;\r\n }", "public Date getDATE_UPDATED() {\r\n return DATE_UPDATED;\r\n }", "public Date getDATE_UPDATED() {\r\n return DATE_UPDATED;\r\n }", "public Timestamp getUpdateDate() {\n return updateDate;\n }", "public void setUpdYmd(String updYmd) {\n this.updYmd = updYmd;\n }", "public void setUpdatedDateTime(DateTime updatedDateTime) {\n this.updatedDateTime = updatedDateTime;\n }", "public void setUpdatedAt(Date updatedAt) {\r\n\t\tthis.updatedAt = updatedAt;\r\n\t}", "public void setUpdatedAt(Date updatedAt) {\r\n this.updatedAt = updatedAt;\r\n }", "public void setUpdatedAt(Date updatedAt) {\r\n this.updatedAt = updatedAt;\r\n }", "public void setUpdatedAt(Date updatedAt) {\r\n this.updatedAt = updatedAt;\r\n }", "public void setUpdatedAt( Date updatedAt ) {\n this.updatedAt = updatedAt;\n }", "public void updateDateModified() {\n dateModified = DateTime.now();\n }", "public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }", "public Date getUpdateDate() {\r\n return updateDate;\r\n }", "@Basic( optional = false )\r\n\t@Column( name = \"updated_date\", nullable = false )\r\n\tpublic Date getUpdatedDate() {\r\n\t\treturn this.updatedDate;\r\n\t\t\r\n\t}", "public abstract void setFecha_fin(java.sql.Timestamp newFecha_fin);", "public void setUpdateTimeDb(Date updateTimeDb) {\r\n\t\tthis.updateTimeDb = updateTimeDb;\r\n\t}", "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 Date getUpdatedAt() {\r\n return updatedAt;\r\n }", "public Date getUpdatedAt() {\r\n return updatedAt;\r\n }", "public Date getUpdatedAt() {\r\n return updatedAt;\r\n }", "public void setUpdatedAt(Date updatedAt) {\n\t\tthis.updatedAt = updatedAt;\n\t}", "@JsonIgnore\n @DynamoDBAttribute(attributeName=\"updatedAt\")\n public Long getUpdatedAtDD() {\n return getUpdatedAt() == null ? null : getUpdatedAt().getTime();\n }", "public Date getUpdatedAt() {\r\n\t\treturn updatedAt;\r\n\t}", "void setLastUpdatedTime();", "@JsonIgnore\n @DynamoDBAttribute(attributeName=\"updatedAt\")\n public void setUpdatedAtDD(Long value) {\n setUpdatedAt(new Date(value));\n }", "public void setUpdateTimestamp(Date updateTimestamp) {\r\n this.updateTimestamp = updateTimestamp;\r\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public Date getUpdateDate() {\n return updateDate;\n }", "public void setUpdateDate(Date updateDate) {\n\t\tthis.updateDate = updateDate;\n\t}", "public void setUpdatedAt(final Date value)\n\t{\n\t\tsetUpdatedAt( getSession().getSessionContext(), value );\n\t}", "@PreUpdate\n private void beforeUpdate() {\n updatedDate = new Date();\n }" ]
[ "0.7104507", "0.63442624", "0.62560016", "0.623093", "0.6172936", "0.61280346", "0.6126889", "0.61218065", "0.61218065", "0.611929", "0.61044437", "0.61044437", "0.60776055", "0.59593236", "0.59593236", "0.5836795", "0.5836795", "0.5822167", "0.58069867", "0.5799753", "0.57992727", "0.57992727", "0.5798467", "0.5796538", "0.5793779", "0.57857764", "0.5781354", "0.577076", "0.57569385", "0.5747794", "0.5747794", "0.57313406", "0.5714069", "0.5714069", "0.5712391", "0.5712391", "0.5705569", "0.5705569", "0.5701366", "0.5701366", "0.5701366", "0.5701366", "0.5701366", "0.5701366", "0.5701366", "0.5701366", "0.5701366", "0.56973374", "0.56719327", "0.56684524", "0.56542367", "0.563956", "0.563956", "0.563956", "0.5631781", "0.56260246", "0.56136084", "0.5612589", "0.56026256", "0.5585157", "0.5585157", "0.5578003", "0.5561407", "0.5545491", "0.5541357", "0.55367833", "0.55367833", "0.55367833", "0.55339086", "0.55324775", "0.5530085", "0.55289674", "0.5523111", "0.551881", "0.5518327", "0.5510914", "0.5510914", "0.5506308", "0.5506308", "0.5506308", "0.5502206", "0.5497173", "0.54962814", "0.54897803", "0.54893434", "0.54780376", "0.5473041", "0.5473041", "0.5473041", "0.5473041", "0.5473041", "0.5473041", "0.5473041", "0.5473041", "0.5473041", "0.5473041", "0.5470276", "0.5465285", "0.5455188" ]
0.6495357
2
must be overridden if there is a analytical Model part attached with the metamodel
protected void calibrateMetaModel(final int currentParamNo) { Calcfc optimization=new Calcfc() { @Override public double compute(int m, int n, double[] x, double[] constrains) { double objective=0; MetaModelParams=x; for(int i:params.keySet()) { objective+=Math.pow(calcMetaModel(0, params.get(i))-simData.get(i),2)*calcEuclDistanceBasedWeight(params, i,currentParamNo); } return objective; } }; double[] x=new double[this.noOfMetaModelParams]; for(int i=0;i<this.noOfMetaModelParams;i++) { x[i]=0; } CobylaExitStatus result = Cobyla.findMinimum(optimization, this.noOfMetaModelParams, 0, x,0.5,Math.pow(10, -6) ,3, 1500); this.MetaModelParams=x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Metamodel getMetamodel() {\n\t\treturn null;\n\t}", "public ViewMetamodel getMetamodel();", "ArtefactModel getArtefactModel();", "public boolean hasModel() {\n return false;\r\n }", "@objid (\"bf65cf74-59fe-43b9-b422-4dece2593e95\")\npublic interface ISmMetamodelFragment extends MMetamodelFragment {\n /**\n * Create all the model checker classes.\n * @param metamodel the metamodel\n * @return the live model checkers.\n */\n @objid (\"5bf23d8e-6afe-478b-ae81-6989245a8387\")\n Collection<SmDependencyTypeChecker> createDependencyCheckers(SmMetamodel metamodel);\n\n /**\n * <p>\n * Instantiate and initialize the metamodel expert.\n * </p>\n * @param mm the metamodel.\n */\n @objid (\"fbd51d94-815e-4e48-b896-6fe4c2eb26de\")\n MExpert createMExpert(SmMetamodel mm);\n\n /**\n * Create the metaclasses.\n * @return the metaclasses.\n */\n @objid (\"8610b15d-2b92-41c6-9e01-228404be8a59\")\n Collection<SmClass> createMetaclasses();\n\n /**\n * Get the model shield checkers factory.\n * @param metamodel the metamodel\n * @return the model shield checkers factory.\n */\n @objid (\"ee775503-e151-4bb7-9921-40692858641e\")\n ICheckerFactory getModelShieldCheckers();\n\n /**\n * Tells whether this metamodel fragment is an extension or a standard Modelio metamodel fragment.\n * <p>\n * Standard Modelio metamodel fragments are guaranteed to have no metaclass name collisions.\n * @return <i>true</i> if the fragment is an extension, <i>false</i> if it is a Modelio standard fragment.\n */\n @objid (\"e20e1709-9e0b-4c6a-bf6c-3f3e7b57cdfe\")\n @Override\n boolean isExtension();\n\n}", "public abstract void modelStructureChanged();", "public abstract M getModel();", "@Override\n\tpublic boolean model() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void setModel() {\n\t}", "@SideOnly(Side.CLIENT)\n public static void initModels() {\n }", "public T caseMetamodel(Metamodel object) {\n\t\treturn null;\n\t}", "public void buildModel(){\r\n\t\t\r\n\t\tsuper.buildModel();\r\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void modelStructureChanged() {\n\n\t\t\t\t}", "LabInner innerModel();", "@Override\n \t\t\t\tpublic void doModelPerspective() {\n \n \t\t\t\t}", "RealizationModelLocation createRealizationModelLocation();", "protected void establishTransformationModel() {\r\n\t \r\n\t\tTransformationModel transformModel ;\r\n\t\tArrayList<TransformationStack> modelTransformStacks ;\r\n\t\t\r\n\t\t\r\n\t\t// the variables needed for the profile\r\n\t\t// targetStruc = getTargetVector();\r\n\t\tsomData = soappTransformer.getSomData() ; \r\n\t\t// soappTransformer.setSomData( somApplication.getSomData() );\r\n\t\tsomApplication.setSomData(somData) ;\r\n\t\t\r\n\t\tsomData.getVariablesLabels() ;\r\n\t\t \r\n\t\t\r\n\t\t// from here we transfer...\r\n\t\tmodelTransformStacks = soappTransformer.getTransformationModel().getVariableTransformations();\r\n\t\ttransformModel = soappTransformer.getTransformationModel() ;\r\n\t\t \r\n\t\t\r\n\t\ttransformationModelImported = true;\r\n\t}", "private void initializeModel() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public EngineMetaInterface getActiveMeta() {\n return null;\n }", "opmodelFactory getopmodelFactory();", "private void preProcessDataModel() {\r\n collectAllAttribtueDefinitions();\r\n\r\n for (AttributeDefinition attribute : dataModel.getAttributeDefinitions()) {\r\n attribute.setAttributeType(UINameToValueMap.get(attribute.getAttributeType()));\r\n }\r\n\r\n if (null != dataModel.getLocalSecondaryIndexes()) {\r\n for (LocalSecondaryIndex index : dataModel.getLocalSecondaryIndexes()) {\r\n index.getProjection().setProjectionType(UINameToValueMap.get(index.getProjection().getProjectionType()));\r\n }\r\n }\r\n\r\n if (null != dataModel.getGlobalSecondaryIndexes()) {\r\n for (GlobalSecondaryIndex index : dataModel.getGlobalSecondaryIndexes()) {\r\n index.getProjection().setProjectionType(UINameToValueMap.get(index.getProjection().getProjectionType()));\r\n }\r\n }\r\n }", "boolean hasModel();", "boolean hasModel();", "protected abstract void setClueModels();", "private void setupModel() {\n\n //Chooses which model gets prepared\n switch (id) {\n case 2:\n singlePackage = new Node();\n activeNode = singlePackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_solo)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 3:\n multiPackage = new Node();\n activeNode = multiPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_multi_new)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 4:\n wagonPackage = new Node();\n activeNode = wagonPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_car_new)\n .build().thenAccept(a -> activeRenderable = a)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n default:\n mailbox = new Node();\n activeNode = mailbox;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.mailbox)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n }\n }", "@Override \r\n public boolean needsEmfService() { return false; }", "public void buildModel() {\n }", "public void designBasement() {\n\t\t\r\n\t}", "protected EObject createInitialModel() {\r\n \t\tReqIF root = reqif10Factory.createReqIF();\r\n \r\n \t\tReqIFHeader header = reqif10Factory.createReqIFHeader();\r\n \t\troot.setTheHeader(header);\r\n \r\n \t\t// Setting the time gets more and more complicated...\r\n \t\ttry {\r\n \t\t\tGregorianCalendar cal = new GregorianCalendar();\r\n \t\t\tcal.setTime(new Date());\r\n \t\t\theader.setCreationTime(DatatypeFactory.newInstance()\r\n \t\t\t\t\t.newXMLGregorianCalendar(cal));\r\n \t\t} catch (DatatypeConfigurationException e) {\r\n \t\t\tthrow new RuntimeException(e);\r\n \t\t}\r\n \r\n \t\theader.setSourceToolId(\"ProR (http://pror.org)\");\r\n //\t\theader.setAuthor(System.getProperty(\"user.name\"));\r\n \r\n \t\tReqIFContent content = reqif10Factory.createReqIFContent();\r\n \t\troot.setCoreContent(content);\r\n \r\n \t\t// Add a DatatypeDefinition\r\n \t\tDatatypeDefinitionString ddString = reqif10Factory\r\n \t\t\t\t.createDatatypeDefinitionString();\r\n \t\tddString.setLongName(\"T_String32k\");\r\n \t\tddString.setMaxLength(new BigInteger(\"32000\"));\r\n \t\tcontent.getDatatypes().add(ddString);\r\n \r\n \t\t// Add a Specification\r\n \t\tSpecification spec = reqif10Factory.createSpecification();\r\n \t\tspec.setLongName(\"Specification Document\");\r\n \t\tcontent.getSpecifications().add(spec);\r\n \r\n \t\t// Add a SpecType\r\n \t\tSpecObjectType specType = reqif10Factory.createSpecObjectType();\r\n \t\tspecType.setLongName(\"Requirement Type\");\r\n \t\tcontent.getSpecTypes().add(specType);\r\n \r\n \t\t// Add an AttributeDefinition\r\n \t\tAttributeDefinitionString ad = reqif10Factory\r\n \t\t\t\t.createAttributeDefinitionString();\r\n \t\tad.setType(ddString);\r\n \t\tad.setLongName(\"Description\");\r\n \t\tspecType.getSpecAttributes().add(ad);\r\n \r\n \t\t// Configure the Specification View\r\n \t\tProrToolExtension extension = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createProrToolExtension();\r\n \t\troot.getToolExtensions().add(extension);\r\n \t\tProrSpecViewConfiguration prorSpecViewConfiguration = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createProrSpecViewConfiguration();\r\n \t\textension.getSpecViewConfigurations().add(prorSpecViewConfiguration);\r\n \t\tprorSpecViewConfiguration.setSpecification(spec);\r\n \t\tColumn col = ConfigurationFactory.eINSTANCE.createColumn();\r\n \t\tcol.setLabel(\"Description\");\r\n \t\tcol.setWidth(400);\r\n \t\tprorSpecViewConfiguration.getColumns().add(col);\r\n \r\n \t\tColumn leftHeaderColumn = ConfigFactory.eINSTANCE.createColumn();\r\n \t\tleftHeaderColumn\r\n \t\t\t\t.setWidth(ConfigurationUtil.DEFAULT_LEFT_HEADER_COLUMN_WIDTH);\r\n \t\tleftHeaderColumn\r\n \t\t\t\t.setLabel(ConfigurationUtil.DEFAULT_LEFT_HEADER_COLUMN_NAME);\r\n \t\tprorSpecViewConfiguration.setLeftHeaderColumn(leftHeaderColumn);\r\n \r\n \t\t// Configure the Label configuration\r\n \t\tProrGeneralConfiguration generalConfig = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createProrGeneralConfiguration();\r\n \t\tLabelConfiguration labelConfig = ConfigurationFactory.eINSTANCE\r\n \t\t\t\t.createLabelConfiguration();\r\n \t\tlabelConfig.getDefaultLabel().add(\"Description\");\r\n \t\tgeneralConfig.setLabelConfiguration(labelConfig);\r\n \t\textension.setGeneralConfiguration(generalConfig);\r\n \r\n \t\t// Create one Requirement\r\n \t\tSpecObject specObject = reqif10Factory.createSpecObject();\r\n \t\tspecObject.setType(specType);\r\n \t\tcontent.getSpecObjects().add(specObject);\r\n \t\tAttributeValueString value = reqif10Factory.createAttributeValueString();\r\n \t\tvalue.setTheValue(\"Start editing here.\");\r\n \t\tvalue.setDefinition(ad);\r\n \t\tspecObject.getValues().add(value);\r\n \r\n \t\t// Add the requirement to the Specification\r\n \t\tSpecHierarchy specHierarchy = reqif10Factory.createSpecHierarchy();\r\n \t\tspec.getChildren().add(specHierarchy);\r\n \t\tspecHierarchy.setObject(specObject);\t\r\n \t\treturn root;\r\n \t}", "A getModel();", "public interface PartOfRelation\r\n{\r\n\r\n\t/**\r\n\t * Sets author\r\n\t * \r\n\t * @param author\r\n\t */\r\n\tvoid setAuthor(String author);\r\n\r\n\r\n\t/**\r\n\t * @return Author\r\n\t */\r\n\tString getAuthor();\r\n\r\n\t/**\r\n\t * Sets class type, one typical value is '300'\r\n\t * \r\n\t * @param classType\r\n\t */\r\n\tvoid setClassType(String classType);\r\n\r\n\t/**\r\n\t * @return class type\r\n\t */\r\n\tString getClassType();\r\n\r\n\t/**\r\n\t * Sets object key, for material items this is the product ID.\r\n\t * \r\n\t * @param objectKey\r\n\t */\r\n\tvoid setObjectKey(String objectKey);\r\n\r\n\t/**\r\n\t * @return Object key.\r\n\t */\r\n\tString getObjectKey();\r\n\r\n\t/**\r\n\t * Sets object type, product or an abstract product representative\r\n\t * \r\n\t * @param objectType\r\n\t */\r\n\tvoid setObjectType(String objectType);\r\n\r\n\t/**\r\n\t * @return Object type\r\n\t */\r\n\tString getObjectType();\r\n\r\n\t/**\r\n\t * Sets position in the BOM\r\n\t * \r\n\t * @param posNr\r\n\t */\r\n\tvoid setPosNr(String posNr);\r\n\r\n\t/**\r\n\t * @return Position number\r\n\t */\r\n\tString getPosNr();\r\n\r\n\t/**\r\n\t * Sets parent instance ID\r\n\t * \r\n\t * @param parentInstId\r\n\t */\r\n\tvoid setParentInstId(String parentInstId);\r\n\r\n\t/**\r\n\t * @return Parent instance ID\r\n\t */\r\n\tString getParentInstId();\r\n\r\n\t/**\r\n\t * Sets child instance ID\r\n\t * \r\n\t * @param instId\r\n\t */\r\n\tvoid setInstId(String instId);\r\n\r\n\t/**\r\n\t * @return Child instance ID\r\n\t */\r\n\tString getInstId();\r\n}", "@Override\n protected void initModel() {\n bannerModel = new BannerModel();\n// homeSousuoModel = new Home\n\n// bannerModel = new BannerModel();\n// homeSousuoModel = new HomeSousuoModel();\n// izxListModelBack = new\n }", "M getModel();", "public interface AttributePropertiesEditionPart {\n\n\n\n\t/**\n\t * Init the anotations\n\t * @param current the current value\n\t * @param containgFeature the feature where to navigate if necessary\n\t * @param feature the feature to manage\n\t */\n\tpublic void initAnotations(ReferencesTableSettings settings);\n\n\t/**\n\t * Update the anotations\n\t * @param newValue the anotations to update\n\t * \n\t */\n\tpublic void updateAnotations();\n\n\t/**\n\t * Adds the given filter to the anotations edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addFilterToAnotations(ViewerFilter filter);\n\n\t/**\n\t * Adds the given filter to the anotations edition editor.\n\t * \n\t * @param filter\n\t * a viewer filter\n\t * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)\n\t * \n\t */\n\tpublic void addBusinessFilterToAnotations(ViewerFilter filter);\n\n\t/**\n\t * @return true if the given element is contained inside the anotations table\n\t * \n\t */\n\tpublic boolean isContainedInAnotationsTable(EObject element);\n\n\n\t/**\n\t * @return the visibility\n\t * \n\t */\n\tpublic Enumerator getVisibility();\n\n\t/**\n\t * Init the visibility\n\t * @param input the viewer input\n\t * @param current the current value\n\t */\n\tpublic void initVisibility(Object input, Enumerator current);\n\n\t/**\n\t * Defines a new visibility\n\t * @param newValue the new visibility to set\n\t * \n\t */\n\tpublic void setVisibility(Enumerator newValue);\n\n\n\n\n\n\t/**\n\t * Returns the internationalized title text.\n\t * \n\t * @return the internationalized title text.\n\t * \n\t */\n\tpublic String getTitle();\n\n\t// Start of user code for additional methods\n\t\n\t// End of user code\n\n}", "@Override\n\tpublic VirtualModel getNewVirtualModel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void load(ModelInfo info) {\n\t}", "public void induceModel(Graph graph, DataSplit split) {\r\n super.induceModel(graph, split);\r\n Node[] trainingSet = split.getTrainSet();\r\n if(trainingSet == null || trainingSet.length == 0)\r\n return;\r\n\r\n Attributes attribs = trainingSet[0].getAttributes();\r\n FastVector attInfo = new FastVector(tmpVector.length);\r\n logger.finer(\"Setting up WEKA attributes\");\r\n if(useIntrinsic)\r\n {\r\n for(Attribute attrib : attribs)\r\n {\r\n // do not include the KEY attribute\r\n if(attrib == attribs.getKey())\r\n continue;\r\n\r\n switch(attrib.getType())\r\n {\r\n case CATEGORICAL:\r\n String[] tokens = ((AttributeCategorical)attrib).getTokens();\r\n FastVector values = new FastVector(tokens.length);\r\n for(String token : tokens)\r\n values.addElement(token);\r\n attInfo.addElement(new weka.core.Attribute(attrib.getName(),values));\r\n logger.finer(\"Adding WEKA attribute \"+attrib.getName()+\":Categorical\");\r\n break;\r\n\r\n default:\r\n attInfo.addElement(new weka.core.Attribute(attrib.getName()));\r\n logger.finer(\"Adding WEKA attribute \"+attrib.getName()+\":Numerical\");\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n String[] tokens = attribute.getTokens();\r\n FastVector values = new FastVector(tokens.length);\r\n for(String token : tokens)\r\n values.addElement(token);\r\n attInfo.addElement(new weka.core.Attribute(attribute.getName(),values));\r\n logger.finer(\"Adding WEKA attribute \"+attribute.getName()+\":Categorical\");\r\n }\r\n\r\n for(Aggregator agg : aggregators)\r\n {\r\n Attribute attrib = agg.getAttribute();\r\n switch(agg.getType())\r\n {\r\n case CATEGORICAL:\r\n String[] tokens = ((AttributeCategorical)attrib).getTokens();\r\n FastVector values = new FastVector(tokens.length);\r\n for(String token : tokens)\r\n values.addElement(token);\r\n attInfo.addElement(new weka.core.Attribute(agg.getName(),values));\r\n logger.finer(\"Adding WEKA attribute \"+agg.getName()+\":Categorical\");\r\n break;\r\n\r\n default:\r\n attInfo.addElement(new weka.core.Attribute(agg.getName()));\r\n logger.finer(\"Adding WEKA attribute \"+agg.getName()+\":Numerical\");\r\n break;\r\n }\r\n }\r\n\r\n Instances train = new Instances(\"train\",attInfo,split.getTrainSetSize());\r\n train.setClassIndex(vectorClsIdx);\r\n\r\n for(Node node : split.getTrainSet())\r\n {\r\n double[] v = new double[attInfo.size()];\r\n makeVector(node,v);\r\n train.add(new Instance(1,v));\r\n }\r\n try\r\n {\r\n classifier.buildClassifier(train);\r\n }\r\n catch(Exception e)\r\n {\r\n throw new RuntimeException(\"Failed to build classifier \"+classifier.getClass().getName(),e);\r\n }\r\n testInstance = new Instance(1,tmpVector);\r\n testInstances = new Instances(\"test\",attInfo,1);\r\n testInstances.setClassIndex(vectorClsIdx);\r\n testInstances.add(testInstance);\r\n testInstance = testInstances.firstInstance();\r\n }", "public interface IModelGenerator\n{\n\tpublic static final String MAIN_MODEL = \"mainModel\";\n\tpublic static final String CURRENT_DATE = \"currentDate\";\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model entity\n\t */\n\tpublic void generate(Object entity) throws AAException;\n\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model entity\n\t * @param ormContext ORM context.\n\t */\n\tpublic void generate(Object entity, Context ormContext) throws AAException;\n}", "@Override\n\tprotected void setDataStructurePropertyOfAnnotation(DataStructure ds){\n\t\tif( ! ds.isImportedViaSubmodel()){\n\t\t\t\n\t\t\tif(ds.hasPhysicalProperty()){\n\t\t\t\tResource propres = getResourceForDataStructurePropertyAndAnnotate(rdf, ds);\n\n\t\t\t\tif(ds.hasAssociatedPhysicalComponent()){\n\t\t\t\t\tPhysicalModelComponent propof = ds.getAssociatedPhysicalModelComponent();\n\t\t\t\t\t\n\t\t\t\t\t// If the variable is a property of an entity\n\t\t\t\t\tif(propof instanceof PhysicalEntity){\n\t\t\t\t\t\tCompositePhysicalEntity cpe = (CompositePhysicalEntity)propof;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (cpe.getArrayListOfEntities().size()>1) {\n\t\t\t\t\t\t\t// Get the Resource corresponding to the index entity of the composite entity\n\t\t\t\t\t\t\tURI indexuri = setCompositePhysicalEntityMetadata(cpe);\n\t\t\t\t\t\t\tResource indexresource = rdf.getResource(indexuri.toString());\n\t\t\t\t\t\t\tStatement propofst = rdf.createStatement(\n\t\t\t\t\t\t\t\t\tpropres, \n\t\t\t\t\t\t\t\t\tSemSimRelation.PHYSICAL_PROPERTY_OF.getRDFproperty(), \n\t\t\t\t\t\t\t\t\tindexresource);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\taddStatement(propofst);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// else it's a singular physical entity\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tResource entity = getResourceForPMCandAnnotate(cpe.getArrayListOfEntities().get(0));\n\t\t\t\t\t\t\tStatement st = rdf.createStatement(\n\t\t\t\t\t\t\t\t\tpropres, \n\t\t\t\t\t\t\t\t\tSemSimRelation.PHYSICAL_PROPERTY_OF.getRDFproperty(), \n\t\t\t\t\t\t\t\t\tentity);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\taddStatement(st);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// If it's a property of a process\n\t\t\t\t\telse if(propof instanceof PhysicalProcess){\n\t\t\t\t\t\tPhysicalProcess process = (PhysicalProcess)ds.getAssociatedPhysicalModelComponent();\n\n\t\t\t\t\t\tResource processres = getResourceForPMCandAnnotate(ds.getAssociatedPhysicalModelComponent());\n\t\t\t\t\t\tStatement st = rdf.createStatement(\n\t\t\t\t\t\t\t\tpropres, \n\t\t\t\t\t\t\t\tSemSimRelation.PHYSICAL_PROPERTY_OF.getRDFproperty(), \n\t\t\t\t\t\t\t\tprocessres);\n\t\t\t\t\t\t\n\t\t\t\t\t\taddStatement(st);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the participants for the process have already been set, do not duplicate\n\t\t\t\t\t\t// statements (in CellML models mapped codewords may be annotated against the\n\t\t\t\t\t\t// same process, and because each process participant is created anew here, duplicate\n\t\t\t\t\t\t// participant statements would appear in CellML RDF block).\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(rdf.contains(processres, SemSimRelation.HAS_SOURCE_PARTICIPANT.getRDFproperty())\n\t\t\t\t\t\t\t\t|| rdf.contains(processres, SemSimRelation.HAS_SINK_PARTICIPANT.getRDFproperty())\n\t\t\t\t\t\t\t\t|| rdf.contains(processres, SemSimRelation.HAS_MEDIATOR_PARTICIPANT.getRDFproperty()))\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If we're here, the process hasn't been assigned its participants yet\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Set the sources\n\t\t\t\t\t\tfor(PhysicalEntity source : process.getSourcePhysicalEntities()){\n\t\t\t\t\t\t\tsetRDFstatementsForEntityParticipation(process, source, \n\t\t\t\t\t\t\t\t\tSemSimRelation.HAS_SOURCE_PARTICIPANT.getRDFproperty(), process.getSourceStoichiometry(source));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Set the sinks\n\t\t\t\t\t\tfor(PhysicalEntity sink : process.getSinkPhysicalEntities()){\n\t\t\t\t\t\t\tsetRDFstatementsForEntityParticipation(process, sink,\n\t\t\t\t\t\t\t\t\tSemSimRelation.HAS_SINK_PARTICIPANT.getRDFproperty(), process.getSinkStoichiometry(sink));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Set the mediators\n\t\t\t\t\t\tfor(PhysicalEntity mediator : process.getMediatorPhysicalEntities()){\n\t\t\t\t\t\t\tsetRDFstatementsForEntityParticipation(process, mediator,\n\t\t\t\t\t\t\t\t\tSemSimRelation.HAS_MEDIATOR_PARTICIPANT.getRDFproperty(), null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Otherwise we assume it's a property of a force\n\t\t\t\t\telse{\n\t\t\t\t\t\tPhysicalForce force = (PhysicalForce)ds.getAssociatedPhysicalModelComponent();\n\n\t\t\t\t\t\tResource forceres = getResourceForPMCandAnnotate(ds.getAssociatedPhysicalModelComponent());\n\t\t\t\t\t\tStatement st = rdf.createStatement(\n\t\t\t\t\t\t\t\tpropres, \n\t\t\t\t\t\t\t\tSemSimRelation.PHYSICAL_PROPERTY_OF.getRDFproperty(), \n\t\t\t\t\t\t\t\tforceres);\n\t\t\t\t\t\t\n\t\t\t\t\t\taddStatement(st);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the participants for the process have already been set, do not duplicate\n\t\t\t\t\t\t// statements (in CellML models mapped codewords may be annotated against the\n\t\t\t\t\t\t// same process, and because each process participant is created anew here, duplicate\n\t\t\t\t\t\t// participant statements would appear in CellML RDF block).\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(rdf.contains(forceres, SemSimRelation.HAS_SOURCE_PARTICIPANT.getRDFproperty())\n\t\t\t\t\t\t\t\t|| rdf.contains(forceres, SemSimRelation.HAS_SINK_PARTICIPANT.getRDFproperty())\n\t\t\t\t\t\t\t\t|| rdf.contains(forceres, SemSimRelation.HAS_MEDIATOR_PARTICIPANT.getRDFproperty()))\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If we're here, the process hasn't been assigned its participants yet\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Set the sources\n\t\t\t\t\t\tfor(PhysicalEntity source : force.getSources()){\n\t\t\t\t\t\t\tsetRDFstatementsForEntityParticipation(force, source, \n\t\t\t\t\t\t\t\t\tSemSimRelation.HAS_SOURCE_PARTICIPANT.getRDFproperty(), null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Set the sinks\n\t\t\t\t\t\tfor(PhysicalEntity sink : force.getSinks()){\n\t\t\t\t\t\t\tsetRDFstatementsForEntityParticipation(force, sink,\n\t\t\t\t\t\t\t\t\tSemSimRelation.HAS_SINK_PARTICIPANT.getRDFproperty(), null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "boolean isVirtualModel(Object modelID) throws Exception;", "@Override\n\t\tpublic int getModel() {\n\t\t\treturn 0;\n\t\t}", "DataModel getDataModel ();", "ModelData getModel();", "public interface PresentationModel extends Outlasting {\n}", "EisModel createEisModel();", "public interface Impl extends PersistenceFieldElement.Impl\n\t{\n\t\t/** Get the update action for this relationship element.\n\t\t * @return the update action, one of {@link #NONE_ACTION}, \n\t\t * {@link #NULLIFY_ACTION}, {@link #RESTRICT_ACTION}, \n\t\t * {@link #CASCADE_ACTION}, or {@link #AGGREGATE_ACTION}\n\t\t */\n\t\tpublic int getUpdateAction ();\n\n\t\t/** Set the update action for this relationship element.\n\t\t * @param action - an integer indicating the update action, one of:\n\t\t * {@link #NONE_ACTION}, {@link #NULLIFY_ACTION}, \n\t\t * {@link #RESTRICT_ACTION}, {@link #CASCADE_ACTION}, or \n\t\t * {@link #AGGREGATE_ACTION}\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setUpdateAction (int action) throws ModelException;\n\n\t\t/** Get the delete action for this relationship element.\n\t\t * @return the delete action, one of {@link #NONE_ACTION}, \n\t\t * {@link #NULLIFY_ACTION}, {@link #RESTRICT_ACTION}, \n\t\t * {@link #CASCADE_ACTION}, or {@link #AGGREGATE_ACTION}\n\t\t */\n\t\tpublic int getDeleteAction ();\n\n\t\t/** Set the delete action for this relationship element.\n\t\t * @param action - an integer indicating the delete action, one of:\n\t\t * {@link #NONE_ACTION}, {@link #NULLIFY_ACTION}, \n\t\t * {@link #RESTRICT_ACTION}, {@link #CASCADE_ACTION}, or \n\t\t * {@link #AGGREGATE_ACTION}\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setDeleteAction (int action) throws ModelException;\n\n\t\t/** Determines whether this relationship element should prefetch or not.\n\t\t * @return <code>true</code> if the relationship should prefetch, \n\t\t * <code>false</code> otherwise\n\t\t */\n\t\tpublic boolean isPrefetch ();\n\n\t\t/** Set whether this relationship element should prefetch or not.\n\t\t * @param flag - if <code>true</code>, the relationship is set to \n\t\t * prefetch; otherwise, it is not\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setPrefetch (boolean flag) throws ModelException;\n\n\t\t/** Get the lower cardinality bound for this relationship element.\n\t\t * @return the lower cardinality bound\n\t\t */\n\t\tpublic int getLowerBound ();\n\n\t\t/** Set the lower cardinality bound for this relationship element.\n\t\t * @param lowerBound - an integer indicating the lower cardinality bound\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setLowerBound (int lowerBound) throws ModelException;\n\n\t\t/** Get the upper cardinality bound for this relationship element. \n\t\t * Returns {@link java.lang.Integer#MAX_VALUE} for <code>n</code>\n\t\t * @return the upper cardinality bound\n\t\t */\n\t\tpublic int getUpperBound ();\n\n\t\t/** Set the upper cardinality bound for this relationship element.\n\t\t * @param upperBound - an integer indicating the upper cardinality bound\n\t\t * (use {@link java.lang.Integer#MAX_VALUE} for <code>n</code>)\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setUpperBound (int upperBound) throws ModelException;\n\n\t\t/** Get the collection class (for example Set, List, Vector, etc.)\n\t\t * for this relationship element.\n\t\t * @return the collection class\n\t\t */\n\t\tpublic String getCollectionClass ();\n\n\t\t/** Set the collection class for this relationship element.\n\t\t * @param collectionClass - a string indicating the type of \n\t\t * collection (for example Set, List, Vector, etc.)\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setCollectionClass (String collectionClass)\n\t\t\tthrows ModelException;\n\n\t\t/** Get the element class for this relationship element. If primitive \n\t\t * types are supported, you can use \n\t\t * <code><i>wrapperclass</i>.TYPE.toString()</code> to specify them.\n\t\t * @return the element class\n\t\t */\n\t\tpublic String getElementClass ();\n\n\t\t/** Set the element class for this relationship element.\n\t\t * @param elementClass - a string indicating the type of elements \n\t\t * in the collection. If primitive types are supported, you can use \n\t\t * <code><i>wrapperclass</i>.TYPE.toString()</code> to specify them.\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void setElementClass (String elementClass) throws ModelException;\n\n\t\t/** Get the relative name of the inverse relationship field for this \n\t\t * relationship element. In the case of two-way relationships, the two \n\t\t * relationship elements involved are inverses of each other. If this \n\t\t * relationship element does not participate in a two-way relationship, \n\t\t * this returns <code>null</code>. Note that it is possible to have \n\t\t * this method return a value, but because of the combination of \n\t\t * related class and lookup, there may be no corresponding \n\t\t * RelationshipElement which can be found.\n\t\t * @return the relative name of the inverse relationship element\n\t\t * @see #getInverseRelationship\n\t\t */\n\t\tpublic String getInverseRelationshipName ();\n\n\t\t/** Changes the inverse relationship element for this relationship \n\t\t * element. This method is invoked for both sides from \n\t\t * {@link RelationshipElement#setInverseRelationship} and should handle \n\t\t * the vetoable change events, property change events, and setting the \n\t\t * internal variable. \n\t\t * @param inverseRelationship - a relationship element to be used as \n\t\t * the inverse for this relationship element or <code>null</code> if \n\t\t * this relationship element does not participate in a two-way \n\t\t * relationship.\n\t\t * @exception ModelException if impossible\n\t\t */\n\t\tpublic void changeInverseRelationship (\n\t\t\tRelationshipElement inverseRelationship) throws ModelException;\n\t}", "public interface Activity extends RUP_Core_Elements {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#hasRecommendation\n */\n \n /**\n * Gets all property values for the hasRecommendation property.<p>\n * \n * @returns a collection of values for the hasRecommendation property.\n */\n Collection<? extends PM_Learning_Material> getHasRecommendation();\n\n /**\n * Checks if the class has a hasRecommendation property value.<p>\n * \n * @return true if there is a hasRecommendation property value.\n */\n boolean hasHasRecommendation();\n\n /**\n * Adds a hasRecommendation property value.<p>\n * \n * @param newHasRecommendation the hasRecommendation property value to be added\n */\n void addHasRecommendation(PM_Learning_Material newHasRecommendation);\n\n /**\n * Removes a hasRecommendation property value.<p>\n * \n * @param oldHasRecommendation the hasRecommendation property value to be removed.\n */\n void removeHasRecommendation(PM_Learning_Material oldHasRecommendation);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#isPerformOf\n */\n \n /**\n * Gets all property values for the isPerformOf property.<p>\n * \n * @returns a collection of values for the isPerformOf property.\n */\n Collection<? extends Role> getIsPerformOf();\n\n /**\n * Checks if the class has a isPerformOf property value.<p>\n * \n * @return true if there is a isPerformOf property value.\n */\n boolean hasIsPerformOf();\n\n /**\n * Adds a isPerformOf property value.<p>\n * \n * @param newIsPerformOf the isPerformOf property value to be added\n */\n void addIsPerformOf(Role newIsPerformOf);\n\n /**\n * Removes a isPerformOf property value.<p>\n * \n * @param oldIsPerformOf the isPerformOf property value to be removed.\n */\n void removeIsPerformOf(Role oldIsPerformOf);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "public interface BaseModel {\n\n}", "@Override\r\n protected boolean isSwitchFor(EPackage ePackage)\r\n {\r\n return ePackage == modelPackage;\r\n }", "@Override\r\n protected boolean isSwitchFor(EPackage ePackage)\r\n {\r\n return ePackage == modelPackage;\r\n }", "@Override\r\n\tpublic int getModelId() {\n\t\treturn 0;\r\n\t}", "public TranslateDPFToAlloyForAnalysis(DSpecification model){\n\t\tthis.model = model;\n\t\tdGraph = model.getDGraph();\n\t}", "public interface BaseModel {\n}", "public interface BaseModel {\n}", "protected void prepareModel() {\n model();\n }", "RolloutInner innerModel();", "public interface SmooksTransformModel extends TransformModel {\n\n /** The \"smooks\" name. */\n public static final String SMOOKS = \"smooks\";\n\n /** The \"config\" name. */\n public static final String CONFIG = \"config\";\n \n /** The \"type\" name. */\n public static final String TYPE = \"type\";\n\n /** The \"reportPath\" name. */\n public static final String REPORT_PATH = \"reportPath\";\n \n /**\n * Gets the type attribute.\n * @return the type attribute\n */\n public String getTransformType();\n\n /**\n * Sets the type attribute.\n * @param type the type attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setTransformType(String type);\n\n /**\n * Gets the config attribute.\n * @return the config attribute\n */\n public String getConfig();\n\n\n /**\n * Sets the config attribute.\n * @param config the config attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setConfig(String config);\n\n /**\n * Gets the reportPath attribute.\n * @return the reportPath attribute\n */\n public String getReportPath();\n\n /**\n * Sets the reportPath attribute.\n * @param reportPath the reportPath attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setReportPath(String reportPath);\n\n}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "public interface IProjectionModel extends IModel {\r\n\r\n /**\r\n * Gets the number of projected years.\r\n * \r\n * @return the number of years\r\n */\r\n int getYears();\r\n\r\n /**\r\n * Gets the number of projected generations.\r\n * \r\n * @return the number of generations\r\n */\r\n int getGenerations();\r\n\r\n /**\r\n * Gets the map parameter instance => Settype.\r\n * \r\n * @return the map from parameter instance to Settypes\r\n */\r\n Map<ParameterInstance, SetType> getInstanceSetTypes();\r\n\r\n /**\r\n * Gets the maximum age.\r\n * \r\n * @return the maximum age\r\n */\r\n int getMaximumAge();\r\n\r\n /**\r\n * Returns list of all {@link SetType} objects, the custom ones and the\r\n * default one.\r\n * \r\n * @return list of all {@link SetType} objects defined in this scenario (at\r\n * least the default {@link SetType} is defined)\r\n */\r\n List<SetType> getAllSetTypes();\r\n\r\n /**\r\n * Returns the {@link SubPopulationModel} this projection assumes.\r\n * \r\n * @return the {@link SubPopulationModel} of the projection\r\n */\r\n SubPopulationModel getSubPopulationModel();\r\n\r\n}", "@Override\n public Model newModel(CatalogItem item) {\n return null;\n }", "private void doQual()\n \t{\n \t\tModel model = doc.getModel();\n \t\tQualitativeModel qualModel = (QualitativeModel)model.getExtension(QualConstant.namespaceURI);\n \t\tif (qualModel != null)\n \t\t{\n \t\t\tdoQualitativeSpecies(qualModel);\n \t\t\tdoTransitions(qualModel);\n \t\t}\n \t}", "@Override\n protected boolean isSwitchFor(EPackage ePackage)\n {\n return ePackage == modelPackage;\n }", "@Override\n protected boolean isSwitchFor(EPackage ePackage)\n {\n return ePackage == modelPackage;\n }", "@Override\n protected boolean isSwitchFor(EPackage ePackage)\n {\n return ePackage == modelPackage;\n }", "@Override\n protected boolean isSwitchFor(EPackage ePackage)\n {\n return ePackage == modelPackage;\n }", "@Override\n protected boolean isSwitchFor(EPackage ePackage)\n {\n return ePackage == modelPackage;\n }", "@Override\n protected boolean isSwitchFor(EPackage ePackage)\n {\n return ePackage == modelPackage;\n }", "public OWLModel getKnowledgeBase();", "public void enterModelComponent(ProgramElement pe) {\n/* 35 */ ModelRepository mr = DefaultModelRepository.getModelRepository(null);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 51 */ CodeStripe cs = mr.getCurrentStripe();\n/* 52 */ if (cs != null) {\n/* 53 */ MethodReference metr = (MethodReference)pe;\n/* 54 */ Method mmmm = ReferenceConverter.getMethod(metr);\n/* 55 */ Location loc = new Location(mr.getCurrentFile());\n/* 56 */ Call call = mr.addCall(mmmm, mmmm, cs);\n/* 57 */ loc.setStartLine(metr.getFirstElement().getStartPosition().getLine());\n/* 58 */ loc.setStartChar(metr.getFirstElement().getStartPosition().getColumn());\n/* 59 */ loc.setEndLine(metr.getLastElement().getEndPosition().getLine());\n/* 60 */ loc.setEndChar(metr.getLastElement().getEndPosition().getColumn());\n/* 61 */ call.addInstance(cs.getRelPosOf(loc));\n/* */ } \n/* */ }", "@Override\r\n public void onThinking() {\n }", "@Override\r\n\tpublic Object getModel() {\n\t\treturn null;\r\n\t}", "boolean hasExternalAttributionModel();", "public ME_Model() {\n _nheldout = 0;\n _early_stopping_n = 0;\n _ref_modelp = null;\n }", "public void updateModel() {\n\t\t// Set the mode to validation\n\t\tmode = UPDATE;\n\t\t// Traverses the source and updates the model when UML elements are\n\t\t// missing\n\t\tinspect();\n\t}", "public FindOnModelObjectOK() {\r\n\t\tsuper();\r\n\t}", "public interface AllergyModelProperties extends PropertyAccess<AllergyModel> {\n ModelKeyProvider<AllergyModel> id();\n}", "@Override\n public LiteModelWrapper loadInitializeModel() throws IOException {\n return new LiteModelWrapper(this.loadMappedFile(\"softmax_initialize_ones.tflite\"));\n }", "@Override\n\tpublic TenantsEntity getModel() {\n\t\treturn null;\n\t}", "public boolean modelPresent() {\r\n return models.size() > 0;\r\n }", "protected void entityInit() {}", "@Override\n protected void initViewModel() {\n }", "@Override\n\tpublic String getModel() {\n\t\treturn \"cool model\";\n\t}", "BehaviouralModelFactory getBehaviouralModelFactory();", "@Override\r\n public String getModel() {\n return null;\r\n }", "NCModel getModel();", "public interface IBaseModel {\n}", "@DISPID(1611005992) //= 0x60060028. The runtime will prefer the VTID if present\n @VTID(67)\n boolean knowledgeInHybridDesignMode();", "protected void adjustToolForMode() {\n if(!staticOptimizationMode) return;\n // Check if have non-inverse dynamics analyses, or multiple inverse dynamics analyses\n boolean foundOtherAnalysis = false;\n boolean advancedSettings = false;\n int numFoundAnalyses = 0;\n InverseDynamics inverseDynamicsAnalysis = null;\n int numStaticOptimizationAnalyses = 0;\n StaticOptimization staticOptimizationAnalysis = null;\n if (false){\n // Since we're not using the model's actuator set, clear the actuator set related fields\n analyzeTool().setReplaceForceSet(true);\n analyzeTool().getForceSetFiles().setSize(0);\n // Mode is either InverseDynamics or StaticOptimization\n for(int i=analyzeTool().getAnalysisSet().getSize()-1; i>=0; i--) {\n Analysis analysis = analyzeTool().getAnalysisSet().get(i);\n //System.out.println(\" PROCESSING ANALYSIS \"+analysis.getType()+\",\"+analysis.getName());\n if(InverseDynamics.safeDownCast(analysis)==null) {\n foundOtherAnalysis = true;\n analyzeTool().getAnalysisSet().remove(i);\n } else{\n numFoundAnalyses++;\n if(numFoundAnalyses==1) {\n inverseDynamicsAnalysis = InverseDynamics.safeDownCast(analysis);\n if(inverseDynamicsAnalysis.getUseModelForceSet() || !inverseDynamicsAnalysis.getOn())\n advancedSettings = true;\n } else {\n analyzeTool().getAnalysisSet().remove(i);\n }\n }\n }\n if(inverseDynamicsAnalysis==null) {\n inverseDynamicsAnalysis = InverseDynamics.safeDownCast(new InverseDynamics().clone());\n setAnalysisTimeFromTool(inverseDynamicsAnalysis);\n //analyzeTool().addAnalysis(inverseDynamicsAnalysis);\n }\n inverseDynamicsAnalysis.setOn(true);\n inverseDynamicsAnalysis.setUseModelForceSet(false);\n \n }\n else { // StaticOptimization assumed\n // Mode is StaticOptimization\n for(int i=analyzeTool().getAnalysisSet().getSize()-1; i>=0; i--) {\n Analysis analysis = analyzeTool().getAnalysisSet().get(i);\n //System.out.println(\" PROCESSING ANALYSIS \"+analysis.getType()+\",\"+analysis.getName());\n if(StaticOptimization.safeDownCast(analysis)==null) {\n foundOtherAnalysis = true;\n analyzeTool().getAnalysisSet().remove(i);\n } else{\n numFoundAnalyses++;\n if(numFoundAnalyses==1) {\n staticOptimizationAnalysis = StaticOptimization.safeDownCast(analysis);\n //if(staticOptimizationAnalysis.getUseModelActuatorSet() || !staticOptimizationAnalysis.getOn())\n // advancedSettings = true;\n } else {\n analyzeTool().getAnalysisSet().remove(i);\n }\n }\n }\n if(staticOptimizationAnalysis==null) {\n staticOptimizationAnalysis = new StaticOptimization(); \n analyzeTool().getAnalysisSet().setMemoryOwner(false);\n analyzeTool().getAnalysisSet().cloneAndAppend(staticOptimizationAnalysis);\n staticOptimizationAnalysis = StaticOptimization.safeDownCast(\n analyzeTool().getAnalysisSet().get(\"StaticOptimization\"));\n }\n staticOptimizationAnalysis.setOn(true);\n staticOptimizationAnalysis.setUseModelForceSet(true);\n analyzeTool().setReplaceForceSet(false);\n }\n if(foundOtherAnalysis || advancedSettings || numFoundAnalyses>1) {\n String message = \"\";\n if(foundOtherAnalysis) message = \"Settings file contained analyses other than requested. The tool will ignore these.\\n\";\n if(numFoundAnalyses>1) message += \"More than one analysis was found. Extras will be ignored.\\n\";\n if(advancedSettings) message += \"Settings file contained an analysis with advanced settings which will be ignored by the tool.\\n\";\n message += \"Please use the analyze tool if you wish to handle different analysis types and advanced analysis settings.\\n\";\n DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(message, NotifyDescriptor.WARNING_MESSAGE));\n }\n }", "@objid (\"0fc4a30a-9083-11e1-81e9-001ec947ccaf\")\npublic interface IModel {\n @objid (\"158ef48a-aed6-4746-a113-8d9f740481b4\")\n public static final IMObjectFilter ISVALID = new IMObjectFilter() {\n\t\t@Override\n\t\tpublic boolean accept(MObject obj) {\n\t\t\treturn obj != null && obj.isValid();\n\t\t}\n\t};\n\n @objid (\"899f8ec3-25d4-4441-b499-c889c4e125a7\")\n public static final IMObjectFilter NOSHELL = new IMObjectFilter() {\n\t\t@Override\n\t\tpublic boolean accept(MObject obj) {\n\t\t\treturn obj != null && ! obj.isShell();\n\t\t}\n\t};\n\n @objid (\"f85615e6-6ad2-4a7a-9784-cf8d466faa65\")\n public static final IMObjectFilter NODELETED = new IMObjectFilter() {\n\t\t@Override\n\t\tpublic boolean accept(MObject obj) { \n\t\t\treturn obj != null && ! obj.isDeleted();\n\t\t}\n\t};\n\n /**\n * Find elements by a metaclass an an attribute value.\n * @param cls the metaclass.\n * @param att the attribute to search\n * @param val the attribute value\n * @return the found elements.\n */\n @objid (\"17c23aa0-9083-11e1-81e9-001ec947ccaf\")\n Collection<? extends MObject> findByAtt(MClass cls, final String att, Object val, IMObjectFilter filter);\n\n /**\n * Get all elements of a given class and the class descendants.\n * @param cls a metaclass.\n * @return all elements of this class.\n */\n @objid (\"17c23aa1-9083-11e1-81e9-001ec947ccaf\")\n Collection<? extends MObject> findByClass(MClass cls, IMObjectFilter filter);\n\n /**\n * Find an element from its MClass and its identifier.\n * @param cls a metaclass\n * @param siteIdentifier an UUID\n * @return the found element or <code>null</code>.\n */\n @objid (\"17c23aa2-9083-11e1-81e9-001ec947ccaf\")\n MObject findById(MClass cls, final UUID siteIdentifier, IMObjectFilter filter);\n\n /**\n * Find an element from a reference.\n * @param ref an element reference\n * @return the found element or <code>null</code>.\n * @throws org.modelio.vcore.session.UnknownMetaclassException if the referenced metaclass does not exist.\n */\n @objid (\"10a41285-16e7-11e2-b24b-001ec947ccaf\")\n MObject findByRef(MRef ref, IMObjectFilter filter) throws UnknownMetaclassException;\n\n /**\n * Get the generic factory.\n * @return the generic factory.\n */\n @objid (\"0078ca26-5a20-10c8-842f-001ec947cd2a\")\n GenericFactory getGenericFactory();\n\n @objid (\"00955b82-61a5-10c8-842f-001ec947cd2a\")\n Collection<? extends MObject> findByClass(MClass cls);\n\n @objid (\"0096d304-61a5-10c8-842f-001ec947cd2a\")\n Collection<? extends MObject> findByAtt(MClass cls, final String att, Object val);\n\n @objid (\"009711de-61a5-10c8-842f-001ec947cd2a\")\n MObject findById(MClass cls, final UUID siteIdentifier);\n\n @objid (\"33fb2113-b8a3-4b3b-95ed-3481c65d2881\")\n MObject findByRef(MRef ref) throws UnknownMetaclassException;\n\n @objid (\"261fe5dc-cfbf-40ee-886d-fc3c529c0e47\")\n <T extends MObject> Collection<T> findByClass(Class<T> metaclass, IMObjectFilter filter);\n\n @objid (\"e46abe41-187e-4d12-b565-c9e92df02519\")\n <T extends MObject> Collection<T> findByAtt(Class<T> metaclass, final String att, Object val, IMObjectFilter filter);\n\n @objid (\"83ef71a2-04ef-4e59-bf55-2bffe3069024\")\n <T extends MObject> T findById(Class<T> metaclass, final UUID siteIdentifier, IMObjectFilter filter);\n\n @objid (\"610f2f86-624b-469c-9c0c-6bf78147fba1\")\n <T extends MObject> Collection<T> findByClass(Class<T> metaclass);\n\n @objid (\"1540131b-bdd6-466c-a417-9e0efd220dda\")\n <T extends MObject> Collection<T> findByAtt(Class<T> metaclass, final String att, Object val);\n\n @objid (\"1b63d157-9858-4691-8636-7c625e97c65e\")\n <T extends MObject> T findById(Class<T> metaclass, final UUID siteIdentifier);\n\n}", "@Override\n public void loadEntityDetails() {\n \tsuper.loadEntityDetails();\n }", "@Override\n public boolean impliedPartExists() {\n return true;\n }", "IDataModel getIDataModel();", "public interface IModelRoot extends org.eclipse.wst.sse.sieditor.core.editorfwk.IModelObject {\n\n public boolean addChangeListener(IChangeListener listener);\n\n public boolean removeChangeListener(IChangeListener listener);\n\n public void notifyListeners(IModelChangeEvent event);\n\n public IEnvironment getEnv();\n\n public IModelObject getModelObject();\n\n /**\n * \n * @return the root of all models or this if this is the root of all models\n */\n public IModelRoot getRoot();\n \n}", "protected boolean testRobotmlModelNature(Object receiver) {\r\n\t\tboolean isRobotmlModel = false;\r\n\r\n\r\n\r\n\t\tEObject root = getRoot(receiver);\r\n\t\tif(root instanceof Package) {\r\n\t\t\tPackage rootPackage = (Package)root;\r\n\t\t\tProfile profile = rootPackage.getAppliedProfile(PLASMA_PROFILE_ELEM_NAME);\r\n\t\t\treturn profile != null;\r\n\r\n\t\t\t//FIX: UMLUtil.getProfile() loads the profile into the resource set. This is not desired.\r\n\t\t\t//\r\n\t\t\t//\t\t\tProfile robotml = UMLUtil.getProfile(RobotMLPackage.eINSTANCE, root);\r\n\t\t\t//\r\n\t\t\t//\t\t\tif(((Package)root).isProfileApplied(robotml)) {\r\n\t\t\t//\t\t\t\tisRobotmlModel = true;\r\n\t\t\t//\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\treturn isRobotmlModel;\r\n\t}", "public Object getModel();", "@Override\n protected void buildWorldRepresentation() {\n java.util.List<BasicModelEntity> worldModelEntityList = spaceExplorerModel.getWorldEntityList();\n java.util.List<CSysEntity> viewWorldEntityList = new ArrayList();\n for (int i = 0; i < worldModelEntityList.size(); i++) {\n\n BasicModelEntity basicModelEntity = worldModelEntityList.get(i);\n\n CSysEntity cSysEntity = null;\n if (basicModelEntity instanceof ModelLineEntity) {\n cSysEntity = new SeCSysLineEntity(this, (ModelLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(cSysLineEntity);\n } else if (basicModelEntity instanceof ModelPolyLineEntity) {\n cSysEntity = new SeCSysViewPolyLineEntity(this, (ModelPolyLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(seCSysViewPolylineEntity);\n }\n viewWorldEntityList.add(cSysEntity);\n }\n\n createAxis(viewWorldEntityList);\n viewWorldEntityArray = viewWorldEntityList.toArray(new BasicCSysEntity[viewWorldEntityList.size()]);\n updateCSysEntList(combinedRotatingMatrix);\n }", "public interface IMainModel extends IBaseModel {\n}", "@Override\r\n//\tpublic Application getModel() {\r\n//\n//\t\treturn application;\r\n//\t}\r\n\t\r\n\tpublic Application getModel() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn application;\r\n\t}", "@Override\n\tpublic CalEntity getModel() {\n\t\treturn model;\n\t}", "@Override\r\n\tprotected boolean isSwitchFor(EPackage ePackage) {\r\n return ePackage == modelPackage;\r\n }" ]
[ "0.63764906", "0.6175139", "0.61421996", "0.60329694", "0.60211295", "0.5892432", "0.5844643", "0.5809737", "0.57660884", "0.5746329", "0.5743047", "0.5711054", "0.5701966", "0.5684504", "0.5662658", "0.5645773", "0.5643004", "0.56225455", "0.5573552", "0.55291975", "0.55276096", "0.5527313", "0.5525902", "0.5525902", "0.5521965", "0.5497016", "0.5496553", "0.5492112", "0.54800636", "0.547638", "0.5473945", "0.5461417", "0.5452616", "0.543574", "0.5433222", "0.54167324", "0.54160386", "0.5402833", "0.5398781", "0.53934246", "0.538892", "0.53832084", "0.5378253", "0.5375848", "0.5367529", "0.53528416", "0.53422165", "0.533006", "0.5318469", "0.5317979", "0.5317979", "0.53134423", "0.5309613", "0.5307864", "0.5307864", "0.5298502", "0.5298449", "0.5297707", "0.5296065", "0.52943677", "0.5290549", "0.5284754", "0.5283849", "0.5283849", "0.5283849", "0.5283849", "0.5283849", "0.5283849", "0.52792174", "0.5273883", "0.5273493", "0.5270738", "0.52594846", "0.52567965", "0.5251459", "0.5251295", "0.5250961", "0.52495015", "0.52360994", "0.52313006", "0.5217987", "0.5217126", "0.5214951", "0.5213382", "0.52098787", "0.5205586", "0.5205051", "0.52019614", "0.51992935", "0.51982147", "0.5197462", "0.5192627", "0.5190195", "0.5185293", "0.5184509", "0.5184509", "0.5182477", "0.51682574", "0.51658434", "0.51622087", "0.5161187" ]
0.0
-1
fast way to call Toast
private void msg(String s) { Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showToast(String message);", "void showToast(String message);", "void toast(int resId);", "private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }", "void showToast(String value);", "void toast(CharSequence sequence);", "static void makeToast(Context ctx, String s){\n Toast.makeText(ctx, s, Toast.LENGTH_SHORT).show();\n }", "public void ToastPopper(String t){\n Context context = getApplicationContext();\n CharSequence text = t;\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "private void makeToast(String msg)\n {\n FinanceApp.serviceFactory.getUtil().makeAToast(this, msg);\n }", "private void displayToast(CharSequence text){\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "protected void showToast(CharSequence text) {\r\n\t Context context = getApplicationContext();\r\n\t int duration = Toast.LENGTH_SHORT;\r\n\t \r\n\t Toast toast = Toast.makeText(context, text, duration);\r\n\t toast.show();\r\n\t}", "private void doToast() {\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\t\r\n\t\t// Create and send toast\r\n\t\tContext context = getApplicationContext();\r\n\t\tint duration = Toast.LENGTH_SHORT;\r\n\t\tToast toast = Toast.makeText(context, message, duration);\r\n\t\ttoast.show();\r\n\t}", "private void showToast(final int resid) {\n\t\tm_toastHandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tToast.makeText(InstrumentService.this, resid, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}", "protected void toast() {\n }", "public void onToast (View view)\r\n\t{\r\n\t\t// Respond to the button click\r\n\t\tdoToast ();\r\n\t}", "public void toast(String toast) {\n\t\t// TODO Auto-generated method stub\n\t\t Toast toast1 = Toast.makeText(getApplicationContext(), toast, \n Toast.LENGTH_LONG); \n\t\t toast1.setDuration(1);\n\t\t toast1.show();\n\t\t \n\t}", "static void displayToast(Handler handler, final Context con, final String text, final int toast_length){\n\t\thandler.post(new Runnable(){\n\t\t\tpublic void run(){\n\t\t\t\tToast.makeText(con, text, toast_length).show();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void createToast(String slogan, float duration) {\n\t\tif (Gdx.app.getType() == ApplicationType.Android) {\n\t\t\tgGame.iFunctions.createToast(slogan, duration);\n\t\t} else\n\t\tsuper.createToast(slogan, duration);\n\t}", "private void makeToast(String message, boolean longToast) {\n\t\tif (longToast)\t{ Toast.makeText(this, message, Toast.LENGTH_LONG).show(); }\n\t\telse\t\t\t{ Toast.makeText(this, message, Toast.LENGTH_SHORT).show(); }\n\t}", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void toast(String string){\n Toast.makeText(this, string, Toast.LENGTH_SHORT).show();\n }", "private void showErrorToast() {\n }", "public static void toastIt(Context context, Toast toast, CharSequence msg) {\n if(toast !=null){\n toast.cancel();\n }\n\n //Make and display new toast\n toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);\n toast.show();\n }", "public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}", "private void showToast(final String message, final int toastLength) {\n post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getActivity(), message, toastLength).show();\n }\n });\n }", "public void ToastMessage() {\n\n // create toast message object\n final Toast toast = Toast.makeText(Product_Details_Page_Type_4.this,\n \"Product added to cart\",Toast.LENGTH_LONG);\n // show method call to show Toast message\n toast.show();\n\n // create handler to set duration for toast message\n Handler handler = new Handler() {\n\n @Override\n public void close() {\n // set duration for toast message\n toast.setDuration(100);\n // cancel toast message\n toast.cancel();\n }\n @Override\n public void flush() {}\n\n @Override\n public void publish(LogRecord record) {}\n };\n }", "public void showToast(String text){\n Toast.makeText(this,text,Toast.LENGTH_SHORT).show();\n }", "protected void toastshow() {\n \n\t\tToast toast=new Toast(getApplicationContext());\n\t\tImageView imageView=new ImageView(getApplicationContext());\n\t\timageView.setImageResource(R.drawable.icon);\n\t\ttoast.setView(imageView);\n\t\ttoast.show();\t\n\t}", "public static void toastText(Context context, String s)\n\t{\n\t\tif(Utils.ConstantVars.canToastDebugText) \n\t\t\tToast.makeText(context, s, 2 * Toast.LENGTH_LONG).show();\n\t}", "void onMessageToast(String string);", "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n String toastText = \"Hello World\";\n\n // This is how long we want to show the toast\n int duration = Toast.LENGTH_SHORT;\n\n // Get the context\n Context context = getApplicationContext();\n\n // Create the toast\n Toast toast = Toast.makeText(context, toastText, duration);\n\n // Show the toast\n toast.show();\n }", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "public void toastMsg(View v){\n String msg = \"Message Sent!\";\n Toast toast = Toast.makeText(this,msg,Toast.LENGTH_SHORT);\n toast.show();\n }", "public static void displayToast(Context context, String msg) {\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n\n }", "private void toast(String bread) {\n Toast.makeText(getActivity(), bread, Toast.LENGTH_SHORT).show();\n }", "private void showToast(String text, int length) {\r\n if (toast != null)\r\n toast.cancel();\r\n\r\n toast = Toast.makeText(this, text, length);\r\n toast.show();\r\n }", "private static void showToast(String stringToDisplay, Context context) {\n Toast.makeText(context, stringToDisplay, Toast.LENGTH_SHORT).show();\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "public void run() {\n Toast.makeText(context, toast, Toast.LENGTH_SHORT).show(); // toast for whatever reason\n }", "public void showToast(View view) {\n // Initialize an object named 'toast' using the 'Toast' class\n Toast toast = Toast.makeText(this, R.string.toast_message, Toast.LENGTH_SHORT);\n\n // Use the method 'show()' under the 'Toast' class to show a message\n toast.show();\n }", "public void toast (String msg, boolean longLength)\n {\n Toast.makeText (getApplicationContext(), msg,\n (longLength ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT)\n ).show ();\n }", "@JavascriptInterface\r\n\t public void showToast(String toast) {\r\n\t Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();\r\n\t }", "protected void showToast(String message) {\n\tToast.makeText(this, message, Toast.LENGTH_SHORT).show();\n}", "@JavascriptInterface\n public void showToast(String toast) {\n Toast.makeText(mContext, toast, Toast.LENGTH_LONG).show();\n }", "public static void showToast(Context context, String msg) {\n Toast.makeText(context, \"\" + msg, Toast.LENGTH_LONG).show();\n\n }", "private void makeToast(String string) {\n\t\tToast.makeText(this, string, Toast.LENGTH_SHORT).show();\r\n\r\n\t}", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "public void ting(String msg) {\r\n\t\tToast.makeText(this, msg, Toast.LENGTH_SHORT).show();\r\n\t}", "public void showToast(String string, int length) {\n System.out.println(\"toast:\" + string);\n }", "public static void showToast(Context context, String text) {\n //Toast.makeText(context, text, Toast.LENGTH_SHORT).show();\n showToastAtCenter(context, text);\n }", "private static void showToastText(String infoStr, int TOAST_LENGTH) {\n Context context = null;\n\t\ttoast = getToast(context);\n\t\tTextView textView = (TextView) toast.getView().findViewById(R.id.tv_toast);\n\t\ttextView.setText(infoStr);\n textView.setTypeface(Typeface.SANS_SERIF);\n\t\ttoast.setDuration(TOAST_LENGTH);\n\t\ttoast.show();\n\t}", "@JavascriptInterface\n public void showToast(String toast) {\n Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();\n }", "@JavascriptInterface\n public void showToast(String toast) {\n Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();\n }", "private static void checkToast() {\n\t\tif (mToast == null) {\n\t\t\tmToast = Toast.makeText(GlobalApp.getApp(), null,\n\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t}\n\t}", "@JavascriptInterface\n public void showToast(String toast) {\n Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();\n }", "@JavascriptInterface\n public void showToast(String toast) {\n Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();\n }", "public void cT(String s) { \r\n\t\tToast.makeText(this, s, Toast.LENGTH_SHORT).show();\r\n\t}", "private void logAndToast(String msg) {\n Log.d(TAG, msg);\n if (logToast != null) {\n logToast.cancel();\n }\n logToast = Toast.makeText(this, msg, Toast.LENGTH_LONG);\n logToast.show();\n }", "public static void showToast(Context context, String msg) {\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n }", "private void showToast(final String message) {\n main.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(main.getApplicationContext(), message, Toast.LENGTH_LONG).show();\n }\n });\n }", "public void makeToast(String string) {\n Toast.makeText(this, string, Toast.LENGTH_LONG).show();\n }", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "protected void showToast(String string)\r\n\t{\n\t\tToast.makeText(MainActivity.this, string, Toast.LENGTH_SHORT).show();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartThread();\n\t\t\t Toast.makeText(getContext(), \"Êղسɹ¦\", 1).show();\n\t\t\t}", "private void showLongToast(final String msg) {\n this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }\n });\n }", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "protected void toastshow1() {\n \n\t\tToast toast=Toast.makeText(this, \"image and text\", Toast.LENGTH_LONG);\n\t\t\n\t\tLinearLayout linearLayout=new LinearLayout(this);\n\t\tlinearLayout.setOrientation(LinearLayout.VERTICAL);\n\t\tImageView imageView=new ImageView(this);\n\t\timageView.setImageResource(R.drawable.icon);\n\t\tButton button=new Button(this);\n\t\tbutton.setText(\"progress over\");\n\t\tView toastView=toast.getView();\n\t\tlinearLayout.addView(imageView);\n\t\tlinearLayout.addView(button);\n\t\tlinearLayout.addView(toastView);\n\t\t\n\t\ttoast.setView(linearLayout);\n\t\ttoast.show();\n\t\t\n\t}", "public void makeToast(String name,int time){\n toast = new Toast(context);\n// toast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL , 0, SecretMessageApplication.get720WScale(240));\n toast.setDuration(time);\n// toast.setView(layout);\n toast.show();\n\n }", "@Override\n public void onClick(View v) {\n\n String s = v.getTag().toString();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, s, duration);\n toast.show();\n }", "private void displayToast(String message) {\n Toast.makeText(OptionActivity.this, message, Toast.LENGTH_SHORT).show();\n }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "private void displayToast() {\n if(getActivity() != null && toast != null) {\n Toast.makeText(getActivity(), toast, Toast.LENGTH_LONG).show();\n toast = null;\n }\n }", "public void showToast(final String message){\n\t runOnUiThread(new Runnable() {\n\t public void run()\n\t {\n\t Toast.makeText(VisitMultiplayerGame.this, message, Toast.LENGTH_SHORT).show();\n\t }\n\t });\n\t}", "private void toastWithTimer(String toToast, boolean important)\n {\n Date timeNow = new Date();\n boolean isAfter = timeNow.after(lastToastFinishes); //did we already pass the last toast finish time?\n\n int toastTime = important ? (int) ((toToast.length() / 75.0) * 2500 + 1000)\n : 1000;\n if (toastTime > 3500) // max toast time is 3500...\n toastTime = 3500;\n\n final int toastTimeFinal = toastTime;\n final Toast toast = Toast.makeText(this, toToast,\n Toast.LENGTH_LONG);\n\n\n if (isAfter)\n {\n toast.show();\n {\n Handler toastCanceller = new Handler();\n toastCanceller.postDelayed(new Runnable()\n {\n @Override\n public void run()\n {\n toast.cancel();\n }\n }, toastTimeFinal);\n }\n // set for when this toast will finish\n lastToastFinishes = simpleUtils.addMillisec(timeNow, toastTime);\n }\n else // if not, need to take care of delay for start as well\n {\n int startIn = simpleUtils.subtractDatesInMillisec(lastToastFinishes, timeNow);//lastToastFinishes - timeNow;\n Handler toastStarter = new Handler();\n toastStarter.postDelayed(new Runnable()\n {\n @Override\n public void run()\n {\n toast.show();\n Handler toastCanceller = new Handler();\n toastCanceller.postDelayed(new Runnable()\n {\n @Override\n public void run()\n {\n toast.cancel();\n }\n }, toastTimeFinal);\n\n }\n }, startIn);\n // set for when this toast will finish\n lastToastFinishes = simpleUtils.addMillisec(lastToastFinishes, toastTime);\n }\n\n }", "private static void m32280a(Context context, String str) {\n if (context != null && !C6319n.m19593a(str)) {\n if (context instanceof C9729e) {\n ((C9729e) context).showCustomToast(str);\n return;\n }\n try {\n Toast makeText = Toast.makeText(context, str, 0);\n if (makeText != null) {\n C11015b.m32283a(makeText);\n }\n } catch (Exception e) {\n C6312h.m19577a((Throwable) e);\n }\n }\n }", "public static void showToast(@NonNull final View view, final int duration) {\n if (isMainThread())\n showToastIMT(view, duration);\n else\n runInHandlerThread(new Runnable() {\n public void run() {\n showToastIMT(view, duration);\n }\n });\n }", "public void showToastMessage(String str) {\n Toast.makeText(self, str, Toast.LENGTH_SHORT).show();\n }", "public void loadToast(){\n Toast.makeText(getApplicationContext(), \"Could not find city\", Toast.LENGTH_SHORT).show();\n }", "private void tolog(String toLog) {\n Context context = cordova.getActivity();\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, toLog, duration);\n toast.show();\n }", "public void notificacionToast(String mensaje){\n Toast toast = Toast.makeText(getApplicationContext(),mensaje,Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER_HORIZONTAL, 0, 0);\n toast.show();\n }", "public void showMessage(int i) {\n ToastHelper.showLongToast(getContext().getString(i));\n }", "private void makeToast(String message){\n Toast.makeText(SettingsActivity.this, message, Toast.LENGTH_LONG).show();\n }", "public static void showToast(Context context, CharSequence message) {\n Toast.makeText(context, message, Toast.LENGTH_SHORT).show();\n }", "public interface IToast {\n void showToast(Context context, String txt);\n}", "private void toastMessage(String message) {\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n\n }", "private void messageToUser(CharSequence text)\n {\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "public void showToast(final String message, final int length) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), message, length).show();\n }\n });\n }", "public void tingOnUI(final String msg) {\r\n\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "private void showToast(final String message) {\n Log.e(App.TAG, message);\n\n Handler h = new Handler(Looper.getMainLooper());\n h.post(new Runnable() {\n public void run() {\n Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void showToast(View clickedButton) {\n String greetingText = getString(R.string.greeting_text);\n Toast tempMessage\n = Toast.makeText(this, greetingText,\n Toast.LENGTH_SHORT);\n tempMessage.show();\n }", "public static void showToast(Context context, String message, int duration) {\n\n if (message.contains(\"任务\") && !getTopActivity(context).contains(\"HomeActivity\")) {\n return;\n }\n\n if (sIsAllowShow) {\n Toast toast = new Toast(context);\n View view = LayoutInflater.from(context).inflate(R.layout.toast_universal, null);\n TextView messageText = view.findViewById(R.id.toast_universal_message_text);\n messageText.setText(message);\n toast.setDuration(duration);\n toast.setView(view);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n }\n }", "public void showToast(final String message)\n {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(context, message, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Test\n public void checkButtonClickToast2() {\n onView(withText(\"Brownies\")).perform(click());\n onView(withText(\"Ensure data connectivity\")).inRoot(new ToastMatcher())\n .check(matches(isDisplayed()));\n }" ]
[ "0.7793707", "0.7793707", "0.7672142", "0.7596303", "0.75449514", "0.74263334", "0.7406572", "0.73437905", "0.72883", "0.7261046", "0.71946245", "0.7184863", "0.7182005", "0.7181277", "0.7059539", "0.70503443", "0.7048384", "0.7027137", "0.70175326", "0.69915557", "0.6982247", "0.69748086", "0.6960026", "0.6951175", "0.692464", "0.69232464", "0.6921235", "0.690329", "0.68992585", "0.68873733", "0.6880622", "0.6878377", "0.6872846", "0.6843343", "0.6843343", "0.6836998", "0.6831009", "0.6816901", "0.6815824", "0.68122315", "0.6812231", "0.67977905", "0.6796883", "0.6788576", "0.6784767", "0.6783646", "0.6779051", "0.67744464", "0.67713165", "0.67504317", "0.6743838", "0.67414343", "0.6738989", "0.6731334", "0.67255247", "0.67255247", "0.6716893", "0.6715978", "0.6715978", "0.66989565", "0.6694729", "0.66750365", "0.6674649", "0.66682863", "0.6660022", "0.6648194", "0.6648194", "0.66469055", "0.6638958", "0.6629073", "0.662871", "0.66262853", "0.66047543", "0.6585546", "0.6566009", "0.6552901", "0.6537553", "0.65339464", "0.6526486", "0.6526132", "0.6516579", "0.6505141", "0.65046036", "0.6503987", "0.649588", "0.6487904", "0.6476396", "0.64699435", "0.6465633", "0.6449548", "0.6448959", "0.64442", "0.6439907", "0.6427653", "0.64160275", "0.64129937", "0.6401012", "0.6400754" ]
0.6773143
50
Write code here that turns the phrase above into concrete actions
@When("I click on controlgroup") public void i_click_on_controlgroup() { System.out.println("inside when"); jQueryHPage.clickCtrlGroup(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public void action() {\n }", "public interface Action { //придумываем интерфейс для описания действий, присущих роботу\n Action dogo(MapOfAction mapOfAction); //объявляем функцию для действий, которой передаём карту\n\n}", "public abstract ActionInMatch act();", "void determineNextAction();", "public void executeAction( String actionInfo );", "interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }", "public void performAction(String s) {\n try {\n CommandToClient command = CommandToClient.valueOf(Parser.getCommand(s));\n s = s.substring(5);\n switch (command) {\n case START:\n gameFrame.startGame();\n break;\n case ATEMP:\n gameFrame.attempt(s);\n break;\n case LAUNC:\n gameFrame.resultOfAttempt(s);\n break;\n case TOCOL:\n // will announce that boat has been sank\n System.out.println(\"You sank the \" + SetOfBoats.getNames()[Integer.parseInt(s)]);\n break;\n case WINNE:\n // will announce that game is won\n System.out.println(\"You have won!\");\n break;\n case PRINT:\n gameFrame.printWG();\n default:\n System.out.println(\"Incorrect command : \" + s);\n }\n\n } catch (CommandException e) {\n System.out.println(\"Command \" + s + \" not valid\");\n e.printStackTrace();\n }\n }", "public interface Action {\n\n /**\n * The executeAction method takes in actionInfo and runs the action code\n * @param actionInfo all information sent by the test file to the action\n */\n public void executeAction( String actionInfo );\n\n}", "public static int complexAction(String str)\n {\n if (str.equalsIgnoreCase(\"Play\") || str.equalsIgnoreCase(\"Start\") || str.equalsIgnoreCase(\"Begin\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Pause\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"QUIT\"))\n {\n return 3;\n }\n else\n { return 0;} \n }", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "private String convertAction(String action) {\n\t\treturn action.toLowerCase();\n\t}", "abstract public void performAction();", "IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);", "String replaceParserMessage(Entity e, String action);", "private void generateKeywordActions(List<Keyword> keywords) {\n \t\t\n \t}", "public abstract String getIntentActionString();", "public void action() {\n action.action();\n }", "public static int simpleAction(String str)\n {\n if (str.equalsIgnoreCase(\"Y\") || str.equalsIgnoreCase(\"Yes\")) //your actions are yes\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"N\") || str.equalsIgnoreCase(\"No\")) // your actions are no\n {\n return 0;\n }\n else\n {\n return 2;\n }\n }", "@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}", "public void processAction(CIDAction action);", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "Expression getActionSentence();", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void doAction(){}", "public void act() {\n\t}", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public abstract boolean resolveAction(String str, Bundle bundle);", "public void actionButton(String text);", "public final java_cup.runtime.Symbol CUP$Asintactico$do_action_part00000001(\n int CUP$Asintactico$act_num,\n java_cup.runtime.lr_parser CUP$Asintactico$parser,\n java.util.Stack CUP$Asintactico$stack,\n int CUP$Asintactico$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$Asintactico$result;\n\n /* select the action based on the action number */\n switch (CUP$Asintactico$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 300: // FEATURE_WORD ::= CARETOSTANDARDS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 301: // FEATURE_WORD ::= DARE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 302: // FEATURE_WORD ::= DOMINANCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 303: // FEATURE_WORD ::= HARDNESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 304: // FEATURE_WORD ::= APPREHESION error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 305: // FEATURE_WORD ::= INDEPENDENCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 306: // FEATURE_WORD ::= LIVELINESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 307: // FEATURE_WORD ::= OPENNESSTOCHANGE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 308: // FEATURE_WORD ::= PERFECTIONISM error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 309: // FEATURE_WORD ::= PRIVACY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 310: // FEATURE_WORD ::= REASONING error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 311: // FEATURE_WORD ::= SELFCONTROL error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 312: // FEATURE_WORD ::= SELFSUFFICIENCY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 313: // FEATURE_WORD ::= SENSITIVITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 314: // FEATURE_WORD ::= SOCIABILITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 315: // FEATURE_WORD ::= STABILITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 316: // FEATURE_WORD ::= STRESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 317: // FEATURE_WORD ::= SURVEILLANCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 318: // FEATURE_WORD ::= error PARENTH2 \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Syntax Error: FEATURE WORD expected. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 319: // CTRL_STR ::= LOOP_STR \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"CTRL_STR\",17, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 320: // CTRL_STR ::= IF_STR \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"CTRL_STR\",17, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 321: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 322: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY ELSE CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-8)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 323: // IF_STR ::= IF error COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 324: // IF_STR ::= IF error PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-6)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 325: // IF_STR ::= IF PARENTH1 COND CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Rigth parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 326: // IF_STR ::= IF PARENTH1 COND PARENTH2 error BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 327: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Else malformed. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-6)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 328: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY ELSE BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-7)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 329: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Else malformed. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-7)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 330: // LOOP_STR ::= LOOP PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 331: // LOOP_STR ::= LOOP error COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left Parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 332: // LOOP_STR ::= LOOP PARENTH1 COND error CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 333: // LOOP_STR ::= LOOP PARENTH1 COND PARENTH2 error BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 334: // LOOP_STR ::= LOOP PARENTH1 COND BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 335: // LOOP_STR ::= LOOP COND PARENTH2 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left Parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$Asintactico$act_num+\"found in internal parse table\");\n\n }\n }", "private void appendAction(int action) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(context.getString(action));\n \t}", "@Override\n public void act() {\n }", "private void setAction(String action)\r\n/* 46: */ {\r\n/* 47: 48 */ this.action = action;\r\n/* 48: */ }", "public abstract String intercept(ActionInvocation invocation) throws Exception;", "public void performAction();", "void showOthersActions(String message);", "protected abstract void action(Object obj);", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "String getAction();", "String getAction();", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public abstract boolean checkAction(String str);", "public int showPossibleActions(String[] string);", "public void commandAction (Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction\n // write pre-action user code here\nif (displayable == list) {//GEN-BEGIN:|7-commandAction|1|15-preAction\nif (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|1|15-preAction\n // write pre-action user code here\nlistAction ();//GEN-LINE:|7-commandAction|2|15-postAction\n // write post-action user code here\n} else if (command == exitCommand) {//GEN-LINE:|7-commandAction|3|20-preAction\n // write pre-action user code here\nexitMIDlet ();//GEN-LINE:|7-commandAction|4|20-postAction\n // write post-action user code here\n}//GEN-BEGIN:|7-commandAction|5|46-preAction\n} else if (displayable == searchList) {\nif (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|5|46-preAction\n // write pre-action user code here\nsearchListAction ();//GEN-LINE:|7-commandAction|6|46-postAction\n // write post-action user code here\n} else if (command == backCommand2) {//GEN-LINE:|7-commandAction|7|54-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|8|54-postAction\n // write post-action user code here\n} else if (command == okCommand1) {//GEN-LINE:|7-commandAction|9|51-preAction\n // write pre-action user code here\nswitchDisplayable (null, getTextTB ());//GEN-LINE:|7-commandAction|10|51-postAction\n \n String sTerm = (String) searches.elementAt(searchList.getSelectedIndex());\n \n String artist = sTerm.substring(0, sTerm.indexOf(\";\"));\n String song = sTerm.substring(sTerm.indexOf(\";\")+1);\n this.seatchText(artist,song);\n artistTf.setString(artist);\n songTF.setString(song);\n}//GEN-BEGIN:|7-commandAction|11|36-preAction\n} else if (displayable == seatchform) {\nif (command == backCommand) {//GEN-END:|7-commandAction|11|36-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|12|36-postAction\n // write post-action user code here\n} else if (command == okCommand) {//GEN-LINE:|7-commandAction|13|31-preAction\n // write pre-action user code here\n \nswitchDisplayable (null, getTextTB ());//GEN-LINE:|7-commandAction|14|31-postAction\n searches.insertElementAt(artistTf.getString()+\";\"+songTF.getString(), 0);\n recUtil.updateRecord(searches);\n this.seatchText(artistTf.getString(),songTF.getString());\n}//GEN-BEGIN:|7-commandAction|15|40-preAction\n} else if (displayable == textTB) {\nif (command == backCommand1) {//GEN-END:|7-commandAction|15|40-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSeatchform ());//GEN-LINE:|7-commandAction|16|40-postAction\n // write post-action user code here\n} else if (command == startC) {//GEN-LINE:|7-commandAction|17|43-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|18|43-postAction\n // write post-action user code here\n}//GEN-BEGIN:|7-commandAction|19|7-postCommandAction\n}//GEN-END:|7-commandAction|19|7-postCommandAction\n // write post-action user code here\n}", "private void Log(String action) {\r\n\t}", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public interface IIQActions {\n void think();\n Knowledge learn(Knowledge source, Knowledge dest);\n}", "public String parseBattleAction() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Attack (A)\");\n\t\tSystem.out.println(\"Spell (S)\");\n\t\tSystem.out.println(\"Equip/Unequip/Use Item (E)\");\n\t\tboolean isValidMove = false;\n\t\tString s = null;\n\t\twhile(!isValidMove) {\n\t\t\t s = parseString().toUpperCase();\n\t\t\t\n\t\t\tswitch(s) {\n\t\t\t\tcase \"A\":\t\n\t\t\t\tcase \"S\":\n\t\t\t\tcase \"E\":\n\t\t\t\tcase \"P\":\n\t\t\t\t\tisValidMove = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tprintErrorParse();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t\t\n\t}", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "protected abstract void actionExecuted(SUT system, State state, Action action);", "public void act();", "static void perform_ori(String passed){\n\t\tint type = type_of_ori(passed);\n\t\tif(type==1)\n\t\t\tori_with_acc(passed);\n\t}", "public void action(BotInstance bot, Message message);", "public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }", "public void handleAction(Action action){\n\t\tSystem.out.println(action.getActionType().getName() + \" : \" + action.getValue());\n\t\tDroneClientMain.runCommand(\"python george_helper.py \" + action.getActionType().getName().toLowerCase() + \" \" + action.getValue());\n\t}", "@Override\n protected void executeCommands(ITextTokenStream<BasicTextTokenType> stream) {\n TextToken<BasicTextTokenType> object = stream.getFirstObject();\n String token = object == null ? null : object.getStandardToken();\n if (token != null) {\n if (stream.getVerb() != null){\n switch (stream.getVerb().getType()) {\n case ATTACK:\n attackMob(token, object);\n break;\n case LOOK:\n lookAt(token, object);\n break;\n case MOVE:\n movePlayer(token, object);\n break;\n case GET:\n getItemFromRoom(token, object);\n break;\n case LOOT:\n lootAll(token, object);\n break;\n case DROP:\n dropItem(token, object);\n break;\n case EQUIP: // effect replaced with LOCK\n lock(token, object);\n //equipItem(token, object);\n break;\n case UNEQUIP: // effect replaced with UNLOCK\n unlock(token, object);\n //unequipItem(token, object);\n break;\n case INFO:\n info(token, object);\n break;\n case QUIT:\n quitGame();\n break;\n default:\n return;\n }\n }\n // For objects that can also be used to infer their verbs\n else {\n switch (object.getType()) {\n case DIRECTION:\n movePlayer(token, object);\n break;\n case INVENTORY:\n info(token, object);\n break;\n case HEALTH:\n info(token, object);\n break;\n default:\n return;\n }\n }\n\n } else {\n return;\n }\n\n }", "@Override\n public void action() {\n System.out.println(\"Matchmaker Behaviour\");\n addBehaviour(new RequestToMatchMakerBehaviour());\n\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }", "private void appendAction(int action, String additional) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(String.format(context.getString(action), additional));\n \t}", "public void listAction () {//GEN-END:|13-action|0|13-preAction\n // enter pre-action user code here\nString __selectedString = getList ().getString (getList ().getSelectedIndex ());//GEN-BEGIN:|13-action|1|17-preAction\nif (__selectedString != null) {\nif (__selectedString.equals (\"S\\u00F6k text\")) {//GEN-END:|13-action|1|17-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSeatchform ());//GEN-LINE:|13-action|2|17-postAction\n // write post-action user code here\n} else if (__selectedString.equals (\"Tidigare s\\u00F6kningar\")) {//GEN-LINE:|13-action|3|18-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSearchList ());//GEN-LINE:|13-action|4|18-postAction\n // write post-action user code here\n}//GEN-BEGIN:|13-action|5|13-postAction\n}//GEN-END:|13-action|5|13-postAction\n // enter post-action user code here\n}", "@Override\n protected void doAct() {\n }", "public void action() \n {\n if (!hasSecondWord()) { // there is no second word\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where? Please be more specific\");\n return; \n } \n String direction = getSecondWord(); //second word found\n\n // Possible room\n Room nextRoom = player.getCurrentRoom().getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door in that direction\");\n }\n else {\n if (!nextRoom.isLocked()) {\n enterRoom(nextRoom);\n }\n //unlock room should now be another action instead\n // else if (nextRoom.isUnlocked(null)) {\n // enterRoom(nextRoom);\n // }\n else {\n System.out.println(\"This door is locked!\");\n }\n } \n }", "IWDAction wdCreateNamedAction(WDActionEventHandler eventHandler, String name, String text);", "public interface ActivityAction {\r\n public void viewedActivity(String condition, String viewerFullName);\r\n}", "public static int actions(String str)\n {\n if (str.equalsIgnoreCase(\"Shop\") || str.equalsIgnoreCase(\"S\"))\n {\n return 0;\n }\n else if (str.equalsIgnoreCase(\"Fight\") || str.equalsIgnoreCase(\"F\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Rest\") || str.equalsIgnoreCase(\"R\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"Gamble\") || str.equalsIgnoreCase(\"G\"))\n {\n return 3;\n }\n else if (str.equalsIgnoreCase(\"Account\") || str.equalsIgnoreCase(\"A\"))\n {\n return 4;\n }\n else if (str.equalsIgnoreCase(\"Museum\") || str.equalsIgnoreCase(\"M\"))\n {\n return 5;\n }\n else if (str.equalsIgnoreCase(\"Quest\") || str.equalsIgnoreCase(\"Q\"))\n {\n return 6;\n }\n else if (str.equalsIgnoreCase(\"SumbitScore\") || str.equalsIgnoreCase(\"submit\") || str.equalsIgnoreCase(\"submit score\") || str.equalsIgnoreCase(\"SS\")) \n {\n return 7;\n }\n else \n {\n return 8;\n }\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public final java_cup.runtime.Symbol CUP$parser$do_action_part00000000(\n int CUP$parser$act_num,\n java_cup.runtime.lr_parser CUP$parser$parser,\n java.util.Stack CUP$parser$stack,\n int CUP$parser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$parser$result;\n\n /* select the action based on the action number */\n switch (CUP$parser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // $START ::= translation_unit EOF \n {\n Object RESULT =null;\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tObject start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n /* ACCEPT */\n CUP$parser$parser.done_parsing();\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // primary_expression ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // primary_expression ::= constant \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // primary_expression ::= string \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // primary_expression ::= LPAREN expression RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // primary_expression ::= generic_selection \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // constant ::= I_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // constant ::= F_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // constant ::= ENUMERATION_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // enumeration_constant ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumeration_constant\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // string ::= STRING_LITERAL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"string\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // string ::= FUNC_NAME \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"string\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // generic_selection ::= GENERIC LPAREN assignment_expression COMMA generic_assoc_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_selection\",5, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // generic_assoc_list ::= generic_association \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_assoc_list\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // generic_assoc_list ::= generic_assoc_list COMMA generic_association \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_assoc_list\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // generic_association ::= type_name COLON assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_association\",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // generic_association ::= DEFAULT COLON assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_association\",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // postfix_expression ::= primary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // postfix_expression ::= postfix_expression LBRACK expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // postfix_expression ::= postfix_expression LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // postfix_expression ::= postfix_expression LPAREN argument_expression_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // postfix_expression ::= postfix_expression DOT IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // postfix_expression ::= postfix_expression PTR_OP IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // postfix_expression ::= postfix_expression INC_OP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // postfix_expression ::= postfix_expression DEC_OP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // postfix_expression ::= LPAREN type_name LPAREN LBRACE initializer_list LBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // postfix_expression ::= LPAREN type_name RPAREN LBRACE initializer_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // argument_expression_list ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"argument_expression_list\",9, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // argument_expression_list ::= argument_expression_list COMMA assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"argument_expression_list\",9, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // unary_expression ::= postfix_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // unary_expression ::= INC_OP unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // unary_expression ::= DEC_OP unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // unary_expression ::= unary_operator cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // unary_expression ::= SIZEOF unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // unary_expression ::= SIZEOF LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // unary_expression ::= ALIGNOF LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // unary_operator ::= AND \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // unary_operator ::= MULT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // unary_operator ::= PLUS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // unary_operator ::= MINUS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // unary_operator ::= COMP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // unary_operator ::= NOT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // cast_expression ::= unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"cast_expression\",14, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // cast_expression ::= LPAREN type_name RPAREN cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"cast_expression\",14, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // multiplicative_expression ::= cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // multiplicative_expression ::= multiplicative_expression MULT cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // multiplicative_expression ::= multiplicative_expression DIV cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 47: // multiplicative_expression ::= multiplicative_expression MOD cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 48: // additive_expression ::= multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 49: // additive_expression ::= additive_expression PLUS multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 50: // additive_expression ::= additive_expression MINUS multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 51: // shift_expression ::= additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 52: // shift_expression ::= shift_expression LEFT_OP additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 53: // shift_expression ::= shift_expression RIGHT_OP additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 54: // relational_expression ::= shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 55: // relational_expression ::= relational_expression LT shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 56: // relational_expression ::= relational_expression GT shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 57: // relational_expression ::= relational_expression LE_OP shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 58: // relational_expression ::= relational_expression GE_OP shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 59: // equality_expression ::= relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 60: // equality_expression ::= equality_expression EQ_OP relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 61: // equality_expression ::= equality_expression NE_OP relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 62: // and_expression ::= equality_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"and_expression\",19, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 63: // and_expression ::= and_expression AND equality_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"and_expression\",19, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 64: // exclusive_or_expression ::= and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"exclusive_or_expression\",20, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 65: // exclusive_or_expression ::= exclusive_or_expression XOR and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"exclusive_or_expression\",20, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 66: // inclusive_or_expression ::= exclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"inclusive_or_expression\",75, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 67: // inclusive_or_expression ::= inclusive_or_expression OR exclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"inclusive_or_expression\",75, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 68: // logical_and_expression ::= inclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_and_expression\",21, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 69: // logical_and_expression ::= logical_and_expression AND_OP inclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_and_expression\",21, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 70: // logical_or_expression ::= logical_and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_or_expression\",22, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 71: // logical_or_expression ::= logical_or_expression OR_OP logical_and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_or_expression\",22, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 72: // conditional_expression ::= logical_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"conditional_expression\",23, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 73: // conditional_expression ::= logical_or_expression QUESTION expression COLON conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"conditional_expression\",23, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 74: // assignment_expression ::= conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_expression\",11, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 75: // assignment_expression ::= unary_expression assignment_operator assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_expression\",11, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 76: // assignment_operator ::= EQ \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 77: // assignment_operator ::= MUL_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 78: // assignment_operator ::= DIV_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 79: // assignment_operator ::= MOD_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 80: // assignment_operator ::= ADD_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 81: // assignment_operator ::= SUB_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 82: // assignment_operator ::= LEFT_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 83: // assignment_operator ::= RIGHT_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 84: // assignment_operator ::= AND_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 85: // assignment_operator ::= XOR_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 86: // assignment_operator ::= OR_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 87: // expression ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression\",10, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 88: // expression ::= expression COMMA assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression\",10, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 89: // constant_expression ::= conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant_expression\",24, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 90: // declaration ::= declaration_specifiers SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 91: // declaration ::= declaration_specifiers init_declarator_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 92: // declaration ::= static_assert_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 93: // declaration_specifiers ::= storage_class_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 94: // declaration_specifiers ::= storage_class_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 95: // declaration_specifiers ::= type_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 96: // declaration_specifiers ::= type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 97: // declaration_specifiers ::= type_qualifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 98: // declaration_specifiers ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 99: // declaration_specifiers ::= function_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 100: // declaration_specifiers ::= function_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 101: // declaration_specifiers ::= alignment_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 102: // declaration_specifiers ::= alignment_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 103: // init_declarator_list ::= init_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator_list\",26, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 104: // init_declarator_list ::= init_declarator_list COMMA init_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator_list\",26, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 105: // init_declarator ::= declarator EQ initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator\",30, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 106: // init_declarator ::= declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator\",30, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 107: // storage_class_specifier ::= TYPEDEF \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 108: // storage_class_specifier ::= EXTERN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 109: // storage_class_specifier ::= STATIC \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 110: // storage_class_specifier ::= THREAD_LOCAL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 111: // storage_class_specifier ::= AUTO \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 112: // storage_class_specifier ::= REGISTER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 113: // type_specifier ::= VOID \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 114: // type_specifier ::= CHAR \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 115: // type_specifier ::= SHORT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 116: // type_specifier ::= INT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 117: // type_specifier ::= LONG \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 118: // type_specifier ::= FLOAT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 119: // type_specifier ::= DOUBLE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 120: // type_specifier ::= SIGNED \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 121: // type_specifier ::= UNSIGNED \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 122: // type_specifier ::= BOOL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 123: // type_specifier ::= COMPLEX \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 124: // type_specifier ::= IMAGINARY \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 125: // type_specifier ::= atomic_type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 126: // type_specifier ::= struct_or_union_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 127: // type_specifier ::= enum_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 128: // type_specifier ::= TYPEDEF_NAME \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 129: // struct_or_union_specifier ::= struct_or_union LBRACE struct_declaration_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 130: // struct_or_union_specifier ::= struct_or_union IDENTIFIER LBRACE struct_declaration_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 131: // struct_or_union_specifier ::= struct_or_union IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 132: // struct_or_union ::= STRUCT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union\",33, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 133: // struct_or_union ::= UNION \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union\",33, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 134: // struct_declaration_list ::= struct_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration_list\",34, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 135: // struct_declaration_list ::= struct_declaration_list struct_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration_list\",34, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 136: // struct_declaration ::= specifier_qualifier_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 137: // struct_declaration ::= specifier_qualifier_list struct_declarator_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 138: // struct_declaration ::= static_assert_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 139: // specifier_qualifier_list ::= type_specifier specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 140: // specifier_qualifier_list ::= type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 141: // specifier_qualifier_list ::= type_qualifier specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 142: // specifier_qualifier_list ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 143: // struct_declarator_list ::= struct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator_list\",38, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 144: // struct_declarator_list ::= struct_declarator_list COMMA struct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator_list\",38, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 145: // struct_declarator ::= COLON constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 146: // struct_declarator ::= declarator COLON constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 147: // struct_declarator ::= declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 148: // enum_specifier ::= ENUM LBRACE enumerator_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 149: // enum_specifier ::= ENUM LBRACE enumerator_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 150: // enum_specifier ::= ENUM IDENTIFIER LBRACE enumerator_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 151: // enum_specifier ::= ENUM IDENTIFIER LBRACE enumerator_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 152: // enum_specifier ::= ENUM IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 153: // enumerator_list ::= enumerator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator_list\",41, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 154: // enumerator_list ::= enumerator_list COMMA enumerator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator_list\",41, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 155: // enumerator ::= enumeration_constant EQ constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator\",42, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 156: // enumerator ::= enumeration_constant \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator\",42, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 157: // atomic_type_specifier ::= ATOMIC LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"atomic_type_specifier\",43, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 158: // type_qualifier ::= CONST \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 159: // type_qualifier ::= RESTRICT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 160: // type_qualifier ::= VOLATILE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 161: // type_qualifier ::= ATOMIC \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 162: // function_specifier ::= INLINE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_specifier\",44, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 163: // function_specifier ::= NORETURN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_specifier\",44, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 164: // alignment_specifier ::= ALIGNAS LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"alignment_specifier\",45, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 165: // alignment_specifier ::= ALIGNAS LPAREN constant_expression RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"alignment_specifier\",45, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 166: // declarator ::= pointer direct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declarator\",31, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 167: // declarator ::= direct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declarator\",31, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 168: // direct_declarator ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 169: // direct_declarator ::= LPAREN declarator RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 170: // direct_declarator ::= direct_declarator LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 171: // direct_declarator ::= direct_declarator LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 172: // direct_declarator ::= direct_declarator LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 173: // direct_declarator ::= direct_declarator LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 174: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 175: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 176: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 177: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 178: // direct_declarator ::= direct_declarator LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 179: // direct_declarator ::= direct_declarator LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 180: // direct_declarator ::= direct_declarator LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 181: // direct_declarator ::= direct_declarator LPAREN identifier_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 182: // pointer ::= MULT type_qualifier_list pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 183: // pointer ::= MULT type_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 184: // pointer ::= MULT pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 185: // pointer ::= MULT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 186: // type_qualifier_list ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier_list\",50, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 187: // type_qualifier_list ::= type_qualifier_list type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier_list\",50, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 188: // parameter_type_list ::= parameter_list COMMA ELLIPSIS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_type_list\",48, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 189: // parameter_type_list ::= parameter_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_type_list\",48, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 190: // parameter_list ::= parameter_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_list\",70, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 191: // parameter_list ::= parameter_list COMMA parameter_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_list\",70, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 192: // parameter_declaration ::= declaration_specifiers declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 193: // parameter_declaration ::= declaration_specifiers abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 194: // parameter_declaration ::= declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 195: // identifier_list ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"identifier_list\",49, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 196: // identifier_list ::= identifier_list COMMA IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"identifier_list\",49, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 197: // type_name ::= specifier_qualifier_list abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_name\",13, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 198: // type_name ::= specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_name\",13, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 199: // abstract_declarator ::= pointer direct_abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 200: // abstract_declarator ::= pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 201: // abstract_declarator ::= direct_abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 202: // direct_abstract_declarator ::= LPAREN abstract_declarator RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 203: // direct_abstract_declarator ::= LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 204: // direct_abstract_declarator ::= LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 205: // direct_abstract_declarator ::= LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 206: // direct_abstract_declarator ::= LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 207: // direct_abstract_declarator ::= LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 208: // direct_abstract_declarator ::= LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 209: // direct_abstract_declarator ::= LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 210: // direct_abstract_declarator ::= LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 211: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 212: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 213: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 214: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 215: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 216: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 217: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 218: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 219: // direct_abstract_declarator ::= LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 220: // direct_abstract_declarator ::= LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 221: // direct_abstract_declarator ::= direct_abstract_declarator LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 222: // direct_abstract_declarator ::= direct_abstract_declarator LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 223: // initializer ::= LBRACE initializer_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 224: // initializer ::= LBRACE initializer_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 225: // initializer ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 226: // initializer_list ::= designation initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 227: // initializer_list ::= initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 228: // initializer_list ::= initializer_list COMMA designation initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 229: // initializer_list ::= initializer_list COMMA initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 230: // designation ::= designator_list EQ \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designation\",55, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 231: // designator_list ::= designator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator_list\",56, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 232: // designator_list ::= designator_list designator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator_list\",56, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 233: // designator ::= LBRACK constant_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator\",57, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 234: // designator ::= DOT IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator\",57, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 235: // static_assert_declaration ::= STATIC_ASSERT LPAREN constant_expression COMMA STRING_LITERAL RPAREN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"static_assert_declaration\",58, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 236: // statement ::= labeled_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 237: // statement ::= compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 238: // statement ::= expression_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 239: // statement ::= selection_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 240: // statement ::= iteration_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 241: // statement ::= jump_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 242: // labeled_statement ::= IDENTIFIER COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 243: // labeled_statement ::= CASE constant_expression COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 244: // labeled_statement ::= DEFAULT COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 245: // compound_statement ::= LBRACE RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"compound_statement\",61, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 246: // compound_statement ::= LBRACE block_item_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"compound_statement\",61, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 247: // block_item_list ::= block_item \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item_list\",62, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 248: // block_item_list ::= block_item_list block_item \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item_list\",62, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 249: // block_item ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item\",63, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 250: // block_item ::= statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item\",63, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 251: // expression_statement ::= SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression_statement\",66, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 252: // expression_statement ::= expression SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression_statement\",66, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 253: // selection_statement ::= IF LPAREN expression RPAREN statement ELSE statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 254: // selection_statement ::= IF LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 255: // selection_statement ::= SWITCH LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 256: // iteration_statement ::= WHILE LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 257: // iteration_statement ::= DO statement WHILE LPAREN expression RPAREN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 258: // iteration_statement ::= FOR LPAREN expression_statement expression_statement RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 259: // iteration_statement ::= FOR LPAREN expression_statement expression_statement expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 260: // iteration_statement ::= FOR LPAREN declaration expression_statement RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 261: // iteration_statement ::= FOR LPAREN declaration expression_statement expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 262: // jump_statement ::= GOTO IDENTIFIER SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 263: // jump_statement ::= CONTINUE SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 264: // jump_statement ::= BREAK SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 265: // jump_statement ::= RETURN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 266: // jump_statement ::= RETURN expression SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 267: // translation_unit ::= external_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"translation_unit\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 268: // translation_unit ::= translation_unit external_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"translation_unit\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 269: // external_declaration ::= function_definition \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"external_declaration\",67, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 270: // external_declaration ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"external_declaration\",67, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 271: // function_definition ::= declaration_specifiers declarator declaration_list compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_definition\",68, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 272: // function_definition ::= declaration_specifiers declarator compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_definition\",68, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 273: // declaration_list ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_list\",73, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 274: // declaration_list ::= declaration_list declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_list\",73, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$parser$act_num+\"found in internal parse table\");\n\n }\n }", "public interface ICommandDisplayAction extends IAction{\r\n\r\n\t \r\n\t\r\n\tpublic void displayPallet() ;\r\n\r\n\tpublic void displayArena();\r\n\t\r\n\tpublic void displayComponent(String componentIntanceName) ;\r\n\t\r\n\tpublic void displayChain( ) ;\r\n}", "public void act() \n {\n canSeeAlex();\n }", "@Override\n public void action(Jugador jugador) {\n\n }", "public void actionOffered();", "public final java_cup.runtime.Symbol CUP$LuaGrammarCup$do_action(\r\n int CUP$LuaGrammarCup$act_num,\r\n java_cup.runtime.lr_parser CUP$LuaGrammarCup$parser,\r\n java.util.Stack CUP$LuaGrammarCup$stack,\r\n int CUP$LuaGrammarCup$top)\r\n throws java.lang.Exception\r\n {\r\n /* Symbol object for return from actions */\r\n java_cup.runtime.Symbol CUP$LuaGrammarCup$result;\r\n\r\n /* select the action based on the action number */\r\n switch (CUP$LuaGrammarCup$act_num)\r\n {\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 112: // string ::= LONGSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 111: // string ::= CHARSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 110: // string ::= NORMALSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 109: // number ::= HEX \r\n {\r\n Object RESULT =null;\r\n\t\tint hleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint hright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject h = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = h;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 108: // number ::= INT \r\n {\r\n Object RESULT =null;\r\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = Integer.parseInt(i.toString());\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 107: // number ::= FLOAT \r\n {\r\n Object RESULT =null;\r\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject f = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = Float.parseFloat(f.toString());\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 106: // number ::= EXP \r\n {\r\n Object RESULT =null;\r\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = e; \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 105: // unop ::= SHARP \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 104: // unop ::= NOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 103: // unop ::= MINUS \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 102: // binop ::= OR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 101: // binop ::= AND \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 100: // binop ::= NEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 99: // binop ::= EQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 98: // binop ::= MAIEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 97: // binop ::= MAIOR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 96: // binop ::= MINEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 95: // binop ::= MINOR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 94: // binop ::= DOTDOT \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 93: // binop ::= MOD \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 92: // binop ::= EXPON \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 91: // binop ::= DIVIDE \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 90: // binop ::= MULT \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 89: // binop ::= MINUS \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 88: // binop ::= PLUS \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 87: // fieldsep ::= COMMA \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldsep\",19, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 86: // fieldsep ::= SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldsep\",19, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 85: // field ::= exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 84: // field ::= VAR_NAME ASSIGN exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 83: // field ::= LBRACK exp RBRACK ASSIGN exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 82: // fieldlist ::= fieldlist fieldsep field \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found fieldlist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldlist\",18, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 81: // fieldlist ::= field \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found a field\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldlist\",18, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 80: // tableconstructor ::= LCURLY fieldlist RCURLY \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"table constructor\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"tableconstructor\",27, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 79: // tableconstructor ::= LCURLY RCURLY \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"tableconstructor\",27, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 78: // parlist ::= TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 77: // parlist ::= namelist COMMA TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 76: // parlist ::= namelist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 75: // funcbody ::= LPAREN parlist RPAREN block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"functionbody with par\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcbody\",13, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 74: // funcbody ::= LPAREN RPAREN block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"functionbody\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcbody\",13, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 73: // function ::= FUNCTION funcbody \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"function\",14, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 72: // args ::= string \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 71: // args ::= tableconstructor \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 70: // args ::= LPAREN explist RPAREN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"args (explist)\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 69: // args ::= LPAREN RPAREN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"args ()\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 68: // functioncall ::= prefixexp COLON VAR_NAME args \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function call\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"functioncall\",17, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 67: // functioncall ::= prefixexp args \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function call\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"functioncall\",17, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 66: // prefixexp ::= functioncall \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"prefixexp->functioncall\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"prefixexp\",21, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 65: // prefixexp ::= var \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"prefixexp->var\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"prefixexp\",21, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 64: // exp_member ::= unop exp_member \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 63: // exp_member ::= TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 62: // exp_member ::= tableconstructor \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 61: // exp_member ::= prefixexp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 60: // exp_member ::= function \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 59: // exp_member ::= string \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 58: // exp_member ::= number \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found number\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 57: // exp_member ::= TRUE \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 56: // exp_member ::= FALSE \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 55: // exp_member ::= NIL \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 54: // exp_member_recoursive ::= exp_member binop exp_member_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found binop exp\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member_recoursive\",35, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 53: // exp_member_recoursive ::= exp_member \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member_recoursive\",35, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 52: // exp ::= exp_member_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp\",5, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 51: // exp_recoursive ::= exp COMMA exp_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"exp_recoursive\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_recoursive\",34, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 50: // exp_recoursive ::= exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_recoursive\",34, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 49: // explist ::= exp_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found explist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"explist\",12, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 48: // namelist ::= namelist COMMA VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"namelist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"namelist\",36, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 47: // namelist ::= VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"namelist\",36, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 46: // var ::= prefixexp DOT VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 45: // var ::= prefixexp LBRACK exp RBRACK \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 44: // var ::= VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 43: // varlist ::= varlist var COMMA \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"varlist\",24, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 42: // varlist ::= var \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"varlist\",24, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 41: // dot_var_name ::= DOT VAR_NAME dot_var_name \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"dot_var_name\",42, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 40: // dot_var_name ::= \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"dot_var_name\",42, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 39: // funcname ::= VAR_NAME dot_var_name COLON VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcname\",15, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 38: // funcname ::= VAR_NAME dot_var_name \r\n {\r\n Object RESULT =null;\r\n\t\tint varleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint varright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject var = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tSystem.out.println(\"funcname:\" + var); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcname\",15, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 37: // break_stat ::= BREAK SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"break_stat\",38, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 36: // break_stat ::= BREAK \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"break stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"break_stat\",38, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 35: // return_stat ::= RETURN explist SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 34: // return_stat ::= RETURN SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 33: // return_stat ::= RETURN explist \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"return with explist\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 32: // return_stat ::= RETURN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"return stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 31: // last_stat ::= break_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"last_stat\",9, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 30: // last_stat ::= return_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"last_stat\",9, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 29: // for_stat ::= FOR namelist IN explist DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"for stat in\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-6)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 28: // for_stat ::= FOR VAR_NAME ASSIGN exp COMMA exp COMMA exp DO block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-10)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 27: // for_stat ::= FOR VAR_NAME ASSIGN exp COMMA exp DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"for stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-8)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 26: // if_recoursive ::= if_recoursive ELSEIF exp THEN block \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_recoursive\",41, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 25: // if_recoursive ::= ELSEIF exp THEN block \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_recoursive\",41, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 24: // if_stat ::= IF exp THEN block if_recoursive ELSE block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-7)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 23: // if_stat ::= IF exp THEN block ELSE block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-6)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 22: // if_stat ::= IF exp THEN block if_recoursive END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-5)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 21: // if_stat ::= IF exp THEN block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 20: // stat ::= LOCAL namelist ASSIGN explist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 19: // stat ::= LOCAL namelist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 18: // stat ::= LOCAL FUNCTION VAR_NAME funcbody \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 17: // stat ::= FUNCTION funcname funcbody \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found Function stat\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 16: // stat ::= for_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 15: // stat ::= if_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 14: // stat ::= REPEAT block UNTIL exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 13: // stat ::= WHILE exp DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).value;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject b = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tSystem.out.println(\"while statement\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 12: // stat ::= DO block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 11: // stat ::= functioncall \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 10: // stat ::= varlist ASSIGN explist \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"varlist assign explist\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 9: // block ::= chunk \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"block\",1, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 8: // stat_recoursive ::= stat SEMI stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 7: // stat_recoursive ::= stat stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 6: // stat_recoursive ::= stat SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 5: // stat_recoursive ::= stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 4: // chunk ::= \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 3: // chunk ::= last_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 2: // chunk ::= stat_recoursive last_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 1: // $START ::= chunk EOF \r\n {\r\n Object RESULT =null;\r\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject start_val = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tRESULT = start_val;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n /* ACCEPT */\r\n CUP$LuaGrammarCup$parser.done_parsing();\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 0: // chunk ::= stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /* . . . . . .*/\r\n default:\r\n throw new Exception(\r\n \"Invalid action number found in internal parse table\");\r\n\r\n }\r\n }", "@Override\n\tpublic void action() {\n\t\tACLMessage msgRx = myAgent.receive();\n\t\tif (msgRx != null && msgRx.getPerformative() == ACLMessage.REQUEST) {\n\t\t\tContentManager contentManager = myAgent.getContentManager();\n\t\t\tSystem.out.println(\"RECEIVED = \" + msgRx.getContent());\n\t\t\tmsgRx.setLanguage(\"fipa-sl\");\n\t\t\tmsgRx.setOntology(\"blocks-ontology\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tContentElementList elementList = (ContentElementList) contentManager\n\t\t\t\t\t\t.extractContent(msgRx);\n\n\t\t\t\tIterator elementIterator = elementList.iterator();\n\n\t\t\t\twhile (elementIterator.hasNext()) {\n\t\t\t\t\tAction action = (Action) elementIterator.next();\n\t\t\t\t\t((Environment) myAgent).getWorld().getActionList().add((Executable) (action.getAction()));\n//\t\t\t\t\t((Executable) (action.getAction()))\n//\t\t\t\t\t\t\t.execute((Environment) myAgent);\n\t\t\t\t}\n\n\t\t\t} catch (UngroundedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (CodecException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (OntologyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tblock();\n\t\t}\n\t\t\n\t}", "static void actionPrompt() {\n prompt:\n while (true) {\n String line = \"\";\n System.out.println(\"\\nWhat do you want to do: (S)ave, (F)ill, (L)ine, (V)isible, (Q)uit: \");\n while (line.length() < 1)\n line = scan.nextLine().toUpperCase();\n char action = line.charAt(0);\n switch (action) {\n case 'Q':\n break prompt;\n case 'V':\n visible(); break;\n case 'L':\n line(); break;\n case 'F':\n fill(); break;\n case 'S':\n save(); break;\n default:\n System.out.println(\"Not a valid command.\");\n }\n }\n }", "public void setAction(String action) { this.action = action; }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "@Override\n\t\t\tpublic void performAction(PrintWriter pw) {\n\t\t\t\t\n\t\t\t\tString hello = \"helloworld\";\n\t\t\t\t\n\t\t\t\tpw.println(hello);\n\t\t\t\t\n\t\t\t}", "static void perform_ani(String passed){\n\t\tint type = type_of_ani(passed);\n\t\tif(type==1)\n\t\t\tani_with_acc(passed);\n\t}", "CaseAction createCaseAction();" ]
[ "0.6994023", "0.64688784", "0.64028573", "0.6357782", "0.6353246", "0.6340194", "0.6326519", "0.6326519", "0.6326519", "0.6320388", "0.6240435", "0.61786896", "0.61739427", "0.6157042", "0.6115433", "0.6075159", "0.6068293", "0.6063896", "0.6039428", "0.6039428", "0.6039428", "0.6039428", "0.6026571", "0.60163265", "0.5999474", "0.59890103", "0.59762293", "0.5940353", "0.5934597", "0.5930056", "0.59298867", "0.5928523", "0.5904781", "0.5890068", "0.5883541", "0.58653706", "0.5862594", "0.5854724", "0.5838918", "0.5810879", "0.5797733", "0.5785521", "0.57796633", "0.5774073", "0.5770283", "0.5764984", "0.57637846", "0.5762832", "0.5755357", "0.5752179", "0.5749003", "0.5749003", "0.57485896", "0.57485896", "0.5744971", "0.5736174", "0.57254386", "0.5712361", "0.5710638", "0.570392", "0.56991905", "0.56977654", "0.56977654", "0.56977654", "0.56977654", "0.56977654", "0.56977654", "0.56977654", "0.56977654", "0.5689868", "0.5683284", "0.5661341", "0.56541795", "0.565394", "0.56511104", "0.56475115", "0.5644714", "0.5631278", "0.56225544", "0.561826", "0.56033164", "0.5602875", "0.5599335", "0.5595734", "0.5594598", "0.55938333", "0.55938333", "0.55938333", "0.5584045", "0.5569387", "0.5568215", "0.5557404", "0.55573076", "0.5556555", "0.55481243", "0.55479443", "0.5547464", "0.55332977", "0.55329657", "0.55258715", "0.55165786" ]
0.0
-1
Write code here that turns the phrase above into concrete actions
@Then("I land on the controlgroup page") public void i_land_on_the_controlgroup_page() { System.out.println("inside then"); Assertions.assertEquals("https://jqueryui.com/controlgroup/", driver.getCurrentUrl()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public void action() {\n }", "public interface Action { //придумываем интерфейс для описания действий, присущих роботу\n Action dogo(MapOfAction mapOfAction); //объявляем функцию для действий, которой передаём карту\n\n}", "public abstract ActionInMatch act();", "void determineNextAction();", "public void executeAction( String actionInfo );", "interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }", "public void performAction(String s) {\n try {\n CommandToClient command = CommandToClient.valueOf(Parser.getCommand(s));\n s = s.substring(5);\n switch (command) {\n case START:\n gameFrame.startGame();\n break;\n case ATEMP:\n gameFrame.attempt(s);\n break;\n case LAUNC:\n gameFrame.resultOfAttempt(s);\n break;\n case TOCOL:\n // will announce that boat has been sank\n System.out.println(\"You sank the \" + SetOfBoats.getNames()[Integer.parseInt(s)]);\n break;\n case WINNE:\n // will announce that game is won\n System.out.println(\"You have won!\");\n break;\n case PRINT:\n gameFrame.printWG();\n default:\n System.out.println(\"Incorrect command : \" + s);\n }\n\n } catch (CommandException e) {\n System.out.println(\"Command \" + s + \" not valid\");\n e.printStackTrace();\n }\n }", "public interface Action {\n\n /**\n * The executeAction method takes in actionInfo and runs the action code\n * @param actionInfo all information sent by the test file to the action\n */\n public void executeAction( String actionInfo );\n\n}", "public static int complexAction(String str)\n {\n if (str.equalsIgnoreCase(\"Play\") || str.equalsIgnoreCase(\"Start\") || str.equalsIgnoreCase(\"Begin\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Pause\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"QUIT\"))\n {\n return 3;\n }\n else\n { return 0;} \n }", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "private String convertAction(String action) {\n\t\treturn action.toLowerCase();\n\t}", "abstract public void performAction();", "IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);", "String replaceParserMessage(Entity e, String action);", "private void generateKeywordActions(List<Keyword> keywords) {\n \t\t\n \t}", "public abstract String getIntentActionString();", "public void action() {\n action.action();\n }", "@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}", "public static int simpleAction(String str)\n {\n if (str.equalsIgnoreCase(\"Y\") || str.equalsIgnoreCase(\"Yes\")) //your actions are yes\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"N\") || str.equalsIgnoreCase(\"No\")) // your actions are no\n {\n return 0;\n }\n else\n {\n return 2;\n }\n }", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}", "public void processAction(CIDAction action);", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "Expression getActionSentence();", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void doAction(){}", "public void act() {\n\t}", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public abstract boolean resolveAction(String str, Bundle bundle);", "public void actionButton(String text);", "public final java_cup.runtime.Symbol CUP$Asintactico$do_action_part00000001(\n int CUP$Asintactico$act_num,\n java_cup.runtime.lr_parser CUP$Asintactico$parser,\n java.util.Stack CUP$Asintactico$stack,\n int CUP$Asintactico$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$Asintactico$result;\n\n /* select the action based on the action number */\n switch (CUP$Asintactico$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 300: // FEATURE_WORD ::= CARETOSTANDARDS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 301: // FEATURE_WORD ::= DARE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 302: // FEATURE_WORD ::= DOMINANCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 303: // FEATURE_WORD ::= HARDNESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 304: // FEATURE_WORD ::= APPREHESION error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 305: // FEATURE_WORD ::= INDEPENDENCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 306: // FEATURE_WORD ::= LIVELINESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 307: // FEATURE_WORD ::= OPENNESSTOCHANGE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 308: // FEATURE_WORD ::= PERFECTIONISM error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 309: // FEATURE_WORD ::= PRIVACY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 310: // FEATURE_WORD ::= REASONING error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 311: // FEATURE_WORD ::= SELFCONTROL error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 312: // FEATURE_WORD ::= SELFSUFFICIENCY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 313: // FEATURE_WORD ::= SENSITIVITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 314: // FEATURE_WORD ::= SOCIABILITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 315: // FEATURE_WORD ::= STABILITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 316: // FEATURE_WORD ::= STRESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 317: // FEATURE_WORD ::= SURVEILLANCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 318: // FEATURE_WORD ::= error PARENTH2 \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Syntax Error: FEATURE WORD expected. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 319: // CTRL_STR ::= LOOP_STR \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"CTRL_STR\",17, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 320: // CTRL_STR ::= IF_STR \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"CTRL_STR\",17, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 321: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 322: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY ELSE CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-8)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 323: // IF_STR ::= IF error COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 324: // IF_STR ::= IF error PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-6)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 325: // IF_STR ::= IF PARENTH1 COND CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Rigth parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 326: // IF_STR ::= IF PARENTH1 COND PARENTH2 error BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 327: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Else malformed. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-6)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 328: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY ELSE BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-7)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 329: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Else malformed. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-7)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 330: // LOOP_STR ::= LOOP PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 331: // LOOP_STR ::= LOOP error COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left Parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 332: // LOOP_STR ::= LOOP PARENTH1 COND error CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 333: // LOOP_STR ::= LOOP PARENTH1 COND PARENTH2 error BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 334: // LOOP_STR ::= LOOP PARENTH1 COND BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 335: // LOOP_STR ::= LOOP COND PARENTH2 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left Parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$Asintactico$act_num+\"found in internal parse table\");\n\n }\n }", "private void appendAction(int action) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(context.getString(action));\n \t}", "@Override\n public void act() {\n }", "private void setAction(String action)\r\n/* 46: */ {\r\n/* 47: 48 */ this.action = action;\r\n/* 48: */ }", "public abstract String intercept(ActionInvocation invocation) throws Exception;", "void showOthersActions(String message);", "public void performAction();", "protected abstract void action(Object obj);", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "String getAction();", "String getAction();", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public abstract boolean checkAction(String str);", "public int showPossibleActions(String[] string);", "public void commandAction (Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction\n // write pre-action user code here\nif (displayable == list) {//GEN-BEGIN:|7-commandAction|1|15-preAction\nif (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|1|15-preAction\n // write pre-action user code here\nlistAction ();//GEN-LINE:|7-commandAction|2|15-postAction\n // write post-action user code here\n} else if (command == exitCommand) {//GEN-LINE:|7-commandAction|3|20-preAction\n // write pre-action user code here\nexitMIDlet ();//GEN-LINE:|7-commandAction|4|20-postAction\n // write post-action user code here\n}//GEN-BEGIN:|7-commandAction|5|46-preAction\n} else if (displayable == searchList) {\nif (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|5|46-preAction\n // write pre-action user code here\nsearchListAction ();//GEN-LINE:|7-commandAction|6|46-postAction\n // write post-action user code here\n} else if (command == backCommand2) {//GEN-LINE:|7-commandAction|7|54-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|8|54-postAction\n // write post-action user code here\n} else if (command == okCommand1) {//GEN-LINE:|7-commandAction|9|51-preAction\n // write pre-action user code here\nswitchDisplayable (null, getTextTB ());//GEN-LINE:|7-commandAction|10|51-postAction\n \n String sTerm = (String) searches.elementAt(searchList.getSelectedIndex());\n \n String artist = sTerm.substring(0, sTerm.indexOf(\";\"));\n String song = sTerm.substring(sTerm.indexOf(\";\")+1);\n this.seatchText(artist,song);\n artistTf.setString(artist);\n songTF.setString(song);\n}//GEN-BEGIN:|7-commandAction|11|36-preAction\n} else if (displayable == seatchform) {\nif (command == backCommand) {//GEN-END:|7-commandAction|11|36-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|12|36-postAction\n // write post-action user code here\n} else if (command == okCommand) {//GEN-LINE:|7-commandAction|13|31-preAction\n // write pre-action user code here\n \nswitchDisplayable (null, getTextTB ());//GEN-LINE:|7-commandAction|14|31-postAction\n searches.insertElementAt(artistTf.getString()+\";\"+songTF.getString(), 0);\n recUtil.updateRecord(searches);\n this.seatchText(artistTf.getString(),songTF.getString());\n}//GEN-BEGIN:|7-commandAction|15|40-preAction\n} else if (displayable == textTB) {\nif (command == backCommand1) {//GEN-END:|7-commandAction|15|40-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSeatchform ());//GEN-LINE:|7-commandAction|16|40-postAction\n // write post-action user code here\n} else if (command == startC) {//GEN-LINE:|7-commandAction|17|43-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|18|43-postAction\n // write post-action user code here\n}//GEN-BEGIN:|7-commandAction|19|7-postCommandAction\n}//GEN-END:|7-commandAction|19|7-postCommandAction\n // write post-action user code here\n}", "private void Log(String action) {\r\n\t}", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public interface IIQActions {\n void think();\n Knowledge learn(Knowledge source, Knowledge dest);\n}", "public String parseBattleAction() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Attack (A)\");\n\t\tSystem.out.println(\"Spell (S)\");\n\t\tSystem.out.println(\"Equip/Unequip/Use Item (E)\");\n\t\tboolean isValidMove = false;\n\t\tString s = null;\n\t\twhile(!isValidMove) {\n\t\t\t s = parseString().toUpperCase();\n\t\t\t\n\t\t\tswitch(s) {\n\t\t\t\tcase \"A\":\t\n\t\t\t\tcase \"S\":\n\t\t\t\tcase \"E\":\n\t\t\t\tcase \"P\":\n\t\t\t\t\tisValidMove = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tprintErrorParse();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t\t\n\t}", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "protected abstract void actionExecuted(SUT system, State state, Action action);", "public void act();", "static void perform_ori(String passed){\n\t\tint type = type_of_ori(passed);\n\t\tif(type==1)\n\t\t\tori_with_acc(passed);\n\t}", "public void action(BotInstance bot, Message message);", "public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }", "public void handleAction(Action action){\n\t\tSystem.out.println(action.getActionType().getName() + \" : \" + action.getValue());\n\t\tDroneClientMain.runCommand(\"python george_helper.py \" + action.getActionType().getName().toLowerCase() + \" \" + action.getValue());\n\t}", "@Override\n protected void executeCommands(ITextTokenStream<BasicTextTokenType> stream) {\n TextToken<BasicTextTokenType> object = stream.getFirstObject();\n String token = object == null ? null : object.getStandardToken();\n if (token != null) {\n if (stream.getVerb() != null){\n switch (stream.getVerb().getType()) {\n case ATTACK:\n attackMob(token, object);\n break;\n case LOOK:\n lookAt(token, object);\n break;\n case MOVE:\n movePlayer(token, object);\n break;\n case GET:\n getItemFromRoom(token, object);\n break;\n case LOOT:\n lootAll(token, object);\n break;\n case DROP:\n dropItem(token, object);\n break;\n case EQUIP: // effect replaced with LOCK\n lock(token, object);\n //equipItem(token, object);\n break;\n case UNEQUIP: // effect replaced with UNLOCK\n unlock(token, object);\n //unequipItem(token, object);\n break;\n case INFO:\n info(token, object);\n break;\n case QUIT:\n quitGame();\n break;\n default:\n return;\n }\n }\n // For objects that can also be used to infer their verbs\n else {\n switch (object.getType()) {\n case DIRECTION:\n movePlayer(token, object);\n break;\n case INVENTORY:\n info(token, object);\n break;\n case HEALTH:\n info(token, object);\n break;\n default:\n return;\n }\n }\n\n } else {\n return;\n }\n\n }", "@Override\n public void action() {\n System.out.println(\"Matchmaker Behaviour\");\n addBehaviour(new RequestToMatchMakerBehaviour());\n\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }", "private void appendAction(int action, String additional) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(String.format(context.getString(action), additional));\n \t}", "public void listAction () {//GEN-END:|13-action|0|13-preAction\n // enter pre-action user code here\nString __selectedString = getList ().getString (getList ().getSelectedIndex ());//GEN-BEGIN:|13-action|1|17-preAction\nif (__selectedString != null) {\nif (__selectedString.equals (\"S\\u00F6k text\")) {//GEN-END:|13-action|1|17-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSeatchform ());//GEN-LINE:|13-action|2|17-postAction\n // write post-action user code here\n} else if (__selectedString.equals (\"Tidigare s\\u00F6kningar\")) {//GEN-LINE:|13-action|3|18-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSearchList ());//GEN-LINE:|13-action|4|18-postAction\n // write post-action user code here\n}//GEN-BEGIN:|13-action|5|13-postAction\n}//GEN-END:|13-action|5|13-postAction\n // enter post-action user code here\n}", "@Override\n protected void doAct() {\n }", "public void action() \n {\n if (!hasSecondWord()) { // there is no second word\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where? Please be more specific\");\n return; \n } \n String direction = getSecondWord(); //second word found\n\n // Possible room\n Room nextRoom = player.getCurrentRoom().getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door in that direction\");\n }\n else {\n if (!nextRoom.isLocked()) {\n enterRoom(nextRoom);\n }\n //unlock room should now be another action instead\n // else if (nextRoom.isUnlocked(null)) {\n // enterRoom(nextRoom);\n // }\n else {\n System.out.println(\"This door is locked!\");\n }\n } \n }", "IWDAction wdCreateNamedAction(WDActionEventHandler eventHandler, String name, String text);", "public interface ActivityAction {\r\n public void viewedActivity(String condition, String viewerFullName);\r\n}", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public static int actions(String str)\n {\n if (str.equalsIgnoreCase(\"Shop\") || str.equalsIgnoreCase(\"S\"))\n {\n return 0;\n }\n else if (str.equalsIgnoreCase(\"Fight\") || str.equalsIgnoreCase(\"F\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Rest\") || str.equalsIgnoreCase(\"R\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"Gamble\") || str.equalsIgnoreCase(\"G\"))\n {\n return 3;\n }\n else if (str.equalsIgnoreCase(\"Account\") || str.equalsIgnoreCase(\"A\"))\n {\n return 4;\n }\n else if (str.equalsIgnoreCase(\"Museum\") || str.equalsIgnoreCase(\"M\"))\n {\n return 5;\n }\n else if (str.equalsIgnoreCase(\"Quest\") || str.equalsIgnoreCase(\"Q\"))\n {\n return 6;\n }\n else if (str.equalsIgnoreCase(\"SumbitScore\") || str.equalsIgnoreCase(\"submit\") || str.equalsIgnoreCase(\"submit score\") || str.equalsIgnoreCase(\"SS\")) \n {\n return 7;\n }\n else \n {\n return 8;\n }\n }", "public final java_cup.runtime.Symbol CUP$parser$do_action_part00000000(\n int CUP$parser$act_num,\n java_cup.runtime.lr_parser CUP$parser$parser,\n java.util.Stack CUP$parser$stack,\n int CUP$parser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$parser$result;\n\n /* select the action based on the action number */\n switch (CUP$parser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // $START ::= translation_unit EOF \n {\n Object RESULT =null;\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tObject start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n /* ACCEPT */\n CUP$parser$parser.done_parsing();\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // primary_expression ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // primary_expression ::= constant \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // primary_expression ::= string \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // primary_expression ::= LPAREN expression RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // primary_expression ::= generic_selection \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // constant ::= I_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // constant ::= F_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // constant ::= ENUMERATION_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // enumeration_constant ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumeration_constant\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // string ::= STRING_LITERAL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"string\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // string ::= FUNC_NAME \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"string\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // generic_selection ::= GENERIC LPAREN assignment_expression COMMA generic_assoc_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_selection\",5, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // generic_assoc_list ::= generic_association \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_assoc_list\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // generic_assoc_list ::= generic_assoc_list COMMA generic_association \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_assoc_list\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // generic_association ::= type_name COLON assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_association\",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // generic_association ::= DEFAULT COLON assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_association\",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // postfix_expression ::= primary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // postfix_expression ::= postfix_expression LBRACK expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // postfix_expression ::= postfix_expression LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // postfix_expression ::= postfix_expression LPAREN argument_expression_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // postfix_expression ::= postfix_expression DOT IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // postfix_expression ::= postfix_expression PTR_OP IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // postfix_expression ::= postfix_expression INC_OP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // postfix_expression ::= postfix_expression DEC_OP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // postfix_expression ::= LPAREN type_name LPAREN LBRACE initializer_list LBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // postfix_expression ::= LPAREN type_name RPAREN LBRACE initializer_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // argument_expression_list ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"argument_expression_list\",9, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // argument_expression_list ::= argument_expression_list COMMA assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"argument_expression_list\",9, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // unary_expression ::= postfix_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // unary_expression ::= INC_OP unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // unary_expression ::= DEC_OP unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // unary_expression ::= unary_operator cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // unary_expression ::= SIZEOF unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // unary_expression ::= SIZEOF LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // unary_expression ::= ALIGNOF LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // unary_operator ::= AND \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // unary_operator ::= MULT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // unary_operator ::= PLUS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // unary_operator ::= MINUS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // unary_operator ::= COMP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // unary_operator ::= NOT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // cast_expression ::= unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"cast_expression\",14, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // cast_expression ::= LPAREN type_name RPAREN cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"cast_expression\",14, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // multiplicative_expression ::= cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // multiplicative_expression ::= multiplicative_expression MULT cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // multiplicative_expression ::= multiplicative_expression DIV cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 47: // multiplicative_expression ::= multiplicative_expression MOD cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 48: // additive_expression ::= multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 49: // additive_expression ::= additive_expression PLUS multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 50: // additive_expression ::= additive_expression MINUS multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 51: // shift_expression ::= additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 52: // shift_expression ::= shift_expression LEFT_OP additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 53: // shift_expression ::= shift_expression RIGHT_OP additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 54: // relational_expression ::= shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 55: // relational_expression ::= relational_expression LT shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 56: // relational_expression ::= relational_expression GT shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 57: // relational_expression ::= relational_expression LE_OP shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 58: // relational_expression ::= relational_expression GE_OP shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 59: // equality_expression ::= relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 60: // equality_expression ::= equality_expression EQ_OP relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 61: // equality_expression ::= equality_expression NE_OP relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 62: // and_expression ::= equality_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"and_expression\",19, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 63: // and_expression ::= and_expression AND equality_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"and_expression\",19, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 64: // exclusive_or_expression ::= and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"exclusive_or_expression\",20, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 65: // exclusive_or_expression ::= exclusive_or_expression XOR and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"exclusive_or_expression\",20, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 66: // inclusive_or_expression ::= exclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"inclusive_or_expression\",75, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 67: // inclusive_or_expression ::= inclusive_or_expression OR exclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"inclusive_or_expression\",75, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 68: // logical_and_expression ::= inclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_and_expression\",21, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 69: // logical_and_expression ::= logical_and_expression AND_OP inclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_and_expression\",21, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 70: // logical_or_expression ::= logical_and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_or_expression\",22, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 71: // logical_or_expression ::= logical_or_expression OR_OP logical_and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_or_expression\",22, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 72: // conditional_expression ::= logical_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"conditional_expression\",23, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 73: // conditional_expression ::= logical_or_expression QUESTION expression COLON conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"conditional_expression\",23, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 74: // assignment_expression ::= conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_expression\",11, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 75: // assignment_expression ::= unary_expression assignment_operator assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_expression\",11, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 76: // assignment_operator ::= EQ \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 77: // assignment_operator ::= MUL_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 78: // assignment_operator ::= DIV_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 79: // assignment_operator ::= MOD_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 80: // assignment_operator ::= ADD_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 81: // assignment_operator ::= SUB_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 82: // assignment_operator ::= LEFT_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 83: // assignment_operator ::= RIGHT_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 84: // assignment_operator ::= AND_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 85: // assignment_operator ::= XOR_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 86: // assignment_operator ::= OR_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 87: // expression ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression\",10, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 88: // expression ::= expression COMMA assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression\",10, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 89: // constant_expression ::= conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant_expression\",24, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 90: // declaration ::= declaration_specifiers SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 91: // declaration ::= declaration_specifiers init_declarator_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 92: // declaration ::= static_assert_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 93: // declaration_specifiers ::= storage_class_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 94: // declaration_specifiers ::= storage_class_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 95: // declaration_specifiers ::= type_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 96: // declaration_specifiers ::= type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 97: // declaration_specifiers ::= type_qualifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 98: // declaration_specifiers ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 99: // declaration_specifiers ::= function_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 100: // declaration_specifiers ::= function_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 101: // declaration_specifiers ::= alignment_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 102: // declaration_specifiers ::= alignment_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 103: // init_declarator_list ::= init_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator_list\",26, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 104: // init_declarator_list ::= init_declarator_list COMMA init_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator_list\",26, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 105: // init_declarator ::= declarator EQ initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator\",30, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 106: // init_declarator ::= declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator\",30, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 107: // storage_class_specifier ::= TYPEDEF \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 108: // storage_class_specifier ::= EXTERN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 109: // storage_class_specifier ::= STATIC \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 110: // storage_class_specifier ::= THREAD_LOCAL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 111: // storage_class_specifier ::= AUTO \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 112: // storage_class_specifier ::= REGISTER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 113: // type_specifier ::= VOID \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 114: // type_specifier ::= CHAR \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 115: // type_specifier ::= SHORT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 116: // type_specifier ::= INT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 117: // type_specifier ::= LONG \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 118: // type_specifier ::= FLOAT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 119: // type_specifier ::= DOUBLE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 120: // type_specifier ::= SIGNED \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 121: // type_specifier ::= UNSIGNED \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 122: // type_specifier ::= BOOL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 123: // type_specifier ::= COMPLEX \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 124: // type_specifier ::= IMAGINARY \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 125: // type_specifier ::= atomic_type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 126: // type_specifier ::= struct_or_union_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 127: // type_specifier ::= enum_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 128: // type_specifier ::= TYPEDEF_NAME \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 129: // struct_or_union_specifier ::= struct_or_union LBRACE struct_declaration_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 130: // struct_or_union_specifier ::= struct_or_union IDENTIFIER LBRACE struct_declaration_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 131: // struct_or_union_specifier ::= struct_or_union IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 132: // struct_or_union ::= STRUCT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union\",33, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 133: // struct_or_union ::= UNION \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union\",33, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 134: // struct_declaration_list ::= struct_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration_list\",34, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 135: // struct_declaration_list ::= struct_declaration_list struct_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration_list\",34, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 136: // struct_declaration ::= specifier_qualifier_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 137: // struct_declaration ::= specifier_qualifier_list struct_declarator_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 138: // struct_declaration ::= static_assert_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 139: // specifier_qualifier_list ::= type_specifier specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 140: // specifier_qualifier_list ::= type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 141: // specifier_qualifier_list ::= type_qualifier specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 142: // specifier_qualifier_list ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 143: // struct_declarator_list ::= struct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator_list\",38, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 144: // struct_declarator_list ::= struct_declarator_list COMMA struct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator_list\",38, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 145: // struct_declarator ::= COLON constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 146: // struct_declarator ::= declarator COLON constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 147: // struct_declarator ::= declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 148: // enum_specifier ::= ENUM LBRACE enumerator_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 149: // enum_specifier ::= ENUM LBRACE enumerator_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 150: // enum_specifier ::= ENUM IDENTIFIER LBRACE enumerator_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 151: // enum_specifier ::= ENUM IDENTIFIER LBRACE enumerator_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 152: // enum_specifier ::= ENUM IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 153: // enumerator_list ::= enumerator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator_list\",41, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 154: // enumerator_list ::= enumerator_list COMMA enumerator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator_list\",41, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 155: // enumerator ::= enumeration_constant EQ constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator\",42, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 156: // enumerator ::= enumeration_constant \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator\",42, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 157: // atomic_type_specifier ::= ATOMIC LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"atomic_type_specifier\",43, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 158: // type_qualifier ::= CONST \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 159: // type_qualifier ::= RESTRICT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 160: // type_qualifier ::= VOLATILE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 161: // type_qualifier ::= ATOMIC \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 162: // function_specifier ::= INLINE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_specifier\",44, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 163: // function_specifier ::= NORETURN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_specifier\",44, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 164: // alignment_specifier ::= ALIGNAS LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"alignment_specifier\",45, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 165: // alignment_specifier ::= ALIGNAS LPAREN constant_expression RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"alignment_specifier\",45, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 166: // declarator ::= pointer direct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declarator\",31, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 167: // declarator ::= direct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declarator\",31, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 168: // direct_declarator ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 169: // direct_declarator ::= LPAREN declarator RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 170: // direct_declarator ::= direct_declarator LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 171: // direct_declarator ::= direct_declarator LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 172: // direct_declarator ::= direct_declarator LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 173: // direct_declarator ::= direct_declarator LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 174: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 175: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 176: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 177: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 178: // direct_declarator ::= direct_declarator LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 179: // direct_declarator ::= direct_declarator LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 180: // direct_declarator ::= direct_declarator LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 181: // direct_declarator ::= direct_declarator LPAREN identifier_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 182: // pointer ::= MULT type_qualifier_list pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 183: // pointer ::= MULT type_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 184: // pointer ::= MULT pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 185: // pointer ::= MULT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 186: // type_qualifier_list ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier_list\",50, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 187: // type_qualifier_list ::= type_qualifier_list type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier_list\",50, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 188: // parameter_type_list ::= parameter_list COMMA ELLIPSIS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_type_list\",48, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 189: // parameter_type_list ::= parameter_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_type_list\",48, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 190: // parameter_list ::= parameter_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_list\",70, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 191: // parameter_list ::= parameter_list COMMA parameter_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_list\",70, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 192: // parameter_declaration ::= declaration_specifiers declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 193: // parameter_declaration ::= declaration_specifiers abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 194: // parameter_declaration ::= declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 195: // identifier_list ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"identifier_list\",49, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 196: // identifier_list ::= identifier_list COMMA IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"identifier_list\",49, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 197: // type_name ::= specifier_qualifier_list abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_name\",13, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 198: // type_name ::= specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_name\",13, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 199: // abstract_declarator ::= pointer direct_abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 200: // abstract_declarator ::= pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 201: // abstract_declarator ::= direct_abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 202: // direct_abstract_declarator ::= LPAREN abstract_declarator RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 203: // direct_abstract_declarator ::= LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 204: // direct_abstract_declarator ::= LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 205: // direct_abstract_declarator ::= LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 206: // direct_abstract_declarator ::= LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 207: // direct_abstract_declarator ::= LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 208: // direct_abstract_declarator ::= LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 209: // direct_abstract_declarator ::= LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 210: // direct_abstract_declarator ::= LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 211: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 212: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 213: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 214: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 215: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 216: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 217: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 218: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 219: // direct_abstract_declarator ::= LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 220: // direct_abstract_declarator ::= LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 221: // direct_abstract_declarator ::= direct_abstract_declarator LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 222: // direct_abstract_declarator ::= direct_abstract_declarator LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 223: // initializer ::= LBRACE initializer_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 224: // initializer ::= LBRACE initializer_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 225: // initializer ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 226: // initializer_list ::= designation initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 227: // initializer_list ::= initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 228: // initializer_list ::= initializer_list COMMA designation initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 229: // initializer_list ::= initializer_list COMMA initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 230: // designation ::= designator_list EQ \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designation\",55, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 231: // designator_list ::= designator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator_list\",56, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 232: // designator_list ::= designator_list designator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator_list\",56, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 233: // designator ::= LBRACK constant_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator\",57, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 234: // designator ::= DOT IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator\",57, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 235: // static_assert_declaration ::= STATIC_ASSERT LPAREN constant_expression COMMA STRING_LITERAL RPAREN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"static_assert_declaration\",58, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 236: // statement ::= labeled_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 237: // statement ::= compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 238: // statement ::= expression_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 239: // statement ::= selection_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 240: // statement ::= iteration_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 241: // statement ::= jump_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 242: // labeled_statement ::= IDENTIFIER COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 243: // labeled_statement ::= CASE constant_expression COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 244: // labeled_statement ::= DEFAULT COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 245: // compound_statement ::= LBRACE RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"compound_statement\",61, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 246: // compound_statement ::= LBRACE block_item_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"compound_statement\",61, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 247: // block_item_list ::= block_item \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item_list\",62, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 248: // block_item_list ::= block_item_list block_item \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item_list\",62, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 249: // block_item ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item\",63, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 250: // block_item ::= statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item\",63, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 251: // expression_statement ::= SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression_statement\",66, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 252: // expression_statement ::= expression SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression_statement\",66, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 253: // selection_statement ::= IF LPAREN expression RPAREN statement ELSE statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 254: // selection_statement ::= IF LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 255: // selection_statement ::= SWITCH LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 256: // iteration_statement ::= WHILE LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 257: // iteration_statement ::= DO statement WHILE LPAREN expression RPAREN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 258: // iteration_statement ::= FOR LPAREN expression_statement expression_statement RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 259: // iteration_statement ::= FOR LPAREN expression_statement expression_statement expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 260: // iteration_statement ::= FOR LPAREN declaration expression_statement RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 261: // iteration_statement ::= FOR LPAREN declaration expression_statement expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 262: // jump_statement ::= GOTO IDENTIFIER SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 263: // jump_statement ::= CONTINUE SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 264: // jump_statement ::= BREAK SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 265: // jump_statement ::= RETURN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 266: // jump_statement ::= RETURN expression SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 267: // translation_unit ::= external_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"translation_unit\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 268: // translation_unit ::= translation_unit external_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"translation_unit\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 269: // external_declaration ::= function_definition \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"external_declaration\",67, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 270: // external_declaration ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"external_declaration\",67, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 271: // function_definition ::= declaration_specifiers declarator declaration_list compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_definition\",68, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 272: // function_definition ::= declaration_specifiers declarator compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_definition\",68, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 273: // declaration_list ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_list\",73, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 274: // declaration_list ::= declaration_list declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_list\",73, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$parser$act_num+\"found in internal parse table\");\n\n }\n }", "public interface ICommandDisplayAction extends IAction{\r\n\r\n\t \r\n\t\r\n\tpublic void displayPallet() ;\r\n\r\n\tpublic void displayArena();\r\n\t\r\n\tpublic void displayComponent(String componentIntanceName) ;\r\n\t\r\n\tpublic void displayChain( ) ;\r\n}", "public void act() \n {\n canSeeAlex();\n }", "@Override\n public void action(Jugador jugador) {\n\n }", "public void actionOffered();", "public final java_cup.runtime.Symbol CUP$LuaGrammarCup$do_action(\r\n int CUP$LuaGrammarCup$act_num,\r\n java_cup.runtime.lr_parser CUP$LuaGrammarCup$parser,\r\n java.util.Stack CUP$LuaGrammarCup$stack,\r\n int CUP$LuaGrammarCup$top)\r\n throws java.lang.Exception\r\n {\r\n /* Symbol object for return from actions */\r\n java_cup.runtime.Symbol CUP$LuaGrammarCup$result;\r\n\r\n /* select the action based on the action number */\r\n switch (CUP$LuaGrammarCup$act_num)\r\n {\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 112: // string ::= LONGSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 111: // string ::= CHARSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 110: // string ::= NORMALSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 109: // number ::= HEX \r\n {\r\n Object RESULT =null;\r\n\t\tint hleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint hright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject h = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = h;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 108: // number ::= INT \r\n {\r\n Object RESULT =null;\r\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = Integer.parseInt(i.toString());\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 107: // number ::= FLOAT \r\n {\r\n Object RESULT =null;\r\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject f = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = Float.parseFloat(f.toString());\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 106: // number ::= EXP \r\n {\r\n Object RESULT =null;\r\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = e; \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 105: // unop ::= SHARP \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 104: // unop ::= NOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 103: // unop ::= MINUS \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 102: // binop ::= OR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 101: // binop ::= AND \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 100: // binop ::= NEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 99: // binop ::= EQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 98: // binop ::= MAIEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 97: // binop ::= MAIOR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 96: // binop ::= MINEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 95: // binop ::= MINOR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 94: // binop ::= DOTDOT \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 93: // binop ::= MOD \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 92: // binop ::= EXPON \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 91: // binop ::= DIVIDE \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 90: // binop ::= MULT \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 89: // binop ::= MINUS \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 88: // binop ::= PLUS \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 87: // fieldsep ::= COMMA \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldsep\",19, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 86: // fieldsep ::= SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldsep\",19, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 85: // field ::= exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 84: // field ::= VAR_NAME ASSIGN exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 83: // field ::= LBRACK exp RBRACK ASSIGN exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 82: // fieldlist ::= fieldlist fieldsep field \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found fieldlist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldlist\",18, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 81: // fieldlist ::= field \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found a field\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldlist\",18, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 80: // tableconstructor ::= LCURLY fieldlist RCURLY \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"table constructor\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"tableconstructor\",27, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 79: // tableconstructor ::= LCURLY RCURLY \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"tableconstructor\",27, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 78: // parlist ::= TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 77: // parlist ::= namelist COMMA TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 76: // parlist ::= namelist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 75: // funcbody ::= LPAREN parlist RPAREN block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"functionbody with par\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcbody\",13, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 74: // funcbody ::= LPAREN RPAREN block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"functionbody\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcbody\",13, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 73: // function ::= FUNCTION funcbody \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"function\",14, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 72: // args ::= string \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 71: // args ::= tableconstructor \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 70: // args ::= LPAREN explist RPAREN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"args (explist)\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 69: // args ::= LPAREN RPAREN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"args ()\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 68: // functioncall ::= prefixexp COLON VAR_NAME args \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function call\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"functioncall\",17, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 67: // functioncall ::= prefixexp args \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function call\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"functioncall\",17, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 66: // prefixexp ::= functioncall \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"prefixexp->functioncall\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"prefixexp\",21, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 65: // prefixexp ::= var \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"prefixexp->var\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"prefixexp\",21, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 64: // exp_member ::= unop exp_member \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 63: // exp_member ::= TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 62: // exp_member ::= tableconstructor \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 61: // exp_member ::= prefixexp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 60: // exp_member ::= function \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 59: // exp_member ::= string \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 58: // exp_member ::= number \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found number\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 57: // exp_member ::= TRUE \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 56: // exp_member ::= FALSE \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 55: // exp_member ::= NIL \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 54: // exp_member_recoursive ::= exp_member binop exp_member_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found binop exp\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member_recoursive\",35, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 53: // exp_member_recoursive ::= exp_member \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member_recoursive\",35, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 52: // exp ::= exp_member_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp\",5, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 51: // exp_recoursive ::= exp COMMA exp_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"exp_recoursive\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_recoursive\",34, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 50: // exp_recoursive ::= exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_recoursive\",34, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 49: // explist ::= exp_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found explist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"explist\",12, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 48: // namelist ::= namelist COMMA VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"namelist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"namelist\",36, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 47: // namelist ::= VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"namelist\",36, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 46: // var ::= prefixexp DOT VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 45: // var ::= prefixexp LBRACK exp RBRACK \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 44: // var ::= VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 43: // varlist ::= varlist var COMMA \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"varlist\",24, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 42: // varlist ::= var \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"varlist\",24, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 41: // dot_var_name ::= DOT VAR_NAME dot_var_name \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"dot_var_name\",42, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 40: // dot_var_name ::= \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"dot_var_name\",42, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 39: // funcname ::= VAR_NAME dot_var_name COLON VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcname\",15, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 38: // funcname ::= VAR_NAME dot_var_name \r\n {\r\n Object RESULT =null;\r\n\t\tint varleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint varright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject var = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tSystem.out.println(\"funcname:\" + var); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcname\",15, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 37: // break_stat ::= BREAK SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"break_stat\",38, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 36: // break_stat ::= BREAK \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"break stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"break_stat\",38, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 35: // return_stat ::= RETURN explist SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 34: // return_stat ::= RETURN SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 33: // return_stat ::= RETURN explist \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"return with explist\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 32: // return_stat ::= RETURN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"return stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 31: // last_stat ::= break_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"last_stat\",9, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 30: // last_stat ::= return_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"last_stat\",9, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 29: // for_stat ::= FOR namelist IN explist DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"for stat in\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-6)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 28: // for_stat ::= FOR VAR_NAME ASSIGN exp COMMA exp COMMA exp DO block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-10)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 27: // for_stat ::= FOR VAR_NAME ASSIGN exp COMMA exp DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"for stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-8)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 26: // if_recoursive ::= if_recoursive ELSEIF exp THEN block \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_recoursive\",41, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 25: // if_recoursive ::= ELSEIF exp THEN block \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_recoursive\",41, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 24: // if_stat ::= IF exp THEN block if_recoursive ELSE block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-7)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 23: // if_stat ::= IF exp THEN block ELSE block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-6)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 22: // if_stat ::= IF exp THEN block if_recoursive END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-5)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 21: // if_stat ::= IF exp THEN block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 20: // stat ::= LOCAL namelist ASSIGN explist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 19: // stat ::= LOCAL namelist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 18: // stat ::= LOCAL FUNCTION VAR_NAME funcbody \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 17: // stat ::= FUNCTION funcname funcbody \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found Function stat\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 16: // stat ::= for_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 15: // stat ::= if_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 14: // stat ::= REPEAT block UNTIL exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 13: // stat ::= WHILE exp DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).value;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject b = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tSystem.out.println(\"while statement\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 12: // stat ::= DO block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 11: // stat ::= functioncall \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 10: // stat ::= varlist ASSIGN explist \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"varlist assign explist\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 9: // block ::= chunk \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"block\",1, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 8: // stat_recoursive ::= stat SEMI stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 7: // stat_recoursive ::= stat stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 6: // stat_recoursive ::= stat SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 5: // stat_recoursive ::= stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 4: // chunk ::= \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 3: // chunk ::= last_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 2: // chunk ::= stat_recoursive last_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 1: // $START ::= chunk EOF \r\n {\r\n Object RESULT =null;\r\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject start_val = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tRESULT = start_val;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n /* ACCEPT */\r\n CUP$LuaGrammarCup$parser.done_parsing();\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 0: // chunk ::= stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /* . . . . . .*/\r\n default:\r\n throw new Exception(\r\n \"Invalid action number found in internal parse table\");\r\n\r\n }\r\n }", "static void actionPrompt() {\n prompt:\n while (true) {\n String line = \"\";\n System.out.println(\"\\nWhat do you want to do: (S)ave, (F)ill, (L)ine, (V)isible, (Q)uit: \");\n while (line.length() < 1)\n line = scan.nextLine().toUpperCase();\n char action = line.charAt(0);\n switch (action) {\n case 'Q':\n break prompt;\n case 'V':\n visible(); break;\n case 'L':\n line(); break;\n case 'F':\n fill(); break;\n case 'S':\n save(); break;\n default:\n System.out.println(\"Not a valid command.\");\n }\n }\n }", "@Override\n\tpublic void action() {\n\t\tACLMessage msgRx = myAgent.receive();\n\t\tif (msgRx != null && msgRx.getPerformative() == ACLMessage.REQUEST) {\n\t\t\tContentManager contentManager = myAgent.getContentManager();\n\t\t\tSystem.out.println(\"RECEIVED = \" + msgRx.getContent());\n\t\t\tmsgRx.setLanguage(\"fipa-sl\");\n\t\t\tmsgRx.setOntology(\"blocks-ontology\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tContentElementList elementList = (ContentElementList) contentManager\n\t\t\t\t\t\t.extractContent(msgRx);\n\n\t\t\t\tIterator elementIterator = elementList.iterator();\n\n\t\t\t\twhile (elementIterator.hasNext()) {\n\t\t\t\t\tAction action = (Action) elementIterator.next();\n\t\t\t\t\t((Environment) myAgent).getWorld().getActionList().add((Executable) (action.getAction()));\n//\t\t\t\t\t((Executable) (action.getAction()))\n//\t\t\t\t\t\t\t.execute((Environment) myAgent);\n\t\t\t\t}\n\n\t\t\t} catch (UngroundedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (CodecException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (OntologyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tblock();\n\t\t}\n\t\t\n\t}", "public void setAction(String action) { this.action = action; }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "@Override\n\t\t\tpublic void performAction(PrintWriter pw) {\n\t\t\t\t\n\t\t\t\tString hello = \"helloworld\";\n\t\t\t\t\n\t\t\t\tpw.println(hello);\n\t\t\t\t\n\t\t\t}", "static void perform_ani(String passed){\n\t\tint type = type_of_ani(passed);\n\t\tif(type==1)\n\t\t\tani_with_acc(passed);\n\t}", "public final java_cup.runtime.Symbol CUP$CoolParser$do_action_part00000000(\n int CUP$CoolParser$act_num,\n java_cup.runtime.lr_parser CUP$CoolParser$parser,\n java.util.Stack CUP$CoolParser$stack,\n int CUP$CoolParser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$CoolParser$result;\n\n /* select the action based on the action number */\n switch (CUP$CoolParser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // program ::= class_list \n {\n programc RESULT =null;\n\t\tClasses cl = (Classes)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new programc(curr_lineno(), cl); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"program\",0, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // $START ::= program EOF \n {\n Object RESULT =null;\n\t\tprogramc start_val = (programc)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, RESULT);\n }\n /* ACCEPT */\n CUP$CoolParser$parser.done_parsing();\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // program ::= error \n {\n programc RESULT =null;\n\t\t RESULT = new programc(curr_lineno(),\n new Classes(curr_lineno())); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"program\",0, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // class_list ::= class_cc \n {\n Classes RESULT =null;\n\t\tclass_c c = (class_c)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = (new Classes(curr_lineno())).appendElement(c); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_list\",1, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // class_list ::= class_list class_cc \n {\n Classes RESULT =null;\n\t\tClasses cl = (Classes)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tclass_c c = (class_c)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = cl.appendElement(c); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_list\",1, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // class_cc ::= CLASS TYPEID LBRACE optional_feature_list RBRACE SEMI \n {\n class_c RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tFeatures f = (Features)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\t RESULT = new class_c(curr_lineno(), n, \n\t\t AbstractTable.idtable.addString(\"Object\"), \n\t\t\t\t f, curr_filename()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_cc\",2, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // class_cc ::= CLASS TYPEID INHERITS TYPEID LBRACE optional_feature_list RBRACE SEMI \n {\n class_c RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-6)).value;\n\t\tAbstractSymbol p = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tFeatures f = (Features)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\t RESULT = new class_c(curr_lineno(), n, p, f, curr_filename()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_cc\",2, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // class_cc ::= error SEMI \n {\n class_c RESULT =null;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_cc\",2, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // optional_feature_list ::= \n {\n Features RESULT =null;\n\t\t RESULT = new Features(curr_lineno()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"optional_feature_list\",3, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // optional_feature_list ::= f2 \n {\n Features RESULT =null;\n\t\tFeature feature2 = (Feature)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new Features(curr_lineno()).appendElement(feature2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"optional_feature_list\",3, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // optional_feature_list ::= optional_feature_list f2 \n {\n Features RESULT =null;\n\t\tFeatures flist = (Features)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tFeature feature2 = (Feature)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = flist.appendElement(feature2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"optional_feature_list\",3, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // f2 ::= OBJECTID COLON TYPEID SEMI \n {\n Feature RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t \n\t\tRESULT = new attr(curr_lineno(), o, t, new no_expr(curr_lineno())); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // f2 ::= OBJECTID COLON TYPEID ASSIGN expr SEMI \n {\n Feature RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-5)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tExpression ex1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new attr(curr_lineno(), o, t, ex1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // f2 ::= OBJECTID LPAREN formal_list RPAREN COLON TYPEID LBRACE expr RBRACE SEMI \n {\n Feature RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-9)).value;\n\t\tFormals f1 = (Formals)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-7)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\t RESULT = new method(curr_lineno(), o, f1, t, e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // f2 ::= error SEMI \n {\n Feature RESULT =null;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // formal_list ::= \n {\n Formals RESULT =null;\n\t\t RESULT = new Formals(curr_lineno()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",9, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // formal_list ::= formal_1 \n {\n Formals RESULT =null;\n\t\tFormal formal1 = (Formal)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new Formals(curr_lineno()).appendElement(formal1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",9, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // formal_list ::= formal_list formal_1 \n {\n Formals RESULT =null;\n\t\tFormals f2 = (Formals)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tFormal formal1 = (Formal)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = f2.appendElement(formal1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",9, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // formal_1 ::= OBJECTID COLON TYPEID \n {\n Formal RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new formalc(curr_lineno(), o, t); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_1\",8, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // formal_1 ::= OBJECTID COLON TYPEID COMMA \n {\n Formal RESULT =null;\n\t\tAbstractSymbol obj = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol typ = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new formalc(curr_lineno(), obj, typ); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_1\",8, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // expr ::= expr PLUS expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new plus(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // expr ::= expr MINUS expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new sub(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // expr ::= expr MULT expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new mul(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // expr ::= expr DIV expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new divide(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // expr ::= NEG expr \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new neg(curr_lineno(), e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // expr ::= expr LT expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new lt(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // expr ::= expr EQ expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new eq(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // expr ::= expr LE expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new leq(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // expr ::= NOT expr \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new comp(curr_lineno(), e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // expr ::= LPAREN expr RPAREN \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = e; \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // expr ::= INT_CONST \n {\n Expression RESULT =null;\n\t\tAbstractSymbol i = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new int_const(curr_lineno(), i); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // expr ::= STR_CONST \n {\n Expression RESULT =null;\n\t\tAbstractSymbol s = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new string_const(curr_lineno(), s); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // expr ::= BOOL_CONST \n {\n Expression RESULT =null;\n\t\tBoolean b = (Boolean)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new bool_const(curr_lineno(), b); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // expr ::= OBJECTID \n {\n Expression RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new object(curr_lineno(), o); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // expr ::= OBJECTID actuals \n {\n Expression RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tExpressions a = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new dispatch(curr_lineno(),\n\t new object(curr_lineno(), \n\t AbstractTable.idtable.addString(\"self\")),\n\t\t\t\t n, a); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // expr ::= expr DOT OBJECTID actuals \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tExpressions b = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new dispatch(curr_lineno(), e1, n, b); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // expr ::= expr AT TYPEID DOT OBJECTID actuals \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-5)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tExpressions b = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new static_dispatch(curr_lineno(), e1, t, n, b); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // expr ::= ISVOID expr \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new isvoid(curr_lineno(), e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // expr ::= OBJECTID ASSIGN expr \n {\n Expression RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new assign(curr_lineno(), o, e1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // expr ::= IF expr THEN expr ELSE expr FI \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-5)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tExpression e3 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new cond(curr_lineno(), e1, e2, e3); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // expr ::= NEW TYPEID \n {\n Expression RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new new_(curr_lineno(), n); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // expr ::= LBRACE block_exp_list RBRACE \n {\n Expression RESULT =null;\n\t\tExpressions exprslist = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new block(curr_lineno(), exprslist); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // expr ::= CASE expr OF case_list ESAC \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tCases cl = (Cases)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new typcase(curr_lineno(), e, cl); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // expr ::= WHILE expr LOOP expr POOL \n {\n Expression RESULT =null;\n\t\tExpression eone = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tExpression etwo = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tRESULT = new loop(curr_lineno(), eone, etwo); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // expr ::= LET lettail \n {\n Expression RESULT =null;\n\t\tlet tail = (let)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = tail; \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // lettail ::= OBJECTID COLON TYPEID ASSIGN expr IN expr \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-6)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // lettail ::= OBJECTID COLON TYPEID IN expr \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, new no_expr(curr_lineno()), e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 47: // lettail ::= OBJECTID COLON TYPEID ASSIGN expr COMMA lettail \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-6)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tlet tail = (let)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, e1, tail); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 48: // lettail ::= OBJECTID COLON TYPEID COMMA lettail \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tlet tail = (let)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, new no_expr(curr_lineno()), tail); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 49: // lettail ::= error SEMI \n {\n let RESULT =null;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 50: // lettail ::= error IN expr \n {\n let RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 51: // actuals ::= LPAREN RPAREN \n {\n Expressions RESULT =null;\n\t\t RESULT = new Expressions(curr_lineno()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"actuals\",5, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 52: // actuals ::= LPAREN exp_list RPAREN \n {\n Expressions RESULT =null;\n\t\tExpressions el = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = el; \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"actuals\",5, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 53: // case_list ::= case_1 \n {\n Cases RESULT =null;\n\t\tCase c1 = (Case)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new Cases(curr_lineno()).appendElement(c1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_list\",12, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 54: // case_list ::= case_1 SEMI \n {\n Cases RESULT =null;\n\t\tCase c1 = (Case)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new Cases(curr_lineno()).appendElement(c1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_list\",12, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 55: // case_list ::= case_list case_1 SEMI \n {\n Cases RESULT =null;\n\t\tCases cl = (Cases)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tCase c1 = (Case)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = cl.appendElement(c1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_list\",12, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 56: // case_1 ::= OBJECTID COLON TYPEID DARROW expr \n {\n Case RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new branch(curr_lineno(), o, t, e1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_1\",13, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 57: // exp_list ::= expr \n {\n Expressions RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = (new Expressions(curr_lineno())).appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"exp_list\",6, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 58: // exp_list ::= exp_list COMMA expr \n {\n Expressions RESULT =null;\n\t\tExpressions el = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = el.appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"exp_list\",6, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 59: // block_exp_list ::= expr SEMI \n {\n Expressions RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new Expressions(curr_lineno()).appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"block_exp_list\",7, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 60: // block_exp_list ::= block_exp_list expr SEMI \n {\n Expressions RESULT =null;\n\t\tExpressions el = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = el.appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"block_exp_list\",7, RESULT);\n }\n return CUP$CoolParser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$CoolParser$act_num+\"found in internal parse table\");\n\n }\n }" ]
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.6035597", "0.6035597", "0.60223806", "0.6011715", "0.5994028", "0.5986706", "0.5973847", "0.59363747", "0.59299153", "0.59274375", "0.5925999", "0.59236354", "0.5900132", "0.58874744", "0.5880966", "0.5860396", "0.5858362", "0.5852421", "0.5834586", "0.5807131", "0.5794122", "0.57809204", "0.5775529", "0.5772291", "0.57655984", "0.5762837", "0.57587755", "0.5758653", "0.5752396", "0.5749633", "0.5743911", "0.5743911", "0.5743657", "0.5743657", "0.5740693", "0.57326096", "0.5722666", "0.5708811", "0.5706221", "0.57024294", "0.56944466", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5685764", "0.56807494", "0.5661615", "0.5650216", "0.5650081", "0.56464934", "0.5645747", "0.5641903", "0.5627175", "0.5619585", "0.5615084", "0.5601284", "0.5599514", "0.55944145", "0.55931157", "0.55916977", "0.55916977", "0.55916977", "0.5590322", "0.55799615", "0.55674374", "0.55666804", "0.5555143", "0.5554079", "0.55520636", "0.5545089", "0.5543725", "0.55414605", "0.55311835", "0.5530412", "0.55255187", "0.55118287" ]
0.0
-1
Write code here that turns the phrase above into concrete actions
@When("I click on datepicker") public void i_click_on_datepicker() { System.out.println("inside date picker"); jQueryHPage.clickDatePicker(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public void action() {\n }", "public interface Action { //придумываем интерфейс для описания действий, присущих роботу\n Action dogo(MapOfAction mapOfAction); //объявляем функцию для действий, которой передаём карту\n\n}", "public abstract ActionInMatch act();", "void determineNextAction();", "public void executeAction( String actionInfo );", "interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }", "public void performAction(String s) {\n try {\n CommandToClient command = CommandToClient.valueOf(Parser.getCommand(s));\n s = s.substring(5);\n switch (command) {\n case START:\n gameFrame.startGame();\n break;\n case ATEMP:\n gameFrame.attempt(s);\n break;\n case LAUNC:\n gameFrame.resultOfAttempt(s);\n break;\n case TOCOL:\n // will announce that boat has been sank\n System.out.println(\"You sank the \" + SetOfBoats.getNames()[Integer.parseInt(s)]);\n break;\n case WINNE:\n // will announce that game is won\n System.out.println(\"You have won!\");\n break;\n case PRINT:\n gameFrame.printWG();\n default:\n System.out.println(\"Incorrect command : \" + s);\n }\n\n } catch (CommandException e) {\n System.out.println(\"Command \" + s + \" not valid\");\n e.printStackTrace();\n }\n }", "public interface Action {\n\n /**\n * The executeAction method takes in actionInfo and runs the action code\n * @param actionInfo all information sent by the test file to the action\n */\n public void executeAction( String actionInfo );\n\n}", "public static int complexAction(String str)\n {\n if (str.equalsIgnoreCase(\"Play\") || str.equalsIgnoreCase(\"Start\") || str.equalsIgnoreCase(\"Begin\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Pause\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"QUIT\"))\n {\n return 3;\n }\n else\n { return 0;} \n }", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "private String convertAction(String action) {\n\t\treturn action.toLowerCase();\n\t}", "abstract public void performAction();", "IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);", "String replaceParserMessage(Entity e, String action);", "private void generateKeywordActions(List<Keyword> keywords) {\n \t\t\n \t}", "public abstract String getIntentActionString();", "public void action() {\n action.action();\n }", "@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}", "public static int simpleAction(String str)\n {\n if (str.equalsIgnoreCase(\"Y\") || str.equalsIgnoreCase(\"Yes\")) //your actions are yes\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"N\") || str.equalsIgnoreCase(\"No\")) // your actions are no\n {\n return 0;\n }\n else\n {\n return 2;\n }\n }", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}", "public void processAction(CIDAction action);", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "Expression getActionSentence();", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void doAction(){}", "public void act() {\n\t}", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public abstract boolean resolveAction(String str, Bundle bundle);", "public void actionButton(String text);", "public final java_cup.runtime.Symbol CUP$Asintactico$do_action_part00000001(\n int CUP$Asintactico$act_num,\n java_cup.runtime.lr_parser CUP$Asintactico$parser,\n java.util.Stack CUP$Asintactico$stack,\n int CUP$Asintactico$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$Asintactico$result;\n\n /* select the action based on the action number */\n switch (CUP$Asintactico$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 300: // FEATURE_WORD ::= CARETOSTANDARDS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 301: // FEATURE_WORD ::= DARE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 302: // FEATURE_WORD ::= DOMINANCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 303: // FEATURE_WORD ::= HARDNESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 304: // FEATURE_WORD ::= APPREHESION error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 305: // FEATURE_WORD ::= INDEPENDENCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 306: // FEATURE_WORD ::= LIVELINESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 307: // FEATURE_WORD ::= OPENNESSTOCHANGE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 308: // FEATURE_WORD ::= PERFECTIONISM error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 309: // FEATURE_WORD ::= PRIVACY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 310: // FEATURE_WORD ::= REASONING error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 311: // FEATURE_WORD ::= SELFCONTROL error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 312: // FEATURE_WORD ::= SELFSUFFICIENCY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 313: // FEATURE_WORD ::= SENSITIVITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 314: // FEATURE_WORD ::= SOCIABILITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 315: // FEATURE_WORD ::= STABILITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 316: // FEATURE_WORD ::= STRESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 317: // FEATURE_WORD ::= SURVEILLANCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 318: // FEATURE_WORD ::= error PARENTH2 \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Syntax Error: FEATURE WORD expected. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 319: // CTRL_STR ::= LOOP_STR \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"CTRL_STR\",17, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 320: // CTRL_STR ::= IF_STR \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"CTRL_STR\",17, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 321: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 322: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY ELSE CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-8)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 323: // IF_STR ::= IF error COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 324: // IF_STR ::= IF error PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-6)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 325: // IF_STR ::= IF PARENTH1 COND CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Rigth parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 326: // IF_STR ::= IF PARENTH1 COND PARENTH2 error BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 327: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Else malformed. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-6)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 328: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY ELSE BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-7)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 329: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Else malformed. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-7)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 330: // LOOP_STR ::= LOOP PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 331: // LOOP_STR ::= LOOP error COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left Parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 332: // LOOP_STR ::= LOOP PARENTH1 COND error CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 333: // LOOP_STR ::= LOOP PARENTH1 COND PARENTH2 error BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 334: // LOOP_STR ::= LOOP PARENTH1 COND BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 335: // LOOP_STR ::= LOOP COND PARENTH2 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left Parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$Asintactico$act_num+\"found in internal parse table\");\n\n }\n }", "private void appendAction(int action) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(context.getString(action));\n \t}", "@Override\n public void act() {\n }", "private void setAction(String action)\r\n/* 46: */ {\r\n/* 47: 48 */ this.action = action;\r\n/* 48: */ }", "public abstract String intercept(ActionInvocation invocation) throws Exception;", "void showOthersActions(String message);", "public void performAction();", "protected abstract void action(Object obj);", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "String getAction();", "String getAction();", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public abstract boolean checkAction(String str);", "public int showPossibleActions(String[] string);", "public void commandAction (Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction\n // write pre-action user code here\nif (displayable == list) {//GEN-BEGIN:|7-commandAction|1|15-preAction\nif (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|1|15-preAction\n // write pre-action user code here\nlistAction ();//GEN-LINE:|7-commandAction|2|15-postAction\n // write post-action user code here\n} else if (command == exitCommand) {//GEN-LINE:|7-commandAction|3|20-preAction\n // write pre-action user code here\nexitMIDlet ();//GEN-LINE:|7-commandAction|4|20-postAction\n // write post-action user code here\n}//GEN-BEGIN:|7-commandAction|5|46-preAction\n} else if (displayable == searchList) {\nif (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|5|46-preAction\n // write pre-action user code here\nsearchListAction ();//GEN-LINE:|7-commandAction|6|46-postAction\n // write post-action user code here\n} else if (command == backCommand2) {//GEN-LINE:|7-commandAction|7|54-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|8|54-postAction\n // write post-action user code here\n} else if (command == okCommand1) {//GEN-LINE:|7-commandAction|9|51-preAction\n // write pre-action user code here\nswitchDisplayable (null, getTextTB ());//GEN-LINE:|7-commandAction|10|51-postAction\n \n String sTerm = (String) searches.elementAt(searchList.getSelectedIndex());\n \n String artist = sTerm.substring(0, sTerm.indexOf(\";\"));\n String song = sTerm.substring(sTerm.indexOf(\";\")+1);\n this.seatchText(artist,song);\n artistTf.setString(artist);\n songTF.setString(song);\n}//GEN-BEGIN:|7-commandAction|11|36-preAction\n} else if (displayable == seatchform) {\nif (command == backCommand) {//GEN-END:|7-commandAction|11|36-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|12|36-postAction\n // write post-action user code here\n} else if (command == okCommand) {//GEN-LINE:|7-commandAction|13|31-preAction\n // write pre-action user code here\n \nswitchDisplayable (null, getTextTB ());//GEN-LINE:|7-commandAction|14|31-postAction\n searches.insertElementAt(artistTf.getString()+\";\"+songTF.getString(), 0);\n recUtil.updateRecord(searches);\n this.seatchText(artistTf.getString(),songTF.getString());\n}//GEN-BEGIN:|7-commandAction|15|40-preAction\n} else if (displayable == textTB) {\nif (command == backCommand1) {//GEN-END:|7-commandAction|15|40-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSeatchform ());//GEN-LINE:|7-commandAction|16|40-postAction\n // write post-action user code here\n} else if (command == startC) {//GEN-LINE:|7-commandAction|17|43-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|18|43-postAction\n // write post-action user code here\n}//GEN-BEGIN:|7-commandAction|19|7-postCommandAction\n}//GEN-END:|7-commandAction|19|7-postCommandAction\n // write post-action user code here\n}", "private void Log(String action) {\r\n\t}", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public interface IIQActions {\n void think();\n Knowledge learn(Knowledge source, Knowledge dest);\n}", "public String parseBattleAction() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Attack (A)\");\n\t\tSystem.out.println(\"Spell (S)\");\n\t\tSystem.out.println(\"Equip/Unequip/Use Item (E)\");\n\t\tboolean isValidMove = false;\n\t\tString s = null;\n\t\twhile(!isValidMove) {\n\t\t\t s = parseString().toUpperCase();\n\t\t\t\n\t\t\tswitch(s) {\n\t\t\t\tcase \"A\":\t\n\t\t\t\tcase \"S\":\n\t\t\t\tcase \"E\":\n\t\t\t\tcase \"P\":\n\t\t\t\t\tisValidMove = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tprintErrorParse();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t\t\n\t}", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "protected abstract void actionExecuted(SUT system, State state, Action action);", "public void act();", "static void perform_ori(String passed){\n\t\tint type = type_of_ori(passed);\n\t\tif(type==1)\n\t\t\tori_with_acc(passed);\n\t}", "public void action(BotInstance bot, Message message);", "public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }", "public void handleAction(Action action){\n\t\tSystem.out.println(action.getActionType().getName() + \" : \" + action.getValue());\n\t\tDroneClientMain.runCommand(\"python george_helper.py \" + action.getActionType().getName().toLowerCase() + \" \" + action.getValue());\n\t}", "@Override\n protected void executeCommands(ITextTokenStream<BasicTextTokenType> stream) {\n TextToken<BasicTextTokenType> object = stream.getFirstObject();\n String token = object == null ? null : object.getStandardToken();\n if (token != null) {\n if (stream.getVerb() != null){\n switch (stream.getVerb().getType()) {\n case ATTACK:\n attackMob(token, object);\n break;\n case LOOK:\n lookAt(token, object);\n break;\n case MOVE:\n movePlayer(token, object);\n break;\n case GET:\n getItemFromRoom(token, object);\n break;\n case LOOT:\n lootAll(token, object);\n break;\n case DROP:\n dropItem(token, object);\n break;\n case EQUIP: // effect replaced with LOCK\n lock(token, object);\n //equipItem(token, object);\n break;\n case UNEQUIP: // effect replaced with UNLOCK\n unlock(token, object);\n //unequipItem(token, object);\n break;\n case INFO:\n info(token, object);\n break;\n case QUIT:\n quitGame();\n break;\n default:\n return;\n }\n }\n // For objects that can also be used to infer their verbs\n else {\n switch (object.getType()) {\n case DIRECTION:\n movePlayer(token, object);\n break;\n case INVENTORY:\n info(token, object);\n break;\n case HEALTH:\n info(token, object);\n break;\n default:\n return;\n }\n }\n\n } else {\n return;\n }\n\n }", "@Override\n public void action() {\n System.out.println(\"Matchmaker Behaviour\");\n addBehaviour(new RequestToMatchMakerBehaviour());\n\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }", "private void appendAction(int action, String additional) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(String.format(context.getString(action), additional));\n \t}", "public void listAction () {//GEN-END:|13-action|0|13-preAction\n // enter pre-action user code here\nString __selectedString = getList ().getString (getList ().getSelectedIndex ());//GEN-BEGIN:|13-action|1|17-preAction\nif (__selectedString != null) {\nif (__selectedString.equals (\"S\\u00F6k text\")) {//GEN-END:|13-action|1|17-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSeatchform ());//GEN-LINE:|13-action|2|17-postAction\n // write post-action user code here\n} else if (__selectedString.equals (\"Tidigare s\\u00F6kningar\")) {//GEN-LINE:|13-action|3|18-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSearchList ());//GEN-LINE:|13-action|4|18-postAction\n // write post-action user code here\n}//GEN-BEGIN:|13-action|5|13-postAction\n}//GEN-END:|13-action|5|13-postAction\n // enter post-action user code here\n}", "@Override\n protected void doAct() {\n }", "public void action() \n {\n if (!hasSecondWord()) { // there is no second word\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where? Please be more specific\");\n return; \n } \n String direction = getSecondWord(); //second word found\n\n // Possible room\n Room nextRoom = player.getCurrentRoom().getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door in that direction\");\n }\n else {\n if (!nextRoom.isLocked()) {\n enterRoom(nextRoom);\n }\n //unlock room should now be another action instead\n // else if (nextRoom.isUnlocked(null)) {\n // enterRoom(nextRoom);\n // }\n else {\n System.out.println(\"This door is locked!\");\n }\n } \n }", "IWDAction wdCreateNamedAction(WDActionEventHandler eventHandler, String name, String text);", "public interface ActivityAction {\r\n public void viewedActivity(String condition, String viewerFullName);\r\n}", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public static int actions(String str)\n {\n if (str.equalsIgnoreCase(\"Shop\") || str.equalsIgnoreCase(\"S\"))\n {\n return 0;\n }\n else if (str.equalsIgnoreCase(\"Fight\") || str.equalsIgnoreCase(\"F\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Rest\") || str.equalsIgnoreCase(\"R\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"Gamble\") || str.equalsIgnoreCase(\"G\"))\n {\n return 3;\n }\n else if (str.equalsIgnoreCase(\"Account\") || str.equalsIgnoreCase(\"A\"))\n {\n return 4;\n }\n else if (str.equalsIgnoreCase(\"Museum\") || str.equalsIgnoreCase(\"M\"))\n {\n return 5;\n }\n else if (str.equalsIgnoreCase(\"Quest\") || str.equalsIgnoreCase(\"Q\"))\n {\n return 6;\n }\n else if (str.equalsIgnoreCase(\"SumbitScore\") || str.equalsIgnoreCase(\"submit\") || str.equalsIgnoreCase(\"submit score\") || str.equalsIgnoreCase(\"SS\")) \n {\n return 7;\n }\n else \n {\n return 8;\n }\n }", "public final java_cup.runtime.Symbol CUP$parser$do_action_part00000000(\n int CUP$parser$act_num,\n java_cup.runtime.lr_parser CUP$parser$parser,\n java.util.Stack CUP$parser$stack,\n int CUP$parser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$parser$result;\n\n /* select the action based on the action number */\n switch (CUP$parser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // $START ::= translation_unit EOF \n {\n Object RESULT =null;\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tObject start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n /* ACCEPT */\n CUP$parser$parser.done_parsing();\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // primary_expression ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // primary_expression ::= constant \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // primary_expression ::= string \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // primary_expression ::= LPAREN expression RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // primary_expression ::= generic_selection \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // constant ::= I_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // constant ::= F_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // constant ::= ENUMERATION_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // enumeration_constant ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumeration_constant\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // string ::= STRING_LITERAL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"string\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // string ::= FUNC_NAME \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"string\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // generic_selection ::= GENERIC LPAREN assignment_expression COMMA generic_assoc_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_selection\",5, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // generic_assoc_list ::= generic_association \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_assoc_list\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // generic_assoc_list ::= generic_assoc_list COMMA generic_association \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_assoc_list\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // generic_association ::= type_name COLON assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_association\",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // generic_association ::= DEFAULT COLON assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_association\",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // postfix_expression ::= primary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // postfix_expression ::= postfix_expression LBRACK expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // postfix_expression ::= postfix_expression LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // postfix_expression ::= postfix_expression LPAREN argument_expression_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // postfix_expression ::= postfix_expression DOT IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // postfix_expression ::= postfix_expression PTR_OP IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // postfix_expression ::= postfix_expression INC_OP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // postfix_expression ::= postfix_expression DEC_OP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // postfix_expression ::= LPAREN type_name LPAREN LBRACE initializer_list LBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // postfix_expression ::= LPAREN type_name RPAREN LBRACE initializer_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // argument_expression_list ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"argument_expression_list\",9, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // argument_expression_list ::= argument_expression_list COMMA assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"argument_expression_list\",9, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // unary_expression ::= postfix_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // unary_expression ::= INC_OP unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // unary_expression ::= DEC_OP unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // unary_expression ::= unary_operator cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // unary_expression ::= SIZEOF unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // unary_expression ::= SIZEOF LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // unary_expression ::= ALIGNOF LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // unary_operator ::= AND \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // unary_operator ::= MULT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // unary_operator ::= PLUS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // unary_operator ::= MINUS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // unary_operator ::= COMP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // unary_operator ::= NOT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // cast_expression ::= unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"cast_expression\",14, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // cast_expression ::= LPAREN type_name RPAREN cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"cast_expression\",14, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // multiplicative_expression ::= cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // multiplicative_expression ::= multiplicative_expression MULT cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // multiplicative_expression ::= multiplicative_expression DIV cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 47: // multiplicative_expression ::= multiplicative_expression MOD cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 48: // additive_expression ::= multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 49: // additive_expression ::= additive_expression PLUS multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 50: // additive_expression ::= additive_expression MINUS multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 51: // shift_expression ::= additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 52: // shift_expression ::= shift_expression LEFT_OP additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 53: // shift_expression ::= shift_expression RIGHT_OP additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 54: // relational_expression ::= shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 55: // relational_expression ::= relational_expression LT shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 56: // relational_expression ::= relational_expression GT shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 57: // relational_expression ::= relational_expression LE_OP shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 58: // relational_expression ::= relational_expression GE_OP shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 59: // equality_expression ::= relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 60: // equality_expression ::= equality_expression EQ_OP relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 61: // equality_expression ::= equality_expression NE_OP relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 62: // and_expression ::= equality_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"and_expression\",19, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 63: // and_expression ::= and_expression AND equality_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"and_expression\",19, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 64: // exclusive_or_expression ::= and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"exclusive_or_expression\",20, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 65: // exclusive_or_expression ::= exclusive_or_expression XOR and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"exclusive_or_expression\",20, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 66: // inclusive_or_expression ::= exclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"inclusive_or_expression\",75, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 67: // inclusive_or_expression ::= inclusive_or_expression OR exclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"inclusive_or_expression\",75, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 68: // logical_and_expression ::= inclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_and_expression\",21, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 69: // logical_and_expression ::= logical_and_expression AND_OP inclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_and_expression\",21, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 70: // logical_or_expression ::= logical_and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_or_expression\",22, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 71: // logical_or_expression ::= logical_or_expression OR_OP logical_and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_or_expression\",22, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 72: // conditional_expression ::= logical_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"conditional_expression\",23, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 73: // conditional_expression ::= logical_or_expression QUESTION expression COLON conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"conditional_expression\",23, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 74: // assignment_expression ::= conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_expression\",11, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 75: // assignment_expression ::= unary_expression assignment_operator assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_expression\",11, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 76: // assignment_operator ::= EQ \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 77: // assignment_operator ::= MUL_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 78: // assignment_operator ::= DIV_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 79: // assignment_operator ::= MOD_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 80: // assignment_operator ::= ADD_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 81: // assignment_operator ::= SUB_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 82: // assignment_operator ::= LEFT_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 83: // assignment_operator ::= RIGHT_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 84: // assignment_operator ::= AND_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 85: // assignment_operator ::= XOR_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 86: // assignment_operator ::= OR_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 87: // expression ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression\",10, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 88: // expression ::= expression COMMA assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression\",10, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 89: // constant_expression ::= conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant_expression\",24, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 90: // declaration ::= declaration_specifiers SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 91: // declaration ::= declaration_specifiers init_declarator_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 92: // declaration ::= static_assert_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 93: // declaration_specifiers ::= storage_class_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 94: // declaration_specifiers ::= storage_class_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 95: // declaration_specifiers ::= type_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 96: // declaration_specifiers ::= type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 97: // declaration_specifiers ::= type_qualifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 98: // declaration_specifiers ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 99: // declaration_specifiers ::= function_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 100: // declaration_specifiers ::= function_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 101: // declaration_specifiers ::= alignment_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 102: // declaration_specifiers ::= alignment_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 103: // init_declarator_list ::= init_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator_list\",26, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 104: // init_declarator_list ::= init_declarator_list COMMA init_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator_list\",26, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 105: // init_declarator ::= declarator EQ initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator\",30, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 106: // init_declarator ::= declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator\",30, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 107: // storage_class_specifier ::= TYPEDEF \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 108: // storage_class_specifier ::= EXTERN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 109: // storage_class_specifier ::= STATIC \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 110: // storage_class_specifier ::= THREAD_LOCAL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 111: // storage_class_specifier ::= AUTO \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 112: // storage_class_specifier ::= REGISTER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 113: // type_specifier ::= VOID \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 114: // type_specifier ::= CHAR \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 115: // type_specifier ::= SHORT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 116: // type_specifier ::= INT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 117: // type_specifier ::= LONG \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 118: // type_specifier ::= FLOAT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 119: // type_specifier ::= DOUBLE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 120: // type_specifier ::= SIGNED \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 121: // type_specifier ::= UNSIGNED \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 122: // type_specifier ::= BOOL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 123: // type_specifier ::= COMPLEX \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 124: // type_specifier ::= IMAGINARY \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 125: // type_specifier ::= atomic_type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 126: // type_specifier ::= struct_or_union_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 127: // type_specifier ::= enum_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 128: // type_specifier ::= TYPEDEF_NAME \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 129: // struct_or_union_specifier ::= struct_or_union LBRACE struct_declaration_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 130: // struct_or_union_specifier ::= struct_or_union IDENTIFIER LBRACE struct_declaration_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 131: // struct_or_union_specifier ::= struct_or_union IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 132: // struct_or_union ::= STRUCT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union\",33, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 133: // struct_or_union ::= UNION \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union\",33, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 134: // struct_declaration_list ::= struct_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration_list\",34, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 135: // struct_declaration_list ::= struct_declaration_list struct_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration_list\",34, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 136: // struct_declaration ::= specifier_qualifier_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 137: // struct_declaration ::= specifier_qualifier_list struct_declarator_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 138: // struct_declaration ::= static_assert_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 139: // specifier_qualifier_list ::= type_specifier specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 140: // specifier_qualifier_list ::= type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 141: // specifier_qualifier_list ::= type_qualifier specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 142: // specifier_qualifier_list ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 143: // struct_declarator_list ::= struct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator_list\",38, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 144: // struct_declarator_list ::= struct_declarator_list COMMA struct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator_list\",38, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 145: // struct_declarator ::= COLON constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 146: // struct_declarator ::= declarator COLON constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 147: // struct_declarator ::= declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 148: // enum_specifier ::= ENUM LBRACE enumerator_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 149: // enum_specifier ::= ENUM LBRACE enumerator_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 150: // enum_specifier ::= ENUM IDENTIFIER LBRACE enumerator_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 151: // enum_specifier ::= ENUM IDENTIFIER LBRACE enumerator_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 152: // enum_specifier ::= ENUM IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 153: // enumerator_list ::= enumerator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator_list\",41, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 154: // enumerator_list ::= enumerator_list COMMA enumerator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator_list\",41, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 155: // enumerator ::= enumeration_constant EQ constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator\",42, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 156: // enumerator ::= enumeration_constant \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator\",42, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 157: // atomic_type_specifier ::= ATOMIC LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"atomic_type_specifier\",43, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 158: // type_qualifier ::= CONST \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 159: // type_qualifier ::= RESTRICT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 160: // type_qualifier ::= VOLATILE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 161: // type_qualifier ::= ATOMIC \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 162: // function_specifier ::= INLINE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_specifier\",44, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 163: // function_specifier ::= NORETURN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_specifier\",44, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 164: // alignment_specifier ::= ALIGNAS LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"alignment_specifier\",45, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 165: // alignment_specifier ::= ALIGNAS LPAREN constant_expression RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"alignment_specifier\",45, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 166: // declarator ::= pointer direct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declarator\",31, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 167: // declarator ::= direct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declarator\",31, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 168: // direct_declarator ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 169: // direct_declarator ::= LPAREN declarator RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 170: // direct_declarator ::= direct_declarator LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 171: // direct_declarator ::= direct_declarator LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 172: // direct_declarator ::= direct_declarator LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 173: // direct_declarator ::= direct_declarator LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 174: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 175: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 176: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 177: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 178: // direct_declarator ::= direct_declarator LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 179: // direct_declarator ::= direct_declarator LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 180: // direct_declarator ::= direct_declarator LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 181: // direct_declarator ::= direct_declarator LPAREN identifier_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 182: // pointer ::= MULT type_qualifier_list pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 183: // pointer ::= MULT type_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 184: // pointer ::= MULT pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 185: // pointer ::= MULT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 186: // type_qualifier_list ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier_list\",50, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 187: // type_qualifier_list ::= type_qualifier_list type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier_list\",50, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 188: // parameter_type_list ::= parameter_list COMMA ELLIPSIS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_type_list\",48, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 189: // parameter_type_list ::= parameter_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_type_list\",48, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 190: // parameter_list ::= parameter_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_list\",70, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 191: // parameter_list ::= parameter_list COMMA parameter_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_list\",70, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 192: // parameter_declaration ::= declaration_specifiers declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 193: // parameter_declaration ::= declaration_specifiers abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 194: // parameter_declaration ::= declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 195: // identifier_list ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"identifier_list\",49, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 196: // identifier_list ::= identifier_list COMMA IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"identifier_list\",49, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 197: // type_name ::= specifier_qualifier_list abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_name\",13, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 198: // type_name ::= specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_name\",13, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 199: // abstract_declarator ::= pointer direct_abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 200: // abstract_declarator ::= pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 201: // abstract_declarator ::= direct_abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 202: // direct_abstract_declarator ::= LPAREN abstract_declarator RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 203: // direct_abstract_declarator ::= LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 204: // direct_abstract_declarator ::= LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 205: // direct_abstract_declarator ::= LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 206: // direct_abstract_declarator ::= LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 207: // direct_abstract_declarator ::= LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 208: // direct_abstract_declarator ::= LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 209: // direct_abstract_declarator ::= LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 210: // direct_abstract_declarator ::= LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 211: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 212: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 213: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 214: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 215: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 216: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 217: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 218: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 219: // direct_abstract_declarator ::= LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 220: // direct_abstract_declarator ::= LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 221: // direct_abstract_declarator ::= direct_abstract_declarator LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 222: // direct_abstract_declarator ::= direct_abstract_declarator LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 223: // initializer ::= LBRACE initializer_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 224: // initializer ::= LBRACE initializer_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 225: // initializer ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 226: // initializer_list ::= designation initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 227: // initializer_list ::= initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 228: // initializer_list ::= initializer_list COMMA designation initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 229: // initializer_list ::= initializer_list COMMA initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 230: // designation ::= designator_list EQ \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designation\",55, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 231: // designator_list ::= designator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator_list\",56, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 232: // designator_list ::= designator_list designator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator_list\",56, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 233: // designator ::= LBRACK constant_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator\",57, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 234: // designator ::= DOT IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator\",57, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 235: // static_assert_declaration ::= STATIC_ASSERT LPAREN constant_expression COMMA STRING_LITERAL RPAREN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"static_assert_declaration\",58, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 236: // statement ::= labeled_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 237: // statement ::= compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 238: // statement ::= expression_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 239: // statement ::= selection_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 240: // statement ::= iteration_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 241: // statement ::= jump_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 242: // labeled_statement ::= IDENTIFIER COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 243: // labeled_statement ::= CASE constant_expression COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 244: // labeled_statement ::= DEFAULT COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 245: // compound_statement ::= LBRACE RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"compound_statement\",61, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 246: // compound_statement ::= LBRACE block_item_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"compound_statement\",61, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 247: // block_item_list ::= block_item \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item_list\",62, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 248: // block_item_list ::= block_item_list block_item \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item_list\",62, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 249: // block_item ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item\",63, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 250: // block_item ::= statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item\",63, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 251: // expression_statement ::= SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression_statement\",66, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 252: // expression_statement ::= expression SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression_statement\",66, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 253: // selection_statement ::= IF LPAREN expression RPAREN statement ELSE statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 254: // selection_statement ::= IF LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 255: // selection_statement ::= SWITCH LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 256: // iteration_statement ::= WHILE LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 257: // iteration_statement ::= DO statement WHILE LPAREN expression RPAREN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 258: // iteration_statement ::= FOR LPAREN expression_statement expression_statement RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 259: // iteration_statement ::= FOR LPAREN expression_statement expression_statement expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 260: // iteration_statement ::= FOR LPAREN declaration expression_statement RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 261: // iteration_statement ::= FOR LPAREN declaration expression_statement expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 262: // jump_statement ::= GOTO IDENTIFIER SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 263: // jump_statement ::= CONTINUE SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 264: // jump_statement ::= BREAK SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 265: // jump_statement ::= RETURN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 266: // jump_statement ::= RETURN expression SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 267: // translation_unit ::= external_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"translation_unit\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 268: // translation_unit ::= translation_unit external_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"translation_unit\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 269: // external_declaration ::= function_definition \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"external_declaration\",67, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 270: // external_declaration ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"external_declaration\",67, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 271: // function_definition ::= declaration_specifiers declarator declaration_list compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_definition\",68, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 272: // function_definition ::= declaration_specifiers declarator compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_definition\",68, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 273: // declaration_list ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_list\",73, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 274: // declaration_list ::= declaration_list declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_list\",73, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$parser$act_num+\"found in internal parse table\");\n\n }\n }", "public interface ICommandDisplayAction extends IAction{\r\n\r\n\t \r\n\t\r\n\tpublic void displayPallet() ;\r\n\r\n\tpublic void displayArena();\r\n\t\r\n\tpublic void displayComponent(String componentIntanceName) ;\r\n\t\r\n\tpublic void displayChain( ) ;\r\n}", "public void act() \n {\n canSeeAlex();\n }", "@Override\n public void action(Jugador jugador) {\n\n }", "public void actionOffered();", "public final java_cup.runtime.Symbol CUP$LuaGrammarCup$do_action(\r\n int CUP$LuaGrammarCup$act_num,\r\n java_cup.runtime.lr_parser CUP$LuaGrammarCup$parser,\r\n java.util.Stack CUP$LuaGrammarCup$stack,\r\n int CUP$LuaGrammarCup$top)\r\n throws java.lang.Exception\r\n {\r\n /* Symbol object for return from actions */\r\n java_cup.runtime.Symbol CUP$LuaGrammarCup$result;\r\n\r\n /* select the action based on the action number */\r\n switch (CUP$LuaGrammarCup$act_num)\r\n {\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 112: // string ::= LONGSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 111: // string ::= CHARSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 110: // string ::= NORMALSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 109: // number ::= HEX \r\n {\r\n Object RESULT =null;\r\n\t\tint hleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint hright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject h = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = h;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 108: // number ::= INT \r\n {\r\n Object RESULT =null;\r\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = Integer.parseInt(i.toString());\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 107: // number ::= FLOAT \r\n {\r\n Object RESULT =null;\r\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject f = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = Float.parseFloat(f.toString());\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 106: // number ::= EXP \r\n {\r\n Object RESULT =null;\r\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = e; \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 105: // unop ::= SHARP \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 104: // unop ::= NOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 103: // unop ::= MINUS \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 102: // binop ::= OR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 101: // binop ::= AND \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 100: // binop ::= NEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 99: // binop ::= EQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 98: // binop ::= MAIEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 97: // binop ::= MAIOR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 96: // binop ::= MINEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 95: // binop ::= MINOR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 94: // binop ::= DOTDOT \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 93: // binop ::= MOD \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 92: // binop ::= EXPON \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 91: // binop ::= DIVIDE \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 90: // binop ::= MULT \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 89: // binop ::= MINUS \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 88: // binop ::= PLUS \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 87: // fieldsep ::= COMMA \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldsep\",19, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 86: // fieldsep ::= SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldsep\",19, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 85: // field ::= exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 84: // field ::= VAR_NAME ASSIGN exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 83: // field ::= LBRACK exp RBRACK ASSIGN exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 82: // fieldlist ::= fieldlist fieldsep field \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found fieldlist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldlist\",18, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 81: // fieldlist ::= field \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found a field\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldlist\",18, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 80: // tableconstructor ::= LCURLY fieldlist RCURLY \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"table constructor\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"tableconstructor\",27, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 79: // tableconstructor ::= LCURLY RCURLY \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"tableconstructor\",27, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 78: // parlist ::= TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 77: // parlist ::= namelist COMMA TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 76: // parlist ::= namelist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 75: // funcbody ::= LPAREN parlist RPAREN block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"functionbody with par\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcbody\",13, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 74: // funcbody ::= LPAREN RPAREN block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"functionbody\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcbody\",13, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 73: // function ::= FUNCTION funcbody \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"function\",14, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 72: // args ::= string \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 71: // args ::= tableconstructor \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 70: // args ::= LPAREN explist RPAREN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"args (explist)\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 69: // args ::= LPAREN RPAREN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"args ()\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 68: // functioncall ::= prefixexp COLON VAR_NAME args \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function call\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"functioncall\",17, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 67: // functioncall ::= prefixexp args \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function call\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"functioncall\",17, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 66: // prefixexp ::= functioncall \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"prefixexp->functioncall\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"prefixexp\",21, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 65: // prefixexp ::= var \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"prefixexp->var\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"prefixexp\",21, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 64: // exp_member ::= unop exp_member \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 63: // exp_member ::= TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 62: // exp_member ::= tableconstructor \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 61: // exp_member ::= prefixexp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 60: // exp_member ::= function \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 59: // exp_member ::= string \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 58: // exp_member ::= number \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found number\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 57: // exp_member ::= TRUE \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 56: // exp_member ::= FALSE \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 55: // exp_member ::= NIL \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 54: // exp_member_recoursive ::= exp_member binop exp_member_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found binop exp\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member_recoursive\",35, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 53: // exp_member_recoursive ::= exp_member \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member_recoursive\",35, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 52: // exp ::= exp_member_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp\",5, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 51: // exp_recoursive ::= exp COMMA exp_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"exp_recoursive\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_recoursive\",34, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 50: // exp_recoursive ::= exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_recoursive\",34, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 49: // explist ::= exp_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found explist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"explist\",12, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 48: // namelist ::= namelist COMMA VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"namelist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"namelist\",36, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 47: // namelist ::= VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"namelist\",36, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 46: // var ::= prefixexp DOT VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 45: // var ::= prefixexp LBRACK exp RBRACK \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 44: // var ::= VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 43: // varlist ::= varlist var COMMA \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"varlist\",24, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 42: // varlist ::= var \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"varlist\",24, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 41: // dot_var_name ::= DOT VAR_NAME dot_var_name \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"dot_var_name\",42, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 40: // dot_var_name ::= \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"dot_var_name\",42, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 39: // funcname ::= VAR_NAME dot_var_name COLON VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcname\",15, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 38: // funcname ::= VAR_NAME dot_var_name \r\n {\r\n Object RESULT =null;\r\n\t\tint varleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint varright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject var = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tSystem.out.println(\"funcname:\" + var); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcname\",15, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 37: // break_stat ::= BREAK SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"break_stat\",38, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 36: // break_stat ::= BREAK \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"break stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"break_stat\",38, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 35: // return_stat ::= RETURN explist SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 34: // return_stat ::= RETURN SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 33: // return_stat ::= RETURN explist \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"return with explist\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 32: // return_stat ::= RETURN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"return stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 31: // last_stat ::= break_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"last_stat\",9, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 30: // last_stat ::= return_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"last_stat\",9, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 29: // for_stat ::= FOR namelist IN explist DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"for stat in\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-6)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 28: // for_stat ::= FOR VAR_NAME ASSIGN exp COMMA exp COMMA exp DO block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-10)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 27: // for_stat ::= FOR VAR_NAME ASSIGN exp COMMA exp DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"for stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-8)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 26: // if_recoursive ::= if_recoursive ELSEIF exp THEN block \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_recoursive\",41, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 25: // if_recoursive ::= ELSEIF exp THEN block \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_recoursive\",41, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 24: // if_stat ::= IF exp THEN block if_recoursive ELSE block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-7)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 23: // if_stat ::= IF exp THEN block ELSE block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-6)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 22: // if_stat ::= IF exp THEN block if_recoursive END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-5)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 21: // if_stat ::= IF exp THEN block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 20: // stat ::= LOCAL namelist ASSIGN explist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 19: // stat ::= LOCAL namelist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 18: // stat ::= LOCAL FUNCTION VAR_NAME funcbody \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 17: // stat ::= FUNCTION funcname funcbody \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found Function stat\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 16: // stat ::= for_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 15: // stat ::= if_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 14: // stat ::= REPEAT block UNTIL exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 13: // stat ::= WHILE exp DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).value;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject b = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tSystem.out.println(\"while statement\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 12: // stat ::= DO block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 11: // stat ::= functioncall \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 10: // stat ::= varlist ASSIGN explist \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"varlist assign explist\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 9: // block ::= chunk \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"block\",1, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 8: // stat_recoursive ::= stat SEMI stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 7: // stat_recoursive ::= stat stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 6: // stat_recoursive ::= stat SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 5: // stat_recoursive ::= stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 4: // chunk ::= \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 3: // chunk ::= last_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 2: // chunk ::= stat_recoursive last_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 1: // $START ::= chunk EOF \r\n {\r\n Object RESULT =null;\r\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject start_val = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tRESULT = start_val;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n /* ACCEPT */\r\n CUP$LuaGrammarCup$parser.done_parsing();\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 0: // chunk ::= stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /* . . . . . .*/\r\n default:\r\n throw new Exception(\r\n \"Invalid action number found in internal parse table\");\r\n\r\n }\r\n }", "static void actionPrompt() {\n prompt:\n while (true) {\n String line = \"\";\n System.out.println(\"\\nWhat do you want to do: (S)ave, (F)ill, (L)ine, (V)isible, (Q)uit: \");\n while (line.length() < 1)\n line = scan.nextLine().toUpperCase();\n char action = line.charAt(0);\n switch (action) {\n case 'Q':\n break prompt;\n case 'V':\n visible(); break;\n case 'L':\n line(); break;\n case 'F':\n fill(); break;\n case 'S':\n save(); break;\n default:\n System.out.println(\"Not a valid command.\");\n }\n }\n }", "@Override\n\tpublic void action() {\n\t\tACLMessage msgRx = myAgent.receive();\n\t\tif (msgRx != null && msgRx.getPerformative() == ACLMessage.REQUEST) {\n\t\t\tContentManager contentManager = myAgent.getContentManager();\n\t\t\tSystem.out.println(\"RECEIVED = \" + msgRx.getContent());\n\t\t\tmsgRx.setLanguage(\"fipa-sl\");\n\t\t\tmsgRx.setOntology(\"blocks-ontology\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tContentElementList elementList = (ContentElementList) contentManager\n\t\t\t\t\t\t.extractContent(msgRx);\n\n\t\t\t\tIterator elementIterator = elementList.iterator();\n\n\t\t\t\twhile (elementIterator.hasNext()) {\n\t\t\t\t\tAction action = (Action) elementIterator.next();\n\t\t\t\t\t((Environment) myAgent).getWorld().getActionList().add((Executable) (action.getAction()));\n//\t\t\t\t\t((Executable) (action.getAction()))\n//\t\t\t\t\t\t\t.execute((Environment) myAgent);\n\t\t\t\t}\n\n\t\t\t} catch (UngroundedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (CodecException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (OntologyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tblock();\n\t\t}\n\t\t\n\t}", "public void setAction(String action) { this.action = action; }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "@Override\n\t\t\tpublic void performAction(PrintWriter pw) {\n\t\t\t\t\n\t\t\t\tString hello = \"helloworld\";\n\t\t\t\t\n\t\t\t\tpw.println(hello);\n\t\t\t\t\n\t\t\t}", "static void perform_ani(String passed){\n\t\tint type = type_of_ani(passed);\n\t\tif(type==1)\n\t\t\tani_with_acc(passed);\n\t}", "public final java_cup.runtime.Symbol CUP$CoolParser$do_action_part00000000(\n int CUP$CoolParser$act_num,\n java_cup.runtime.lr_parser CUP$CoolParser$parser,\n java.util.Stack CUP$CoolParser$stack,\n int CUP$CoolParser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$CoolParser$result;\n\n /* select the action based on the action number */\n switch (CUP$CoolParser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // program ::= class_list \n {\n programc RESULT =null;\n\t\tClasses cl = (Classes)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new programc(curr_lineno(), cl); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"program\",0, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // $START ::= program EOF \n {\n Object RESULT =null;\n\t\tprogramc start_val = (programc)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, RESULT);\n }\n /* ACCEPT */\n CUP$CoolParser$parser.done_parsing();\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // program ::= error \n {\n programc RESULT =null;\n\t\t RESULT = new programc(curr_lineno(),\n new Classes(curr_lineno())); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"program\",0, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // class_list ::= class_cc \n {\n Classes RESULT =null;\n\t\tclass_c c = (class_c)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = (new Classes(curr_lineno())).appendElement(c); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_list\",1, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // class_list ::= class_list class_cc \n {\n Classes RESULT =null;\n\t\tClasses cl = (Classes)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tclass_c c = (class_c)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = cl.appendElement(c); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_list\",1, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // class_cc ::= CLASS TYPEID LBRACE optional_feature_list RBRACE SEMI \n {\n class_c RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tFeatures f = (Features)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\t RESULT = new class_c(curr_lineno(), n, \n\t\t AbstractTable.idtable.addString(\"Object\"), \n\t\t\t\t f, curr_filename()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_cc\",2, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // class_cc ::= CLASS TYPEID INHERITS TYPEID LBRACE optional_feature_list RBRACE SEMI \n {\n class_c RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-6)).value;\n\t\tAbstractSymbol p = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tFeatures f = (Features)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\t RESULT = new class_c(curr_lineno(), n, p, f, curr_filename()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_cc\",2, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // class_cc ::= error SEMI \n {\n class_c RESULT =null;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_cc\",2, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // optional_feature_list ::= \n {\n Features RESULT =null;\n\t\t RESULT = new Features(curr_lineno()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"optional_feature_list\",3, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // optional_feature_list ::= f2 \n {\n Features RESULT =null;\n\t\tFeature feature2 = (Feature)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new Features(curr_lineno()).appendElement(feature2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"optional_feature_list\",3, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // optional_feature_list ::= optional_feature_list f2 \n {\n Features RESULT =null;\n\t\tFeatures flist = (Features)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tFeature feature2 = (Feature)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = flist.appendElement(feature2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"optional_feature_list\",3, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // f2 ::= OBJECTID COLON TYPEID SEMI \n {\n Feature RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t \n\t\tRESULT = new attr(curr_lineno(), o, t, new no_expr(curr_lineno())); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // f2 ::= OBJECTID COLON TYPEID ASSIGN expr SEMI \n {\n Feature RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-5)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tExpression ex1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new attr(curr_lineno(), o, t, ex1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // f2 ::= OBJECTID LPAREN formal_list RPAREN COLON TYPEID LBRACE expr RBRACE SEMI \n {\n Feature RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-9)).value;\n\t\tFormals f1 = (Formals)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-7)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\t RESULT = new method(curr_lineno(), o, f1, t, e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // f2 ::= error SEMI \n {\n Feature RESULT =null;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // formal_list ::= \n {\n Formals RESULT =null;\n\t\t RESULT = new Formals(curr_lineno()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",9, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // formal_list ::= formal_1 \n {\n Formals RESULT =null;\n\t\tFormal formal1 = (Formal)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new Formals(curr_lineno()).appendElement(formal1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",9, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // formal_list ::= formal_list formal_1 \n {\n Formals RESULT =null;\n\t\tFormals f2 = (Formals)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tFormal formal1 = (Formal)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = f2.appendElement(formal1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",9, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // formal_1 ::= OBJECTID COLON TYPEID \n {\n Formal RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new formalc(curr_lineno(), o, t); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_1\",8, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // formal_1 ::= OBJECTID COLON TYPEID COMMA \n {\n Formal RESULT =null;\n\t\tAbstractSymbol obj = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol typ = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new formalc(curr_lineno(), obj, typ); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_1\",8, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // expr ::= expr PLUS expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new plus(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // expr ::= expr MINUS expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new sub(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // expr ::= expr MULT expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new mul(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // expr ::= expr DIV expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new divide(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // expr ::= NEG expr \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new neg(curr_lineno(), e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // expr ::= expr LT expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new lt(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // expr ::= expr EQ expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new eq(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // expr ::= expr LE expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new leq(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // expr ::= NOT expr \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new comp(curr_lineno(), e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // expr ::= LPAREN expr RPAREN \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = e; \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // expr ::= INT_CONST \n {\n Expression RESULT =null;\n\t\tAbstractSymbol i = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new int_const(curr_lineno(), i); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // expr ::= STR_CONST \n {\n Expression RESULT =null;\n\t\tAbstractSymbol s = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new string_const(curr_lineno(), s); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // expr ::= BOOL_CONST \n {\n Expression RESULT =null;\n\t\tBoolean b = (Boolean)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new bool_const(curr_lineno(), b); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // expr ::= OBJECTID \n {\n Expression RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new object(curr_lineno(), o); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // expr ::= OBJECTID actuals \n {\n Expression RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tExpressions a = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new dispatch(curr_lineno(),\n\t new object(curr_lineno(), \n\t AbstractTable.idtable.addString(\"self\")),\n\t\t\t\t n, a); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // expr ::= expr DOT OBJECTID actuals \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tExpressions b = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new dispatch(curr_lineno(), e1, n, b); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // expr ::= expr AT TYPEID DOT OBJECTID actuals \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-5)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tExpressions b = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new static_dispatch(curr_lineno(), e1, t, n, b); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // expr ::= ISVOID expr \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new isvoid(curr_lineno(), e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // expr ::= OBJECTID ASSIGN expr \n {\n Expression RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new assign(curr_lineno(), o, e1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // expr ::= IF expr THEN expr ELSE expr FI \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-5)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tExpression e3 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new cond(curr_lineno(), e1, e2, e3); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // expr ::= NEW TYPEID \n {\n Expression RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new new_(curr_lineno(), n); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // expr ::= LBRACE block_exp_list RBRACE \n {\n Expression RESULT =null;\n\t\tExpressions exprslist = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new block(curr_lineno(), exprslist); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // expr ::= CASE expr OF case_list ESAC \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tCases cl = (Cases)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new typcase(curr_lineno(), e, cl); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // expr ::= WHILE expr LOOP expr POOL \n {\n Expression RESULT =null;\n\t\tExpression eone = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tExpression etwo = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tRESULT = new loop(curr_lineno(), eone, etwo); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // expr ::= LET lettail \n {\n Expression RESULT =null;\n\t\tlet tail = (let)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = tail; \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // lettail ::= OBJECTID COLON TYPEID ASSIGN expr IN expr \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-6)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // lettail ::= OBJECTID COLON TYPEID IN expr \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, new no_expr(curr_lineno()), e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 47: // lettail ::= OBJECTID COLON TYPEID ASSIGN expr COMMA lettail \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-6)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tlet tail = (let)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, e1, tail); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 48: // lettail ::= OBJECTID COLON TYPEID COMMA lettail \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tlet tail = (let)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, new no_expr(curr_lineno()), tail); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 49: // lettail ::= error SEMI \n {\n let RESULT =null;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 50: // lettail ::= error IN expr \n {\n let RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 51: // actuals ::= LPAREN RPAREN \n {\n Expressions RESULT =null;\n\t\t RESULT = new Expressions(curr_lineno()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"actuals\",5, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 52: // actuals ::= LPAREN exp_list RPAREN \n {\n Expressions RESULT =null;\n\t\tExpressions el = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = el; \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"actuals\",5, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 53: // case_list ::= case_1 \n {\n Cases RESULT =null;\n\t\tCase c1 = (Case)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new Cases(curr_lineno()).appendElement(c1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_list\",12, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 54: // case_list ::= case_1 SEMI \n {\n Cases RESULT =null;\n\t\tCase c1 = (Case)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new Cases(curr_lineno()).appendElement(c1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_list\",12, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 55: // case_list ::= case_list case_1 SEMI \n {\n Cases RESULT =null;\n\t\tCases cl = (Cases)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tCase c1 = (Case)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = cl.appendElement(c1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_list\",12, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 56: // case_1 ::= OBJECTID COLON TYPEID DARROW expr \n {\n Case RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new branch(curr_lineno(), o, t, e1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_1\",13, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 57: // exp_list ::= expr \n {\n Expressions RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = (new Expressions(curr_lineno())).appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"exp_list\",6, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 58: // exp_list ::= exp_list COMMA expr \n {\n Expressions RESULT =null;\n\t\tExpressions el = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = el.appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"exp_list\",6, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 59: // block_exp_list ::= expr SEMI \n {\n Expressions RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new Expressions(curr_lineno()).appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"block_exp_list\",7, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 60: // block_exp_list ::= block_exp_list expr SEMI \n {\n Expressions RESULT =null;\n\t\tExpressions el = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = el.appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"block_exp_list\",7, RESULT);\n }\n return CUP$CoolParser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$CoolParser$act_num+\"found in internal parse table\");\n\n }\n }" ]
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.6035597", "0.6035597", "0.60223806", "0.6011715", "0.5994028", "0.5986706", "0.5973847", "0.59363747", "0.59299153", "0.59274375", "0.5925999", "0.59236354", "0.5900132", "0.58874744", "0.5880966", "0.5860396", "0.5858362", "0.5852421", "0.5834586", "0.5807131", "0.5794122", "0.57809204", "0.5775529", "0.5772291", "0.57655984", "0.5762837", "0.57587755", "0.5758653", "0.5752396", "0.5749633", "0.5743911", "0.5743911", "0.5743657", "0.5743657", "0.5740693", "0.57326096", "0.5722666", "0.5708811", "0.5706221", "0.57024294", "0.56944466", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5685764", "0.56807494", "0.5661615", "0.5650216", "0.5650081", "0.56464934", "0.5645747", "0.5641903", "0.5627175", "0.5619585", "0.5615084", "0.5601284", "0.5599514", "0.55944145", "0.55931157", "0.55916977", "0.55916977", "0.55916977", "0.5590322", "0.55799615", "0.55674374", "0.55666804", "0.5555143", "0.5554079", "0.55520636", "0.5545089", "0.5543725", "0.55414605", "0.55311835", "0.5530412", "0.55255187", "0.55118287" ]
0.0
-1
Write code here that turns the phrase above into concrete actions
@Then("I land on the datepicker page") public void i_land_on_the_datepicker_page() { System.out.println("inside date picker landing page"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String performAction(String input);", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "protected abstract Action stringToAction(String stringAction);", "@Override\n\tpublic void action() {\n\n\t}", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "public void action() {\n }", "public interface Action { //придумываем интерфейс для описания действий, присущих роботу\n Action dogo(MapOfAction mapOfAction); //объявляем функцию для действий, которой передаём карту\n\n}", "public abstract ActionInMatch act();", "void determineNextAction();", "public void executeAction( String actionInfo );", "interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }", "public void performAction(String s) {\n try {\n CommandToClient command = CommandToClient.valueOf(Parser.getCommand(s));\n s = s.substring(5);\n switch (command) {\n case START:\n gameFrame.startGame();\n break;\n case ATEMP:\n gameFrame.attempt(s);\n break;\n case LAUNC:\n gameFrame.resultOfAttempt(s);\n break;\n case TOCOL:\n // will announce that boat has been sank\n System.out.println(\"You sank the \" + SetOfBoats.getNames()[Integer.parseInt(s)]);\n break;\n case WINNE:\n // will announce that game is won\n System.out.println(\"You have won!\");\n break;\n case PRINT:\n gameFrame.printWG();\n default:\n System.out.println(\"Incorrect command : \" + s);\n }\n\n } catch (CommandException e) {\n System.out.println(\"Command \" + s + \" not valid\");\n e.printStackTrace();\n }\n }", "public interface Action {\n\n /**\n * The executeAction method takes in actionInfo and runs the action code\n * @param actionInfo all information sent by the test file to the action\n */\n public void executeAction( String actionInfo );\n\n}", "public static int complexAction(String str)\n {\n if (str.equalsIgnoreCase(\"Play\") || str.equalsIgnoreCase(\"Start\") || str.equalsIgnoreCase(\"Begin\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Pause\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"QUIT\"))\n {\n return 3;\n }\n else\n { return 0;} \n }", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "private String convertAction(String action) {\n\t\treturn action.toLowerCase();\n\t}", "abstract public void performAction();", "IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);", "String replaceParserMessage(Entity e, String action);", "private void generateKeywordActions(List<Keyword> keywords) {\n \t\t\n \t}", "public abstract String getIntentActionString();", "public void action() {\n action.action();\n }", "@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}", "public static int simpleAction(String str)\n {\n if (str.equalsIgnoreCase(\"Y\") || str.equalsIgnoreCase(\"Yes\")) //your actions are yes\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"N\") || str.equalsIgnoreCase(\"No\")) // your actions are no\n {\n return 0;\n }\n else\n {\n return 2;\n }\n }", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}", "public void processAction(CIDAction action);", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "Expression getActionSentence();", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void doAction(){}", "public void act() {\n\t}", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public abstract boolean resolveAction(String str, Bundle bundle);", "public void actionButton(String text);", "public final java_cup.runtime.Symbol CUP$Asintactico$do_action_part00000001(\n int CUP$Asintactico$act_num,\n java_cup.runtime.lr_parser CUP$Asintactico$parser,\n java.util.Stack CUP$Asintactico$stack,\n int CUP$Asintactico$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$Asintactico$result;\n\n /* select the action based on the action number */\n switch (CUP$Asintactico$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 300: // FEATURE_WORD ::= CARETOSTANDARDS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 301: // FEATURE_WORD ::= DARE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 302: // FEATURE_WORD ::= DOMINANCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 303: // FEATURE_WORD ::= HARDNESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 304: // FEATURE_WORD ::= APPREHESION error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 305: // FEATURE_WORD ::= INDEPENDENCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 306: // FEATURE_WORD ::= LIVELINESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 307: // FEATURE_WORD ::= OPENNESSTOCHANGE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 308: // FEATURE_WORD ::= PERFECTIONISM error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 309: // FEATURE_WORD ::= PRIVACY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 310: // FEATURE_WORD ::= REASONING error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 311: // FEATURE_WORD ::= SELFCONTROL error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 312: // FEATURE_WORD ::= SELFSUFFICIENCY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 313: // FEATURE_WORD ::= SENSITIVITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 314: // FEATURE_WORD ::= SOCIABILITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 315: // FEATURE_WORD ::= STABILITY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 316: // FEATURE_WORD ::= STRESS error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 317: // FEATURE_WORD ::= SURVEILLANCE error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 318: // FEATURE_WORD ::= error PARENTH2 \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Syntax Error: FEATURE WORD expected. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"FEATURE_WORD\",36, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 319: // CTRL_STR ::= LOOP_STR \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"CTRL_STR\",17, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 320: // CTRL_STR ::= IF_STR \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"CTRL_STR\",17, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 321: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 322: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY ELSE CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-8)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 323: // IF_STR ::= IF error COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 324: // IF_STR ::= IF error PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-6)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 325: // IF_STR ::= IF PARENTH1 COND CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Rigth parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 326: // IF_STR ::= IF PARENTH1 COND PARENTH2 error BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 327: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY error \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.peek()).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Else malformed. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-6)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 328: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY ELSE BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-7)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 329: // IF_STR ::= IF PARENTH1 COND PARENTH2 CURLY_BR1 BODY CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Else malformed. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"IF_STR\",22, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-7)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 330: // LOOP_STR ::= LOOP PARENTH1 COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 331: // LOOP_STR ::= LOOP error COND PARENTH2 CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-4)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left Parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 332: // LOOP_STR ::= LOOP PARENTH1 COND error CURLY_BR1 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-2)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 333: // LOOP_STR ::= LOOP PARENTH1 COND PARENTH2 error BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left curly brace '{' expected after condition clause. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-5)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 334: // LOOP_STR ::= LOOP PARENTH1 COND BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-1)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Right Parenthesis expected ')'. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 335: // LOOP_STR ::= LOOP COND PARENTH2 BODY \n {\n Object RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)).value;\n\t\tparser.ManejadorDeErrores.add(new Error1(\"ES\",eleft-1,eright,\"Syntax Error: Left Parenthesis expected '('. Line: \"+(eleft+1)+\", column: \"+(eright+2)+\".\"));\n CUP$Asintactico$result = parser.getSymbolFactory().newSymbol(\"LOOP_STR\",28, ((java_cup.runtime.Symbol)CUP$Asintactico$stack.elementAt(CUP$Asintactico$top-3)), ((java_cup.runtime.Symbol)CUP$Asintactico$stack.peek()), RESULT);\n }\n return CUP$Asintactico$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$Asintactico$act_num+\"found in internal parse table\");\n\n }\n }", "private void appendAction(int action) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(context.getString(action));\n \t}", "@Override\n public void act() {\n }", "private void setAction(String action)\r\n/* 46: */ {\r\n/* 47: 48 */ this.action = action;\r\n/* 48: */ }", "public abstract String intercept(ActionInvocation invocation) throws Exception;", "void showOthersActions(String message);", "public void performAction();", "protected abstract void action(Object obj);", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "String getAction();", "String getAction();", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public abstract boolean checkAction(String str);", "public int showPossibleActions(String[] string);", "public void commandAction (Command command, Displayable displayable) {//GEN-END:|7-commandAction|0|7-preCommandAction\n // write pre-action user code here\nif (displayable == list) {//GEN-BEGIN:|7-commandAction|1|15-preAction\nif (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|1|15-preAction\n // write pre-action user code here\nlistAction ();//GEN-LINE:|7-commandAction|2|15-postAction\n // write post-action user code here\n} else if (command == exitCommand) {//GEN-LINE:|7-commandAction|3|20-preAction\n // write pre-action user code here\nexitMIDlet ();//GEN-LINE:|7-commandAction|4|20-postAction\n // write post-action user code here\n}//GEN-BEGIN:|7-commandAction|5|46-preAction\n} else if (displayable == searchList) {\nif (command == List.SELECT_COMMAND) {//GEN-END:|7-commandAction|5|46-preAction\n // write pre-action user code here\nsearchListAction ();//GEN-LINE:|7-commandAction|6|46-postAction\n // write post-action user code here\n} else if (command == backCommand2) {//GEN-LINE:|7-commandAction|7|54-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|8|54-postAction\n // write post-action user code here\n} else if (command == okCommand1) {//GEN-LINE:|7-commandAction|9|51-preAction\n // write pre-action user code here\nswitchDisplayable (null, getTextTB ());//GEN-LINE:|7-commandAction|10|51-postAction\n \n String sTerm = (String) searches.elementAt(searchList.getSelectedIndex());\n \n String artist = sTerm.substring(0, sTerm.indexOf(\";\"));\n String song = sTerm.substring(sTerm.indexOf(\";\")+1);\n this.seatchText(artist,song);\n artistTf.setString(artist);\n songTF.setString(song);\n}//GEN-BEGIN:|7-commandAction|11|36-preAction\n} else if (displayable == seatchform) {\nif (command == backCommand) {//GEN-END:|7-commandAction|11|36-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|12|36-postAction\n // write post-action user code here\n} else if (command == okCommand) {//GEN-LINE:|7-commandAction|13|31-preAction\n // write pre-action user code here\n \nswitchDisplayable (null, getTextTB ());//GEN-LINE:|7-commandAction|14|31-postAction\n searches.insertElementAt(artistTf.getString()+\";\"+songTF.getString(), 0);\n recUtil.updateRecord(searches);\n this.seatchText(artistTf.getString(),songTF.getString());\n}//GEN-BEGIN:|7-commandAction|15|40-preAction\n} else if (displayable == textTB) {\nif (command == backCommand1) {//GEN-END:|7-commandAction|15|40-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSeatchform ());//GEN-LINE:|7-commandAction|16|40-postAction\n // write post-action user code here\n} else if (command == startC) {//GEN-LINE:|7-commandAction|17|43-preAction\n // write pre-action user code here\nswitchDisplayable (null, getList ());//GEN-LINE:|7-commandAction|18|43-postAction\n // write post-action user code here\n}//GEN-BEGIN:|7-commandAction|19|7-postCommandAction\n}//GEN-END:|7-commandAction|19|7-postCommandAction\n // write post-action user code here\n}", "private void Log(String action) {\r\n\t}", "public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }", "public interface IIQActions {\n void think();\n Knowledge learn(Knowledge source, Knowledge dest);\n}", "public String parseBattleAction() {\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"Attack (A)\");\n\t\tSystem.out.println(\"Spell (S)\");\n\t\tSystem.out.println(\"Equip/Unequip/Use Item (E)\");\n\t\tboolean isValidMove = false;\n\t\tString s = null;\n\t\twhile(!isValidMove) {\n\t\t\t s = parseString().toUpperCase();\n\t\t\t\n\t\t\tswitch(s) {\n\t\t\t\tcase \"A\":\t\n\t\t\t\tcase \"S\":\n\t\t\t\tcase \"E\":\n\t\t\t\tcase \"P\":\n\t\t\t\t\tisValidMove = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tprintErrorParse();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t\t\n\t}", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "protected abstract void actionExecuted(SUT system, State state, Action action);", "public void act();", "static void perform_ori(String passed){\n\t\tint type = type_of_ori(passed);\n\t\tif(type==1)\n\t\t\tori_with_acc(passed);\n\t}", "public void action(BotInstance bot, Message message);", "public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }", "public void handleAction(Action action){\n\t\tSystem.out.println(action.getActionType().getName() + \" : \" + action.getValue());\n\t\tDroneClientMain.runCommand(\"python george_helper.py \" + action.getActionType().getName().toLowerCase() + \" \" + action.getValue());\n\t}", "@Override\n protected void executeCommands(ITextTokenStream<BasicTextTokenType> stream) {\n TextToken<BasicTextTokenType> object = stream.getFirstObject();\n String token = object == null ? null : object.getStandardToken();\n if (token != null) {\n if (stream.getVerb() != null){\n switch (stream.getVerb().getType()) {\n case ATTACK:\n attackMob(token, object);\n break;\n case LOOK:\n lookAt(token, object);\n break;\n case MOVE:\n movePlayer(token, object);\n break;\n case GET:\n getItemFromRoom(token, object);\n break;\n case LOOT:\n lootAll(token, object);\n break;\n case DROP:\n dropItem(token, object);\n break;\n case EQUIP: // effect replaced with LOCK\n lock(token, object);\n //equipItem(token, object);\n break;\n case UNEQUIP: // effect replaced with UNLOCK\n unlock(token, object);\n //unequipItem(token, object);\n break;\n case INFO:\n info(token, object);\n break;\n case QUIT:\n quitGame();\n break;\n default:\n return;\n }\n }\n // For objects that can also be used to infer their verbs\n else {\n switch (object.getType()) {\n case DIRECTION:\n movePlayer(token, object);\n break;\n case INVENTORY:\n info(token, object);\n break;\n case HEALTH:\n info(token, object);\n break;\n default:\n return;\n }\n }\n\n } else {\n return;\n }\n\n }", "@Override\n public void action() {\n System.out.println(\"Matchmaker Behaviour\");\n addBehaviour(new RequestToMatchMakerBehaviour());\n\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }", "private void appendAction(int action, String additional) {\n \t\tContext context = Settlers.getInstance().getContext();\n \t\tappendAction(String.format(context.getString(action), additional));\n \t}", "public void listAction () {//GEN-END:|13-action|0|13-preAction\n // enter pre-action user code here\nString __selectedString = getList ().getString (getList ().getSelectedIndex ());//GEN-BEGIN:|13-action|1|17-preAction\nif (__selectedString != null) {\nif (__selectedString.equals (\"S\\u00F6k text\")) {//GEN-END:|13-action|1|17-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSeatchform ());//GEN-LINE:|13-action|2|17-postAction\n // write post-action user code here\n} else if (__selectedString.equals (\"Tidigare s\\u00F6kningar\")) {//GEN-LINE:|13-action|3|18-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSearchList ());//GEN-LINE:|13-action|4|18-postAction\n // write post-action user code here\n}//GEN-BEGIN:|13-action|5|13-postAction\n}//GEN-END:|13-action|5|13-postAction\n // enter post-action user code here\n}", "@Override\n protected void doAct() {\n }", "public void action() \n {\n if (!hasSecondWord()) { // there is no second word\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where? Please be more specific\");\n return; \n } \n String direction = getSecondWord(); //second word found\n\n // Possible room\n Room nextRoom = player.getCurrentRoom().getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door in that direction\");\n }\n else {\n if (!nextRoom.isLocked()) {\n enterRoom(nextRoom);\n }\n //unlock room should now be another action instead\n // else if (nextRoom.isUnlocked(null)) {\n // enterRoom(nextRoom);\n // }\n else {\n System.out.println(\"This door is locked!\");\n }\n } \n }", "IWDAction wdCreateNamedAction(WDActionEventHandler eventHandler, String name, String text);", "public interface ActivityAction {\r\n public void viewedActivity(String condition, String viewerFullName);\r\n}", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public static int actions(String str)\n {\n if (str.equalsIgnoreCase(\"Shop\") || str.equalsIgnoreCase(\"S\"))\n {\n return 0;\n }\n else if (str.equalsIgnoreCase(\"Fight\") || str.equalsIgnoreCase(\"F\"))\n {\n return 1;\n }\n else if (str.equalsIgnoreCase(\"Rest\") || str.equalsIgnoreCase(\"R\"))\n {\n return 2;\n }\n else if (str.equalsIgnoreCase(\"Gamble\") || str.equalsIgnoreCase(\"G\"))\n {\n return 3;\n }\n else if (str.equalsIgnoreCase(\"Account\") || str.equalsIgnoreCase(\"A\"))\n {\n return 4;\n }\n else if (str.equalsIgnoreCase(\"Museum\") || str.equalsIgnoreCase(\"M\"))\n {\n return 5;\n }\n else if (str.equalsIgnoreCase(\"Quest\") || str.equalsIgnoreCase(\"Q\"))\n {\n return 6;\n }\n else if (str.equalsIgnoreCase(\"SumbitScore\") || str.equalsIgnoreCase(\"submit\") || str.equalsIgnoreCase(\"submit score\") || str.equalsIgnoreCase(\"SS\")) \n {\n return 7;\n }\n else \n {\n return 8;\n }\n }", "public final java_cup.runtime.Symbol CUP$parser$do_action_part00000000(\n int CUP$parser$act_num,\n java_cup.runtime.lr_parser CUP$parser$parser,\n java.util.Stack CUP$parser$stack,\n int CUP$parser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$parser$result;\n\n /* select the action based on the action number */\n switch (CUP$parser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // $START ::= translation_unit EOF \n {\n Object RESULT =null;\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tObject start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n /* ACCEPT */\n CUP$parser$parser.done_parsing();\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // primary_expression ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // primary_expression ::= constant \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // primary_expression ::= string \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // primary_expression ::= LPAREN expression RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // primary_expression ::= generic_selection \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"primary_expression\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // constant ::= I_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // constant ::= F_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // constant ::= ENUMERATION_CONSTANT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // enumeration_constant ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumeration_constant\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // string ::= STRING_LITERAL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"string\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // string ::= FUNC_NAME \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"string\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // generic_selection ::= GENERIC LPAREN assignment_expression COMMA generic_assoc_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_selection\",5, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // generic_assoc_list ::= generic_association \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_assoc_list\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // generic_assoc_list ::= generic_assoc_list COMMA generic_association \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_assoc_list\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // generic_association ::= type_name COLON assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_association\",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // generic_association ::= DEFAULT COLON assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"generic_association\",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // postfix_expression ::= primary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // postfix_expression ::= postfix_expression LBRACK expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // postfix_expression ::= postfix_expression LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // postfix_expression ::= postfix_expression LPAREN argument_expression_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // postfix_expression ::= postfix_expression DOT IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // postfix_expression ::= postfix_expression PTR_OP IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // postfix_expression ::= postfix_expression INC_OP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // postfix_expression ::= postfix_expression DEC_OP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // postfix_expression ::= LPAREN type_name LPAREN LBRACE initializer_list LBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // postfix_expression ::= LPAREN type_name RPAREN LBRACE initializer_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"postfix_expression\",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // argument_expression_list ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"argument_expression_list\",9, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // argument_expression_list ::= argument_expression_list COMMA assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"argument_expression_list\",9, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // unary_expression ::= postfix_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // unary_expression ::= INC_OP unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // unary_expression ::= DEC_OP unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // unary_expression ::= unary_operator cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // unary_expression ::= SIZEOF unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // unary_expression ::= SIZEOF LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // unary_expression ::= ALIGNOF LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_expression\",71, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // unary_operator ::= AND \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // unary_operator ::= MULT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // unary_operator ::= PLUS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // unary_operator ::= MINUS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // unary_operator ::= COMP \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // unary_operator ::= NOT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"unary_operator\",12, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // cast_expression ::= unary_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"cast_expression\",14, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // cast_expression ::= LPAREN type_name RPAREN cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"cast_expression\",14, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // multiplicative_expression ::= cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // multiplicative_expression ::= multiplicative_expression MULT cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // multiplicative_expression ::= multiplicative_expression DIV cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 47: // multiplicative_expression ::= multiplicative_expression MOD cast_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"multiplicative_expression\",15, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 48: // additive_expression ::= multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 49: // additive_expression ::= additive_expression PLUS multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 50: // additive_expression ::= additive_expression MINUS multiplicative_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"additive_expression\",16, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 51: // shift_expression ::= additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 52: // shift_expression ::= shift_expression LEFT_OP additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 53: // shift_expression ::= shift_expression RIGHT_OP additive_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"shift_expression\",17, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 54: // relational_expression ::= shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 55: // relational_expression ::= relational_expression LT shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 56: // relational_expression ::= relational_expression GT shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 57: // relational_expression ::= relational_expression LE_OP shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 58: // relational_expression ::= relational_expression GE_OP shift_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expression\",74, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 59: // equality_expression ::= relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 60: // equality_expression ::= equality_expression EQ_OP relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 61: // equality_expression ::= equality_expression NE_OP relational_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"equality_expression\",18, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 62: // and_expression ::= equality_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"and_expression\",19, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 63: // and_expression ::= and_expression AND equality_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"and_expression\",19, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 64: // exclusive_or_expression ::= and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"exclusive_or_expression\",20, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 65: // exclusive_or_expression ::= exclusive_or_expression XOR and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"exclusive_or_expression\",20, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 66: // inclusive_or_expression ::= exclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"inclusive_or_expression\",75, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 67: // inclusive_or_expression ::= inclusive_or_expression OR exclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"inclusive_or_expression\",75, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 68: // logical_and_expression ::= inclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_and_expression\",21, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 69: // logical_and_expression ::= logical_and_expression AND_OP inclusive_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_and_expression\",21, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 70: // logical_or_expression ::= logical_and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_or_expression\",22, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 71: // logical_or_expression ::= logical_or_expression OR_OP logical_and_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"logical_or_expression\",22, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 72: // conditional_expression ::= logical_or_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"conditional_expression\",23, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 73: // conditional_expression ::= logical_or_expression QUESTION expression COLON conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"conditional_expression\",23, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 74: // assignment_expression ::= conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_expression\",11, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 75: // assignment_expression ::= unary_expression assignment_operator assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_expression\",11, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 76: // assignment_operator ::= EQ \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 77: // assignment_operator ::= MUL_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 78: // assignment_operator ::= DIV_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 79: // assignment_operator ::= MOD_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 80: // assignment_operator ::= ADD_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 81: // assignment_operator ::= SUB_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 82: // assignment_operator ::= LEFT_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 83: // assignment_operator ::= RIGHT_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 84: // assignment_operator ::= AND_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 85: // assignment_operator ::= XOR_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 86: // assignment_operator ::= OR_ASSIGN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"assignment_operator\",69, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 87: // expression ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression\",10, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 88: // expression ::= expression COMMA assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression\",10, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 89: // constant_expression ::= conditional_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant_expression\",24, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 90: // declaration ::= declaration_specifiers SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 91: // declaration ::= declaration_specifiers init_declarator_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 92: // declaration ::= static_assert_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration\",76, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 93: // declaration_specifiers ::= storage_class_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 94: // declaration_specifiers ::= storage_class_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 95: // declaration_specifiers ::= type_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 96: // declaration_specifiers ::= type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 97: // declaration_specifiers ::= type_qualifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 98: // declaration_specifiers ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 99: // declaration_specifiers ::= function_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 100: // declaration_specifiers ::= function_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 101: // declaration_specifiers ::= alignment_specifier declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 102: // declaration_specifiers ::= alignment_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_specifiers\",25, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 103: // init_declarator_list ::= init_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator_list\",26, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 104: // init_declarator_list ::= init_declarator_list COMMA init_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator_list\",26, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 105: // init_declarator ::= declarator EQ initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator\",30, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 106: // init_declarator ::= declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"init_declarator\",30, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 107: // storage_class_specifier ::= TYPEDEF \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 108: // storage_class_specifier ::= EXTERN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 109: // storage_class_specifier ::= STATIC \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 110: // storage_class_specifier ::= THREAD_LOCAL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 111: // storage_class_specifier ::= AUTO \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 112: // storage_class_specifier ::= REGISTER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"storage_class_specifier\",27, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 113: // type_specifier ::= VOID \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 114: // type_specifier ::= CHAR \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 115: // type_specifier ::= SHORT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 116: // type_specifier ::= INT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 117: // type_specifier ::= LONG \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 118: // type_specifier ::= FLOAT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 119: // type_specifier ::= DOUBLE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 120: // type_specifier ::= SIGNED \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 121: // type_specifier ::= UNSIGNED \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 122: // type_specifier ::= BOOL \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 123: // type_specifier ::= COMPLEX \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 124: // type_specifier ::= IMAGINARY \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 125: // type_specifier ::= atomic_type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 126: // type_specifier ::= struct_or_union_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 127: // type_specifier ::= enum_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 128: // type_specifier ::= TYPEDEF_NAME \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_specifier\",28, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 129: // struct_or_union_specifier ::= struct_or_union LBRACE struct_declaration_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 130: // struct_or_union_specifier ::= struct_or_union IDENTIFIER LBRACE struct_declaration_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 131: // struct_or_union_specifier ::= struct_or_union IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union_specifier\",32, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 132: // struct_or_union ::= STRUCT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union\",33, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 133: // struct_or_union ::= UNION \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_or_union\",33, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 134: // struct_declaration_list ::= struct_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration_list\",34, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 135: // struct_declaration_list ::= struct_declaration_list struct_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration_list\",34, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 136: // struct_declaration ::= specifier_qualifier_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 137: // struct_declaration ::= specifier_qualifier_list struct_declarator_list SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 138: // struct_declaration ::= static_assert_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declaration\",35, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 139: // specifier_qualifier_list ::= type_specifier specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 140: // specifier_qualifier_list ::= type_specifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 141: // specifier_qualifier_list ::= type_qualifier specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 142: // specifier_qualifier_list ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"specifier_qualifier_list\",37, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 143: // struct_declarator_list ::= struct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator_list\",38, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 144: // struct_declarator_list ::= struct_declarator_list COMMA struct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator_list\",38, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 145: // struct_declarator ::= COLON constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 146: // struct_declarator ::= declarator COLON constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 147: // struct_declarator ::= declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"struct_declarator\",39, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 148: // enum_specifier ::= ENUM LBRACE enumerator_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 149: // enum_specifier ::= ENUM LBRACE enumerator_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 150: // enum_specifier ::= ENUM IDENTIFIER LBRACE enumerator_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 151: // enum_specifier ::= ENUM IDENTIFIER LBRACE enumerator_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 152: // enum_specifier ::= ENUM IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enum_specifier\",40, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 153: // enumerator_list ::= enumerator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator_list\",41, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 154: // enumerator_list ::= enumerator_list COMMA enumerator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator_list\",41, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 155: // enumerator ::= enumeration_constant EQ constant_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator\",42, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 156: // enumerator ::= enumeration_constant \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"enumerator\",42, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 157: // atomic_type_specifier ::= ATOMIC LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"atomic_type_specifier\",43, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 158: // type_qualifier ::= CONST \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 159: // type_qualifier ::= RESTRICT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 160: // type_qualifier ::= VOLATILE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 161: // type_qualifier ::= ATOMIC \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier\",29, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 162: // function_specifier ::= INLINE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_specifier\",44, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 163: // function_specifier ::= NORETURN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_specifier\",44, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 164: // alignment_specifier ::= ALIGNAS LPAREN type_name RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"alignment_specifier\",45, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 165: // alignment_specifier ::= ALIGNAS LPAREN constant_expression RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"alignment_specifier\",45, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 166: // declarator ::= pointer direct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declarator\",31, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 167: // declarator ::= direct_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declarator\",31, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 168: // direct_declarator ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 169: // direct_declarator ::= LPAREN declarator RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 170: // direct_declarator ::= direct_declarator LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 171: // direct_declarator ::= direct_declarator LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 172: // direct_declarator ::= direct_declarator LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 173: // direct_declarator ::= direct_declarator LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 174: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 175: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 176: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 177: // direct_declarator ::= direct_declarator LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 178: // direct_declarator ::= direct_declarator LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 179: // direct_declarator ::= direct_declarator LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 180: // direct_declarator ::= direct_declarator LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 181: // direct_declarator ::= direct_declarator LPAREN identifier_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_declarator\",47, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 182: // pointer ::= MULT type_qualifier_list pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 183: // pointer ::= MULT type_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 184: // pointer ::= MULT pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 185: // pointer ::= MULT \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"pointer\",46, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 186: // type_qualifier_list ::= type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier_list\",50, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 187: // type_qualifier_list ::= type_qualifier_list type_qualifier \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_qualifier_list\",50, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 188: // parameter_type_list ::= parameter_list COMMA ELLIPSIS \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_type_list\",48, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 189: // parameter_type_list ::= parameter_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_type_list\",48, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 190: // parameter_list ::= parameter_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_list\",70, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 191: // parameter_list ::= parameter_list COMMA parameter_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_list\",70, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 192: // parameter_declaration ::= declaration_specifiers declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 193: // parameter_declaration ::= declaration_specifiers abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 194: // parameter_declaration ::= declaration_specifiers \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"parameter_declaration\",51, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 195: // identifier_list ::= IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"identifier_list\",49, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 196: // identifier_list ::= identifier_list COMMA IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"identifier_list\",49, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 197: // type_name ::= specifier_qualifier_list abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_name\",13, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 198: // type_name ::= specifier_qualifier_list \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"type_name\",13, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 199: // abstract_declarator ::= pointer direct_abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 200: // abstract_declarator ::= pointer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 201: // abstract_declarator ::= direct_abstract_declarator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"abstract_declarator\",52, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 202: // direct_abstract_declarator ::= LPAREN abstract_declarator RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 203: // direct_abstract_declarator ::= LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 204: // direct_abstract_declarator ::= LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 205: // direct_abstract_declarator ::= LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 206: // direct_abstract_declarator ::= LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 207: // direct_abstract_declarator ::= LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 208: // direct_abstract_declarator ::= LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 209: // direct_abstract_declarator ::= LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 210: // direct_abstract_declarator ::= LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 211: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 212: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK MULT RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 213: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK STATIC type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 214: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 215: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 216: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list STATIC assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 217: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK type_qualifier_list RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 218: // direct_abstract_declarator ::= direct_abstract_declarator LBRACK assignment_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 219: // direct_abstract_declarator ::= LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 220: // direct_abstract_declarator ::= LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 221: // direct_abstract_declarator ::= direct_abstract_declarator LPAREN RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 222: // direct_abstract_declarator ::= direct_abstract_declarator LPAREN parameter_type_list RPAREN \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"direct_abstract_declarator\",53, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 223: // initializer ::= LBRACE initializer_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 224: // initializer ::= LBRACE initializer_list COMMA RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 225: // initializer ::= assignment_expression \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer\",36, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 226: // initializer_list ::= designation initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 227: // initializer_list ::= initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 228: // initializer_list ::= initializer_list COMMA designation initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 229: // initializer_list ::= initializer_list COMMA initializer \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"initializer_list\",54, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 230: // designation ::= designator_list EQ \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designation\",55, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 231: // designator_list ::= designator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator_list\",56, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 232: // designator_list ::= designator_list designator \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator_list\",56, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 233: // designator ::= LBRACK constant_expression RBRACK \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator\",57, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 234: // designator ::= DOT IDENTIFIER \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"designator\",57, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 235: // static_assert_declaration ::= STATIC_ASSERT LPAREN constant_expression COMMA STRING_LITERAL RPAREN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"static_assert_declaration\",58, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 236: // statement ::= labeled_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 237: // statement ::= compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 238: // statement ::= expression_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 239: // statement ::= selection_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 240: // statement ::= iteration_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 241: // statement ::= jump_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"statement\",59, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 242: // labeled_statement ::= IDENTIFIER COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 243: // labeled_statement ::= CASE constant_expression COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 244: // labeled_statement ::= DEFAULT COLON statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"labeled_statement\",60, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 245: // compound_statement ::= LBRACE RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"compound_statement\",61, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 246: // compound_statement ::= LBRACE block_item_list RBRACE \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"compound_statement\",61, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 247: // block_item_list ::= block_item \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item_list\",62, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 248: // block_item_list ::= block_item_list block_item \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item_list\",62, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 249: // block_item ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item\",63, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 250: // block_item ::= statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"block_item\",63, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 251: // expression_statement ::= SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression_statement\",66, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 252: // expression_statement ::= expression SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expression_statement\",66, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 253: // selection_statement ::= IF LPAREN expression RPAREN statement ELSE statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 254: // selection_statement ::= IF LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 255: // selection_statement ::= SWITCH LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"selection_statement\",64, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 256: // iteration_statement ::= WHILE LPAREN expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 257: // iteration_statement ::= DO statement WHILE LPAREN expression RPAREN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 258: // iteration_statement ::= FOR LPAREN expression_statement expression_statement RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 259: // iteration_statement ::= FOR LPAREN expression_statement expression_statement expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 260: // iteration_statement ::= FOR LPAREN declaration expression_statement RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-5)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 261: // iteration_statement ::= FOR LPAREN declaration expression_statement expression RPAREN statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"iteration_statement\",72, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-6)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 262: // jump_statement ::= GOTO IDENTIFIER SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 263: // jump_statement ::= CONTINUE SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 264: // jump_statement ::= BREAK SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 265: // jump_statement ::= RETURN SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 266: // jump_statement ::= RETURN expression SEMICOLON \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"jump_statement\",65, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 267: // translation_unit ::= external_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"translation_unit\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 268: // translation_unit ::= translation_unit external_declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"translation_unit\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 269: // external_declaration ::= function_definition \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"external_declaration\",67, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 270: // external_declaration ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"external_declaration\",67, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 271: // function_definition ::= declaration_specifiers declarator declaration_list compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_definition\",68, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 272: // function_definition ::= declaration_specifiers declarator compound_statement \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function_definition\",68, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 273: // declaration_list ::= declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_list\",73, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 274: // declaration_list ::= declaration_list declaration \n {\n Object RESULT =null;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"declaration_list\",73, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$parser$act_num+\"found in internal parse table\");\n\n }\n }", "public interface ICommandDisplayAction extends IAction{\r\n\r\n\t \r\n\t\r\n\tpublic void displayPallet() ;\r\n\r\n\tpublic void displayArena();\r\n\t\r\n\tpublic void displayComponent(String componentIntanceName) ;\r\n\t\r\n\tpublic void displayChain( ) ;\r\n}", "public void act() \n {\n canSeeAlex();\n }", "@Override\n public void action(Jugador jugador) {\n\n }", "public void actionOffered();", "public final java_cup.runtime.Symbol CUP$LuaGrammarCup$do_action(\r\n int CUP$LuaGrammarCup$act_num,\r\n java_cup.runtime.lr_parser CUP$LuaGrammarCup$parser,\r\n java.util.Stack CUP$LuaGrammarCup$stack,\r\n int CUP$LuaGrammarCup$top)\r\n throws java.lang.Exception\r\n {\r\n /* Symbol object for return from actions */\r\n java_cup.runtime.Symbol CUP$LuaGrammarCup$result;\r\n\r\n /* select the action based on the action number */\r\n switch (CUP$LuaGrammarCup$act_num)\r\n {\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 112: // string ::= LONGSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 111: // string ::= CHARSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 110: // string ::= NORMALSTRING \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"string\",11, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 109: // number ::= HEX \r\n {\r\n Object RESULT =null;\r\n\t\tint hleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint hright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject h = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = h;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 108: // number ::= INT \r\n {\r\n Object RESULT =null;\r\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject i = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = Integer.parseInt(i.toString());\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 107: // number ::= FLOAT \r\n {\r\n Object RESULT =null;\r\n\t\tint fleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint fright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject f = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = Float.parseFloat(f.toString());\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 106: // number ::= EXP \r\n {\r\n Object RESULT =null;\r\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT = e; \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"number\",10, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 105: // unop ::= SHARP \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 104: // unop ::= NOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 103: // unop ::= MINUS \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"unop\",8, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 102: // binop ::= OR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 101: // binop ::= AND \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 100: // binop ::= NEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 99: // binop ::= EQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 98: // binop ::= MAIEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 97: // binop ::= MAIOR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 96: // binop ::= MINEQ \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 95: // binop ::= MINOR \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 94: // binop ::= DOTDOT \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 93: // binop ::= MOD \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 92: // binop ::= EXPON \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 91: // binop ::= DIVIDE \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 90: // binop ::= MULT \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 89: // binop ::= MINUS \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 88: // binop ::= PLUS \r\n {\r\n Object RESULT =null;\r\n\t\tint opleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).left;\n\t\tint opright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()).right;\n\t\tObject op = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.peek()).value;\n\t\tRESULT=op;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"binop\",7, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 87: // fieldsep ::= COMMA \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldsep\",19, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 86: // fieldsep ::= SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldsep\",19, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 85: // field ::= exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 84: // field ::= VAR_NAME ASSIGN exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 83: // field ::= LBRACK exp RBRACK ASSIGN exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"field\",26, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 82: // fieldlist ::= fieldlist fieldsep field \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found fieldlist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldlist\",18, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 81: // fieldlist ::= field \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found a field\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"fieldlist\",18, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 80: // tableconstructor ::= LCURLY fieldlist RCURLY \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"table constructor\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"tableconstructor\",27, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 79: // tableconstructor ::= LCURLY RCURLY \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"tableconstructor\",27, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 78: // parlist ::= TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 77: // parlist ::= namelist COMMA TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 76: // parlist ::= namelist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"parlist\",16, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 75: // funcbody ::= LPAREN parlist RPAREN block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"functionbody with par\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcbody\",13, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 74: // funcbody ::= LPAREN RPAREN block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"functionbody\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcbody\",13, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 73: // function ::= FUNCTION funcbody \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"function\",14, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 72: // args ::= string \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 71: // args ::= tableconstructor \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 70: // args ::= LPAREN explist RPAREN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"args (explist)\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 69: // args ::= LPAREN RPAREN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"args ()\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"args\",23, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 68: // functioncall ::= prefixexp COLON VAR_NAME args \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function call\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"functioncall\",17, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 67: // functioncall ::= prefixexp args \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"function call\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"functioncall\",17, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 66: // prefixexp ::= functioncall \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"prefixexp->functioncall\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"prefixexp\",21, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 65: // prefixexp ::= var \r\n {\r\n Object RESULT =null;\r\n\t\t System.out.println(\"prefixexp->var\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"prefixexp\",21, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 64: // exp_member ::= unop exp_member \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 63: // exp_member ::= TRIDOT \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 62: // exp_member ::= tableconstructor \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 61: // exp_member ::= prefixexp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 60: // exp_member ::= function \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 59: // exp_member ::= string \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 58: // exp_member ::= number \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found number\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 57: // exp_member ::= TRUE \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 56: // exp_member ::= FALSE \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 55: // exp_member ::= NIL \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member\",33, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 54: // exp_member_recoursive ::= exp_member binop exp_member_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found binop exp\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member_recoursive\",35, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 53: // exp_member_recoursive ::= exp_member \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_member_recoursive\",35, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 52: // exp ::= exp_member_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp\",5, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 51: // exp_recoursive ::= exp COMMA exp_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"exp_recoursive\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_recoursive\",34, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 50: // exp_recoursive ::= exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"exp_recoursive\",34, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 49: // explist ::= exp_recoursive \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found explist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"explist\",12, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 48: // namelist ::= namelist COMMA VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"namelist\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"namelist\",36, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 47: // namelist ::= VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"namelist\",36, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 46: // var ::= prefixexp DOT VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 45: // var ::= prefixexp LBRACK exp RBRACK \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 44: // var ::= VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"var\",22, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 43: // varlist ::= varlist var COMMA \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"varlist\",24, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 42: // varlist ::= var \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"varlist\",24, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 41: // dot_var_name ::= DOT VAR_NAME dot_var_name \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"dot_var_name\",42, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 40: // dot_var_name ::= \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"dot_var_name\",42, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 39: // funcname ::= VAR_NAME dot_var_name COLON VAR_NAME \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcname\",15, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 38: // funcname ::= VAR_NAME dot_var_name \r\n {\r\n Object RESULT =null;\r\n\t\tint varleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint varright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject var = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tSystem.out.println(\"funcname:\" + var); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"funcname\",15, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 37: // break_stat ::= BREAK SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"break_stat\",38, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 36: // break_stat ::= BREAK \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"break stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"break_stat\",38, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 35: // return_stat ::= RETURN explist SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 34: // return_stat ::= RETURN SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 33: // return_stat ::= RETURN explist \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"return with explist\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 32: // return_stat ::= RETURN \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"return stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"return_stat\",37, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 31: // last_stat ::= break_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"last_stat\",9, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 30: // last_stat ::= return_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"last_stat\",9, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 29: // for_stat ::= FOR namelist IN explist DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"for stat in\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-6)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 28: // for_stat ::= FOR VAR_NAME ASSIGN exp COMMA exp COMMA exp DO block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-10)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 27: // for_stat ::= FOR VAR_NAME ASSIGN exp COMMA exp DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"for stat\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"for_stat\",39, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-8)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 26: // if_recoursive ::= if_recoursive ELSEIF exp THEN block \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_recoursive\",41, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 25: // if_recoursive ::= ELSEIF exp THEN block \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_recoursive\",41, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 24: // if_stat ::= IF exp THEN block if_recoursive ELSE block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-7)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 23: // if_stat ::= IF exp THEN block ELSE block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-6)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 22: // if_stat ::= IF exp THEN block if_recoursive END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-5)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 21: // if_stat ::= IF exp THEN block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"if_stat\",40, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 20: // stat ::= LOCAL namelist ASSIGN explist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 19: // stat ::= LOCAL namelist \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 18: // stat ::= LOCAL FUNCTION VAR_NAME funcbody \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 17: // stat ::= FUNCTION funcname funcbody \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"found Function stat\"); \r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 16: // stat ::= for_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 15: // stat ::= if_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 14: // stat ::= REPEAT block UNTIL exp \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 13: // stat ::= WHILE exp DO block END \r\n {\r\n Object RESULT =null;\r\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).right;\n\t\tObject e = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-3)).value;\n\t\tint bleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint bright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject b = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tSystem.out.println(\"while statement\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-4)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 12: // stat ::= DO block END \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 11: // stat ::= functioncall \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 10: // stat ::= varlist ASSIGN explist \r\n {\r\n Object RESULT =null;\r\n\t\tSystem.out.println(\"varlist assign explist\");\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat\",2, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 9: // block ::= chunk \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"block\",1, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 8: // stat_recoursive ::= stat SEMI stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-2)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 7: // stat_recoursive ::= stat stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 6: // stat_recoursive ::= stat SEMI \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 5: // stat_recoursive ::= stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"stat_recoursive\",30, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 4: // chunk ::= \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 3: // chunk ::= last_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 2: // chunk ::= stat_recoursive last_stat \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 1: // $START ::= chunk EOF \r\n {\r\n Object RESULT =null;\r\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).right;\n\t\tObject start_val = (Object)((java_cup.runtime.Symbol) CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)).value;\n\t\tRESULT = start_val;\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.elementAt(CUP$LuaGrammarCup$top-1)), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n /* ACCEPT */\r\n CUP$LuaGrammarCup$parser.done_parsing();\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /*. . . . . . . . . . . . . . . . . . . .*/\r\n case 0: // chunk ::= stat_recoursive \r\n {\r\n Object RESULT =null;\r\n\r\n CUP$LuaGrammarCup$result = parser.getSymbolFactory().newSymbol(\"chunk\",0, ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), ((java_cup.runtime.Symbol)CUP$LuaGrammarCup$stack.peek()), RESULT);\r\n }\r\n return CUP$LuaGrammarCup$result;\r\n\r\n /* . . . . . .*/\r\n default:\r\n throw new Exception(\r\n \"Invalid action number found in internal parse table\");\r\n\r\n }\r\n }", "static void actionPrompt() {\n prompt:\n while (true) {\n String line = \"\";\n System.out.println(\"\\nWhat do you want to do: (S)ave, (F)ill, (L)ine, (V)isible, (Q)uit: \");\n while (line.length() < 1)\n line = scan.nextLine().toUpperCase();\n char action = line.charAt(0);\n switch (action) {\n case 'Q':\n break prompt;\n case 'V':\n visible(); break;\n case 'L':\n line(); break;\n case 'F':\n fill(); break;\n case 'S':\n save(); break;\n default:\n System.out.println(\"Not a valid command.\");\n }\n }\n }", "@Override\n\tpublic void action() {\n\t\tACLMessage msgRx = myAgent.receive();\n\t\tif (msgRx != null && msgRx.getPerformative() == ACLMessage.REQUEST) {\n\t\t\tContentManager contentManager = myAgent.getContentManager();\n\t\t\tSystem.out.println(\"RECEIVED = \" + msgRx.getContent());\n\t\t\tmsgRx.setLanguage(\"fipa-sl\");\n\t\t\tmsgRx.setOntology(\"blocks-ontology\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tContentElementList elementList = (ContentElementList) contentManager\n\t\t\t\t\t\t.extractContent(msgRx);\n\n\t\t\t\tIterator elementIterator = elementList.iterator();\n\n\t\t\t\twhile (elementIterator.hasNext()) {\n\t\t\t\t\tAction action = (Action) elementIterator.next();\n\t\t\t\t\t((Environment) myAgent).getWorld().getActionList().add((Executable) (action.getAction()));\n//\t\t\t\t\t((Executable) (action.getAction()))\n//\t\t\t\t\t\t\t.execute((Environment) myAgent);\n\t\t\t\t}\n\n\t\t\t} catch (UngroundedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (CodecException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (OntologyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tblock();\n\t\t}\n\t\t\n\t}", "public void setAction(String action) { this.action = action; }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "@Override\n\t\t\tpublic void performAction(PrintWriter pw) {\n\t\t\t\t\n\t\t\t\tString hello = \"helloworld\";\n\t\t\t\t\n\t\t\t\tpw.println(hello);\n\t\t\t\t\n\t\t\t}", "static void perform_ani(String passed){\n\t\tint type = type_of_ani(passed);\n\t\tif(type==1)\n\t\t\tani_with_acc(passed);\n\t}", "public final java_cup.runtime.Symbol CUP$CoolParser$do_action_part00000000(\n int CUP$CoolParser$act_num,\n java_cup.runtime.lr_parser CUP$CoolParser$parser,\n java.util.Stack CUP$CoolParser$stack,\n int CUP$CoolParser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$CoolParser$result;\n\n /* select the action based on the action number */\n switch (CUP$CoolParser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // program ::= class_list \n {\n programc RESULT =null;\n\t\tClasses cl = (Classes)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new programc(curr_lineno(), cl); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"program\",0, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // $START ::= program EOF \n {\n Object RESULT =null;\n\t\tprogramc start_val = (programc)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, RESULT);\n }\n /* ACCEPT */\n CUP$CoolParser$parser.done_parsing();\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // program ::= error \n {\n programc RESULT =null;\n\t\t RESULT = new programc(curr_lineno(),\n new Classes(curr_lineno())); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"program\",0, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // class_list ::= class_cc \n {\n Classes RESULT =null;\n\t\tclass_c c = (class_c)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = (new Classes(curr_lineno())).appendElement(c); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_list\",1, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // class_list ::= class_list class_cc \n {\n Classes RESULT =null;\n\t\tClasses cl = (Classes)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tclass_c c = (class_c)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = cl.appendElement(c); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_list\",1, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // class_cc ::= CLASS TYPEID LBRACE optional_feature_list RBRACE SEMI \n {\n class_c RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tFeatures f = (Features)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\t RESULT = new class_c(curr_lineno(), n, \n\t\t AbstractTable.idtable.addString(\"Object\"), \n\t\t\t\t f, curr_filename()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_cc\",2, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // class_cc ::= CLASS TYPEID INHERITS TYPEID LBRACE optional_feature_list RBRACE SEMI \n {\n class_c RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-6)).value;\n\t\tAbstractSymbol p = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tFeatures f = (Features)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\t RESULT = new class_c(curr_lineno(), n, p, f, curr_filename()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_cc\",2, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // class_cc ::= error SEMI \n {\n class_c RESULT =null;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"class_cc\",2, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // optional_feature_list ::= \n {\n Features RESULT =null;\n\t\t RESULT = new Features(curr_lineno()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"optional_feature_list\",3, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // optional_feature_list ::= f2 \n {\n Features RESULT =null;\n\t\tFeature feature2 = (Feature)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new Features(curr_lineno()).appendElement(feature2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"optional_feature_list\",3, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // optional_feature_list ::= optional_feature_list f2 \n {\n Features RESULT =null;\n\t\tFeatures flist = (Features)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tFeature feature2 = (Feature)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = flist.appendElement(feature2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"optional_feature_list\",3, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // f2 ::= OBJECTID COLON TYPEID SEMI \n {\n Feature RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t \n\t\tRESULT = new attr(curr_lineno(), o, t, new no_expr(curr_lineno())); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // f2 ::= OBJECTID COLON TYPEID ASSIGN expr SEMI \n {\n Feature RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-5)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tExpression ex1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new attr(curr_lineno(), o, t, ex1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // f2 ::= OBJECTID LPAREN formal_list RPAREN COLON TYPEID LBRACE expr RBRACE SEMI \n {\n Feature RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-9)).value;\n\t\tFormals f1 = (Formals)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-7)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\t RESULT = new method(curr_lineno(), o, f1, t, e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // f2 ::= error SEMI \n {\n Feature RESULT =null;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"f2\",10, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // formal_list ::= \n {\n Formals RESULT =null;\n\t\t RESULT = new Formals(curr_lineno()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",9, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // formal_list ::= formal_1 \n {\n Formals RESULT =null;\n\t\tFormal formal1 = (Formal)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new Formals(curr_lineno()).appendElement(formal1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",9, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // formal_list ::= formal_list formal_1 \n {\n Formals RESULT =null;\n\t\tFormals f2 = (Formals)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tFormal formal1 = (Formal)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = f2.appendElement(formal1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_list\",9, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // formal_1 ::= OBJECTID COLON TYPEID \n {\n Formal RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new formalc(curr_lineno(), o, t); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_1\",8, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // formal_1 ::= OBJECTID COLON TYPEID COMMA \n {\n Formal RESULT =null;\n\t\tAbstractSymbol obj = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol typ = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new formalc(curr_lineno(), obj, typ); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"formal_1\",8, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // expr ::= expr PLUS expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new plus(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // expr ::= expr MINUS expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new sub(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // expr ::= expr MULT expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new mul(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // expr ::= expr DIV expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new divide(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // expr ::= NEG expr \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new neg(curr_lineno(), e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // expr ::= expr LT expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new lt(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // expr ::= expr EQ expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new eq(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // expr ::= expr LE expr \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new leq(curr_lineno(), e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // expr ::= NOT expr \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new comp(curr_lineno(), e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // expr ::= LPAREN expr RPAREN \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = e; \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 30: // expr ::= INT_CONST \n {\n Expression RESULT =null;\n\t\tAbstractSymbol i = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new int_const(curr_lineno(), i); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 31: // expr ::= STR_CONST \n {\n Expression RESULT =null;\n\t\tAbstractSymbol s = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new string_const(curr_lineno(), s); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 32: // expr ::= BOOL_CONST \n {\n Expression RESULT =null;\n\t\tBoolean b = (Boolean)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new bool_const(curr_lineno(), b); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 33: // expr ::= OBJECTID \n {\n Expression RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new object(curr_lineno(), o); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 34: // expr ::= OBJECTID actuals \n {\n Expression RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tExpressions a = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new dispatch(curr_lineno(),\n\t new object(curr_lineno(), \n\t AbstractTable.idtable.addString(\"self\")),\n\t\t\t\t n, a); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 35: // expr ::= expr DOT OBJECTID actuals \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tExpressions b = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new dispatch(curr_lineno(), e1, n, b); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 36: // expr ::= expr AT TYPEID DOT OBJECTID actuals \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-5)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tExpressions b = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new static_dispatch(curr_lineno(), e1, t, n, b); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 37: // expr ::= ISVOID expr \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new isvoid(curr_lineno(), e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 38: // expr ::= OBJECTID ASSIGN expr \n {\n Expression RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new assign(curr_lineno(), o, e1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 39: // expr ::= IF expr THEN expr ELSE expr FI \n {\n Expression RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-5)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tExpression e3 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new cond(curr_lineno(), e1, e2, e3); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 40: // expr ::= NEW TYPEID \n {\n Expression RESULT =null;\n\t\tAbstractSymbol n = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new new_(curr_lineno(), n); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 41: // expr ::= LBRACE block_exp_list RBRACE \n {\n Expression RESULT =null;\n\t\tExpressions exprslist = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new block(curr_lineno(), exprslist); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 42: // expr ::= CASE expr OF case_list ESAC \n {\n Expression RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tCases cl = (Cases)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new typcase(curr_lineno(), e, cl); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 43: // expr ::= WHILE expr LOOP expr POOL \n {\n Expression RESULT =null;\n\t\tExpression eone = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-3)).value;\n\t\tExpression etwo = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\tRESULT = new loop(curr_lineno(), eone, etwo); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 44: // expr ::= LET lettail \n {\n Expression RESULT =null;\n\t\tlet tail = (let)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = tail; \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"expr\",4, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 45: // lettail ::= OBJECTID COLON TYPEID ASSIGN expr IN expr \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-6)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, e1, e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 46: // lettail ::= OBJECTID COLON TYPEID IN expr \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e2 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, new no_expr(curr_lineno()), e2); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 47: // lettail ::= OBJECTID COLON TYPEID ASSIGN expr COMMA lettail \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-6)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tlet tail = (let)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, e1, tail); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 48: // lettail ::= OBJECTID COLON TYPEID COMMA lettail \n {\n let RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tlet tail = (let)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\tRESULT = new let(curr_lineno(), o, t, new no_expr(curr_lineno()), tail); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 49: // lettail ::= error SEMI \n {\n let RESULT =null;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 50: // lettail ::= error IN expr \n {\n let RESULT =null;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"lettail\",14, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 51: // actuals ::= LPAREN RPAREN \n {\n Expressions RESULT =null;\n\t\t RESULT = new Expressions(curr_lineno()); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"actuals\",5, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 52: // actuals ::= LPAREN exp_list RPAREN \n {\n Expressions RESULT =null;\n\t\tExpressions el = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = el; \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"actuals\",5, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 53: // case_list ::= case_1 \n {\n Cases RESULT =null;\n\t\tCase c1 = (Case)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new Cases(curr_lineno()).appendElement(c1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_list\",12, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 54: // case_list ::= case_1 SEMI \n {\n Cases RESULT =null;\n\t\tCase c1 = (Case)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new Cases(curr_lineno()).appendElement(c1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_list\",12, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 55: // case_list ::= case_list case_1 SEMI \n {\n Cases RESULT =null;\n\t\tCases cl = (Cases)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tCase c1 = (Case)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = cl.appendElement(c1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_list\",12, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 56: // case_1 ::= OBJECTID COLON TYPEID DARROW expr \n {\n Case RESULT =null;\n\t\tAbstractSymbol o = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-4)).value;\n\t\tAbstractSymbol t = (AbstractSymbol)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e1 = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = new branch(curr_lineno(), o, t, e1); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"case_1\",13, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 57: // exp_list ::= expr \n {\n Expressions RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = (new Expressions(curr_lineno())).appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"exp_list\",6, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 58: // exp_list ::= exp_list COMMA expr \n {\n Expressions RESULT =null;\n\t\tExpressions el = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.peek()).value;\n\t\t RESULT = el.appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"exp_list\",6, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 59: // block_exp_list ::= expr SEMI \n {\n Expressions RESULT =null;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = new Expressions(curr_lineno()).appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"block_exp_list\",7, RESULT);\n }\n return CUP$CoolParser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 60: // block_exp_list ::= block_exp_list expr SEMI \n {\n Expressions RESULT =null;\n\t\tExpressions el = (Expressions)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-2)).value;\n\t\tExpression e = (Expression)((java_cup.runtime.Symbol) CUP$CoolParser$stack.elementAt(CUP$CoolParser$top-1)).value;\n\t\t RESULT = el.appendElement(e); \n CUP$CoolParser$result = parser.getSymbolFactory().newSymbol(\"block_exp_list\",7, RESULT);\n }\n return CUP$CoolParser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$CoolParser$act_num+\"found in internal parse table\");\n\n }\n }" ]
[ "0.6989324", "0.64658433", "0.6398834", "0.6353149", "0.63501525", "0.633518", "0.63232154", "0.63232154", "0.63232154", "0.6317274", "0.62379014", "0.61738145", "0.61690307", "0.61507595", "0.6110593", "0.6071837", "0.6065073", "0.6061467", "0.6035597", "0.6035597", "0.6035597", "0.6035597", "0.60223806", "0.6011715", "0.5994028", "0.5986706", "0.5973847", "0.59363747", "0.59299153", "0.59274375", "0.5925999", "0.59236354", "0.5900132", "0.58874744", "0.5880966", "0.5860396", "0.5858362", "0.5852421", "0.5834586", "0.5807131", "0.5794122", "0.57809204", "0.5775529", "0.5772291", "0.57655984", "0.5762837", "0.57587755", "0.5758653", "0.5752396", "0.5749633", "0.5743911", "0.5743911", "0.5743657", "0.5743657", "0.5740693", "0.57326096", "0.5722666", "0.5708811", "0.5706221", "0.57024294", "0.56944466", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5692927", "0.5685764", "0.56807494", "0.5661615", "0.5650216", "0.5650081", "0.56464934", "0.5645747", "0.5641903", "0.5627175", "0.5619585", "0.5615084", "0.5601284", "0.5599514", "0.55944145", "0.55931157", "0.55916977", "0.55916977", "0.55916977", "0.5590322", "0.55799615", "0.55674374", "0.55666804", "0.5555143", "0.5554079", "0.55520636", "0.5545089", "0.5543725", "0.55414605", "0.55311835", "0.5530412", "0.55255187", "0.55118287" ]
0.0
-1
Feign client with ribbon and hystrix
@RibbonClient(value = "user-client") // load balancer @FeignClient(value = "user-client", fallback = UserClientFallback.class) public interface UserClient { @GetMapping("/user") User getUser(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FeignClient(value = \"SERVICE-A\", fallback = BaseClientHystrix.class)\npublic interface BaseClient {\n @RequestMapping(method = RequestMethod.GET, value = \"/list\")\n String list();\n}", "@FeignClient(\n name = \"beispiel-hystrix-service\",\n url = \"http://localhost:8081\",\n fallback = RemoteRandomFallback.class\n)\npublic interface RemoteRandomProxy {\n\n @GetMapping(\"/random\")\n List<Integer> getRandomNumbers();\n\n}", "@FeignClient(name = \"user-service\",fallback = UserClientHystrix.class)\npublic interface UserClient {\n @GetMapping(\"/user/test\")\n Object test(@RequestParam(\"name\") String name);\n}", "@FeignClient(value = \"eureka-client\", fallback = ServiceHelloHystrix.class)\npublic interface ServiceHello {\n\n @RequestMapping(value = \"/hello\", method = RequestMethod.GET)\n public String sayHello(@RequestParam(value = \"name\") String name);\n}", "@FeignClient(name = \"gallery-service\", url = \"http://localhost:8081/\", fallback = StatisticFallbackFactory.class)\npublic interface ServiceFeignClient {\n\n\n // Request. contain way that identical in gallery-service (same signature)\n @RequestLine(\"GET /show\")\n List<Bucket> getAllEmployeesList();\n\n}", "@FeignClient(value = \"supos-cloud-provider-omc\", configuration = OAuth2FeignAutoConfiguration.class, fallback = OmcOrderDetailFeignHystrix.class)\npublic interface OmcOrderDetailFeignApi {\n}", "@FeignClient(\"vm-eureka-server-ad\")\npublic interface AdFeignClient {\n\n @RequestMapping(value = \"test\", method = RequestMethod.GET)\n String test();\n}", "@FeignClient(value = UserUrl.SERVICE_NAME, fallback = UserHystrix.class)\npublic interface UserClient {\n\n @RequestMapping(value = UserUrl.USER_V1, method = RequestMethod.GET)\n String findUser(@RequestParam Map<String, Object> map);\n\n @RequestMapping(value = UserUrl.USER_INFO_V1, method = RequestMethod.GET)\n ResponseEntity<UserDto> findUserById(@PathVariable(\"userId\") Integer userId);\n}", "@FeignClient(name = \"demo-service1\"\n// , fallback= DemoService1Fallback.class\n ,fallbackFactory=DemoService1FallBackFactory.class\n)\npublic interface DemoService1Client {\n\n @GetMapping(value = \"/test/test1\")\n String test1();\n}", "@FeignClient(value = \"BINGO-CMDB\")\r\npublic interface FeignService {\r\n\r\n @RequestMapping(value = \"/api/hello\",method = RequestMethod.GET)\r\n String sayHello();\r\n}", "@FeignClient(\"customer-service\")\npublic interface CustomerClient {\n}", "@FeignClient(value = \"EUREKA-CLIENT-01\")\npublic interface HelloService {\n @RequestMapping(value = \"/hello\",method = RequestMethod.GET)\n String hello(@RequestParam(value = \"name\") String name);\n}", "@FeignClient(name = \"account-service\", value = \"account-service\", fallback = AccountClientFallback.class)\npublic interface AccountClient {\n\n @GetMapping(value = \"/accounts/customer/{customerId}\")\n List<Account> getAccounts(@PathVariable(\"customerId\") Integer customerId);\n\n}", "@FeignClient(name = \"biblioc-bibliotheque\", url = \"localhost:9002\")\npublic interface BibliocBibliothequeProxy {\n\n @GetMapping(value = \"/Titre/{id}\")\n String getTitreLivre(@PathVariable(\"id\") int id);\n\n}", "@FeignClient(value = \"HELLO-SERVICE\")\npublic interface RefactorHelloService extends online.wangxuan.helloserviceapi.service.HelloService {\n}", "@FeignClient(value = \"monetary-market-service\",fallback = RateServiceImpl.class)\npublic interface RateService{\n\n @RequestMapping(\"/rate/uplan\")\n Map uplan(int number);\n}", "@FeignClient(value = \"${config.eureka.provider}\")\npublic interface FeignTestFacade {\n @RequestMapping(value = \"/name\" ,method = RequestMethod.GET)\n String getName();\n}", "@FeignClient(name=\"netflix-zuul-api-gateway-server\") // feign will interact with the zuul server and get the api from naming server\n@RibbonClient(name=\"currency-exchange-service\")\npublic interface CurrencyExchangeServiceProxy {\n\t//@GetMapping(\"/currency-exchange/from/{from}/to/{to}\")\n\t@GetMapping(\"/currency-exchange-service/currency-exchange/from/{from}/to/{to}\")\n\tpublic CurrencyConversionBean retrieveExchangeValue(@PathVariable(\"from\") String from, @PathVariable(\"to\") String to);\n}", "public interface DynamicFeignClient {\n\n @RequestLine(\"POST \")\n @Headers(\"Content-Type: application/json\")\n public ResponseModel callback(@RequestBody RequestModel requestModel);\n}", "@FeignClient(\"${biz.feign.name}\")\npublic interface FinancingUserRemittanceClient {\n\n @RequestMapping(\"/financingUserRemittance/listPageByCondition\")\n Pagination<FinancingUserRemittanceDto> listPageByCondition(@RequestBody FinancingUserRemittanceQuery query);\n\n}", "@FeignClient(value = \"${noun-id}\", fallback = NounFallback.class)\n@Order(5)\npublic interface NounClient extends WordServicesClient {\n @Override\n default ServiceNameOrder getServiceName(){\n return ServiceNameOrder.noun;\n }\n}", "@FeignClient(value = \"jec-service-job\")\npublic interface IIndexApi {\n\n @RequestMapping(value = \"/\", method = RequestMethod.GET)\n RetObject index();\n\n}", "@FeignClient(\"greetings-service\")\ninterface GreetingsClient {\n\n\t@RequestMapping(method = RequestMethod.GET, value = \"/greetings/{name}\")\n\tGreeting greet(@PathVariable(\"name\") String name);\n}", "@FeignClient(name = \"zh-order-provider\", fallback = ZhMessageClientFallBack.class)\npublic interface RestZhMessageClient {\n@RequestMapping(value = \"/getZhMessageById\",method = RequestMethod.POST)\npublic ZhMessage getZhMessageById(@RequestParam(\"id\") Long id)throws Exception;\n\n@RequestMapping(value = \"/getZhMessageListByMap\",method = RequestMethod.POST)\npublic List<ZhMessage>\tgetZhMessageListByMap(@RequestParam Map<String,Object> param)throws Exception;\n\n@RequestMapping(value = \"/getZhMessageCountByMap\",method = RequestMethod.POST)\npublic Integer getZhMessageCountByMap(@RequestParam Map<String,Object> param)throws Exception;\n\n@RequestMapping(value = \"/qdtxAddZhMessage\",method = RequestMethod.POST)\npublic Integer qdtxAddZhMessage(@RequestBody ZhMessage zhMessage)throws Exception;\n\n@RequestMapping(value = \"/qdtxModifyZhMessage\",method = RequestMethod.POST)\npublic Integer qdtxModifyZhMessage(@RequestBody ZhMessage zhMessage)throws Exception;\n}", "@FeignClient(name = \"user-server\", fallback = UserFeignHystrix.class)\npublic interface UserFeignClient {\n /**\n * 校验用户是否存在\n *\n * @param username 用户名\n * @param password 密码\n * @return 查询结果\n */\n @RequestMapping(value = \"/user/check\", method = RequestMethod.POST)\n ResultModel loginCheck(@RequestParam(\"username\") String username, @RequestParam(\"password\")String password);\n}", "public interface DeviceCertClient extends AccessApiClient {\n\n @Headers({\n CONTENT_TYPE + \": \" + \"application/json;charset=UTF-8\",\n AUTHORIZATION + \": \" + \"{appId}:{apiKey}\"\n })\n @RequestLine(\"POST /api/v1/device_certificates\")\n HystrixCommand<CreateDeviceCertificateResponseDto> createDeviceCertificate(\n @Param(\"appId\") String appId,\n @Param(\"apiKey\") String apiKey,\n CreateDeviceCertificateRequestDto createDeviceCertificateRequest);\n\n @Headers({\n MoreHttpHeaders.AMV_NONCE + \": \" + \"{nonce}\",\n MoreHttpHeaders.AMV_SIGNATURE + \": \" + \"{signedNonce}\"\n })\n @RequestLine(\"GET /api/v1/device/{deviceSerialNumber}/device_certificate\")\n HystrixCommand<DeviceCertificateResponseDto> fetchDeviceCertificate(@Param(\"nonce\") String nonce,\n @Param(\"signedNonce\") String signedNonce,\n @Param(\"deviceSerialNumber\") String deviceSerialNumber);\n\n}", "@FeignClient(name = \"product-server\",path = \"/product\")\n@Component\npublic interface ProductService {\n @RequestMapping(value = \"getProduct\")\n String getProduct();\n}", "@FeignClient(\"microservice-provider-user\")\npublic interface UserFeignClient {\n\n @RequestMapping(value=\"/simple/findById\", method = {RequestMethod.POST })\n public User findById(@RequestParam(value = \"id\", required = true)Long id);\n\n @RequestMapping(value=\"/postUser\", method = {RequestMethod.POST })\n public User postUser(@RequestBody User user);\n\n}", "@FeignClient(\"spring-feign-provider\")\npublic interface AuthorClient {\n @GetMapping(\"/author\")\n public String author();\n\n @MyUrl(method = \"GET\", url = \"/author\")\n public String myAuthor();\n}", "@FeignClient(name = \"stock-data\")\r\npublic interface QuotesControllerProxy {\r\n @RequestMapping(value = \"/quotes\", method = RequestMethod.GET)\r\n ResponseEntity<List<Quote>> getBySymbol(@RequestParam(name = \"symbol\") String symbol);\r\n}", "@FeignClient(url = \"https://ics4-2018.now.sh/\",name = \"yi\")\npublic interface StudentFeignClient {\n\n @RequestMapping(value = \"/groups\",method = RequestMethod.POST)\n Group createGroup(@RequestBody Group group);\n\n @RequestMapping(value = \"{id}/jokes\",method = RequestMethod.POST)\n Joke createJoke(@RequestBody Joke joke);\n}", "@FeignClient(name = \"code-service\", fallback = CodeApiFallback.class)\npublic interface ICodeApi {\n\n /**\n * 生成 编码\n * @param prefix 前缀\n * @return\n */\n @RequestMapping(value = \"/codeApi/generateCode\",method = RequestMethod.POST)\n public String generateCode(@RequestParam(\"prefix\") String prefix);\n}", "@FeignClient(value = \"inventory-service\")\npublic interface InventoryClient {\n\n /**\n * 库存扣减.\n *\n * @param inventoryDTO 实体对象\n * @return true 成功\n */\n @RequestMapping(\"/inventory-service/inventory/decrease\")\n @Hmily\n Boolean decrease(@RequestBody InventoryDTO inventoryDTO);\n\n\n /**\n * 获取商品库存.\n *\n * @param productId 商品id\n * @return InventoryDO integer\n */\n @RequestMapping(\"/inventory-service/inventory/findByProductId\")\n Integer findByProductId(@RequestParam(\"productId\") String productId);\n\n\n /**\n * 模拟库存扣减异常.\n *\n * @param inventoryDTO 实体对象\n * @return true 成功\n */\n @Hmily\n @RequestMapping(\"/inventory-service/inventory/mockWithTryException\")\n Boolean mockWithTryException(@RequestBody InventoryDTO inventoryDTO);\n\n\n /**\n * 模拟库存扣减超时.\n *\n * @param inventoryDTO 实体对象\n * @return true 成功\n */\n @Hmily\n @RequestMapping(\"/inventory-service/inventory/mockWithTryTimeout\")\n Boolean mockWithTryTimeout(@RequestBody InventoryDTO inventoryDTO);\n\n /**\n * 测试 TCC 事务\n *\n * @param params 请求参数\n * @return true 成功\n */\n @RequestMapping(\"/inventory-service/inventory/testTcc\")\n @Hmily\n Boolean testTcc(@RequestBody Map<String, Object> params);\n\n /**\n * 测试 TCC 事务\n *\n * @param params 请求参数\n * @return true 成功\n */\n @RequestMapping(\"/inventory-service/inventory/testTCCFeginInventoryTryException\")\n @Hmily\n Boolean testTCCFeginInventoryTryException(@RequestBody Map<String, Object> params);\n\n}", "@FeignClient(name = ServiceConstants.ServiceName)\npublic interface DayLogFeignClient {\n @RequestMapping(value = DayLogServiceHTTPConstants.RequestMapping_listDayLog,method = RequestMethod.POST)\n public Map getDayLogList(@RequestParam(\"queryMap\") String queryMap, @RequestParam(\"len\") Integer len, @RequestParam(\"page\") Integer page, @RequestBody TcUser user) ;\n\n @RequestMapping(value = DayLogServiceHTTPConstants.RequestMapping_getWorkOperateLog,method = RequestMethod.POST)\n public Map getWorkOperateLog(@RequestParam(\"queryMap\") String queryMap, @RequestParam(\"len\") Integer len, @RequestParam(\"page\") Integer page, @RequestBody TcUser user) ;\n\n\n @RequestMapping(value = DayLogServiceHTTPConstants.RequestMapping_getDayLogInfoById,method = RequestMethod.GET)\n public DayLog getDayLogInfoById(@RequestParam(\"id\") Integer id);\n\n\n @RequestMapping(value = DayLogServiceHTTPConstants.RequestMapping_getDayLogContentListById,method = RequestMethod.GET)\n public Map getDayLogContentListById(@RequestParam(\"id\") Integer id);\n\n\n @RequestMapping(value = DayLogServiceHTTPConstants.RequestMapping_saveDayLog,method = RequestMethod.POST)\n public Map saveDayLog(@RequestBody DayLog dayLog,@RequestParam(\"userId\") Integer userId,@RequestParam(\"userName\") String userName) ;\n\n\n @RequestMapping(value = DayLogServiceHTTPConstants.RequestMapping_delDayLog,method = RequestMethod.DELETE)\n public ReturnMsg delDayLog(@RequestParam(\"id\") Integer id,@RequestParam(\"userId\") Integer userId,@RequestParam(\"userName\") String userName);\n\n @RequestMapping(value = DayLogServiceHTTPConstants.RequestMapping_getNewDayLogNumbers,method = RequestMethod.GET)\n public Integer getNewDayLogNumbers();\n\n @RequestMapping(value = DayLogServiceHTTPConstants.RequestMapping_checkWorkLogRepeat,method = RequestMethod.GET)\n public Integer checkWorkLogRepeat(@RequestParam(\"workDate\") String workDate, @RequestParam(\"userId\") Integer userId);\n}", "@FeignClient(value = \"springcloud-server\")\npublic interface TestService {\n\n\t@RequestMapping(\"/test\")\n\tpublic String test();\n\n}", "@FeignClient(name = \"feign-service\",url = \"http://wthrcdn.etouch.cn\")\npublic interface FeignService {\n\n @GetMapping(value = \"/weather_mini\")\n ResponseEntity<Byte[]> getWeatherData(@RequestParam(\"citykey\") String citykey); // ?citykey=101280601\n}", "@Component\n@FeignClient(name = \"patientInformation-api\", url = \"http://patientInformation-api:8081/patient\")\npublic interface PatientProxy {\n\n /**\n * Insert a new Patient in the database\n * @param patient : patient to insert in the database\n */\n @PostMapping(value = \"/insert\", produces = \"application/json\")\n void insert(@RequestBody Patient patient);\n\n /**\n * Select a Patient in the database\n * @param id : id of the patient to select\n * @return The selected patient\n */\n @GetMapping(value = \"/selectById\", produces = \"application/json\")\n Patient selectById(@RequestParam int id);\n\n /**\n * Select the Patient list in the database\n * @return The selected patient list\n */\n @GetMapping(value = \"/list\", produces = \"application/json\")\n List<Patient> list();\n\n /**\n * Update the Patient in the database\n * @param id : id of the patient to update\n * @param patient : data of the patient to update\n */\n @PutMapping(value = \"/update\", produces = \"application/json\")\n void update(@RequestParam int id, @RequestBody Patient patient);\n\n /**\n * Delete the Patient in the database\n * @param id : id of the patient to delete\n */\n @DeleteMapping(value = \"/delete\", produces = \"application/json\")\n void delete(@RequestParam int id);\n}", "@FeignClient(name = \"rest-service-1\", configuration = FeignConfiguration.class)\npublic interface UserRestClient {\n\n @RequestMapping(method = RequestMethod.GET, value = \"/demo/users/{id}\")\n User findUserById(@PathVariable(\"id\") String id);\n\n @RequestMapping(method = RequestMethod.POST, value = \"/demo/users\")\n ResponseEntity create(User user);\n\n @RequestMapping(method = RequestMethod.PUT, value = \"/demo/users\")\n ResponseEntity update(User user);\n\n @RequestMapping(method = RequestMethod.DELETE, value = \"/demo/users/{id}\", consumes = \"application/json\")\n ResponseEntity delete(@PathVariable(\"id\") String id);\n\n}", "@FeignClient(value=\"contact-provider8081\")\n@Repository\npublic interface ContactClient {\n @RequestMapping(value = \"selectByName\",method = RequestMethod.GET)\n public PageInfo<Contact> selectByName(@RequestParam(value = \"cname\",required =false)String cname, @RequestParam(value = \"pageNum\",required =false)Integer pageNum, @RequestParam(value = \"pageSize\",required =false)Integer pageSize);\n @RequestMapping(value =\"selectById\",method = RequestMethod.GET)\n public Contact selectById(@RequestParam(\"id\") Integer id);\n @RequestMapping(value = \"save\",method = RequestMethod.POST)\n public String save(@RequestBody Contact contact);\n @RequestMapping(value = \"updateById\",method = RequestMethod.POST)\n public String updateById(@RequestBody Contact contact);\n\n}", "@FeignClient(name = \"bnsUserClient\", url = \"${project.service-man-url}\")\npublic interface UserService {\n\n String USERS_MAPPING_PREFIX = \"users\";\n String NAME_PATH = \"/{\" + NAME + \"}\";\n\n /**\n * Search users operation.\n *\n * @param queryMap query param map\n * @return user page\n */\n @RequestLine(V1_GET + USERS_MAPPING_PREFIX)\n BaseResponse<PageData<MergedUser>> search(@QueryMap Map<String, List<String>> queryMap);\n\n /**\n * Create user operation.\n *\n * @param user user\n * @return create user\n */\n @RequestLine(V1_POST + USERS_MAPPING_PREFIX)\n BaseResponse<MergedUser> create(MergedUser user);\n\n /**\n * Find user operation.\n *\n * @param username user name\n * @return user\n */\n @RequestLine(V1_GET + USERS_MAPPING_PREFIX + NAME_PATH)\n BaseResponse<MergedUser> find(@Param(NAME) String username);\n\n /**\n * Find user operation.\n *\n * @param username user name\n * @return user\n */\n @RequestLine(V1_GET + USERS_MAPPING_PREFIX + NAME_PATH + \"?plat={platform}\")\n BaseResponse<AppUserDetails> me(@Param(NAME) String username, @Param(\"platform\") String platform);\n\n\n /**\n * Update user operation.\n *\n * @param username user name\n * @param user user\n * @return updated user\n */\n @RequestLine(V1_PUT + USERS_MAPPING_PREFIX + NAME_PATH)\n BaseResponse<MergedUser> update(@Param(NAME) String username, MergedUser user);\n\n /**\n * Delete user operation.\n *\n * @param username user name\n * @return deleted user\n */\n @RequestLine(V1_DELETE + USERS_MAPPING_PREFIX + NAME_PATH)\n BaseResponse<MergedUser> delete(@Param(NAME) String username);\n}", "public interface UserFeignClient {\n @RequestMapping(value=\"/{id}\",method= RequestMethod.GET)\n public User findById(@PathVariable(\"id\") Long id);\n}", "@FeignClient(value=\"product-service\")\npublic interface IProductService {\n\n @RequestMapping(value = \"/getById\")\n Product getById(@RequestParam(value = \"id\") Integer id);\n\n @RequestMapping(value = \"/updateById\")\n Boolean updateById(@RequestBody Product product);\n}", "@FeignClient(value = \"user-service\",fallback = UserFallbackService.class)\npublic interface UserService {\n @PostMapping(\"/user/create\")\n Object create(@RequestBody User user);\n\n @GetMapping(\"/user/{id}\")\n Object getUser(@PathVariable Long id);\n\n @GetMapping(\"/user/getByUsername\")\n Object getByUsername(@RequestParam String username);\n\n @PostMapping(\"/user/update\")\n Object update(@RequestBody User user);\n\n @PostMapping(\"/user/delete/{id}\")\n Object delete(@PathVariable Long id);\n}", "@FeignClient(value = \"DsInterfaceService\")\r\npublic interface ProductAnalyService {\r\n\r\n @RequestMapping(\"/product/listProductAnaly\")\r\n public ProductAnaly listProductAnaly(@RequestParam(value = \"productid\") long productid, @RequestParam(value = \"timedate\") String timedate);\r\n}", "@FeignClient(name=\"service-ribbon\")\npublic interface ConsumerController {\n\n\t@PostMapping(value = \"/registerTeacher\")\n\tString hello(@RequestParam(value = \"name\") String name);\n}", "@FeignClient(value = \"orange-user\", fallbackFactory = UserFeignClientFallbackFactory.class)\npublic interface UserFeignClient {\n /**\n * 新增用户\n *\n * @param user User\n * @return Result<String>\n */\n @RequestMapping(value = \"/addUser\", method = RequestMethod.POST)\n Result<String> addUser(@RequestBody User user,\n @RequestHeader(SessionConstants.SESSION_ID_HEADER) String sessionId);\n\n /**\n * 查询用户\n *\n * @param user (password+(userid | phone | email))\n * @return Result<User>\n */\n @RequestMapping(value = \"/getUser\", method = RequestMethod.POST)\n Result<User> getUser(@RequestBody User user,\n @RequestHeader(SessionConstants.SESSION_ID_HEADER) String sessionId);\n\n /**\n * 判断邮箱是否可用\n *\n * @param email 邮箱\n * @return 200:可用,邮箱不存在 400:不可用,邮箱已存在\n */\n @RequestMapping(value = \"/checkEmail\", method = RequestMethod.POST)\n Result<String> checkEmail(@RequestParam(\"email\") String email,\n @RequestHeader(SessionConstants.SESSION_ID_HEADER) String sessionId);\n\n /**\n * 判断手机号码是否可用\n *\n * @param phone 手机号码\n * @return 200:可用,手机不存在 400:不可用,手机已存在\n */\n @RequestMapping(value = \"/checkPhone\", method = RequestMethod.POST)\n Result<String> checkPhone(@RequestParam(\"phone\") String phone,\n @RequestHeader(SessionConstants.SESSION_ID_HEADER) String sessionId);\n}", "@FeignClient(name = \"service-provider-news\")\npublic interface IContentBroadcastServiceFeign {\n\n /**\n * aliyun列表分页查询\n * @param entity\n * @return\n */\n @RequestMapping(value = \"/contentBroadcast/getPage\",method = RequestMethod.POST)\n TableResultResponse<ContentBroadcastInfo> getPage(@RequestBody ContentBroadcastInfo entity);\n\n /**\n * 得到aliyun列表的详尽信息\n * @param\n * @return\n */\n @RequestMapping(value = \"/contentBroadcast/{id}\", method = RequestMethod.GET)\n @ResponseBody\n ObjectRestResponse<ContentBroadcast> get(@PathVariable(\"id\") int id);\n\n /**\n * 修改aliyun\n * @param\n * @return\n */\n @RequestMapping(value = \"/contentBroadcast/{id}\", method = RequestMethod.PUT)\n @ResponseBody\n ObjectRestResponse<ContentBroadcast> update(@PathVariable(\"id\") Integer id, @RequestBody ContentBroadcast entity);\n\n\n /**\n * 新增aliyun\n * @param\n * @return\n */\n @RequestMapping(value = \"/contentBroadcast\", method = RequestMethod.POST)\n ObjectRestResponse<ContentBroadcast> add(@RequestBody ContentBroadcast entity);\n\n\n}", "@FeignClient(value = \"provider\",fallback = FeginProviderError.class)\npublic interface FeiginProvider {\n @GetMapping(\"/queryAll\")\n public List<Student> queryAll();\n @GetMapping(\"/index\")\n public String index();\n}", "@FeignClient(name=\"amsapi\", url=\"localhost:9090\")\n@RequestMapping(\"/api\")\npublic interface AmsApiProxy {\n \n @GetMapping(\"/serieses/{id}\")\n public SeriesDTO getSeries(@PathVariable(\"id\") long id);\n \n @GetMapping(\"/episodes/{id}\")\n public EpisodeDTO getEpisode(@PathVariable(\"id\") long id);\n \n @GetMapping(\"/episodes/{id}/series\")\n public SeriesDTO getEpisodeSeries(@PathVariable(\"id\") long id);\n \n}", "@FeignClient(value = \"gateway\")\n@RequestMapping(path = \"/api/v1\")\npublic interface ApiGatewayFeignClient {\n\n /**\n * Get all products\n *\n * @param token User bearer token\n *\n * @return The list of products\n */\n @GetMapping(path = \"/products\")\n List<Product> getAllProducts(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);\n\n /**\n * Get a product by id\n *\n * @param token User bearer token\n * @param id The product id\n *\n * @return The product\n */\n @GetMapping(path = \"/products/{id}\")\n Product getProductById(@RequestHeader(HttpHeaders.AUTHORIZATION) String token, @PathVariable Long id);\n\n /**\n * Add a product\n *\n * @param token User bearer token\n * @param product The product to register\n *\n * @return The registered product\n */\n @PostMapping(path = \"/products\")\n Product postProduct(@RequestHeader(HttpHeaders.AUTHORIZATION) String token, @RequestBody Product product);\n\n /**\n * Update a product\n *\n * @param token User bearer token\n * @param product The new product data\n * @param id The id of the product to update\n *\n * @return The updated product\n */\n @PutMapping(path = \"/products/{id}\")\n Product putProduct(@RequestHeader(HttpHeaders.AUTHORIZATION) String token, @RequestBody Product product, @PathVariable Long id);\n\n /**\n * Delete a product\n *\n * @param token User bearer token\n * @param id The id of the product to delete\n */\n @DeleteMapping(path = \"/products/{id}\")\n void deleteProduct(@RequestHeader(HttpHeaders.AUTHORIZATION) String token, @PathVariable Long id);\n\n /**\n * Get the cart of the connected user\n *\n * @param token User bearer token\n *\n * @return The shopping cart of the user or null if he doesn't already have a cart (i.e. no product in the cart)\n */\n @GetMapping(path = \"cart\")\n Optional<ShoppingCart> getShoppingCart(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);\n\n /**\n * Add product to the connected user's cart\n *\n * @param token User bearer token\n * @param entry The line to add (product + quantity)\n *\n * @return The updated shopping cart\n */\n @PostMapping(path = \"cart\")\n ShoppingCart addProductToCart(@RequestHeader(HttpHeaders.AUTHORIZATION) String token, @RequestBody ShoppingCartEntry entry);\n\n /**\n * Delete the connected user cart\n *\n * @param token User bearer token\n */\n @DeleteMapping(path = \"cart\")\n void deleteShoppingCart(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);\n\n /**\n * Get orders of the connected user\n *\n * @param token User bearer token\n *\n * @return The list of orders\n */\n @GetMapping(path = \"/orders\")\n Iterable<ShopOrder> getOrdersByUser(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);\n\n /**\n * Get all orders\n *\n * @param token User bearer token\n *\n * @return The list of orders\n */\n @GetMapping(path = \"/orders/all\")\n Iterable<ShopOrder> getAllOrders(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);\n\n /**\n * Get all orders which are not already assigned to a delivery man for the delivery\n *\n * @param token User bearer token\n *\n * @return The list of orders\n */\n @GetMapping(path = \"/orders/unassigned\")\n Iterable<ShopOrder> getUnassignedOrders(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);\n\n\n /**\n * Get all orders assigned to the connected delivery man but not delivered for the moment\n *\n * @param token User bearer token\n *\n * @return The list of orders\n */\n @GetMapping(path = \"/orders/assigned\")\n Iterable<ShopOrder> getOrdersToDeliver(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);\n\n /**\n * Add an order\n *\n * @param token User bearer token\n * @param order The order to register\n *\n * @return The registered order\n */\n @PostMapping(path = \"/orders\")\n ShopOrder postOrder(@RequestHeader(HttpHeaders.AUTHORIZATION) String token, @RequestBody ShopOrder order);\n\n /**\n * Assign the connected delivery man to an order\n *\n * @param token User bearer token\n * @param id Id of the order\n *\n * @return The updated order\n */\n @PutMapping(path = \"/orders/{id}/assign\")\n ShopOrder assign(@RequestHeader(HttpHeaders.AUTHORIZATION) String token, @PathVariable Long id);\n\n /**\n * Set an order as delivered\n *\n * @param token User bearer token\n * @param id Id of the order\n *\n * @return The updated order\n */\n @PutMapping(path = \"/orders/{id}/delivered\")\n ShopOrder markAsDelivered(@RequestHeader(HttpHeaders.AUTHORIZATION) String token, @PathVariable Long id);\n}", "@FeignClient(name = \"store-product-service/productAttributeService\")\npublic interface IProductAttributeService {\n\n @PostMapping(\"/getProductAttrVO\")\n ProductAttributeVO getProductAttrVO(@RequestParam(\"productId\") Long productId);\n\n}", "@FeignClient(ZoneConstants.FEIGN_URL)\npublic interface PositionLinkFeign {\n @RequestMapping(value = \"/position/queryPositionLink\",method = RequestMethod.POST)\n RequestResult<List<PositionLinkModel>> queryPositionLinkList(PositionLinkQueryForm form);\n\n @RequestMapping(value = \"/position/savePositionLink\",method = RequestMethod.POST)\n RequestResult savePositionLink(PositionLinkSaveForm form);\n\n @RequestMapping(value = \"/position/deletePositionLink\",method = RequestMethod.POST)\n RequestResult deleteById(IdForm form);\n}", "@FeignClient(name = \"service-provider-user\", fallback = UserAuthFallBack.class)\npublic interface IUserAuthFeign {\n\n /**\n * 根据用户微博openId查找用户\n * @param uid\n * @return\n */\n @RequestMapping(value = \"/binding/selecetByWiboOpenId\",method = RequestMethod.POST)\n UserAuthInfo selecetByWiboOpenId(@RequestParam(\"uid\") String uid,\n @RequestParam(\"access_token\") String access_token);\n\n /**\n * 根据用户微信openId查找用户\n * @param openid\n * @return\n */\n @RequestMapping(value = \"/binding/selecetByWechatOpenId\",method = RequestMethod.POST)\n UserAuthInfo selecetByWechatOpenId( @RequestParam(\"openid\") String openid,\n @RequestParam(\"access_token\") String access_token);\n\n @RequestMapping(value = \"/binding/wechatLogin\",method = RequestMethod.POST)\n UserAuthInfo wechatLogin( @RequestBody UserAuthInfo user);\n\n /**\n * 根据用户QQ openId查找用户\n * @return\n */\n @RequestMapping(value = \"/binding/selecetByQQOpenId\",method = RequestMethod.POST)\n UserAuthInfo selecetByQQOpenId( @RequestParam(\"openId\") String openId,\n @RequestParam(\"accessToken\") String accessToken,\n @RequestParam(\"qclient_id\") String qclient_id);\n\n\n}", "@RequestMapping(\"/resources_onecb\")\n public ResponseEntity<List<Resource>> request_onecb() {\n IService1 service1 = Feign.builder()\n .decoder(new JacksonDecoder())\n .target(IService1.class, \"http://\"+service1host+\":\"+service1port);\n\n // Fetch and print a list of the contributors to this library.\n List<Resource> resources = service1.resources();\n\n return new ResponseEntity<List<Resource>>(resources, HttpStatus.OK);\n }", "@FeignClient(name = \"my-lawyer-user-service\",configuration=FeignConfiguration.class, fallback = UserRemoteHystrix.class)\npublic interface UserRemote {\n\t\n\n\t// 用户注册\n\t@PostMapping(\"user/api/regist\")\n\tpublic AppMsgResult regist(@RequestParam(value = \"userPhone\", required = true) String userPhone,\n\t\t\t@RequestParam(value = \"userPassword\", required = true) String userPassword,\n\t\t\t@RequestParam(value = \"code\", required = true) String code);\n\n\t// 获取手机验证码\n\t@GetMapping(\"user/api/getUserPhoneCode\")\n\tpublic AppMsgResult getUserPhoneCode(@RequestParam(value = \"userPhone\", required = true) String userPhone,\n\t\t\t@RequestParam(value = \"type\", required = false) String type);\n\n\t// 忘记找回密码\n\t@PostMapping(\"user/api/forgetPassWord\")\n\tpublic AppMsgResult forgetPassWord(@RequestParam(value = \"userPhone\", required = true) String userPhone,\n\t\t\t@RequestParam(value = \"userPassword\", required = true) String userPassword,\n\t\t\t@RequestParam(value = \"code\", required = true) String code);\n\n\t// 用户登录\n\t@PostMapping(\"user/api/login\")\n\tpublic AppMsgResult login(@RequestParam(value = \"userPhone\", required = true) String userPhone,\n\t\t\t@RequestParam(value = \"userPassword\", required = true) String userPassword,\n\t\t\t@RequestParam(value = \"userType\", required = true) String userType);\n\n\t// 用户修改密码\n\t@PostMapping(\"user/api/updatePassWord\")\n\tpublic AppMsgResult updatePassWord(@RequestParam(value = \"userId\", required = true) String userId,\n\t\t\t@RequestParam(value = \"oldUserPassword\", required = true) String oldUserPassword,\n\t\t\t@RequestParam(value = \"userPassword\", required = true) String userPassword,\n\t\t\t@RequestParam(value = \"token\", required = true) String token);\n\n\t// 个人用户修改资料\n\t@PostMapping(\"user/api/updateUser\")\n\tpublic AppMsgResult updateUser(@RequestParam(value = \"userId\", required = true) String userId,\n\t\t\t@RequestParam(value = \"token\", required = true) String token,\n\t\t\t@RequestParam(value = \"userNick\", required = false) String userNick,\n\t\t\t@RequestParam(value = \"userGender\", required = false) Integer userGender,\n\t\t\t@RequestParam(value = \"userEmail\", required = false) String userEmail);\n\t\n\t// 切换身份\n\t@PostMapping(\"user/api/switchUser\")\n\tpublic AppMsgResult switchUser(@RequestParam(value = \"userId\", required = true) String userId,\n\t\t\t@RequestParam(value = \"token\", required = true) String token,\n\t\t\t@RequestParam(value = \"userPhone\", required = true) String userPhone,\n\t\t\t@RequestParam(value = \"currentType\", required = true) String currentType,\n\t\t\t@RequestParam(value = \"type\", required = true) String type);\n\t// 律师账户提现\n @PostMapping(\"user/api/showMoney\")\n\tpublic AppMsgResult showMoney(ZaUserPurchaseRecord userPurchaseRecord,\n\t\t\t@RequestParam(value = \"token\",required = true) String token, @RequestParam(value = \"userPassword\",required = true) String userPassword);\n \n\t// 更新用户信息\n\t@PostMapping(\"user/api/getNewUserinfo\")\n\tpublic AppMsgResult getNewUserinfo(@RequestParam(value = \"userId\", required = true) String userId,\n\t\t\t@RequestParam(value = \"token\", required = true) String token,\n\t\t\t@RequestParam(value = \"userType\", required = true) String userType);\n\t\t\t\n}", "@FeignClient(name = \"pc-cloud-client\",\n fallback = ProductSpecificationRepository.ProductSpecificationRepositoryFallback.class)\npublic interface ProductSpecificationRepository {\n\n @RequestMapping(method = RequestMethod.GET, path = \"/catalog/{specificationId}\")\n Object existsById(@PathVariable(\"specificationId\") String specificationId);\n\n @GetMapping(\"/catalog\")\n String getCatalog();\n\n @Component\n class ProductSpecificationRepositoryFallback implements ProductSpecificationRepository {\n @Override\n public Object existsById(String specificationId) {\n return null;\n }\n\n @Override\n public String getCatalog() {\n return \"Fallback catalog\";\n }\n }\n}", "@Bean\n public Retryer feignRetryer() {\n return Retryer.NEVER_RETRY;\n }", "@FeignClient(value = \"item-catalog-service\", url = \"http://item-catalog-service:8763\")\ninterface ItemClient {\n\n\t@GetMapping(\"/items\")\n\tCollectionModel<Item> readItems();\n}", "@FeignClient(UserServiceConstants.SERVER_NAME)//服务名\n@RequestMapping(UserServiceConstants.SERVER_PRIFEX)//内部服务前缀\n@Api(tags = \" 红包服务server层接口\")\npublic interface ImRedService {\n\n @ApiOperation(\"发送红包\")\n @PostMapping(\"/add\")\n ImRed add(@RequestBody ImRedDto imRedDto);\n\n @ApiOperation(\"加入红包\")\n @PostMapping(\"/join\")\n void join(@RequestParam(\"id\") Long id,@RequestParam(\"address\")String address);\n\n\n @ApiOperation(\"红包详情\")\n @GetMapping(\"/findById\")\n ImRedDetailDto findById(@RequestParam(\"id\") Long id,@RequestParam(\"userAddress\")String userAddress);\n\n @ApiOperation(\"我发送的红包\")\n @GetMapping(\"/findMySendRed\")\n ImRedMyDetailDto findMySendRed(@RequestParam(\"userAddress\")String userAddress,@RequestParam(\"year\")Integer year);\n\n\n @ApiOperation(\"我接收的红包\")\n @GetMapping(\"/findMyReceiveRed\")\n ImRedMyDetailDto findMyReceiveRed(@RequestParam(\"userAddress\")String userAddress,@RequestParam(\"year\")Integer date);\n\n\n @ApiOperation(\"我待支付红包\")\n @GetMapping(\"/findMyPaidRed\")\n List<ImRedList> findMyPaidRed(@RequestParam(\"userAddress\")String userAddress);\n\n\n @ApiOperation(\"修改红包状态\")\n @PostMapping(\"/updateRed\")\n void updateRed(@RequestParam(\"id\") Long id);\n\n\n\n @ApiOperation(\"修改红包领取状态\")\n @PostMapping(\"/updateRedReceive\")\n void updateRedReceive(@RequestParam(\"redId\") Long redId,@RequestParam(\"address\") String address,@RequestParam(\"hash\")String hash);\n\n\n\n\n}", "@HystrixCommand(fallbackMethod = \"addServiceFallback\")\n public String addService() {\n UserInfoPOJO UserInfoPOJO =new UserInfoPOJO();\n UserInfoPOJO.setUsername(\"张萨姆\");\n UserInfoPOJO.setPwd(\"11111\");\n UserInfoPOJO.setText1(\"wocacac\");\n// String jsonObj = JSONObject.toJSONString(UserInfoPOJO);\n// HttpEntity<String> formEntity = new HttpEntity<String>(jsonObj, headers);\n// Map map =new HashMap<Integer,UserInfoPOJO>();\n// map.put(1,UserInfoPOJO);\n// String Mes = JSONObject.toJSONString(map);\n // String url =;\n\n MultiValueMap<String, String> paramMap = new LinkedMultiValueMap<String, String>();\n paramMap.add(\"data\", JSONObject.toJSONString(UserInfoPOJO));\n\n String aa= restTemplate.postForObject(\"http://COMPUTE-SERVICEA/add\", paramMap, String.class);\n JSONArray mapreturn = JSONObject.parseArray(aa);\n String strreturn = (String)mapreturn.get(0);\n UserInfoPOJO aaa = JSON.parseObject(strreturn,UserInfoPOJO.getClass());\nreturn aa;\n\n // return restTemplate.getForEntity(\"http://COMPUTE-SERVICEA/add?a=10&b=20&c=\"+Mes, String.class).getBody();\n }", "@Api(description = \"supermarket client api\")\npublic interface SupermarketClientApi extends ProductApi {\n}", "@HystrixCommand(fallbackMethod = \"fallback\")\n\tpublic String hiService(String name) {\n\t\t// 直接用的应用名替代了具体的uri地址,在ribbon中它会根据服务名来选择具体的服务实例,根据服务实例在请求的时候会用具体的url替换掉服务名。\n\t\treturn restTemplate.getForObject(\"http://service-hi/hi?name=\" + name, String.class);\n\t}", "@RequestMapping(\"/resources_nocb\")\n public ResponseEntity<List<Resource>> request_nocb() {\n IService1 service1 = Feign.builder()\n .decoder(new JacksonDecoder())\n .target(IService1.class, \"http://\"+service1host+\":\"+service1port);\n\n // Fetch and print a list of the contributors to this library.\n List<Resource> resources = service1.resources_nocb();\n\n return new ResponseEntity<List<Resource>>(resources, HttpStatus.OK);\n }", "public interface IFyberClient {\n\n String HEADER_API_KEY = \"X-Fyber-API-Key\";\n String QUERY_HASH_KEY = \"hashkey\";\n String HASH_NAME = \"X-Sponsorpay-Response-Signature\";\n\n\n @GET(\"/feed/v1/offers.{format}\")\n Observable<OfferListResponse> getOffers(@Header(HEADER_API_KEY) String apiKey, // Why? Because Unlike in most cases api key is not constant\n @NonNull @Path(\"format\") String format,\n @NonNull @Query(\"appid\") Integer appid,\n @NonNull @Query(\"uid\") String uid,\n @NonNull @Query(\"os_version\") String osVersion,\n @NonNull @Query(\"locale\") String locale,\n // @NonNull @Query(\"hashkey\") String hashkey, added in interceptor\n @NonNull @Query(\"timestamp\") Long timestamp,\n @NonNull @Query(\"google_ad_id\") String googleAdId,\n @NonNull @Query(\"google_ad_id_limited_tracking_enabled\") Boolean googleAdIdLimitedTrackingEnabled,\n @Nullable @Query(\"ip\") String ip,\n @Nullable @Query(\"pub0\") String pub0,\n @Nullable @Query(\"page\") Integer page,\n @Nullable @Query(\"offer_types\") String offerTypes,\n @Nullable @Query(\"ps_time\") Long psTime,\n @Nullable @Query(\"device\") String device);\n\n\n @GET(\"http://ifcfg.me/ip\")\n Observable<ResponseBody> getIp();\n}", "public interface OperationsClient {\n /**\n * Lists all the operations supported by Microsoft.ProviderHub.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<OperationsDefinitionInner> list();\n\n /**\n * Lists all the operations supported by Microsoft.ProviderHub.\n *\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<OperationsDefinitionInner> list(Context context);\n\n /**\n * Gets the operations supported by the given provider.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the operations supported by the given provider along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<List<OperationsDefinitionInner>> listByProviderRegistrationWithResponse(\n String providerNamespace, Context context);\n\n /**\n * Gets the operations supported by the given provider.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the operations supported by the given provider.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n List<OperationsDefinitionInner> listByProviderRegistration(String providerNamespace);\n\n /**\n * Creates or updates the operation supported by the given provider.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @param operationsPutContent The operations content properties supplied to the CreateOrUpdate operation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the response body along with {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<OperationsContentInner> createOrUpdateWithResponse(\n String providerNamespace, OperationsPutContent operationsPutContent, Context context);\n\n /**\n * Creates or updates the operation supported by the given provider.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @param operationsPutContent The operations content properties supplied to the CreateOrUpdate operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the response.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n OperationsContentInner createOrUpdate(String providerNamespace, OperationsPutContent operationsPutContent);\n\n /**\n * Deletes an operation.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<Void> deleteWithResponse(String providerNamespace, Context context);\n\n /**\n * Deletes an operation.\n *\n * @param providerNamespace The name of the resource provider hosted within ProviderHub.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String providerNamespace);\n}", "@Bean\n public IgniteClient igniteInstance() {\n return Ignition.startClient(new ClientConfiguration().setAddresses(\"127.0.0.1:\" + CLI_CONN_PORT)\n .setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(false)));\n }", "public interface ClientInterface {\r\n\r\n @GET(\"/bins/x5279\")\r\n Call<ArrayList<Details>> getDetails();\r\n}", "public interface ProductService {\n\n\t/**\n\t * Returns the product details\n\t * \n\t * @param productId\n\t * unique id of the product\n\t * @return Product Detail\n\t */\n\tpublic Optional<Product> getProduct(String productId);\n\t\n\tpublic Optional<Product> getProductUsingFeignClient(String productId);\n\n}", "public BeerServiceClient(RestTemplateBuilder restTemplateBuilder) {\n this.restTemplate = restTemplateBuilder.build();\n }", "@Bean\n public IgniteClient igniteInstanceTWO() {\n return Ignition.startClient(new ClientConfiguration().setAddresses(\"127.0.0.1:10801\"));\n }", "public interface IpService {\n\n @GET(\"/\")\n Call<Ip> getIp();\n\n}", "public interface CurrenciesApiInterface {\n @GET(Constants.LATEST)\n Call<ResponseBody> getCurrencies();\n}", "@HystrixCommand(/*commandProperties = {\n @HystrixProperty(name = \"execution.isolation.strategy\", value = \"SEMAPHORE\"),\n @HystrixProperty(name = \"execution.isolation.thread.timeoutInMilliseconds\", value = \"90000\") },*/\n fallbackMethod = \"getTwitterDataJsonFallback\")\n public ImportTwitterResponse getTwitterDataJson(ImportTwitterRequest importRequest) throws ImporterException {\n\n /*HttpHeaders requestHeaders = new HttpHeaders();\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n\n HttpEntity<ImportTwitterRequest> requestEntity =new HttpEntity<>(importRequest,requestHeaders);\n\n ResponseEntity<ImportTwitterResponse> responseEntity = restTemplate.exchange(\"http://Import-Service/Import/getTwitterDataJson\", HttpMethod.POST,null, ImportTwitterResponse.class);\n ImportTwitterResponse importResponse = new ImportTwitterResponse(\"hello world\"); // responseEntity.getBody();\n\n return importResponse;*/\n\n\n HttpHeaders requestHeaders = new HttpHeaders();\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false); //root name of class, same root value of json\n mapper.configure(SerializationFeature.EAGER_SERIALIZER_FETCH, true);\n\n HttpEntity<String> request = null;\n try {\n request = new HttpEntity<>(mapper.writeValueAsString(importRequest),requestHeaders);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n //ImportTwitterResponse importResponse = restTemplate.postForObject(\"http://Import-Service/Import/getTwitterDataJson\", request, ImportTwitterResponse.class);\n\n ResponseEntity<?> importResponse = null;\n //importResponse = restTemplate.exchange(\"http://Import-Service/Import/getTwitterDataJson\",HttpMethod.POST,request,new ParameterizedTypeReference<ServiceErrorResponse>() {});\n\n if (importResponse != null && importResponse.getBody().getClass() == ServiceErrorResponse.class) {\n ServiceErrorResponse serviceErrorResponse = (ServiceErrorResponse) importResponse.getBody();\n if (serviceErrorResponse.getErrors() != null) {\n String errors = serviceErrorResponse.getErrors().get(0);\n for (int i = 1; i < serviceErrorResponse.getErrors().size(); i++) {\n errors = \"; \" + errors;\n }\n\n throw new ImporterException(errors);\n }\n }\n\n importResponse = restTemplate.exchange(\"http://Import-Service/Import/getTwitterDataJson\",HttpMethod.POST,request,new ParameterizedTypeReference<ImportTwitterResponse>() {});\n return (ImportTwitterResponse) importResponse.getBody();\n }", "interface HeaderService {\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @POST(\"azurespecials/customNamedRequestId\")\n Call<ResponseBody> customNamedRequestId(@Header(\"foo-client-request-id\") String fooClientRequestId, @Header(\"accept-language\") String acceptLanguage);\n\n }", "public interface IDevopsIngressService {\n\n void createIngress(String ingressYaml, String name, String namespace);\n\n void deleteIngress(String name, String namespace);\n}", "@RemoteServiceClient(SimpleHttpService.class)\npublic interface ISimpleHttpServiceClient extends IServiceClient {\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_START)\n void bootup(int port);\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_STOP)\n void shutdown();\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_INFO)\n void info(int port);\n}", "@HystrixCommand(fallbackMethod = \"addServiceFallback\")\n\tpublic String addService() {\n\t\treturn restTemplate.getForEntity(\"http://COMPUTE-SERVICE/add?a=10&b=20\", String.class).getBody();\n\t}", "public interface IDevopsIngressService {\n\n void createIngress(String ingressYaml, String name, String namespace, Long envId, Long commandId);\n\n void deleteIngress(String name, String namespace, Long envId, Long commandId);\n}", "static RestClientBuilder.HttpClientConfigCallback getAWSRequestSigningInterceptor(String endpoint) {\n\t\treturn (HttpAsyncClientBuilder httpClientBuilder) -> {\n\t\t\thttpClientBuilder.addInterceptorLast((HttpRequest request, HttpContext context) -> {\n\t\t\t\tAws4Signer signer = Aws4Signer.create();\n\t\t\t\tAwsCredentials creds = DefaultCredentialsProvider.create().resolveCredentials();\n\t\t\t\tAws4SignerParams.Builder<?> signerParams = Aws4SignerParams.builder().\n\t\t\t\t\t\tawsCredentials(creds).\n\t\t\t\t\t\tdoubleUrlEncode(true).\n\t\t\t\t\t\tsigningName(\"es\").\n\t\t\t\t\t\tsigningRegion(Region.of(Para.getConfig().elasticsearchAwsRegion()));\n\t\t\t\tURIBuilder uriBuilder;\n\t\t\t\tString httpMethod = request.getRequestLine().getMethod();\n\t\t\t\tString resourcePath;\n\t\t\t\tMap<String, String> params = new HashMap<>();\n\n\t\t\t\ttry {\n\t\t\t\t\tSdkHttpFullRequest.Builder r = SdkHttpFullRequest.builder();\n\t\t\t\t\tif (!StringUtils.isBlank(httpMethod)) {\n\t\t\t\t\t\tr.method(SdkHttpMethod.valueOf(httpMethod));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!StringUtils.isBlank(endpoint)) {\n\t\t\t\t\t\tif (endpoint.startsWith(\"https://\")) {\n\t\t\t\t\t\t\tr.protocol(\"HTTPS\");\n\t\t\t\t\t\t\tr.host(StringUtils.removeStart(endpoint, \"https://\"));\n\t\t\t\t\t\t} else if (endpoint.startsWith(\"http://\")) {\n\t\t\t\t\t\t\tr.protocol(\"HTTP\");\n\t\t\t\t\t\t\tr.host(StringUtils.removeStart(endpoint, \"http://\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\turiBuilder = new URIBuilder(request.getRequestLine().getUri());\n\t\t\t\t\tresourcePath = uriBuilder.getPath();\n\t\t\t\t\tif (!StringUtils.isBlank(resourcePath)) {\n\t\t\t\t\t\tr.encodedPath(resourcePath);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (NameValuePair param : uriBuilder.getQueryParams()) {\n\t\t\t\t\t\tr.appendRawQueryParameter(param.getName(), param.getValue());\n\t\t\t\t\t}\n\n\t\t\t\t\tif (request instanceof HttpEntityEnclosingRequest) {\n\t\t\t\t\t\tHttpEntity body = ((HttpEntityEnclosingRequest) request).getEntity();\n\t\t\t\t\t\tif (body != null) {\n\t\t\t\t\t\t\tInputStream is = body.getContent();\n\t\t\t\t\t\t\tr.contentStreamProvider(() -> is);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (r.contentStreamProvider() == null) {\n\t\t\t\t\t\trequest.removeHeaders(\"Content-Length\");\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (Header header : request.getAllHeaders()) {\n\t\t\t\t\t\tr.putHeader(header.getName(), header.getValue());\n\t\t\t\t\t}\n\n\t\t\t\t\tSdkHttpFullRequest signedReq = signer.sign(r.build(), signerParams.build());\n\n\t\t\t\t\tfor (String header : signedReq.headers().keySet()) {\n\t\t\t\t\t\trequest.setHeader(header, signedReq.firstMatchingHeader(header).orElse(\"\"));\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tlogger.error(\"Failed to sign request to AWS Elasticsearch:\", ex);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn httpClientBuilder;\n\t\t};\n\t}", "public interface SignCallUseCase {\n\n String signature(String method, Map<String, String> params, String secret);\n\n}", "default void createAzureClient(\n com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureClientMethod(), responseObserver);\n }", "public interface BakingInterface {\n\n @GET(\"5907926b_baking/baking.json\")\n Call<List<Recipe>> getRecipe();\n}", "HealthApisImpl(AzureWebPubSubServiceRestAPIImpl client) {\n this.service =\n RestProxy.create(HealthApisService.class, client.getHttpPipeline(), client.getSerializerAdapter());\n this.client = client;\n }", "public interface ISignBiz {\n void upSignImage(String token, int orderId, TypedFile file, OnUpSignImageListener onUpSignImageListener);\n}", "public interface EventsOperationsClient {\n /**\n * Lists service health events in the subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the List events operation response as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<EventInner> list();\n\n /**\n * Lists service health events in the subscription.\n *\n * @param filter The filter to apply on the operation. For more information please see\n * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.\n * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,\n * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the List events operation response as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<EventInner> list(String filter, String queryStartTime, Context context);\n\n /**\n * Lists current service health events in the tenant.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the List events operation response as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<EventInner> listByTenantId();\n\n /**\n * Lists current service health events in the tenant.\n *\n * @param filter The filter to apply on the operation. For more information please see\n * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.\n * @param queryStartTime Specifies from when to return events, based on the lastUpdateTime property. For example,\n * queryStartTime = 7/24/2020 OR queryStartTime=7%2F24%2F2020.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the List events operation response as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<EventInner> listByTenantId(String filter, String queryStartTime, Context context);\n\n /**\n * Lists current service health events for given resource.\n *\n * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.\n * Currently the API support not nested and one nesting level resource types :\n * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}\n * and\n * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the List events operation response as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<EventInner> listBySingleResource(String resourceUri);\n\n /**\n * Lists current service health events for given resource.\n *\n * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.\n * Currently the API support not nested and one nesting level resource types :\n * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}\n * and\n * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.\n * @param filter The filter to apply on the operation. For more information please see\n * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the List events operation response as paginated response with {@link PagedIterable}.\n */\n @ServiceMethod(returns = ReturnType.COLLECTION)\n PagedIterable<EventInner> listBySingleResource(String resourceUri, String filter, Context context);\n}", "public interface CoinMarketCapApiEndpointInterface {\n\n String TICKER = \"ticker\";\n\n @GET(TICKER)\n Call<List<CurrencyTicker>> getTickers();\n\n @GET(TICKER + \"/{id}\")\n Call<CurrencyTicker> getCurrencyTicker(@Path(\"id\") int tickerId);\n}", "interface BaseApi {\n Retrofit getRetrofit();\n\n OkHttpClient.Builder setInterceptor(Interceptor interceptor);\n\n Retrofit.Builder setConverterFactory(Converter.Factory factory);\n}", "public interface GetBranchListService\n{\n @POST(\"branchlist\")\n Call<BranchResponse> register(@Body HubName request);\n}", "@Override\n\tpublic void customize(ManagedChannelBuilder<?> managedChannelBuilder) {\n\t\tmanagedChannelBuilder.intercept(this.grpcTracing.newClientInterceptor());\n\t}", "public interface ResourceProvidersClient {\n /**\n * Request to mitigate for a given job.\n *\n * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and\n * 24 characters in length and use any alphanumeric and underscore only.\n * @param resourceGroupName The Resource Group Name.\n * @param mitigateJobRequest Mitigation Request.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the {@link Response}.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n Response<Void> mitigateWithResponse(\n String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest, Context context);\n\n /**\n * Request to mitigate for a given job.\n *\n * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and\n * 24 characters in length and use any alphanumeric and underscore only.\n * @param resourceGroupName The Resource Group Name.\n * @param mitigateJobRequest Mitigation Request.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n @ServiceMethod(returns = ReturnType.SINGLE)\n void mitigate(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest);\n}", "public interface BungeeCloudAPI extends CloudAPI {\n}", "public void createClient() {\n FarmersBaseClient client = new FarmBeatsClientBuilder()\n .endpoint(\"https://<farmbeats resource name>.farmbeats-dogfood.azure.net\")\n .credential(new DefaultAzureCredentialBuilder().build())\n .buildFarmersBaseClient();\n }", "RestClientBuilder(){\n\n }", "@Decorator\n@RegisterRestClient\n@RegisterProvider(BookService.TracingActivator.class)\n@Path(\"/books\")\n@Consumes(APPLICATION_JSON)\n@Produces(APPLICATION_JSON)\npublic interface BookService {\n @GET\n Response findAll();\n\n @GET\n @Path(\"/{id}\")\n Response findById(@PathParam(\"id\") final Long id);\n\n @POST\n Response create(final JsonObject book);\n\n @DELETE\n @Path(\"/{id}\")\n Response delete(@PathParam(\"id\") final Long id);\n\n\n // workaround cause ClientTracingRegistrar requires to use ClientAPI and not @RegisterProvider\n @Dependent\n class TracingActivator implements ClientRequestFilter, ClientResponseFilter {\n private final ClientRequestFilter request;\n private final ClientResponseFilter response;\n\n public TracingActivator() {\n request = create(\"org.apache.geronimo.microprofile.opentracing.microprofile.client.CdiOpenTracingClientRequestFilter\", ClientRequestFilter.class);\n response = create(\"org.apache.geronimo.microprofile.opentracing.microprofile.client.CdiOpenTracingClientResponseFilter\", ClientResponseFilter.class);\n }\n\n @Override\n public void filter(final ClientRequestContext requestContext) throws IOException {\n if (request != null) {\n request.filter(requestContext);\n }\n }\n\n @Override\n public void filter(final ClientRequestContext requestContext, final ClientResponseContext responseContext) throws IOException {\n if (response != null) {\n response.filter(requestContext, responseContext);\n }\n }\n\n private static <T> T create(final String fnq, final Class<T> type) {\n try {\n return type.cast(CDI.current().select(Thread.currentThread().getContextClassLoader().loadClass(fnq)).get());\n } catch (final ClassNotFoundException e) {\n return null;\n }\n }\n }\n}", "@Path(JaxRsActivator.OVERVIEW_ENDPOINT_PATH)\npublic interface ApiOverviewRestEndpoint {\n /**\n * A {@code String} constant representing json v1 \"{@value #MEDIA_TYPE_JSON_V1}\" media type .\n */\n String MEDIA_TYPE_JSON_V1 = \"application/vnd.overview-v1+json\";\n /**\n * A {@link MediaType} constant representing json v1 \"{@value #MEDIA_TYPE_JSON_V1}\" media type.\n */\n MediaType MEDIA_TYPE_JSON_V1_TYPE = new MediaType(\"application\", \"vnd.overview-v1+json\");\n\n /**\n * <pre>\n * http://127.0.0.1:8180/auth-microservice/auth-api/overview/endpoints\n * curl -v -H \"Accept: application/vnd.overview-v1+json\" -H \"Content-Type: application/vnd.overview-v1+json\" -H \"X-BOMC-REQUEST-ID: SET-BY-CURL-123\" -H \"X-BOMC-AUTHORIZATION: BOMC_USER\" -X GET \"127.0.0.1:8180/auth-microservice/auth-api/overview/endpoints\"\n * </pre>\n * @return JSON response for all available endpoints.\n * @description List all available endpoints. responseType javax.json.JsonObject\n * @responseMessage 200 A Response object that wraps the javax.json.JsonObject.\n * @responseMessage 400 Invalid Request.\n * @responseMessage 401 Unauthorized. API key does not need access privileges.\n * @responseMessage 404 Endpoint not found.\n */\n @GET\n @Path(\"/endpoints\")\n @Produces(ApiOverviewRestEndpoint.MEDIA_TYPE_JSON_V1)\n @Cache\n Response getAvailableEndpoints(@Context final Dispatcher dispatcher);\n}", "@Bean\n public RestTemplate restTemplate(RestTemplateBuilder builder) throws Exception {\n\n HttpClient client = HttpClients.custom().setSSLContext(sslContext).build();\n\n RestTemplate restTemplate = builder\n .requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client))\n .build();\n\n restTemplate.getInterceptors().add(restTemplateInterceptor);\n\n return restTemplate;\n }", "public interface RequestsAutorization {\n @POST(\"/user/sign_in\")\n Call<ResponseBaseReal> postAutorization(@Body RequestBodyAutorization body);\n}", "@Override\n @Bean\n public CommandLineRunner run(RestTemplate restTemplate) throws Exception {\n HttpHeaders headers = new HttpHeaders();\n headers.set(\"Accept\", \"application/json\");\n return args -> {\n result = restTemplate.exchange(GlobalCovidRestData.URL, HttpMethod.GET,\n new HttpEntity<String>(headers), String.class);\n log.info(result.toString());\n };\n\n }", "public interface APiJavService {\n\n\n @Headers({\"Authorization: com.explara.eventconnect\",\n \"Content-Type: application/json\"})\n @POST(\"api/api/fetch-exhibitors-by-event-id\")\n Call<ExhibitorresponseDto> fetchExhibitorsWithooutRx(@Body RequestDto requestBody);\n\n\n @Headers({\"Authorization: com.explara.eventconnect\",\n \"Content-Type: application/json\"})\n @POST(\"api/api/fetch-exhibitors-by-event-id\")\n ExhibitorresponseDto fetchExhibitors(@Body RequestDto requestBody);\n\n}", "public interface CloudTracingInterceptor {\n /**\n * Trace information.\n * \n * @param message\n * The information to trace.\n */\n void information(String message);\n\n /**\n * Probe configuration for the value of a setting.\n * \n * @param source\n * The configuration source.\n * @param name\n * The name of the setting.\n * @param value\n * The value of the setting in the source.\n */\n void configuration(String source, String name, String value);\n\n /**\n * Enter a method.\n * \n * @param invocationId\n * Method invocation identifier.\n * @param instance\n * The instance with the method.\n * @param method\n * Name of the method.\n * @param parameters\n * Method parameters.\n */\n void enter(String invocationId, Object instance, String method,\n HashMap<String, Object> parameters);\n\n /**\n * Send an HTTP request.\n * \n * @param invocationId\n * Method invocation identifier.\n * @param request\n * The request about to be sent.\n */\n void sendRequest(String invocationId, HttpRequest request);\n\n /**\n * Receive an HTTP response.\n * \n * @param invocationId\n * Method invocation identifier.\n * @param response\n * The response instance.\n */\n void receiveResponse(String invocationId, HttpResponse response);\n\n /**\n * Raise an error.\n * \n * @param invocationId\n * Method invocation identifier.\n * @param exception\n * The error.\n */\n void error(String invocationId, Exception exception);\n\n /**\n * Exit a method. Note: Exit will not be called in the event of an error.\n * \n * @param invocationId\n * Method invocation identifier.\n * @param returnValue\n * Method return value.\n */\n void exit(String invocationId, Object returnValue);\n}" ]
[ "0.7767895", "0.7568028", "0.75657964", "0.7500308", "0.7366679", "0.7271245", "0.71753323", "0.7166778", "0.7120861", "0.7119824", "0.70855933", "0.7067333", "0.7047105", "0.7006869", "0.6966778", "0.6952912", "0.6900848", "0.6884539", "0.6851142", "0.67502326", "0.6677918", "0.6675795", "0.6650696", "0.664086", "0.66400814", "0.6630648", "0.66183543", "0.66069025", "0.6592651", "0.65835804", "0.65806925", "0.65765595", "0.6521411", "0.64860624", "0.6377479", "0.63309616", "0.62841594", "0.62777704", "0.61951", "0.6172761", "0.6168372", "0.6159566", "0.6144607", "0.6122298", "0.60760206", "0.6055067", "0.59833336", "0.59417266", "0.5934708", "0.5819297", "0.58138806", "0.57203496", "0.5715931", "0.5667491", "0.56152993", "0.5580844", "0.5515978", "0.54943305", "0.53987026", "0.5391888", "0.5317682", "0.5288224", "0.52836955", "0.52651685", "0.52381593", "0.52315", "0.5223136", "0.52153003", "0.51133883", "0.506491", "0.50372976", "0.50012136", "0.49943665", "0.49861082", "0.49852386", "0.49848664", "0.4976815", "0.49740747", "0.49663243", "0.49483448", "0.49478662", "0.49428692", "0.4941956", "0.49287698", "0.4928501", "0.49117664", "0.4911666", "0.48911583", "0.48862788", "0.48794842", "0.48740408", "0.48544928", "0.4853573", "0.48489204", "0.48382375", "0.48352557", "0.48301616", "0.4826885", "0.47991514", "0.47956854" ]
0.79138947
0
Creates new form Feature3
public Feature3() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Action( ACTION_CREATE_FEATURE )\r\n public String doCreateFeature( HttpServletRequest request )\r\n {\r\n populate( _feature, request );\r\n\r\n // Check constraints\r\n if ( !validateBean( _feature, VALIDATION_ATTRIBUTES_PREFIX ) )\r\n {\r\n return redirectView( request, VIEW_CREATE_FEATURE );\r\n }\r\n\r\n FeatureHome.create( _feature );\r\n addInfo( INFO_FEATURE_CREATED, getLocale( ) );\r\n\r\n return redirectView( request, VIEW_MANAGE_FEATURES );\r\n }", "Feature createFeature();", "public Feature createFeature(Feature.Template ft)\n throws BioException, ChangeVetoException;", "@View( VIEW_CREATE_FEATURE )\r\n public String getCreateFeature( HttpServletRequest request )\r\n {\r\n _feature = ( _feature != null ) ? _feature : new Feature( );\r\n\r\n Map<String, Object> model = getModel( );\r\n model.put( MARK_FEATURE, _feature );\r\n model.put( MARK_CATEGORIES_LIST, FeatureCategoryHome.getCategoriesList( ) );\r\n model.put( MARK_TARGETS_LIST, ActionLinkService.getTargetList( getLocale( ) ) );\r\n model.put( MARK_DISPLAY_LEVELS_LIST, FeatureService.getFeatureDisplayLevels( getLocale( ) ) );\r\n\r\n return getPage( PROPERTY_PAGE_TITLE_CREATE_FEATURE, TEMPLATE_CREATE_FEATURE, model );\r\n }", "org.landxml.schema.landXML11.FeatureDocument.Feature insertNewFeature(int i);", "org.landxml.schema.landXML11.FeatureDocument.Feature insertNewFeature(int i);", "org.landxml.schema.landXML11.PlanFeatureDocument.PlanFeature insertNewPlanFeature(int i);", "public static Feature create(Feature feature) throws SQLException {\r\n\r\n\t\tString[] data = new String[5];\r\n\r\n\t\tdata[0] = \"NEXT VALUE FOR siat.feature_pk\";\r\n\t\tdata[1] = \"\" + feature.getVideoId() + \"\";\r\n\t\tdata[2] = \"\\'\" + feature.getFeatureName() + \"\\'\";\r\n\t\tdata[3] = \"\\'\" + feature.getFeatureVector() + \"\\'\";\r\n\t\tdata[4] = \"TO_DATE(\\'\" + feature.getCreationDate() + \"\\', \\'yyyy-MM-dd\\', \\'GMT+9\\')\";\r\n\r\n\t\t//System.out.println(\"Data = \" + Arrays.toString(data));\r\n\t\toperation.insertOrUdate(\"FEATURE\", data);\r\n\r\n\t\treturn feature;\r\n\t}", "public org.landxml.schema.landXML11.FeatureDocument.Feature insertNewFeature(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FeatureDocument.Feature target = null;\r\n target = (org.landxml.schema.landXML11.FeatureDocument.Feature)get_store().insert_element_user(FEATURE$6, i);\r\n return target;\r\n }\r\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature insertNewFeature(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FeatureDocument.Feature target = null;\r\n target = (org.landxml.schema.landXML11.FeatureDocument.Feature)get_store().insert_element_user(FEATURE$6, i);\r\n return target;\r\n }\r\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature insertNewFeature(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FeatureDocument.Feature target = null;\r\n target = (org.landxml.schema.landXML11.FeatureDocument.Feature)get_store().insert_element_user(FEATURE$14, i);\r\n return target;\r\n }\r\n }", "void addFeature(int index, Feature feature);", "org.landxml.schema.landXML11.FeatureDocument.Feature addNewFeature();", "org.landxml.schema.landXML11.FeatureDocument.Feature addNewFeature();", "org.landxml.schema.landXML11.PlanFeatureDocument.PlanFeature addNewPlanFeature();", "void addFeature(Feature feature);", "void addFeatures(Features features);", "abstract Feature createFeature(boolean enabled, int count);", "FeatureConcept createFeatureConcept();", "private Widget getNewDataButton(final ExecutionTrace previousEx, final Scenario scenario) {\n\t\tImage newItem = new ImageButton(\"images/new_item.gif\", \"Add a new data input to this scenario.\", new ClickListener() {\n\t\t\tpublic void onClick(Widget w) {\n\n\t\t\t\tfinal FormStylePopup pop = new FormStylePopup(\"images/rule_asset.gif\", \"New input\");\n\n\t\t final ListBox factTypes = new ListBox();\n\t\t for (int i = 0; i < sce.factTypes.length; i++) {\n\t\t factTypes.addItem(sce.factTypes[i]);\n\t\t }\n\t\t final TextBox factName = new TextBox();\n\t\t factName.setVisibleLength(5);\n\n\t\t Button add = new Button(\"Add\");\n\t\t add.addClickListener(new ClickListener() {\n\t\t\t\t\tpublic void onClick(Widget w) {\n\t\t\t\t\t\tString fn = (\"\" + factName.getText()).trim();\n\t\t\t\t\t\tif (fn.equals(\"\")\n\t\t\t\t\t\t\t\t|| factName.getText().indexOf(' ') > -1) {\n\t\t\t\t\t\t\tWindow.alert(\"You must enter a valid fact name.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (scenario.isFactNameExisting(fn)) {\n\t\t\t\t\t\t\t\tWindow.alert(\"The fact name [\" + fn + \"] is already in use. Please choose another name.\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tscenario.insertBetween(previousEx, new FactData(factTypes.getItemText(factTypes.getSelectedIndex()), factName.getText(), new ArrayList(), false ));\n\t\t\t\t\t\t\t\trenderEditor();\n\t\t\t\t\t\t\t\tpop.hide();\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 HorizontalPanel insertFact = new HorizontalPanel();\n\t\t insertFact.add(factTypes); insertFact.add(new SmallLabel(\"Fact name:\")); insertFact.add(factName); insertFact.add(add);\n\t\t pop.addAttribute(\"Insert a new fact:\", insertFact);\n\n\t\t List varsInScope = scenario.getFactNamesInScope(previousEx, false);\n\t\t //now we do modifies & retracts\n\t\t if (varsInScope.size() > 0) {\n\t\t \tfinal ListBox modifyFacts = new ListBox();\n\t\t\t for (int j = 0; j < varsInScope.size(); j++) { modifyFacts.addItem((String) varsInScope.get(j));}\n\t\t\t add = new Button(\"Add\");\n\t\t\t add.addClickListener(new ClickListener() {\n\t\t\t\t\t\tpublic void onClick(Widget w) {\n\t\t\t\t\t\t\tString fn = modifyFacts.getItemText(modifyFacts.getSelectedIndex());\n\t\t\t\t\t\t\tString type = (String) scenario.getVariableTypes().get(fn);\n\t\t\t\t\t\t\tscenario.insertBetween(previousEx, new FactData(type, fn, new ArrayList(), true));\n\t\t\t\t\t\t\trenderEditor();\n\t\t\t\t\t\t\tpop.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t HorizontalPanel modifyFact = new HorizontalPanel();\n\t\t\t modifyFact.add(modifyFacts); modifyFact.add(add);\n\t\t\t pop.addAttribute(\"Modify an existing fact:\", modifyFact);\n\n\t\t\t //now we do retracts\n\t\t \tfinal ListBox retractFacts = new ListBox();\n\t\t\t for (int j = 0; j < varsInScope.size(); j++) { retractFacts.addItem((String) varsInScope.get(j));}\n\t\t\t add = new Button(\"Add\");\n\t\t\t add.addClickListener(new ClickListener() {\n\t\t\t\t\t\tpublic void onClick(Widget w) {\n\t\t\t\t\t\t\tString fn = retractFacts.getItemText(retractFacts.getSelectedIndex());\n\t\t\t\t\t\t\tscenario.insertBetween(previousEx, new RetractFact(fn));\n\t\t\t\t\t\t\trenderEditor();\n\t\t\t\t\t\t\tpop.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t HorizontalPanel retractFact = new HorizontalPanel();\n\t\t\t retractFact.add(retractFacts); retractFact.add(add);\n\t\t\t pop.addAttribute(\"Retract an existing fact:\", retractFact);\n\n\n\t\t }\n\n\n\t\t\t\tpop.show();\n\n\t\t\t}\n\t\t});\n\n\t\treturn newItem;\n\t}", "public org.landxml.schema.landXML11.FeatureDocument.Feature addNewFeature()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FeatureDocument.Feature target = null;\r\n target = (org.landxml.schema.landXML11.FeatureDocument.Feature)get_store().add_element_user(FEATURE$6);\r\n return target;\r\n }\r\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature addNewFeature()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FeatureDocument.Feature target = null;\r\n target = (org.landxml.schema.landXML11.FeatureDocument.Feature)get_store().add_element_user(FEATURE$6);\r\n return target;\r\n }\r\n }", "public boolean CreateFeature(Feature feature, String nameTable){\n try {\n String sql = \"INSERT INTO \" + nameTable + \"(`\" + FEATURE_DB_TEXTFEATURE + \"`, `\" + FEATURE_DB_ELO + \"`, `\"\n + FEATURE_DB_MMR + \"`, `\" + FEATURE_DB_AUTHOR + \"`) VALUES (?, ?, ?, ?)\";\n\n\n // Prepare SQL query\n PreparedStatement statement = conn.prepareStatement(sql);\n statement.setString(1, feature.getTextFeature());\n statement.setInt(2, feature.getELO());\n statement.setInt(3, feature.getMMR());\n statement.setString(4, feature.getAuthorEmail());\n\n int result = statement.executeUpdate();\n if (result > 0) {\n System.out.println(\"A new user was inserted successfully!\");\n return true;\n } else {\n return false;\n }\n } catch (SQLException e) {\n e.printStackTrace();\n return false;\n }\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature addNewFeature()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FeatureDocument.Feature target = null;\r\n target = (org.landxml.schema.landXML11.FeatureDocument.Feature)get_store().add_element_user(FEATURE$14);\r\n return target;\r\n }\r\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "FORM createFORM();", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }", "public Features() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public void add(Feature f){\n if (debug) logger.info(\"feature added\");\n int z = fc.size();\n fc.add(f);\n fcLastEdits.clear();//clear possible feature edits\n fcLastEdits.add(f);\n lastEditType = EDIT_ADD;\n fireTableRowsInserted(z+1, z+1);\n }", "public void addFeature() throws UMUserManagementException {\n UMFeature uMFeature = convertFeatureDataBeanToFeatureModel(featureDataBean);\n featureService.createFeature(uMFeature);\n clearFeatureData();\n }", "public void addFeatures(IFeature feature);", "private void addFeature()\r\n {\r\n MapGeometrySupport mgs = myCurrentGeometryHandler.getGeometry();\r\n MetaDataProvider mdp = myMetaDataHandler.getMetaDataProvider();\r\n TimeSpan span = buildTimeSpan(mdp);\r\n mgs.setTimeSpan(span);\r\n MapDataElement element = new DefaultMapDataElement(myFeatureId, span, myType, mdp, mgs);\r\n Color typeColor = myType.getBasicVisualizationInfo().getTypeColor().equals(DEFAULT_FEATURE_COLOR) ? myFeatureColor\r\n : myType.getBasicVisualizationInfo().getTypeColor();\r\n element.getVisualizationState().setColor(typeColor);\r\n myConsumer.addFeature(element);\r\n myFeatureCount++;\r\n }", "ShipmentItemFeature createShipmentItemFeature();", "private void createFeatures() {\n\t\tfeatures = new Feature[NUM_FEATURES];\n\n\t\t// Create dummy feature\n\t\tfeatures[0] = new DummyFeature(width, height, 0, 0 - THRESHOLD);\n\n\t\t// Create the rest of the features\n\t\tfor (int i = 1; i < NUM_FEATURES; i++) {\n\t\t\tfeatures[i] = new Feature(width, height, i);\n\t\t}\n\t}", "private static final void addNewAttraction()\r\n { \r\n String attractionID;\r\n String description;\r\n double admissionFee;\r\n boolean duplicateID = false;\r\n \r\n System.out.println(\"Add New Attraction Feature Selected!\");\r\n System.out.println(\"--------------------------------------\");\r\n \r\n System.out.print(\"Enter Attraction ID: \");\r\n attractionID = sc.nextLine();\r\n \r\n System.out.print(\"Enter Attraction Description: \");\r\n description = sc.nextLine();\r\n \r\n System.out.print(\"Enter Admission Fee: \");\r\n admissionFee = sc.nextDouble();\r\n sc.nextLine();\r\n System.out.println();\r\n \r\n // check attractionID with other ID's already in the system\r\n // if duplicate found print error, if no duplicate add object to array\r\n for(int i = 0; i < attractionCount; i++)\r\n {\r\n \t if(attractionList[i].getAttractionID().equalsIgnoreCase(attractionID))\r\n \t {\r\n \t\t duplicateID = true;\r\n \t\t System.out.print(\"Error! Attraction / Tour with this ID already exists!\");\r\n \t\t System.out.println();\r\n \t }\r\n } \r\n\r\n if(duplicateID == false)\r\n {\r\n attractionList[attractionCount] = new Attraction(attractionID, description, admissionFee);\r\n attractionCount++;\r\n }\r\n }", "public AddNewSpeciality() {\r\n\t\tsuper(\"Add New Speciality\");\r\n\t\tthis.setLayout(new MigLayout(new LC().fill(), new AC().grow(), new AC().grow()));\r\n\r\n\t\tthis.add(new JLabel(\"Add Speciality\"), new CC().grow().alignX(\"center\"));\r\n\r\n\t\tnewSpeciality = new JTextField(25);\r\n\t\tthis.add(newSpeciality);\r\n\r\n\t\taddNewSpecialityBtn = new JButton(\"Add!\");\r\n\t\taddNewSpecialityBtn.addActionListener(this);\r\n\t\tthis.add(addNewSpecialityBtn);\r\n\r\n\t\tthis.pack();\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t\tthis.setVisible(true);\r\n\t}", "public void createNewTeam(ActionEvent actionEvent) throws IOException {\n createTeamPane.setDisable(false);\n createTeamPane.setVisible(true);\n darkPane.setDisable(false);\n darkPane.setVisible(true);\n\n teamNameCreateField.setText(\"\");\n abbrevationCreateField.setText(\"\");\n chooseCityBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseAgeGroupCreate.getSelectionModel().clearSelection();\n chooseLeagueTeamBoxCreate.getSelectionModel().clearSelection();\n\n chooseLeagueBoxCreate.setDisable(true);\n chooseLeagueTeamBoxCreate.setDisable(true);\n }", "private String createFeatureInStore( final Geometry finalGeometry, final FeatureStore<SimpleFeatureType, SimpleFeature> store ) throws SOProcessException{\n \n SimpleFeature newFeature;\n try {\n newFeature = DataUtilities.template(store.getSchema());\n\n newFeature.setDefaultGeometry(finalGeometry);\n \n Set fidSet = store.addFeatures(DataUtilities.collection(new SimpleFeature[]{newFeature}));\n \n Iterator iter = fidSet.iterator();\n assert iter.hasNext();\n String fid = (String)iter.next();\n \n return fid;\n\n } catch (Exception e) {\n \n final String msg = Messages.ClipProcess_failed_creating_new_feature ;\n LOGGER.severe(msg);\n throw new SOProcessException(msg);\n \n }\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "public void create() {\n\t\t\n\t}", "public CatalArticle create(CatalArticle entity) {\n\t\tCatalArtFeatMapping features = entity.getFeatures();\n\n\t\tentity = repository.save(attach(entity));\n\n\t\tif (features == null) {\n\t\t\tfeatures = new CatalArtFeatMapping();\n\t\t}\n\t\tif (StringUtils.isBlank(features.getLangIso2())) {\n\t\t\tString lg = securityUtil.getUserLange();\n\t\t\tfeatures.setLangIso2(lg);\n\t\t}\n\t\tfeatures.setArtIdentif(entity.getIdentif());\n\t\tfeatures = featMappingEJB.create(features);\n\n\t\tCatalPicMapping picMapping = new CatalPicMapping();\n\t\tpicMapping.setArtIdentif(entity.getPic());\n\t\tpicMapping.setCode(entity.getPic());\n\t\tpicMapping.setCodeOrigin(cipOrigineEnumContract.getMain());\n\t\tpicMapping.setPriority(0);\n\t\tpicMappingEJB.create(picMapping);\n\n\t\tentity.setFeatures(features);\n\n\t\treturn entity;\n\t}", "@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName.getText(), ComboSize.getValue(), txtProductPrice.getText(),\n\t\t\t\t\tComboType.getValue(), selectedIngredients);\n\n\t\t\ttry {\n\t\t\t\trestaurant.addProduct(objProduct, empleadoUsername);\n\n\t\t\t\ttxtProductName.setText(null);\n\t\t\t\ttxtProductPrice.setText(null);\n\t\t\t\tComboSize.setValue(null);\n\t\t\t\tComboType.setValue(null);\n\t\t\t\tChoiceIngredients.setValue(null);\n\t\t\t\tselectedIngredients.clear();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar los datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "public MdnFeatures()\n {\n }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "public void create(){}", "com.synergyj.cursos.webservices.ordenes.XMLBFactura addNewXMLBFactura();", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "private static void addNewScheduledTour()\r\n {\r\n\t String tourID;\r\n\t String description;\r\n\t double admissionFee;\r\n\t String tourDate;\r\n\t int maxGroupSize;\r\n\t String tourLeader;\r\n\t boolean duplicateID = false;\r\n\t \r\n System.out.println(\"Add New Scheduled Tour Feature Selected!\");\r\n System.out.println(\"--------------------------------------\");\r\n \r\n System.out.print(\"Enter Tour ID: \");\r\n tourID = sc.nextLine();\r\n \r\n System.out.print(\"Enter Tour Description: \");\r\n description = sc.nextLine();\r\n \r\n System.out.print(\"Enter Admission Fee: \");\r\n admissionFee = sc.nextDouble();\r\n sc.nextLine();\r\n \r\n System.out.print(\"Enter Tour Date: \");\r\n tourDate = sc.nextLine();\r\n \r\n System.out.print(\"Enter Maximum Group Size: \");\r\n maxGroupSize = sc.nextInt();\r\n sc.nextLine();\r\n \r\n System.out.print(\"Enter Tour Leader: \");\r\n tourLeader = sc.nextLine();\r\n System.out.println();\r\n \r\n // check if tourID is already in use in the booking system\r\n for(int i = 0; i < attractionCount; i++)\r\n {\r\n \t if(attractionList[i].getAttractionID().equalsIgnoreCase(tourID))\r\n \t {\r\n \t\t duplicateID = true;\r\n \t\t System.out.print(\"Error! Attraction / Tour with this ID already exists!\");\r\n \t\t System.out.println();\r\n \t }\r\n }\r\n \r\n if(duplicateID == false)\r\n {\r\n \t attractionList[attractionCount] = new ScheduledTour(tourID, description,\r\n \t\t\t admissionFee, tourDate, maxGroupSize, tourLeader);\r\n \t attractionCount++;\r\n }\r\n }", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n protected SimpleFeature buildFeature() {\n synchronized(EDGE_FEATURE_BUILDER) {\n EDGE_FEATURE_BUILDER.add(getId());\n EDGE_FEATURE_BUILDER.add(displayName);\n EDGE_FEATURE_BUILDER.add(url);\n EDGE_FEATURE_BUILDER.add(selected);\n EDGE_FEATURE_BUILDER.add(lineString);\n return EDGE_FEATURE_BUILDER.buildFeature(null);\n }\n }", "@OnClick (R.id.create_course_btn)\n public void createCourse()\n {\n\n CourseData courseData = new CourseData();\n courseData.CreateCourse( getView() ,UserData.user.getId() ,courseName.getText().toString() , placeName.getText().toString() , instructor.getText().toString() , Integer.parseInt(price.getText().toString()), date.getText().toString() , descreption.getText().toString() ,location.getText().toString() , subField.getSelectedItem().toString() , field.getSelectedItem().toString());\n }", "void setFeatures(Features f) throws Exception;", "public static Result newProduct() {\n Form<models.Product> productForm = form(models.Product.class).bindFromRequest();\n if(productForm.hasErrors()) {\n return badRequest(\"Tag name cannot be 'tag'.\");\n }\n models.Product product = productForm.get();\n product.save();\n return ok(product.toString());\n }", "public ProductCreate() {\n initComponents();\n }", "void create(Feedback entity);", "@Override\n\tpublic void create() {\n\t\t\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "private ModelBuilder3D(TemplateHandler3D templateHandler, String ffname) throws CDKException {\n\t\tsetTemplateHandler(templateHandler);\n\t\tsetForceField(ffname);\n\t}", "@Override\n\tpublic Oglas createNewOglas(NewOglasForm oglasForm) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\n\t\tOglas oglas = new Oglas();\n\t\tSystem.out.println(oglas.getId());\n\t\toglas.setNaziv(oglasForm.getNaziv());\n\t\toglas.setOpis(oglasForm.getOpis());\n\t\ttry {\n\t\t\toglas.setDatum(formatter.parse(oglasForm.getDatum()));\n\t\t\tSystem.out.println(oglas.getDatum());\n System.out.println(formatter.format(oglas.getDatum()));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn repository.save(oglas);\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n public void Create() {\n initView();\n initData();\n }", "@OnClick(R.id.fab)\n public void onClick()\n {\n CreateCommunityFragment createCommunityFragment = new CreateCommunityFragment();\n createCommunityFragment.show(getSupportFragmentManager(), getString(R.string.title_create_community));\n }", "public void createTeam(ActionEvent actionEvent) throws IOException, SQLException {\n if (validCreateInput()) {\n user = DatabaseManager.createTeam(user, teamNameCreateField.getText(), abbrevationCreateField.getText(), chooseCityBoxCreate.getValue().toString(),\n chooseAgeGroupCreate.getValue(), chooseLeagueBoxCreate.getValue().toString(), chooseLeagueTeamBoxCreate.getValue().toString(), createTeamLogoFile);\n\n createPaneClose(actionEvent);\n displayMessage(messagePane, \"Team created\", false);\n }\n }", "public void saveAndCreateNew() throws Exception {\n\t\tVoodooUtils.focusFrame(\"bwc-frame\");\n\t\tgetControl(\"saveAndCreateNew\").click();\n\t\tVoodooUtils.waitForReady();\n\t\tVoodooUtils.focusDefault();\n\t}", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "Paper addNewPaper(PaperForm form, Long courseId)throws Exception;", "@Override\n public void Create() {\n\n initView();\n }", "private void creatingElements() {\n\t\ttf1 = new JTextField(20);\n\t\ttf2 = new JTextField(20);\n\t\ttf3 = new JTextField(20);\n\t\tJButton btn = new JButton(\"Add\");\n\t\tbtn.addActionListener(control);\n\t\tbtn.setActionCommand(\"add\");\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(tf1);\n\t\tpanel.add(tf2);\n\t\tpanel.add(btn);\n\t\tpanel.add(tf3);\n\t\t\n\t\tthis.add(panel);\n\t\t\n\t\tthis.validate();\n\t\tthis.repaint();\t\t\n\t\t\n\t}", "public Team create(TeamDTO teamForm);", "public FundsVolunteerCreate(AppState appState) {\n initComponents();\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n btCancelar.setVisible(false);\n btSave.setVisible(false);\n btnRemove.setVisible(false);\n btnSaveEdit.setVisible(false);\n enableFields(false);\n this.appState = appState;\n }", "public void onCreate() {\r\n Session session = sessionService.getCurrentSession();\r\n Map<String, Region> items = ControlUtility.createForm(Pc.class);\r\n\r\n ControlUtility.fillComboBox((ComboBox<Kind>) items.get(\"Kind\"), session.getCampaign().getCampaignVariant().getKinds());\r\n ControlUtility.fillComboBox((ComboBox<Race>) items.get(\"Race\"), session.getCampaign().getCampaignVariant().getRaces());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Ability>) items.get(\"SavingThrows\"), Arrays.asList(Ability.values()));\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Proficiency>) items.get(\"Proficiencies\"), session.getCampaign().getCampaignVariant().getProficiencies());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Feature>) items.get(\"Features\"), session.getCampaign().getCampaignVariant().getFeatures());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Trait>) items.get(\"Traits\"), session.getCampaign().getCampaignVariant().getTraits());\r\n ControlUtility.fillCheckComboBox((CheckComboBox<Equipment>) items.get(\"Equipment\"), session.getCampaign().getCampaignVariant().getEquipments());\r\n\r\n Campaign campaign = session.getCampaign();\r\n\r\n Dialog<String> dialog = ControlUtility.createDialog(\"Create Playable Character\", items);\r\n dialog.show();\r\n\r\n dialog.setResultConverter(buttonType -> {\r\n if (buttonType != null) {\r\n Pc pc = null;\r\n try {\r\n pc = ControlUtility.controlsToValues(Pc.class, items);\r\n } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if (pc != null) {\r\n try {\r\n characterService.createPlayerCharacter(pc);\r\n } catch (SessionAlreadyExists | IndexAlreadyExistsException sessionAlreadyExists) {\r\n sessionAlreadyExists.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n Player player = playerManagementService.getRegisteredPlayer();\r\n campaign.addPlayer(player);\r\n campaign.addCharacter(pc);\r\n if (campaignListingService.campaignExists(campaign.getId())) {\r\n manipulationService.updateCampaign(campaign);\r\n } else {\r\n manipulationService.createCampaign(campaign);\r\n }\r\n } catch (MultiplePlayersException | EntityNotFoundException | SessionAlreadyExists | IndexAlreadyExistsException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n playerManagementService.addOrUpdatePcForRegisteredPlayer(pc);\r\n } catch (MultiplePlayersException | EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), pc.getId());\r\n sessionService.updateCampaign(campaign);\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n render();\r\n return pc.toString();\r\n }\r\n }\r\n return null;\r\n });\r\n }", "static public ApplicationFormItem createNew(int id, String shortname, boolean required, ApplicationFormItemType type,\n\t\t\t\t\t\t\t\t\t\t\t\tString federationAttribute, String perunSourceAttribute, String perunDestinationAttribute, String regex,\n\t\t\t\t\t\t\t\t\t\t\t\tList<Application.ApplicationType> applicationTypes, Integer ordnum, boolean forDelete)\t{\n\t\tApplicationFormItem afi = new JSONObject().getJavaScriptObject().cast();\n\t\tafi.setId(id);\n\t\tafi.setShortname(shortname);\n\t\tafi.setRequired(required);\n\t\tafi.setType(type);\n\t\tafi.setFederationAttribute(federationAttribute);\n\t\tafi.setPerunSourceAttribute(perunSourceAttribute);\n\t\tafi.setPerunDestinationAttribute(perunDestinationAttribute);\n\t\tafi.setRegex(regex);\n\t\tafi.setApplicationTypes(applicationTypes);\n\t\tafi.setOrdnum(ordnum);\n\t\tafi.setForDelete(forDelete);\n\t\treturn afi;}", "public hu.blackbelt.epsilon.runtime.model.test1.data.DataModel build() {\n final hu.blackbelt.epsilon.runtime.model.test1.data.DataModel _newInstance = hu.blackbelt.epsilon.runtime.model.test1.data.DataFactory.eINSTANCE.createDataModel();\n if (m_featureNameSet) {\n _newInstance.setName(m_name);\n }\n if (m_featureEntitySet) {\n _newInstance.getEntity().addAll(m_entity);\n } else {\n if (!m_featureEntityBuilder.isEmpty()) {\n for (hu.blackbelt.epsilon.runtime.model.test1.data.util.builder.IDataBuilder<? extends hu.blackbelt.epsilon.runtime.model.test1.data.Entity> builder : m_featureEntityBuilder) {\n _newInstance.getEntity().add(builder.build());\n }\n }\n }\n return _newInstance;\n }", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "@FXML\n\tpublic void buttonCreateProductType(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtProductTypeName.getText();\n\t\tif (!name.equals(empty)) {\n\t\t\tProductType obj = new ProductType(txtProductTypeName.getText());\n\t\t\ttry {\n\t\t\t\tboolean found = restaurant.addProductType(obj, empleadoUsername); // Se añade a la lista de tipos de\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// producto DEL RESTAURANTE\n\t\t\t\tif (found == false) {\n\t\t\t\t\ttypeOptions.add(name);// Se añade a la lista de tipos de producto para ser mostrada en los combobox\n\t\t\t\t}\n\t\t\t\ttxtProductTypeName.setText(\"\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"El tipo de producto a crear debe tener un nombre \");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\n\t\t}\n\t}", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public org.w3c.dom.Element createFeaturesElement(Document xmldoc) {\n\tElement e = xmldoc.createElement(XML.FEATURES);\n\tStringBuffer b=new StringBuffer();\n\tfor(int i=0; i< id2label.size();i++) {\n\t if (b.length()>0) b.append(\" \");\n\t b.append(getLabel(i));\n\t}\n\tText textNode = xmldoc.createTextNode(b.toString());\n\te.appendChild(textNode);\n\treturn e;\n }", "public void onSelectionCreate(ActionEvent event) throws SQLException {\n //TODO think about creating league model class to get id easily\n if(chooseAgeGroupCreate.getValue() != null && chooseCityBoxCreate.getValue() != null){\n chooseLeagueBoxCreate.setDisable(false);\n chooseLeagueTeamBoxCreate.getItems().clear();\n chooseLeagueBoxCreate.getItems().clear();\n ObservableList<String> leagueList = DatabaseManager.getLeagues(user, chooseCityBoxCreate.getValue().toString(), chooseAgeGroupCreate.getValue());\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate .setButtonCell(new ListCell<String>() {\n @Override\n protected void updateItem(String item, boolean empty) {\n super.updateItem(item, empty) ;\n if (empty || item == null) {\n setText(\"Choose League\");\n } else {\n setText(item);\n }\n }\n });\n if(leagueList.size() != 0){\n chooseLeagueBoxCreate.getItems().addAll(leagueList);\n }\n }\n }", "public Project_Create() {\n initComponents();\n }", "@Override\n\tpublic void create(IWizardEntity entity, WizardRunner runner) {\n\t\t\n\t}", "public newRelationship() {\n initComponents();\n }", "@Override\n public void actionPerformed(ActionEvent event)\n {\n TransformationsListener.getListener().setStarted(true);\n if (this.getName().equals(sACTION_TITLE))\n {\n ContentClassInsertionDialog dialog=new ContentClassInsertionDialog();\n if (dialog.getClassName()!=null)\n {\n ElementCollector.ReturnElement cCreatedElement=ReqToConTransformations.createContentClass(dialog.getClassName(),\n TransformationsListener.getListener().getPosition(),((Package)(dialog.getPackage())));\n\n int iAttributes=0;\n int iAssociations=0;\n \n if (dialog.getAttributesCheck())\n {\n iAttributes=ReqToConTransformations.addAttributesToContentClass(cCreatedElement.cClass, dialog.getAssociationsCheck());\n }\n\n if (dialog.getAssociationsCheck())\n {\n iAssociations=ReqToConTransformations.addAssociationsToContentClass(cCreatedElement.cClass,cCreatedElement.cShape);\n }\n \n MessageWriter.log(\"Content class \\\"\"+cCreatedElement.cClass.getName()+\"\\\" including \"+\n iAttributes+\" attributes and \"+iAssociations+\" associations created\",\n Logger.getLogger(ContentModelInsertion.class));\n }\n }\n TransformationsListener.getListener().setStarted(false);\n }", "public StavkaFaktureInsert() {\n initComponents();\n CBFakture();\n CBProizvod();\n }", "public void createNewButtonClicked(){\n loadNewScene(apptStackPane, \"Create_New_Appointment.fxml\");\n }", "public String createQuiz() {\n quiz = quizEJB.createQuiz(quiz);\n quizList = quizEJB.listQuiz();\n FacesContext.getCurrentInstance().addMessage(\"successForm:successInput\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Success\", \"New record added successfully\"));\n return \"quiz-list.xhtml\";\n }", "public static void createButtonSelection(ActionContext actionContext){\n Thing store = actionContext.getObject(\"store\");\n store.doAction(\"openCreateForm\", actionContext);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n productNameText = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n categoryCombo = new javax.swing.JComboBox();\n jLabel3 = new javax.swing.JLabel();\n productTypeCombo = new javax.swing.JComboBox();\n jLabel4 = new javax.swing.JLabel();\n licenseInfoText = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n classificationCombo = new javax.swing.JComboBox();\n jLabel6 = new javax.swing.JLabel();\n uomCombo = new javax.swing.JComboBox();\n jLabel7 = new javax.swing.JLabel();\n skuText = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n upcText = new javax.swing.JTextField();\n saveGeneralProductButton = new javax.swing.JButton();\n clearProductButton = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"ProductCreate Create\");\n\n jLabel1.setText(\"ProductCreate Name:\");\n\n productNameText.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n productNameTextActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"CategoryCreate:\");\n\n categoryCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel3.setText(\"ProductCreate Type:\");\n\n productTypeCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel4.setText(\"License Info:\");\n\n jLabel5.setText(\"Classification:\");\n\n classificationCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel6.setText(\"Unit Of Measure:\");\n\n uomCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel7.setText(\"SKU:\");\n\n jLabel8.setText(\"UPC:\");\n\n saveGeneralProductButton.setText(\"Save\");\n saveGeneralProductButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveGeneralProductButtonActionPerformed(evt);\n }\n });\n\n clearProductButton.setText(\"Clear\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jLabel4)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(productTypeCombo, 0, 336, Short.MAX_VALUE)\n .addComponent(licenseInfoText, javax.swing.GroupLayout.DEFAULT_SIZE, 336, Short.MAX_VALUE)\n .addComponent(productNameText, javax.swing.GroupLayout.DEFAULT_SIZE, 336, Short.MAX_VALUE)\n .addComponent(categoryCombo, 0, 336, Short.MAX_VALUE)\n .addComponent(classificationCombo, 0, 336, Short.MAX_VALUE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8)\n .addComponent(jLabel7)\n .addComponent(jLabel6))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(skuText, javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)\n .addComponent(uomCombo, 0, 335, Short.MAX_VALUE)\n .addComponent(upcText, javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(saveGeneralProductButton)\n .addGap(18, 18, 18)\n .addComponent(clearProductButton)))))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(productNameText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(categoryCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(productTypeCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(licenseInfoText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(classificationCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(uomCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(skuText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(upcText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(32, 32, 32)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(clearProductButton)\n .addComponent(saveGeneralProductButton))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"General Information\", jPanel1);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 431, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 384, Short.MAX_VALUE)\n );\n\n jTabbedPane1.addTab(\"Materials Specification\", jPanel2);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 431, Short.MAX_VALUE)\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 384, Short.MAX_VALUE)\n );\n\n jTabbedPane1.addTab(\"Picture\", jPanel3);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 436, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(23, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 412, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(31, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void newComponent(byte i ){\n\t\tif(nbTabs > 2)\n\t\t\tJOptionPane.showMessageDialog(null, \"Nombre maximal d'onglets atteint\");\n\t\telse {\n\t\t\tnbTabs++;\n\t\t\tswitch(i){\n\t\t\t\tcase 1:\n\t\t\t\t\ttabs.addTab(\"Génération\" + nbTabs,new Tab(this));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\ttabs.addTab(\"Exemples\" ,new Example(this));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void create(ActionEvent actionEvent) {\n String grName = groupName.getText();\n ObservableList memList = addList.getCheckModel().getCheckedItems();\n\n if (memList == null) return;\n\n String memName = \"\";\n for (Object obj : memList ) {\n memName += obj.toString() + \"\\n\";\n }\n if (memName != \"\") {\n sender.requestNewGroup(grName, memName);\n chatUIController.newGr(grName);\n }\n return;\n }", "@Override\n\tpublic void create(CreateCoinForm form) throws Exception {\n\t}", "public com.ms3.training.services.model.Course create(java.lang.String title);", "public void createModel() {\r\n\t\t\r\n\t\tEObject input;\r\n\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());\r\n\t\tIEditorInput editorInput = getEditorInput();\r\n\r\n\t\tView v = getAllView(editorInput);\r\n\t\t\r\n\t\tif (editorInput instanceof ValueEditorInputAppFeature) {\r\n\t\t\tValueEditorInputAppFeature featureInput = (ValueEditorInputAppFeature) editorInput;\r\n\t\t\tinput = featureInput.getFeature();\r\n\t\t} else if (editorInput instanceof ValueEditorInputAppGroup){\r\n\t\t\tValueEditorInputAppGroup groupInput = (ValueEditorInputAppGroup) editorInput;\r\n\t\t\tinput = groupInput.getGroup();\r\n\t\t} else {\r\n\t\t\tEAppNamedItem namedInput = (EAppNamedItem) getInputObjectFromWorkspace(((URIEditorInput) editorInput)\r\n\t\t\t\t\t.getURI());\r\n\t\t\tsetPartName(namedInput.getName());\r\n\t\t\tinput = namedInput;\r\n\t\t}\r\n\r\n\t\tAppModel2EditorModelConverter instance = AppModel2EditorModelConverter.getInstance();\r\n\t\teditorModel = instance.createEditorModel(input, v);\r\n\t\t\r\n\t\tResource resource = new XMIResourceImpl(resourceURI);\r\n\t\tresource.getContents().add(editorModel);\r\n\t\teditingDomain.getResourceSet().getResources().add(resource);\r\n\t\t\r\n\t\tSettingEvaluator.initRelevantForWholeModel(v, true);\r\n\t\t\r\n\t\t//S60CTBuilder.setEditor(this);\r\n\t}", "@RolesAllowed(\"user\")\n @POST\n @Consumes({MediaType.MULTIPART_FORM_DATA})\n @Produces({MediaType.APPLICATION_JSON})\n public Factory saveFactory(@Context HttpServletRequest request, @Context UriInfo uriInfo) throws FactoryUrlException {\n try {\n EnvironmentContext context = EnvironmentContext.getCurrent();\n if (context.getUser() == null || context.getUser().getName() == null || context.getUser().getId() == null) {\n throw new FactoryUrlException(Status.INTERNAL_SERVER_ERROR.getStatusCode(), \"Unable to identify user from context\");\n }\n\n Set<FactoryImage> images = new HashSet<>();\n Factory factoryUrl = null;\n\n for (Part part : request.getParts()) {\n String fieldName = part.getName();\n if (fieldName.equals(\"factoryUrl\")) {\n try {\n factoryUrl = factoryBuilder.buildEncoded(part.getInputStream());\n } catch (JsonSyntaxException e) {\n throw new FactoryUrlException(\n \"You have provided an invalid JSON. For more information, please visit http://docs.codenvy.com/user/creating-factories/factory-parameter-reference/\");\n }\n } else if (fieldName.equals(\"image\")) {\n try (InputStream inputStream = part.getInputStream()) {\n FactoryImage factoryImage =\n FactoryImage.createImage(inputStream, part.getContentType(), NameGenerator.generate(null, 16));\n if (factoryImage.hasContent()) {\n images.add(factoryImage);\n }\n }\n }\n }\n\n if (factoryUrl == null) {\n LOG.warn(\"No factory URL information found in 'factoryUrl' section of multipart form-data.\");\n throw new FactoryUrlException(Status.BAD_REQUEST.getStatusCode(),\n \"No factory URL information found in 'factoryUrl' section of multipart/form-data.\");\n }\n\n if (factoryUrl.getV().equals(\"1.0\")) {\n throw new FactoryUrlException(\"Storing of Factory 1.0 is unsupported.\");\n }\n\n factoryUrl.setUserid(context.getUser().getId());\n factoryUrl.setCreated(System.currentTimeMillis());\n String factoryId = factoryStore.saveFactory(factoryUrl, images);\n factoryUrl = factoryStore.getFactory(factoryId);\n factoryUrl = factoryUrl.withLinks(linksHelper.createLinks(factoryUrl, images, uriInfo));\n\n String createProjectLink = \"\";\n Iterator<Link> createProjectLinksIterator = linksHelper.getLinkByRelation(factoryUrl.getLinks(), \"create-project\").iterator();\n if (createProjectLinksIterator.hasNext()) {\n createProjectLink = createProjectLinksIterator.next().getHref();\n }\n ProjectAttributes attributes = factoryUrl.getProjectattributes();\n LOG.info(\n \"EVENT#factory-created# WS#{}# USER#{}# PROJECT#{}# TYPE#{}# REPO-URL#{}# FACTORY-URL#{}# AFFILIATE-ID#{}# ORG-ID#{}#\",\n \"\",\n context.getUser().getName(),\n \"\",\n nullToEmpty(attributes != null ? attributes.getPtype() : \"\"),\n factoryUrl.getVcsurl(),\n createProjectLink,\n nullToEmpty(factoryUrl.getAffiliateid()),\n nullToEmpty(factoryUrl.getOrgid()));\n\n return factoryUrl;\n } catch (IOException | ServletException e) {\n LOG.error(e.getLocalizedMessage(), e);\n throw new FactoryUrlException(Status.INTERNAL_SERVER_ERROR.getStatusCode(), e.getLocalizedMessage(), e);\n }\n }" ]
[ "0.6797952", "0.6656665", "0.6575248", "0.6441024", "0.63257235", "0.63257235", "0.6098268", "0.6006294", "0.5998294", "0.5998294", "0.59924394", "0.593293", "0.5900068", "0.5900068", "0.5837229", "0.5792767", "0.57695305", "0.5727766", "0.5723656", "0.5721574", "0.5710741", "0.5710741", "0.56952035", "0.56942415", "0.5677539", "0.5647768", "0.5641035", "0.56127065", "0.55963326", "0.5581017", "0.55792296", "0.55453247", "0.5512973", "0.5508235", "0.55068266", "0.5486061", "0.54802585", "0.5461992", "0.5445006", "0.5424431", "0.54080343", "0.54070914", "0.5401533", "0.5390198", "0.53608817", "0.5359501", "0.5349936", "0.53415185", "0.53315055", "0.530916", "0.53051156", "0.5303191", "0.52981335", "0.52940756", "0.5291744", "0.5276912", "0.5275099", "0.52750003", "0.5264333", "0.5251802", "0.52245975", "0.52205336", "0.520922", "0.5205308", "0.51964146", "0.51834923", "0.51768976", "0.51713955", "0.5168836", "0.51676494", "0.5165968", "0.51489884", "0.5148364", "0.5141788", "0.51390207", "0.51323926", "0.51319575", "0.5120352", "0.51160693", "0.51071805", "0.5092523", "0.50922334", "0.50899726", "0.50866574", "0.5079131", "0.5077038", "0.5076995", "0.5073258", "0.5071106", "0.5070929", "0.50659794", "0.50583184", "0.50549626", "0.50532544", "0.5049062", "0.504635", "0.503455", "0.5024326", "0.5021166", "0.5021002" ]
0.6196459
6
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel8 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jScrollPane3 = new javax.swing.JScrollPane(); jTextArea3 = new javax.swing.JTextArea(); jLabel2 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); jTextArea2 = new javax.swing.JTextArea(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel7 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jButton7 = new javax.swing.JButton(); jButton8 = new javax.swing.JButton(); l1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Features"); jLabel8.setFont(new java.awt.Font("Algerian", 0, 24)); // NOI18N jLabel8.setForeground(new java.awt.Color(255, 51, 102)); jLabel8.setText("Features that you can stay without word - AWESOME!!"); jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); jLabel1.setFont(new java.awt.Font("Book Antiqua", 2, 24)); jLabel1.setForeground(new java.awt.Color(0, 102, 204)); jLabel1.setText("Workout Areas"); jTextArea3.setColumns(20); jTextArea3.setEditable(false); jTextArea3.setRows(5); jTextArea3.setText("Workout Areas Are Awesome..\nTHey Include A large No.\nOf Machines...\n"); jScrollPane3.setViewportView(jTextArea3); jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/gym.png"))); // NOI18N jLabel2.setText("jLabel2"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(58, 58, 58) .addComponent(jLabel1) .addContainerGap(82, Short.MAX_VALUE)) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); jTextArea2.setColumns(20); jTextArea2.setEditable(false); jTextArea2.setRows(5); jTextArea2.setText("Beautiful Corridors that \nprovide us peace of Mind"); jScrollPane2.setViewportView(jTextArea2); jLabel3.setFont(new java.awt.Font("Candara", 2, 24)); jLabel3.setForeground(new java.awt.Color(255, 0, 102)); jLabel3.setText("Awesome Corridors"); jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/corridors.png"))); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(29, 29, 29) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(32, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(21, Short.MAX_VALUE) .addComponent(jLabel4)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(51, Short.MAX_VALUE) .addComponent(jLabel3) .addGap(39, 39, 39)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3) .addGap(7, 7, 7) .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 108, Short.MAX_VALUE) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); jTextArea1.setColumns(20); jTextArea1.setEditable(false); jTextArea1.setRows(5); jTextArea1.setText("Vast Party Halls used for \nWedding , Engagement ,\nAnniverasry Celebration,\netc."); jScrollPane1.setViewportView(jTextArea1); jLabel7.setFont(new java.awt.Font("Arial Narrow", 2, 24)); jLabel7.setForeground(new java.awt.Color(51, 51, 255)); jLabel7.setText("Vast party Hall"); jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/party hall.png"))); // NOI18N javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGap(61, 61, 61) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel3Layout.createSequentialGroup() .addGap(25, 25, 25) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)))) .addContainerGap(24, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(25, 25, 25)) ); jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/back-arrow.png"))); // NOI18N jButton7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton7ActionPerformed(evt); } }); jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/finaltheoberoiproject/forward.png"))); // NOI18N jButton8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton8ActionPerformed(evt); } }); new Thread () { public void run () {while(true) { Calendar cal= new GregorianCalendar(); int h = cal .get(Calendar.HOUR); int m = cal .get(Calendar.MINUTE); int s = cal .get(Calendar.SECOND); int a = cal .get(Calendar.AM_PM); String x=""; if (a==1 ){x="PM";} else{x="AM";} String net = h+":"+m+":"+s+" "+x; l1.setText(net); } } }.start(); l1.setFont(new java.awt.Font("DS-Digital", 0, 18)); // NOI18N l1.setText("jLabel1"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(50, 50, 50) .addComponent(jLabel8) .addGap(54, 54, 54) .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(35, 35, 35) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(874, Short.MAX_VALUE) .addComponent(l1, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(l1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(25, 25, 25) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton8, 0, 0, Short.MAX_VALUE) .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel8)) .addGap(74, 74, 74) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 412, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(38, 38, 38)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\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 .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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 .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\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 .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\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.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\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.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\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 .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
take the robot to the best fruit with shortestPath.
private void StepForRobot() { Iterator<Robot> itr = rob.iterator(); while(itr.hasNext()) { Robot r = itr.next(); Fruit fDest = null; double maxSum = 0; node_data v = null; Iterator<Fruit> it = fru.iterator(); while(it.hasNext()) { Fruit f = it.next(); double sum =0; int dest = f.e.getSrc(); List<node_data> list = Algo.shortestPath(r.src, dest); list.add(dgraph.getNode(f.e.getDest())); for(int i = 0;i<list.size()-1;i++) sum += dgraph.getEdge(list.get(i).getKey(), list.get(i+1).getKey()).getWeight(); sum = f.getValue() / sum; if(sum > maxSum && !f.isDest) { maxSum = sum; v = list.get(1); fDest = f; } } if(fDest != null) { fDest.setDest(true); game.chooseNextEdge(r.id, v.getKey()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Fruit findClosestFruit(Robot robot) {\n double min_dist = Double.MAX_VALUE;\n Fruit ans = null;\n for (int i = 0; i < my_game.getFruits().size(); i++) {\n Fruit fruit = my_game.getFruits().get(i);\n if(fruits_status.values().contains(fruit)) {\n continue;\n }\n double dist = algo_g.shortestPathDist(robot.getSrc(), fruit.getEdge().getSrc());\n if (dist < min_dist) {\n min_dist = dist;\n ans = fruit;\n }\n\n }\n\n return ans;\n }", "private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}", "public void findFastestRoute(Point2D start, Point2D end){\n shortestPath = null;\n try {\n RouteFinder routeFinder = new RouteFinder(start, end); //Create a RouteFinder and let it handle it.\n travelMethod(routeFinder);\n routeFinder.setFastestRoute();\n fastestPath = routeFinder.getFastestPath(); //retrieve the fastest route from it\n setTravelInfo(routeFinder);\n RoutePlanner routePlanner = new RoutePlanner(fastestPath); //create a routePlanner to get direction for path\n addToDirectionPane(routePlanner.getDirections());\n }catch(IllegalArgumentException | NullPointerException e){\n addToDirectionPane(new String[]{\"No fastest path between the two locations was found\"});\n setTravelInfo(null);\n fastestPath = null;\n\n }\n\n repaint();\n\n }", "public void findShortestRoute(Point2D start, Point2D end){\n fastestPath = null;\n try {\n RouteFinder routeFinder = new RouteFinder(start, end);\n travelMethod(routeFinder);\n routeFinder.setShortestRoute();\n shortestPath = routeFinder.getShortestPath();\n setTravelInfo(routeFinder);\n RoutePlanner routePlanner = new RoutePlanner(shortestPath);\n addToDirectionPane(routePlanner.getDirections());\n }catch(IllegalArgumentException | NullPointerException e){\n addToDirectionPane(new String[]{\"No shortest path between the two locations was found\"});\n setTravelInfo(null);\n shortestPath = null;\n }\n\n repaint();\n\n }", "public void initRobotPath() {\n for (int i = 0; i < my_game.getRobot_size(); i++) {\n Robot robot = my_game.getRobots().get(i);\n // Fruit fruit = my_game.getFruits().get(i);\n Fruit fruit = findClosestFruit(robot);\n List<node_data> tmp = algo_g.shortestPath(robot.getSrc(), fruit.getEdge().getDest());\n robots_paths.put(robot.getId(), tmp);\n fruits_status.put(robot.getId(),fruit);\n }\n }", "public Coordinates choosePath(Actor robot) {\n\t\tCoordinates tempV = null;\n\t\tint tempDist = 0;\n\t\tboolean occupied = false;\n\t\ttempV = robot.getCoords();\n\t\tDirections dir = Directions.getDirection();\n\t\tswitch (dir) {\n\t\tcase RIGHT:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX() + 1, tempV.getY());\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX() - 1, tempV.getY());\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\tcase LEFT:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX() - 1, tempV.getY());\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX() + 1, tempV.getY());\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\tcase DOWN:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() + 1);\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() - 1);\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\tcase UP:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() - 1);\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() + 1);\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\t}\n\n\t\treturn tempV;\n\t}", "private List<Pair<Integer, Integer>> getBestPath(Pair<Integer, Integer> curLocation, Pair<Integer, Integer> dest) {\n\t\tList<Pair<Integer, Integer>> path = new LinkedList<Pair<Integer, Integer>>();\n\t\t\n\t\t\n\t\tNode current = new Node(curLocation.getX(), curLocation.getY(), getHitProbability(curLocation.getX(), curLocation.getY()));\n\t\tNode target = new Node(dest.getX(), dest.getY(), getHitProbability(dest.getX(), dest.getY()));\n\t\tList<Node> openSet = new ArrayList<>();\n List<Node> closedSet = new ArrayList<>();\n \n \n while (true) {\n openSet.remove(current);\n List<Node> adjacent = getAdjacentNodes(current, closedSet, target);\n\n // Find the adjacent node with the lowest heuristic cost.\n for (Node neighbor : adjacent) {\n \tboolean inOpenset = false;\n \tList<Node> openSetCopy = new ArrayList<>(openSet);\n \tfor (Node node : openSetCopy) {\n \t\tif (neighbor.equals(node)) {\n \t\t\tinOpenset = true;\n \t\t\tif (neighbor.getAccumulatedCost() < node.getAccumulatedCost()) {\n \t\t\t\topenSet.remove(node);\n \t\t\t\topenSet.add(neighbor);\n \t\t\t}\n \t\t}\n \t}\n \t\n \tif (!inOpenset) {\n \t\topenSet.add(neighbor);\n \t}\n }\n\n // Exit search if done.\n if (openSet.isEmpty()) {\n System.out.printf(\"Target (%d, %d) is unreachable from position (%d, %d).\\n\",\n target.getX(), target.getY(), curLocation.getX(), curLocation.getY());\n return null;\n } else if (/*isAdjacent(current, target)*/ current.equals(target)) {\n break;\n }\n\n // This node has been explored now.\n closedSet.add(current);\n\n // Find the next open node with the lowest cost.\n Node next = openSet.get(0);\n for (Node node : openSet) {\n if (node.getCost(target) < next.getCost(target)) {\n next = node;\n }\n }\n// System.out.println(\"Moving to node: \" + current);\n current = next;\n }\n \n // Rebuild the path using the node parents\n path.add(new Pair<Integer, Integer>(curLocation.getX(), curLocation.getY()));\n while(current.getParent() != null) {\n \tcurrent = current.getParent();\n \tpath.add(0, new Pair<Integer, Integer>(current.getX(), current.getY()));\n }\n \n if (path.size() > 1) {\n \tpath.remove(0);\n }\n \n\t\treturn path;\n\t}", "public int shortestPath(Village startVillage, Village targetVillage) {\n// setting the initial point 's minimum distance to zera\n startVillage.setMinDistance(0);\n// accourting to bellman ford if there are n number of dots then n-1 iterations to be done to find the minimum distances of every dot from one initial dot\n int length = this.villageList.size();\n// looping n-1 times\n for (int i = 0; i < length - 1; i++) {\n// looping through all the roads and mark the minimum distances of all the possible points\n for (Road road : roadList) {\n\n\n// if the road is a main road then skip the path\n if (road.getWeight() == 900)\n continue; //why 900 ? : just a random hightest number as a minimum distance and same 900 is used as a mix number\n Village v = road.getStartVertex();\n Village u = road.getTargetVertex();\n// if the newly went path is less than the path it used to be the update the min distance of the reached vertex\n int newLengtha = v.getMinDistance() + road.getWeight();\n if (newLengtha < u.getMinDistance()) {\n u.setMinDistance(newLengtha);\n u.setPreviousVertex(v);\n }\n int newLengthb = u.getMinDistance() + road.getWeight();\n if (newLengthb < v.getMinDistance()) {\n v.setMinDistance(newLengthb);\n v.setPreviousVertex(v);\n }\n }\n }\n// finally return the minimum distance\n return targetVillage.getMinDistance();\n }", "public Path getShortestPath() {\n\t\tNodeRecord startRecord = new NodeRecord(start, null, 0.0f, (float) heuristic.estimate(start), Category.OPEN);\n\n\t\t// Initialize the open list\n\t\tPathFindingList open = new PathFindingList();\n\t\topen.addRecordByEstimatedTotalCost(startRecord);\n\t\trecords.set(Integer.parseInt(startRecord.node.id), startRecord);\n\t\tNodeRecord current = null;\n\t\t\n\t\t// Iterate through processing each node\n\t\twhile (!open.isEmpty()) {\n\t\t\t// Find smallest element in the open list using estimatedTotalCost\n\t\t\tcurrent = open.getSmallestNodeRecordByEstimatedTotalCost();\n\n\t\t\t// If its the goal node, terminate\n\t\t\tif (current.node.equals(end)) break;\n\n\t\t\t// Otherwise get its outgoing connections\n\t\t\tArrayList<DefaultWeightedEdge> connections = g.getConnections(current.node);\n\t\t\t\n\t\t\t// Loop through each connection\n\t\t\tfor (DefaultWeightedEdge connection : connections) {\n\t\t\t\t// Get the cost and other information for end node\n\t\t\t Vertex endNode = g.graph.getEdgeTarget(connection);\n\t\t\t int endNodeRecordIndex = Integer.parseInt(endNode.id);\n NodeRecord endNodeRecord = records.get(endNodeRecordIndex); // this is potentially null but we handle it\n\t\t\t\tdouble newEndNodeCost = current.costSoFar + g.graph.getEdgeWeight(connection);\n\t\t\t\tdouble endNodeHeuristic = 0;\n\t\t\t\t\n\t\t\t\t// if node is closed we may have to skip, or remove it from closed list\t\n\t\t\t\tif( endNodeRecord != null && endNodeRecord.category == Category.CLOSED ){ \n\t\t\t\t\t// Find the record corresponding to the endNode\n\t\t\t\t\tendNodeRecord = records.get(endNodeRecordIndex);\n\n\t\t\t\t\t// If we didn't find a shorter route, skip\n\t\t\t\t\tif (endNodeRecord.costSoFar <= newEndNodeCost) continue;\n\n\t\t\t\t\t// Otherwise remove it from closed list\n\t\t\t\t\trecords.get(endNodeRecordIndex).category = Category.OPEN;\n\n\t\t\t\t\t// Use node's old cost values to calculate its heuristic to save computation\n\t\t\t\t\tendNodeHeuristic = endNodeRecord.estimatedTotalCost - endNodeRecord.costSoFar;\n\n\t\t\t\t// Skip if node is open and we've not found a better route\n\t\t\t\t} else if( endNodeRecord != null && endNodeRecord.category == Category.OPEN ){ \n\t\t\t\t\t// Here we find the record in the open list corresponding to the endNode\n\t\t\t\t\tendNodeRecord = records.get(endNodeRecordIndex);\n\n\t\t\t\t\t// If our route isn't better, skip\n\t\t\t\t\tif (endNodeRecord.costSoFar <= newEndNodeCost) continue;\n\n\t\t\t\t\t// Use the node's old cost values to calculate its heuristic to save computation\n\t\t\t\t\tendNodeHeuristic = endNodeRecord.estimatedTotalCost - endNodeRecord.costSoFar;\n\n\t\t\t\t// Otherwise we know we've got an unvisited node, so make a new record\n\t\t\t\t} else { // if endNodeRecord.category == Category.UNVISITED\n\t\t\t\t endNodeRecord = new NodeRecord();\n\t\t\t\t\tendNodeRecord.node = endNode;\n\t\t\t\t\trecords.set(endNodeRecordIndex, endNodeRecord);\n\n\t\t\t\t\t// Need to calculate heuristic since this is new\n\t\t\t\t\tendNodeHeuristic = heuristic.estimate(endNode);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t// We're here if we need to update the node\n\t\t\t\t// update the cost, estimate, and connection\n\t\t\t\tendNodeRecord.costSoFar = newEndNodeCost;\n\t\t\t\tendNodeRecord.edge = connection;\n\t\t\t\tendNodeRecord.estimatedTotalCost = newEndNodeCost + endNodeHeuristic;\n\n\t\t\t\t// Add it to the open list\n\t\t\t\tif ( endNodeRecord.category != Category.OPEN ) {\n\t\t\t\t\topen.addRecordByEstimatedTotalCost(endNodeRecord);\n\t\t\t\t\tendNodeRecord.category = Category.OPEN;\n\t\t\t\t\trecords.set(endNodeRecordIndex, endNodeRecord);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t// We’ve finished looking at the connections for\n\t\t\t// the current node, so add it to the closed list\n\t\t\t// and remove it from the open list\n\t\t\topen.removeRecord(current);\n\t\t\tcurrent.category = Category.CLOSED;\n\t\t\trecords.set(Integer.parseInt(current.node.id), current);\n\t\t}\n\t\t\n\t\t// We’re here if we’ve either found the goal, or\n\t\t// if we’ve no more nodes to search, find which.\n\t\tif (!current.node.equals(end)) {\n\t\t\t// Ran out of nodes without finding the goal, no solution\n\t\t\treturn null;\n\t\t} else {\n\t\t // Compile the list of connections in the path\n\t\t\tArrayList<DefaultWeightedEdge> path = new ArrayList<>();\n\n\t\t\twhile (!current.node.equals(start)) {\n\t\t\t\tpath.add(current.edge);\n\t\t\t\t// Set current (NodeRecord) to is source.\n\t\t\t\tcurrent = records.get( Integer.parseInt(g.graph.getEdgeSource(current.edge).id) );\n\t\t\t}\n\n\t\t\t// Reverse the path, and return it\n\t\t\tCollections.reverse(path);\n\t\t\treturn new Path(g, path);\n\t\t}\n\n\t}", "private Queue<Position> pathToClosest(MyAgentState state, Position start, int goal) {\n\t\tQueue<Position> frontier = new LinkedList<Position>();\n\t\tSet<String> enqueued = new HashSet<String>();\n\t\tMap<Position, Position> preceedes = new HashMap<Position, Position>();\n\t\tfrontier.add(start);\n\t\tenqueued.add(start.toString());\n\n\t\twhile (!frontier.isEmpty()) {\n\t\t\tPosition pos = frontier.remove();\n\t\t\tif (state.getTileData(pos) == goal) {\n\t\t\t\treturn toQueue(preceedes, pos, start);\n\t\t\t}\n\t\t\t\n\t\t\tfor (Position neighbour : pos.neighbours()) {\n\t\t\t\tif (!enqueued.contains(neighbour.toString()) && state.getTileData(neighbour) != state.WALL) {\n\t\t\t\t\tpreceedes.put(neighbour, pos);\n\t\t\t\t\tfrontier.add(neighbour);\n\t\t\t\t\tenqueued.add(neighbour.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Stack<Point> shortestPath() {\n\t\tresetVisited();\n\t\tStack <Point> shortestPath = new Stack<Point>();\n\t\tprev = new HashMap<Point,Point>();\n\t\tCompass[] direction = Compass.values();\n\t\tQueue <Point> path = new LinkedList<Point>();\n\t\tpath.add(playerStart);\n\t\twhile(!path.isEmpty()) {\n\t\t\tPoint current = path.poll();\n\t\t\tfor (Compass pointing: direction) {\n\t\t\t\tif (current.equals(goal)) {\n\t\t\t\t\tshortestPath.push(current);\n\t\t\t\t\twhile (prev.containsKey(shortestPath.peek()) && !shortestPath.peek().equals(playerStart)){\n\t\t\t\t\t\tshortestPath.push(prev.get(shortestPath.peek()));\n\t\t\t\t\t}\n\t\t\t\t\treturn shortestPath;\n\t\t\t\t}\n\t\t\t\tint nextW = (int)current.getX() + pointing.mapX;\n\t\t\t\tint nextH = (int)current.getY() + pointing.mapY;\n\t\t\t\tPoint nextPoint = new Point(nextW, nextH);\n\t\t\t\tif (arrayBounds(nextW, width) && arrayBounds (nextH, height) && maze[nextW][nextH] == 0 && !visited.contains(nextPoint)) {\n\t\t\t\t\tpath.add(nextPoint);\n\t\t\t\t\tvisited.add(nextPoint);\n\t\t\t\t\tprev.put(nextPoint, current);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn shortestPath;\t\t\n\t}", "private void updateBest() {\n if (bestTourOrder == null) {\n bestTourOrder = ants.get(0).trail;\n bestTourLength = ants.get(0)\n .trailLength(graph);\n }\n for (Ant a : ants) {\n if (a.trailLength(graph) > bestTourLength) {\n bestTourLength = a.trailLength(graph);\n bestTourOrder = a.trail.clone();\n }\n }\n\n\n }", "public Fruit getnearFruit(boolean fast, int src){\n Iterator<Fruit> fruitsIter = allFruits.iterator();\n Graph_Algo algorithms = new Graph_Algo(Graph);\n node_data src_node = Graph.getNode(src);\n\n\n if (fruitsIter.hasNext()){\n\n Fruit near = fruitsIter.next();\n edge_data near_e = edgeOfFruit(near.getId());\n\n while (fruitsIter.hasNext()){\n Fruit current_fruit = fruitsIter.next();\n edge_data current_edge = edgeOfFruit(current_fruit.getId());\n\n double dist1 = algorithms.shortestPathDist(src, near_e.getDest());\n double dist2 = algorithms.shortestPathDist(src, current_edge.getDest());\n\n if (fast && (dist1 > dist2) ){\n near = current_fruit;\n }else{\n double nearFToSrc = near.getLocation().distance2D(src_node.getLocation());\n double currentFToSrc = current_fruit.getLocation().distance2D(src_node.getLocation());\n if (currentFToSrc < nearFToSrc){\n near = current_fruit;\n }\n }\n\n }\n return near;\n }\n return null;\n }", "public List<Node> findPath(Vector2i start, Vector2i goal) {\n\t\tList<Node> openList = new ArrayList<Node>(); //All possible Nodes(tiles) that could be shortest path\n\t\tList<Node> closedList = new ArrayList<Node>(); //All no longer considered Nodes(tiles)\n\t\tNode current = new Node(start,null, 0, getDistance(start, goal)); //Current Node that is being considered(first tile)\n\t\topenList.add(current);\n\t\twhile(openList.size() > 0) {\n\t\t\tCollections.sort(openList, nodeSorter); // will sort open list based on what's specified in the comparator\n\t\t\tcurrent = openList.get(0); // sets current Node to first possible element in openList\n\t\t\tif(current.tile.equals(goal)) {\n\t\t\t\tList<Node> path = new ArrayList<Node>(); //adds the nodes that make the path \n\t\t\t\twhile(current.parent != null) { //retraces steps from finish back to start\n\t\t\t\t\tpath.add(current); // add current node to list\n\t\t\t\t\tcurrent = current.parent; //sets current node to previous node to strace path back to start\n\t\t\t\t}\n\t\t\t\topenList.clear(); //erases from memory since algorithm is finished, ensures performance is not affected since garbage collection may not be called\n\t\t\t\tclosedList.clear();\n\t\t\t\treturn path; //returns the desired result shortest/quickest path\n\t\t\t}\n\t\t\topenList.remove(current); //if current Node is not part of path to goal remove\n\t\t\tclosedList.add(current); //and puts it in closedList, because it's not used\n\t\t\tfor(int i = 0; i < 9; i++ ) { //8-adjacent tile possibilities\n\t\t\t\tif(i == 4) continue; //index 4 is the middle tile (tile player currently stands on), no reason to check it\n\t\t\t\tint x = (int)current.tile.getX();\n\t\t\t\tint y = (int)current.tile.getY();\n\t\t\t\tint xi = (i % 3) - 1; //will be either -1, 0 or 1\n\t\t\t\tint yi = (i / 3) - 1; // sets up a coordinate position for Nodes (tiles)\n\t\t\t\tTile at = getTile(x + xi, y + yi); // at tile be all surrounding tiles when iteration is run\n\t\t\t\tif(at == null) continue; //if empty tile skip it\n\t\t\t\tif(at.solid()) continue; //if solid cant pass through so skip/ don't consider this tile\n\t\t\t\tVector2i a = new Vector2i(x + xi, y + yi); //Same thing as node(tile), but changed to a vector\n\t\t\t\tdouble gCost = current.gCost + (getDistance(current.tile, a) == 1 ? 1 : 0.95); //*calculates only adjacent nodes* current tile (initial start is 0) plus distance between current tile to tile being considered (a)\n\t\t\t\tdouble hCost = getDistance(a, goal);\t\t\t\t\t\t\t\t// conditional piece above for gCost makes a more realist chasing, because without it mob will NOT use diagonals because higher gCost\n\t\t\t\tNode node = new Node(a, current, gCost, hCost);\n\t\t\t\tif(vecInList(closedList, a) && gCost >= node.gCost) continue; //is node has already been checked \n\t\t\t\tif(!vecInList(openList, a) || gCost < node.gCost) openList.add(node);\n\t\t\t}\n\t\t}\n\t\tclosedList.clear(); //clear the list, openList will have already been clear if no path was found\n\t\treturn null; //a default return if no possible path was found\n\t}", "private void findBestPath(int start){\n\t\tint n = this.getDimension(); // for readability\n\t\tint lastCity, minDist = 0, moment = 0;\n\t\t\n\t\tthis.path = new int[this.getDimension() + 1];\n\t\tthis.visited = 0; \n\t\t\n\t\tsetAllUnvisited();\n\t\t\n\t\tvisitCity(moment, start); // visits the first city in time 0\n\t\tlastCity = start;\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + this.visited);\n\t\t// Repeats until all cities were visited\n\t\twhile(visited < n){\n//\t\t\tSystem.out.println(\"LC:\" + lastCity + \" MD:\" + minDist + \" M:\" + moment);\n\t\t\tmoment++;\n\t\t\t\n\t\t\t// Finds the closest city\n\t\t\tint closest = -1, closestDist = -1;\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\tif(!wasVisited(i)){\n\t\t\t\t\tif(dist(lastCity, i) < closestDist || closestDist == -1){ // If it's the first iteration or found a closer city\n\t\t\t\t\t\tclosest = i;\n\t\t\t\t\t\tclosestDist = dist(lastCity, closest);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Updates distance\n\t\t\tminDist += dist(lastCity, closest);\n\t\t\t\n\t\t\t// Visits the closest city\n\t\t\tvisitCity(moment, closest);\n\t\t\tlastCity = closest;\n//\t\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + minDist);\n\t\t\t\n\t\t}\n\t\t\n\t\t// Returns to the first city\n\t\tvisitCity(moment + 1, start);\n\t\tminDist += dist(lastCity, start);\n\t\t\n\t\tif(minDist < this.totalDistance || this.totalDistance == -1){\n\t\t\tthis.totalDistance = minDist;\n\t\t\tthis.bestPath = this.path.clone();\n\t\t}\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" -----> \" + minDist);\n\t}", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "@Nullable\n private NodeWithCost<V, A> findShortestPath(@Nonnull DirectedGraph<V, A> graph,\n V start, V goal, @Nonnull ToDoubleFunction<A> costf) {\n PriorityQueue< NodeWithCost<V, A>> frontier = new PriorityQueue<>(61);\n Map<V, NodeWithCost<V, A>> frontierMap = new HashMap<>(61);\n // Size of explored is the expected number of nextArrows that we need to explore.\n Set<V> explored = new HashSet<>(61);\n return doFindShortestPath(start, frontier, frontierMap, goal, explored, graph, costf);\n }", "public PuzzleState getStateWithShortestPath();", "@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }", "private void findPath2(List<Coordinate> path) {\n List<Integer> cost = new ArrayList<>(); // store the total cost of each path\n // store all possible sequences of way points\n ArrayList<List<Coordinate>> allSorts = new ArrayList<>();\n int[] index = new int[waypointCells.size()];\n for (int i = 0; i < index.length; i++) {// generate the index reference list\n index[i] = i;\n }\n permutation(index, 0, index.length - 1);\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n for (int[] ints1 : allOrderSorts) {\n List<Coordinate> temp = getOneSort(ints1, waypointCells);\n temp.add(0, o1);\n temp.add(d1);\n int tempCost = 0;\n for (int i = 0; i < temp.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = temp.get(i);\n graph.dijkstra(start);\n Coordinate end = temp.get(i + 1);\n graph.printPath(end);\n tempCost = tempCost + graph.getPathCost(end);\n if (graph.getPathCost(end) == Integer.MAX_VALUE) {\n tempCost = Integer.MAX_VALUE;\n break;\n }\n }\n cost.add(tempCost);\n allSorts.add(temp);\n }\n }\n }\n System.out.println(\"All sorts now have <\" + allSorts.size() + \"> items.\");\n List<Coordinate> best = allSorts.get(getMinIndex(cost));\n generatePath(best, path);\n setSuccess(path);\n }", "PrioritizedMove getBestMoveFor(int player, int desiredLength);", "public static void getShortestPath()\r\n\t{\r\n\t\tScanner scan = new Scanner(System.in); //instance for input declared\r\n\t\tSystem.out.print(\"\\nPlease enter the Source node for shortest path: \");\r\n\t\tint src = scan.nextInt() - 1;\r\n\t\twhile(src < 0 || src > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered source node is out of range, please enter again: \"); // Printing error\r\n\t\t\tsrc = scan.nextInt() - 1;\t//re-input source\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.print(\"Please enter the destination node for shortest path: \");\r\n\t\tint dest = scan.nextInt() - 1;\r\n\t\twhile(dest < 0 || dest > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered destination node is out of range, please enter again: \"); // Printing error\r\n\t\t\tdest = scan.nextInt() - 1;\t//re-input destination\r\n\t\t}\r\n\t\t\r\n\t\tconnectNetwork(src, dest, true);\r\n\t}", "private void findSmallestCost() {\n int best = 0;\n fx = funFitness[0];\n for (int i = 1; i < population; i++) {\n if (funFitness[i] < fx) {\n fx = funFitness[i];\n best = i;\n }\n }\n //System.arraycopy(currentPopulation[best], 0, bestSolution, 0, dimension);\n copy(bestSolution, currentPopulation[best]);\n }", "public MapLocation findNearestAction() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestHelp = findNearestHelp();\n MapLocation nearestArchon = findNearestArchon();\n\n if (nearestArchon == null && nearestHelp == null) {\n return rc.getInitialArchonLocations(rc.getTeam().opponent())[0]; // when no target is known, go to enemy archon initial position\n } else if (nearestArchon == null) { // when some of the targets is not present, just return the other one\n return nearestHelp; // is not null\n } else if (nearestHelp == null) {\n return nearestArchon; // is not null\n }\n\n if (origin.distanceSquaredTo(nearestHelp) < origin.distanceSquaredTo(nearestArchon)) {\n return nearestHelp;\n } else {\n return nearestArchon;\n }\n }", "Move getBestMove() {\n //System.out.println(\"AI chooses: \" + m.toString());\n return moves.get((int) (Math.random() * moves.size()));\n }", "public Queue<Station> approxShortestPath(Station start, Station end)\n {\n //Create a hash from station IDs to extra data needed for this algorithm.\n HashMap<String, ApproxSearchExtra> station_extras =\n new HashMap<String, ApproxSearchExtra>();\n for (Station station : getStations())\n station_extras.put(station.getId(), new ApproxSearchExtra());\n\n HashSet<Station> closed = new HashSet<Station>();\n HashSet<Station> open = new HashSet<Station>();\n open.add(start);\n\n while (open.size() > 0)\n {\n //Current is the item in the open set with the lowest estimated cost.\n Station current = null;\n ApproxSearchExtra current_extra = null;\n for (Station element : open)\n {\n if (current == null && current_extra == null)\n {\n current = element;\n current_extra = station_extras.get(element.getId());\n }\n else\n {\n ApproxSearchExtra extra = station_extras.get(element.getId());\n if (extra.estimated_cost < current_extra.estimated_cost)\n {\n current = element;\n current_extra = extra;\n }\n }\n }\n\n //If the current station is the end station, then we're done.\n if (current == end)\n return buildApproxShortestPathResult(end, station_extras);\n\n //Station is no longer in the open set and is now in the closed set\n //because it was traversed.\n open.remove(current);\n closed.add(current);\n\n for (Station neighbour : getAdjacentStations(current))\n {\n //Do nothing if neighbour is already in the closed set.\n if (closed.contains(neighbour))\n continue;\n\n ApproxSearchExtra neighbour_extra =\n station_extras.get(neighbour.getId());\n\n //Cost of movement to this neighbour.\n float attempt_cost = current_extra.cost + current.distance(neighbour);\n\n //If not in the open set, add the neighbour to the open set so that it\n //will be traversed later.\n if (!open.contains(neighbour))\n open.add(neighbour);\n //If this path is more costly than another path to this station, then\n //this path cannot be optimal.\n else if (attempt_cost >= neighbour_extra.cost)\n continue;\n\n //This is now the best path to this neighbour. Store this information.\n neighbour_extra.came_from = current;\n neighbour_extra.cost = attempt_cost;\n neighbour_extra.estimated_cost = attempt_cost +\n neighbour.distance(end);\n }\n }\n\n return null;\n }", "private ProblemModel findCheapestNode(){\n\t\tProblemModel ret = unvisitedPM.peek();\n\t\t\n\t\tfor(ProblemModel p : unvisitedPM){ \n\t\t\t//f(s) = depth + cost to make this move\n\t\t\tif(p.getCost() + p.getDepth() <= ret.getCost() + ret.getDepth()) ret = p;\n\t\t}\n\t\tunvisitedPM.remove(ret);\n\t\treturn ret;\n\t}", "public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }", "@Override\n\tpublic Solution<TTPVariable> run(SingleObjectiveThiefProblem thief, IEvaluator evaluator, MyRandom rand) {\n\t\tTTPVariable var = TTPVariable.create(new TourOptimalFactory(thief).next(rand), Pack.empty());\n\t\tSolution<TTPVariable> currentBest = thief.evaluate(var);\n\t\t\n\n\t\twhile (evaluator.hasNext()) {\n\n\t\t\t// now take the tour and optimize packing plan\n\t\t\tSolution<Pack> nextPack = optPack(thief, evaluator, rand, currentBest.getVariable().getTour(), currentBest.getVariable().getPack());\n\t\t\t\n\t\t\tSolution<Tour> nextTour = optTour(thief, evaluator, rand, currentBest.getVariable().getTour(), nextPack.getVariable());\n\t\t\t\n\t\t\tTTPVariable next = TTPVariable.create(nextTour.getVariable(), nextPack.getVariable());\n\t\t\tSolution<TTPVariable> s = thief.evaluate(next);\n\t\t\t\n\t\t\t//System.out.println(nextPack);\n\t\t\t//System.out.println(currentBest);\n\t\t\t//System.out.println(\"----------------\");\n\t\t\t\n\t\t\t// update the best found solution\n\t\t\tif (SolutionDominator.isDominating(s, currentBest)) {\n\t\t\t\tcurrentBest = s;\n\t\t\t\t//System.out.println(\"YES\");\n\t\t\t}\n\t\t\tevaluator.notify(currentBest);\n\n\t\t}\n\n\t\treturn currentBest;\n\t}", "public BestPath getBestPath(String origin, String destination, FlightCriteria criteria, String airliner) {\r\n\t\tint originIndex = 0;\r\n\t\tif(airportNames.contains(origin)){\r\n\t\t\toriginIndex = airportNames.indexOf(origin);\r\n\t\t}\r\n\t\tint destinationIndex = 0;\r\n\t\tif(airportNames.contains(destination)){\r\n\t\t\tdestinationIndex = airportNames.indexOf(destination);\r\n\t\t}\r\n\t\tAirport start = allAirports.get(originIndex);\r\n\t\tAirport goal = allAirports.get(destinationIndex);\r\n\r\n\t\tPriorityQueue<Airport> queue = new PriorityQueue<Airport>();\r\n\t\r\n\t\tLinkedList<String> path = new LinkedList<String>();\r\n\r\n\t\tstart.setWeight(0);\r\n\t\tqueue.add(start);\r\n\t\tAirport current;\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\tcurrent = queue.poll();\r\n\t\t\t\r\n\t\t\tif(current.compareTo(goal) == 0) {\r\n\t\t\t\tdouble finalWeight = current.getWeight();\r\n\t\t\t\t\r\n\t\t\t\twhile(current.compareTo(start) != 0){\r\n\t\t\t\t\t\r\n\t\t\t\t\tpath.addFirst(current.getAirport());\r\n\t\t\t\t\tcurrent = current.getPrevious();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tpath.addFirst(start.getAirport());\r\n\t\t\t\tBestPath bestPath = new BestPath(path, finalWeight);\r\n\t\t\t\treturn bestPath;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent.visited = true;\r\n\t\t\tAirport neighbor = current;\r\n\t\t\tArrayList<Flight> currentFlights;\r\n\t\t\tfor (int i = 0; i < current.size(); i++){\r\n\t\t\t\tcurrentFlights = new ArrayList<Flight>();\r\n\t\t\t\tcurrentFlights = current.getOutgoingFlights();\r\n\t\t\t\tneighbor = currentFlights.get(i).getDestination();\r\n\t\t\t\tdouble neighborWeight = neighbor.getWeight();\r\n\t\t\t\tcurrentFlights.get(i).setWeight(criteria);\r\n\t\t\t\tdouble flightWeight = currentFlights.get(i).getFlightWeight();\r\n\t\t\t\tif((neighborWeight > (current.getWeight() + flightWeight)) && currentFlights.get(i).getCarrier() == airliner){\r\n\t\t\t\t\tqueue.add(neighbor);\r\n\t\t\t\t\tneighbor.setPrevious(current);\r\n\t\t\t\t\tneighbor.setWeight(current.getWeight() + flightWeight);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Test\n public void testShortestPath() {\n Pillar p = new Pillar(0, 0);\n Pillar q = new Pillar(0, 1);\n q.setPrevious(p);\n List<Pillar> path = MazeSolver.shortestPath(q);\n assertEquals(2, path.size());\n assertEquals(p, path.get(0));\n assertEquals(q, path.get(1));\n }", "public FishingRod getBestRod();", "public static Path findShortestPath(Unit unit, int x, int y, GameMap map, boolean theoretical)\n {\n if( null == unit || null == map || !map.isLocationValid(unit.x, unit.y) )\n {\n return null;\n }\n\n Path aPath = new Path(100);\n if( !map.isLocationValid(x, y) )\n {\n // Unit is not in a valid place. No path can be found.\n System.out.println(\"WARNING! Cannot find path for a unit that is not on the map.\");\n aPath.clear();\n return aPath;\n }\n\n int[][] costGrid = new int[map.mapWidth][map.mapHeight];\n for( int i = 0; i < map.mapWidth; i++ )\n {\n for( int j = 0; j < map.mapHeight; j++ )\n {\n costGrid[i][j] = Integer.MAX_VALUE;\n }\n }\n\n // Set up search parameters.\n SearchNode root = new SearchNode(unit.x, unit.y);\n costGrid[unit.x][unit.y] = 0;\n Queue<SearchNode> searchQueue = new java.util.PriorityQueue<SearchNode>(13, new SearchNodeComparator(costGrid, x, y));\n searchQueue.add(root);\n\n ArrayList<SearchNode> waypointList = new ArrayList<SearchNode>();\n\n // Find optimal route.\n while (!searchQueue.isEmpty())\n {\n // Retrieve the next search node.\n SearchNode currentNode = searchQueue.poll();\n\n // If this node is our destination, we are done.\n if( currentNode.x == x && currentNode.y == y )\n {\n // Add all of the points on the route to our waypoint list.\n while (currentNode.parent != null)\n {\n waypointList.add(currentNode);\n currentNode = currentNode.parent;\n }\n // Don't forget the starting node (no parent).\n waypointList.add(currentNode);\n break;\n }\n\n expandSearchNode(unit, map, currentNode, searchQueue, costGrid, theoretical);\n\n currentNode = null;\n }\n\n // Clear and Populate the Path object.\n aPath.clear();\n // We added the waypoints to the list from end to beginning, so populate the Path in reverse order.\n if( !waypointList.isEmpty() )\n {\n for( int j = waypointList.size() - 1; j >= 0; --j )\n {\n //System.out.println(\"Waypoint \" + waypointList.get(j).x + \", \" + waypointList.get(j).y + \" over \" + map.getEnvironment(waypointList.get(j).x, waypointList.get(j).y).terrainType);\n aPath.addWaypoint(waypointList.get(j).x, waypointList.get(j).y);\n }\n }\n\n return aPath;\n }", "@Override\r\n\t\tpublic Action BestMove(AI_Domain game) {\r\n\t\t\t return new Action(minimax(game,true,depth,true,null).getPath());\r\n\t\t}", "public TrainRoute calculateShortestRoute(Train train) {\n\t\tSet<Integer> allVertices = layout.vertexSet();\n\t\tHashSet<Integer> visitedNodes = new HashSet<Integer>(layout.vertexSet().size());\n\t\tdouble totalWeight = ((DefaultBlock)blockData.get(train.currentBlock)).blockLength - train.distanceTraveledOnBlock;\n\t\tInteger currentBlock = null;\n\t\tInteger destinationBlock = null;\n\t\tLinkedList<Integer> path = new LinkedList<Integer>();\n\t\tHashMap<LinkedList<Integer>, Double> allSimplePaths = new HashMap<LinkedList<Integer>, Double>();\n\t\tfor (Integer i : allVertices) {\n\t\t\tif (i.equals(train.currentBlock)) {\n\t\t\t\tcurrentBlock = i;\n\t\t\t}\n\t\t\tif (i.equals(train.destination)) {\n\t\t\t\tdestinationBlock = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfindSimplePaths(currentBlock, destinationBlock, totalWeight, path, allVertices, visitedNodes, allSimplePaths);\n\t\t// Create a route object for all of the paths\n\t\tLinkedList<TrainRoute> allTrainRoutes = new LinkedList<TrainRoute>();\n\t\tfor (LinkedList<Integer> p : allSimplePaths.keySet()) {\n\t\t\tDouble pathDistance = allSimplePaths.get(p);\n\t\t\tp.add(0, currentBlock);\n\t\t\tpathDistance += ((DefaultBlock)blockData.get(currentBlock)).blockLength;\n\t\t\tpathDistance += ((DefaultBlock)blockData.get(p.get(p.size()-1))).blockLength/2;\n\t\t\t// create the TrainRoute Object\n\t\t\tdouble trainSpeed = ((DefaultBlock)blockData.get(train.currentBlock)).speedLimit;\n\t\t\tif (train.maxSpeed < trainSpeed) {\n\t\t\t\ttrainSpeed = train.maxSpeed;\n\t\t\t}\n\t\t\tdouble authority = train.authority;\n\t\t\tif (authority > pathDistance) {\n\t\t\t\tauthority = pathDistance;\n\t\t\t}\n\n\t\t\tallTrainRoutes.add(new TrainRoute(lineName, train.currentBlock, p, trainSpeed, authority, pathDistance));\n\t\t}\n\t\tCollections.sort(allTrainRoutes);\n\t\tblockToControllerMap.get(currentBlock).addRoute(allTrainRoutes.get(0));\n\t\treturn allTrainRoutes.get(0);\n\t}", "public void findNearestDriver() {\n\t\tint currentDistance, driverX, driverY, pickupX, pickupY;\n\t\tpickupX = (int)this.currentRide.getPickup().getX();\n\t\tpickupY = (int)this.currentRide.getPickup().getY();\n\t\tfor(int i = 0; i < drivers.size(); i++) {\n\t\t\tdriverX = (int)this.drivers.get(i).getLocation().getX();\n\t\t\tdriverY = (int)this.drivers.get(i).getLocation().getY();\n\t\t\tcurrentDistance = (int) Math.sqrt(Math.pow((driverX - pickupX), 2) + Math.pow((driverY - pickupY),2));\n\t\t\tthis.drivers.get(i).setDistanceFromPassenger(currentDistance);\n\t\t}\n\t\tCollections.sort(this.drivers);\n\t\tif(this.drivers.get(0).getDistanceFromPassenger() == this.drivers.get(1).getDistanceFromPassenger()){\n\t\t\tif(drivers.get(0).getRating() < drivers.get(1).getRating()) {\n\t\t\t\tdrivers.set(0, drivers.get(1));\n\t\t\t}\n\t\t}\t\t\n\t}", "public Node selectNode(List<Node> nodes){\n float minCost = Integer.MAX_VALUE;\n Node bestNode = null;\n float costToStart = 0, totalCost = 0;\n\n for(Node n:nodes){\n costToStart = n.getCostEstimated();\n int distance = Math.abs(n.getX()-finish.getX())+Math.abs(n.getY()-finish.getY());\n totalCost = costToStart+distance;\n\n if(minCost>totalCost){\n minCost = totalCost;\n bestNode = n;\n }\n }\n return bestNode;\n }", "public abstract void makeBestMove();", "public Action getBestAction() {\n long startTime = System.currentTimeMillis();\n\n // Continue iterating through the search algorithm until the time limit\n // is reached\n while (System.currentTimeMillis() < startTime + timeLimit) {\n Node newNode = selectAndExpandNewNode();\n double randomPlayout = simulateRandomPlayout(newNode);\n backPropagate(newNode, randomPlayout);\n }\n\n // Technically this function will take us slightly over timeLimit, but\n // that's why a buffer is removed from timeLimit when passed to this\n // class\n return bestActionFromFinishedTree();\n }", "public void computeShortestPath() throws IllegalStateException;", "private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is this doing here???\n if (neighbors.isEmpty()){\n \n }\n \n // looping through to find distances from start to neighbors\n for (T neighbor : neighbors){ \n int neighborIndex = vertexIndex(neighbor); \n int d = distances[currentIndex] + getEdgeWeight(current, neighbor);\n \n if (d < distances[neighborIndex]){ // if this distance is less than previous distance\n distances[neighborIndex] = d;\n closestPredecessor[neighborIndex] = current; // now closest predecessor is current\n }\n }\n \n if (current.equals(end)){\n atEnd = true;\n }\n else{\n // finding unvisited node that is closest to start node\n T min = getMinUnvisited();\n if (min != null){\n unvisited.remove(min); // remove minimum neighbor from unvisited\n visited.add(min); // add minimum neighbor to visited\n current = min;\n }\n }\n }\n computePath();\n totalDistance = distances[vertexIndex(end)];\n }", "public List<Vertex> runTabuSearch() {\r\n\t\tBestPath = convertPath(ClothestPath.findCycle(this.vertexGraph, this.edgeGraph, this.isOriented));\r\n\t\tLastPath = new ArrayList<Vertex>(BestPath);\r\n\t\tint BestEval = fit(BestPath);\r\n\t\thistoBestPath.add(new ArrayList<Vertex>(BestPath));\r\n\r\n\t\tint iteration_actuel = 0;\r\n\t\twhile (iteration_actuel < this.numberIteration) {\r\n\t\t\tLastPath = newPath();\r\n\t\t\t\r\n\t\t\tif(LastPath.isEmpty()) {\r\n\t\t\t\titerationReal = iteration_actuel;\r\n\t\t\t\treturn BestPath;\r\n\t\t\t}\r\n\r\n\t\t\tif (fit(LastPath) < BestEval) {\r\n\t\t\t\tBestPath = new ArrayList<Vertex>(LastPath);\r\n\t\t\t\tBestEval = fit(LastPath);\r\n\t\t\t\thistoBestPath.add(new ArrayList<Vertex>(BestPath));\r\n\t\t\t}\r\n\r\n\t\t\titeration_actuel++;\r\n\t\t}\r\n\r\n\t\titerationReal = iteration_actuel;\r\n\t\treturn BestPath;\r\n\t}", "public void selectRouteChoice()\n\t{\n\t\tRoutePlanner planner = new RoutePlanner();\n\t\tthis.sequence = ap.listSequences.get(numTrips);\n\t\t// only minimisation\n\t\tif (ap.routeChoice.equals(\"DS\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AC\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"TS\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus only global landmarks\n\t\telse if (ap.routeChoice.equals(\"DG\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AG\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus local and (optionally) global landmarks\n\t\telse if (ap.routeChoice.contains(\"D\") && ap.routeChoice.contains(\"L\")) newPath = planner.roadDistanceSequence(sequence, ap);\n\t\telse if (ap.routeChoice.contains(\"A\") && ap.routeChoice.contains(\"L\")) newPath = planner.angularChangeBasedSequence(sequence, ap);\n\t\t// anything with regions and/or barriers, or just barriers\n\t\telse if (ap.routeChoice.contains(\"R\")) newPath = planner.regionBarrierBasedPath(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.contains(\"B\")) newPath = planner.barrierBasedPath(originNode, destinationNode, ap);\n\t}", "private PathCostFlow findCheapestPath(int start, int end, double max_flow) throws Exception {\n if (getNode(start) == null || getNode(end) == null\n || !getNode(start).isSource() || getNode(end).isSource()) {\n throw new IllegalArgumentException(\"start must be the index of a source and end must be the index of a sink\");\n }\n double amount = Math.min(Math.min(getNode(start).getResidualCapacity(),\n getNode(end).getResidualCapacity()), max_flow);\n\n boolean[] visited = new boolean[n];\n int[] parent = new int[n];\n for (int i = 0; i < n; i++) {\n parent[i] = -1;\n }\n double[] cost = new double[n];\n for (int i = 0; i < n; i++) {\n cost[i] = Integer.MAX_VALUE;\n }\n cost[start] = 0;\n\n PriorityQueue<IndexCostTuple> queue = new PriorityQueue<IndexCostTuple>();\n queue.add(new IndexCostTuple(start, 0));\n\n while (!queue.isEmpty()) {\n IndexCostTuple current = queue.poll();\n\n // we found the target node\n if (current.getIndex() == end) {\n ArrayList<Integer> path = new ArrayList<Integer>();\n path.add(new Integer(end));\n while (path.get(path.size() - 1) != start) {\n path.add(parent[path.get(path.size() - 1)]);\n }\n Collections.reverse(path);\n if ((path.get(0) != start) || (path.get(path.size() - 1) != end)) {\n throw new Exception(\"I fucked up coding Dijkstra's\");\n }\n return new PathCostFlow(path, cost[end], amount);\n }\n\n // iterate through all possible neighbors of the current node\n for (int i = 0; i < n; i++) {\n SingleEdge e = matrix[current.getIndex()][i];\n if ((!visited[i]) && (e != null)\n && (current.getCost() + e.getCost(amount) < cost[i])) {\n cost[i] = current.getCost() + e.getCost(amount);\n parent[i] = current.getIndex();\n\n // update the entry for this node in the queue\n IndexCostTuple newCost = new IndexCostTuple(i, cost[i]);\n queue.remove(newCost);\n queue.add(newCost);\n }\n }\n visited[current.getIndex()] = true;\n }\n\n return null; //the target node was unreachable\n }", "public ShortestPathFinder() {\r\n\t\t\r\n\t}", "List<V> getShortestPath(V vertex);", "public Move makeFirstMove(){\n bestWord = new ArrayList<>();\n getStartingWord( tray , bestWord, \"\", 0); //maxScore get's updated in here.\n if (maxScore == 0){ return null; }\n //right now the AI is dumb and always starts on the first tile.... this is only safe with boardSize/2 >= 7\n Move move =\n new Move(bestWord , Constants.BOARD_DIMENSIONS/2 ,\n Constants.BOARD_DIMENSIONS/2 - (bestWord.size() / 2) , true , maxScore , bot);\n //refillTray();\n return move;\n }", "Execution getFarthestDistance();", "GamePiece furthestPiece(GamePiece from, ArrayList<GamePiece> connect) {\n HashMap<GamePiece, Integer> dists = this.distanceMap(from);\n GamePiece currMax = from;\n int max = 0;\n for (GamePiece p : connect) {\n if (p.connectedToPower(from)) {\n if (dists.get(p) > max) {\n max = dists.get(p);\n currMax = p;\n }\n }\n }\n return currMax;\n }", "public Tours fittestTour(){\r\n\t\tTours fittest = tours[0];\r\n\t\t// Loops through indivuals to find best\r\n\t\tfor (int i = 1; i < sizePop(); i++){\r\n\t\t\tif(fittest.fitnessGet() <= tourGet(i).fitnessGet()){\r\n\t\t\t\tfittest = tourGet(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fittest;\r\n\t}", "public static void main (String[] args) {\n CampusGraph<String, String> cg = MarvelParser.buildGraph(\"marvel.tsv\");\n System.out.println(\"Hi! Welcome to Marvel Universe!\");\n System.out.println();\n System.out.println(\"You can find the closest path between any two heroes in all marvel comic books!\");\n System.out.println(\"Pleases type your heroes: \");\n Scanner input = new Scanner(System.in);\n\n boolean searched = false;\n while (!searched) {\n boolean firstSuccess = false;\n boolean secondSuccess = false;\n String hero1 = \"\";\n String hero2 = \"\";\n while (!firstSuccess) {\n System.out.println(\"Type your first hero: \");\n hero1 = input.nextLine();\n if (!cg.hasNode(hero1)) {\n System.out.println(\"Oops! It seems like your first hero is not a Marvel Hero :( \");\n System.out.println(\"Please type it again: \");\n } else {\n firstSuccess = true;\n }\n }\n if (firstSuccess) {\n while (!secondSuccess) {\n System.out.println(\"Type your second hero: \");\n hero2 = input.nextLine();\n if (!cg.hasNode(hero2)) {\n System.out.println(\"Oops! It seems like your second hero is not a Marvel Hero :( \");\n System.out.println(\"Please type it again: \");\n } else {\n secondSuccess = true;\n }\n }\n if (secondSuccess) {\n List<CampusGraph.Edges<String, String>> path = findPath(cg, hero1, hero2);\n System.out.println(\"Correct Heroes!\\n\");\n System.out.println(\"The shortest path from \" + hero1 + \" to \" + hero2 + \":\");\n if (path == null) {\n System.out.println(\"There is no connection between these two heroes.\");\n } else {\n String lastStart = hero1;\n for (CampusGraph.Edges<String, String> e : path) {\n System.out.println(lastStart + \" to \" + e.getEndTag() + \" via \" + e.getEdgeLabel());\n lastStart = e.getEndTag(); // update the last start each time\n }\n }\n searched = true;\n }\n }\n System.out.println();\n System.out.println(\"END. Thank you.\");\n }\n }", "@Override\n\tpublic Direction nextMove(State state)\n\t{\n\t\t\n\t\tthis.direction = Direction.STAY;\n\t\tthis.hero = state.hero();\n\t\tthis.position = new Point( this.hero.position.right, this.hero.position.left ); //x and y are reversed, really\n\t\t\n\t\tthis.pathMap = new PathMap( state, this.position.x, this.position.y );\n\n\t\t//find the richest hero\n\t\tHero richestHero = state.game.heroes.get(0);\n\t\tif( richestHero == this.hero ) { richestHero = state.game.heroes.get(1); } //just grab another hero if we are #0\n\t\t\n\t\tfor( Hero hero : state.game.heroes )\n\t\t{\n\t\t\tif( hero != this.hero && hero.gold > richestHero.gold )\n\t\t\t{\n\t\t\t\trichestHero = hero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get all interesting sites\n\t\tList<TileInfo> minesInRange = this.pathMap.getSitesInRange( TileType.FREE_MINE, 20 );\t//mines in vicinity\n\t\tList<TileInfo> takenMinesInRange = this.pathMap.getSitesInRange( TileType.TAKEN_MINE, (100-richestHero.life)/2 );\t//mines in vicinity\n\t\tList<TileInfo> pubsInRange = this.pathMap.getSitesInRange( TileType.TAVERN, (int)(Math.pow(100-this.hero.life,2)*state.game.board.size/5000) );\t\t//pubs in vicinity\n\t\t\n\t\t//first visit pubs (apparently we need it)\n\t\tif( pubsInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( pubsInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit the mines\n\t\telse if( minesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( minesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit taken mines\n\t\telse if( takenMinesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( takenMinesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then hunt for players\n\t\telse\n\t\t{\n\t\t\t//kill the richest hero! (but first full health)\n\t\t\tif( this.hero.life > 85 )\n\t\t\t{\n\t\t\t\tthis.direction = this.pathMap.getDirectionTo( richestHero.position.right, richestHero.position.left );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//run away!!!\n\t\t\t\tthis.direction = intToDir( (int)(Math.random()*4) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//VisualPathMap.getInstance( pathMap );\n\t\t\n\t\treturn this.direction;\n\t}", "public void shortestPathList() {\n Cell cell = maze.getGrid()[r - 1][r - 1];\n\n parents.add(cell);\n\n while (cell.getParent() != null) {\n parents.add(cell.getParent());\n cell = cell.getParent();\n }\n\n Collections.reverse(parents);\n }", "void BackTrackBestPath(double[] delta_T_1,\n int[][] best,\n int[] best_path) {\n FindBestInLevel(delta_T_1, ((best_path)[T_-1]));\n for (int i = T_-2;i >= 0;i--) {\n (best_path)[i] = best[i+1][(best_path)[i+1]];\n }\n}", "private Cell getShortestPath(List<Cell> surroundingBlocks, int DestinationX, int DestinationY) {\n \n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell min = surroundingBlocks.get(0);\n int distMin = euclideanDistance(surroundingBlocks.get(0).x, surroundingBlocks.get(0).y, DestinationX, DestinationY);\n \n for(int i = 0; i < surroundingBlocks.size(); i++) {\n if (i==1) {\n min = surroundingBlocks.get(i);\n }\n if(distMin > euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY)) {\n distMin = euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY);\n min = surroundingBlocks.get(i);\n }\n }\n return min;\n }", "public MapLocation findNearestArchon() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestAction = null;\n float nearestDistance = 9999f;\n\n for (int i = 0; i < enemyArchonCount; ++i) {\n ArchonLocation loc = archonLocations[i];\n if (loc.isDead()) continue;\n float distance = loc.location.distanceSquaredTo(origin);\n if (nearestAction == null || distance < nearestDistance) {\n nearestAction = loc.location;\n nearestDistance = distance;\n }\n }\n\n return nearestAction;\n }", "@Override\n\tpublic void search() {\n\t\tpq = new IndexMinPQ<>(graph.getNumberOfStations());\n\t\tpq.insert(startIndex, distTo[startIndex]);\n\t\twhile (!pq.isEmpty()) {\n\t\t\tint v = pq.delMin();\n\t\t\tnodesVisited.add(graph.getStation(v));\n\t\t\tnodesVisitedAmount++;\n\t\t\tfor (Integer vertex : graph.getAdjacentVertices(v)) {\t\n\t\t\t\trelax(graph.getConnection(v, vertex));\n\t\t\t}\n\t\t}\n\t\tpathWeight = distTo[endIndex];\n\t\tpathTo(endIndex);\n\t}", "@Override\n public List<Node> findShortestPath(Node s, Node t)\n {\n nodeDists.clear(); //clear previously calculated distances\n\n recordNodeDistances(s, t); //record node distances to target\n\n LinkedList<Node> shortestPath = new LinkedList<Node>();\n\n shortestPath.addLast(s);\n\n boolean reachedEnd = false;\n\n if(s==t) reachedEnd = true; // \"That was easy\"\n\n while(!reachedEnd)\n {\n //get the neighbors from the most recent step on the path\n Collection<? extends Node> neighbors = shortestPath.getLast().getNeighbors();\n\n //minimum cost from neighbors\n Node minNode = null;\n\n for(Node n: neighbors)\n {\n if(minNode == null || nodeDists.get(n) < nodeDists.get(minNode))\n {\n minNode = n;\n\n if(nodeDists.get(n) == 0)\n {\n reachedEnd = true;\n break;\n }\n }\n }\n\n if(nodeDists.get(minNode) == Integer.MAX_VALUE) return null; //no path\n else shortestPath.addLast(minNode);\n }\n\n return shortestPath;\n }", "public LinkedList<Move> search1() {\r\n\r\n while (!paths.isEmpty()) {\r\n\r\n if (logger.isDebugEnabled())\r\n logger.debug(printPathCosts());\r\n\r\n LinkedList<Move> path = paths.first();\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"First path is \" + path);\r\n\r\n if (!paths.remove(path)) {\r\n throw new RuntimeException(\"Failed to remove path\");\r\n }\r\n\r\n Node currentNode = path.getLast().destination;\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Last site on path is \" + currentNode);\r\n\r\n if (closed.contains(currentNode)) {\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Site \" + currentNode + \" was closed.\");\r\n continue;\r\n }\r\n if (currentNode.isAtTarget(target)) {\r\n return path;\r\n }\r\n\r\n closed.add(currentNode);\r\n\r\n Move lastMove = path.getLast();\r\n if ( !(lastMove instanceof InitialMove) ) {\r\n currentNode = transformCurrentNode(lastMove);\r\n }\r\n\r\n Set<Move> successors = successors(currentNode);\r\n for (Move y : successors) {\r\n LinkedList<Move> successor = new LinkedList<Move>(path);\r\n y.pathCost = successor.getLast().pathCost + y.edgeCost;\r\n successor.add(y);\r\n paths.add(successor);\r\n if (logger.isDebugEnabled())\r\n logger.debug(\"Added successor \" + y);\r\n nodeExpansionCounter ++;\r\n }\r\n }\r\n\r\n return null;\r\n }", "private void recalcBestPath(int dest) {\n boolean changed;\n\n List<BGPPath> possList = this.inRib.get(dest);\n BGPPath currentBest = this.pathSelection(possList);\n BGPPath currentInstall = this.locRib.get(dest);\n\n /*\n * We need to handle advertisements in one of two cases a) we have found\n * a new best path and it's not the same as our current best path b) we\n * had a best path prior, but currently do not\n */\n changed = (currentBest != null && (currentInstall == null || !currentBest.equals(currentInstall)))\n || (currentBest == null && currentInstall != null);\n this.locRib.put(dest, currentBest);\n if (this.isWardenAS()) {\n if (currentBest == null) {\n this.routeStatusMap.put(dest, AS.RS_NULL);\n } else if (this.botSet == null) {\n this.routeStatusMap.put(dest, AS.RS_CLEAN);\n } else if (currentBest.containsAnyOf(this.botSet)) {\n this.routeStatusMap.put(dest, AS.RS_DIRTY);\n } else {\n this.routeStatusMap.put(dest, AS.RS_CLEAN);\n }\n }\n\n /*\n * If we have a new path, mark that we have a dirty destination\n */\n if (changed) {\n this.dirtyDest.add(dest);\n }\n }", "public void performMove() {\n\t\tfor (int x = 0; x <= size-1; x++)\n\t\t\tfor (int y = 0; y <= size-1; y++)\n\t\t\t\tlocalBoard[y][x] = 0;\n\t\t\n\t\t//reset the flag that indicates if a move has been found that decreases the heuristic\n\t\tfoundBetterMove = false;\n\t\t\n\t\t//fill in the appropriate heuristic values\n\t\tpopulateHillValues();\n\t\tArrayList<PotentialMove> myBestList = new ArrayList<PotentialMove>();\n\n\t\t//Find the square with the lowest heuristic value. this should really write the values to an array. \n\t\tint squareDifferential = -1;\n\t\t//String outValue = \"\";\n\t\tfor (int y = 0; y <= size-1; y++) {\n\t\t\tfor (int x = 0; x <= size-1; x++){\n\t\t\t\t//outValue = outValue + localBoard[y][x];\n\t\t\t\tif (squareDifferential < 0) //lowestSquareFound not found yet \n\t\t\t\t{\n\t\t\t\t\tif ((NQueens.queens[x] != y) && //set if the current square isn't already occupied by a queen\n\t\t\t\t\t\t\t(localBoard[NQueens.queens[x]][x] >= localBoard[y][x])) {\n\t\t\t\t\t\tif (localBoard[y][x] == localBoard[NQueens.queens[x]][x])\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) > squareDifferential) { // find the square with the largest differential in value from the queen in the column\n\t\t\t\t\tmyBestList.clear();\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t}\n\t\t\t\telse if (((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) == squareDifferential) && // the differential is equal to the current best differential\n\t\t\t\t\t\t(NQueens.queens[x] != y)) { // and isn't already occupied by a queen\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t}\n\t\t\t\t//else the square is higher, has a queen or isn't marginally better than the current queen's position in the row\n\t\t\t}\n\t\t\t//outValue = outValue + \"\\n\";\n\t\t}\n\t\t//JOptionPane.showMessageDialog(null, outValue);\n\t\t\n\t\tif (myBestList.isEmpty())\n\t\t\treturn;\n\t\t\n\t\tint listSize = myBestList.size();\n\t\tPotentialMove bestMove;\n\t\t\n\t\t//grab the non-Sideways moves first\n\t\tfor (int i = 0; i < listSize; i++) {\n\t\t\tif (!(myBestList.get(i).isSideways)) {\n\t\t\t\tbestMove = myBestList.get(i);\n\t\t\t\tfoundBetterMove = true;\n\t\t\t\tsidewaysMoves = 0;\n\t\t\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (sidewaysMoves > MAXSIDEWAYSMOVES) { // hit MAXSIDEWAYSMOVES consecutive sideways moves, mark as unsolvable\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//all available moves sideways moves, let's select one randomly\n\t\tRandom generator = new Random();\n\t\tint randomElement = generator.nextInt(listSize);\n\t\t\n\t\tbestMove = myBestList.get(randomElement);\n\t\tfoundBetterMove = true;\n\t\tsidewaysMoves++;\n\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t}", "public BestPath getBestPath(String origin, String destination, FlightCriteria criteria) {\r\n\t\tint originIndex = 0;\r\n\t\tif(airportNames.contains(origin)){\r\n\t\t\toriginIndex = airportNames.indexOf(origin);\r\n\t\t}\r\n\t\tint destinationIndex = 0;\r\n\t\tif(airportNames.contains(destination)){\r\n\t\t\tdestinationIndex = airportNames.indexOf(destination);\r\n\t\t}\r\n\t\tAirport start = allAirports.get(originIndex);\r\n\t\tAirport goal = allAirports.get(destinationIndex);\r\n\r\n\t\tPriorityQueue<Airport> queue = new PriorityQueue<Airport>();\r\n\t\tLinkedList<String> path = new LinkedList<String>();\r\n\r\n\t\tstart.setWeight(0);\r\n\t\tqueue.add(start);\r\n\t\tAirport current;\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\tcurrent = queue.poll();\r\n\t\t\tif(current.compareTo(goal) == 0) {\r\n\t\t\t\tdouble finalWeight = current.getWeight();\r\n\t\t\t\twhile(current.compareTo(start) != 0){\r\n\t\t\t\t\tpath.addFirst(current.getAirport());\r\n\t\t\t\t\tcurrent = current.getPrevious();\r\n\t\t\t\t}\r\n\t\t\t\tpath.addFirst(start.getAirport());\r\n\t\t\t\tBestPath bestPath = new BestPath(path, finalWeight);\r\n\t\t\t\treturn bestPath;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent.visited = true;\r\n\t\t\tAirport neighbor = current;\r\n\t\t\tArrayList<Flight> currentFlights;\r\n\t\t\tfor (int i = 0; i < current.size(); i++){\r\n\t\t\t\tcurrentFlights = new ArrayList<Flight>();\r\n\t\t\t\tcurrentFlights = current.getOutgoingFlights();\r\n\t\t\t\tneighbor = currentFlights.get(i).getDestination();\r\n\t\t\t\t\r\n\t\t\t\tdouble neighborWeight = neighbor.getWeight();\r\n\t\t\t\tcurrentFlights.get(i).setWeight(criteria);\r\n\t\t\t\tdouble flightWeight = currentFlights.get(i).getFlightWeight();\r\n\t\t\t\tif(neighborWeight > (current.getWeight() + flightWeight)){\r\n\t\t\t\t\tqueue.add(neighbor);\r\n\t\t\t\t\tneighbor.setPrevious(current);\r\n\t\t\t\t\tneighbor.setWeight(current.getWeight() + flightWeight);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public NewMove getBestMove(char player) {\r\n\t\tinitRootNode(player);\r\n\t\tcreateChildrenNodes(this.rootNode);\r\n\t\tNewMove bestMove = findBestMove(this.rootNode, player);\r\n\t\tbestMove.getUnit().show();\r\n\t\tSystem.out.println(bestMove.getUnit().getColor());\r\n\t\tSystem.out.println(bestMove.getUnit().getX());\r\n\t\treturn bestMove;\r\n\t}", "Execution getClosestDistance();", "public void shortestRouteDijkstra(){\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n\n shortestRouteDij(lm1, lm2);\n }", "Object getBest();", "private void identifySuccessors(T node, T goal, Set<T> goals, Queue<T> open, Set<T> closed, Map<T, T> parentMap,\n Map<T, Double> fMap, Map<T, Double> gMap, Map<T, Double> hMap) {\n // get all neighbors to the current node\n Collection<T> neighbors = findNeighbors(node, parentMap);\n\n double d;\n double ng;\n for (T neighbor : neighbors) {\n // jump in the direction of our neighbor\n T jumpNode = jump(neighbor, node, goals);\n\n // don't add a node we have already gotten to quicker\n if (jumpNode == null || closed.contains(jumpNode)) continue;\n\n // determine the jumpNode's distance from the start along the current path\n d = graph.getDistance(jumpNode, node);\n ng = gMap.getOrDefault(node, 0d) + d;\n\n // if the node has already been opened and this is a shorter path, update it\n // if it hasn't been opened, mark as open and update it\n if (!open.contains(jumpNode) || ng < gMap.getOrDefault(jumpNode, 0d)) {\n gMap.put(jumpNode, ng);\n hMap.put(jumpNode, graph.getHeuristicDistance(jumpNode, goal));\n fMap.put(jumpNode, gMap.getOrDefault(jumpNode, 0d) + hMap.getOrDefault(jumpNode, 0d));\n //System.out.println(\"jumpNode: \" + jumpNode.x + \",\" + jumpNode.y + \" f: \" + fMap.get(jumpNode));\n parentMap.put(jumpNode, node);\n\n if (!open.contains(jumpNode)) {\n open.offer(jumpNode);\n }\n }\n }\n }", "public int chooseElevator() {\n\t\tPair<Integer,Direction> eleLoc;\n\t\tHashMap<Integer, Pair<Integer, Direction>> mapClone = map.getElevatorsData(); //get map of up to date elevator locations\n\t\tint distance;\n\t\tint minDist=9999;\n\t\tint choice = -1;\n\t\t//iterate over all elevators in the system\n\t\tfor(int i = 1;i<=Constants.elevator;i++) {\n\t\t\teleLoc = mapClone.get(i);//get elevators current system\n\t\t\tdistance =calculateDistance(eleLoc);\n\t\t\t//System.out.println(\"Elevator \" + i + \" is \" + distance + \" away from next job\");\n\t\t\t//if distance is optimal\n\t\t\tif(distance >=0 && distance <minDist) {\n\t\t\t\tchoice = i;\n\t\t\t\tminDist = distance;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn choice;\n\t}", "private void restartAnts() {\r\n\t\t\r\n\t\tint ai;\r\n\t\t\r\n\t\tfor(ai = 0; ai < ants.length; ai++) {\r\n\t\t\tAnt ant = ants[ai];\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Tour Length of \" + ant.tourLength + \" vs best of \" + bestPathLength);\r\n\t\t\t\r\n\t\t\tif(ant.tourLength < bestPathLength) {\r\n\t\t\t\tbestPathLength = ant.tourLength;\r\n\t\t\t\tbestIndex = ai;\r\n\t\t\t\tfor(int pi = 0; pi < cities.length; pi++) // copy best path\r\n\t\t\t\t\tbestPath[pi] = ant.path[pi];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tant.reset(cities.length, ai);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public LinkedList<Node> shortestPath() throws PathNotFoundException {\n // Which strategy shall we use?\n ApplicationConfiguration config = ApplicationConfiguration.getInstance();\n switch(config.getCurrentSearchAlgorithm()) {\n case A_STAR:\n return aStarPath();\n case BFS:\n return bfsPath();\n case DFS:\n return dfsPath();\n default:\n return null;\n }\n }", "void shortestPath( final VertexType fromNode, Integer node );", "public Station getClosestStation(Actor actor)\n {\n Station with_lowest_distance = null;\n float lowest_distance = Float.MAX_VALUE;\n\n for (Station station : stations)\n {\n if (station == null)\n continue;\n\n float distance = station.distance(actor);\n if (distance < lowest_distance)\n {\n with_lowest_distance = station;\n lowest_distance = distance;\n }\n }\n\n return with_lowest_distance;\n }", "protected void targetClosestPlanet ()\r\n {\r\n double closestTargetDistance = getWorld().getWidth();\r\n double distanceToActor;\r\n\r\n // search the whole World for planets\r\n planets = (ArrayList)getWorld().getObjects(TargetPlanet.class);\r\n\r\n if (planets.size() > 0)\r\n {\r\n // Loop through the objects in the ArrayList to find the closest target\r\n for (TargetPlanet o : planets)\r\n {\r\n // Cast for use in generic method\r\n Actor a = (Actor) o;\r\n\r\n //if looking for nearest planet OR nearest unconquered planet and current planet is not on the same team\r\n if(findNearestPlanet || (!findNearestPlanet && !sameTeamCheck(o.getState())))\r\n {\r\n // Measure distance from me\r\n distanceToActor = SpaceWorld.getDistance(this, a);\r\n\r\n // if target planet closer than current target is found, target will change\r\n if (distanceToActor < closestTargetDistance)\r\n {\r\n planet = o;\r\n closestTargetDistance = distanceToActor;\r\n }\r\n }\r\n }\r\n }\r\n }", "public Move pickBestMove(Board board) {\n\t\treturn null;\n\t}", "public OtherAgent nearestAgent(RedAgent agent, Function<OtherAgent, Boolean> test)\n\t{\n\t\t// get a list of OtherAgents satisfying the test\n\t\tList<OtherAgent> ags = new ArrayList<OtherAgent>();\n\t\tfor (OtherAgent ag : agent.agents.values())\n\t\t{\n\t\t\tif (ag.position != null && test.apply(ag))\n\t\t\t{\n\t\t\t\tags.add(ag);\n\t\t\t}\n\t\t}\n\n\t\tif (ags.isEmpty()) return null;\n\n\t\t// get the shortest path to one of those agents\n\t\tLinkedList<String> path = shortestPath(agent.position, (id) -> {\n\t\t\tfor (OtherAgent ag : ags) if (ag.position.equals(id)) return true;\n\t\t\treturn false;\n\t\t});\n\n\t\tif (path == null) return null;\n\n\t\t// (arbitrarily) pick one agent that that path leads to\n\t\tfor (OtherAgent ag : ags)\n\t\t{\n\t\t\tif (path.isEmpty())\n\t\t\t{\n\t\t\t\tif (ag.position.equals(agent.position)) return ag;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (ag.position.equals(path.get(path.size() - 1))) return ag;\n\t\t\t}\n\t\t}\n\n\t\t// XXX shouldn't get here\n\t\tthrow new RuntimeException(\"failed to find nearest agent\");\n\t}", "public Iterable<Board> solution()\n {\n Iterable<Board> result = null;\n if (isSolvable()) {\n result = shortestPath;\n }\n return result;\n }", "public void findShortestPath(String startName, String endName) {\n checkValidEndpoint(startName);\n checkValidEndpoint(endName);\n\n Vertex<String> start = vertices.get(startName);\n Vertex<String> end = vertices.get(endName);\n\n double totalDist; // totalDist must be update below\n\n Map<Vertex<String>, Double> distance = new HashMap<>();\n Map<Vertex<String>, Vertex<String>> previous = new HashMap<>();\n Set<Vertex<String>> explored = new HashSet<>();\n PriorityQueue<VertexDistancePair> pq = new PriorityQueue<>();\n\n\n\n addPQ(distance, start, pq, previous);\n\n\n\n dijkstraHelper(pq, end, explored, distance, previous);\n\n\n\n\n\n\n totalDist = distance.get(end);\n List<Edge<String>> path = getPath(end, start);\n printPath(path, totalDist);\n }", "public synchronized void fullGamePath (Pacman pac, Fruit fru,int Index) { //this function take the path of every pacman and move the pucman to every fruit on uts path.\n\t\tdouble x,y,z; \n\t\tMyCoords coords=new MyCoords();\n\t\tdouble runTime=pac.getPath().get(Index).getRunTime(); //runTime\n\t\tdouble dist=coords.distance3d(pac.getPoint(),fru.getPoint()); //distance between the pacman and each fruit.\n\t\tPoint3D midvec=coords.vector3D(pac.getPoint(),fru.getPoint()); //the vector between pacman and fruit.\n\t\tif(runTime>0) { //check if the runTime is valid. \n\t\t\tx=midvec.x()/runTime; //Divide the vector lat, lon, and alt distance by the runTime to make a new distance unit.\n\t\t\ty=midvec.y()/runTime; \n\t\t\tz=midvec.z()/runTime; \n\t\t\twhile(dist>=pac.getRadius()) { //check if the distance is still bigger then the radius.\n\t\t\t\tmidvec=new Point3D(x,y,z); //this new vector is the pacman next step on the way to the fruit.\n\t\t\t\tpac.setPoint(coords.add(pac.getPoint(), midvec)); //we move the pacman to the vector coords after convert its to a GPS point.\n\t\t\t\tdist=coords.distance3d(pac.getPoint(), fru.getPoint()); //take the new distance\n\t\t\t\trunTime=dist/pac.getSpeed();//runtime -1 because we just make progress by one 1 second\n\t\t\t\tmidvec=coords.vector3D(pac.getPoint(), fru.getPoint()); //make new vector\n\t\t\t\tx=midvec.x()/runTime; //Divide the vector lat, lon, and alt distance by the runTime to make a new distance unit.\n\t\t\t\ty=midvec.y()/runTime;\n\t\t\t\tz=midvec.z()/runTime;\t\t\t\t\n\t\t\t\tMF.repaint();\n\t\t\t\trunTime--;\n\t\t\ttry {TimeUnit.MILLISECONDS.sleep(50);} \n\t\t\tcatch (InterruptedException e) {e.printStackTrace();}\n\t\t\t}\n\t\t}\n\t\tpac.addScore(pac.getPath().get(Index).getFruit().getWeight()); //the pacman arrived to the fruit and update its score\n\t}", "private List<BaseNode> findClosestNodes(BaseNode fromNode, List<BaseNode> toNodes,\n\t\t\tFloydWarshallShortestPaths<BaseNode, DefaultWeightedEdge> paths) {\n\t\t\n\t\tdouble shortestPath = 0;\n\t\tList<BaseNode> closestNodes = new ArrayList<>();\n\n\t\tfor (BaseNode toNode : toNodes) {\n\t\t\tGraphPath<BaseNode, DefaultWeightedEdge> path = paths.getPath(fromNode, toNode);\n\t\t\t// new closest found\n\t\t\tif ((shortestPath > path.getWeight() && path.getWeight() != 0) || shortestPath == 0) {\n\t\t\t\tshortestPath = path.getWeight();\n\t\t\t\tclosestNodes.clear();\n\t\t\t}\n\t\t\t// add closest to result list\n\t\t\tif (shortestPath != 0 && shortestPath == path.getWeight()) {\n\t\t\t\tclosestNodes.add(toNode);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn closestNodes;\n\t}", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "private void buildGraph(Target target) {\n Graph g = new Graph();\n\n //add the nodes to the graph\n for (int i = 0; i < vertices.size() ; i++) {\n if (vertices.get(i).getNeigbours().size() != 0) {\n Node d = new Node(\"\" + i);\n d.set_id(i);\n g.add(d);\n }\n }\n\n Node a = new Node(\"\" + (vertices.size() -1));\n a.set_id((vertices.size() -1));\n g.add(a);\n\n //add the edges\n for (int i = 0; i < vertices.size(); i++) {\n GraphNode curr = vertices.get(i);\n if (curr.getNeigbours().size() != 0 ) {\n for (GraphNode neighbour : curr.getNeigbours()) {\n g.addEdge(\"\" + i, \"\" + neighbour.getID(), curr.getPoint().distance2D(neighbour.getPoint()));\n }\n }\n }\n\n // find the minimums path to the fruit\n Graph_Algo.dijkstra(g, \"\"+ 0);\n Node b = g.getNodeByName(\"\" + (vertices.size()-1));\n ArrayList<String> shortestPath = b.getPath();\n target.setDistance(b.getDist());\n\n for (int i = 0 ;i < shortestPath.size() ; i++){\n String s = b.getPath().get(i);\n target.getPath().add(s);\n }\n\n targts.add(target);\n g.clear_meta_data();\n GraphNode.resetCounterId();\n Target.resetCounterId();\n\n if (target.getFruit().getID() != game.getFruits().get(game.getFruits().size()-1).getID()) {\n vertices.clear();\n }\n }", "public Location getFurthestMoveableLocation(Location otherLocation, Location currentLocation) {\n Location furthestLocation;\n List<Location> locations = getSurroundingFourLocations(currentLocation);\n List<Location> randomizedLocations = new LinkedList<Location>();\n\n while (!locations.isEmpty()) {\n int LOW = 0;\n int HIGH = locations.size();\n Random randomize = new Random();\n\n int randomIndex = randomize.nextInt(HIGH - LOW) + LOW;\n randomizedLocations.add(locations.remove(randomIndex));\n }\n\n furthestLocation = checkFurtherLocation(otherLocation, randomizedLocations.get(0), randomizedLocations.get(1));\n furthestLocation = checkFurtherLocation(otherLocation, furthestLocation, randomizedLocations.get(2));\n furthestLocation = checkFurtherLocation(otherLocation, furthestLocation, randomizedLocations.get(3));\n return furthestLocation;\n }", "private void calculateShortestRoute(String strSourceTerminal){\n\t\tshortestTravelTime = new HashMap<>();\n\n //stores parent of every terminal in shortest travel time\n parent = new HashMap<>();\n \n //heap + map data structure\n MinimumHeap<BaggageTerminal> minHeap = new MinimumHeap<>();\n\n //initialize all terminal with infinite distance from source terminal\n for(BaggageTerminal baggageTerminal : graph.getTerminals()){\n minHeap.add(Integer.MAX_VALUE, baggageTerminal);\n }\n \n BaggageTerminal sourceTerminal = graph.getTerminal(strSourceTerminal);\n \n //set distance of source terminal to itself 0\n minHeap.decrease(sourceTerminal, 0);\n\n //put it in map\n shortestTravelTime.put(sourceTerminal, 0);\n\n //source terminal parent is null\n parent.put(sourceTerminal, null);\n\n //iterate till heap is not empty\n while(!minHeap.empty()){\n //get the min value from heap node which has vertex and distance of that vertex from source vertex.\n MinimumHeap<BaggageTerminal>.Node heapNode = minHeap.extractMinNode();\n BaggageTerminal currentTerminal = heapNode.key;\n\n //update shortest distance of current vertex from source vertex\n shortestTravelTime.put(currentTerminal, heapNode.weight);\n\n //iterate through all connections of current terminal\n for(Connection connection : currentTerminal.getConnections()){\n\n //get the adjacent terminal\n BaggageTerminal adjacent = getConnectingTerminal(currentTerminal, connection);\n\n //if heap does not contain adjacent vertex means adjacent vertex already has shortest distance from source vertex\n if(!minHeap.containsData(adjacent)){\n continue;\n }\n\n //add distance of current vertex to edge weight to get distance of adjacent vertex from source vertex\n //when it goes through current vertex\n int newDistance = shortestTravelTime.get(currentTerminal) + connection.getWeight();\n\n //see if this above calculated distance is less than current distance stored for adjacent vertex from source vertex\n if(minHeap.getWeight(adjacent) > newDistance) {\n minHeap.decrease(adjacent, newDistance);\n parent.put(adjacent, currentTerminal);\n }\n }\n }\n return;\n }", "private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }", "@Test\n void testShortestPath(){\n weighted_graph g = new WGraph_DS();\n for(int i = 1; i <= 7; i++){\n g.addNode(i);\n }\n g.connect(1,2,20);\n g.connect(1,5,15);\n g.connect(2,3,20);\n g.connect(5,6,15);\n g.connect(3,4,20);\n g.connect(6,4,15);\n g.connect(1,7,2);\n g.connect(7,4,1);\n weighted_graph_algorithms ga = new WGraph_Algo();\n ga.init(g);\n LinkedList<node_info> expectedPath = new LinkedList<>(Arrays.asList(g.getNode(1),g.getNode(7),g.getNode(4)));\n assertNull(ga.shortestPath(1,10));\n assertEquals(expectedPath,ga.shortestPath(1,4));\n assertEquals(1,ga.shortestPath(1,1).size());\n }", "public String getShortestPath(int goal) throws Throwable {\n if (goal < 0) {\n return \"There is no path\";\n }\n Queue<Integer> stack = new Queue<>(new Integer[10]); \n int previous = path[goal];\n if (previous == -1) {\n return \"There is no path\";\n }\n while (previous != 0) {\n stack.push(previous);\n previous = path[previous];\n }\n String ret = \"0 > \";\n while (!stack.isEmpty()) {\n ret = ret + (stack.poll() + \" > \");\n }\n return \"\" + ret + goal;\n }", "public Node getBestSuccessor(){\n\t\t// Send false to the method to not save the neighbors.\n\t\treturn state.neighborWithlowestAttachNo(false);\n\t}", "void makeService(int loc_temp,int des_temp,ArrayList<Coordinate> path)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint last_direction = 0;\r\n\t\t\tint[] shortest_path = new int[6400];\r\n\t\t\tint j_current = loc_temp % 80;\r\n\t\t\tint i_current = loc_temp / 80;\r\n\t\t\tBFS.setShortest(des_temp,shortest_path,BFS.adj_const);\r\n\t\t\tint temp = shortest_path[loc_temp];\r\n\t\t\twhile(temp != -1)\r\n\t\t\t{\r\n\t\t\t\tint length_min = BFS.getShortest(temp, des_temp,BFS.adj_const);\r\n\t\t\t\tint direction = -1;\r\n\t\t\t\tint flow_min = Main.MAX_INT;\r\n\t\t\t\tif((i_current-1)>=0 && BFS.adj_const[(i_current-1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current-1][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current-1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 0;//up\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current-1][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif((i_current+1)<80 && BFS.adj_const[(i_current+1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current+1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 1;//down\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tif((j_current-1)>=0 && BFS.adj_const[i_current*80+j_current-1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current-1][0]<flow_min)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current-1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 2;//left\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current-1][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\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\tif((j_current+1)<80 && BFS.adj_const[i_current*80+j_current+1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][0]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current+1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 3;//right\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tLight light = Traffic.findLight(i_current,j_current);\r\n\t\t\t\tif(light != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tboolean first = true;\r\n\t\t\t\t\twhile(!leaveLight(light,last_direction,direction))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmeet_light = true;\r\n\t\t\t\t\t\tif(first)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Waiting at a traffic light\");\r\n\t\t\t\t\t\t\tfirst = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmeet_light = false;\r\n\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Going through a traffic light\");\r\n\t\t\t\t}\r\n\t\t\t\tswitch(direction)\r\n\t\t\t\t{\r\n\t\t\t\tcase 0 ://up\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current-1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current-1][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1 ://down\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current+1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 ://left\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current-1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current-1][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3 ://right\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current+1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tThread.sleep(100);\r\n\t\t\t\tlast_direction = direction;\r\n\t\t\t\tloc = new Coordinate(i_current,j_current);\r\n\t\t\t\tpath.add(loc);\r\n\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc);\r\n\t\t\t\ttemp = shortest_path[i_current*80+j_current];\r\n\t\t\t}\t\t\r\n\t\t\tSystem.out.println(\"Passenger\" + passenger.loc + passenger.des + \": Taxi-\" + id + \" arrives at \" + des);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Sorry to catch Exception!\");;\r\n\t\t}\r\n\t}", "public static <V> void printShortestPath(V value, Dictionary<V, DijkstraResult<V>> paths) {\n Enumeration<DijkstraResult<V>> elementos = paths.elements();\n while (elementos.hasMoreElements()) {\n DijkstraResult<V> aux = elementos.nextElement();\n if (!aux.getVertex().equals(value)) {\n String hilera = \"\";\n DijkstraResult<V> temp = aux;\n while (!temp.getVertex().equals(value)) {\n hilera = \"-\" + temp.getVertex() + hilera;\n temp = paths.get(temp.getPrecursor());\n }\n hilera = value + hilera;\n if (aux.getDistance() == Integer.MAX_VALUE - 1) {\n System.out.println(\"El camino mas corto entre \" + value + \" y \" + aux.getVertex() + \" es \" + hilera + \" con una distancia de infinito (no hay camino)\");\n } else {\n System.out.println(\"El camino mas corto entre \" + value + \" y \" + aux.getVertex() + \" es \" + hilera + \" con una distancia de: \" + aux.getDistance());\n }\n } else {\n System.out.println(\"El camino mas corto entre \" + value + \" y \" + value + \" es \" + value + \" con una distancia de: \" + aux.getDistance());\n }\n }\n }", "private int nextNode(int rid) {\n if (!my_game.getMy_game().isRunning()) {\n return -1;\n }\n Robot robot = my_game.getRobots().get(rid);\n List<node_data> tmp = robots_paths.get(rid);\n if (tmp.isEmpty()) {\n fruits_status.remove(rid);\n synchronized (my_game.getFruits()) {\n if (my_game.getFruits().size() > 0) {\n Fruit fruit = findClosestFruit(robot);\n tmp = algo_g.shortestPath(robot.getSrc(),fruit.getEdge().getSrc());\n node_data dest = my_game.getGraph().getNode(fruit.getEdge().getDest());\n tmp.add(dest);\n robots_paths.put(robot.getId(),tmp);\n fruits_status.put(rid,fruit);\n }\n }\n }\n\n node_data n = tmp.get(0);\n tmp.remove(0);\n return n.getKey();\n\n\n// for (int i = 0; i < tmp.size(); i++) {\n// node_data n = tmp.get(i);\n// tmp.remove(i);\n// if (n.getKey() == robot.getSrc())\n// continue;\n// return n.getKey();\n// }\n// return -1;\n }", "public List<String> computeBestPath(String source, String dest)\r\n {\r\n Vertex v;\r\n List<String>shortestPath = new LinkedList<String>();\r\n \r\n // First, relax all nodes\r\n computeAllPaths(source);\r\n \r\n // Then go through each one and return the path as a list of strings\r\n for (v= network_topology.get(dest); v != null; v = v.previous)\r\n { \r\n shortestPath.add(v.name);\r\n }\r\n \r\n Collections.reverse(shortestPath);\r\n \r\n // Clear the relaxed values so that they can be recalculated with each term\r\n clearPathData();\r\n \r\n return shortestPath;\r\n }", "@Override\n public Double calculateShortestPathFromSource(String from, String to) {\n Node source = graph.getNodeByName(from);\n Node destination = graph.getNodeByName(to);\n source.setDistance(0d);\n Set<Node> settledNodes = new HashSet<>();\n PriorityQueue<Node> unsettledNodes = new PriorityQueue<>(Comparator.comparing(Node::getDistance));\n unsettledNodes.add(source);\n while (unsettledNodes.size() != 0) {\n Node currentNode = unsettledNodes.poll();\n for (Map.Entry<Node, Double> adjacencyPair : currentNode.getAdjacentNodes().entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Double distance = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n calculateMinimumDistance(adjacentNode, distance, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return destination.getDistance() == Double.MAX_VALUE ? -9999d : destination.getDistance();\n }", "public Move makeSubsequentMove(){\n Move move = null;\n maxScore = 0;\n bestWord = new ArrayList<Tile>();\n for (Anchor anchor : findAnchors()){\n ArrayList<Tile> inputTiles = new ArrayList<Tile>(tray);\n inputTiles.add(anchor.anchorTile);\n findHighestScoringWord(inputTiles, new ArrayList<Tile>(), \"\", 0, anchor);\n }\n if (bestWord == null || bestWord.size() == 0){\n //should i have some kind of get new tray of tiles thing?\n return move;\n } else {\n int startCol;\n int startRow;\n if (currentAnchor.isAcross()){\n startCol = currentAnchor.col - getAnchorPosition(currentAnchor, bestWord);\n startRow = currentAnchor.row;\n } else {\n startCol = currentAnchor.col;\n startRow = currentAnchor.row - getAnchorPosition(currentAnchor, bestWord);\n }\n\n move = new Move(bestWord , startRow , startCol ,currentAnchor.isAcross(), maxScore , bot);\n //move.execute(Board?);\n }\n return move;\n }", "private Move getBestMove() {\r\n\t\tSystem.out.println(\"getting best move\");\r\n\t\tChessConsole.printCurrentGameState(this.chessGame);\r\n\t\tSystem.out.println(\"thinking...\");\r\n\t\t\r\n\t\tList<Move> validMoves = generateMoves(false);\r\n\t\tint bestResult = Integer.MIN_VALUE;\r\n\t\tMove bestMove = null;\r\n\t\t\r\n\t\tfor (Move move : validMoves) {\r\n\t\t\texecuteMove(move);\r\n\t\t\t//System.out.println(\"evaluate move: \"+move+\" =========================================\");\r\n\t\t\tint evaluationResult = -1 * negaMax(this.maxDepth,\"\");\r\n\t\t\t//System.out.println(\"result: \"+evaluationResult);\r\n\t\t\tundoMove(move);\r\n\t\t\tif( evaluationResult > bestResult){\r\n\t\t\t\tbestResult = evaluationResult;\r\n\t\t\t\tbestMove = move;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"done thinking! best move is: \"+bestMove);\r\n\t\treturn bestMove;\r\n\t}", "public ArrayList<Action> findShortestPath(int startX, int startY, int endX, int endY, int numKeys, boolean toUnknown){\n\t\t\tHashSet<SearchNode> visited = new HashSet<SearchNode>();\n\t\t\tHashSet<SearchNode> work = new HashSet<SearchNode>();\n\t\t\t\n\t\t\tSearchNode start = new SearchNode();\n\t\t\tstart.posX = startX;\n\t\t\tstart.posY = startY;\n\t\t\tstart.gScore = 0;\n\t\t\tif (toUnknown)\n\t\t\t\tstart.fScore = 0;\n\t\t\telse\n\t\t\t\tstart.fScore = Math.abs(startX - endX) + Math.abs(startY - endY);\n\t\t\tstart.keysLeft = numKeys;\n\t\t\tstart.cameFrom = null;\n\t\t\twork.add(start);\n\t\t\t\n\t\t\twhile(work.size() > 0){\n\t\t\t\tSearchNode current = findFirstNode(work);\n\t\t\t\tif (!toUnknown && current.posX == endX && current.posY == endY){\n\t\t\t\t\t//We've found the end node, reconstruct the path\n\t\t\t\t\treturn recoverPath(current);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (toUnknown && getElement(current.posX, current.posY) == BoxContainer.Unkown){\n\t\t\t\t\treturn recoverPath(current);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twork.remove(current);\n\t\t\t\tvisited.add(current);\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < 4; i++){\n\t\t\t\t\tint newX, newY;\n\t\t\t\t\tAction direction;\n\t\t\t\t\tif (i == 0){\n\t\t\t\t\t\tnewX = current.posX + 1;\n\t\t\t\t\t\tnewY = current.posY;\n\t\t\t\t\t\tdirection = Action.East;\n\t\t\t\t\t}\n\t\t\t\t\telse if (i == 1){\n\t\t\t\t\t\tnewX = current.posX;\n\t\t\t\t\t\tnewY = current.posY + 1;\n\t\t\t\t\t\tdirection = Action.North;\n\t\t\t\t\t}\n\t\t\t\t\telse if (i == 2){\n\t\t\t\t\t\tnewX = current.posX - 1;\n\t\t\t\t\t\tnewY = current.posY;\n\t\t\t\t\t\tdirection = Action.West;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnewX = current.posX;\n\t\t\t\t\t\tnewY = current.posY - 1;\n\t\t\t\t\t\tdirection = Action.South;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Check to make sure we can move into this node\n\t\t\t\t\tBoxContainer newBox = getElement(newX, newY);\n\t\t\t\t\tif (newBox == BoxContainer.Blocked || (!toUnknown && newBox == BoxContainer.Unkown))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif (newBox == BoxContainer.Door && current.keysLeft == 0){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint new_gScore = current.gScore + 1;\n\t\t\t\t\tif (newBox == BoxContainer.Door || newBox == BoxContainer.Key)\n\t\t\t\t\t\tnew_gScore++;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//try to find the node if we've already searched it, otherwise create it\n\t\t\t\t\tSearchNode newNode = findNodeWithCoords(visited, newX, newY);\n\t\t\t\t\tif (newNode == null){\n\t\t\t\t\t\tnewNode = findNodeWithCoords(work, newX, newY);\n\t\t\t\t\t\tif (newNode == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewNode = new SearchNode();\n\t\t\t\t\t\t\tnewNode.posX = newX;\n\t\t\t\t\t\t\tnewNode.posY = newY;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (visited.contains(newNode) && new_gScore >= newNode.gScore)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif (!work.contains(newNode) || new_gScore < newNode.gScore){\n\t\t\t\t\t\tnewNode.cameFrom = current;\n\t\t\t\t\t\tnewNode.direction = direction;\n\t\t\t\t\t\tnewNode.gScore = new_gScore;\n\t\t\t\t\t\tif (toUnknown)\n\t\t\t\t\t\t\tnewNode.fScore = newNode.gScore;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnewNode.fScore = newNode.gScore + Math.abs(newNode.posX - endX) + Math.abs(newNode.posY - endY);\n\t\t\t\t\t\tnewNode.keysLeft = current.keysLeft;\n\t\t\t\t\t\tif (newBox == BoxContainer.Door)\n\t\t\t\t\t\t\tnewNode.keysLeft--;\n\t\t\t\t\t\tif (newBox == BoxContainer.Key)\n\t\t\t\t\t\t\tnewNode.keysLeft++;\n\t\t\t\t\t\tif (!work.contains(newNode))\n\t\t\t\t\t\t\twork.add(newNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "private double getHeuristic(MapLocation current, MapLocation goal) {\n\t\treturn Math.max(Math.abs(current.x - goal.x), Math.abs(current.y - goal.y));\n\t}", "@Override\n\tpublic List<Path> getShortestRoute(Location src, Location dest, String edgePropertyName) {\n\t\t//array to keep track of visited vertexes\n\t\tboolean[] visited = new boolean[locations.size()];\n\t\t//array to store weights\n\t\tdouble[] weight = new double[locations.size()];\n\t\t//array to store predecessors\n\t\tLocation[] pre = new Location[locations.size()];\n\t\t//creates priority queue\n\t\tPriorityQueue<LocWeight> pq = new PriorityQueue<LocWeight>();\n\t\t// initializes every vertex misted mark to false\n\t\tfor (int i = 0; i < visited.length; i++)\n\t\t\tvisited[i] = false;\n\t\t// initializes every vertex's total weight to infinity\n\t\tfor (int i = 0; i < weight.length; i++)\n\t\t\tweight[i] = Double.POSITIVE_INFINITY;\n\t\t// initializes every vertex's predecessor to null\n\t\tfor (int i = 0; i < pre.length; i++)\n\t\t\tpre[i] = null;\n\t\t//sets start vertex's total weight to 0\n\t\tweight[locations.indexOf(src)] = 0;\n\t\t//insert start vertex in priroty queue\n\t\tpq.add(new LocWeight(src, 0.0));\n\t\t\n\t\tString[] edgeNames = getEdgePropertyNames();\n\t\tint indexProp = 0;\n\t\tfor (int i = 0; i < edgeNames.length; i++) {\n\t\t\tif (edgeNames[i].equalsIgnoreCase(edgePropertyName))\n\t\t\t\tindexProp = i;\n\t\t}\n\t\twhile (!pq.isEmpty()) {\n\t\t\tLocWeight c = pq.remove();\n\t\t\t//set C's visited mark to true\n\t\t\tvisited[locations.indexOf(c)] = true;\n\n\t\t\tList<Location> neighbors = getNeighbors(c.getLocation());\n\t\t\t//for each unvisited successor adjacent to C\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\n\t\t\t\tif (visited[locations.indexOf(neighbors.get(i))] == false) {\n\t\t\t\t\t//change successor's total weight to equal C's weight + edge weight from C to successor\n\t\t\t\t\tweight[locations.indexOf(neighbors.get(i))] = c.getWeight() + getEdgeIfExists(c.getLocation(), neighbors.get(i)).getProperties().get(indexProp);\n\t\t\t\t\tpre[locations.indexOf(neighbors.get(i))] = c.getLocation();\n\t\t\t\t\tLocWeight succ = new LocWeight(neighbors.get(i), weight[locations.indexOf(neighbors.get(i))]);\n\t\t\t\t\t//if successor is already in pq, update its total weight\n\t\t\t\t\tif (pq.contains(succ)) {\n\t\t\t\t\t\tpq.remove(succ);\n\t\t\t\t\t}\n\t\t\t\t\t//if not already there, add\n\t\t\t\t\tpq.add(succ);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t}\n\t\t\n\t\tArrayList<Path> path = new ArrayList<Path>();\n\t\t//find predecessor of each vertex and construct shortest path then return it\n\t\tLocation curr1 = dest;\n\t\twhile (pre[locations.indexOf(curr1)] != null) {\n\t\t\tpath.add(getEdgeIfExists(pre[locations.indexOf(curr1)], curr1));\n\t\t\tcurr1 = pre[locations.indexOf(curr1)];\n\t\t}\n\t\t//to show path from the start\n\t\tfor (int i = path.size() - 1; i >= 0; i--)\n\t\t\tpath.add(path.remove(i));\n\n\n\t\treturn path;\n\t}", "private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}", "@SuppressWarnings(\"unused\")\n private void notSoLazyPathfinder(final Coords dest, final MoveStepType type,\n final int timeLimit) {\n final long endTime = System.currentTimeMillis() + timeLimit;\n\n MoveStepType step = type;\n if (step != MoveStepType.BACKWARDS) {\n step = MoveStepType.FORWARDS;\n }\n\n final MovePathComparator mpc =\n new MovePathComparator(dest, step == MoveStepType.BACKWARDS);\n\n MovePath bestPath = clone();\n\n // A collection of paths we have already explored\n final HashMap<MovePath.Key, MovePath> discovered =\n new HashMap<MovePath.Key, MovePath>();\n discovered.put(bestPath.getKey(), bestPath);\n\n // A collection of hte possible next-moves\n final PriorityQueue<MovePath> candidates =\n new PriorityQueue<MovePath>(110, mpc);\n candidates.add(bestPath);\n\n boolean keepLooping = getFinalCoords().distance(dest) > 1;\n int loopcount = 0;\n\n // Keep looping while we have candidates to explore, and certain stop\n // conditions aren't met (time-limit, destination found, etc)\n while ((candidates.size() > 0) && keepLooping) {\n final MovePath candidatePath = candidates.poll();\n final Coords startingPos = candidatePath.getFinalCoords();\n final int startingElev = candidatePath.getFinalElevation();\n\n // Check to see if we have found the destination\n if (candidatePath.getFinalCoords().distance(dest) == 0) {\n bestPath = candidatePath;\n keepLooping = false;\n break;\n }\n\n // Get next possible steps\n final Iterator<MovePath> adjacent =\n candidatePath.getNextMoves(step == MoveStepType.BACKWARDS,\n step == MoveStepType.FORWARDS).iterator();\n // Evaluate possible next steps\n while (adjacent.hasNext()) {\n final MovePath expandedPath = adjacent.next();\n\n if (expandedPath.getLastStep().isMovementPossible(getGame(),\n startingPos, startingElev)) {\n\n if (discovered.containsKey(expandedPath.getKey())) {\n continue;\n }\n candidates.add(expandedPath);\n discovered.put(expandedPath.getKey(), expandedPath);\n // Make sure the candidate list doesn't get too big\n if (candidates.size() > 100) {\n candidates.remove(candidates.size() - 1);\n }\n }\n }\n // If we're doing a special movement, like charging or DFA, we will\n // have to take extra steps to see if we can finish off the move\n // this is because getNextMoves only considers turning and\n // forward/backward movement\n if (type == MoveStepType.CHARGE ||\n type == MoveStepType.DFA){\n MovePath expandedPath = candidatePath.clone();\n expandedPath.addStep(type);\n if (expandedPath.getLastStep().isMovementPossible(getGame(),\n startingPos, startingElev)) {\n\n if (discovered.containsKey(expandedPath.getKey())) {\n continue;\n }\n candidates.add(expandedPath);\n discovered.put(expandedPath.getKey(), expandedPath);\n // Make sure the candidate list doesn't get too big\n if (candidates.size() > 100) {\n candidates.remove(candidates.size() - 1);\n }\n }\n }\n\n\n loopcount++;\n if (((loopcount % 256) == 0) && keepLooping\n && (candidates.size() > 0)) {\n final MovePath front = candidates.peek();\n if (front.getFinalCoords().distance(dest) < bestPath\n .getFinalCoords().distance(dest)) {\n bestPath = front;\n }\n if (System.currentTimeMillis() > endTime) {\n keepLooping = false;\n System.out.println(\"Time limit reached searching \" +\n \"for path!\");\n }\n }\n } // end while\n //System.out.println(\"iteration count: \" + loopcount);\n if (getFinalCoords().distance(dest) > bestPath.getFinalCoords().distance(dest)) {\n // Make the path we found, this path.\n steps = bestPath.steps;\n }\n if (!getFinalCoords().equals(dest)) {\n lazyPathfinder(dest, type);\n }\n }", "private void findPath1(List<Coordinate> path) {\n\n // records the start coordinate in a specific sequence.\n ArrayList<Coordinate> starts = new ArrayList<>();\n // records the end coordinate in a specific sequence.\n ArrayList<Coordinate> ends = new ArrayList<>();\n // records the total cost of the path in a specific sequence.\n ArrayList<Integer> cost = new ArrayList<>();\n\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(o1);\n graph.printPath(d1);\n starts.add(o1);\n ends.add(d1);\n cost.add(graph.getPathCost(d1));\n }\n }\n int index = getMinIndex(cost);\n\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(starts.get(index));\n graph.printPath(ends.get(index));\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n setSuccess(path);\n }" ]
[ "0.7184688", "0.70780146", "0.63805777", "0.63105196", "0.6309875", "0.6255558", "0.6160665", "0.6149618", "0.61300796", "0.6089488", "0.6053086", "0.60138685", "0.5989306", "0.59640497", "0.5937861", "0.591326", "0.59128284", "0.5902536", "0.58804", "0.5833809", "0.58252853", "0.58216864", "0.58207995", "0.57914317", "0.5777558", "0.5766472", "0.57501996", "0.57476234", "0.5746036", "0.57353526", "0.5732145", "0.57165027", "0.57148916", "0.5712434", "0.5710413", "0.5639924", "0.56234294", "0.56141365", "0.55994546", "0.5590032", "0.55819595", "0.55682015", "0.5565488", "0.55549026", "0.5553929", "0.55435413", "0.55361277", "0.55330193", "0.5529628", "0.55219734", "0.54790694", "0.54726666", "0.54723394", "0.54721516", "0.5464472", "0.54608023", "0.5459479", "0.545596", "0.54383194", "0.54379505", "0.5434948", "0.54325557", "0.5422005", "0.5412822", "0.54122967", "0.5403755", "0.53958476", "0.53943795", "0.5388571", "0.53726953", "0.5350865", "0.5342109", "0.5330244", "0.5322704", "0.532235", "0.53067183", "0.5300243", "0.5296423", "0.5295827", "0.5292626", "0.5291466", "0.5285442", "0.5283739", "0.5271787", "0.5271416", "0.52709824", "0.5266752", "0.5265822", "0.5264343", "0.52626884", "0.5261852", "0.5255574", "0.52523667", "0.52518266", "0.5250655", "0.5248312", "0.5243707", "0.52430904", "0.52419925", "0.52381223" ]
0.6640544
2
find the best spot for all the robot to start.
public void changeRobot(int numR) { // game.addRobot(4); edge_data e=new EdgeData(); int numans=0; int i=0; double x=0; double y=Double.MAX_VALUE; while(i<numR) { double c=0; for(Fruit f: fru) { e=f.e; x=f.value/e.getWeight(); if(x>c && x<y) { c=x; numans=e.getSrc(); } } y=c; game.addRobot(numans); i++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}", "public void findRobotPosition(){\n targetVisible = false;\n for (VuforiaTrackable trackable : allTrackables) {\n if (((VuforiaTrackableDefaultListener)trackable.getListener()).isVisible()) {\n telemetry.addData(\"Visible Target\", trackable.getName());\n targetVisible = true;\n\n // Get the position of the visible target and put the X & Y position in visTgtX and visTgtY\n // We will use these for determining bearing and range to the visible target\n OpenGLMatrix tgtLocation = trackable.getLocation();\n VectorF tgtTranslation = tgtLocation.getTranslation();\n visTgtX = tgtTranslation.get(0) / mmPerInch;\n visTgtY = tgtTranslation.get(1) / mmPerInch;\n //telemetry.addData(\"Tgt X & Y\", \"{X, Y} = %.1f, %.1f\", visTgtX, visTgtY);\n\n // getUpdatedRobotLocation() will return null if no new information is available since\n // the last time that call was made, or if the trackable is not currently visible.\n OpenGLMatrix robotLocationTransform = ((VuforiaTrackableDefaultListener)trackable.getListener()).getUpdatedRobotLocation();\n if (robotLocationTransform != null) {\n lastLocation = robotLocationTransform;\n }\n break;\n }\n }\n\n // Provide feedback as to where the robot is located (if we know).\n if (targetVisible) {\n // express position (translation) of robot in inches.\n VectorF translation = lastLocation.getTranslation();\n //telemetry.addData(\"Pos (in)\", \"{X, Y, Z} = %.1f, %.1f, %.1f\",\n // translation.get(0) / mmPerInch, translation.get(1) / mmPerInch, translation.get(2) / mmPerInch);\n\n // express the rotation of the robot in degrees.\n Orientation rotation = Orientation.getOrientation(lastLocation, EXTRINSIC, XYZ, DEGREES);\n //telemetry.addData(\"Rot (deg)\", \"{Roll, Pitch, Heading} = %.0f, %.0f, %.0f\", rotation.firstAngle, rotation.secondAngle, rotation.thirdAngle);\n\n // Robot position is defined by the standard Matrix translation (x and y)\n robotX = translation.get(0)/ mmPerInch;\n robotY = translation.get(1)/ mmPerInch;\n\n // Robot bearing (in +vc CCW cartesian system) is defined by the standard Matrix z rotation\n robotBearing = rotation.thirdAngle;\n\n // target range is based on distance from robot position to the visible target\n // Pythagorean Theorum\n targetRange = Math.sqrt((Math.pow(visTgtX - robotX, 2) + Math.pow(visTgtY - robotY, 2)));\n\n // target bearing is based on angle formed between the X axis to the target range line\n // Always use \"Head minus Tail\" when working with vectors\n targetBearing = Math.toDegrees(Math.atan((visTgtY - robotY)/(visTgtX - robotX)));\n\n // Target relative bearing is the target Heading relative to the direction the robot is pointing.\n // This can be used as an error signal to have the robot point the target\n relativeBearing = targetBearing - robotBearing;\n // Display the current visible target name, robot info, target info, and required robot action.\n\n telemetry.addData(\"Robot\", \"[X]:[Y] (Heading) [%5.0fin]:[%5.0fin] (%4.0f°)\",\n robotX, robotY, robotBearing);\n telemetry.addData(\"Target\", \"[TgtRange] (TgtBearing):(RelB) [%5.0fin] (%4.0f°):(%4.0f°)\",\n targetRange, targetBearing, relativeBearing);\n }\n else {\n telemetry.addData(\"Visible Target\", \"none\");\n }\n }", "public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}", "public void initRobotPath() {\n for (int i = 0; i < my_game.getRobot_size(); i++) {\n Robot robot = my_game.getRobots().get(i);\n // Fruit fruit = my_game.getFruits().get(i);\n Fruit fruit = findClosestFruit(robot);\n List<node_data> tmp = algo_g.shortestPath(robot.getSrc(), fruit.getEdge().getDest());\n robots_paths.put(robot.getId(), tmp);\n fruits_status.put(robot.getId(),fruit);\n }\n }", "public MapLocation findNearestAction() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestHelp = findNearestHelp();\n MapLocation nearestArchon = findNearestArchon();\n\n if (nearestArchon == null && nearestHelp == null) {\n return rc.getInitialArchonLocations(rc.getTeam().opponent())[0]; // when no target is known, go to enemy archon initial position\n } else if (nearestArchon == null) { // when some of the targets is not present, just return the other one\n return nearestHelp; // is not null\n } else if (nearestHelp == null) {\n return nearestArchon; // is not null\n }\n\n if (origin.distanceSquaredTo(nearestHelp) < origin.distanceSquaredTo(nearestArchon)) {\n return nearestHelp;\n } else {\n return nearestArchon;\n }\n }", "@Override\n\tpublic BoardLocation findBestLocWhenStuck() {\n\t\treturn null;\n\t}", "public Point getRobotLocation();", "public TargetPointReport getTargetPoint(Translation robot) {\n TargetPointReport rv = new TargetPointReport();\n PathSegment currentSegment = segments.get(0);\n rv.closest_point = currentSegment.getClosestPoint(robot);\n rv.closest_point_distance = new Translation(robot, rv.closest_point).norm();\n rv.remaining_segment_distance = currentSegment.getRemainingDistance(rv.closest_point);\n rv.remaining_path_distance = rv.remaining_segment_distance;\n for (int i = 1; i < segments.size(); ++i) {\n rv.remaining_path_distance += segments.get(i).getLength();\n }\n rv.closest_point_speed = currentSegment\n .getSpeedByDistance(currentSegment.getLength() - rv.remaining_segment_distance);\n double lookahead_distance = getLookaheadForSpeed(rv.closest_point_speed) + rv.closest_point_distance;\n if (rv.remaining_segment_distance < lookahead_distance && segments.size() > 1) {\n lookahead_distance -= rv.remaining_segment_distance;\n for (int i = 1; i < segments.size(); ++i) {\n currentSegment = segments.get(i);\n final double length = currentSegment.getLength();\n if (length < lookahead_distance && i < segments.size() - 1) {\n lookahead_distance -= length;\n } else {\n break;\n }\n }\n } else {\n lookahead_distance += (currentSegment.getLength() - rv.remaining_segment_distance);\n }\n rv.max_speed = currentSegment.getMaxSpeed();\n rv.lookahead_point = currentSegment.getPointByDistance(lookahead_distance);\n rv.lookahead_point_speed = currentSegment.getSpeedByDistance(lookahead_distance);\n checkSegmentDone(rv.closest_point);\n return rv;\n }", "private Fruit findClosestFruit(Robot robot) {\n double min_dist = Double.MAX_VALUE;\n Fruit ans = null;\n for (int i = 0; i < my_game.getFruits().size(); i++) {\n Fruit fruit = my_game.getFruits().get(i);\n if(fruits_status.values().contains(fruit)) {\n continue;\n }\n double dist = algo_g.shortestPathDist(robot.getSrc(), fruit.getEdge().getSrc());\n if (dist < min_dist) {\n min_dist = dist;\n ans = fruit;\n }\n\n }\n\n return ans;\n }", "boolean findRobot();", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "Robot getRobot(Position pos);", "private static MapLocation getBestPastrLocNearMeBasedOnCowGrowthRate() {\n\t\tif (Clock.getRoundNum() < 1) {\n\t\t\tallCowGrowths = rc.senseCowGrowth();\t\t\t\n\t\t}\n\t\tMapLocation bestLocation = new MapLocation(curLoc.x, curLoc.y);\n\t\tdouble cowGrowthAmount = 0;\n\t\tMapLocation enemyHQLocation = rc.senseEnemyHQLocation();\n\t\tdouble distanceToEnemyHQ = curLoc.distanceSquaredTo(enemyHQLocation);\n\t\tfor (int i = 15; i-- > 0;) {\n\t\t\tfor (int j = 15; j-- > 0;) {\n\t\t\t\t// Check that it's in bounds\n\t\t\t\tif (curLoc.x - i + 8 >= 0 && curLoc.x - i + 8 < rc.getMapWidth() &&\n\t\t\t\t\tcurLoc.y - j + 8 >= 0 && curLoc.y - j + 8 < rc.getMapHeight()) {\n\t\t\t\t\tMapLocation mapLoc = new MapLocation(curLoc.x - i + 8, curLoc.y - j + 8);\n\t\t\t\t\tdouble currentLocGrowth = allCowGrowths[curLoc.x - i + 8][curLoc.y - j + 8];\n\n\t\t\t\t\t// Check that it's behind a perpendicular line and not void\n\t\t\t\t\t// and choose the best point.\n\t\t\t\t\tif (mapLoc.distanceSquaredTo(enemyHQLocation) < distanceToEnemyHQ &&\n\t\t\t\t\t\tcurrentLocGrowth > cowGrowthAmount && rc.senseTerrainTile(mapLoc) != TerrainTile.VOID) {\n\t\t\t\t\t\tcowGrowthAmount = currentLocGrowth;\n\t\t\t\t\t\tbestLocation = mapLoc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn bestLocation;\n\t}", "public Location computerMove()\n\t{\n\t\tArrayList<Location> possibleLocs = new ArrayList<Location>();\n\t\tfor (int row = 0; row < grid.length; row++)\n\t\t{\n\t\t\tfor (int col = 0; col < grid[0].length; col++)\n\t\t\t{\n\t\t\t\tLocation temp = new Location(row, col);\n\t\t\t\tif (!isOccupied(temp))\n\t\t\t\t\tpossibleLocs.add(temp);\n\t\t\t}\n\t\t}\n\t\tfor (int count = 0; count < possibleLocs.size(); count++)\n\t\t{\n\t\t\tif (checkWin(1, possibleLocs.get(count)))\n\t\t\t\treturn possibleLocs.get(count);\n\t\t\telse if (checkWin(0, possibleLocs.get(count)))\n\t\t\t\treturn possibleLocs.get(count);\n\t\t}\n\t\treturn possibleLocs.get((int) (Math.random() * possibleLocs.size()));\n\t}", "private void locate() {\n possibleLocations[0][0] = false;\n possibleLocations[0][1] = false;\n possibleLocations[1][0] = false;\n do {\n location.randomGenerate();\n } while (!possibleLocations[location.y][location.x]);\n }", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }", "public Robot choisitRobot() {\r\n List<Robot> indisponibles = new ArrayList<Robot>();\r\n List<Robot> disponibles = new ArrayList<Robot>();\r\n for (Robot robot : robots) {\r\n if (robot.initDep().isEmpty()) {\r\n indisponibles.add(robot);\r\n } else {\r\n disponibles.add(robot);\r\n }\r\n }\r\n for (Robot r : indisponibles) {\r\n System.out.println(r.toString() + \" ne peut pas se deplacer :(\");\r\n }\r\n int i = 1;\r\n for (Robot robot : disponibles) {\r\n System.out.println(\"\\t\" + i + \" : \" + robot.toString());\r\n i += 1;\r\n }\r\n i = secureInput(1, i - 1);\r\n if (disponibles.isEmpty()) {\r\n return null;\r\n }\r\n return disponibles.get(i - 1);\r\n }", "private void findBest()\r\n\t{\r\n\t\tint i;\r\n\t\tint size_mature_pool;\r\n\t\tint idx_current;//index of a currently checked genotype\r\n\t\tint num_errors;//number of errors of the current chromosome\r\n\t\tdouble min_error;//smallest error among the oldest genotypes\r\n\t\tVector<Integer> idx_oldest;\r\n\t\t\r\n\t\tsize_mature_pool = _pool_of_bests.size();\r\n\t\t\r\n\t\tidx_oldest = new Vector<Integer>(0, 1);\r\n\t\t\r\n\t\t//find all oldest genotypes\r\n\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t{\r\n\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\tif(num_errors>=_min_life_span)\r\n\t\t\t{\r\n\t\t\t\tidx_oldest.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//find the best oldest gentypes with a span above a threshold\r\n\t\t_best_idx = -1;\r\n\t\tif(idx_oldest.size() > 0)\r\n\t\t{\r\n\t\t\t_best_idx = idx_oldest.get(0);\r\n\t\t\tmin_error = _pool_of_bests.get(_best_idx)._error.getAverageError();\r\n\t\t\tfor(i=1; i<idx_oldest.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tidx_current = idx_oldest.get(i);\r\n\t\t\t\tif(min_error > _pool_of_bests.get(idx_current)._error.getAverageError())\r\n\t\t\t\t{\r\n\t\t\t\t\t_best_idx = idx_current;\r\n\t\t\t\t\tmin_error = _pool_of_bests.get(_best_idx)._error.getAverageError();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void initialSearch() {\n Kinematics k = getTrustedRobotKinematics();\n //logger.info(\"Kinematics position is \" + k.getPosition());\n\n // Set the default planner.\n setPlanner(PlannerType.TRAPEZOIDAL);\n\n // For gateway no zones were defined yet.\n m_robot.setCheckZones(false);\n\n // Do a preliminary trajectory in a lawnmower pattern.\n Point startPoint = k.getPosition();\n runTrajectory(startPoint, m_lawnmowerTrajectory);\n m_initialSearchDone = true;\n }", "public MineralLocation getMineralLocation(RobotOrientation orientation){\n MineralLocation absoluteLocation = MineralLocation.Center;\n //if tfod failed to init, just return center\n //otherwise, continue with detection\n if(!error) {\n List<Recognition> updatedRecognitions = tfod.getRecognitions();\n List<Recognition> filteredList = new ArrayList<Recognition>();\n\n /*for(Recognition recognition : updatedRecognitions){\n if(recognition.getHeight() < recognition.getImageHeight() * 3 / 11){\n filteredList.add(recognition);\n }\n }*/\n //Variabes to store two mins\n Recognition min1 = null;\n Recognition min2 = null;\n //Iterate through all minerals\n for(Recognition recognition : updatedRecognitions){\n double height = recognition.getHeight();\n if (min1 == null){\n min1 = recognition;\n }\n else if(min2 == null){\n min2 = recognition;\n }\n else if(height < min1.getHeight()){\n min1 = recognition;\n }\n else if(height < min2.getHeight()){\n min2 = recognition;\n }\n if (min1 != null && min2 != null){\n if(min1.getHeight() > min2.getHeight()){\n Recognition temp = min1;\n min1 = min2;\n min2 = temp;\n }\n }\n }\n filteredList.add(min1);\n filteredList.add(min2);\n int goldMineralX = -1;\n int silverMineral1X = -1;\n int silverMineral2X = -1;\n //Three Mineral Algorithm\n if(orientation == RobotOrientation.Center){\n for (Recognition recognition : filteredList) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n } else if (silverMineral1X == -1) {\n silverMineral1X = (int) recognition.getLeft();\n } else {\n silverMineral2X = (int) recognition.getLeft();\n }\n }\n if (goldMineralX != -1 && silverMineral1X != -1 && silverMineral2X != -1) {\n if (goldMineralX < silverMineral1X && goldMineralX < silverMineral2X) {\n return MineralLocation.Left;\n } else if (goldMineralX > silverMineral1X && goldMineralX > silverMineral2X) {\n return MineralLocation.Right;\n } else {\n return MineralLocation.Center;\n }\n }\n }\n else{//Two Mineral Algorithm\n //looks at each detected object, obtains \"the most\" gold and silver mineral\n float goldMineralConfidence = 0;\n float silverMineralConfidence = 0;\n for (Recognition recognition : updatedRecognitions) {\n String label = recognition.getLabel();\n float confidence = recognition.getConfidence();\n int location = (int) recognition.getLeft();\n if (label.equals(LABEL_GOLD_MINERAL)\n && confidence > goldMineralConfidence) {\n goldMineralX = location;\n goldMineralConfidence = confidence;\n } else if (label.equals(LABEL_SILVER_MINERAL)\n && confidence > silverMineralConfidence) {\n silverMineral1X = location;\n silverMineralConfidence = confidence;\n }\n }\n //using the two gold and silver object x locations,\n //obtains whether the gold mineral is on the relative left or the right\n boolean goldRelativeLeft;\n if (goldMineralX != -1 && silverMineral1X != -1) {\n if (goldMineralX < silverMineral1X) {\n goldRelativeLeft = true;\n } else {\n goldRelativeLeft = false;\n }\n // telemetry.addData(\"Relative\", goldRelativeLeft);\n //translates the relative location to an absolute location based off the orientation\n if (orientation == RobotOrientation.Left) {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Left;\n } else {\n absoluteLocation = MineralLocation.Center;\n }\n //telemetry.addData(\"orientation\",absoluteLocation);\n } else {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Center;\n } else {\n absoluteLocation = MineralLocation.Right;\n }\n // telemetry.addData(\"orientation\",\"fail\");\n }\n } //sees at least one silver (so not a reading from the wrong position, but no gold seen)\n else if(silverMineral1X != -1 && goldMineralX == -1){\n if(orientation == RobotOrientation.Left){\n absoluteLocation = MineralLocation.Right;\n }else if(orientation == RobotOrientation.Right){\n absoluteLocation = MineralLocation.Left;\n }\n }\n }\n\n }\n return absoluteLocation;\n }", "public MapLocation findNearestHelp() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestAction = null;\n float nearestDistance = 9999f;\n int roundNumber = rc.getRoundNum();\n\n for (int i = 0; i < MAX_HELP_NEEDED; ++i) {\n HelpNeededLocation loc = helpNeededLocations[i];\n if (loc.hasExpired(roundNumber)) continue;\n float distance = loc.location.distanceSquaredTo(origin);\n if (nearestAction == null || distance < nearestDistance) {\n nearestAction = loc.location;\n nearestDistance = distance;\n }\n }\n\n return nearestAction;\n }", "public void solve() {\n // TODO\n // This function should use next. You should also create and use any\n // other helper fuctions you find helpful here.\n \t// get start position \t\n \tSquare s = sea.getStart();\n \texploreList.add(s);\n \twhile(this.exploreList.size() != 0) {\n \t\tSquare c = step();\n \t\tif(c.hasNemo()) {\n \t\t\tsetPath(c);\n \t\t\tfoundNemo = true;\n \t\t\tbreak;\n \t\t}\n \t}\n }", "Move getBestMove() {\n //System.out.println(\"AI chooses: \" + m.toString());\n return moves.get((int) (Math.random() * moves.size()));\n }", "private InfoBundle searchClosestSpot(GpsPoint point) {\n\n\t\tSystem.out.println(\"searchClosestSpot\");\n\t\tList<Spot> spots = spotRepository.getClosestSpot(point.getLatitude(),point.getLongitude());\n\n\t\tdouble minDistance;\n\t\tLong minDistance_spotID;\n\t\t// Center GPS_plus object of the closest spot\n\t\tdouble minDistance_centerGPSdatalat;\n\t\tdouble minDistance_centerGPSdatalong;\n\t\t// indicates if the closest spot is in the range of point\n\t\tboolean inRange = false;\n\n\t\tif (spots != null && spots.size() != 0) {\n\t\t\tminDistance = GPSDataProcessor.calcDistance(spots.get(0).getLatitude(),spots.get(0).getLongitude(), point.getLatitude(), point.getLongitude());\n\t\t\tminDistance_centerGPSdatalat = spots.get(0).getLatitude();\n\t\t\tminDistance_centerGPSdatalong = spots.get(0).getLongitude();\n\t\t\tminDistance_spotID = spots.get(0).getSpotID();\n\n\t\t\tif (minDistance < Spot.stdRadius) {\n\t\t\t\tinRange = true;\n\t\t\t}\n\t\t\tInfoBundle bundle = new InfoBundle(minDistance_spotID, minDistance_centerGPSdatalat, minDistance_centerGPSdatalong, inRange, minDistance);\n\t\t\tbundle.setSpot(spots.get(0));\n\t\t\treturn bundle;\n\t\t} else {\n\t\t\t// if there was no spot within the search\n\t\t\treturn null;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t//2. create an array of 5 robots.\n\tRobot[] robs = new Robot[5];\n\t//3. use a for loop to initialize the robots.\n\tfor (int i = 0; i < robs.length; i++) {\n\t\t\trobs[i] = new Robot();\n\t\t\trobs[i].setX(100 * i + 100);\n\t\t\trobs[i].setY(500);\n\t\t\trobs[i].setSpeed(10);\n\t}\n\t\t//4. make each robot start at the bottom of the screen, side by side, facing up\n\t\t\n\t//5. use another for loop to iterate through the array and make each robot move \n\t// a random amount less than 50.\n\tfor (int i = 0; i < robs.length; i++) {\n\t\tRandom rnd = new Random();\n\t\trobs[i].move(rnd.nextInt(50)+1);\n\t}\n\t//6. use a while loop to repeat step 5 until a robot has reached the top of the screen.\n\tboolean notwon = true;\n\tint winner = -250;\n\twhile(notwon) {\n\t\tfor (int i = 0; i < robs.length; i++) {\n\t\t\tRandom rnd = new Random();\n\t\t\trobs[i].move(rnd.nextInt(50)+1);\n\t\t}\n\t\tfor (int i = 0; i < robs.length; i++) {\n\t\t\tif (notwon && winner == -250 && robs[i].getY() <= 72) {\n\t\t\t\twinner = i;\n\t\t\t\tnotwon = false;\n\t\t\t}\n\t\t}\n\t}\n\t\n\trobs[winner].sparkle();\n\t//7. declare that robot the winner and throw it a party!\n\t\n\t//8. try different races with different amounts of robots.\n\n\t//9. make the robots race around a circular track.\n}", "private void findBestPath(int start){\n\t\tint n = this.getDimension(); // for readability\n\t\tint lastCity, minDist = 0, moment = 0;\n\t\t\n\t\tthis.path = new int[this.getDimension() + 1];\n\t\tthis.visited = 0; \n\t\t\n\t\tsetAllUnvisited();\n\t\t\n\t\tvisitCity(moment, start); // visits the first city in time 0\n\t\tlastCity = start;\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + this.visited);\n\t\t// Repeats until all cities were visited\n\t\twhile(visited < n){\n//\t\t\tSystem.out.println(\"LC:\" + lastCity + \" MD:\" + minDist + \" M:\" + moment);\n\t\t\tmoment++;\n\t\t\t\n\t\t\t// Finds the closest city\n\t\t\tint closest = -1, closestDist = -1;\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\tif(!wasVisited(i)){\n\t\t\t\t\tif(dist(lastCity, i) < closestDist || closestDist == -1){ // If it's the first iteration or found a closer city\n\t\t\t\t\t\tclosest = i;\n\t\t\t\t\t\tclosestDist = dist(lastCity, closest);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Updates distance\n\t\t\tminDist += dist(lastCity, closest);\n\t\t\t\n\t\t\t// Visits the closest city\n\t\t\tvisitCity(moment, closest);\n\t\t\tlastCity = closest;\n//\t\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + minDist);\n\t\t\t\n\t\t}\n\t\t\n\t\t// Returns to the first city\n\t\tvisitCity(moment + 1, start);\n\t\tminDist += dist(lastCity, start);\n\t\t\n\t\tif(minDist < this.totalDistance || this.totalDistance == -1){\n\t\t\tthis.totalDistance = minDist;\n\t\t\tthis.bestPath = this.path.clone();\n\t\t}\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" -----> \" + minDist);\n\t}", "public int chooseElevator() {\n\t\tPair<Integer,Direction> eleLoc;\n\t\tHashMap<Integer, Pair<Integer, Direction>> mapClone = map.getElevatorsData(); //get map of up to date elevator locations\n\t\tint distance;\n\t\tint minDist=9999;\n\t\tint choice = -1;\n\t\t//iterate over all elevators in the system\n\t\tfor(int i = 1;i<=Constants.elevator;i++) {\n\t\t\teleLoc = mapClone.get(i);//get elevators current system\n\t\t\tdistance =calculateDistance(eleLoc);\n\t\t\t//System.out.println(\"Elevator \" + i + \" is \" + distance + \" away from next job\");\n\t\t\t//if distance is optimal\n\t\t\tif(distance >=0 && distance <minDist) {\n\t\t\t\tchoice = i;\n\t\t\t\tminDist = distance;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn choice;\n\t}", "int getStartSearch();", "public Move makeFirstMove(){\n bestWord = new ArrayList<>();\n getStartingWord( tray , bestWord, \"\", 0); //maxScore get's updated in here.\n if (maxScore == 0){ return null; }\n //right now the AI is dumb and always starts on the first tile.... this is only safe with boardSize/2 >= 7\n Move move =\n new Move(bestWord , Constants.BOARD_DIMENSIONS/2 ,\n Constants.BOARD_DIMENSIONS/2 - (bestWord.size() / 2) , true , maxScore , bot);\n //refillTray();\n return move;\n }", "public void locateGame() {\n int[] screenPixels;\n BufferedImage screenshot;\n System.out.print(\"Detecting game...\");\n while (!gameDetected) {\n screenshot = robot.createScreenCapture(new Rectangle(screenWidth, screenHeight));\n screenPixels = screenshot.getRGB(0, 0, screenWidth, screenHeight, null, 0, screenWidth);\n detectMaze(screenPixels);\n delay(20);\n }\n System.out.print(\"game detected!\\n\");\n }", "private void StepForRobot() { \r\n\r\n\t\tIterator<Robot> itr = rob.iterator();\r\n\t\twhile(itr.hasNext()) {\r\n\r\n\t\t\tRobot r = itr.next();\r\n\t\t\tFruit fDest = null;\r\n\t\t\tdouble maxSum = 0;\r\n\t\t\tnode_data v = null;\r\n\t\t\tIterator<Fruit> it = fru.iterator();\r\n\t\t\twhile(it.hasNext()) {\r\n\r\n\r\n\t\t\t\tFruit f = it.next();\r\n\t\t\t\tdouble sum =0;\r\n\t\t\t\tint dest = f.e.getSrc();\r\n\t\t\t\tList<node_data> list = Algo.shortestPath(r.src, dest);\r\n\t\t\t\tlist.add(dgraph.getNode(f.e.getDest()));\r\n\r\n\r\n\r\n\t\t\t\tfor(int i = 0;i<list.size()-1;i++)\r\n\t\t\t\t\tsum += dgraph.getEdge(list.get(i).getKey(), list.get(i+1).getKey()).getWeight();\r\n\t\t\t\tsum = f.getValue() / sum;\r\n\r\n\t\t\t\tif(sum > maxSum && !f.isDest) {\r\n\r\n\r\n\t\t\t\t\tmaxSum = sum;\r\n\t\t\t\t\tv = list.get(1); \r\n\t\t\t\t\tfDest = f;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(fDest != null) {\r\n\r\n\r\n\r\n\t\t\t\tfDest.setDest(true);\r\n\t\t\t\tgame.chooseNextEdge(r.id, v.getKey());\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "private synchronized Object[] getBestMove()\n/* */ {\n/* 580 */ while (this.workToDo)\n/* 581 */ synchronized (this) {\n/* 582 */ try { wait();\n/* */ } catch (InterruptedException e) {\n/* 584 */ e.printStackTrace(SingleThreadedTabuSearch.err); } } return this.bestMove;\n/* */ }", "@Override\n public void run() {\n \n // For testing\n int maxFrontierLocations = 0;\n int maxOccupied = 0;\n \n while (true) {\n try {\n Thread.sleep(10);\n } catch (InterruptedException e) {\n e.printStackTrace();\n break;\n }\n if (paused){\n continue;\n }\n for (int i = 0; i < robotNames.size(); i++) {\n String name = robotNames.get(i);\n Robot robot = robotController.getRobot(name);\n if (measurementHandlers.get(name).updateMeasurement() == false) {\n continue;\n }\n\n Position robotPosition = measurementHandlers.get(name).getRobotPosition();\n Angle robotAngle = measurementHandlers.get(name).getRobotHeading();\n\n int[]position = {(int)Math.round(robotPosition.getXValue()), (int)Math.round(robotPosition.getYValue())};\n robot.setPosition(position);\n robot.setRobotOrientation((int)Math.round(robotAngle.getValue()));\n\n // Find the location of the robot in the map\n map.resize(robotPosition);\n MapLocation robotLocation = map.findLocationInMap(robotPosition);\n\n Sensor[] sensors = measurementHandlers.get(name).getIRSensorData();\n for(Sensor sensor: sensors){\n boolean tooClose = false;\n \n // Check the distance between the position of the measurement and all the other robots\n for(int j = 0; j < robotNames.size(); j++){\n String otherName = robotNames.get(j);\n int[] otherPositionInt = robotController.getRobot(otherName).getPosition();\n Position otherPosition = new Position(otherPositionInt[0], otherPositionInt[1]);\n if(Position.distanceBetween(otherPosition, sensor.getPosition()) < 10){\n tooClose = true;\n break;\n }\n }\n \n // The measurement is only added to the map if it is at a certain distance to the other robots\n if(!tooClose){\n map.resize(sensor.getPosition());\n MapLocation measurementLocation = map.findLocationInMap(sensor.getPosition());\n if(sensor.isMeasurement()){\n map.addMeasurement(measurementLocation, true);\n }\n \n // Create a measurements indicating no obstacle in the sensors line of sight\n ArrayList<MapLocation> lineOfSight = getLineBetweenPoints(robotLocation, measurementLocation);\n for (MapLocation location : lineOfSight) {\n map.addMeasurement(location, false);\n }\n }\n }\n }\n \n /*\n if (debug) {\n int frontierLocations = map.getFrontierLocations().size();\n if (frontierLocations > maxFrontierLocations) {\n maxFrontierLocations = frontierLocations;\n }\n System.out.println(\"Max frontier locations: \" + maxFrontierLocations);\n \n int cellCount = 0;\n for (int i = map.getBottomRow(); i <= map.getTopRow(); i++) {\n for (int j = map.getLeftColumn(); j <= map.getRightColumn(); j++) {\n MapLocation location = new MapLocation(i, j);\n Cell cell = map.findCell(location);\n if (cell.isOccupied()) {\n cellCount++;\n }\n }\n }\n if (cellCount > maxOccupied) {\n maxOccupied = cellCount;\n }\n System.out.println(\"Max occupied locations: \" + maxOccupied);\n }\n */\n }\n }", "public void setEstimatedTrainLocations() {\n\t\t// TODO: for each train\n\t\tfor (Train t : trains) {\n\t\t\t// calculate the distance traveled since the last tick\n\t\t\tdouble speed = t.currSpeed * 0.488888889; // in yards/second\n\t\t\tdouble elapsedTime = SimClock.getDeltaMs() * 0.001; //in seconds\n\t\t\tdouble distanceTraveled = speed*elapsedTime; //yards\n\t\t\tDefaultBlock block = ((DefaultBlock)blockData.get(t.currentBlock));\n\t\t\tif (distanceTraveled > t.authority) {\n\t\t\t\tdistanceTraveled = t.authority;\n\t\t\t\tt.currSpeed = 0;\n\t\t\t}\n\t\t\telse if (trainRoutes.get(t.trainId).route.size() == 1) {\n\t\t\t\tif (t.distanceTraveledOnBlock + distanceTraveled > block.blockLength/2) {\n\t\t\t\t\tdistanceTraveled = block.blockLength/2 - t.distanceTraveledOnBlock;\n\t\t\t\t\tt.distanceTraveledOnBlock = block.blockLength/2;\n\t\t\t\t\tt.currSpeed = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check if the train has entered a new block\n\t\t\tif (block.occupied == false) {\n\t\t\t\t// it has.\n\t\t\t\tt.currentBlock = trainRoutes.get(t.trainId).route.get(1);\n\t\t\t\tt.distanceTraveledOnBlock = block.blockLength - t.distanceTraveledOnBlock;\n\t\t\t\tt.currSpeed = ((DefaultBlock) blockData.get(t.currentBlock)).speedLimit;\n\t\t\t\tif (t.currSpeed > t.maxSpeed) {\n\t\t\t\t\tt.currSpeed = t.maxSpeed;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// calculate the distance traveled on block\n\t\t\telse if ((t.distanceTraveledOnBlock + distanceTraveled) > block.blockLength) {\n\t\t\t\tt.distanceTraveledOnBlock = block.blockLength;\n\t\t\t}\n\t\t\tt.authority -= distanceTraveled;\n\t\t\tt.currSpeed = trainRoutes.get(t.trainId).speed;\n\t\t\tt.distanceTraveledOnBlock += distanceTraveled;\n\t\t\t\n\t\t}\n\t}", "private void setPoints () {\n\t\tArrayList<Point> emptySpot = new ArrayList<Point>();\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\tif (maze[i][j] == 0) {\n\t\t\t\temptySpot.add(new Point (i, j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.shuffle(emptySpot);\n\t\tthis.goal = emptySpot.get(0);\n\t\tdouble goalRange = this.goal.getX() + this.goal.getY();\n\t\tfor (int i = 1; i < emptySpot.size(); i++) {\n\t\t\tPoint playerStart = emptySpot.get(i);\n\t\t\tdouble playerRange = playerStart.getX() + playerStart.getY();\n\t\t\tif (Math.abs(playerRange - goalRange) > width/2)\n\t\t\tthis.playerStart = playerStart;\n\t\t}\n\t}", "private List<BaseLocation> getExpectedBaseLocations() {\r\n final List<BaseLocation> baseLocations = new ArrayList<>();\r\n\r\n final Position position1 = new Position(3104, 3856, PIXEL);\r\n final Position center1 = new Position(3040, 3808, PIXEL);\r\n baseLocations.add(new BaseLocation(position1, center1, 13500, 5000, true, false, true));\r\n\r\n final Position position2 = new Position(2208, 3632, PIXEL);\r\n final Position center2 = new Position(2144, 3584, PIXEL);\r\n baseLocations.add(new BaseLocation(position2, center2, 9000, 5000, true, false, false));\r\n\r\n final Position position3 = new Position(640, 3280, PIXEL);\r\n final Position center3 = new Position(576, 3232, PIXEL);\r\n baseLocations.add(new BaseLocation(position3, center3, 13500, 5000, true, false, true));\r\n\r\n final Position position4 = new Position(2688, 2992, PIXEL);\r\n final Position center4 = new Position(2624, 2944, PIXEL);\r\n baseLocations.add(new BaseLocation(position4, center4, 9000, 5000, true, false, false));\r\n\r\n final Position position5 = new Position(1792, 2480, PIXEL);\r\n final Position center5 = new Position(1728, 2432, PIXEL);\r\n baseLocations.add(new BaseLocation(position5, center5, 12000, 0, true, true, false));\r\n\r\n final Position position6 = new Position(3200, 1776, PIXEL);\r\n final Position center6 = new Position(3136, 1728, PIXEL);\r\n baseLocations.add(new BaseLocation(position6, center6, 13500, 5000, true, false, true));\r\n\r\n final Position position7 = new Position(640, 1968, PIXEL);\r\n final Position center7 = new Position(576, 1920, PIXEL);\r\n baseLocations.add(new BaseLocation(position7, center7, 9000, 5000, true, false, false));\r\n\r\n final Position position8 = new Position(1792, 1808, PIXEL);\r\n final Position center8 = new Position(1728, 1760, PIXEL);\r\n baseLocations.add(new BaseLocation(position8, center8, 12000, 0, true, true, false));\r\n\r\n final Position position9 = new Position(2336, 560, PIXEL);\r\n final Position center9 = new Position(2272, 512, PIXEL);\r\n baseLocations.add(new BaseLocation(position9, center9, 13500, 5000, true, false, true));\r\n\r\n final Position position10 = new Position(3584, 720, PIXEL);\r\n final Position center10 = new Position(3520, 672, PIXEL);\r\n baseLocations.add(new BaseLocation(position10, center10, 9000, 5000, true, false, false));\r\n\r\n final Position position11 = new Position(544, 432, PIXEL);\r\n final Position center11 = new Position(480, 384, PIXEL);\r\n baseLocations.add(new BaseLocation(position11, center11, 13500, 5000, true, false, true));\r\n\r\n return baseLocations;\r\n }", "private void determineStartingLocation(Car carOne, Car carTwo, Car carThree) {\n ArrayList<Integer> locationPlaces = new ArrayList<Integer>();\n locationPlaces.add(1);// 0\n locationPlaces.add(2);// 1\n locationPlaces.add(3);// 2\n locationPlaces.add(4);// 3\n\n Collections.shuffle(locationPlaces);\n\n carOne.setLocation(locationPlaces.get(0));\n carTwo.setLocation(locationPlaces.get(1));\n carThree.setLocation(locationPlaces.get(2));\n }", "@Override\n\tpublic ArrayList<BoardLocation> findLocation() {\n\t\treturn null;\n\t}", "private StepList selectBestSteps( int top )\n {\n int maxlen = 0;\n int mincom = MINCOMMONALITY;\n int candidates[] = new int[length];\n int p = 0;\n \n StepList res = new StepList( top );\n for( int i=1; i<length; i++ ){\n if( commonality[i]>=mincom ){\n \t\t// TODO: we should also consider pairs that\n \t\t// have too much overlap, but make it up in subsequent\n \t\t// entries. This does mean that we must create a new\n \t\t// candidate array for each new possibility, since we\n \t\t// may have to throw it away.\n int pos0 = indices[i-1];\n \t\tint pos1 = indices[i];\n \t\tint len = Math.min( Math.abs( pos1-pos0 ), commonality[i] );\n \n \t\tif( len>maxlen ){\n \t\t // This is a better candidate.\n \t\t candidates[0] = pos0;\n \t\t candidates[1] = pos1;\n \t\t p = 2;\n \n \t\t // Now search for non-overlapping substrings that \n \t\t // are equal for `len' characters. All possibilities\n \t\t // are the subsequent entries in the suffix array, up to\n // the first one with less than 'len' characters\n // commonality.\n \t\t // We must test each one for overlap with all\n \t\t // previously selected strings.\n // TODO: this fairly arbitrary way of gathering candidates\n // is not optimal, since a different subset of strings may\n // be larger.\n \t\t int j = i+1;\n \t\t while( j<length && commonality[j]>=len ){\n \t\t\tint posj = indices[j];\n \n \t\t\tif( !areOverlapping( candidates, p, posj, len ) ){\n \t\t\t candidates[p++] = posj;\n \t\t\t}\n \t\t\tj++;\n \t\t }\n \t\t maxlen = len;\n \t\t mincom = len;\n res.add( new Step( candidates, p, maxlen ) );\n \t\t}\n }\n }\n return res;\n }", "@Override\r\n\tpublic double getMinimalCostToReach(Robot robot, long x, long y)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn robot.getEnergyRequiredToReach(new Position(x, y));\r\n\t\t}\r\n\t\tcatch(IllegalBoardException exc)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The given robot is not placed on a board..\");\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tcatch(IllegalStateException exc)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The given robot is terminated.\");\r\n\t\t\treturn -1; \r\n\t\t}\r\n\t}", "Execution getClosestDistance();", "private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}", "private void computeLocations ()\r\n {\r\n // Find the note farthest from stem middle point\r\n if (!getNotes().isEmpty()) {\r\n if (stem != null) {\r\n Point middle = stem.getLocation();\r\n Note bestNote = null;\r\n int bestDy = Integer.MIN_VALUE;\r\n\r\n for (TreeNode node : getNotes()) {\r\n Note note = (Note) node;\r\n int noteY = note.getCenter().y;\r\n int dy = Math.abs(noteY - middle.y);\r\n\r\n if (dy > bestDy) {\r\n bestNote = note;\r\n bestDy = dy;\r\n }\r\n }\r\n\r\n Rectangle stemBox = stem.getBounds();\r\n\r\n if (middle.y < bestNote.getCenter().y) {\r\n // Stem is up\r\n tailLocation = new Point(\r\n stemBox.x + (stemBox.width / 2),\r\n stemBox.y);\r\n } else {\r\n // Stem is down\r\n tailLocation = new Point(\r\n stemBox.x + (stemBox.width / 2),\r\n (stemBox.y + stemBox.height));\r\n }\r\n\r\n headLocation = getHeadLocation(bestNote);\r\n } else {\r\n Note note = (Note) getNotes().get(0);\r\n headLocation = note.getCenter();\r\n tailLocation = headLocation;\r\n }\r\n } else {\r\n addError(\"No notes in chord \" + this);\r\n }\r\n }", "public int getSmallestSpotNum() {\n if (getNumavailable() >= 1) {\n for (int i = 0; i < spotArr.size(); i++) {\n if (spotArr.get(i).isAvailable()) {\n return i;\n }\n }\n }\n return -1;\n }", "public static void main(String[] args) {\n\t\t\n\t\n\t\t//2. create an array of 5 robots.\n\tRobot[] robot = new Robot[5];\n\t\t//3. use a for loop to initialize the robots.\n\tfor (int i = 0; i < robot.length; i++) {\n\t\trobot[i]=new Robot();\n\t}\n\t\t\t//4. make each robot start at the bottom of the screen, side by side, facing up\nrobot[0].moveTo(50, 550);\nrobot[1].moveTo(150, 550);\nrobot[2].moveTo(250, 550);\nrobot[3].moveTo(350, 550);\nrobot[4].moveTo(450, 550);\n\t\t//5. use another for loop to iterate through the array and make each robot move \n\t // a random amount less than 50.\n \n\t\t//6. use a while loop to repeat step 5 until a robot has reached the top of the screen.\nboolean finished=false;\nwhile(!finished) {\n \tfor (int i = 0; i < robot.length; i++) {\n\tRandom random = new Random();\n\t\trandom.nextInt(50);\n\t\trobot[i].move(i);\n\t\tif(robot[i].getY()==0) {\n \t\tfinished=true;\n \t\trobot[i].sparkle();\n \t\tSystem.out.println(\"You are the winner!\");\n \t\t\n \t}\n \t}\n}\n\t}", "private int[] findHome() {\n int[] loc = new int[2];\n switch (playerNum) {\n case 0: //player RED's home\n loc[0] = 0;\n loc[1] = 0;\n break;\n case 1: //player YELLOW's home\n loc[0] = 6;\n loc[1] = 0;\n break;\n case 2: //player GREEN's home\n loc[0] = 6;\n loc[1] = 6;\n break;\n case 3: //player BLUE's home\n loc[0] = 0;\n loc[1] = 6;\n break;\n default:\n loc[0] = -1;\n loc[1] = -1;\n break;\n }\n return loc;\n }", "public Coordinates choosePath(Actor robot) {\n\t\tCoordinates tempV = null;\n\t\tint tempDist = 0;\n\t\tboolean occupied = false;\n\t\ttempV = robot.getCoords();\n\t\tDirections dir = Directions.getDirection();\n\t\tswitch (dir) {\n\t\tcase RIGHT:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX() + 1, tempV.getY());\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX() - 1, tempV.getY());\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\tcase LEFT:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX() - 1, tempV.getY());\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX() + 1, tempV.getY());\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\tcase DOWN:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() + 1);\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() - 1);\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\tcase UP:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() - 1);\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() + 1);\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\t}\n\n\t\treturn tempV;\n\t}", "public XYPoint getSnakeHeadStartLocation();", "private Location[] overrunsTop () {\n Location nextLocation;\n Location nextCenter;\n \n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(getX(), 0);\n nextCenter = new Location(getX(), myCanvasBounds.getHeight());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = FULL_TURN_DEGREES - getHeading();\n if (getHeading() < THREE_QUARTER_TURN_DEGREES) {\n angle = -(getHeading() - HALF_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(getX() + getY() / Math.tan(angle), 0);\n nextCenter = new Location(getX() + getY() / Math.tan(angle),\n myCanvasBounds.getHeight());\n \n // eliminates race condition - if next location overruns left/right AND top/bottom it checks\n // to see which is overrun first and corrects\n if (nextLocation.getX() > myCanvasBounds.getWidth())\n // right\n return overrunRight();\n else if (nextLocation.getX() < 0) // left\n return overrunLeft();\n \n return new Location[] { nextLocation, nextCenter };\n }", "private Location getNextLocation() {\n Location location = new Location(MockLocationEngine.class.getSimpleName());\n location.setLatitude(locations[currentIndex][0]);\n location.setLongitude(locations[currentIndex][1]);\n currentIndex = (currentIndex == locations.length - 1 ? 0 : currentIndex + 1);\n return location;\n }", "public MapLocation findNearestArchon() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestAction = null;\n float nearestDistance = 9999f;\n\n for (int i = 0; i < enemyArchonCount; ++i) {\n ArchonLocation loc = archonLocations[i];\n if (loc.isDead()) continue;\n float distance = loc.location.distanceSquaredTo(origin);\n if (nearestAction == null || distance < nearestDistance) {\n nearestAction = loc.location;\n nearestDistance = distance;\n }\n }\n\n return nearestAction;\n }", "private Move getBestMove() {\r\n\t\tSystem.out.println(\"getting best move\");\r\n\t\tChessConsole.printCurrentGameState(this.chessGame);\r\n\t\tSystem.out.println(\"thinking...\");\r\n\t\t\r\n\t\tList<Move> validMoves = generateMoves(false);\r\n\t\tint bestResult = Integer.MIN_VALUE;\r\n\t\tMove bestMove = null;\r\n\t\t\r\n\t\tfor (Move move : validMoves) {\r\n\t\t\texecuteMove(move);\r\n\t\t\t//System.out.println(\"evaluate move: \"+move+\" =========================================\");\r\n\t\t\tint evaluationResult = -1 * negaMax(this.maxDepth,\"\");\r\n\t\t\t//System.out.println(\"result: \"+evaluationResult);\r\n\t\t\tundoMove(move);\r\n\t\t\tif( evaluationResult > bestResult){\r\n\t\t\t\tbestResult = evaluationResult;\r\n\t\t\t\tbestMove = move;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"done thinking! best move is: \"+bestMove);\r\n\t\treturn bestMove;\r\n\t}", "private void getBest()\n\t{\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(bestTour + \" \" + bestScore);\n\t}", "public final Tile selectComputerMove() {\r\n Tile tile = null;\r\n int count = 0;\r\n String tileName = null;\r\n boolean continueLoop = true;\r\n \r\n // First try to find a winning move\r\n for (Rail rail : rails) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"0\")) count++;\r\n }\r\n if (count == 2) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"\")) {\r\n tileName = t.getName();\r\n return t;\r\n }\r\n }\r\n }\r\n count = 0; \r\n }\r\n \r\n // If none found, try to block \"X\"\r\n for (Rail rail : rails) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"X\")) count++;\r\n }\r\n if (count == 2) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"\")) {\r\n tileName = t.getName();\r\n return t;\r\n }\r\n }\r\n }\r\n count = 0;\r\n }\r\n \r\n // If no blocking move, try to play the center which gives \"O\"\r\n // a statistical advantage\r\n if (!tiles[R2C2].isSelected()) {\r\n return tiles[R2C2];\r\n }\r\n \r\n \r\n // If center move is not available, try to find an open corner tile, \r\n // which might set up an winning combination\r\n if (!tiles[R1C1].isSelected()) {\r\n return tiles[R1C1];\r\n } else if (!tiles[R3C3].isSelected()) {\r\n return tiles[R3C3];\r\n } else if (!tiles[R3C1].isSelected()) {\r\n return tiles[R3C1];\r\n } else if (!tiles[R1C3].isSelected()) {\r\n return tiles[R1C3];\r\n }\r\n \r\n // If none found just pick an empty tile at random\r\n if(tileName == null) {\r\n int row = rand.nextInt(3) + 1;\r\n int col = rand.nextInt(3) + 1;\r\n tileName = \"r\" + row + \"c\" + col;\r\n for (Tile btn: tiles) {\r\n if (btn.getName().equals(tileName)) {\r\n tile = btn;\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return tile;\r\n }", "private void initRobots() {\n\t\tthis.robots.clear();\n\t\tGraphRobot robot = new GraphRobot();\n\t\tString info = game.toString();\n\t\ttry {\n\t\t\tJSONObject line = new JSONObject(info);\n\t\t\tJSONObject ttt = line.getJSONObject(\"GameServer\");\n\t\t\tint rs = ttt.getInt(\"robots\");\n\t\t\tfor(int a = 0;a<rs;a++) {\n\t\t\t\tgame.addRobot(a);\n\t\t\t}\n\t\t}\n\t\tcatch (JSONException e) {e.printStackTrace();}\n\n\t\tList<String> r = game.getRobots();\n\t\tfor(String s : r) {\n\t\t\trobot.initRobot(s);\n\t\t\tthis.robots.add(robot);\n\t\t}\n\t}", "public void go_to_base_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_base, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n // Extend the arm after getting to the base position\n Dispatcher.get_instance().add_job(new JRunnable(() -> Pneumatics.get_instance().set_solenoids(true), this));\n hold_arm();\n }", "public void findNearestDriver() {\n\t\tint currentDistance, driverX, driverY, pickupX, pickupY;\n\t\tpickupX = (int)this.currentRide.getPickup().getX();\n\t\tpickupY = (int)this.currentRide.getPickup().getY();\n\t\tfor(int i = 0; i < drivers.size(); i++) {\n\t\t\tdriverX = (int)this.drivers.get(i).getLocation().getX();\n\t\t\tdriverY = (int)this.drivers.get(i).getLocation().getY();\n\t\t\tcurrentDistance = (int) Math.sqrt(Math.pow((driverX - pickupX), 2) + Math.pow((driverY - pickupY),2));\n\t\t\tthis.drivers.get(i).setDistanceFromPassenger(currentDistance);\n\t\t}\n\t\tCollections.sort(this.drivers);\n\t\tif(this.drivers.get(0).getDistanceFromPassenger() == this.drivers.get(1).getDistanceFromPassenger()){\n\t\t\tif(drivers.get(0).getRating() < drivers.get(1).getRating()) {\n\t\t\t\tdrivers.set(0, drivers.get(1));\n\t\t\t}\n\t\t}\t\t\n\t}", "void gettingBackToInitial(){\n robot.setDrivetrainPosition(-hittingMineralDistance, \"translation\", 1.0);\n }", "@Override\n\tpublic void robotInit() {\n\t\tdt = new DriveTrain();\n\t\t//Initialize drive Talons\n\t\tRobotMap.vspLeft = new WPI_TalonSRX(RobotMap.dtLeft);\n\t\tRobotMap.vspRight = new WPI_TalonSRX(RobotMap.dtRight);\n\t\t//Initialize drive slave Victors\n\t\t//RobotMap.slaveLeft = new WPI_VictorSPX(RobotMap.slaveDriveLeft);\n\t\t//RobotMap.slaveRight = new WPI_VictorSPX(RobotMap.slaveDriveRight);\n\t\t//Set drive slaves to follower mode\n\t\t//RobotMap.slaveLeft.follow(RobotMap.vspLeft);\n\t\t//RobotMap.slaveRight.follow(RobotMap.vspRight);\n\t\t//Initialize drive train\n\t\tRobotMap.rd = new DifferentialDrive(RobotMap.vspLeft, RobotMap.vspRight);\n\t\t//Initialize drive joystick\n\t\tRobotMap.stick = new Joystick(RobotMap.joystickPort);\n\t\t//Disabled drive safety\n\t\tRobotMap.vspLeft.setSafetyEnabled(false);\n\t\tRobotMap.vspRight.setSafetyEnabled(false);\n\t\tRobotMap.rd.setSafetyEnabled(false);\n\t\t//Initialize lift Talon\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(5);\n\t\t//Initialize operator controller\n\t\tRobotMap.controller = new Joystick(RobotMap.controllerPort);\n\t\t//Initialize intake Victors\n\t\tRobotMap.intakeVictorLeft = new WPI_VictorSPX(RobotMap.intakeMaster);\n\t\tRobotMap.intakeVictorRight = new WPI_VictorSPX(RobotMap.intakeSlave);\n\t\t//Set right intake Victor to follow left intake Victor\n\t\tRobotMap.intakeVictorRight.follow(RobotMap.intakeVictorLeft);\n\t\t\n\t\tRobotMap.climberVictorLeft = new WPI_VictorSPX(RobotMap.climberLeftAddress);\n\t\tRobotMap.climberVictorRight = new WPI_VictorSPX(RobotMap.climberRightAddress);\n\t\t\n\t\tRobotMap.climberVictorRight.follow(RobotMap.climberVictorLeft);\n\t\t\n\t\tRobotMap.piston = new DoubleSolenoid(RobotMap.inChannel, RobotMap.outChannel);\n\t\t\n\t\tRobotMap.intakeLifter = new WPI_VictorSPX(2);\n\t\t\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(RobotMap.liftTalonAddress);\n\t\t\n\t\tautoChooser = new SendableChooser();\n\t\tautoChooser.addDefault(\"Drive to baseline\" , new DriveToBaseline());\n\t\tautoChooser.addObject(\"Null auto\", new NullAuto());\n\t\tautoChooser.addObject(\"Switch from right\", new SwitchFromRight());\n\t\tautoChooser.addObject(\"Switch from left\", new SwitchFromLeft());\n\t\tautoChooser.addObject(\"PID from left\", new PIDfromLeft());\n\t\tautoChooser.addObject(\"PID from right\", new PIDfromRight());\n\t\tautoChooser.addObject(\"Scale from right\", new ScaleAutoRight());\n\t\tautoChooser.addObject(\"Scale from left\", new ScaleAutoLeft());\n\t\tautoChooser.addObject(\"PID tester\", new PIDTESTER());\n\t\tautoChooser.addObject(\"Joe use this one\", new leftOnly());\n\t\tSmartDashboard.putData(\"Autonomous mode chooser\", autoChooser);\n\t\t\n\t\t//RobotMap.liftVictor.follow(RobotMap.climberTalon);\n\t\t\n\t\tRobotMap.vspLeft.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\tRobotMap.vspRight.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\t\n\t\tRobotMap.intakeLifted = new DigitalInput(1);\n\t\tRobotMap.isAtTop = new DigitalInput(2);\n\t\tRobotMap.isAtBottom = new DigitalInput(0);\n\t\t\n\t\tRobotMap.vspLeft.configVelocityMeasurementPeriod(VelocityMeasPeriod.Period_100Ms, 1);\n\t\tRobotMap.vspRight.configVelocityMeasurementWindow(64, 1); \n\t\t\n\t\toi = new OI();\n\t}", "public Location decideNextLocationToPlay(Location loc)\n\t{\n\t\tBoard board = Game.getInstance().getBoard();\n\t\tfor (int i = 0; i < board.getRows(); i++)\n\t\t\tfor (int j = 0; j < board.getColumns(); j++)\n\t\t\t{\n\t\t\t\tif (board.getPiece(i, j) == Piece.Empty)\n\t\t\t\t\treturn new Location(i,j);\n\t\t\t}\n\t\t\n\t\treturn new Location(0,0);\n\t}", "public List<Tile> findTargets() {\n List<Tile> targets = new ArrayList<>(); // our return value\n int fearDistance = 2; // Ideally we're 2 spots away from their head, increases when we can't do that.\n int foodDistance = 3; // We look at a distance 3 for food.\n\n // If fearDistance gets this big, then its just GG i guess\n while (targets.size() == 0 && fearDistance < 15) {\n // Get the tiles around the Enemy's head\n targets = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y, fearDistance);\n fearDistance += 1;\n }\n\n // Get the food tiles near us\n for (int i=0; i < foodDistance; i++) {\n List<Tile> nearBy = this.gb.nearByTiles(this.us_head_x, this.us_head_y, i);\n for (Tile t : nearBy) {\n if (t.isFood() && !targets.contains(t)) targets.add(t);\n }\n }\n return targets;\n }", "public void findTrack() {\n for (Node n : start_node.getLinks()) {\n precedenti.put(n, start_node);\n valori.put(n, calculator.calcDistance(n, start_node));\n }\n while (!da_collegare.isEmpty()) {\n Node piu_vicino = null;\n double min = Double.MAX_VALUE;\n for (Node n : da_collegare) {\n double dist = valori.get(n);\n if (dist - min < THRESHOLD) {\n min = dist;\n piu_vicino = n;\n }\n }\n double dist = valori.get(piu_vicino);\n for (Node n : piu_vicino.getLinks()) {\n double ricalc = dist + calculator.calcDistance(n, piu_vicino);\n if (ricalc - valori.get(n) < THRESHOLD) {\n precedenti.put(n, piu_vicino);\n valori.put(n, ricalc);\n }\n }\n da_collegare.remove(piu_vicino);\n }\n }", "public abstract void makeBestMove();", "private Position getGoalItemPosition(Set<Item> items) {\n Vector closest = new Vector(0, 0);\n double distance = Double.MAX_VALUE;\n Iterator<Item> it = items.iterator();\n while (it.hasNext()) {\n Item item = it.next();\n Vector center = item.center();\n double currDistance = center.distance(player.center());\n if (currDistance < distance) {\n distance = currDistance;\n closest = center;\n goalItem = item;\n }\n }\n return new Position(closest.x, closest.y);\n }", "private Location generateRandomStartLocation() {\n\t\tif (!atLeastOneNonWallLocation()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"There is no free tile available for the player to be placed\");\n\t\t}\n\n\t\twhile (true) {\n\t\t\t// Generate a random location\n\t\t\tfinal Random random = new Random();\n\t\t\tfinal int randomRow = random.nextInt(this.map.getMapHeight());\n\t\t\tfinal int randomCol = random.nextInt(this.map.getMapWidth());\n\n\t\t\tfinal Location location = new Location(randomCol, randomRow);\n\n\t\t\tif (this.map.getMapCell(location).isWalkable()\n\t\t\t\t\t&& !otherPlayerOnTile(location, -1)) {\n\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\treturn location;\n\t\t\t}\n\t\t}\n\t}", "public MahjongSolitaireMove findMove()\n {\n // MAKE A MOVE TO FILL IN \n MahjongSolitaireMove move = new MahjongSolitaireMove();\n\n // GO THROUGH THE ENTIRE GRID TO FIND A MATCH BETWEEN AVAILABLE TILES\n for (int i = 0; i < gridColumns; i++)\n {\n for (int j = 0; j < gridRows; j++)\n {\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[i][j];\n if (stack1.size() > 0)\n {\n // GET THE FIRST TILE\n MahjongSolitaireTile testTile1 = stack1.get(stack1.size()-1);\n for (int k = 0; k < gridColumns; k++)\n {\n for (int l = 0; l < gridRows; l++)\n {\n if (!((i == k) && (j == l)))\n { \n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[k][l];\n if (stack2.size() > 0) \n {\n // AND TEST IT AGAINST THE SECOND TILE\n MahjongSolitaireTile testTile2 = stack2.get(stack2.size()-1);\n \n // DO THEY MATCH\n if (testTile1.match(testTile2))\n {\n // YES, FILL IN THE MOVE AND RETURN IT\n move.col1 = i;\n move.row1 = j;\n move.col2 = k;\n move.row2 = l;\n return move;\n }\n }\n }\n }\n }\n }\n }\n }\n // WE'VE SEARCHED THE ENTIRE GRID AND THERE\n // ARE NO POSSIBLE MOVES REMAINING\n return null;\n }", "public Move makeSubsequentMove(){\n Move move = null;\n maxScore = 0;\n bestWord = new ArrayList<Tile>();\n for (Anchor anchor : findAnchors()){\n ArrayList<Tile> inputTiles = new ArrayList<Tile>(tray);\n inputTiles.add(anchor.anchorTile);\n findHighestScoringWord(inputTiles, new ArrayList<Tile>(), \"\", 0, anchor);\n }\n if (bestWord == null || bestWord.size() == 0){\n //should i have some kind of get new tray of tiles thing?\n return move;\n } else {\n int startCol;\n int startRow;\n if (currentAnchor.isAcross()){\n startCol = currentAnchor.col - getAnchorPosition(currentAnchor, bestWord);\n startRow = currentAnchor.row;\n } else {\n startCol = currentAnchor.col;\n startRow = currentAnchor.row - getAnchorPosition(currentAnchor, bestWord);\n }\n\n move = new Move(bestWord , startRow , startCol ,currentAnchor.isAcross(), maxScore , bot);\n //move.execute(Board?);\n }\n return move;\n }", "private void findFood() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\tlogger.error(\"Should not happen\");\n\t\t\treturn;\n\t\t}\n\n\t\t_food = null;\n\t\tfloat distance = 0;\n\t\t\n\t\tfor (FoodEntry entry : map.values()) { \n\t\t\tfloat d = _obj.getPPosition().sub(entry.obj.getPPosition()).length();\n\t\t\tif (_food == null || d < distance) { \n\t\t\t\t_food = entry.obj;\n\t\t\t\tdistance = d;\n\t\t\t}\n\t\t}\n\t}", "public int[] bestLandingSpot(int fuelAvailable) {\n // DO NOT CHANGE THE METHOD SIGNATURE\n return new int[] { 0, 0 };\n }", "private Queue<Position> pathToClosest(MyAgentState state, Position start, int goal) {\n\t\tQueue<Position> frontier = new LinkedList<Position>();\n\t\tSet<String> enqueued = new HashSet<String>();\n\t\tMap<Position, Position> preceedes = new HashMap<Position, Position>();\n\t\tfrontier.add(start);\n\t\tenqueued.add(start.toString());\n\n\t\twhile (!frontier.isEmpty()) {\n\t\t\tPosition pos = frontier.remove();\n\t\t\tif (state.getTileData(pos) == goal) {\n\t\t\t\treturn toQueue(preceedes, pos, start);\n\t\t\t}\n\t\t\t\n\t\t\tfor (Position neighbour : pos.neighbours()) {\n\t\t\t\tif (!enqueued.contains(neighbour.toString()) && state.getTileData(neighbour) != state.WALL) {\n\t\t\t\t\tpreceedes.put(neighbour, pos);\n\t\t\t\t\tfrontier.add(neighbour);\n\t\t\t\t\tenqueued.add(neighbour.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}", "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 List<Float> getRobotPosition() throws CallError, InterruptedException {\n return (List<Float>)service.call(\"getRobotPosition\").get();\n }", "public void robotInit() \n {\n RobotMap.init();\n\n driveTrain = new DriveTrain();\n gripper = new Gripper();\n verticalLift = new VerticalLift();\n\n // OI must be constructed after subsystems. If the OI creates Commands \n //(which it very likely will), subsystems are not guaranteed to be \n // constructed yet. Thus, their requires() statements may grab null \n // pointers. Bad news. Don't move it.\n\n oi = new OI();\n\n autonomousChooser = new SendableChooser();\n autonomousChooser.addDefault( \"Auto: Do Nothing\" , new DoNothing () );\n autonomousChooser.addObject ( \"Auto: Drive To Auto Zone\" , new DriveToAutoZone () );\n autonomousChooser.addObject ( \"Auto: Drive To Auto Zone (Bump)\" , new DriveToAutoZoneBump () );\n //autonomousChooser.addObject ( \"Auto: Get One (Long)\" , new GetOneLong () );\n //autonomousChooser.addObject ( \"Auto: Get One (Short)\" , new GetOneShort () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Bump)\" , new GetOneRecycleBin () );\n autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Side)\" , new GetRecycleBinSide () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Backwards)\" , new GetOneRecycleBinBackwards () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Backwards, Bump)\", new GetOneRecycleBinBackwardsBump() );\n //autonomousChooser.addObject ( \"Auto: Get Two (Short)\" , new GetTwoShort () );\n //autonomousChooser.addObject ( \"Auto: Get Two Short (Special)\" , new GetTwoShortSpecial () );\n //autonomousChooser.addObject ( \"Auto: Get Two (Long, From left)\" , new TwoLongFromLeft () );\n //autonomousChooser.addObject ( \"Auto: Get Two (Long, From right)\" , new TwoLongFromRight () );\n autonomousChooser.addObject ( \"Auto: Get One Tote and Recycle Bin\" , new OneRecycleBinAndTote () );\n autonomousChooser.addObject ( \"Auto: Get One Tote and Recycle Bin (Bump)\" , new OneRecycleBinAndToteBump () );\n SmartDashboard.putData( \"Autonomous\", autonomousChooser );\n\n // instantiate the command used for the autonomous period\n //autonomousCommand = new RunAutonomousCommand();\n\n m_USBVCommand = new UpdateSBValuesCommand();\n m_USBVCommand.start();\n \n frame = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);\n /*\n // the camera name (ex \"cam0\") can be found through the roborio web interface\n session = NIVision.IMAQdxOpenCamera(\"cam1\",\n NIVision.IMAQdxCameraControlMode.CameraControlModeController);\n NIVision.IMAQdxConfigureGrab(session);\n \n NIVision.IMAQdxStartAcquisition(session);\n */\n /*\n camServer = CameraServer.getInstance();//.startAutomaticCapture(\"cam1\");\n camServer.setQuality(30);\n \n cam = new USBCamera(\"cam1\");\n cam.openCamera();\n cam.setFPS(60);\n \n cam.setSize(320, 240);\n cam.updateSettings();\n */\n }", "public Actor getLocation(Location currentLocation, GameMap map) {\n Map<Actor, Location> dinosaursList = new HashMap<>();\n dinosaursList = getAllActors(map);\n Location minimalLocation = null;\n\n for (Map.Entry<Actor, Location> spot: dinosaursList.entrySet()) {\n Actor actor = spot.getValue().getActor();\n int x = spot.getValue().x();\n int y = spot.getValue().y();\n Location there = map.at(x,y);\n if (actor instanceof Dinosaur) {\n if (currentLocation != there) {\n if (minimalLocation == null) {\n minimalLocation = there;\n } else if (super.distance(currentLocation, there) < super.distance(currentLocation, minimalLocation)) {\n minimalLocation = there;\n }\n }\n }\n }\n\n return map.getActorAt(minimalLocation);\n }", "public TargetReport retrieveBestTarget()\n\t{\n\t\t// get targets...\n\t\tgetTargetReports(allTargets);\n//\t\tSystem.out.println(\"All Targets: \" + allTargets);\n\t\t\n\t\t// and find the best one\n\t\tTargetReport bestTarget = null;\n\t\tdouble bestScore = 0;\n\t\tfor (TargetReport target : allTargets)\n\t\t{\n\t\t\t// Eliminate targets based on range\n\t\t\tdouble targetRange = getRangeToTarget(target);\n\t\t\tif (targetRange > MAX_REASONABLE_RANGE || targetRange < MIN_REASONABLE_RANGE)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// When DRIVERS are lining up, eliminate based on the assumption that the target is aligned.\n\t\t\t// (targetCloseToCenter is set to true during teleop, because we would expect it to be with human drivers)\n\t\t\tif (targetCloseToCenter && Math.abs(target.centerX - IMAGE_WIDTH / 2) > CENTER_ZONE_SIZE)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// add score for distance from throttle-based guess\n\t\t\tguessedRange = MAX_REASONABLE_RANGE*0.5*(-Robot.oi.UtilStick.getThrottle() + 1);\n\t\t\tif (Math.abs(guessedRange) > 0.01)\n\t\t\t{\n\t\t\t\t// give a bunch of weight (see TargetReport) based on closesness to guessedRange\n\t\t\t\ttarget.addScoreFromDistance(guessedRange, targetRange);\n\t\t\t\t\n\t\t\t\t// highly prioritize a target close to a guess (this basically overrides the above line...)\n\t\t\t\tif (Math.abs(guessedRange - targetRange) < GUESS_ACCURACY_TOLERANCE)\n\t\t\t\t{\n\t\t\t\t\tbestTarget = target;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// if a target is better than the best, it's now the best\n\t\t\tif (target.getCumulativeScore() > bestScore)\n\t\t\t{\n\t\t\t\tbestTarget = target;\n\t\t\t\tbestScore = target.getCumulativeScore();\n\t\t\t}\n\t\t}\n\t\tallTargets.clear(); // we thought this might have been taking up too much memory, so we cleared it once we were done with it. (It wasn't the issue)\n\t\t\n\t\t// determine if in launcher range to target and set notification based on this\n\t\tcurrentRangeToBestTarget = getRangeToBestTarget();\n\t\tif (Robot.launcherWheels.inRange(currentRangeToBestTarget))\n\t\t\tRobot.launcherstatus.setInRange();\n\t\telse\n\t\t\tRobot.launcherstatus.setOutOfRange();\n\n\t\t// if we've found one, cache and return it\n\t\t// otherwise, return null (it will just default to the first value of bestTarget)\n\t\tcurrentBestTarget = bestTarget;\n\t\t\n\t\t// ALSO, report bestTarget to Driver station\n//\t\tsendBestTargetReport(); // Didn't work, see below\n\t\t\n// \tSystem.out.println(currentBestTarget);\n\t\t\n\t\treturn bestTarget;\n\t}", "static void startSolution(Tower t) {\n\t\t// store reference to tower\n\t\ttower = t;\n\t\t// get start tower array\n\t\tint[] discs = tower.startTower();\n\t\t// to keep track unique discs\n\t\tHashSet<Integer> set = new HashSet<Integer>();\n\t\t// populate set\n\t\tfor (int i = 0; i < discs.length; i++)\n\t\t\tset.add(discs[i]);\n\t\t// number of unique elems in nums\n\t\tint n = set.size();\n\t\t// show start configuration\n\t\tSystem.out.println(tower);\n\t\t// start solution\n\t\tloese(n, 'a', 'b', 'c');\n\t}", "private void detectParkingSlot()\r\n\t{\t\t\r\n\t\tPoint PosS = new Point(0,0);\r\n\t\tPoint PosE = new Point(0,0);\r\n\t\t\r\n\t\tdouble sum_F = 0;\r\n\t\tdouble sum_B = 0;\r\n\t\t\r\n\t\tdouble distance_F = 0;\r\n\t\tdouble distance_B = 0;\r\n\t\t\r\n\t\tint SlotID = Pk_counter;\r\n\t\tINavigation.ParkingSlot.ParkingSlotStatus SlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\r\n\t\tshort axe = getHeadingAxe();\r\n\t\t\r\n\t\tfor (int i = 1; i <= 4; i++)\r\n\t\t{\r\n\t\t\tPk_DIST_FS[i] = Pk_DIST_FS[i-1];\r\n\t\t\tsum_F = Pk_DIST_FS[i] + sum_F;\r\n\t\t\t\r\n\t\t\tPk_DIST_BS[i] = Pk_DIST_BS[i-1];\r\n\t\t\tsum_B = Pk_DIST_BS[i] + sum_B;\r\n\t\t}\r\n\t\t\r\n\t\tPk_DIST_FS[0] = frontSensorDistance;\r\n\t\t//distance_F = (sum_F + Pk_DIST_FS[0])/5;\r\n\t\tdistance_F = frontSensorDistance;\r\n\t\t\r\n\t\tPk_DIST_BS[0] = backSideSensorDistance;\r\n\t\t//distance_B = (sum_B + Pk_DIST_BS[0])/5;\r\n\t\tdistance_B = backSideSensorDistance;\r\n\t\t\r\n\t\t//LCD.drawString(\"Dist_F: \" + (distance_F), 0, 6);\r\n\t\t//LCD.drawString(\"Dist_B: \" + (distance_B), 0, 7);\r\n\t\t\r\n\t\t// Saving the begin point of the PS\r\n\t\tif ((distance_F <= TRSH_SG) && (Pk_burstFS == 0))\r\n\t\t{\r\n\t\t\tPk_PosF1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 1;\r\n\t\t\tPk_burstFE = 0;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B <= TRSH_SG) && (Pk_burstRS == 0))\r\n\t\t{\r\n\t\t\tPk_PosR1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 1;\r\n\t\t\tPk_burstRE = 0;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// Saving the end point of the PS\r\n\t\tif ((distance_F >= TRSH_SG) && (Pk_burstFE == 0))\r\n\t\t{\r\n\t\t\tPk_PosF2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 0;\r\n\t\t\tPk_burstFE = 1;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B >= TRSH_SG) && (Pk_burstRE == 0))\r\n\t\t{\r\n\t\t\tPk_PosR2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 0;\r\n\t\t\t//burstRE = 1;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\r\n\t\tif (Po_RoundF == 0)\t\t\t// Saving new parking slots\r\n\t\t{\t\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_counter < 10))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\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{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_counter] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\tPk_counter ++;\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t\t\r\n\t\t\t\tSound.beepSequence();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\t\t\t\t\t// Updating the old slots\r\n\t\t{\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_update <= Pk_counter))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\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{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_update] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\t\r\n\t\t\t\tif (Pk_update < Pk_counter)\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update ++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn; // data are saved in the shared variable\r\n\t}", "private SolarSystem findClosestSolarSystem(Point p) {\n SolarSystem forreturn = solarSystemLocations.get(p);\n if (forreturn == null) {\n Point[] points = new Point[solarSystemLocations.keySet().size()];\n solarSystemLocations.keySet().toArray(points);\n Point closest = points[0];\n for (Point test : points) {\n if (closest.distance(p.x, p.y) > test.distance(p.x, p.y)) {\n closest = test;\n }\n }\n if (closest.distance(p.x, p.y) < 10) {\n forreturn = solarSystemLocations.get(closest);\n }\n }\n return forreturn;\n }", "public void findFastestRoute(Point2D start, Point2D end){\n shortestPath = null;\n try {\n RouteFinder routeFinder = new RouteFinder(start, end); //Create a RouteFinder and let it handle it.\n travelMethod(routeFinder);\n routeFinder.setFastestRoute();\n fastestPath = routeFinder.getFastestPath(); //retrieve the fastest route from it\n setTravelInfo(routeFinder);\n RoutePlanner routePlanner = new RoutePlanner(fastestPath); //create a routePlanner to get direction for path\n addToDirectionPane(routePlanner.getDirections());\n }catch(IllegalArgumentException | NullPointerException e){\n addToDirectionPane(new String[]{\"No fastest path between the two locations was found\"});\n setTravelInfo(null);\n fastestPath = null;\n\n }\n\n repaint();\n\n }", "@Override\n public APosition getFocusPoint() {\n\n // === Handle UMT ==========================================\n \n if (AGame.isUmtMode()) {\n AUnit firstUnit = Select.ourRealUnits().first();\n if (firstUnit != null) {\n return getUmtFocusPoint(firstUnit.getPosition());\n }\n else {\n return null;\n }\n }\n \n // =========================================================\n\n // Try going near enemy base\n// Position enemyBase = AtlantisEnemyInformationManager.getEnemyBase();\n APosition enemyBase = AEnemyUnits.getEnemyBase();\n if (enemyBase != null) {\n// \tSystem.out.println(\"focus on enemy base \" + enemyBase);\t//TODO debug\n return enemyBase;\n }\n\n // Try going near any enemy building\n AFoggedUnit enemyBuilding = AEnemyUnits.getNearestEnemyBuilding();\n if (enemyBuilding != null) {\n// \tSystem.out.println(\"focus on enemy bldg \" + enemyBuilding.getPosition());\t//TODO debug\n return enemyBuilding.getPosition();\n }\n\n // Try going to any known enemy unit\n AUnit anyEnemyUnit = Select.enemy().first();\n if (anyEnemyUnit != null) {\n \t//System.out.println(\"focus on enemy unit\");\t//TODO debug\n return anyEnemyUnit.getPosition();\n }\n \n // Try to go to some starting location, hoping to find enemy there.\n BaseLocation startLocation = AMap.getNearestUnexploredStartingLocation(Select.mainBase().getPosition());\n if (startLocation != null) {\n \t//System.out.println(\"focus on start location\");\t//TODO debug\n return APosition.create(startLocation.getPosition());\n }\n\n // Absolutely no enemy unit can be found\n return null;\n }", "protected RobotCoordinates getRobotCoordinates() { return currentPos; }", "public void adjustInitialPosition() {\n\n //TelemetryWrapper.setLine(1,\"landFromLatch...\");\n runtime.reset();\n double maxLRMovingDist = 200.0; //millimeters\n double increamentalDist = 50.0;\n while ( runtime.milliseconds() < 5000 ) {\n int loops0 = 0;\n while ((loops0 < 10) && ( mR.getNumM() == 0 )) {\n mR.update();\n loops0 ++;\n }\n if (mR.getNumM() <= 1) {\n int loops = 0;\n while ( mR.getNumM() <= 1 )\n driveTrainEnc.moveLeftRightEnc(increamentalDist, 2000);\n continue;\n } else if ( mR.getHAlignSlope() > 2.0 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED,Math.atan(mR.getHAlignSlope()),2000);\n continue;\n } else if (! mR.isGoldFound()) {\n\n driveTrainEnc.moveLeftRightEnc(increamentalDist,2000);\n continue;\n } else if ( mR.getFirstGoldAngle() > 1.5 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED, mR.getFirstGoldAngle(),2000);\n continue;\n }\n }\n driveTrainEnc.stop();\n }", "public void locateParkedCar() {\n\t\tthis.generalRequest(LocalRequestType.LOCATE);\n\t}", "@Override\n /**\n * Selects a move based on the current game state\n */\n public Move selectMove() {\n Game game = this.game.copy();\n List<Move> moves = game.getValidMoves(this.player);\n Collections.shuffle(moves);\n\n // Create a thread pool\n Executor executor = Executors.newFixedThreadPool(this.threadCount);\n CompletionService<MinimaxEngineWorker> service = new ExecutorCompletionService<MinimaxEngineWorker>(executor);\n\n // Determine the value of each move using the thread pool\n for (Move move : moves) {\n service.submit(new MinimaxEngineWorker(game, move, this.hashMap));\n }\n\n Move bestMove = null;\n double bestMoveValue = Double.NEGATIVE_INFINITY;\n int movesSize = moves.size();\n long moveCount = 0;\n long hashMapHits = 0;\n for (int i = 0; i < movesSize; i++) {\n try {\n // Block until a worker thread finishes\n MinimaxEngineWorker worker = service.take().get();\n\n // Report progress\n moveCount += worker.moveCount;\n hashMapHits += worker.hashMapHits;\n this.setProgress((double) i / movesSize, moveCount, hashMapHits);\n\n // Update the best move\n if (bestMove == null || worker.moveValue >= bestMoveValue) {\n bestMove = worker.move;\n bestMoveValue = worker.moveValue;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n }\n \n // Clear the hashmap\n this.hashMap.clear();\n Runtime.getRuntime().gc();\n\n return bestMove;\n }", "@Override\n public Integer call() throws Exception {\n boolean stillLooking = true; // Keep checking spots if they are open by keeping keeping still looking if we find an x or o in a spot we just generated a random number for.\n Integer val = 0;\n\n // While loop -> looks for an empty space\n while(stillLooking ) { // Infinite loop\n Random r = new Random(); // Creating a random number form 1 - 9\n val = r.nextInt(9);\n if(board.get(val) == 'x' || board.get(val) == 'o') { // Check if the spot the random generator picked has a x or an o already?\n stillLooking = true;\n }\n else {stillLooking = false;} // Check if the spot the random generator picked is empty -> then kick out of while loop\n }\n // Once an empty space is found delay for 1 second, print out the found index that is free and return that valu\n Thread.sleep(150);\n System.out.println(\"\\n\" + \"player: \" + move + \" chooses index: \"+val);\n return val;\n }", "public static void main(String[] args) {\n\t\t\t\n\t\t\t//2. create an array of 5 robots.\n\t\t\tRobot[] a = new Robot[5];\n\t\t\t//3. use a for loop to initialize the robots.\n\t\t\tfor(int i = 0; i<a.length; i++) {\n\t\t\t\ta[i] = new Robot();\n\t\t\t\ta[i].setX(800-i*125);\n\t\t\t\ta[i].setY(400);\n\t\t\t}\n\t\t\t\t//4. make each robot start at the bottom of the screen, side by side, facing up\n\t\t\n\t\t\t//5. use another for loop to iterate through the array and make each robot move \n\t\t // a random amount less than 50.\n\t \n\t\t\t//6. use a while loop to repeat step 5 until a robot has reached the top of the screen.\n\t \tboolean top = false;\n\t \twhile(top == false) {\n\t \t\tfor(int x = 0; x<a.length; x++) {\n\t \t\t\tif(a[x].getY() <= 0) {\n\t \t\t\t\ttop = true;\n\t \t\t\t\tint robotNum = 5-x;\n\t \t\t\t\tJOptionPane.showMessageDialog(null, \"robot #\" + robotNum + \" is the winner\");\n\t \t\t\t}\n\t \t\t} \tfor(int j = 0; j < a.length; j++) {\n\t \t\tint r = new Random().nextInt(50);\n\t \t\ta[j].move(r);\n\t \t}\n\t \t}\n\t\t\t//7. declare that robot the winner and throw it a party!\n\t \t\n\t\t\t//8. try different races with different amounts of robots.\n\t \t\n\t\t //9. make the robots race around a circular track.\n\t\t}", "public static void searchAlgortihm(int x, int y)\n\t{\n\t\tint dx = x;\n\t\tint dy = y;\n\t\tint numMovements = 1; // variable to indicate the distance from the user\n\t\t\n\t\t//check starting position\n\t\tcheckLocation(dx,dy, x, y);\n\n\t\tint minCoords = MAX_COORDS;\n\t\tminCoords *= -1; // max negative value of the grid\n\n\t\t// while - will search through all coordinates until it finds 5 events \n\t\twhile(numMovements < (MAX_COORDS*2)+2 && (closestEvents.size() < 5))\n\t\t{\n\t\t\t//first loop - \n\t\t\tfor(int i = 1; i <= 4; i++)\n\t\t\t{\n\t\t\t\tif(i == 1){ // // moving south-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j-x;\n\t\t\t\t\t\tdx *= -1; // reverse sign\n\t\t\t\t\t\tdy = (numMovements-j)+y;\n\t\t\t\t\t\tif((dx >= minCoords) && (dy <= MAX_COORDS)) // only check the coordinates if they are on the grid\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"1 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 2){ // moving south-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)-x;\n\t\t\t\t\t\tdx *= -1; // change sign\n\t\t\t\t\t\tdy = j-y; \n\t\t\t\t\t\tdy *= -1; // change sign\n\t\t\t\t\t\tif((dx >= minCoords) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"2 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 3){ // moving north-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j+x;\n\t\t\t\t\t\tdy = (numMovements-j)-y;\n\t\t\t\t\t\tdy *= -1;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"3 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 4){ // moving north-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)+x;\n\t\t\t\t\t\tdy = j+y;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy <= MAX_COORDS))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"4 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// increment the number of movements, from user coordinate\n\t\t\tnumMovements++;\n\n\t\t} // End of while\n\t}", "public static void main(String[]args) {\n\t\t//2. create an array of 5 robots.\n\t\tRobot[] potato = new Robot[3];\n\t\t//3. use a for loop to initialize the robots.\n\t\tfor(int i = 0; i<potato.length; i++) {\n\t\t\tpotato[i]= new Robot();\n\t\t\t//4. make each robot start at the bottom of the screen, side by side, facing up\n\t\t\t//potato[i].setX(i*100+50);\n\t\t\t//potato[i].setY(500);\n\t\t\tpotato[i].setX(250);\n\t\t\tpotato[i].setSpeed(100);\n\t\t}\n\tpotato[0].setPenColor(Color.red);\n\tpotato[1].setPenColor(Color.blue);\n\tpotato[2].setPenColor(Color.green);\n\tpotato[0].penDown();\n\tpotato[1].penDown();\n\tpotato[2].penDown();\n\t\n\t\t//5. use another for loop to iterate through the array and make each robot move \n\t\t// a random amount less than 50.\n\t\tRandom ran = new Random();\n\t\t\n\t\tboolean done = false;\n\tint x =0;\n\tRobot rob = new Robot();\n\trob.penDown();\n\trob.setSpeed(100);\n\trob.setX(300);\n\tfor(int i = 0; i < 360; i++) {\n\t\trob.move(2);\n\t\trob.turn(1);\n\t}\n\trob.penUp();\n\trob.move(1000);\n\tRobot r2 = new Robot();\n\tr2.penDown();\n\tr2.setSpeed(100);\n\tr2.setX(200);\n\tfor(int i = 0; i < 360; i++) {\n\t\tr2.move(4);\n\t\tr2.turn(1);\n\t}\n\tr2.penUp();\n\tr2.move(1000);\n\t\n\twhile(!done) {\n\t\tfor(int i = 0; i<potato.length&&!done; i++) {\t\n\t\t\tint u = ran.nextInt(50)+1;\n\t\t\tfor(int y = 0;y<u ;y++) {\n\t\t\tpotato[i].move(3);\n\t\t\tpotato[i].turn(1);\n\t\t\t}\n\t\t\tx=i+1;\n\t\t\tif(potato[i].getX()<=252) {\n\t\t\t\tdone=true;\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\t//6. use a while loop to repeat step 5 until a robot has reached the top of the screen.\n\n\t//7. declare that robot the winner and throw it a party!\n\t\tSystem.out.println(\"The fastest robot is robot #\" + x);\n\t//8. try different races with different amounts of robots.\n\t\t\n\t//9. make the robots race around a circular track.\n\t\n}", "public abstract int getSpotsNeeded();", "@Override\n\tpublic boolean startSearch() {\n\t\tString str = \"\";\n\t\t\n\t\tDimension d = view.getInit();\n\t\tif (d == null) {\n\t\t\tstr = str + \"Falta la posicion de inicio.\\n\";\n\t\t} else {\n\t\t\ty0 = (int) d.getHeight();\n\t\t\tx0 = (int) d.getWidth();\n\t\t}\n\t\t\n\t\td = view.getGoal();\n\t\tif (d == null) {\n\t\t\tstr = str + \"Falta la posicion de meta.\\n\";\n\t\t} else {\n\t\t\tyf = (int) d.getHeight();\n\t\t\txf = (int) d.getWidth();\n\t\t}\n\t\t\n\t\tif (view.isBreadth()) {\n\t\t\tstrategy = new Breadth();\n\t\t} else if (view.isDepth()) {\n\t\t\tstrategy = new Depth();\n\t\t} else if (view.isAStar()) {\n\t\t\tstrategy = new AStar();\n\t\t\tif (view.isH0()) {\n\t\t\t\theuristic = Horse.H0;\n\t\t\t} else if (view.isH1()) {\n\t\t\t\theuristic = Horse.H1;\n\t\t\t} else if (view.isH2()) {\n\t\t\t\theuristic = Horse.H2;\n\t\t\t} else\n\t\t\t\tstr = str + \"Falta por escoger el tipo de heur’stica.\\n\";\n\t\t} else\n\t\t\tstr = str + \"Falta la estrategia de bœsqueda.\\n\";\n\t\t\n\t\tboard = view.getBoard();\n\t\t\n\t\tif (str.equals(\"\")) {\n\t\t\trootNode = new Node(new Horse(x0,y0,xf,yf, board, heuristic));\n\t\t}\n\t\t\n\t\tif (view.isTree()) {\n\t\t\tif (str.equals(\"\"))\n\t\t\t\tsearch = new Tree(rootNode, strategy);\n\t\t} else if (view.isGraph()) {\n\t\t\tif (str.equals(\"\"))\n\t\t\t\tsearch = new Graph(rootNode, strategy);\n\t\t} else \n\t\t\tstr = str + \"Falta el algoritmo de bœsqueda.\\n\";\n\t\t\n\t\tif (!str.equals(\"\")) {\n\t\t\tview.showError(str);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tgoSearch();\n\t\treturn true;\n\t}", "private void locateBestMatch(int queryStartIdx){\n \n double dist;\n double bsfDist = Double.MAX_VALUE;\n int bsfIdx = -1;\n\n double[] query = zNormalise(series, queryStartIdx, this.windowSize, false);\n double[] comparison;\n\n for(int comparisonStartIdx = 0; comparisonStartIdx <= seriesLength-windowSize; comparisonStartIdx+=stride){\n \n // exclusion zone +/- windowSize/2 around the window\n if(comparisonStartIdx >= queryStartIdx-windowSize*1.5 && comparisonStartIdx <= queryStartIdx+windowSize*1.5){\n continue;\n }\n \n // using a bespoke version of this, rather than the shapelet version, for efficiency - see notes with method\n comparison = zNormalise(series, comparisonStartIdx, windowSize, false);\n dist = 0;\n\n for(int j = 0; j < windowSize;j++){\n dist += (query[j]-comparison[j])*(query[j]-comparison[j]);\n if(dist > bsfDist){\n dist = Double.MAX_VALUE;\n break;\n }\n }\n\n if(dist < bsfDist){\n bsfDist = dist;\n bsfIdx = comparisonStartIdx;\n }\n\n }\n \n this.distances[queryStartIdx] = bsfDist;\n this.indices[queryStartIdx] = bsfIdx;\n }", "public String findBestMatch()\n\t{\t\t\n\t\tif (robot.containsUserAgent(\"cis455crawler\"))\n\t\t{\n\t\t\tbest_match = \"cis455crawler\";\n\t\t}\n\t\telse if (robot.containsUserAgent(\"*\"))\n\t\t{\n\t\t\tbest_match = \"*\";\n\t\t}\n\t\treturn best_match;\n\t}", "public Point getStartPoint() {\n // First, this is Settler's location\n UnitList units = unitService.findByClassUuid(Settlers.CLASS_UUID);\n if (units != null && !units.isEmpty()) {\n return units.getAny().getLocation();\n }\n\n // If Settlers were destroyed then it is the first city's location\n City city = cityService.getAny();\n if (city != null) {\n return city.getLocation();\n }\n\n // If there is no cities, then the first Unit's location\n AbstractUnit unit = unitService.getAny();\n if (unit != null) {\n return unit.getLocation();\n }\n\n // If there is no units then (0, 0)\n return new Point(0, 0);\n }", "public Move pickBestMove(Board board) {\n\t\treturn null;\n\t}", "protected Location nextLocation()\n {\n // Get list of neighboring empty locations.\n ArrayList emptyNbrs = emptyNeighbors();\n\n // Remove the location behind, since fish do not move backwards.\n Direction oppositeDir = direction().reverse();\n Location locationBehind = environment().getNeighbor(location(),\n oppositeDir);\n emptyNbrs.remove(locationBehind);\n Debug.print(\"Possible new locations are: \" + emptyNbrs.toString());\n\n // If there are no valid empty neighboring locations, then we're done.\n if ( emptyNbrs.size() == 0 )\n return location();\n\n // Return a randomly chosen neighboring empty location.\n Random randNumGen = RandNumGenerator.getInstance();\n int randNum = randNumGen.nextInt(emptyNbrs.size());\n\t return (Location) emptyNbrs.get(randNum);\n }", "private StatusEnum stepInternal()\n {\n if (initialStep)\n {\n this.tail = map.getStart();\n this.openSet.push(map.getStart());\n initialStep = false;\n }\n\n if (status != StatusEnum.RUNNING)\n return status;\n\n cursor = openSet.pop(); // Pull the cursor off the open set min-heap\n if (cursor == null)\n {\n // The open set was empty, so although we have not reached the goal, there are no more points to investigate\n return StatusEnum.COMPLETED_NOT_FOUND;\n }\n\n while (closedSet.contains(cursor) || !map.isTraversable(cursor))\n {\n // The cursor is in the closed set (meaning it was already investigated) or the cursor point is non traversable on the map\n cursor = openSet.pop();\n if (cursor == null)\n {\n return StatusEnum.COMPLETED_NOT_FOUND;\n }\n }\n\n // The goal has been reached, the path is complete\n if (cursor.equals(map.getGoal()))\n {\n tail = cursor; // Set the member tail to be used in the reconstruction done in getPath()\n return StatusEnum.COMPLETED_FOUND;\n }\n\n // Add the cursor point to the closed set\n closedSet.add(cursor);\n\n // Get the list of neighboring points\n List<WeightedPoint> neighbors = neighborSelector.getNeighbors(map, cursor, heuristic);\n\n // Link the neighbors to the cursor (for backtracking the path when the goal is reached) and calculate their weight\n for (WeightedPoint wp : neighbors)\n {\n if (map.isTraversable(wp.getRow(), wp.getCol()) && !closedSet.contains(wp))\n {\n wp.setFromCost(cursor.getFromCost() + heuristic.distance(cursor, wp));\n\n if (dijkstra)\n {\n wp.setToCost(0);\n }\n else\n {\n wp.setToCost(heuristic.distance(wp, map.getGoal()));\n }\n wp.setPrev(cursor);\n }\n }\n\n if (shuffle)\n {\n // Shuffle the neighbors to randomize the order of testing nodes with the same cost value\n Collections.shuffle( neighbors );\n }\n Collections.sort( neighbors );\n\n // Put the neighbors on the open set\n for (WeightedPoint wp : neighbors)\n {\n if (!openSet.contains(wp))\n openSet.push(wp);\n }\n\n return StatusEnum.RUNNING;\n }", "private Coordinate firstMoveHeuristics(TicTacToeModel model, PossibleBoard possibleBoard) {\n BoardSpace[][] board = possibleBoard.board;\n\n if (possibleBoard.freeSpace == TicTacToeModel.BOARD_DIMENSION*TicTacToeModel.BOARD_DIMENSION) {\n if (board[0][0].getIcon() == Icon.EMPTY) {\n return new Coordinate(0,0);\n } else {\n return new Coordinate(0, TicTacToeModel.BOARD_DIMENSION - 1);\n }\n } else if (possibleBoard.freeSpace == TicTacToeModel.BOARD_DIMENSION*TicTacToeModel.BOARD_DIMENSION - 1) {\n if (model.cornerTaken()) {\n return new Coordinate(TicTacToeModel.BOARD_DIMENSION/2, TicTacToeModel.BOARD_DIMENSION/2);\n } else if (board[TicTacToeModel.BOARD_DIMENSION/2][TicTacToeModel.BOARD_DIMENSION/2].getIcon() != Icon.EMPTY) {\n return new Coordinate(0,0);\n } else {\n return model.getCornerNextToEdge();\n }\n }\n\n return null;\n }", "private Route initialSpotMapping(Route route) {\n\t\tDate start_time = new Date();\n\n\t\t// increment calculation-level & mark route as processed\n\t\tcalculationLevel++;\n\n\t\t// initialize grid-structure\n\t\tSystem.out.println(\"Grid erstellt! -- Datenbankverbindung aufbauen!\");\n\t\t// create first spot\n\t\tSpot spot = generateSpot(route, 0);\n\t\troute.route[0].setSpot(spot);\n\t\troute.route[0].setMappedToSpot(true);\n\t\tspot.spotID = spotQuery.addSpot(spot,session);\n\n\t\tSystem.out.println(spot + \" zur Datenbank hinzufügen\");\n\t\t// create further spots\n\t\tfor (int j = 1; j < route.route.length; j++) {\n\t\t\tInfoBundle infobundle = searchClosestSpot(route.route[j]);\n\t\t\troute.route[j].setClosestSpotInfo(infobundle);\n\t\t\tif (infobundle == null || infobundle.distance >= Spot.stdRadius * 2) {\n\t\t\t\tspot = generateSpot(route, j);\n\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t\tspot.spotID = spotQuery.addSpot(spot,session);\n\t\t\t\tSystem.out.println(spot + \" zur Datenbank hinzufügen\");\n\n\t\t\t} else if (infobundle.inRange) {\n\t\t\t\tspot = spotRepository.getSpot(infobundle.minDistance_spotID);\n\t\t\t\tSystem.out.println(\"Einen Spot aus der Datenbank laden\");\n\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t} else if (!infobundle.inRange && infobundle.distance < Spot.stdRadius * 2) {\n\n\t\t\t}\n\t\t}\n\t\t// complete spot mapping and set neighbors of the created spots\n\t\tlastSpot = null;\n\t\tfor (int j = 0; j < route.route.length; j++) {\n\t\t\t// check for the points that wasn't able to build an own spot or\n\t\t\t// wasn't in the range of a spot\n\t\t\tif (!route.route[j].isMappedToSpot()) {\n\t\t\t\t// search for the closets spots\n\t\t\t\tInfoBundle infobundle = searchClosestSpot(route.route[j]);\n\t\t\t\troute.route[j].setClosestSpotInfo(infobundle);\n\t\t\t\t// check for the current point if its in range of a spot\n\t\t\t\tif (infobundle.inRange) {\n\t\t\t\t\tSystem.out.println(\"Einen Spot aus der Datenbank laden\");\n\t\t\t\t\tspot = spotRepository.getSpot(infobundle.minDistance_spotID);\n\t\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t\t}\n\t\t\t\t// else add it to the \"outside-area\" of the nearest spot,\n\t\t\t\t// because the distance to the nearest spot is too high to be\n\t\t\t\t// in range and is to close to build an own spot\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Einen Spot aus der Datenbank laden\");\n\t\t\t\t\tspot = spotRepository.getSpot(infobundle.minDistance_spotID);\n\t\t\t\t\troute.route[j].setSpot(spot);\n\t\t\t\t\troute.route[j].setMappedToSpot(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// set neighbors of the created spots\n\t\t\tSpot sp = route.route[j].getSpot();\n\t\t\tif (sp != null && lastSpot != null) {\n\t\t\t\tif (!sp.getSpotID().equals(lastSpot.getSpotID())) {\n\t\t\t\t\taddNeighbor(lastSpot,spot);\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tlastSpot = sp;\n\t\t}\n\t\tlastSpot = null;\n\n\t\tDate stop_time = new Date();\n\t\tdouble time = stop_time.getTime() - start_time.getTime();\n\t\ttime = time / 1000;\n\t\tSystem.out.println(\"SPOT FINDING: \" + time + \" seconds\");\n\t\treturn route;\n\t}", "private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}" ]
[ "0.66166466", "0.6445104", "0.6251839", "0.62365997", "0.60446966", "0.6019068", "0.59959465", "0.5924282", "0.59076107", "0.58786905", "0.5856816", "0.5806876", "0.57840747", "0.57226616", "0.5704022", "0.56726", "0.5667038", "0.5663249", "0.5660241", "0.5641468", "0.56381035", "0.5636342", "0.5627439", "0.562337", "0.5610497", "0.5602746", "0.55960643", "0.557635", "0.5545816", "0.55233103", "0.55209315", "0.55204755", "0.55191845", "0.55101246", "0.55059457", "0.54898703", "0.5486619", "0.54848117", "0.54743886", "0.5460823", "0.54553056", "0.5430749", "0.5422856", "0.5422376", "0.5414544", "0.5403906", "0.5401697", "0.5400728", "0.5380479", "0.5380235", "0.5372062", "0.53687495", "0.53654253", "0.53623384", "0.5360527", "0.5354275", "0.53538245", "0.5342168", "0.53410363", "0.5332604", "0.5329298", "0.53206104", "0.5316925", "0.5301255", "0.5283398", "0.5276335", "0.5273659", "0.52657", "0.52544314", "0.52444124", "0.5242888", "0.5239509", "0.52365446", "0.5230484", "0.52272147", "0.52207935", "0.52162075", "0.5203589", "0.5202768", "0.5197602", "0.5192071", "0.51905745", "0.5189425", "0.5169975", "0.5168471", "0.5160195", "0.51595855", "0.5153275", "0.5150743", "0.5130837", "0.5130738", "0.5130293", "0.51289797", "0.5122409", "0.5117167", "0.5108408", "0.5105626", "0.50984067", "0.5090648", "0.50888366", "0.50869524" ]
0.0
-1
init and draw the robot.
public void DrawRobots(List<String> robots) { counter++; rob=new ArrayList<>(); List<String> r=game.getRobots(); String RJ=r.toString(); try { JSONArray j =new JSONArray(RJ); int i=0; int c=0; while(i<j.length()) { String help=""; JSONObject n=(JSONObject) j.get(i); JSONObject jr = n.getJSONObject("Robot"); String s=jr.getString("pos"); String p[]=new String[3]; for (int k = 0; k < s.length(); k++) { if(s.charAt(k)!=',') { help=help+s.charAt(k); } if(c<3&&s.charAt(k)==',') { p[c]=help; c++; help=""; } } p[c]=help; c=0; double x=Double.parseDouble(p[0]); double y=Double.parseDouble(p[1]); double z=Double.parseDouble(p[2]); Point3D p1=new Point3D(x,y,z); int id=jr.getInt("id"); double value=jr.getDouble("value"); int src=jr.getInt("src"); int dest=jr.getInt("dest"); double speed=jr.getDouble("speed"); Robot ro=new Robot(src,p1,id,dest,value,speed); rob.add(ro); i++; if(KMLbool) { try { KML_Logger.write(KmlName, ro.p.x(), ro.p.y(), "Robot", game.timeToEnd()); } catch (FileNotFoundException e) { e.printStackTrace(); } } } }catch(Exception error) { error.printStackTrace(); System.out.println("catch"); } int n=1; for (Robot r1: rob) { StdDraw.setPenRadius(0.030); StdDraw.setPenColor(Color.black); StdDraw.point(r1.p.x(), r1.p.y()); StdDraw.text(rx.get_max() - 0.001 - 0.0075*n, ry.get_max()-0.0005, "robot "+ (n++) + " score: " + r1.value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void robotInit() {\n\n }", "public void robotInit() {\n\n }", "public void robotInit() {\n RobotMap.init();\n driveWithJoystick = new DriveTrain();\n \n oi = new OI();\n }", "public void robotInit() {\n\t\trightFront = new CANTalon(1);\n\t\tleftFront = new CANTalon(3);\n\t\trightBack = new CANTalon(2);\n\t\tleftBack = new CANTalon(4);\n\t\t\n\t\trightBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\tleftBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\t\n\t\tleftBack.set(leftFront.getDeviceID());\n\t\trightBack.set(rightFront.getDeviceID());\n\t\t\n\t\tturn = new Joystick(0);\n\t\tthrottle = new Joystick(1);\n\t}", "public RobotInit() {\n initComponents();\n }", "@Override\n public void robotInit() {\n\toi = new OI();\n\tgameData = new GameData();\n\tcubeVision.start();\n\n\tinitializeDashboard();\n }", "public void robotInit() {\n\t\tmyRobot = new RobotDrive(0,1);\n\t\tteleop = new Teleop(myRobot);\n\t\tauto = new AutonomousDrive(myRobot);\n\t}", "@Override\n public void robotInit()\n {\n System.out.println(\"RoboRIO initializing...\");\n\n // initialize cameras\n camFront = CameraServer.getInstance().startAutomaticCapture(0);\n camBack = CameraServer.getInstance().startAutomaticCapture(1);\n camServForward = CameraServer.getInstance().getServer();\n camServReverse = CameraServer.getInstance().getServer();\n\n camServForward.setSource(camFront);\n //camServReverse.setSource(camBack);\n\n // init joysticks\n Joystick[] joysticks = getControllers();\n\n driveTrain = new DriveTrain();\n hatchArm = new HatchArm();\n cargoArm = new CargoArm();\n ramp = new Ramp();\n\n driver1 = new Buttons(joysticks[0]);\n driver2 = new Buttons(joysticks[1]);\n\n // init gyro\n // try\n // {\n // gyro = new AHRS(I2C.Port.kOnboard);\n // }\n // catch (RuntimeException ex)\n // {\n // // DriverStation.reportError(\"Error instantiating navX-MXP: \" + ex.getMessage(),\n // // true);\n // System.out.println(\"Error initializing gyro!\");\n // }\n\n // // update gyro info on smart dashboard\n // SmartDashboard.putNumber(\"X angle\", gyro.getYaw() + 180);\n // SmartDashboard.putNumber(\"Y angle\", gyro.getPitch() + 180);\n // SmartDashboard.putNumber(\"Z angle\", gyro.getRoll() + 180);\n \n // SmartDashboard.putNumber(\"X vel\", gyro.getVelocityX());\n // SmartDashboard.putNumber(\"Y vel\", gyro.getVelocityY());\n // SmartDashboard.putNumber(\"Z vel\", gyro.getVelocityZ());\n\n // SmartDashboard.putData(gyro);\n updateVars();\n updateShuffleboard();\n\n System.out.println(\"RoboRIO initialization complete.\");\n }", "@Override\n public void robotInit() {\n SmartDashboard.putBoolean(\"CLIMB\", false);\n SmartDashboard.putNumber(\"servo\", 0);\n // Instantiate our RobotContainer. This will perform all our button bindings, and put our\n // autonomous chooser on the dashboard.\n m_robotContainer = new RobotContainer();\n //coast.\n if (RobotMap.DRIVE_TRAIN_DRAGON_FLY_IS_AVAILABLE)\n getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(false, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n\n getRobotContainer().configureButtonBindings();\n getRobotContainer().getTecbotSensors().initializeAllSensors();\n getRobotContainer().getTecbotSensors().getTecbotGyro().reset();\n\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_LEFT_CHASSIS_PORTS);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_RIGHT_CHASSIS_PORTS);\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n\n m_chooser.addOption(\"Move 3 m\", new SpeedReductionStraight(3, .75, 0));\n m_chooser.addOption(\"Rotate 90 degrees\", new SpeedReductionTurn(90, .5));\n m_chooser.setDefaultOption(\"El chido\", new DR01D3K4());\n m_chooser.addOption(\"Collect, go back and shoot\", new CollectPowerCellsGoBackShoot());\n m_chooser.addOption(\"Transport\", new SequentialCommandGroup(new FrontIntakeSetRaw(.75),\n new TransportationSystemSetRaw(.5)));\n m_chooser.addOption(\"Shoot 3PCs n' Move\", new SHOOT_3_PCs_N_MOVE());\n SmartDashboard.putData(\"Auto Mode\", m_chooser);\n\n //camera.setExposureManual(79);\n\n\n }", "@Override\n\tpublic void robotInit() {\n\t\tdt = new DriveTrain();\n\t\t//Initialize drive Talons\n\t\tRobotMap.vspLeft = new WPI_TalonSRX(RobotMap.dtLeft);\n\t\tRobotMap.vspRight = new WPI_TalonSRX(RobotMap.dtRight);\n\t\t//Initialize drive slave Victors\n\t\t//RobotMap.slaveLeft = new WPI_VictorSPX(RobotMap.slaveDriveLeft);\n\t\t//RobotMap.slaveRight = new WPI_VictorSPX(RobotMap.slaveDriveRight);\n\t\t//Set drive slaves to follower mode\n\t\t//RobotMap.slaveLeft.follow(RobotMap.vspLeft);\n\t\t//RobotMap.slaveRight.follow(RobotMap.vspRight);\n\t\t//Initialize drive train\n\t\tRobotMap.rd = new DifferentialDrive(RobotMap.vspLeft, RobotMap.vspRight);\n\t\t//Initialize drive joystick\n\t\tRobotMap.stick = new Joystick(RobotMap.joystickPort);\n\t\t//Disabled drive safety\n\t\tRobotMap.vspLeft.setSafetyEnabled(false);\n\t\tRobotMap.vspRight.setSafetyEnabled(false);\n\t\tRobotMap.rd.setSafetyEnabled(false);\n\t\t//Initialize lift Talon\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(5);\n\t\t//Initialize operator controller\n\t\tRobotMap.controller = new Joystick(RobotMap.controllerPort);\n\t\t//Initialize intake Victors\n\t\tRobotMap.intakeVictorLeft = new WPI_VictorSPX(RobotMap.intakeMaster);\n\t\tRobotMap.intakeVictorRight = new WPI_VictorSPX(RobotMap.intakeSlave);\n\t\t//Set right intake Victor to follow left intake Victor\n\t\tRobotMap.intakeVictorRight.follow(RobotMap.intakeVictorLeft);\n\t\t\n\t\tRobotMap.climberVictorLeft = new WPI_VictorSPX(RobotMap.climberLeftAddress);\n\t\tRobotMap.climberVictorRight = new WPI_VictorSPX(RobotMap.climberRightAddress);\n\t\t\n\t\tRobotMap.climberVictorRight.follow(RobotMap.climberVictorLeft);\n\t\t\n\t\tRobotMap.piston = new DoubleSolenoid(RobotMap.inChannel, RobotMap.outChannel);\n\t\t\n\t\tRobotMap.intakeLifter = new WPI_VictorSPX(2);\n\t\t\n\t\tRobotMap.liftTalon = new WPI_TalonSRX(RobotMap.liftTalonAddress);\n\t\t\n\t\tautoChooser = new SendableChooser();\n\t\tautoChooser.addDefault(\"Drive to baseline\" , new DriveToBaseline());\n\t\tautoChooser.addObject(\"Null auto\", new NullAuto());\n\t\tautoChooser.addObject(\"Switch from right\", new SwitchFromRight());\n\t\tautoChooser.addObject(\"Switch from left\", new SwitchFromLeft());\n\t\tautoChooser.addObject(\"PID from left\", new PIDfromLeft());\n\t\tautoChooser.addObject(\"PID from right\", new PIDfromRight());\n\t\tautoChooser.addObject(\"Scale from right\", new ScaleAutoRight());\n\t\tautoChooser.addObject(\"Scale from left\", new ScaleAutoLeft());\n\t\tautoChooser.addObject(\"PID tester\", new PIDTESTER());\n\t\tautoChooser.addObject(\"Joe use this one\", new leftOnly());\n\t\tSmartDashboard.putData(\"Autonomous mode chooser\", autoChooser);\n\t\t\n\t\t//RobotMap.liftVictor.follow(RobotMap.climberTalon);\n\t\t\n\t\tRobotMap.vspLeft.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\tRobotMap.vspRight.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n\t\t\n\t\tRobotMap.intakeLifted = new DigitalInput(1);\n\t\tRobotMap.isAtTop = new DigitalInput(2);\n\t\tRobotMap.isAtBottom = new DigitalInput(0);\n\t\t\n\t\tRobotMap.vspLeft.configVelocityMeasurementPeriod(VelocityMeasPeriod.Period_100Ms, 1);\n\t\tRobotMap.vspRight.configVelocityMeasurementWindow(64, 1); \n\t\t\n\t\toi = new OI();\n\t}", "public void robotInit() {\n // North.registerCommand(\"setSetpoint\", (params) -> ??, [\"Setpoint\"]);\n // North.registerCondition(\"atSetpoint\", elevator::atSetpoint);\n\n //NOTE: init(name, size, logic provider, drive & nav)\n North.init(/*NorthUtils.readText(\"name.txt\")*/ \"lawn chair\", 24/12, 24/12, drive);\n North.default_drive_controller = HoldController.I;\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n }", "@Override\n public void robotInit() {\n\t\t// set up logging\n\t\tlogger = EventLogging.getLogger(Robot.class, Level.INFO);\n\n // set up hardware\n RobotMap.init();\n\n // set up subsystems\n //initalized drive subsystem, which control motors to move robot\n driveSubsystem = new DriveSubsystem();\n\t\tbuttonSubstyem = new ButtonSubsystem();\n servoSubsystem = new ServoSubsystem();\n wingSubsystem = new WingSubsystem();\n flagSpinnerSubsystem = new FlagSpinnerSubsystem();\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // Add commands to Autonomous Sendable Chooser\n chooser.addDefault(\"Autonomous Command\", new AutonomousCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n }", "@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\tdrivebase.calibrateGyro();\n\t\tSmartDashboard.putData(\"Zero Gyro\", new ZeroGyro());\n\t\tSmartDashboard.putData(\"Calibrate Gyro - WHILE ROBOT NOT MOVING\", new CalibrateGyro());\n\t\tchooser.addDefault(\"Default Prepare Gear Auto\", new PrepareGearManipulator());\n\t\t//shooterModeChooser.addDefault(\"Shooter at Nominal Preset when Pressed\", object);\n\t\t/*chooser.addObject(\"Left Gear Auto\", new LeftGearGroup());\n\t\tchooser.addObject(\"Center Gear Auto\", new CenterGearGroup());*/\n\t//\tchooser.addObject(\"Test Vision Auto\", new TurnTillPerpVision(true));\n\t//\tchooser.addObject(\"Testing turn gyro\", new RotateToGyroAngle(90,4));\n\t\t//chooser.addObject(\"DriveStraightTest\", new GoAndReturn());\n\t\t //UNNECESSARY AUTOS FOR TESTING ^\n\t\tchooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\tchooser.addObject(\"Vision center TESTING!!!\", new TurnTillPerpVision());\n\t\tchooser.addObject(\"Boiler Auto RED\", new BoilerAuto(true));\n\t\tchooser.addObject(\"Boiler Auto BLUE\", new BoilerAuto(false));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t//\tchooser.addObject(\"Center Gear Encoder Auto (do not place )\", new DriveToFace(false, false, false));\n\t\tchooser.addObject(\"Baseline\", new DriveToLeftRightFace(false,false,false,false));\n\t\tchooser.addObject(\"TEST DRIVETANK AUTO\", new DriveTimedTank(0.7,0.7,5));\n\t\tchooser.addObject(\"Side Gear Auto RIGHT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,false));\n\n\t\tchooser.addObject(\"Side Gear Auto LEFT (manual straight lineup)(place)(TURN AFTER AND START CYCLE)\", new DriveStraightSide(true,true));\n\t\t//chooser.addObject(\"Side Gear Auto (place)\", new DriveToLeftRightFace(true,false,false,false));\n\t\t//chooser.addObject(\"Test DriveStraight Auto\", new DriveStraightPosition(10,5));\n\t\t//chooser.addObject(\"Center Gear Encoder Auto (place)\", new DriveStraightCenter());\n\t\t/*InterpreterGroup interp = new InterpreterGroup();\n\t\t(interp.init()){\n\t\t\tchooser.addObject(\"Interpreter\",interp);\n\t\t}*/\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto Chooser\", chooser);\n\n\t\tRobot.drivebase.leftDrive1.setPosition(0);\n \tRobot.drivebase.rightDrive1.setPosition(0);\n \t\n\t\t\n \tRobot.leds.initializei2cBus();\n \tbyte mode = 0;\n \tRobot.leds.setMode(mode);\n \tgearcamera = CameraServer.getInstance();\n\t\t\n \tUsbCamera gearUsb = gearcamera.startAutomaticCapture();\n \tgearUsb.setFPS(25);\n \tgearUsb.setResolution(256, 144);\n\n\t\t//NetworkTable.setClientMode();\n \t//NetworkTable.setIPAddress(\"raspberrypi.local\");\n\t\t\n\t\t\n\t\t/*\n\t\t * new Thread(() -> { UsbCamera goalcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * goalcamera.setResolution(320, 240); goalcamera.setFPS(30);\n\t\t * goalcamera.setBrightness(1); goalcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink goalCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { goalCvSink.grabFrame(source);\n\t\t * goaloutputmat = source; } }).start();\n\t\t * goalPipeline.process(goaloutputmat);\n\t\t * \n\t\t * new Thread(() -> { UsbCamera gearcamera =\n\t\t * CameraServer.getInstance().startAutomaticCapture();\n\t\t * gearcamera.setResolution(320, 240); gearcamera.setFPS(30);\n\t\t * gearcamera.setBrightness(1); gearcamera.setExposureManual(1);\n\t\t * \n\t\t * CvSink gearCvSink = CameraServer.getInstance().getVideo();\n\t\t * \n\t\t * Mat source = new Mat();\n\t\t * \n\t\t * while(!Thread.interrupted()) { gearCvSink.grabFrame(source);\n\t\t * gearoutputmat = source; } }).start();\n\t\t * gearPipeline.process(gearoutputmat);\n\t\t */\n\t}", "public void robotInit() {\n RobotMap.init();\n driveTrain = new DriveTrain();\n oi = new OI();\n flippy = new Flipper();\n flappy = new Flapper();\n autonomousCommand = new AutoFlip();\n \n OI.init();\n CommandBase.init();\n autoChooser = new SendableChooser();\n autoChooser.addDefault(\"Flap Left\", new AutoFlip());\n SmartDashboard.putData(\"Autonomous_Mode\", autoChooser); \n }", "@Override\n\tpublic void robotInit() {\n\t\tleftDriveBack = new VictorSP(0); // PWM Port, madke sure this is set correctly.\n\t\tleftDriveFront = new VictorSP(1);\n\t\t\n\t\trightDriveFront = new VictorSP(2);\n\t\trightDriveBack = new VictorSP(3);\n\t\t\n\t\tleftIntake = new Spark(5);\n\t\trightIntake = new Spark(6);\n\t\t\n\t\tarmMotor = new TalonSRX(10);\n\t\tarmMotor.setNeutralMode(NeutralMode.Brake);\n\t\tarmMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute, 0, 0);\n\t\tarmMotor.configPeakCurrentLimit(30, 0);\n\t\tarmMotor.configPeakCurrentDuration(250, 0);\n\t\tarmMotor.configContinuousCurrentLimit(20, 0);\n\t\tarmMotor.configClosedloopRamp(0.25, 0);\n\t\tarmMotor.configOpenloopRamp(0.375, 0);\n\t\tarmMotor.enableCurrentLimit(true);\n\t\t\n\t\tarmMotor.configPeakOutputForward(1.0, 0);\n\t\tarmMotor.configPeakOutputReverse(-1.0, 0);\n\t\t\n\t\tarmMotor.config_kP(0, 0.0, 0);\n\t\t\n\t\tarmSetpoint = armMotor.getSelectedSensorPosition(0);\n\t\t\n\t\tstick = new Joystick(0);\n\t\tstickReversed = false;\n\t\txbox = new XboxController(1); // USB port, set in driverstation.\n\t\t\n\t\tdriveCamera = CameraServer.getInstance().startAutomaticCapture(0);\n\t}", "public void robotInit() {\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", defaultAuto);\n chooser.addObject(\"My Auto\", customAuto);\n SmartDashboard.putData(\"Auto choices\", chooser);\n \n // camera stuff\n robotCamera = CameraServer.getInstance();\n robotCamera.setQuality(50);\n robotCamera.startAutomaticCapture(\"cam0\");\n\n //our robot stuff\n // myChassis\t= new RobotDrive(0,1);\n leftSide\t= new VictorSP(1);\n rightSide\t= new VictorSP(0);\n spinWheels\t= new TalonSRX(2);\n armLifty\t= new TalonSRX(3);\n drivePad\t= new Joystick(0);\n statesPad\t= new Joystick(1);\n LiveWindow.addActuator(\"stud\", \"talonsrx\", armLifty);\n \n //arm position stuff\n armPosition\t\t= new AnalogInput(0);\n armPortSwitch\t= new DigitalInput(0);\n \n //solenoid stuff\n //solenoidThing = new Solenoid(1);\n \n //init button states\n lBPX\t\t\t= false;\n bIPX\t\t\t= false;\n \n //driver buttons\n ballSpitButton\t= 4;\n ballSuckButton\t= 2;\n \n //state machine variables\n defaultState\t\t= 0;\n portState\t\t\t= 1;\n chevellState\t\t= 2;\n ballGrabState\t\t= 10;\n driveState\t\t\t= 11;\n lowBarState\t\t\t= 8;\n rockState\t\t\t= driveState;\n roughState\t\t\t= driveState;\n moatState\t\t\t= driveState;\n rampartState\t\t= driveState;\n drawState\t\t\t= driveState;\n sallyState\t\t\t= driveState;\n liftOverride\t\t= 0.09;\n terrainStates\t\t= 0;\n autoLiftSpeed\t\t= 1.0;\n armLiftBuffer\t\t= 0.01;\n //port state variables\n portPosition1\t\t= 1.7;\n portPosition2\t\t= 0.9;\n portSwitch\t\t\t= 0;\n //chevell state variables\n chevellPosition1\t= 1.135;\n chevellPosition2\t= 2.0;\n chevellSwitch \t\t= 0;\n chevellWheelSpeed\t= 0.3;\n //ball grab state variables\n ballGrabPosition1\t= 1.35;\n ballGrabSwitch\t\t= 0;\n ballGrabWheelSpeed\t= -0.635;\n ballSpitWheelSpeed\t= 1.0;\n //lowbar state variables\n lowBarPosition\t\t= 1.6;\n lowBarSwitch\t\t= 0;\n //drive state variables\n driveSwitch\t\t\t= 1;\n \n }", "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "@Override\r\n public void robotInit() {\r\n // Instantiate our RobotContainer. This will perform all our button bindings\r\n robotContainer = new RobotContainer();\r\n }", "public void init() {\n robot.init(hardwareMap);\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.liftUpDown.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.blinkinLedDriver.setPattern(RevBlinkinLedDriver.BlinkinPattern.GREEN);\n\n }", "public void robotInit(){\n\t\tSmartDashboard.putNumber(\"Climber Arm Speed: \", 0.5);\n\t\tSmartDashboard.putNumber(\"Climber Winch Speed: \", 0.25);\n\t}", "@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tm_frontRight = new PWMVictorSPX(0);\n\t\tm_frontLeft = new PWMVictorSPX(2);\n\t\tm_backRight = new PWMVictorSPX(1);\n\t\tm_backLeft = new PWMVictorSPX(3);\n\n\t\tx_aligning = false;\n\n\t\tJoy = new Joystick(0);\n\t\tmyTimer = new Timer();\n\n\t\tfinal SpeedControllerGroup m_left = new SpeedControllerGroup(m_frontLeft, m_backLeft);\n\t\tfinal SpeedControllerGroup m_right = new SpeedControllerGroup(m_frontRight, m_backRight);\n\n\t\tm_drive = new DifferentialDrive(m_left, m_right);\n\n\t\tdistanceToTarget = 0;\n\n\t\tcounter = new Counter(9);\n\t\tcounter.setMaxPeriod(10.0);\n\t\tcounter.setSemiPeriodMode(true);\n\t\tcounter.reset();\n\t}", "public void robotInit() {\n\t\t//Get preferences from robot flash memory\n\t\tprefs = Preferences.getInstance();\n\t\tarmCalMinPosition = prefs.getDouble(\"armCalMinPosition\", 0);\n\t\tarmCal90DegPosition = prefs.getDouble(\"armCal90DegPosition\", 0);\n\t\tif (armCalMinPosition==0 || armCal90DegPosition==0) {\n\t\t\tDriverStation.reportError(\"Error: Preferences missing from RoboRio for Shooter Arm position calibration. Shooter arm disabled.\", true);\n\t\t\tshooterArmEnabled = false;\n\t\t} else {\n\t\t\tshooterArmEnabled = true;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tdebugStream = new FileWriter(\"/home/lvuser/debug.log\", true);\n\t\t\tdebugStream.write(\"Robot program started\\n\");\n\t\t\tdebugStream.flush();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not open debug file: \" + e);\n\t\t}\n\n\t\t//Instantiates the subsystems\n\t\tdriveTrain = new DriveTrain();\n\t\tshifter = new Shifter();\n\t\tshooterArm = new ShooterArm();\n\t\tshooter = new Shooter();\n\t\tintake = new Intake();\n\t\tvision = new Vision();\n\t\tpanel = new PowerDistributionPanel();\n\t\tarmPiston = new ArmPiston();\n\n\t\t// OI must be constructed after subsystems. If the OI creates Commands\n\t\t// (which it very likely will), subsystems are not guaranteed to be\n\t\t// constructed yet. Thus, their requires() statements may grab null\n\t\t// pointers. Bad news. Don't move it.\n\t\toi = new OI();\n\n intake.motorCurrentTrigger.whenActive(new IntakeMotorStop());\n\n timerLEDs.start();\n timerTilt.start();\n timerRumble.start();\n \n // instantiate the command used for the autonomous period\n\t\t//autonomousCommand = new AutonomousCommandGroup();\n\t\traiseArm90 = new ShooterArmMoveToSetLocation(90);\n\t\t\n\t\t// Display active commands and subsystem status on SmartDashboard\n\t\tSmartDashboard.putData(Scheduler.getInstance());\n\t\tSmartDashboard.putData(driveTrain);\n\t\tSmartDashboard.putData(shifter);\n\t\tSmartDashboard.putData(shooterArm);\n\t\tSmartDashboard.putData(shooter);\n\t\tSmartDashboard.putData(intake);\n\t\tSmartDashboard.putData(vision);\n\t\tSmartDashboard.putData(armPiston);\n\t}", "@Override\n public void robotInit() \n {\n CommandBase.init();\n PIDCommandBase.init();\n\n CameraServer.getInstance().startAutomaticCapture();\n\n start.addDefault(\"Left\", Autonomous.StartPosition.LEFT);\n start.addObject(\"Center\", Autonomous.StartPosition.CENTER);\n start.addObject(\"Right\", Autonomous.StartPosition.RIGHT);\n SmartDashboard.putData(\"Start\", start);\n \n chooser.addObject(\"Scale\", Autonomous.AutoMode.SCALE);\n chooser.addObject(\"Switch\", Autonomous.AutoMode.SWITCH);\n chooser.addDefault(\"Drive\", Autonomous.AutoMode.DRIVE);\n SmartDashboard.putData(\"Auto Mode\", chooser);\n\n compressor = new Compressor();\n compressor.start();\n }", "public void robotInit() {\n RobotMap.init();\n initDashboardInput();\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n driveTrain = new DriveTrain();\n power = new Power();\n arm = new Arm();\n sensors = new Sensors();\n ballGrabberSubsystem = new BallGrabberSubsystem();\n winch = new Winch();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // instantiate the command used for the autonomous period\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n arcadeDrive = new ArcadeDrive();\n\n readPreferences();\n }", "public void robotInit() {\n\t\t\n\t\tupdateDashboard();\n\t\t\n \tautoChooser = new SendableChooser();\n \tautoChooser.addDefault(\"Default Autonomous does nothing!\", new Default());\n \t// Default Autonomous does nothing\n \tautoChooser.addObject(\"Cross the Low Bar Don't Run This it doesn't work\", new LowBar());\n \tautoChooser.addObject(\"Cross Rough Patch/Stone Wall\", new Main());\n \tautoChooser.addObject(\"Cross the Low Bar, Experimental!\", new LowBarEx());\n \t//autoChooser.addObject(\"If Jonathan lied to us and we can cross twice\", new RoughPatch());\n \tCameraServer server = CameraServer.getInstance();\n\n \tserver.setQuality(50);\n \t\n \tSmartDashboard.putData(\"Autonomous\", autoChooser);\n\n \tserver.startAutomaticCapture(\"cam0\");\n \tLowBar.gyro.reset();\n \t\n \tDriverStation.reportWarning(\"The Robot is locked and loaded. Time to kick some ass guys!\", !(server.isAutoCaptureStarted()));\n\n\t}", "@Override\n public void robotInit() {\n\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n drive = new Drive();\n pDP = new PDP();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n camera1 = CameraServer.getInstance().startAutomaticCapture(0);\n camera2 = CameraServer.getInstance().startAutomaticCapture(1);\n camera1.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen);\n camera2.setConnectionStrategy(VideoSource.ConnectionStrategy.kKeepOpen);\n server = CameraServer.getInstance().getServer();\n flipped = true;\n server.setSource(camera1);\n vexGyro = new AnalogGyro(0);\n vexGyro.setSensitivity(.00175);\n //rightEncoder = new Encoder(0, 1, false);\n //leftEncoder = new Encoder(2, 3, true);\n // Add commands to Autonomous Sendable Chooser\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n chooser.setDefaultOption(\"Autonomous Command\", new AutonomousCommand());\n PixyCamBlock centerBlock = PixyCam2.GetCentermostBlock();\n if(centerBlock == null)\n {\n SmartDashboard.putString(\"target good? \", \"no, is null\");\n }\n else{\n String out = \"Center Block, X: \"+centerBlock.xCenter + \" Y: \"+centerBlock.yCenter;\n SmartDashboard.putString(\"center block data \", out);\n if (centerBlock.yCenter < 200){\n SmartDashboard.putString(\"target good?\", \"YES!!! ycenter less than 200\");\n }\n }\n \n \n\n\n \n \n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n SmartDashboard.putData(\"Auto mode\", chooser);\n SmartDashboard.putBoolean(\"isFlipped\", flipped);\n SmartDashboard.putNumber(\"right encoder\", drive.getRightEncoder());\n SmartDashboard.putNumber(\"left encoder\", drive.getLeftEncoder());\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 }", "public void robotInit()\r\n {\r\n // Initialize all subsystems\r\n CommandBase.init();\r\n // instantiate the command used for the autonomous period\r\n //Initializes triggers\r\n mecanumDriveTrigger = new MechanumDriveTrigger();\r\n tankDriveTrigger = new TankDriveTrigger();\r\n resetGyro = new ResetGyro();\r\n }", "@Override\n\tpublic void robotInit() {\n\t\tfr = new Spark(HardwareMap.PWM.DRIVE_FR);\n\t\tfl = new Spark(HardwareMap.PWM.DRIVE_FL);\n\t\tbr = new Spark(HardwareMap.PWM.DRIVE_BR);\n\t\tbl = new Spark(HardwareMap.PWM.DRIVE_BL);\n\t\t\n\t\t// Create the side modules\n\t\tleftGroup = new SpeedControllerGroup(bl, fl);\n\t\trightGroup = new SpeedControllerGroup(br, fr);\n\n\t\t// Init the the drive train\n\t\tdrive = new DifferentialDrive(leftGroup, rightGroup);\n\t\t\n\t\t//Init the gyro\n\t\tgyro.calibrate();\n\t\tSmartDashboard.putData(\"Gyro\", gyro);\n\t\t\n\t\tdrive.setSafetyEnabled(false);\n\t\tthis.setName(Subsystems.DRIVE);\n\t}", "protected void initialize() {\n Robot.m_drivetrain.resetPath();\n Robot.m_drivetrain.addPoint(0, 0);\n Robot.m_drivetrain.addPoint(3, 0);\n Robot.m_drivetrain.generatePath();\n \n\t}", "public void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\tteleopCommand = new TeleopCommand();\n }", "@Override\n\tpublic void robotInit() //starts once when the code is started\n\t{\n\t\tm_oi = new OI(); //further definition of OI\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\t//SmartDashboard.putData(\"Auto mode\", m_chooser);\n\t\t\n\t\tnew Thread(() -> {\n\t\t\tUsbCamera camera1 = CameraServer.getInstance().startAutomaticCapture();\n\t\t\tcamera1.setResolution(640, 480);\n\t\t\tcamera1.setFPS(30);\n\t\t\tcamera1.setExposureAuto();\n\t\t\t\n\t\t\tCvSink cvSink = CameraServer.getInstance().getVideo();\n\t\t\tCvSource outputStream = CameraServer.getInstance().putVideo(\"Camera1\", 640, 480); \n\t\t\t//set up a new camera with this name in SmartDashboard (Veiw->Add->CameraServer Stream Viewer)\n\t\t\t\n\t\t\tMat source = new Mat();\n\t\t\tMat output = new Mat();\n\t\t\t\n\t\t\twhile(!Thread.interrupted())\n\t\t\t{\n\t\t\t\tcvSink.grabFrame(source);\n\t\t\t\tImgproc.cvtColor(source, output, Imgproc.COLOR_BGR2RGB);//this will show the video in black and white \n\t\t\t\toutputStream.putFrame(output);\n\t\t\t}\t\t\t\t\t\n\t\t}).start();//definition of camera, runs even when disabled\n\t\t\n\t\tdriveStick = new Joystick(0); //further definition of joystick\n\t\tgyroRotate.gyroInit(); //initializing the gyro - in Rotate_Subsystem\n\t\tultrasonic = new Ultrasonic_Sensor(); //further definition of ultrasonic\n\t\tRobotMap.encoderLeft.reset();\n\t\tRobotMap.encoderRight.reset();\n\t\tdriveToDistance.controllerInit();\n\t}", "public void robotInit() {\r\n CommandBase.init();\r\n OI.init();\r\n System.out.println(\"ROBOT READY!\");\r\n }", "public Robot() {\t\n\t\tthis.step = myclass.STD_STEP ; \n\t\tthis.speed = myclass.STD_SPEED ; \n\t\tthis.rightM = new EV3LargeRegulatedMotor(myclass.rightP) ; \n\t\tthis.leftM = new EV3LargeRegulatedMotor(myclass.leftP) ; \n\t}", "static void InitiateDraw() {\n\t\tshape = new GeneralPath();\n\t\ti1.setOverlay(null);\n\t\tOL = new Overlay();\n\t}", "@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}", "public void robotInit() {\n\t\toi = new OI();\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", new ExampleCommand());\n// chooser.addObject(\"My Auto\", new MyfAutoCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n \n //Drive\n //this.DriveTrain = new DriveTrain();\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickLeft);\n \n //Buttons\n // oi.button1.whenPressed(new SetMaxMotorOutput());\n \n //Ultrasonic\n sonic1 = new Ultrasonic(0,1);\n sonic1.setAutomaticMode(true);\n \n }", "public void robotInit() {\r\n\r\n shootstate = down;\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n initialpot = Components.ShooterPot.getAverageVoltage();\r\n //shootpotdown +=initialpot;\r\n //shootpotlow+= initialpot;\r\n //shootpotmiddle+= initialpot;\r\n //shootpothigh+=initialpot;\r\n\r\n }", "public void robotInit() {\n \tboardSubsystem = new BoardSubsystem();\n }", "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}", "public static void init() {\r\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\r\n driveTrainSubsystemleftFront = new Jaguar(1, 1);\r\n\tLiveWindow.addActuator(\"DriveTrainSubsystem\", \"leftFront\", (Jaguar) driveTrainSubsystemleftFront);\r\n \r\n driveTrainSubsystemleftRear = new Jaguar(1, 5);\r\n\tLiveWindow.addActuator(\"DriveTrainSubsystem\", \"leftRear\", (Jaguar) driveTrainSubsystemleftRear);\r\n \r\n driveTrainSubsystemrightFront = new Jaguar(1, 6);\r\n\tLiveWindow.addActuator(\"DriveTrainSubsystem\", \"rightFront\", (Jaguar) driveTrainSubsystemrightFront);\r\n \r\n driveTrainSubsystemrightRear = new Jaguar(1, 7);\r\n\tLiveWindow.addActuator(\"DriveTrainSubsystem\", \"rightRear\", (Jaguar) driveTrainSubsystemrightRear);\r\n \r\n driveTrainSubsystemRobotDrive = new RobotDrive(driveTrainSubsystemleftFront, driveTrainSubsystemleftRear,\r\n driveTrainSubsystemrightFront, driveTrainSubsystemrightRear);\r\n\t\r\n driveTrainSubsystemRobotDrive.setSafetyEnabled(true);\r\n driveTrainSubsystemRobotDrive.setExpiration(0.1);\r\n driveTrainSubsystemRobotDrive.setSensitivity(0.5);\r\n driveTrainSubsystemRobotDrive.setMaxOutput(1.0);\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\r\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n \n //Initialize Drive Train Motors/\n LeftFront = new WPI_TalonSRX(11);\n RightFront = new WPI_TalonSRX(13);\n LeftBack = new WPI_TalonSRX(10);\n RightBack = new WPI_TalonSRX(12);\n RobotDT = new MecanumDrive(LeftFront, LeftBack, RightFront, RightBack);\n \n //Initialize Xbox Controller or Joystick/\n xcontroller1 = new XboxController(0);\n xcontroller2 = new XboxController(1);\n \n //Initialize Cameras/\n RoboCam = CameraServer.getInstance();\n FrontCamera = RoboCam.startAutomaticCapture(0);\n BackCamera = RoboCam.startAutomaticCapture(1);\n\n //GPM Init/\n mGPM = new GPM();\n \n }", "public static void init() {\n driveLeft = new VictorSP(1);\r\n LiveWindow.addActuator(\"Drive\", \"Left\", (VictorSP) driveLeft);\r\n \r\n driveRight = new VictorSP(0);\r\n LiveWindow.addActuator(\"Drive\", \"Right\", (VictorSP) driveRight);\r\n \r\n driveMotors = new RobotDrive(driveLeft, driveRight);\r\n \r\n driveMotors.setSafetyEnabled(false);\r\n driveMotors.setExpiration(0.1);\r\n driveMotors.setSensitivity(0.5);\r\n driveMotors.setMaxOutput(1.0);\r\n\r\n driveEncoderLeft = new Encoder(0, 1, true, EncodingType.k1X);\r\n LiveWindow.addSensor(\"Drive\", \"EncoderLeft\", driveEncoderLeft);\r\n driveEncoderLeft.setDistancePerPulse(0.053855829);\r\n driveEncoderLeft.setPIDSourceType(PIDSourceType.kRate);\r\n driveEncoderRight = new Encoder(2, 3, false, EncodingType.k1X);\r\n LiveWindow.addSensor(\"Drive\", \"EncoderRight\", driveEncoderRight);\r\n driveEncoderRight.setDistancePerPulse(0.053855829);\r\n driveEncoderRight.setPIDSourceType(PIDSourceType.kRate);\r\n driveFrontSonar = new Ultrasonic(4, 5);\r\n LiveWindow.addSensor(\"Drive\", \"FrontSonar\", driveFrontSonar);\r\n \r\n shooterMotor = new VictorSP(3);\r\n LiveWindow.addActuator(\"Shooter\", \"Motor\", (VictorSP) shooterMotor);\r\n \r\n climberMotor = new Spark(2);\r\n LiveWindow.addActuator(\"Climber\", \"Motor\", (Spark) climberMotor);\r\n \r\n gearGrabReleaseSolonoid = new DoubleSolenoid(0, 0, 1);\r\n LiveWindow.addActuator(\"Gear\", \"GrabReleaseSolonoid\", gearGrabReleaseSolonoid);\r\n \r\n powerPanel = new PowerDistributionPanel(0);\r\n LiveWindow.addSensor(\"Power\", \"Panel\", powerPanel);\r\n \r\n cameraMountpan = new Servo(4);\r\n LiveWindow.addActuator(\"CameraMount\", \"pan\", cameraMountpan);\r\n \r\n cameraMounttilt = new Servo(5);\r\n LiveWindow.addActuator(\"CameraMount\", \"tilt\", cameraMounttilt);\r\n \r\n\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\r\n\t\tdriveSonarFront = new SonarMB1010(0);\r\n\t\tLiveWindow.addSensor(\"Drive\", \"SonarFront\", driveSonarFront);\r\n\r\n\t\t//driveGyro = new GyroADXRS453();\r\n\t\tdriveGyro = new ADXRS450_Gyro();\r\n\t\tLiveWindow.addSensor(\"Drive\", \"Gyro\", driveGyro);\r\n\t\tdriveGyro.calibrate();\r\n\t}", "@Override\n public void robotInit() {\n myRobot = new DifferentialDrive(leftfrontmotor, rightfrontmotor);\n leftrearmotor.follow(leftfrontmotor);\n rightrearmotor.follow(rightfrontmotor);\n leftfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\trightfrontmotor.setInverted(true); // <<<<<< Adjust this until robot drives forward when stick is forward\n\t\tleftrearmotor.setInverted(InvertType.FollowMaster);\n rightrearmotor.setInverted(InvertType.FollowMaster);\n \n CameraServer.getInstance().startAutomaticCapture();\n\n \n\n comp.setClosedLoopControl(true);\n \n\n /* Set up Dashboard widgets */\n SmartDashboard.putNumber(\"L Stick\", gamepad.getRawAxis(1));\n\t\tSmartDashboard.putNumber(\"R Stick\", gamepad.getRawAxis(5));\n\t\tSmartDashboard.putBoolean(\"Back Button\", gamepad.getRawButton(5));\n\t\tSmartDashboard.putBoolean(\"Fwd Button\", gamepad.getRawButton(6));\n\t\t\n SmartDashboard.putNumber(\"LF\", pdp.getCurrent(leftfrontmotorid));\n\t\tSmartDashboard.putNumber(\"LR\", pdp.getCurrent(leftrearmotorid));\n\t\tSmartDashboard.putNumber(\"RF\", pdp.getCurrent(rightfrontmotorid));\n\t\tSmartDashboard.putNumber(\"RR\", pdp.getCurrent(rightrearmotorid));\n SmartDashboard.putNumber(\"Total\", pdp.getCurrent(0) + pdp.getCurrent(1) + pdp.getCurrent(2) + pdp.getCurrent(3) + pdp.getCurrent(4) + pdp.getCurrent(5) + pdp.getCurrent(6) + pdp.getCurrent(7) + pdp.getCurrent(8) + pdp.getCurrent(9) + pdp.getCurrent(10) + pdp.getCurrent(11) + pdp.getCurrent(12) + pdp.getCurrent(13) + pdp.getCurrent(14) + pdp.getCurrent(15));\n }", "@Override\n public void robotInit() {\n m_driveTrain = new DriveTrain();\n m_oi = new OI(); \n encoder = new Encoder();\n JoystickDrive = new JoystickDrive();\n RoboticArm = new RoboticArm();\n Science = new Science();\n pid = new PID();\n inverse = new Inverse();\n\n // workingSerialCom = new serialComWorking();\n\n\n // while(true){\n // // ros_string = workingSerialCom.read();\n // // System.out.println(ros_string);\n // LeftFront = Robot.m_driveTrain.dr+iveTrainLeftFrontMotor.getSelectedSensorVelocity()*(10/4096);\n // RightFront = Robot.m_driveTrain.driveTrainRightFrontMotor.getSelectedSensorVelocity()*(10/4096);\n // LeftFront_ros = workingSerialCom.floattosString(LeftFront);\n // RigthFront_ros = workingSerialCom.floattosString(RightFront);\n\n // ros_string = workingSerialCom.read();\n // gulce = workingSerialCom.StringConverter(ros_string, 1);\n // System.out.println(gulce);\n // workingSerialCom.write(LeftFront_ros+RigthFront_ros+\"\\n\");\n // }\n // workingSerialCom.write(\"Yavuz\\n\");\n // // RoboticArm.run();\n // // m_driveTrain.run();\n // // workingSerialCom.StringConverter(ros_string, 3);\n }", "@Override\n public void robotInit() {\n\n // Motor controllers\n leftMotor = new CANSparkMax(1, MotorType.kBrushless);\n leftMotor.setInverted(false);\n leftMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax leftSlave1 = new CANSparkMax(2, MotorType.kBrushless);\n leftSlave1.setInverted(false);\n leftSlave1.setIdleMode(IdleMode.kBrake);\n leftSlave1.follow(leftMotor);\n\n CANSparkMax leftSlave2 = new CANSparkMax(3, MotorType.kBrushless);\n leftSlave2.setInverted(false);\n leftSlave2.setIdleMode(IdleMode.kBrake);\n leftSlave2.follow(leftMotor);\n\n rightMotor = new CANSparkMax(4, MotorType.kBrushless);\n rightMotor.setInverted(false);\n rightMotor.setIdleMode(IdleMode.kBrake);\n\n CANSparkMax rightSlave1 = new CANSparkMax(5, MotorType.kBrushless);\n rightSlave1.setInverted(false);\n rightSlave1.setIdleMode(IdleMode.kBrake);\n rightSlave1.follow(leftMotor);\n\n CANSparkMax rightSlave2 = new CANSparkMax(6, MotorType.kBrushless);\n rightSlave2.setInverted(false);\n rightSlave2.setIdleMode(IdleMode.kBrake);\n rightSlave2.follow(leftMotor);\n\n // Encoders\n leftEncoder = leftMotor.getEncoder();\n rightEncoder = rightMotor.getEncoder();\n\n // Gyro\n gyro = new ADXRS450_Gyro();\n\n }", "@Override\n public void robotInit() {\n // Hardware.getInstance().init();\n hardware.init();\n\n controllerMap = ControllerMap.getInstance();\n controllerMap.controllerMapInit();\n\n controllerMap.intake.IntakeInit();\n\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n intakeCam = CameraServer.getInstance().startAutomaticCapture(\"Driver Camera :)\", 0);\n intakeCam.setPixelFormat(PixelFormat.kMJPEG);\n intakeCam.setResolution(160, 120);\n intakeCam.setFPS(15);\n // climberCam = CameraServer.getInstance().startAutomaticCapture(1);\n\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n leftFrontMotor = new CANSparkMax(10, MotorType.kBrushless);\n leftBackMotor = new CANSparkMax(11, MotorType.kBrushless);\n rightFrontMotor = new CANSparkMax(12, MotorType.kBrushless);\n rightBackMotor = new CANSparkMax(13, MotorType.kBrushless);\n leftFrontMotor.setIdleMode(IdleMode.kCoast);\n leftBackMotor.setIdleMode(IdleMode.kCoast);\n rightFrontMotor.setIdleMode(IdleMode.kCoast);\n rightBackMotor.setIdleMode(IdleMode.kCoast);\n gyro = new ADXRS450_Gyro();\n gyro.calibrate();\n stick = new Joystick(1);\n controller = new XboxController(0);\n origGyro = 0;\n }", "public void robotInit() {\n\t\toi = new OI();\n // instantiate the command used for the autonomous period\n }", "@Override\n public void init() {\n\n robot.init(hardwareMap);\n\n // Tell the driver that initialization is complete.\n\n telemetry.addData(\"Robot Mode:\", \"Initialized\");\n telemetry.update();\n }", "public RobotContainer() {\n \n camServer = CameraServer.getInstance();\n driveCam = camServer.startAutomaticCapture(\"Driver View\", 0);\n driveCam.setResolution(160, 120);\n driveCam.setFPS(15);\n driveCam.setBrightness(50);\n // cameraThreader.start();\n\n leftJoy = new Joystick(LEFT_JOY_PORT);\n rightJoy = new Joystick(RIGHT_JOY_PORT);\n xbox = new XboxController(XBOX_PORT);\n\n //Set default drivetrain command to DriveWithJoysticks or xbox\n drivetrain.setDefaultCommand(xboxCommand);\n \n //For testing purposes, this will control simple one- or two-motor subsystems.\n genericSubsystem.setDefaultCommand(genericJoysticksCommand);\n \n //shooter.setDefaultCommand(shootCommand);\n //shooter.setDefaultCommand(turretCommand);\n\n\n // Configure the button bindings\n configureButtonBindings();\n }", "@Override\n public void robotInit() {\n\n rightEnc.reset();\n gyro.reset();\n\n left2.follow(left1);\n left3.follow(left1);\n right2.follow(right1);\n right3.follow(right1);\n\n config = new Trajectory.Config(Trajectory.FitMethod.HERMITE_CUBIC, Trajectory.Config.SAMPLES_HIGH, 0.05, 1.7, 2.0, 50.0);\n trajectory = Pathfinder.generate(points, config);\n\n modifier = new TankModifier(trajectory).modify(0.7);\n\n left = new EncoderFollower(modifier.getLeftTrajectory());\n right = new EncoderFollower(modifier.getRightTrajectory());\n\n left.configureEncoder((int)rightEnc.get(), 1024, 0.1143);\n left.configurePIDVA(0.7, 0.0, 0.0, 0.15, 0.06);\n right.configureEncoder((int)rightEnc.get(), 1024, 0.1143);\n right.configurePIDVA(0.7, 0.0, 0.0, 0.15, 0.06);\n \n }", "public DrawGUI() {\n\n\t\tthis.setTitle(\"Draw 0.2\");\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(\"img/logo.png\"));\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdrawingContainer = new DrawingContainer();\n\t\tscrollpane = new JScrollPane(drawingContainer);\n\n\t\tcontroller = new DrawingController(this);\n\t\ttools = new ToolBox(controller);\n\t\tcontroller.newDrawing(new Dimension(500, 380));\n\n\t\t// statusBar = new StatusBar();\n\n\t\tgetContentPane().add(tools, BorderLayout.WEST);\n\t\tgetContentPane().add(scrollpane, BorderLayout.CENTER);\n\t\t// getContentPane().add(statusBar, BorderLayout.SOUTH);\n\n\t\tMenuListener mainMenuListener = new MenuListener(controller);\n\t\tJMenuBar mainMenu = new MainMenu(mainMenuListener);\n\t\tthis.setJMenuBar(mainMenu);\n\n\t\tpack();\n\t\tsetVisible(true);\n\n\t}", "public RobotContainer() {\n\nleftJoystick = new Joystick(0);\nrightJoystick = new Joystick(1);\n\ndriveBase = new DriveBase();\ndriveWithJoystick = new DriveWithJoystick();\nCommandScheduler.getInstance().setDefaultCommand(driveBase, driveWithJoystick);\n\n\n // Configure the button bindings\n configureButtonBindings();\n }", "@Override\n public void init() {\n robot.init(hardwareMap, telemetry, false);\n //robot.resetServo();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"Status\", \"Initialized\");\n // robot.FL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.FR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }", "private void setupGame() {\n \tdrawBricks();\n \tdrawPaddle();\n \tdrawBall(); \t\n \tsetInitialBallVelocity();\n }", "public void robotInit() {\n // Initialize all subsystems\n CommandBase.init();\n \n SmartDashboard.putNumber(RobotMap.Autonomous.MODE_KEY, 0);\n \n //temperary method to test door closing speeds\n SmartDashboard.putNumber(RobotMap.Force.DOOR_FORCE_KEY, 50);\n }", "protected void initialize() {\n \t starttime = Timer.getFPGATimestamp();\n \tthis.startAngle = RobotMap.navx.getAngle();\n \tangleorientation.setSetPoint(RobotMap.navx.getAngle());\n \t\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \tRobotMap.motorLeftTwo.enableControl();\n \tRobotMap.motorRightTwo.enableControl();\n \n //settting talon control mode\n \tRobotMap.motorLeftTwo.changeControlMode(TalonControlMode.MotionMagic);\t\t\n\t\tRobotMap.motorLeftOne.changeControlMode(TalonControlMode.Follower);\t\n\t\tRobotMap.motorRightTwo.changeControlMode(TalonControlMode.MotionMagic);\t\n\t\tRobotMap.motorRightOne.changeControlMode(TalonControlMode.Follower);\n\t\t//setting peak and nominal output voltage for the motors\n\t\tRobotMap.motorLeftTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorLeftTwo.configNominalOutputVoltage(0.00f, 0.0f);\n\t\tRobotMap.motorRightTwo.configPeakOutputVoltage(+12.0f, -12.0f);\n\t\tRobotMap.motorRightTwo.configNominalOutputVoltage(0.0f, 0.0f);\n\t\t//setting who is following whom\n\t\tRobotMap.motorLeftOne.set(4);\n\t\tRobotMap.motorRightOne.set(3);\n\t\t//setting pid value for both sides\n\t//\tRobotMap.motorLeftTwo.setCloseLoopRampRate(1);\n\t\tRobotMap.motorLeftTwo.setProfile(0);\n\t RobotMap.motorLeftTwo.setP(0.000014f);\n \tRobotMap.motorLeftTwo.setI(0.00000001);\n\t\tRobotMap.motorLeftTwo.setIZone(0);//325);\n\t\tRobotMap.motorLeftTwo.setD(1.0f);\n\t\tRobotMap.motorLeftTwo.setF(this.fGainLeft+0.014);//0.3625884);\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t RobotMap.motorRightTwo.setCloseLoopRampRate(1);\n\t RobotMap.motorRightTwo.setProfile(0);\n\t\tRobotMap.motorRightTwo.setP(0.000014f);\n\t\tRobotMap.motorRightTwo.setI(0.00000001);\n\t\tRobotMap.motorRightTwo.setIZone(0);//325);\n\t\tRobotMap.motorRightTwo.setD(1.0f);\n\t\tRobotMap.motorRightTwo.setF(this.fGainRight);// 0.3373206);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(0);//300);\n\t\t\n\t\t//setting Acceleration and velocity for the left\n\t\tRobotMap.motorLeftTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorLeftTwo.setMotionMagicCruiseVelocity(250);\n\t\t//setting Acceleration and velocity for the right\n\t\tRobotMap.motorRightTwo.setMotionMagicAcceleration(125);\n\t\tRobotMap.motorRightTwo.setMotionMagicCruiseVelocity(250);\n\t\t//resets encoder position to 0\t\t\n\t\tRobotMap.motorLeftTwo.setEncPosition(0);\n\t\tRobotMap.motorRightTwo.setEncPosition(0);\n\t //Set Allowable error for the loop\n\t\tRobotMap.motorLeftTwo.setAllowableClosedLoopErr(300);\n\t\tRobotMap.motorRightTwo.setAllowableClosedLoopErr(300);\n\t\t\n\t\t//sets desired endpoint for the motors\n RobotMap.motorLeftTwo.set(motionMagicEndPoint);\n RobotMap.motorRightTwo.set(-motionMagicEndPoint );\n \t\n }", "protected void initialize() {\n ////TEST CODE\n \tRobotMap.frontLeftTurn.set(0);\n \tRobotMap.frontRightTurn.set(0);\n \tRobotMap.backLeftTurn.set(0);\n \tRobotMap.backRightTurn.set(0);\n \t\n \t//Spin motors\n \tRobotMap.frontLeftTurn.set(85);\n \tRobotMap.frontRightTurn.set(85);\n \tRobotMap.backLeftTurn.set(85);\n \tRobotMap.backRightTurn.set(85);\n \tTimer.delay(2.75);\n \t\n \t//Stop Spin\n \tRobotMap.frontLeftTurn.set(0);\n \tRobotMap.frontRightTurn.set(0);\n \tRobotMap.backLeftTurn.set(0);\n \tRobotMap.backRightTurn.set(0);\n \tTimer.delay(2.75);\n \t\n \t//Move Back\n \tRobotMap.frontLeftDrive.set(0.2);\n \tRobotMap.frontRightDrive.set(0.2);\n \tRobotMap.backLeftDrive.set(0.2);\n \tRobotMap.backRightDrive.set(0.2); \t\n \tTimer.delay(2.75); \n \t\n \t//Stop\n \t\n \tRobotMap.frontLeftDrive.set(0);\n \tRobotMap.frontRightDrive.set(0);\n \tRobotMap.backLeftDrive.set(0);\n \tRobotMap.backRightDrive.set(0);\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}", "@Override\n public void robotInit() {\n robot = RobotSoftware.getInstance();\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n watcher = new Watcher(robot.leftDistanceStream.getWatchable(\"left dist\"),\n robot.rightDistanceStream.getWatchable(\"right dist\"));\n watcher.outputToDashboard();\n robot.runCompressor.set(false);\n teleop = new TeleopMain(robot);\n toggleCompressor = true;\n teleop.init();\n }", "public void robotInit() \n {\n RobotMap.init();\n\n driveTrain = new DriveTrain();\n gripper = new Gripper();\n verticalLift = new VerticalLift();\n\n // OI must be constructed after subsystems. If the OI creates Commands \n //(which it very likely will), subsystems are not guaranteed to be \n // constructed yet. Thus, their requires() statements may grab null \n // pointers. Bad news. Don't move it.\n\n oi = new OI();\n\n autonomousChooser = new SendableChooser();\n autonomousChooser.addDefault( \"Auto: Do Nothing\" , new DoNothing () );\n autonomousChooser.addObject ( \"Auto: Drive To Auto Zone\" , new DriveToAutoZone () );\n autonomousChooser.addObject ( \"Auto: Drive To Auto Zone (Bump)\" , new DriveToAutoZoneBump () );\n //autonomousChooser.addObject ( \"Auto: Get One (Long)\" , new GetOneLong () );\n //autonomousChooser.addObject ( \"Auto: Get One (Short)\" , new GetOneShort () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Bump)\" , new GetOneRecycleBin () );\n autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Side)\" , new GetRecycleBinSide () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Backwards)\" , new GetOneRecycleBinBackwards () );\n //autonomousChooser.addObject ( \"Auto: Get One Recycle Bin (Backwards, Bump)\", new GetOneRecycleBinBackwardsBump() );\n //autonomousChooser.addObject ( \"Auto: Get Two (Short)\" , new GetTwoShort () );\n //autonomousChooser.addObject ( \"Auto: Get Two Short (Special)\" , new GetTwoShortSpecial () );\n //autonomousChooser.addObject ( \"Auto: Get Two (Long, From left)\" , new TwoLongFromLeft () );\n //autonomousChooser.addObject ( \"Auto: Get Two (Long, From right)\" , new TwoLongFromRight () );\n autonomousChooser.addObject ( \"Auto: Get One Tote and Recycle Bin\" , new OneRecycleBinAndTote () );\n autonomousChooser.addObject ( \"Auto: Get One Tote and Recycle Bin (Bump)\" , new OneRecycleBinAndToteBump () );\n SmartDashboard.putData( \"Autonomous\", autonomousChooser );\n\n // instantiate the command used for the autonomous period\n //autonomousCommand = new RunAutonomousCommand();\n\n m_USBVCommand = new UpdateSBValuesCommand();\n m_USBVCommand.start();\n \n frame = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);\n /*\n // the camera name (ex \"cam0\") can be found through the roborio web interface\n session = NIVision.IMAQdxOpenCamera(\"cam1\",\n NIVision.IMAQdxCameraControlMode.CameraControlModeController);\n NIVision.IMAQdxConfigureGrab(session);\n \n NIVision.IMAQdxStartAcquisition(session);\n */\n /*\n camServer = CameraServer.getInstance();//.startAutomaticCapture(\"cam1\");\n camServer.setQuality(30);\n \n cam = new USBCamera(\"cam1\");\n cam.openCamera();\n cam.setFPS(60);\n \n cam.setSize(320, 240);\n cam.updateSettings();\n */\n }", "public static void init() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n driveTrainmotor_leftFront = new Talon(1);\n LiveWindow.addActuator(\"DriveTrain\", \"motor_leftFront\", (Talon) driveTrainmotor_leftFront);\n \n driveTrainmotor_leftRear = new Talon(2);\n LiveWindow.addActuator(\"DriveTrain\", \"motor_leftRear\", (Talon) driveTrainmotor_leftRear);\n \n driveTrainmotor_rightFront = new Talon(3);\n LiveWindow.addActuator(\"DriveTrain\", \"motor_rightFront\", (Talon) driveTrainmotor_rightFront);\n \n driveTrainmotor_rightRear = new Talon(4);\n LiveWindow.addActuator(\"DriveTrain\", \"motor_rightRear\", (Talon) driveTrainmotor_rightRear);\n \n driveTrainRobotDrive = new RobotDrive(driveTrainmotor_leftFront, driveTrainmotor_leftRear,\n driveTrainmotor_rightFront, driveTrainmotor_rightRear);\n \n driveTrainRobotDrive.setSafetyEnabled(true);\n driveTrainRobotDrive.setExpiration(0.1);\n driveTrainRobotDrive.setSensitivity(0.5);\n driveTrainRobotDrive.setMaxOutput(1.0);\n\n liftmotor_Lift = new Talon(0);\n LiveWindow.addActuator(\"Lift\", \"motor_Lift\", (Talon) liftmotor_Lift);\n \n liftencoderLiftHeight = new Encoder(1, 2, true, EncodingType.k4X);\n LiveWindow.addSensor(\"Lift\", \"encoder LiftHeight\", liftencoderLiftHeight);\n liftencoderLiftHeight.setDistancePerPulse(1.0);\n liftencoderLiftHeight.setPIDSourceParameter(PIDSourceParameter.kRate);\n liftlimitBottom = new DigitalInput(0);\n LiveWindow.addSensor(\"Lift\", \"limitBottom\", liftlimitBottom);\n \n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "@Override\n public void robotInit() {\n m_robotContainer = new RobotContainer();\n // Initiate the limelight network table\n NetworkTable table = NetworkTableInstance.getDefault().getTable(\"limelight\");\n tx = table.getEntry(\"tx\");\n ty = table.getEntry(\"ty\");\n ta = table.getEntry(\"ta\");\n RobotContainer.turretSub.tsrxTurret.setSelectedSensorPosition(0);\n }", "@Override\n public void robotInit() {\n // Instantiate our RobotContainer. This will perform all our button bindings, and put our\n // autonomous chooser on the dashboard.\n m_robotContainer = new RobotContainer();\n \n left_motor_1= new CANSparkMax(2,MotorType.kBrushless);\n left_motor_2=new CANSparkMax(3,MotorType.kBrushless);\n right_motor_1=new CANSparkMax(5,MotorType.kBrushless);\n right_motor_2=new CANSparkMax(6,MotorType.kBrushless);\n ball_collection_motor=new CANSparkMax(4,MotorType.kBrushless);\n left_high_eject=new CANSparkMax(1, MotorType.kBrushless);\n right_high_eject=new CANSparkMax(7,MotorType.kBrushless);\n left_belt=new TalonSRX(9);\n right_belt=new TalonSRX(11);\n left_low_eject=new TalonSRX(8);\n right_low_eject=new TalonSRX(12);\n double_solenoid_1=new DoubleSolenoid(0,1);\n joystick=new Joystick(1);\n servo=new Servo(0);\n if_correted=false;\n xbox_controller=new XboxController(0);\n servo_angle=1;\n eject_speed=0;\n go_speed=0;\n turn_speed=0;\n high_eject_run=false;\n clockwise=false;\n left_motor_1.restoreFactoryDefaults();\n left_motor_2.restoreFactoryDefaults();\n right_motor_1.restoreFactoryDefaults();\n right_motor_2.restoreFactoryDefaults();\n \n left_motor_2.follow(left_motor_1);\n right_motor_1.follow(right_motor_2);\n servo.set(0);\n currentServoAngle = 0;\n factor = 0.01;\n pushed = false;\n //right_high_eject.follow(left_high_eject);\n //right_low_eject.follow(left_low_eject);\n\n }", "@Override\n\tpublic void robotInit() {\n\t\t\n\t\t//CameraServer.getInstance().startAutomaticCapture(); //Minimum required for camera\n\t\t\n\t\t//new Thread(() -> {\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n camera.setWhiteBalanceAuto();\n camera.setFPS(20);\n \n //CvSink cvSink = CameraServer.getInstance().getVideo();\n //CvSource outputStream = CameraServer.getInstance().putVideo(\"Blur\", 640, 480);\n /* \n Mat source = new Mat();\n Mat output = new Mat();\n \n while(!Thread.interrupted()) {\n cvSink.grabFrame(source);\n Imgproc.cvtColor(source, output, Imgproc.COLOR_BGR2GRAY);\n outputStream.putFrame(output);\n }*/\n //}).start();\n\t\t\n\t\t\n\t\t\n\t\t/**\n\t\t * 7780 long run\n\t\t */\n\t\t\n\t\tdriverStation = DriverStation.getInstance();\n\t\t// Initialize all subsystems\n\t\tm_drivetrain = new DriveTrain();\n\t\tm_pneumatics = new Pneumatics();\n\t\t\n\t\tm_pneumatics.createSolenoid(RobotMap.PNEUMATICS.GEARSHIFT_SOLENOID, \n\n\t\t\t\tRobotMap.PNEUMATICS.SOLENOID_ID_1, \n\n\t\t\t\tRobotMap.PNEUMATICS.SOLENOID_ID_2);\n\t\t\n\t\tm_pneumatics.createSolenoid(RobotMap.PNEUMATICS.FORKLIFT_SOLENOID, RobotMap.PNEUMATICS.SOLENOID_ID_3, RobotMap.PNEUMATICS.SOLENOID_ID_4);\n\t\t\n\t\tm_forklift = new ForkLift();\n\t\tm_intake = new Intake();\n\t\tm_oi = new OI();\n\n\t\t// instantiate the command used for the autonomous period\n\t\tm_autonomousCommand = new Autonomous();\n\t\tdriverXbox = m_oi.getDriverXboxControl();\n\t\toperatorXbox = m_oi.getDriverXboxControl();\n\t\tsetupAutoCommands();\n\t\t\n\t\t//chooser.addDefault(\"Left Long\",new LeftLong());\n\t\t\n\t\t//SmartDashboard.putData(\"Auto\",chooser);\n\n\t\t// Show what command your subsystem is running on the SmartDashboard\n\t\tSmartDashboard.putData(m_drivetrain);\n\t\tSmartDashboard.putData(m_forklift);\n\t\t\n\t}", "private void init () \n\t{ \n\t\tbatch = new SpriteBatch();\n\t\tcamera = new OrthographicCamera(Constants.VIEWPORT_WIDTH,\n\t\t\tConstants.VIEWPORT_HEIGHT);\n\t\tcamera.position.set(0, 0, 0);\n\t\tcamera.update();\n\t\tcameraGUI = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH,\n\t\t\t\tConstants.VIEWPORT_GUI_HEIGHT);\n\t\tcameraGUI.position.set(0, 0, 0);\n\t\tcameraGUI.setToOrtho(true); // flip y-axis\n\t\tcameraGUI.update();\n\t\t\n\t\tb2debugRenderer = new Box2DDebugRenderer();\n\t}", "public static void init() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n drivetrainSpeedController1 = new CANTalon(1);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 1\", (CANTalon) drivetrainSpeedController1);\n \n drivetrainSpeedController2 = new CANTalon(2);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController2);\n drivetrainSpeedController3 = new CANTalon(3);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController3);\n drivetrainSpeedController4 = new CANTalon(4);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController4);\n drivetrainSpeedController5 = new CANTalon(5);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController5);\n drivetrainSpeedController6 = new CANTalon(6);\n LiveWindow.addActuator(\"Drivetrain\", \"Speed Controller 2\", (CANTalon) drivetrainSpeedController6);\n \n drivetrainRobotDrive21 = new RobotDrive(drivetrainSpeedController1, drivetrainSpeedController2, drivetrainSpeedController3, drivetrainSpeedController4, drivetrainSpeedController5, drivetrainSpeedController6);\n \n drivetrainRobotDrive21.setSafetyEnabled(true);\n drivetrainRobotDrive21.setExpiration(0.1);\n drivetrainRobotDrive21.setSensitivity(0.5);\n drivetrainRobotDrive21.setMaxOutput(1.0);\n\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "public void robotInit() {\n ;\n System.out.println(\"robot_init\");\n liftJoystick = new Joystick(2);\n armJoystick = new Joystick(4);\n setEncoder(new Encoder(2, 3));\n getEncoder().setDistancePerPulse(8.0 * 3.14 / 360.0 / 2);\n compressor = new Compressor(1, 1);\n compressor.start();\n // cameraMount = new CameraMount(10,9);\n //File file = new File (\"WALT_output.txt\");\n displayIndex = 1;\n driverScreen = DriverStationLCD.getInstance();\n\n //sensor wiring was switche so I fixed it programming wise\n setLeft(new DigitalInput(12));\n if (getLeft() == null) {\n printToScreen(\"LEFT SENSOR [DigitalInput(12)] IS NULL!!\");\n } else {\n printToScreen(\"LEFT SENSOR [DigitalInput(12)] is initialized\");\n }\n\n middle = new DigitalInput(13);\n if (getMiddle() == null) {\n printToScreen(\"MIDDLE SENSOR [DigitalInput(13)] IS NULL!!\");\n } else {\n printToScreen(\"MIDDLE SENSOR [DigitalInput(13)] is initialized\");\n }\n\n right = new DigitalInput(14);\n if (getRight() == null) {\n printToScreen(\"RIGHT SENSOR [DigitalInput(14)] IS NULL!!\");\n } else {\n printToScreen(\"RIGHT SENSOR [DigitalInput(14)] INITIALIZED\");\n }\n\n demoMode = false;\n myDog = Watchdog.getInstance();\n myDog.setEnabled(true);\n myDog.setExpiration(1);\n joysticks = new TankControls(1, 3);//All channel values arbitrary at this point and may need to be changed.\n // xboxController = new XboxControls(3);//channel value\n //initializes pneumatics\n //int[] solenoidChannels=(4,5);\n int spikeChannel = 1;\n int pressureSwitch = 2;\n //pneumatics=new pneumaticSystem(solenoidChannels,spikeChannel,pressureSwitch, 120);\n\n //Arm constructor\n //currently the arm is controlling the drive motors- arm channels are 3,4\n int liftChannel = 3;\n int armChannel = 4;\n int solenoidChannelWrist = 1;\n int clawSolenoid = 2;\n int armGyroChannel = 2;\n arm = new Arm(liftChannel, armChannel, solenoidChannelWrist,\n clawSolenoid, armGyroChannel);\n //channel for gyro\n int gyroChannel = 1;\n\n //channels for camera initiation\n boolean usingCamera = true;\n int panMotorCamChannel = 9;\n int tiltCamChannel = 8;\n\n //channels for accelerators- may want multiple for multiple directions\n int accSlot = -1;\n\n setSensors(new SensorSet(gyroChannel, accSlot, usingCamera,\n tiltCamChannel, panMotorCamChannel));\n\n setRobotDrive(new TwoMotorDrive(1, 2, demoMode));\n getRobotDrive().setInvertedSide(true);//boolean is true to invert right, false for left\n\n //so that it doesn't return nulls- should not be started before re-creating Why do we initialize it here then?\n driveTask = new WaltLineTrack(false, false, this);\n armTask = arm.getNewGoToHeightInstance(2);\n armTask2 = arm.getNewGoToAngleInstance(135);\n }", "@Override\r\n\tpublic void setRobot(Robot r) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\trobot = (BasicRobot) r;\r\n\t\t//robot.setMaze(this.mC);\r\n\t\t\r\n\t}", "protected void initialize()\n {\n // Set the pid up for driving straight\n Robot.drivetrain.getAngleGyroController().setPID(Constants.DrivetrainAngleGyroControllerP, Constants.DrivetrainAngleGyroControllerI, Constants.DrivetrainAngleGyroControllerD);\n //Robot.drivetrain.resetGyro();\n if (setpointSpecified == true)\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.initialGyroAngle); \n }\n else\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.drivetrain.getGyroValue());\n }\n Robot.drivetrain.setDirection(driveDirection);\n Robot.drivetrain.setMagnitude(drivePower);\n Robot.drivetrain.getAngleGyroController().enable();\n timer.reset();\n timer.start();\n }", "public void robotInit() {\n\t\toi = OI.getInstance();\r\n\t\t\r\n\t\t// instantiate the command used for the autonomous and teleop period\r\n\t\treadings = new D_SensorReadings();\r\n\t\t// Start pushing values to the SD.\r\n\t\treadings.start();\r\n\t\t//Gets the single instances of driver and operator, from OI. \r\n\t\tdriver = oi.getDriver();\r\n\t\toperator = oi.getOperator();\r\n\r\n\t\t//Sets our default auto to NoAuto, if the remainder of our code doesn't seem to work. \r\n\t\tauto = new G_NoAuto();\r\n\t\t\r\n\t\t//Sets our teleop commandGroup to T_TeleopGroup, which contains Kaj,ELevator, Intake, and Crossbow Commands. \r\n\t\tteleop = new T_TeleopGroup();\r\n\t\t\r\n\t}", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }", "public RobotContainer() \n {\n /* Bind commands to joystick buttons. */\n m_OI.configureButtonBindings();\n\n /* Initialize various systems on robotInit. */\n this.initializeStartup();\n\n /* Initialize autonomous command chooser and display on the SmartDashboard. */\n this.initializeAutoChooser();\n\n /* Initialize PID tuning for use on the SmartDashboard. */\n this.initializePIDValues();\n\n // this.testColorSensing();\n }", "private void init() {\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n controlPanel = new ControlPanel(this);\n canvas = new DrawingPanel(this);\n shapeController = ShapeController.getInstance();\n\n shapeController.setFactory(new RegularPolygonShapeFactory(6, 50));\n optionsPanel = new RegularPolygonOptionsPanel(this, 6, 50);\n toolPanel = new ToolPanel(this);\n\n add(optionsPanel, BorderLayout.NORTH);\n add(canvas, BorderLayout.CENTER);\n add(controlPanel, BorderLayout.SOUTH);\n add(toolPanel, BorderLayout.EAST);\n\n pack();\n }", "public void draw() {\n\t\tapplyColors();\n\n\t\tfloat halfHeight = height / 2,\n\t\t\t\tdiameter = 2 * radius;\n\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\t\t// Draw top of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, -height);\n\t\t// Draw bottom of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\n\t\tRobotRun.getInstance().beginShape(RobotRun.TRIANGLE_STRIP);\n\t\t// Draw a string of triangles around the circumference of the Cylinders top and bottom.\n\t\tfor (int degree = 0; degree <= 360; ++degree) {\n\t\t\tfloat pos_x = RobotRun.cos(RobotRun.DEG_TO_RAD * degree) * radius,\n\t\t\t\t\tpos_y = RobotRun.sin(RobotRun.DEG_TO_RAD * degree) * radius;\n\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, halfHeight);\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, -halfHeight);\n\t\t}\n\n\t\tRobotRun.getInstance().endShape();\n\t}", "private void init()\n {\n batch = new SpriteBatch();\n \n camera = new OrthographicCamera(Constants.VIEWPORT_WIDTH, Constants.VIEWPORT_HEIGHT);\n camera.position.set(0, 0, 0);\n camera.update();\n \n cameraGui = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraGui.position.set(0, 0, 0);\n cameraGui.setToOrtho(true); // flip y-axis\n cameraGui.update();\n \n cameraBg = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraBg.position.set(0, 0, 0);\n //cameraBg.setToOrtho(true);\n cameraBg.update();\n \n b2Debug = new Box2DDebugRenderer();\n }", "public void robotInit() {\n RobotMap.init();\r\n CommandBase.init();\r\n //Add autonomous prefs\r\n Preferences p = Preferences.getInstance();\r\n if (!p.containsKey(\"AutonInitialDelay\")) {\r\n p.putDouble(\"AutonInitialDelay\", kDefaultInitialDelay);\r\n }\r\n if (!p.containsKey(\"AutonTimeout\")) {\r\n p.putDouble(\"AutonTimeout\", kDefaultTimeout);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondOn\")) {\r\n p.putBoolean(\"HangerLastSecondOn\", kDefaultLastSecondOn);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondTimeout\")) {\r\n p.putDouble(\"HangerLastSecondTimeout\", kDefaultLastSecondTimeout);\r\n }\r\n }", "@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tJoy = new Joystick(0);\n\t\ts1 = new DoubleSolenoid(1, 0);\n\t\ts2 = new DoubleSolenoid(2, 3);\n\t\tairCompressor = new Compressor();\n\t\ttriggerValue = false;\n\t\ts1Value = false;\n\t}", "@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\n robot.leftDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n // Possibly add a delay\n robot.leftDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "@Override\n\tpublic void robotInit() {\n\t\tprefs = Preferences.getInstance();\n\t\tDEBUG = prefs.getBoolean(\"DEBUG\", false);\n\t\t\n\t\tinitCamera(\"Primary Camera\", 0);\n\t\tinitCamera(\"Secondary Camera\", 1);\n\t\t\n\t\tRobotMap.robotDriveMain = new DifferentialDrive(RobotMap.leftDrive, RobotMap.rightDrive);\n\t\t\n\t\tautoChooser.setDefaultOption(\"Left\", \"left\");\n\t\tautoChooser.addOption(\"Middle\", \"middle\");\n\t\tautoChooser.addOption(\"Right\", \"right\");\n\t\t\n\t\tSmartDashboard.putData(\"Auto Mode:\", autoChooser);\n\t}", "public void robotInit() {\n System.out.println(\"Default robotInit() method... Override me!\");\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n //starts the dual cameras\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n //auto start (disabled atm)\n //pressBoy.setClosedLoopControl(true);\n pressBoy.setClosedLoopControl(false);\n \n \n }", "public Simulation() {\n\t\taddMouseListener(this);\n\t\taddKeyListener(this);\n\n\t\tthis.setSize(MAX_X * DOT_SIZE, MAX_Y * DOT_SIZE);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(false);\n\t\tthis.setTitle(\"Braaiinnnnnsss\");\n\n\t\t/* Create and set the size of the panel */\n\t\tdp = new DotPanel(MAX_X, MAX_Y, DOT_SIZE);\n\n\t\t/* Add the panel to the frame */\n\t\tContainer cPane = this.getContentPane();\n\t\tcPane.add(dp);\n\t\t\n\n\t\t/* Initialize the DotPanel canvas:\n\t\t * You CANNOT draw to the panel BEFORE this code is called.\n\t\t * You CANNOT add new widgets to the frame AFTER this is called.\n\t\t */\n\t\tthis.pack();\n\t\tdp.init();\n\t\tdp.clear();\n\t\tdp.setPenColor(Color.red);\n\t\tthis.setVisible(true);\n\n\t\t/* Create our city */\n\t\tworld = new City(MAX_X, MAX_Y, NUM_BUILDINGS, NUM_HUMANS, NUM_PRIESTS, NUM_VAMPIRES);\n\n\t\t/* This is the Run Loop (aka \"simulation loop\" or \"game loop\")\n\t\t * It will loop forever, first updating the state of the world\n\t\t * (e.g., having humans take a single step) and then it will\n\t\t * draw the newly updated simulation. Since we don't want\n\t\t * the simulation to run too fast for us to see, it will sleep\n\t\t * after repainting the screen. Currently it sleeps for\n\t\t * 33 milliseconds, so the program will update at about 30 frames\n\t\t * per second.\n\t\t */\n\t\twhile(true)\n\t\t{\n\t\t\t// Run update rules for world and everything in it\n\t\t\tworld.update();\n\t\t\t// Draw to screen and then refresh\n\t\t\tworld.draw();\n\t\t\tdp.repaintAndSleep(30);\n\n\t\t}\n\t}", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n\n drivetrain.setDefaultCommand(new RunCommand(\n () -> drivetrain.setTank(Math.pow(-joystick1.getY(), 3), Math.pow(joystick2.getY(), 3)), drivetrain));\n\n }", "public DriveTrain(){\r\n super(\"Drive Train\");\r\n Log = new MetaCommandLog(\"DriveTrain\", \"Gyro\" , \"Left Jaguars,Right Jaguars\");\r\n gyro1 = new Gyro(RobotMap.AnalogSideCar , RobotMap.DriveTrainGyroInput);\r\n lfJag = new Jaguar(RobotMap.frontLeftMotor);\r\n lfRearJag = new Jaguar(RobotMap.rearLeftMotor);\r\n rtJag = new Jaguar(RobotMap.frontRightMotor);\r\n rtRearJag = new Jaguar(RobotMap.rearRightMotor);\r\n drive = new RobotDrive(lfJag, lfRearJag, rtJag, rtRearJag);\r\n \r\n //lfFrontJag = new Jaguar (3);\r\n //rtFrontJag = new Jaguar (4);\r\n \r\n //joystick2 = new Joystick(2);\r\n //sensor1 = new DigitalInput(1);\r\n //sensor2 = new DigitalInput (2);\r\n\r\n }", "@Override\n\tpublic void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\tSmartDashboard.putData(\"Auto mode\", chooser);\n\t\tSystem.out.println(\"I am here\");\n\t\ttopRight = new CANTalon(1);\n\t\tmiddleRight = new CANTalon(3);\n\t\tbottomRight = new CANTalon(2);\n\t\ttopLeft = new CANTalon(5);\n\t\tmiddleLeft = new CANTalon(6);\n\t\tbottomLeft = new CANTalon(7);\n\t\tclimber = new CANTalon(4);\n\t\tshifter = new DoubleSolenoid(2,3);\n\t\tshifter.set(Value.kForward);\n\t\tbucket= new DoubleSolenoid(0, 1);\n\t\tclimber.reverseOutput(true);\n\t\t//Setting Followers\n\t\t//topRight is Right Side Master (TalonSRX #1)0.062, 0.00062, 0.62)\n\t\t//middleRight.reset();\n//\t\tmiddleRight.setProfile(0);\n//\t\tmiddleRight.setPID( 0.0, 0.0, 0.0);//TODO: make multiple profiles\n\t\t\n//\t\tmiddleRight.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Absolute);\n//\t\tmiddleRight.setEncPosition(0);\n//\t\tmiddleRight.setAllowableClosedLoopErr(10);\n\t\tmiddleRight.reverseSensor(true);\n//\t\tmiddleRight.configNominalOutputVoltage(+0f, -0f);\n//\t\tmiddleRight.configPeakOutputVoltage(+12f, -12f);\n\t\ttopRight.changeControlMode(TalonControlMode.Follower);\n\t\ttopRight.set(middleRight.getDeviceID());\n\t\ttopRight.reverseOutput(true);\n\t\tbottomRight.changeControlMode(TalonControlMode.Follower); //TalonSRX #3\n\t\tbottomRight.set(middleRight.getDeviceID());\n//\t\tmiddleRight.setProfile(1);\n//\t\tmiddleRight.setPID( 0.0, 0.0, 0.0);\n\t\t//climber is the climber Motor (TalonSRX #4)\n\t\t//TopLeft is Right Side Master (TalonSRX #5)\n\t\t//middleLeft.reset();\n\t\t//middleLeft.setProfile(0);\n//\t\tmiddleLeft.setPID(0.0, 0.00, 0.0);\n//\t\tmiddleLeft.setEncPosition(0);\n//\t\tmiddleLeft.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Absolute);\n//\t\tmiddleLeft.configNominalOutputVoltage(+0f, -0f);\n//\t\tmiddleLeft.configPeakOutputVoltage(+12f, -12f);\n\t\tmiddleLeft.reverseSensor(false);\n//\t\tmiddleLeft.setAllowableClosedLoopErr(10);\n\t\ttopLeft.changeControlMode(TalonControlMode.Follower); //TalonSRX #6\n\t\ttopLeft.set(middleLeft.getDeviceID());\n\t\ttopLeft.reverseOutput(true);\n\t\tbottomLeft.changeControlMode(TalonControlMode.Follower); //TalonSRX #7\n\t\tbottomLeft.set(middleLeft.getDeviceID());\n//\t\tmiddleLeft.setProfile(1);\n//\t\tmiddleLeft.setPID(0, 0, 0);\n\t\t//Sensors\n\t\timu = new ADIS16448IMU();\n\t\tclimberSubsystem = new ClimberSubsystem();\n\t\tbucketSubsystem = new BucketSubsystem();\n\t\tdriveSubsystem = new DriveSubsystem();\n\t}", "private void init() {\n\t\tcircle.init();\n\n\t\tcircle.startCircle();\n\t\tboard.startUpdating();\n\t}", "@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\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\n //ColorSensor colorSensor;\n //colorSensor = hardwareMap.get(ColorSensor.class, \"Sensor_Color\");\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "public RobotEngine (){\r\n\t\tthis.fuel = 100;\r\n\t\tthis.recycledMaterial = 0;\r\n\t\tthis.container = new ItemContainer ();\r\n\t\tthis.direction = Direction.NORTH;\r\n\t\tthis.navega = new NavigationModule();\r\n\t}", "@Override\n protected void initialize() {\n if (Robot.useDrive) {\n joy = Robot.oi.getJoystick();\n }\n Robot.drive.setBrakeMode();\n\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }", "public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}", "@Override\n public void init() {\n head.setFill(getColor());\n body.setFill(getColor());\n update();\n }", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "@Override\n protected void initialize() {\n //we should be able to interrupt this\n setInterruptible(true);\n //make sure the command ends if it's not done fast enough\n\t\tsetTimeout(driveTimeout);\n angle *= Math.PI / 180; \n //convert polar coordinates to X and Y components\n xDist = distance * Math.cos(angle - (Math.PI / 4));\n yDist = distance * Math.sin(angle - (Math.PI / 4));\n //input those components into the PID init in DriveTrain\n Robot.driveTrain.DrivePolarXPID(xDist);\n Robot.driveTrain.DrivePolarXPID(yDist);\n }", "private void initilize()\n\t{\n\t\tdimXNet = project.getNoC().getNumRotX();\n\t\tdimYNet = project.getNoC().getNumRotY();\n\t\t\n\t\taddProperties();\n\t\taddComponents();\n\t\tsetVisible(true);\n\t}" ]
[ "0.7146422", "0.7146422", "0.71346927", "0.71073896", "0.70973456", "0.7059802", "0.70530117", "0.7044984", "0.70215774", "0.7019538", "0.7000149", "0.6956137", "0.6949273", "0.6943871", "0.6901065", "0.6879995", "0.68781596", "0.68781596", "0.68781596", "0.6870671", "0.6860493", "0.68584186", "0.6841792", "0.6841687", "0.6837941", "0.68327296", "0.679963", "0.6779834", "0.6761121", "0.67601", "0.67594427", "0.67584383", "0.6752795", "0.67520833", "0.67374414", "0.6714373", "0.67114943", "0.6704507", "0.66841006", "0.66811436", "0.6680374", "0.6673738", "0.66442245", "0.6643765", "0.6636059", "0.66319925", "0.6628827", "0.6615466", "0.6613321", "0.6609756", "0.66037947", "0.6592337", "0.6543784", "0.6543566", "0.65158474", "0.6510855", "0.64789474", "0.6465195", "0.64550304", "0.64462286", "0.6444646", "0.6440279", "0.64324737", "0.64216703", "0.64068997", "0.64031184", "0.6394657", "0.6386843", "0.6386608", "0.6384526", "0.6372582", "0.63715726", "0.6361193", "0.63581616", "0.63556576", "0.6354246", "0.63299847", "0.63179684", "0.63102823", "0.6298509", "0.6296729", "0.62938696", "0.62925005", "0.62847817", "0.62821615", "0.6281243", "0.6276919", "0.62698734", "0.6269838", "0.6265751", "0.6259901", "0.6246075", "0.6238591", "0.623586", "0.6233258", "0.62258524", "0.6213234", "0.6196184", "0.6195646", "0.61933285", "0.6180283" ]
0.0
-1
init and draw the fruit.
private void DrawFruit(game_service game) { fru=new ArrayList<Fruit>(); List<String> f= game.getFruits(); String FJ=f.toString(); try { JSONArray j =new JSONArray(FJ); int i=0; int c=0; while(i<j.length()) { String help=""; JSONObject n=(JSONObject) j.get(i); JSONObject jf = n.getJSONObject("Fruit"); String s=jf.getString("pos"); String p[]=new String[3]; for (int k = 0; k < s.length(); k++) { if(s.charAt(k)!=',') { help=help+s.charAt(k); } if(c<3&&s.charAt(k)==',') { p[c]=help; c++; help=""; } } p[c]=help; c=0; double x=Double.parseDouble(p[0]); double y=Double.parseDouble(p[1]); double z=Double.parseDouble(p[2]); Point3D p1=new Point3D(x,y,z); double value=jf.getDouble("value"); int type=jf.getInt("type"); Fruit fr=new Fruit(value,p1,type,findEdgeFruit(p1, type)); fru.add(fr); i++; if(KMLbool) { String objType = ""; if(fr.type == 1) objType="Apple"; else objType="Banana"; try { KML_Logger.write(KmlName, fr.p.x(), fr.p.y(), objType, game.timeToEnd()); } catch (FileNotFoundException e) { e.printStackTrace(); } } } }catch(Exception error) { error.printStackTrace(); System.out.println("catch"); } for (Fruit f1: fru) { String fruit_icon = ""; if(f1.type==1) fruit_icon="./apple.png"; if(f1.type==-1) fruit_icon="./banana.png"; StdDraw.picture(f1.p.x(), f1.p.y(), fruit_icon); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PaletteFruit(ImageView view, Fruit fruit)\n {\n this.fruit = fruit;\n this.paletteView = view;\n //this.section = section;\n //this.path = new VectorChildFinder(paletteView.getContext(), R.drawable.ic_colorblob, paletteView).findPathByName(\"blob\");\n //path.setFillColor(fruit.toInt());\n paletteView.invalidate();\n }", "public Fruit()\n {\n setColor(Color.GREEN);\n }", "private void init(){\n\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(3);\n paint.setColor(Color.BLACK);\n paint.setTextSize(25);\n firstDraw = true;\n }", "@Override\n\tpublic void paintComponent(Graphics g)\n\t{\t\t\n\t\tGraphics2D g2 = (Graphics2D)g;\n\t\tturt = new Turtle();\n\t\tappleRadius = (int)Math.abs(turt.getStepLenght()*APPLE_RADIUS_FACTOR);\n\t\tg2.setStroke(fatStroke);\n\t\t\n\t\tg2.setBackground(Color.YELLOW);\n\t\tg2.translate(this.getWidth()/2, (int)(this.getHeight()*V_POSITION_FACTOR));\n\t\tg2.fillOval(SHADOW_X*SHADOW_SIZE, (int)(SHADOW_SIZE*SHADOW_Y), SHADOW_WIDTH*SHADOW_SIZE, SHADOW_SIZE);\n\t\tg2.drawString(\"Age: \"+age, AGESTRING_X, AGESTRING_Y);\n\n\t\t//** Age=1: Draw a branch with an apple **//\n\t\tturt.turn(90);\n\t\tturt.move(age);\n\t\tturt.draw(g2);\n\t\tif(age == 0)\n\t\t{\n\t\t\tg2.fillOval((int)Math.round(turt.getTarget().x-appleRadius), (int)Math.round(-turt.getTarget().y-appleRadius), appleRadius*2, appleRadius*2);\n\t\t}\n\t\tturt.turn(ANGLE);\n\t\taddBranches(g2, turt, age-1);\n\t}", "public Fruit() {\n super(0, \"melon.png\",HEIGHT);\n\n reposition();\n isSinglePlayer = false;\n timeSinceSpeedUp = 0;\n difficulty = 1f;\n }", "public void drawFruit(int x, int y, Graphics g) {\n\t\tg.drawImage(this.fruit, x, y, null);\n\t}", "public void init()\n {\n setBackground(Color.YELLOW);\n setForeground(Color.RED);\n }", "public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }", "public void paint(Graphics window)\n\t{\n\t\twindow.setColor(Color.WHITE);\n\t\twindow.fillRect(0,0,getWidth(), getHeight());\n\t\twindow.setColor(Color.BLUE);\n\t\twindow.drawRect(20,20,getWidth()-40,getHeight()-40);\n\t\twindow.setFont(new Font(\"TAHOMA\",Font.BOLD,18));\n\t\twindow.drawString(\"CREATE YOUR OWN SHAPE!\",40,40);\n\n\n\t\tColor[] col0 = {Color.CYAN, Color.RED, Color.GREEN};\n\t\tCustomShape cs0 = new CustomShape(500, 200, 50, 200, col0);\n\t\tcs0.draw(window);\n\t\t\n\t\tColor[] col1 = {Color.BLACK, Color.PINK, Color.DARK_GRAY};\n\t\tCustomShape cs1 = new CustomShape(180, 450, 200, 70, col1);\n\t\tcs1.draw(window);\n\t\t\n\t\tColor[] col2 = {Color.MAGENTA, Color.ORANGE, Color.YELLOW};\n\t\tCustomShape cs2 = new CustomShape(300, 120, 250, 250, col2);\n\t\tcs2.draw(window);\n\t}", "public GreetingCardCanvas(){\n array = new ArrayList<>();\n //Winter background\n array.add(new Square(0, 0, 256, 768,new Color(123, 165, 248)));\n array.add(new Square(0, 700, 256, 68, new Color(255,250,250)));\n //Autumn background\n array.add(new Square(256, 0, 256, 768,new Color(162, 163, 3)));\n array.add(new Square(256, 700, 256, 68, new Color(218,165,32)));\n //Spring background\n array.add(new Square(512, 0, 256, 768,new Color(0, 255, 127)));\n array.add(new Square(512, 700, 256, 68, new Color(124, 252, 0)));\n //Summer background\n array.add(new Square(768, 0, 256, 768,new Color(202,238,249)));\n array.add(new Square(768, 700, 256, 68, new Color(249, 209, 153)));\n //Sun\n array.add(new Sun (974, -50, 100, new Color(255, 170, 0),new Color(255, 195, 77)));\n //Winter Trunk\n array.add(new Trunk(120, 720, new Color(160, 82, 45)));\n //Autumm Trunk\n array.add(new Trunk(376, 720, new Color(160, 82, 45)));\n //Spring Trunk\n array.add(new Trunk(632, 720, new Color(160, 82, 45)));\n //Summer Trunk\n array.add(new Trunk(888, 720, new Color(160, 82, 45)));\n //Summer Leaves\n array.add(new Leaves(968, 600, Color.GREEN));\n //Spring Leaves\n array.add(new Leaves(712, 600, new Color(255, 183, 197)));\n //Autumn Leaves\n array.add(new Leaves(456, 600, new Color(218, 120, 27)));\n //Falling Autumn Leaves\n array.add(new Leaf(440, 650, new Color(218, 120, 27)));\n array.add(new Leaf(456, 700, new Color(218, 120, 27)));\n array.add(new Leaf(300, 680, new Color(218, 120, 27)));\n array.add(new Leaf(356, 710, new Color(218, 120, 27)));\n array.add(new Leaf(330, 650, new Color(218, 120, 27)));\n //Winter Snow\n array.add(new Snow(50, 50, 10, Color.WHITE));\n array.add(new Snow(123, 400, 10, Color.WHITE));\n array.add(new Snow(90, 90, 10, Color.WHITE));\n array.add(new Snow(100, 340, 10, Color.WHITE));\n array.add(new Snow(200, 200, 10, Color.WHITE));\n array.add(new Snow(140, 100, 10, Color.WHITE));\n array.add(new Snow(80, 200, 10, Color.WHITE));\n array.add(new Snow(60, 250, 10, Color.WHITE));\n array.add(new Snow(210, 250, 10, Color.WHITE));\n //Summer Clouds\n array.add(new Cloud(800, 20, 50, Color.WHITE));\n array.add(new Cloud(850, 120, 50, Color.WHITE));\n //Summer Birds\n array.add(new Bird(800, 100, 20, new Color(64,224,208), new Color(224,255,255)));\n array.add(new Bird(900, 70, 30, new Color(218,165,32), new Color(204,204,0)));\n //Beach ball\n array.add(new BeachBall(800, 710, 40));\n //Spring Flowers\n array.add(new Flowers(570, 720, 10, new Color(255, 183, 197)));\n array.add(new Flowers(610, 740, 10, new Color(255, 183, 197)));\n array.add(new Flowers(670, 720, 10, new Color(255, 183, 197)));\n array.add(new Flowers(720, 730, 10, new Color(255, 183, 197)));\n array.add(new Flowers(570, 520, 10, new Color(255, 183, 197)));\n array.add(new Flowers(610, 500, 10, new Color(255, 183, 197)));\n array.add(new Flowers(670, 530, 10, new Color(255, 183, 197)));\n array.add(new Flowers(720, 540, 10, new Color(255, 183, 197)));\n //More Winter Snow\n array.add(new Snow(123, 0, 10, Color.WHITE));\n array.add(new Snow(90, -310, 10, Color.WHITE));\n array.add(new Snow(100, -60, 10, Color.WHITE));\n array.add(new Snow(200, -200, 10, Color.WHITE));\n array.add(new Snow(140, -300, 10, Color.WHITE));\n array.add(new Snow(80, -200, 10, Color.WHITE));\n array.add(new Snow(60, -250, 10, Color.WHITE));\n array.add(new Snow(210, -250, 10, Color.WHITE));\n //The displayed text\n array.add(new Fonts());\n //Spring Clouds\n array.add(new Cloud(544, 20, 50, new Color(239,238,237)));\n array.add(new Cloud(594, 120, 50, new Color(239,238,237)));\n //Autumn Clouds\n array.add(new Cloud(288, 20, 50, new Color(224,223,221)));\n array.add(new Cloud(338, 120, 50, new Color(224,223,221)));\n //Winter Clouds\n array.add(new Cloud(32, 20, 50, new Color(168,167,165)));\n array.add(new Cloud(82, 120, 50, new Color(168,167,165)));\n //Autumn Flowers\n array.add(new AutumnLeaf(314, 720, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(354, 740, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(414, 720, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(464, 730, 20, new Color(176, 101, 75)));\n setPreferredSize(new Dimension(1024, 768));\n \n }", "@Override\r\n\tprotected void draw() {\n\t\tgoodCabbage = new Oval(center.x - CABBAGE_RADIUS, center.y\r\n\t\t\t\t- CABBAGE_RADIUS, 2 * CABBAGE_RADIUS, 2 * CABBAGE_RADIUS,\r\n\t\t\t\tColor.red, true);\r\n\t\twindow.add(goodCabbage);\r\n\t}", "@Override\n public void paintComponent(Graphics g)\n {\n m_g = g;\n // Not sure what our parent is doing, but this seems safe\n super.paintComponent(g);\n // Setup, then blank out with white, so we always start fresh\n g.setColor(Color.white);\n g.setFont(null);\n g.clearRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.fillRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.setColor(Color.red);\n //g.drawRect(10,10,0,0);\n //drawPoint(20,20);\n \n // Call spiffy functions for the training presentation\n m_app.drawOnTheCanvas(new ExposedDrawingCanvas(this));\n m_app.drawOnTheCanvasAdvanced(g);\n \n // ADVANCED EXERCISE: YOU CAN DRAW IN HERE\n \n // END ADVANCED EXERCISE SPACE\n \n // Clear the special reference we made - don't want to abuse this\n m_g = null;\n \n \n // Schedule the next repaint\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n m_app.repaint();\n try\n {\n Thread.sleep(100);\n }\n catch (Exception e)\n { \n \n }\n }\n }); \n }", "public void draw() {\n \n // TODO\n }", "@Override\n\tpublic void init() {\n this.setColor(Color.PINK);\n \n\t}", "public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }", "public void fruitRegrow()\n {\n fruit.makeInvisible();\n fruit.moveVertical(-60);\n fruit.makeVisible();\n }", "public Fruit(int x, int y, int image)\n\t{\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.type = image;\n\t\tspr = createSprite(main.getImage(image, false));\n\t\tsprite = spr;\n\t\tboom = createSprite(main.getImage(main.IMG_EXPLOSION, true));\n\t\tempty= createSprite(main.getImage(main.IMG_EMPTY, true));\n\t\tbomb = createSprite(main.getImage(main.IMG_BOMB, true));\n\t\tsprite.setPosition(x*sprite.getWidth(),y*sprite.getHeight());\n\t}", "public Fruit() {\r\n\t\tsetColor(null);\r\n\t\tsetName(null);\r\n\t}", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tfor (int i = 0; i < inc.length; i++) {\n\t\t\t\t\tg.setColor(new Color(220 - i * 50, 220 - i * 50, 220 - i * 50));\n\t\t\t\t\tg.fillOval(inc[i][0], inc[i][1], 30, 30);\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.yellow);\n\t\t\t\tg.fillOval(x, h, 30, 30);\n\n\t\t\t\t// 장애물\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.fillRect(0, 480, 800, 20);\n\t\t\t\tg.fillRect(400, 200, 50, 300);\n\t\t\t\tg.fillRect(300, 350, 100, 30);\n\t\t\t\t//\n\t\t\t\tGraphics2D g2 = bi.createGraphics();\n//\t\t\t\tthis.paintAll(g2);\n\t\t\t}", "public void food ()\r\n {\r\n\t//local colour variable for the food container\r\n\tColor container = new Color (191, 175, 178); //black shadows\r\n\t//local variable for the label\r\n\tColor label = new Color (196, 30, 58); //cardinal\r\n\t//local variable for the fish on the container\r\n\tColor fish = new Color (30, 133, 255); //dodger blue\r\n\t//local colour variable for the fish food\r\n\tColor fishFood = new Color (131, 105, 83); //pastel brown\r\n\r\n\t//loop used to animate the food container\r\n\tfor (int x = 0 ; x < 400 ; x++)\r\n\t{\r\n\t //array of local variable of x coordinates to the fish upper tail\r\n\t int upX[] = {832 - x, 832 - x, 845 - x};\r\n\t //array of local variable of y coordinates to the fish upper tail\r\n\t int upY[] = {88, 100, 85};\r\n\t //array of local variable of x coordinates to the fish lower tail\r\n\t int bottomX[] = {832 - x, 832 - x, 845 - x};\r\n\t //array of local variable of y coordinates to the fish lower tail\r\n\t int bottomY[] = {90, 102, 105};\r\n\r\n\t c.setColor (container);\r\n\t //container\r\n\t c.fillRect (775 - x, 20, 80, 110);\r\n\r\n\t c.setColor (label);\r\n\t //label\r\n\t c.fillRect (775 - x, 45, 80, 20);\r\n\r\n\t c.setColor (Color.black);\r\n\t c.setFont (new Font (\"Calibri\", 1, 15));\r\n\t //letters\r\n\t c.drawString (\"FISH FOOD\", 775 - x, 60);\r\n\r\n\t c.setColor (Color.white);\r\n\t //mouth\r\n\t c.fillArc (794 - x, 90, 10, 9, 220, 280);\r\n\r\n\t c.setColor (fish);\r\n\t //fish body\r\n\t c.fillOval (800 - x, 80, 35, 30);\r\n\t //fish tail\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (upX, upY, 3);\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (bottomX, bottomY, 3);\r\n\r\n\t c.setColor (Color.white);\r\n\t //eye\r\n\t c.fillOval (805 - x, 85, 17, 17);\r\n\r\n\t c.setColor (Color.black);\r\n\t //inner eye\r\n\t c.fillOval (808 - x, 92, 6, 6);\r\n\r\n\t c.setColor (fishFood);\r\n\t //food\r\n\t c.fillOval (788 - x, 92, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (785 - x, 87, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (782 - x, 96, 5, 5);\r\n\r\n\t //delay\r\n\t try\r\n\t {\r\n\t\tsleep (7);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t }\r\n\r\n\t}\r\n\r\n\t//loop used to animate the fish food container going down\r\n\tfor (int x = 0 ; x < 30 ; x++)\r\n\t{\r\n\t //array of local variable of x coordinates to the fish upper tail\r\n\t int upX[] = {432, 432, 445};\r\n\t //array of local variable of y coordinates to the fish upper tail\r\n\t int upY[] = {88 - x, 100 - x, 85 - x};\r\n\t //array of local variable of x coordinates to the fish lower tail\r\n\t int bottomX[] = {432, 432, 445};\r\n\t //array of local variable of y coordinates to the fish lower tail\r\n\t int bottomY[] = {90 - x, 102 - x, 105 - x};\r\n\r\n\t c.setColor (container);\r\n\t //container\r\n\t c.fillRect (375, 20 - x, 80, 110);\r\n\r\n\t c.setColor (label);\r\n\t //label\r\n\t c.fillRect (375, 45 - x, 80, 20);\r\n\r\n\t c.setColor (Color.black);\r\n\t c.setFont (new Font (\"Calibri\", 1, 15));\r\n\t //letters\r\n\t c.drawString (\"FISH FOOD\", 382, 60 - x);\r\n\r\n\t c.setColor (Color.white);\r\n\t //mouth\r\n\t c.fillArc (394, 90 - x, 10, 9, 220, 280);\r\n\r\n\t c.setColor (fish);\r\n\t //fish body\r\n\t c.fillOval (400, 80 - x, 35, 30);\r\n\t //fish tail\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (upX, upY, 3);\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (bottomX, bottomY, 3);\r\n\r\n\t c.setColor (Color.white);\r\n\t //eye\r\n\t c.fillOval (405, 85 - x, 17, 17);\r\n\r\n\t c.setColor (Color.black);\r\n\t //inner eye\r\n\t c.fillOval (408, 92 - x, 6, 6);\r\n\r\n\t c.setColor (fishFood);\r\n\t //food\r\n\t c.fillOval (388, 92 - x, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (385, 87 - x, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (382, 96 - x, 5, 5);\r\n\r\n\t //delay\r\n\t try\r\n\t {\r\n\t\tsleep (7);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t }\r\n\r\n\t}\r\n\r\n\t//loop used to animate the fish food going down\r\n\tfor (int x = 0 ; x < 30 ; x++)\r\n\t{\r\n\t //array of local variable of x coordinates to the fish upper tail\r\n\t int upX[] = {432, 432, 445};\r\n\t //array of local variable of y coordinates to the fish upper tail\r\n\t int upY[] = {58 + x, 70 + x, 55 + x};\r\n\t //array of local variable of x coordinates to the fish lower tail\r\n\t int bottomX[] = {432, 432, 445};\r\n\t //array of local variable of y coordinates to the fish lower tail\r\n\t int bottomY[] = {60 + x, 72 + x, 75 + x};\r\n\r\n\t c.setColor (container);\r\n\t //container\r\n\t c.fillRect (375, -10 + x, 80, 110);\r\n\r\n\t c.setColor (label);\r\n\t //label\r\n\t c.fillRect (375, 15 + x, 80, 20);\r\n\r\n\t c.setColor (Color.black);\r\n\t c.setFont (new Font (\"Calibri\", 1, 15));\r\n\t //letters\r\n\t c.drawString (\"FISH FOOD\", 382, 30 + x);\r\n\r\n\t c.setColor (Color.white);\r\n\t //mouth\r\n\t c.fillArc (394, 60 + x, 10, 9, 220, 280);\r\n\r\n\t c.setColor (fish);\r\n\t //fish body\r\n\t c.fillOval (400, 50 + x, 35, 30);\r\n\t //fish tail\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (upX, upY, 3);\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (bottomX, bottomY, 3);\r\n\r\n\t c.setColor (Color.white);\r\n\t //eye\r\n\t c.fillOval (405, 55 + x, 17, 17);\r\n\r\n\t c.setColor (Color.black);\r\n\t //inner eye\r\n\t c.fillOval (408, 62 + x, 6, 6);\r\n\r\n\t c.setColor (fishFood);\r\n\t //food\r\n\t c.fillOval (388, 62 + x, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (385, 57 + x, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (382, 66 + x, 5, 5);\r\n\r\n\t //delay\r\n\t try\r\n\t {\r\n\t\tsleep (7);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t }\r\n\t}\r\n\r\n\t//loop used to animate the fish food container going out\r\n\tfor (int x = 0 ; x < 400 ; x++)\r\n\t{\r\n\t //array of local variable of x coordinates to the fish upper tail\r\n\t int upX[] = {432 + x, 432 + x, 445 + x};\r\n\t //array of local variable of y coordinates to the fish upper tail\r\n\t int upY[] = {88, 100, 85};\r\n\t //array of local variable of x coordinates to the fish lower tail\r\n\t int bottomX[] = {432 + x, 432 + x, 445 + x};\r\n\t //array of local variable of y coordinates to the fish lower tail\r\n\t int bottomY[] = {90, 102, 105};\r\n\r\n\t c.setColor (container);\r\n\t //container\r\n\t c.fillRect (375 + x, 20, 80, 110);\r\n\r\n\t c.setColor (label);\r\n\t //label\r\n\t c.fillRect (375 + x, 45, 80, 20);\r\n\r\n\t c.setColor (Color.black);\r\n\t c.setFont (new Font (\"Calibri\", 1, 15));\r\n\t //letters\r\n\t c.drawString (\"FISH FOOD\", 382 + x, 60);\r\n\r\n\t c.setColor (Color.white);\r\n\t //mouth\r\n\t c.fillArc (394 + x, 90, 10, 9, 220, 280);\r\n\r\n\t c.setColor (fish);\r\n\t //fish body\r\n\t c.fillOval (400 + x, 80, 35, 30);\r\n\t //fish tail\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (upX, upY, 3);\r\n\t c.setColor (fish);\r\n\t c.fillPolygon (bottomX, bottomY, 3);\r\n\r\n\t c.setColor (Color.white);\r\n\t //eye\r\n\t c.fillOval (405 + x, 85, 17, 17);\r\n\r\n\t c.setColor (Color.black);\r\n\t //inner eye\r\n\t c.fillOval (408 + x, 92, 6, 6);\r\n\r\n\t c.setColor (fishFood);\r\n\t //food\r\n\t c.fillOval (388 + x, 92, 5, 5);\r\n\t c.setColor (fishFood);;\r\n\t c.fillOval (385 + x, 87, 5, 5);\r\n\t c.setColor (fishFood);\r\n\t c.fillOval (382 + x, 96, 5, 5);\r\n\r\n\t //delay\r\n\t try\r\n\t {\r\n\t\tsleep (7);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t }\r\n\r\n\t}\r\n }", "private void initFruits() {\n\t\tthis.fruits.clear();\n\t\tGraphFruit fruit = new GraphFruit();\n\t\tList<String> f = game.getFruits();\n\t\tfor(String s : f) {\n\t\t\tfruit.initFruit(s);\n\t\t\tthis.fruits.add(fruit);\n\t\t}\n\t}", "public Fruit(){\r\n\t\tthis.name = \"Not Specified\";\r\n\t\tthis.color = \"Not Specified\";\r\n\t\tthis.averageHarvestTime = 0.0;\r\n\t\tthis.timeUnit = \"days\";\r\n\t}", "private static void draw() {\n\t\tinitField();\n\t\tview = new View(field);\n\t\tview.setSize(viewWidth, viewHeight);\n\t\tframe = new JFrame();\n\t\tframe.setSize(fwidth, fheight);\n\t\tframe.setTitle(\"Land Mine\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.add(view);\n\t\tframe.setVisible(true);\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n if(image != null)\n {\n \tScaleImage();\n \tg.drawImage(image, 0, 0, null);\n }\n \n if(isFood())\n\t\t{\n \t\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg2.setColor(Color.red);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.drawArc(getWidth()/2, getHeight()/2-5, 10, 10, 30, 210);\t \n\t\t\tg2.drawArc(getWidth()/2, getHeight()/2+5, 10, 10, 180, 270);\n\t\t\tg2.setStroke(new BasicStroke(1));\n\t\t\t\n\t\t}\n \n for (int i = 0; i < listAnimals.size(); i++) {\n\t\t\t(listAnimals.get(i)).drawAnimal(g);\n\t\t\t//System.out.println(\"draw object \" + listAnimals.get(i) + \", location \" + listAnimals.get(i).getLocation());\n\t\t}\n \n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\n \r\n g=lienzo.getGraphicsContext2D();\r\n \r\n \r\n double w = lienzo.getWidth();\r\n double h = lienzo.getHeight();\r\n \r\n g.setStroke(Color.RED);\r\n g.setLineWidth(3);\r\n g.strokeRect(0, 0, w, h);\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n }", "private void init() {\n\n mCursorPaint = new Paint();\n mCursorPaint.setColor(Color.BLUE);\n\n mLimitPaint = new Paint();\n mLimitPaint.setColor(Color.YELLOW);\n\n mCoveredPaint = new Paint();\n mCoveredPaint.setColor(Color.CYAN);\n\n mRangePaint = new Paint();\n mRangePaint.setColor(Color.DKGRAY);\n\n mEraserPaint = new Paint();\n mEraserPaint.setColor(Color.TRANSPARENT);\n // ensure the erasing effect\n mEraserPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));\n }", "private void initPaint() {\n mPaint = new Paint();\n mPaint.setAntiAlias(true);\n mStrokeWidth = 2.0f;\n mPaint.setStyle(Paint.Style.STROKE);// Hollow effect\n mPaint.setColor(mRippleColor);\n mPaint.setStrokeWidth(mStrokeWidth);// set the line width\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 }", "public Food() {\n\t\tsuper(\"FOOD.png\");\n\t}", "@FXML\r\n private void CambiarColor(ActionEvent event){\r\n \r\n \r\n \r\n g.setFill(Color.rgb((int) (Math.random()*255),(int) (Math.random()*255),(int) (Math.random()*255)));\r\n g.fillPolygon(x, y, 3); // Triangulo //\r\n g.fillOval(150, 70, 90, 90); // Circulo //\r\n g.strokeRect(10, 45, 45, 45); // Cuadrado todavia no funciona //\r\n \r\n \r\n }", "public static void main(String[] args){\n AbstractFactory s = FactoryProducer.getFactory(\"shape\");\n AbstractFactory c = FactoryProducer.getFactory(\"color\");\n s.getShape(\"circular\").draw();\n\n c.getColor(\"red\").fill();\n }", "private void setUp()\n {\n path = new Path();\n drawPaint = new Paint();\n brushSize = getResources().getInteger(R.integer.medium_size);\n lastBrushSize = brushSize;\n //initialize paint color\n drawPaint.setColor(paintColor);\n drawPaint.setAntiAlias(true);\n drawPaint.setStrokeWidth(brushSize);\n drawPaint.setStyle(Paint.Style.STROKE);\n drawPaint.setStrokeJoin(Paint.Join.ROUND);\n drawPaint.setStrokeCap(Paint.Cap.ROUND);\n //initialize canvas background\n canvasPaint = new Paint(Paint.DITHER_FLAG);\n }", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "public void draw() {\r\n\t\t// Draw the triangle making up the mountain\r\n\t\tTriangle mountain = new Triangle(this.x, 100,\r\n\t\t\t\tthis.x + mountainSize / 2, 100, this.x + mountainSize / 4,\r\n\t\t\t\t100 - this.y / 4, Color.DARK_GRAY, true);\r\n\t\t// Draw the triangle making up the snow cap\r\n\t\tthis.snow = new Triangle(side1, bottom - this.y / 8, side2, bottom\r\n\t\t\t\t- this.y / 8, this.x + mountainSize / 4, 100 - this.y / 4,\r\n\t\t\t\tColor.WHITE, true);\r\n\t\tthis.window.add(mountain);\r\n\t\tthis.window.add(snow);\r\n\t}", "@Override\n protected final void setGraphics() {\n super.setGraphics();\n Graphics g = toDraw.getGraphics();\n g.setColor(Color.BLACK); \n \n for (int i = 0; i < choices.size(); i++) { \n g.drawString(choices.get(i).getValue(), wGap, (i + 1) * hItemBox);\n }\n }", "public static void init()\n {\n\n addShapeless();\n\n addShaped();\n }", "private void init() {\n\n this.paint.setStyle(Paint.Style.FILL);\n this.mBorder.setStyle(Paint.Style.STROKE);\n this.mBorder.setColor(Color.GRAY);\n this.mBorder.setStrokeWidth(BORDER_STROKE);\n\n }", "@Override\n public void draw( Graphics g )\n {\n g.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\n g.setColor( Color.BLUE );\n g.fillOval( baseX, baseY, myWidth, myHeight );\n g.setColor( Color.BLACK );\n g.drawString( card, baseX + 7, baseY + 20 ); }", "public Feux() {\n initComponents();\n \n rouge.setEnabled(true);\n orange.setEnabled(false);\n vert.setEnabled(false);\n \n start();\n \n }", "private void instantiateVariables() {\n paint = new Paint();\n fightActivity = (FightActivity) context;\n Typeface tf = Typeface.create(\"Arial\", Typeface.BOLD);\n paint.setTypeface(tf);\n }", "@Override\n public void run(){\n gameItem = shapeFactory.getShape(shapeButton, shapeName);\n if (gameItem != null) {\n gameItem.clearName(); //clears text\n gameItem.draw(); //draws new shape\n }\n }", "private void init() {\n mSelectedColor = new Paint(Paint.ANTI_ALIAS_FLAG);\n mSelectedColor.setColor(getResources().getColor(R.color.colorPrimary));\n mSelectedColor.setStyle(Paint.Style.FILL);\n\n mUnselectedColor = new Paint(Paint.ANTI_ALIAS_FLAG);\n mUnselectedColor.setColor(getResources().getColor(R.color.textColorSecondaryInverse));\n\n mSelectedColor.setStyle(Paint.Style.FILL);\n mPosition = new RectF();\n\n mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n mTextPaint.setColor(getResources().getColor(R.color.textColorSecondary));\n mTextPaint.setTextSize(48);\n }", "public void draw() {\n\t\tif (fill) {\n\t\t\tapplet.noStroke();\n\t\t\tapplet.fill(color);\n\t\t} else {\n\t\t\tapplet.noFill();\n\t\t\tapplet.stroke(color);\n\t\t}\n\t\tapplet.rect(position.x, position.y, size.x, size.y);\n\t\tsliderButton.draw(new PVector(-10,0));\n\t}", "protected void paintElement() throws ParseException {\n\t\t_paper = _panel.getGraphics();\n\t\tif(isGamer==2){//fruit\n\t\t\t_paper.setColor(Color.YELLOW);\n\t\t\t_paper.fillOval(x,y,10,10);\n\t\t\tPoint3D p=new Point3D(x,y,0);\n\t\t\tConvertFactory conver=new ConvertFactory(image);\n\t\t\tPoint3D p2=conver.PicselToGps(p);\n\t\t\tFruit fruit=new Fruit(p2);\n\t\t\tgame.addFruit(fruit);\n\t\t} \n\t\tif(isGamer==1) {//pacman\n\t\t\t_paper.setColor(Color.RED);\n\t\t\t_paper.fillOval(x,y,20,20);\n\t\t\tPoint3D p=new Point3D(x,y,0);\n\t\t\tnew ConvertFactory(image);\n\t\t\tPoint3D p2=ConvertFactory.PicselToGps(p);\n\t\t\tPacman pacman =new Pacman(p2);\n\t\t\tgame.addPacman(pacman);\n\t\t}\n\t\tif(isGamer==3) {//Run\n\n\t\t}\n\t\t_paper.setFont(new Font(\"Monospaced\", Font.PLAIN, 14)); \n\t\t_paper.drawString(\"(\"+Integer.toString(x)+\", \"+Integer.toString(y)+\")\",x,y-10);\n\t}", "public Item()\r\n {\r\n gen = new Random();\r\n color = new Color(gen.nextInt());\r\n x = 200;\r\n w = 100;\r\n h = 18;\r\n }", "public DrawHouse(){\r\n\t\tcanvas = new SketchPad(1000, 1000);\r\n\t\tpen = new DrawingTool(canvas);\r\n\t}", "public void paint(Graphics g) {\n\t\t \n\t\tmyMeal[0] = new Cake(0, 0, Color.yellow);\n\t\tmyMeal[1] = new Pie(0, 100, Color.blue);\n\t\tmyMeal[2] = new Donut();\n\t\t\n\t\t// call the bake() in ALL of the Cake and Pie objects\n\t\tfor (int x = 0; x < myMeal.length; x++) {\n\t\t\tmyMeal[x].bake(g);\n\t\t}\n\t\t\n\t\tg.drawString(myMeal[2].whatAmI(), 125, 125);\n\t\t\n\t}", "public void syria(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(206,17,38);//red\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,122,61);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,122,61);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,122,61);//green\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(206,17,38);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(0);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(206,17,38);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public void display2() { // for drag action -> color change\n stroke (255);\n fill(0,255,255);\n ellipse (location.x, location.y, diameter, diameter);\n }", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "public void makeGraphic() {\n\t\tStdDraw.clear();\n\n\t\tfor (int i = 0; i < p.showArray.size(); i++) {\n\t\t\tStdDraw.setPenColor(0, 255, 255);\n\n\t\t\tStdDraw.circle(p.showArray.get(i).acquirePosition().x, p.showArray.get(i).acquirePosition().y,\n\t\t\t\t\tp.showArray.get(i).acquireSizeOfBody());\n\t\t\tStdDraw.setPenColor(StdDraw.GRAY);\n\n\t\t\tStdDraw.filledCircle(p.showArray.get(i).acquirePosition().x, p.showArray.get(i).acquirePosition().y,\n\t\t\t\t\tp.showArray.get(i).acquireSizeOfBody());\n\n\t\t}\n\t\tStdDraw.show();\n\t}", "public void draw(Graphics g){\n g.setColor (colour);\n g.fillOval (x,y,DIAMETER, DIAMETER);\n g.setColor (Color.black);\n g.drawString(name, x+5, y+30);\n g.setFont (new Font (\"Times New Roman\", Font.PLAIN, 16) );\n g.setColor (Color.black);\n g.drawString (Integer.toString(seatNum), x+13 ,y+18) ;\n \n \n \n \n \n \n }", "public void init() {\n fIconkit = new Iconkit(this);\n\n\t\tsetLayout(new BorderLayout());\n\n fView = createDrawingView();\n\n Panel attributes = createAttributesPanel();\n createAttributeChoices(attributes);\n add(\"North\", attributes);\n\n Panel toolPanel = createToolPalette();\n createTools(toolPanel);\n add(\"West\", toolPanel);\n\n add(\"Center\", fView);\n Panel buttonPalette = createButtonPanel();\n createButtons(buttonPalette);\n add(\"South\", buttonPalette);\n\n initDrawing();\n setBufferedDisplayUpdate();\n setupAttributes();\n }", "public void draw() {\n \n }", "protected void initialize() {\n\t\tsetBodyColor(Color.BLACK);\r\n\t\tsetGunColor(Color.BLACK);\r\n\t\tsetRadarColor(Color.BLACK);\r\n\t\tsetScanColor(Color.BLUE);\r\n\t\tsetBulletColor(Color.RED);\r\n\t}", "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 static void drawMain()\n {\n // Draws the title of the program\n UI.setColor(Color.black);\n UI.fillRect(55, 5, 485, 50);\n UI.setColor(Color.white);\n UI.setFontSize(50);\n UI.drawString(\"Movie Recommender\", 60, 50);\n }", "public void draw(Graphics window)\r\n {\r\n window.setColor(color);\r\n window.fillRect(xPos, yPos, width, height);\r\n window.setColor(Color.green);\r\n window .fillOval(xPos-15, yPos-15, width-20, height-20);\r\n window .fillOval(xPos+35, yPos-15, width-20, height-20);\r\n\r\n }", "static void InitiateDraw() {\n\t\tshape = new GeneralPath();\n\t\ti1.setOverlay(null);\n\t\tOL = new Overlay();\n\t}", "private void initAmmo(){\n ammo.setFont(Font.loadFont(\"file:resource/Fonts/PressStart2P.ttf\", 25));\n ammo.setFill(Color.WHITE);\n ammo.setText(\"x\" + String.format(\"%04d\", shots));\n ammoText.getChildren().add(ammoIcon);\n ammoText.getChildren().add(ammo);\n HUD.getChildren().add(ammoText);\n }", "public void show(){\n fill(255);\n stroke(255);\n \n if (left){\n rect(0, y, size, brickLength);\n x = 0;\n }\n else{\n rect(width - size, y, size, brickLength);\n x = width - size;\n }\n }", "public void draw() {\n draw(this.root, new RectHV(0.0, 0.0, 1.0, 1.0));\n }", "public void Display() \n {\n float theta = velocity.heading() + PI/2;\n fill(175);\n stroke(0);\n pushMatrix();\n translate(pos.x,pos.y);\n rotate(theta);\n beginShape();\n vertex(0, -birdSize*2);\n vertex(-birdSize, birdSize*2);\n vertex(birdSize, birdSize*2);\n endShape(CLOSE);\n popMatrix();\n }", "public void updateFruit() {\n\t\t\n\t\tint foodX = 0, foodY = 0; // foodX, foodY - coordinates for normal fruit, with s for super\n\t\tint []place; // place on board, will hold X and Y\n\n\t\tif(fruits.size() <= 0) { // if there's no fruit\n\n\t\t\tplace = placeFruit();\n\t\t\tfoodX = place[0];\n\t\t\tfoodY = place[1];\n\n\t\t\taddFruit(foodX, foodY);\n\t\t}\n\t}", "public void drawOne (Graphics g){\r\n\t\tbeep1.play();\r\n\t\tif (screen == 1){\r\n\t\tg.setColor(Color.RED);\r\n\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t\telse if (screen == 2 || screen == 3){ //Colour Arc's will light up white for non traditional options because it was more convenient and shorter to code :)\r\n\t\tg.setColor(Color.WHITE);\t\r\n\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t\t\r\n\t\tdelay(500);\r\n\r\n\t\tif (screen == 1){\r\n\t\t\tg.setColor(REDFADE);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t\telse if (screen == 2){\r\n\t\t\tg.setColor(PURPLE_1);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t\telse if (screen == 3){\r\n\t\t\tg.setColor(PINK_TROP);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t}", "public void display() {\n shadow.display();\r\n strokeWeight(strokeWeight);\r\n fill(boxColour);\r\n rect(x, y, w, h, 7);\r\n }", "public Dragon()\n {\n // initialise instance variables\n x = 50;\n y = 50;\n size = 1;\n c = Color.BLUE; // INS comment here.\n attackType = \"Fire\";\n textBox = \"Hello\";\n }", "private static void addShaped()\n {}", "public BallGame() {\n\t\tmyCanvas = new Canvas(\"Ball Demo\", 600, 500, Color.WHITE);\n\t\tmyCanvas.setVisible(true);\n\t\t// Aufgabe 1: MouseListener registrieren\n\t\tmyCanvas.addMouseListener(new DartArrow());\t\t\n\t}", "public Carte() {\r\n\t\tthis.setBackground(COULEUR_CARTE);\r\n\r\n\t\tafficheurCarte = new AfficheurCarte();\r\n\t\tafficheurVehicule = new AfficheurVehicule();\r\n\t}", "public void draw() {\n }", "private void init(AttributeSet attrs, int defStyle) {\n wall = new Vector<>();\n sprite = new Vector<>();\n\n // Caractéristiques des bords\n wallPaint = new Paint();\n wallPaint.setAntiAlias(true);\n wallPaint.setColor(0xff224499 );\n wallPaint.setStyle(Paint.Style.STROKE);\n wallPaint.setStrokeWidth(PIXEL_SIZE+1);\n wallPaint.setStrokeCap(Paint.Cap.ROUND);\n\n //On prépare le timer\n handler = new Handler();\n\n // On écoute les évènements.\n setOnTouchListener(this);\n\n }", "public Shapes draw ( );", "void drawShape() {\n System.out.println(\"Drawing Triangle\");\n this.color.addColor();\n }", "private void show(Graphics g){\n g.setColor(Color.WHITE);\n g.drawRect(x,y,width,height);\n if(lu != null)\n lu.show(g);\n if(ld != null)\n ld.show(g);\n if(ru != null)\n ru.show(g);\n if(rd != null)\n rd.show(g);\n }", "@Override\n public void init() {\n head.setFill(getColor());\n body.setFill(getColor());\n update();\n }", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }", "private void setup() {\n // init paint\n paint = new Paint();\n paint.setAntiAlias(true);\n\n paintBorder = new Paint();\n setBorderColor(Color.WHITE);\n paintBorder.setAntiAlias(true);\n }", "public void begin() {\n\t\tg.setColor(bgColor);\n\t\tg.fillRect(0, 0, width, height);\n\t\tg.setColor(Color.black);\n\t}", "public Food(int x, int y) {\n\t\tsuper(\"FOOD.png\",x,y);\n\t}", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "public void draw(){\n if (! this.isFinished() ){\n UI.setColor(this.color);\n double left = this.xPos-this.radius;\n double top = GROUND-this.ht-this.radius;\n UI.fillOval(left, top, this.radius*2, this.radius*2);\n }\n }", "public zombie_bg()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1010,900, 1); \n setPaintOrder(ScoreBoard.class, player.class, zomb_gen.class, options.class);\n populate();\n \n }", "public Kal()\n {\n setDefaultCloseOperation( EXIT_ON_CLOSE );\n \n setLayout( new FlowLayout() );\n \n allTheShapes = new Shape[1000];\n \n boxButton = new JButton(\"box\");\n add(boxButton);\n boxButton.addActionListener(this);\n \n addMouseListener(this);\n addMouseMotionListener(this);\n \n setSize( 500,500);\n setVisible( true);\n \n theColorPicker = new ColorPicker3();\n \n }", "@Override\n public void simpleInitApp() {\n this.viewPort.setBackgroundColor(ColorRGBA.LightGray);\n im = new InteractionManager();\n setEdgeFilter();\n initEnemies();\n initCamera();\n initScene();\n initPlayer();\n initCrossHairs();\n }", "public BullsEyeview(Context context, AttributeSet attrs, int defStyle) {\n super(context, attrs, defStyle);\n mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n mPaint.setStyle(Paint.Style.FILL);\n mCenter = new Point();\n }", "public void createBike(){\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "public void init() {\n\t\t//initializing graphics area\n \tcanvas = new FacePamphletCanvas();\n \tadd(canvas);\n \t\n\t\taddInteractors();\n\t\taddActionListeners();\n }", "void draw() {\n\t\tSystem.out.println(\"Drawing the Rectange...\");\n\t\t}", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(this.color);\r\n\t\tg.fillOval((int)x, (int)y, side, side);\r\n\t\tg.setColor(this.color2);\r\n\t\tg.fillOval((int)x+5, (int)y+2, side/2, side/2);\r\n\t}", "@Override\r\n public void paintComponent(Graphics g) {\r\n // always clear the screen first!\r\n g.clearRect(0, 0, WIDTH, HEIGHT);\r\n\r\n // GAME DRAWING GOES HERE\r\n \r\n // use the custom colour variable\r\n g.setColor(Color.PINK);\r\n // create a \"background\"\r\n // x, y, width, height\r\n g.fillRect(0, 0, WIDTH, HEIGHT);\r\n \r\n // set the colour of the new oval as the colour of Omar\r\n g.setColor(omar);\r\n // draw anything that is an oval (circle included)\r\n // x, y, width, height\r\n g.fillOval(100, 75, 400, 800);\r\n // outline the oval\r\n g.setColor(Color.BLACK);\r\n g.drawOval(100, 75, 400, 800);\r\n \r\n // make a crown on the top of the head\r\n g.setColor(crown);\r\n \r\n // create triangles for the crown\r\n int[] crownA = {245, 265, 285};\r\n int[] crownB = {75, 25, 75};\r\n // array of X points, array of Y points, number of points\r\n g.fillPolygon(crownA, crownB, 3);\r\n \r\n int[] crownC = {280, 300, 320};\r\n int[] crownD = {75, 10, 75};\r\n g.fillPolygon(crownC, crownD, 3);\r\n \r\n int[] crownE = {315, 335, 355};\r\n int[] crownF = {75, 25, 75};\r\n g.fillPolygon(crownE, crownF, 3);\r\n \r\n // create the gems on the crown\r\n // Set colour as magenta\r\n g.setColor(Color.MAGENTA);\r\n int[] shimmerA = {258, 263, 268, 263};\r\n int[] shimmerB = {60, 50, 60, 70};\r\n g.fillPolygon(shimmerA, shimmerB, 4);\r\n \r\n int[] shimmerC = {295, 300, 305, 300};\r\n int[] shimmerD = {60, 50, 60, 70};\r\n g.fillPolygon(shimmerC, shimmerD, 4);\r\n \r\n int[] shimmerE = {330, 335, 340, 335};\r\n int[] shimmerF = {60, 50, 60, 70};\r\n g.fillPolygon(shimmerE, shimmerF, 4);\r\n \r\n // create the ears of the face\r\n // set colour back to Omar's skin tone\r\n g.setColor(omar);\r\n g.fillOval(65, 400, 100, 200);\r\n g.fillOval(440, 400, 100, 200);\r\n // outline the ears\r\n g.setColor(Color.BLACK);\r\n //x, y, width, length, starting degrees, added degrees to starting degrees\r\n g.drawArc(65, 400, 100, 200, 90, 180);\r\n g.drawArc(440, 400, 100, 200, 270, 180);\r\n // create the lines of where the ears end\r\n g.drawArc(85, 450, 50, 100, 90, 180);\r\n g.drawArc(465, 450, 50, 100, 270, 180);\r\n \r\n // set the colours of the eyes\r\n g.setColor(eye);\r\n // make the eyes of the face\r\n g.fillOval(200, 320, 50, 50);\r\n g.fillOval(340, 320, 50, 50);\r\n // set the shine in the eyes as white\r\n g.setColor(Color.WHITE);\r\n // create the circles\r\n g.fillOval(whiteRight, 330, 15, 15);\r\n g.fillOval(whiteLeft, 330, 15, 15);\r\n \r\n // set the colour of the eyebrows as red\r\n g.setColor(Color.RED);\r\n // draw a filled in rectangle\r\n // x, y, width, height\r\n g.fillRect(160, eyebrowMove, 100, 50);\r\n g.fillRect(330, eyebrowMove, 100, 50);\r\n // outline the eyebrows\r\n // set the colour as black\r\n g.setColor(Color.BLACK);\r\n g.drawRect(160, eyebrowMove, 100, 50);\r\n g.drawRect(330, eyebrowMove, 100, 50);\r\n \r\n //make the nose of the face\r\n //x, y, width, length, starting degrees, added degrees to starting degrees\r\n g.drawArc(210, 465, 75, 75, 90, 180);\r\n g.drawArc(310, 465, 75, 75, 270, 180);\r\n // make the centre bottom of the nose\r\n g.drawArc(235, 440, 125, 125, 180, 180);\r\n \r\n // draw the mouth\r\n g.fillArc(145, 450, 300, 350, 180, 180);\r\n // draw the upper lips\r\n g.setColor(lips);\r\n g.fillArc(144, 610, 154, 35, 0, 180);\r\n g.fillArc(295, 610, 150, 35, 0, 180);\r\n // outline his lips\r\n g.setColor(Color.BLACK);\r\n g.drawArc(144, 610, 154, 35, 0, 180);\r\n g.drawArc(295, 610, 150, 35, 0, 180);\r\n \r\n // draw the tongue\r\n // set the colour as red\r\n g.setColor(Color.RED);\r\n g.fillOval(200, tongue, 190, 100);\r\n g.setColor(Color.BLACK);\r\n g.drawOval(200, tongue, 190, 100);\r\n \r\n \r\n // create the mustache of the face\r\n g.setColor(Color.BLACK);\r\n g.fillOval(260, 572, 40, 40);\r\n g.fillOval(290, 572, 40, 40);\r\n // create triangles for the end of the mustache\r\n int[] triangleA = {270, 270, 200};\r\n int[] triangleB = {575, 610, mustache};\r\n // array of X points, array of Y points, number of points\r\n g.fillPolygon(triangleA, triangleB, 3);\r\n \r\n int[] triangleC = {310, 310, 390};\r\n int[] triangleD = {572, 612, mustache};\r\n // array of X points, array of Y points, number of points\r\n g.fillPolygon(triangleC, triangleD, 3);\r\n\t\t\r\n // GAME DRAWING ENDS HERE\r\n }", "@Override\n protected void paintForeground(Graphics2D g) {\n g.setColor(Color.MAGENTA);\n g.setFont(new Font(\"Calibri\", Font.BOLD,20));\n g.drawString(\"Villain Carnage\",5,30);\n g.setFont(new Font(\"Calibri\", Font.BOLD, 15));\n g.drawString((\"Level 1\"),20,60);\n \n \n \n //g.drawImage(ballIcon, 2,2, this);\n \n g.drawString(\"Ball Count :\" + villain.getBallCount(), 20,120 );\n \n //g.drawImage(heartIcon, 20,40, this);\n g.drawString(\"Lives left : \" + villain.getLives(),20,150);\n \n // Sets all the appropriate GUI components for this level, including ball count and \n // lives count which will be incremented/decremented as the player collides with it's\n // respective object\n \n }", "@Override\n public void simpleInitApp() {\n configureCamera();\n configureMaterials();\n viewPort.setBackgroundColor(new ColorRGBA(0.5f, 0.2f, 0.2f, 1f));\n configurePhysics();\n initializeHeightData();\n addTerrain();\n showHints();\n }", "public GamePad(GraphicsContext gc) {\n\t\tbrickgc = gc;\n\t\tbrick = generateBricks();\n\t\t//brickgc.setFill(brick.getColor());\n\t\tgameBoard = new boolean[10][20];\n\t\tpieceColors = new Color[10][20];\n\t}", "private void paintTheImage() {\n SPainter bruhmoment = new SPainter(\"Kanizsa Square\" ,400,400);\n\n SCircle dot = new SCircle(75);\n paintBlueCircle(bruhmoment,dot);\n paintRedCircle(bruhmoment,dot);\n paintGreenCircles(bruhmoment,dot);\n\n SSquare square= new SSquare(200);\n paintWhiteSquare(bruhmoment,square);\n\n\n }", "public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "public void paint (Graphics g) {\n super.paint(g);\n // g.setColor(Color.BLUE);\n // g.drawRect(0, 0, 100, 100);\n }" ]
[ "0.70240396", "0.66374546", "0.64212227", "0.6417759", "0.63980234", "0.6348057", "0.6218974", "0.6174409", "0.61616784", "0.61600304", "0.6127182", "0.61219865", "0.61042166", "0.61026144", "0.6089074", "0.6052917", "0.60444474", "0.6040785", "0.60357773", "0.60271096", "0.6025359", "0.6008285", "0.5998099", "0.59943706", "0.5993081", "0.5983915", "0.59829646", "0.59828687", "0.59745884", "0.59677136", "0.5958899", "0.5953865", "0.5949138", "0.5947704", "0.5937922", "0.59146446", "0.5910931", "0.5904943", "0.5901435", "0.5901396", "0.58985347", "0.58844185", "0.58585507", "0.585276", "0.5849552", "0.58452415", "0.58310497", "0.5823454", "0.582288", "0.5815698", "0.58139324", "0.58137715", "0.58085287", "0.5807764", "0.58012104", "0.5797039", "0.57892793", "0.57833666", "0.577116", "0.5769814", "0.5760022", "0.5740495", "0.57350683", "0.5734384", "0.5733759", "0.5728582", "0.572052", "0.57197577", "0.57167786", "0.5706652", "0.57038325", "0.57034355", "0.57017285", "0.570022", "0.5699472", "0.5697066", "0.5693473", "0.56916577", "0.5691647", "0.56908077", "0.568732", "0.5685426", "0.568411", "0.56797254", "0.5678337", "0.56757665", "0.56744766", "0.5672906", "0.5672208", "0.567183", "0.56680804", "0.5667868", "0.5663306", "0.56598777", "0.56577945", "0.5656722", "0.56534815", "0.5652238", "0.5652238", "0.56514627" ]
0.62256265
6
find where is the fruit on the edge.
public edge_data findEdgeFruit(Point3D pf,int type) { edge_data e=new EdgeData(); Collection<node_data> nc = dgraph.getV(); for (node_data n: nc ) { Point3D p1=n.getLocation(); Collection<edge_data> ec = dgraph.getE(n.getKey()); for (edge_data e1: ec) { Point3D p2 = dgraph.getNode(e1.getDest()).getLocation(); if(p1.distance3D(pf)+pf.distance3D(p2)-p1.distance3D(p2)<epsilon) return e1; } } return e; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public edge_data edgeOfFruit(int fruit_id){\n Fruit f = getFruitbyID(fruit_id);\n Iterator<node_data> nodesIter = this.Graph.getV().iterator();\n\n while(nodesIter.hasNext()){\n node_data node = nodesIter.next();\n Iterator<edge_data> edges = Graph.getE(node.getKey()).iterator();\n\n while(edges.hasNext()){\n edge_data e = edges.next();\n\n node_data src_node = Graph.getNode(e.getSrc());\n node_data dst_node = Graph.getNode(e.getDest());\n\n double sum = (src_node.getLocation().x() + dst_node.getLocation().x());\n\n double sideA = f.getLocation().distance2D(dst_node.getLocation());\n double sideB = src_node.getLocation().distance2D( f.getLocation());\n\n double sumSides = sideA + sideB;\n double totalDistance = src_node.getLocation().distance2D(dst_node.getLocation());\n\n if (Math.abs(sumSides - totalDistance) <= 0.00001){\n return e;\n }\n\n }\n }\n System.out.println(\"Problem with getting the edge for fruits\");\n return null;\n }", "private Fruit findClosestFruit(Robot robot) {\n double min_dist = Double.MAX_VALUE;\n Fruit ans = null;\n for (int i = 0; i < my_game.getFruits().size(); i++) {\n Fruit fruit = my_game.getFruits().get(i);\n if(fruits_status.values().contains(fruit)) {\n continue;\n }\n double dist = algo_g.shortestPathDist(robot.getSrc(), fruit.getEdge().getSrc());\n if (dist < min_dist) {\n min_dist = dist;\n ans = fruit;\n }\n\n }\n\n return ans;\n }", "int otherface(int edge, int face) {\n int other = leftface[edge];\n return face == other ? rightface[edge] : other;\n }", "static private Edge LocateEdge(ArrayList<Integer> v,ArrayList<Edge> edgesList)\n\t{\n\t\tfor (Iterator<Edge> iterator = edgesList.iterator(); iterator.hasNext();)\n\t\t{\n\t Edge e = iterator.next();\n\t int x = e.nodeI;\n\t int y = e.nodeJ;\n\t\t\tint xv = v.indexOf(x);\n\t\t\tint yv = v.indexOf(y);\n\t\t\tif (xv > -1 && yv == -1)\n\t\t\t{\n\t\t\t\treturn(e);\n\t\t\t}\n\t\t\tif (xv == -1 && yv > -1)\n\t\t\t{\n\t\t\t\treturn(e);\n\t\t\t}\n\t\t}\n\t\t//Error condition\n\t\treturn(new Edge(-1,-1,0.0));\n\t}", "private Edge getKernelEdge(Edge edge){\n\t\tif (edge.getGraph() != null && (edge.getGraph().isLhs() || edge.getGraph().isRhs())) {\n\t\t\tRule rule = edge.getGraph().getRule();\n\t\t\treturn rule.getMultiMappings().getOrigin(edge);\n\t\t}\n\t\treturn null;\n\t}", "private boolean foundFlower() {\n\t\t// get the grid location of this Bee\n\t\tGridPoint myPoint = grid.getLocation(this);\n\t\tGridPoint theirPoint;\n\t\t\n\t\t// if the bee is within range of a flower's size, target that flower\n\t\tfor(int i=0; i<flowers.size(); i++){\n\t\t\ttheirPoint = grid.getLocation(flowers.get(i));\n\t\t\tif(grid.getDistance(myPoint, theirPoint) < (flowers.get(i).size/100.0)){\n\t\t\t\ttargetFlower = flowers.get(i);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public int mostNearFruit(LinkedList<Fruit> f , Packman p)\r\n\t{\r\n\t\tdouble d = distance(p.location , f.get(0).location);\r\n\t\tint close = 0;\r\n\t\tfor(int i = 1 ; i < f.size() ; i++)\t\t\r\n\t\t{\r\n\t\t\tif(distance(p.location , f.get(i).location) < d)\r\n\t\t\t{\r\n\t\t\t\td = distance(p.location , f.get(i).location);\r\n\t\t\t\tclose = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn close;\r\n\t}", "public void findEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}", "public int find(int id) {\n\t\tGraphAdjListRep280 holder = G;\t// Holder for the graph so we do not need to alter the actual Graph's curso position\n\n\t\tholder.goIndex(id);\t// Move the vertex cursor to the vertex located in location id\n\t\tholder.eGoFirst(G.item());\t// Move the edge cursor to the first edge attached to vertex id\n\t\twhile (holder.eItemExists()) {\t// While the item exist\n\t\t\tholder.goVertex(holder.eItemAdjacentVertex());\t// Move the vertex to the vertex adjacent to the current vertex\n\t\t\tholder.eGoFirst(holder.item());\t// Move edge cursor to the first edge of the vertex cursor\n\t\t}\n\n\t\treturn holder.itemIndex();\t// Result\n\t}", "public void findEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}", "VertexType getOtherVertexFromEdge( EdgeType r, VertexType oneVertex );", "public int[] findVerticalSeam() {\n double[][] energyTo = new double[width][height]; // will hold smallest energy path to each entry\n int[] edgeTo = new int[height]; // will hold smallest energy path\n \n // initialiaze energy path array\n for (int j = 0; j < height(); j++) {\n for (int i = 0; i < width(); i++) {\n if (j == 0) {\n energyTo[i][j] = energy[i][j]; // top row has initial energyTo it equal to its energy\n }\n else\n energyTo[i][j] = Double.POSITIVE_INFINITY; // initialize every other value to Infinity\n }\n }\n \n // Calculate smallest energy path to each entry in energyTo array\n for (int y = 0; y < height(); y++) {\n for (int x = 0; x < width(); x++) {\n relax(x, y, energyTo, edgeTo);\n }\n }\n \n // find the seam with the smallest total energy\n findSeam(energyTo, edgeTo);\n \n return edgeTo;\n }", "@Override\r\n\tprotected final int containsEdge(E edge) {\n\t\tfor(int i = 0; i < getSize(); i++)\r\n\t\t\tif(getEdge(i) == edge)\r\n\t\t\t\treturn i;\r\n\t\t\r\n\t\treturn -1;\r\n\t}", "private void findNeighbour(int offset) {\n TreeNodeImpl node = (TreeNodeImpl) projectTree.getLastSelectedPathComponent();\n TreePath parentPath = projectTree.getSelectionPath().getParentPath();\n NodeList list = (NodeList) node.getParent().children();\n\n for (int i = 0; i < list.size(); ++i) {\n if (list.get(i).equals(node)) {\n if (offset > 0 && i < list.size() - offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n if (offset < 0 && i >= offset) {\n projectTree.setSelectionPath(parentPath.pathByAddingChild(list.get(i + offset)));\n break;\n }\n }\n }\n }", "@Override\n public E getEdgeIfExists(int pintSourceVertexID, int pintDestinationVertexID) {\n V vertexFrom = getVertex(pintSourceVertexID);\n V vertexTo = getVertex(pintDestinationVertexID);\n for(TimeFrame tf : darrGlobalAdjList.get(pintSourceVertexID).keySet()) {\n for (E e : darrGlobalAdjList.get(pintSourceVertexID).get(tf)) { \n if (e.getOtherEndPoint(vertexFrom).equals(vertexTo)) {\n return e;\n }\n } \n }\n return null;\n }", "public int get_edge(int from, int to){\n int temp=0;\n try{\n temp=adj_matrix[from][to];\n }\n catch(ArrayIndexOutOfBoundsException index){ // If invalid index\n System.out.println(\" Invalid Vertex!\");\n }\n return temp;\n }", "public Fruit getnearFruit(boolean fast, int src){\n Iterator<Fruit> fruitsIter = allFruits.iterator();\n Graph_Algo algorithms = new Graph_Algo(Graph);\n node_data src_node = Graph.getNode(src);\n\n\n if (fruitsIter.hasNext()){\n\n Fruit near = fruitsIter.next();\n edge_data near_e = edgeOfFruit(near.getId());\n\n while (fruitsIter.hasNext()){\n Fruit current_fruit = fruitsIter.next();\n edge_data current_edge = edgeOfFruit(current_fruit.getId());\n\n double dist1 = algorithms.shortestPathDist(src, near_e.getDest());\n double dist2 = algorithms.shortestPathDist(src, current_edge.getDest());\n\n if (fast && (dist1 > dist2) ){\n near = current_fruit;\n }else{\n double nearFToSrc = near.getLocation().distance2D(src_node.getLocation());\n double currentFToSrc = current_fruit.getLocation().distance2D(src_node.getLocation());\n if (currentFToSrc < nearFToSrc){\n near = current_fruit;\n }\n }\n\n }\n return near;\n }\n return null;\n }", "boolean containsEdge(V v, V w);", "public static Shape findDestShape(Edge edge) {\n\t\tShape shape = null;\n\t\tEdge currentEdge = edge;\n\t\twhile (shape == null) {\n\t\t\tif (currentEdge.getDest() instanceof JoinPoint) {\n\t\t\t\tcurrentEdge = (Edge) ((JoinPoint)currentEdge.getDest()).getDest();\n\t\t\t} else {\n\t\t\t\tshape = currentEdge.getDest();\n\t\t\t}\n\t\t}\n\t\treturn shape;\n\t}", "public DCEL_Edge getConnectingEdge(Cell c) {\n\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tIterator<DCEL_Edge> it = (Iterator<DCEL_Edge>) face.edges().iterator();\n\n\t\twhile (it.hasNext()) {\n\n\t\t\tDCEL_Edge e = it.next();\n\n\t\t\tif ((e.getLeftFace().equals(this.face) && e.getRightFace().equals(\n\t\t\t\t\tc.face))\n\t\t\t\t\t|| (e.getLeftFace().equals(c.face) && e.getRightFace()\n\t\t\t\t\t\t\t.equals(this.face))) {\n\n\t\t\t\treturn e;\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.err\n\t\t\t\t.println(\"Edge Not Found-Error: This should not have happened\");\n\t\treturn null;\n\t}", "private mxCell getEdge(Microtuble m){\n\t\tmxCell edge = null;\n\t\tfor (mxCell cell : graph.getEdgeToCellMap().values()){\n\t\t\tMicrotuble mt = (Microtuble) cell.getValue();\n\t\t\tif (mt.equals(m)){\n\t\t\t\tedge = cell;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn edge;\n\t}", "public abstract boolean getEdge(Point a, Point b);", "public void followEdge(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge to \" + e + \" not exist.\");\r\n\t}", "public double getEdge(int node1, int node2)\n{\n\tif(getNodes().containsKey(node1) && getNodes().containsKey(node2))\n\t{\n\t\tNode s=(Node) getNodes().get(node1);\n\t\tif(s.getEdgesOf().containsKey(node2))\n\t\t{\n \t\t\t\t\n\t\treturn s.getEdgesOf().get(node2).get_weight();\n\t\t\t\t\t\t\n\t\t}\n\t}\n\t \n\t return -1;\n\n}", "public static double[] findClosestFruit(Packman p, ArrayList<Fruit> fruit) \n {\n\t \n\t ArrayList<Double> arrTimeOfPc= new ArrayList<>();\n\t for (Iterator<Fruit> iterator = fruit.iterator(); \n\t\t\t iterator.hasNext();) \n\t {\n\t\tFruit fr = (Fruit) iterator.next();\n\t\tdouble timeFP=distanceInTimeP2F(p, fr);\n\t\tarrTimeOfPc.add(timeFP);\n\t }\n\t double theShortsTime=arrTimeOfPc.get(0);\n\t int idxFruit=0;\n\t for(int nextTime=1; nextTime<arrTimeOfPc.size(); nextTime++) \n\t {\n\t\t if(arrTimeOfPc.get(nextTime)<theShortsTime) \n\t\t {\n\t\t\t theShortsTime=arrTimeOfPc.get(nextTime);\n\t\t\t idxFruit=nextTime;\n\t\t }\n\t\t \n\t }\n\t double[] pathData= {(int)p.GetId(), (int)idxFruit, theShortsTime};\n\t \n\t return pathData;\n\n\t}", "public int getEdge(int v1, int v2) {\n\n\t\treturn edges[v1][v2];\n\t}", "int findVertex(Point2D.Float p) {\n double close = 5*scale;\n for (int i = 0; i < points.size(); ++i) {\n if (points.get(i).distance(p) < close) {\n return i;\n }\n }\n return -1;\n }", "E getEdge(int id);", "public Edge getEdge(Node k){\n for(int i = 0; i<edges.size(); i++){\n Edge edge = edges.get(i);\n if(edge.end() == k){\n return edge;\n }\n }\n return null;\n }", "boolean hasPathTo(int v)\n\t{\n\t\treturn edgeTo[v].weight()!=Double.POSITIVE_INFINITY;\n\t}", "void findNeighbourNode(Board board) {\n this.findUp(board);\n this.findRight(board);\n this.findDown(board);\n this.findLeft(board);\n }", "public Attraction getOtherEndpoint(Attraction w) {\n return w.equals(u) ? v : u;\n }", "public int[] findVerticalSeam() {\n checkTransposed();\n int[] seam = new int[height];\n if (height <= 2) return seam;\n\n int[] edgeTo = new int[width * height];\n double[] distTo = new double[width * height];\n\n // Initiate distTo to Infinity\n for (int x = 0; x < width; x++) {\n for (int y = 1; y < height; y++) {\n distTo[xyTo1D(x, y)] = Double.POSITIVE_INFINITY;\n }\n }\n // You should not need recursion. Note that the underlying DAG has such special structure\n // that you don’t need to compute its topological order explicitly\n // Run BFS (topological sort) for the implicit DAG to search energy and save at distTo[]\n // The row-major or column-major traverse order make a difference here\n for (int y = 1; y < height; y++) {\n for (int x = 0; x < width; x++) {\n if (x > 0 && distTo[xyTo1D(x - 1, y)] > energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x - 1, y)] = energy[xyTo1D(x - 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x - 1, y)] = x;\n }\n if (distTo[xyTo1D(x, y)] > energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x, y)] = energy[xyTo1D(x, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x, y)] = x;\n }\n if (x < width - 1 && distTo[xyTo1D(x + 1, y)] > energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)]) {\n distTo[xyTo1D(x + 1, y)] = energy[xyTo1D(x + 1, y)] + distTo[xyTo1D(x, y - 1)];\n edgeTo[xyTo1D(x + 1, y)] = x;\n }\n }\n }\n // Find the seam endpoint of minimum energy at the last line\n for (int x = 1; x < width - 1; x++) {\n if (distTo[xyTo1D(seam[height - 2], height - 2)] > distTo[xyTo1D(x, height - 2)]) {\n seam[height - 2] = x;\n }\n }\n // Use edgeTo to backtrack the path of minimum energy\n for (int y = height - 2; y > 0; y--) {\n seam[y - 1] = edgeTo[xyTo1D(seam[y], y)];\n }\n // Follow set at border of test examples\n // helpful to reset energy when shifting array elements\n // cutoff to be 0\n seam[height - 1] = Math.max(seam[height - 2] - 1, 0);\n return seam;\n }", "private int PASSSelection(HashMap<Integer, Integer> T, HashMap<Integer, Integer> colours, ColEdge[] edge){\r\n\t\tHashMap<Integer, Integer> bestBoiStorage = new HashMap<>();\r\n\t\tHashMap<Integer, Integer> bestBoiFinder = new HashMap<>();\r\n\t\tfor(int s = 0; s < T.size(); s++){\r\n\t\t\tint coloursPos = 0;\r\n\t\t\tVs = T.get(s);\r\n\t\t\tfor(int i = 1; i < T.size(); i++){\r\n\t\t\t\tif(i != s){\r\n\t\t\t\t\tVi = T.get(i);\r\n\t\t\t\t\tcoloursPos += same(edge, colours, Vs, Vi);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbestBoiStorage.put(s, Vs);\r\n\t\t\tbestBoiFinder.put(s, coloursPos);\r\n\t\t}\r\n\t\tint mostColPos = 0;\r\n\t\tint mostColKey = 0;\r\n\t\tfor(int b = 0; b < bestBoiFinder.size(); b++){\r\n\t\t\tif(mostColPos == 0 || bestBoiFinder.get(b).compareTo(mostColPos) > 0){\r\n\t\t\t\tmostColPos = bestBoiFinder.get(b);\r\n\t\t\t\tmostColKey = b;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bestBoiStorage.get(mostColKey);\r\n\t}", "public int ancestor(int v, int w){\n\t BreadthFirstDirectedPaths BFSv =new BreadthFirstDirectedPaths(D,v);\n\t BreadthFirstDirectedPaths BFSw =new BreadthFirstDirectedPaths(D,w);\n\t \n\t int distance = Integer.MAX_VALUE;\n\t int ancestor = -1;\n\t for (int vertex = 0 ; vertex < D.V();vertex++)\n\t\t if ((BFSv.hasPathTo(vertex))\n\t\t\t\t &&(BFSw.hasPathTo(vertex))\n\t\t\t\t &&(BFSv.distTo(vertex)+BFSw.distTo(vertex))<distance)\n\t\t {\n\t\t\t ancestor = vertex;\n\t\t\t distance = BFSv.distTo(vertex)+BFSw.distTo(vertex);\n\t\t }\n\n\t\t return ancestor;\n }", "public Edge getEdge(int source, int dest) {\r\n Edge target =\r\n new Edge(source, dest, Double.POSITIVE_INFINITY);\r\n for (Edge edge : edges[source]) {\r\n if (edge.equals(target))\r\n return edge; // Desired edge found, return it.\r\n }\r\n return target; // Desired edge not found.\r\n }", "private void findDetectivePath() {\n Cell current, next;\n detectivePath = new ArrayDeque<>();\n clearVisitedMarks();\n current = detective;\n current.visited = true;\n\n while (true) {\n next = nextNotVisitedCell(current);\n if (next == killer) {\n detectivePath.addLast(current);\n detectivePath.addLast(next);\n break;\n } else if (next != null) {\n detectivePath.addLast(current);\n current = next;\n current.visited = true;\n } else {\n current = detectivePath.pollLast();\n }\n }\n detectivePath.pollFirst();\n }", "Edge getEdge();", "int nextcwedge(int edge, int face) {\n switch (edge) {\n case LB:\n return (face == L) ? LF : BN;\n case LT:\n return (face == L) ? LN : TF;\n case LN:\n return (face == L) ? LB : TN;\n case LF:\n return (face == L) ? LT : BF;\n case RB:\n return (face == R) ? RN : BF;\n case RT:\n return (face == R) ? RF : TN;\n case RN:\n return (face == R) ? RT : BN;\n case RF:\n return (face == R) ? RB : TF;\n case BN:\n return (face == B) ? RB : LN;\n case BF:\n return (face == B) ? LB : RF;\n case TN:\n return (face == T) ? LT : RN;\n case TF:\n return (face == T) ? RT : LF;\n }\n System.err.println(\"nextcwedge: should not be here...\");\n return 0;\n }", "public double getEdge()\n {\n return this.edge;\n }", "private void BFS() {\n\n int fruitIndex = vertices.size()-1;\n Queue<GraphNode> bfsQueue = new LinkedList<>();\n bfsQueue.add(vertices.get(0));\n while (!bfsQueue.isEmpty()) {\n GraphNode pollNode = bfsQueue.poll();\n pollNode.setSeen(true);\n for (GraphNode node : vertices) {\n if (node.isSeen()) {\n continue;\n } else if (node.getID() == pollNode.getID()) {\n continue;\n } else if (!los.isIntersects(pollNode.getPoint(), node.getPoint())) {\n pollNode.getNeigbours().add(node);\n if (node.getID() != fruitIndex) {\n bfsQueue.add(node);\n node.setSeen(true);\n }\n }\n }\n }\n }", "private void firstFaceEdge_fromLowerLayer(int pos) {\n Log.d(tag, \"Edge piece from lower layer\");\n Algorithm algorithm = new Algorithm();\n\n // the white should be on one of the sides, not front or back\n if (pos == EDGE_BOTTOM_NEAR || pos == EDGE_BOTTOM_FAR) {\n algorithm.addStep(Axis.Y_AXIS, Direction.CLOCKWISE, INNER);\n }\n\n if (pos <= EDGE_BOTTOM_LEFT) {\n algorithm.addStep(Axis.X_AXIS, Direction.CLOCKWISE, INNER);\n algorithm.addStep(Axis.Z_AXIS, Direction.CLOCKWISE, OUTER);\n if (mTopSquares.get(EDGE_TOP_LEFT).getColor() == mTopColor &&\n mLeftSquares.get(FIRST_ROW_CENTER).getColor() ==\n mLeftSquares.get(CENTER).getColor()) {\n algorithm.addStep(Axis.X_AXIS, Direction.COUNTER_CLOCKWISE, INNER);\n }\n } else {\n algorithm.addStep(Axis.X_AXIS, Direction.CLOCKWISE, OUTER);\n algorithm.addStep(Axis.Z_AXIS, Direction.COUNTER_CLOCKWISE, OUTER);\n if (mTopSquares.get(EDGE_TOP_RIGHT).getColor() == mTopColor &&\n mRightSquares.get(FIRST_ROW_CENTER).getColor() ==\n mRightSquares.get(CENTER).getColor()) {\n\n algorithm.addStep(Axis.X_AXIS, Direction.COUNTER_CLOCKWISE, OUTER);\n }\n }\n setAlgo(algorithm);\n }", "public int[] findFood(int[][] foodPos){\n\tint[] currentOption = null, target = null;\n\tint xDiff = 0, yDiff = 0, choice = 0, optionXDiff = 0, optionYDiff = 0;\n\tfor(int i = 0; i < foodPos.length; i++){\n\t currentOption = foodPos[i];\n\t if(Math.abs(optionXDiff = currentOption[0] - position[0]) <= sightRange\n\t && Math.abs(optionYDiff = currentOption[1] - position[1]) <= \n\t sightRange){\n\t\tif(target == null){\n\t\t trackTime = 2;\n\t\t target = foodPos[i];\n\t\t previousTarget = target;\n\t\t xDiff = optionXDiff;\n\t\t yDiff = optionYDiff;\n\t\t}\n\t\telse if((optionXDiff + optionYDiff) < (xDiff + yDiff)){\n\t\t xDiff = optionXDiff;\n\t\t yDiff = optionYDiff;\n\t\t target = foodPos[i];\n\t\t previousTarget = target;\n\t\t}\n\t }\n\t}\n\treturn target;\n }", "private int findF(int currentIndex){\r\n return findH(currentIndex) + findG(currentIndex);\r\n }", "public int getEdgeWeight(T vertex1, T vertex2){\n if (isEdge(vertex1, vertex2)){\n return edges[vertexIndex(vertex1)][vertexIndex(vertex2)];\n }\n return NOT_FOUND;\n }", "private int[] placeFruit() {\n\t\t\n\t\tint []point = new int[2];\n\t\t\n\t\tint helpX, helpY, foodX = 0, foodY = 0;\n\t\tboolean helpS,helpO;\t// for Snake and Obstacles\n\t\tboolean collision = true;\n\t\tArrayList<Obstacle> obstacles = Controller.getInstance().getObstacles();\n\n\t\twhile(collision) {\n\t\t\t\t\n\t\t\thelpS =helpO= false;\n\t\t\tfoodX = (rand.nextInt(BWIDTH)*GameObject.SIZE)+GameObject.SIZE/2;\n\t\t\tfoodY = (rand.nextInt(BHEIGHT)*GameObject.SIZE)+GameObject.SIZE/2;\n\t\t\t\t\n\t\t\tfor(int i = 0; i < snake.getSize(); ++i) {\n\t\t\t\t\t\n\t\t\t\thelpX = snake.getBodyPart(i).getX();\n\t\t\t\thelpY = snake.getBodyPart(i).getY();\n\t\n\t\t\t\tif(helpX == foodX && helpY == foodY) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tif(i == snake.getSize() - 1) {\n\t\t\t\t\thelpS = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(helpS) {\n\n\n\n\t\t\t\t\tfor(int i = 0; i < obstacles.size(); ++i) {\n\n\t\t\t\t\t\thelpX = obstacles.get(i).getX();\n\t\t\t\t\t\thelpY = obstacles.get(i).getY();\n\n\t\t\t\t\t\tif(foodX == helpX && foodY == helpY) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(i == obstacles.size() - 1) {\n\t\t\t\t\t\t\thelpO = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\tif(helpO) {\n\t\t\t\t\tcollision = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tpoint[0] = foodX;\n\t\tpoint[1] = foodY;\n\t\treturn point;\t\n\t}", "@Override\n\tpublic Path getEdgeIfExists(Location src, Location dest) {\n\t\tfor (Path p : paths.get(locations.indexOf(src))) \n\t\t\tif (p.getDestination().equals(dest))\n\t\t\t\treturn p;\n\n\t\treturn null;\n\n\t}", "public int[] findVerticalSeam() {\n\n int[] seam = new int[height()];\n\n // Tracks columns of least-energy seams.\n int[][] edgeTo = new int[width()][height()];\n\n // Store cumulative energy of the seams that go through each pixel.\n double[][] distTo = new double[width()][height()];\n\n // Initialize all distances to infinity, except top row.\n for (int col = 0; col < width(); col++) {\n for (int row = 0; row < height(); row++) {\n if (row == 0) distTo[col][row] = energy[col][row];\n else distTo[col][row] = Double.POSITIVE_INFINITY;\n }\n }\n\n // Builds least-energy seams through picture.\n for (int row = 1; row < height(); row++) {\n for (int col = 0; col < width(); col++) {\n\n if (col > 0 && distTo[col - 1][row] > (energy[col - 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col - 1][row] = energy[col - 1][row] + distTo[col][row - 1];\n edgeTo[col - 1][row] = col;\n }\n if (distTo[col][row] > (energy[col][row] + distTo[col][row - 1])) {\n\n distTo[col][row] = energy[col][row] + distTo[col][row - 1];\n edgeTo[col][row] = col;\n }\n if (col < width() - 1 && distTo[col + 1][row] > (energy[col + 1][row]\n + distTo[col][row - 1])) {\n\n distTo[col + 1][row] = energy[col + 1][row] + distTo[col][row - 1];\n edgeTo[col + 1][row] = col;\n }\n }\n }\n // Find the end of the least total energy seam.\n double leastEnergy = Double.POSITIVE_INFINITY;\n for (int col = 0; col < width() - 1; col++) {\n double currentEnergy = distTo[col][height() - 1];\n if (currentEnergy < leastEnergy) {\n leastEnergy = currentEnergy;\n seam[height() - 1] = col;\n }\n }\n // Back-track from end of seam to beginning.\n for (int row = height() - 1; row > 0; row--) {\n seam[row - 1] = edgeTo[seam[row]][row];\n }\n return seam;\n }", "public Edge<E, V> getUnderlyingEdge();", "public static Shape findSourceShape(Edge edge) {\n\t\tShape shape = null;\n\t\tEdge currentEdge = edge;\n\t\twhile (shape == null) {\n\t\t\tif (currentEdge.getSource() instanceof JoinPoint) {\n\t\t\t\tcurrentEdge = (Edge) ((JoinPoint)currentEdge.getSource()).getSource();\n\t\t\t} else {\n\t\t\t\tshape = currentEdge.getSource();\n\t\t\t}\n\t\t}\n\t\treturn shape;\n\t}", "private int find(int p1, int p2) {\n return id[p1 - 1][p2 - 1]; // find the current value of a node\n }", "int findPath(int from, int f[][]) {\n\t\tfor( int i = 0; i < N; i++ )\n\t\t\tif( f[from][i] > 0 ) return i;\n\t\treturn NONE; \n\t}", "public PolytopeTriangle findClosest(){\n\t\t//OPTIMIZATION MOVE THIS TO THE ADD FUNCTION AND HAVE IT BE THE RETURN VALUE\n\t\tfloat maxDist = faces.get(0).getDistance();\n\t\tint index = 0;\n\t\tfor(int curIndex = 1; curIndex < faces.size(); curIndex++){\n\t\t\tfloat distance = faces.get(curIndex).getDistance();\n\t\t\tif(distance < maxDist){\n\t\t\t\tindex = curIndex;\n\t\t\t\tmaxDist = distance;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn faces.get(index);\n\t}", "private Point backtrack(Point p){\n\t\t// coordinates of the point\n\t\tint x = (int)p.getX();\n\t\tint y = (int)p.getY();\n\t\t// neigh hold the return value\n\t\tPoint neigh= p;\n\t\t// the lowest score\n\t\tint score=10000;\n\t\t// look at all the neighbor and compare them\n\t\tif(x>0\t && topology[x-1][y]>=0){\n\t\t\tscore = topology[x-1][y];\n\t\t\tneigh = new Point(x-1,y);\n\t\t}\n\t\tif(x<row-1 && topology[x+1][y]>=0 && score > topology[x+1][y]) {\n\t\t\tscore = topology[x+1][y];\n\t\t\tneigh = new Point(x+1,y);\n\t\t}\n\t\tif(y<col-1 && topology[x][y+1]>=0 && score > topology[x][y+1]) {\n\t\t\tscore = topology[x][y+1];\n\t\t\tneigh = new Point(x,y+1);\n\t\t}\n\t\tif(y>0 && topology[x][y-1]>=0 && score > topology[x][y-1]) {\n\t\t\tscore = topology[x][y-1];\n\t\t\tneigh = new Point(x,y-1);\n\t\t}\n\t\treturn neigh;\n\t}", "public abstract List<Direction> searchForCheese(Maze maze);", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "String getEdges();", "public void followEdgeInReverse(int e) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.edge == e) {\r\n\t\t\t\tcurrentVertex = neighbor.vertex;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge from \" + e + \" does not exist.\");\r\n\t}", "public int getEdgeSixe() {\n\t\treturn graph.edgeSet().size();\r\n\t}", "private void findFood() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\tlogger.error(\"Should not happen\");\n\t\t\treturn;\n\t\t}\n\n\t\t_food = null;\n\t\tfloat distance = 0;\n\t\t\n\t\tfor (FoodEntry entry : map.values()) { \n\t\t\tfloat d = _obj.getPPosition().sub(entry.obj.getPPosition()).length();\n\t\t\tif (_food == null || d < distance) { \n\t\t\t\t_food = entry.obj;\n\t\t\t\tdistance = d;\n\t\t\t}\n\t\t}\n\t}", "private Ship findWhichShip(Point p) {\n int row, col;\n for (Ship s : ships) {\n for (int i = 0; i < s.getShipSize(); i++) {\n row = s.getBodyLocationPoints()[i].x;\n col = s.getBodyLocationPoints()[i].y;\n if (row == p.x && col == p.y) {\n //Point head = s.getHeadCoordinatePoint();\n //touchingView = ivCell[head.x][head.y];\n Log.i(\"VIEW FOUND: \", \"!!!!!!!!!!!!!!!!\");\n return s;\n }\n }\n }\n return null;\n }", "public int getEdgeWeight(String srcLabel, String tarLabel) {\n // Implement me!\n int eInt = indexOf(srcLabel + tarLabel, edges);\n if (eInt != -1) {\n return weights[indexOf(srcLabel, vertices)][eInt];\n }\n\n // update return value\n return EDGE_NOT_EXIST;\n }", "String getIdEdge();", "public int[] findVerticalSeam() {\n double[][] energy = new double[height][width];\n int[][] edgeTo = new int[height][width];\n double[][] distTo = new double[height][width];\n reset(distTo);\n int[] indices = new int[height];\n if (width == 1 || height == 1) {\n return indices;\n }\n for (int i = 0; i < width; i++) {\n distTo[0][i] = 1000.0;\n }\n // this is for relaxation.\n for (int i = 0; i < height - 1; i++) {\n for (int j = 0; j < width; j++) {\n relaxVertical(i, j, edgeTo, distTo);\n }\n }\n // calculating from last rows\n // column wise\n double minDist = Double.MAX_VALUE;\n int minCol = 0;\n for (int columns = 0; columns < width; columns++) {\n if (minDist > distTo[height - 1][columns]) {\n minDist = distTo[height - 1][columns];\n minCol = columns;\n }\n }\n //indices values of shortest path.\n for (int rows = height -1, columns = minCol; rows >= 0; rows--) {\n indices[rows] = columns;\n columns -= edgeTo[rows][columns];\n }\n indices[0] = indices[1];\n return indices;\n }", "public int[] findVerticalSeam() {\r\n int[] seam = new int[height];\r\n double distance = Double.POSITIVE_INFINITY;\r\n double[][] distTo = new double[width][height];\r\n Point[][] edgeTo = new Point[width][height];\r\n\r\n for (int col = 0; col < width; col++)\r\n for (int row = 0; row < height; row++)\r\n if (row == 0) distTo[col][row] = 0;\r\n else distTo[col][row] = Double.POSITIVE_INFINITY;\r\n\r\n\r\n for (int row = 0; row < height; row++) {\r\n for (int col = 0; col < width; col++) {\r\n Point p = new Point(col, row);\r\n\r\n for (Point adj : getAdjVert(p)) {\r\n if (distTo[adj.x][adj.y] > distTo[p.x][p.y] + energy[p.x][p.y]) {\r\n distTo[adj.x][adj.y] = distTo[p.x][p.y] + energy[p.x][p.y];\r\n edgeTo[adj.x][adj.y] = p;\r\n if (adj.y == height - 1 && distTo[adj.x][adj.y] < distance) {\r\n distance = distTo[adj.x][adj.y];\r\n for (int count = height; adj != null; adj = edgeTo[adj.x][adj.y])\r\n seam[--count] = adj.x;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n return seam;\r\n\r\n }", "double getEdgeWeight();", "public int getRiversAlongEdges() {\n return riversAlongEdges;\n }", "private void findPath(int current){\r\n // remove current from OPEN\r\n int index = insideArray(_openSet,current);\r\n if(index == -1){\r\n System.out.println(\"findPath method returns -1.\");\r\n }\r\n _openSet.remove(index);\r\n\r\n // add current to CLOSED\r\n _closedSet.add(current);\r\n\r\n // if current is the target node\r\n if(current == _endIndex){\r\n return;\r\n }\r\n\r\n int neighborNum = _map.get_grid(current).get_neighborNum();\r\n int[] neighbors = _map.get_grid(current).get_neighbors();\r\n\r\n //for each neighbor of the current node\r\n for(int i=0;i<neighborNum;i++){\r\n Grid neighborGrid = _map.get_grid(neighbors[i]);\r\n // if neighbor is not traversable or neighbor is in CLOSED\r\n // SKIP THIS NEIGHBOR\r\n if(!neighborGrid.get_type().equals(\"|\") && insideArray(_closedSet,neighbors[i]) == -1){\r\n int currentNeighborF = neighborGrid.get_Fnum();\r\n int neighborF = findF(neighbors[i]);\r\n if(neighborF < currentNeighborF || insideArray(_closedSet,neighbors[i]) == -1){\r\n neighborGrid.set_Fnum(neighborF);\r\n neighborGrid.set_parent(current);\r\n if(insideArray(_closedSet,neighbors[i]) == -1){\r\n _openSet.add(neighbors[i]);\r\n }\r\n }\r\n }\r\n }\r\n int currentIndex = smallestF();\r\n // RECURSIVE CALL\r\n findPath(_map.get_grid(_openSet.get(currentIndex)).get_index());\r\n }", "void edgeFilter() {\n for (int i = 0; i < size(); i++) {\n Exp f = get(i);\n if (f.isFilter() && f.size() > 0 && f.get(0).type() == TEST\n && i >= 1 && get(i - 1).isEdge()) {\n Exp edge = get(i - 1);\n if (match(edge, f)) {\n edge.add(f);\n }\n }\n }\n }", "private Cell searchPowerUp() {\n for (Cell[] row : gameState.map) {\n for (Cell column : row) {\n if (column.powerUp != null)\n return column;\n }\n }\n\n return null;\n }", "public Edge findEdge(Node n1, Node n2){\r\n for(Edge e: getListEdges()){\r\n if(e.getNode1().getId() == n1.getId() && e.getNode2().getId() == n2.getId())\r\n return e;\r\n if(e.getNode1().getId() == n2.getId() && e.getNode2().getId() == n1.getId())\r\n return e;\r\n }\r\n return null;\r\n }", "public abstract boolean hasEdge(int from, int to);", "public void testContainsEdgeEdge( ) {\n init( );\n\n //TODO Implement containsEdge().\n }", "public int search(int[] A, int target) {\n\n int start = 0;\n int end = A.length - 1;\n int mid;\n\n while (start + 1 < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n return mid;\n }\n if (A[start] < A[mid]) {\n // situation 1, red line\n if (A[start] <= target && target <= A[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n } else {\n // situation 2, green line\n if (A[mid] <= target && target <= A[end]) {\n start = mid;\n } else {\n end = mid;\n }\n }\n } // while\n\n if (A[start] == target) {\n return start;\n }\n if (A[end] == target) {\n return end;\n }\n return -1;\n }", "public Iterable<Edge> pathTo(final int one) {\n if (!hasPath(one)) {\n return null;\n }\n Stack<Edge> sta = new Stack<Edge>();\n int two = one;\n for (Edge each = edge[one]; each != null; each = edge[two]) {\n sta.push(each);\n two = each.other(two);\n }\n return sta;\n }", "private int getIndex(int u) {\n int ind = -1;\n for (int i = 0; i < getGraphRep().size(); i++) {\n ArrayList subList = getGraphRep().get(i);\n String temp = (String) subList.get(0);\n int vert = Integer.parseInt(temp);\n if (vert == u) {\n ind = i;\n }\n }\n return ind;\n }", "public static void testEdgeDetection()\n {\n Picture swan = new Picture(\"swan.jpg\");\n swan.edgeDetection();\n swan.explore();\n }", "private DefaultWeightedEdge matchMW(Vertex m, Vertex not) {\n\t\t// get neighbors of v\n\t\tDefaultWeightedEdge e = null;\n\t\tSet<Vertex> neigh = GraphStuff.getNeighbors(g, m);\n\t\tneigh.remove(not); // diesen Knoten nicht beachten\n\t\tfor(Vertex w : neigh){\n\t\t\t// suche neues Match fuer m, das noch nicht gematched ist\n\t\t\tif(unmatchedW.contains(w)){// Gefundener Knoten ist noch nicht gematched\n\t\t\t\tmatched.add(w);\n\t\t\t\tmatched.add(m);\n\t\t\t\tunmatchedW.remove(w);\n\t\t\t\tunmatchedM.remove(m);\n\t\t\t\te = g.getEdge(w, m);\n\t\t\t\treturn e;\n\t\t\t}\n\t\t}\n\t\treturn e;\n\t}", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "private void findEdges(){\n int pixel,x,y;\n int color;\n double gx,gy,magnitude;\n double magnitudes[][] = new double[size-2][size-2];\n double angles[][] = new double[size-2][size-2];\n int directions[][] = new int[size-2][size-2];\n //give numbers to the edge kernel\n int edgeKernelX[][] = new int[][]{{-1, 0, 1},\n {-2, 0, 2},\n {-1, 0, 1}};\n int edgeKernelY[][] = new int[][]{{-1, -2, -1},\n { 0, 0, 0},\n { 1, 2, 1}};\n //march the image\n for (int i = 1; i < size-1; i++) {\n for (int j = 1; j < size-1; j++) {\n //reset color\n gx = gy = 0;\n //march pixels inside kernel\n for (int k = 0; k < 3; k++) {\n for (int l = 0; l < 3; l++) {\n //get gray color from pixel\n x = j + l - 1; \n y = i + k - 1;\n pixel = imageKerneled.getRGB(x,y);\n //multiply the rgb by the number in kernel\n color = ((pixel) & 0xff);\n gx += color * edgeKernelX[k][l];\n gy += color * edgeKernelY[k][l];\n }\n }\n //get magnitude for the edge ( Gxy = sqrt(x^2+y^2) )\n magnitude = (int)Math.round(Math.sqrt((gx*gx)+(gy*gy) ) );\n magnitudes[i-1][j-1] = magnitude;\n //get angle for the edge ( A = arctan Gy/Gx )\n angles[i-1][j-1] = Math.atan(gy/gx);\n }\n }\n //get bigger magnitud for rule of 3 because are magnitudes above 255\n double bigger = magnitudes[0][0]; int sizeMinus2 = size-2;\n for (int i = 0; i < sizeMinus2; i++) {\n for (int j = 0; j < sizeMinus2; j++) {\n if(magnitudes[i][j] > bigger) bigger = magnitudes[i][j];\n }\n }\n //rule of 3 to make all magnitudes below 255\n for (int i = 0; i < sizeMinus2; i++) {\n for (int j = 0; j < sizeMinus2; j++) {\n magnitudes[i][j] = magnitudes[i][j] * 255 / bigger;\n }\n }\n //set the borders black because there are no magnitudes there\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(0,i,Color.BLACK.getRGB());}\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(size-1,i,Color.BLACK.getRGB());}\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(i,0,Color.BLACK.getRGB());}\n for (int i = 0; i < size; i++) {imageKerneled2.setRGB(i,size-1,Color.BLACK.getRGB());}\n //set the magnitudes in the image\n double degrees;\n double max=0,min=0;\n for (int i = 0; i < sizeMinus2; i++) {\n for (int j = 0; j < sizeMinus2; j++) {\n //paint black the NaN and 0r angles\n magnitude = magnitudes[i][j];\n if(Double.isNaN(angles[i][j]) || angles[i][j]==0){\n imageKerneled2.setRGB(j+1,i+1,Color.BLACK.getRGB());\n }\n else{\n //convert radians to dregrees for HSB (Hue goes from 0 to 360)\n degrees = Math.toDegrees(angles[i][j]); \n //convert degrees in scale from -90,90 to 0,360 for HSBtoRGB with a rule of 3\n degrees = degrees * 360 / 90; \n //convert degrees in scale from 0,360 to 0,1 for HSBtoRGB with a rule of 3\n degrees /= 360;\n /*if want angles with colors: \n //convert magnitud in scale from 0,255 to 0,1 for HSBtoRGB with a rule of 3\n magnitude /= 255;\n Color c = new Color(Color.HSBtoRGB((float)degrees,1.0f,(float)magnitude));*/\n Color c = new Color((int)magnitude,(int)magnitude,(int)magnitude);\n imageKerneled2.setRGB(j+1,i+1,c.getRGB());\n /*set direction for pixel\n east-west: 0 = 0 - 22, 158-202, 338-360\n northeast-southwest: 1 = 23 - 67, 203-247 \n north-south: 2 = 68 -112, 248-292 \n northeast-southeast: 3 = 113-157, 293-337 */\n if((degrees>=0 && degrees<=22) || (degrees>=158 && degrees<=202) || (degrees>=338 && degrees<=360)){\n directions[i][j] = 0;\n }else if((degrees>=23 && degrees<=67) || (degrees>=203 && degrees<=247)){\n directions[i][j] = 1;\n }else if((degrees>=68 && degrees<=112) || (degrees>=248 && degrees<=292)){\n directions[i][j] = 2;\n }else if((degrees>=113 && degrees<=157) || (degrees>=293 && degrees<=337)){\n directions[i][j] = 3;\n }\n }\n }\n }\n copyKerneled2ToKerneled();\n System.out.println(\"Finished sobel edge detector\");\n //here starts the canny edge detector\n int comparedMagnitudes[] = new int [3];\n for (int i = 1; i < size-1; i++) {\n for (int j = 1; j < size-1; j++) {\n //get magnitude of current pixel and neighbors from direction\n comparedMagnitudes[0] = (imageKerneled.getRGB(j,i)) & 0xff;\n switch(directions[i-1][j-1]){\n case 0: \n comparedMagnitudes[1] = (imageKerneled.getRGB(j-1,i)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j+1,i)) & 0xff;\n break;\n case 1:\n comparedMagnitudes[1] = (imageKerneled.getRGB(j+1,i+1)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j-1,i-1)) & 0xff;\n break;\n case 2:\n comparedMagnitudes[1] = (imageKerneled.getRGB(j,i-1)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j,i+1)) & 0xff;\n break;\n case 3:\n comparedMagnitudes[1] = (imageKerneled.getRGB(j-1,i+1)) & 0xff;\n comparedMagnitudes[2] = (imageKerneled.getRGB(j+1,i-1)) & 0xff;\n break;\n }\n if(comparedMagnitudes[0]<comparedMagnitudes[1] \n || comparedMagnitudes[0]<comparedMagnitudes[2]\n || comparedMagnitudes[0]<30){\n imageKerneled2.setRGB(j,i,Color.BLACK.getRGB());\n }\n }\n }\n /*for (int i = 1; i < size-1; i++) {\n for (int j = 1; j < size-1; j++) {\n color = (imageKerneled2.getRGB(j,i)) & 0xff;\n if(color > 0){\n imageKerneled2.setRGB(j,i,Color.WHITE.getRGB());\n }\n }\n }*/\n copyKerneled2ToKerneled();\n System.out.println(\"Finished canny edge detector\");\n }", "private Worm getFirstWormInRange() {\n\n Set<String> cells = constructFireDirectionLines(currentWorm.weapon.range)\n .stream()\n .flatMap(Collection::stream)\n .map(cell -> String.format(\"%d_%d\", cell.x, cell.y))\n .collect(Collectors.toSet());\n\n for (Worm enemyWorm : opponent.worms) {\n String enemyPosition = String.format(\"%d_%d\", enemyWorm.position.x, enemyWorm.position.y);\n if (cells.contains(enemyPosition) && enemyWorm.health > 0) {\n return enemyWorm;\n }\n }\n\n return null;\n }", "int getBlue(int x, int y);", "public Iterable<DirectedEdge> pathTo(int v){\n\t\tvalidateVertex(v);\n\t\tif(!hasPathTo(v)) return null;\n\n\t\tLinkedStack<DirectedEdge> stack=new LinkedStack<>();\n\t\twhile(edgeTo[v]!=null){\n\t\t\tstack.push(edgeTo[v]);\n\t\t\tv=edgeTo[v].from();\n\t\t}\n\t\treturn stack;\n\t}", "public SimpleEdge getEdge() {\n return edge;\n }", "private DefaultWeightedEdge matchWM(Vertex w, Vertex not) {\n\t\t// get neighbors of v\n\t\tSet<Vertex> neigh = GraphStuff.getNeighbors(g, w);\n\t\tDefaultWeightedEdge e = null;\n\t\tneigh.remove(not); // diesen Knoten nicht beachten\n\t\tfor(Vertex m : neigh){\n\t\t\t// suche neues Match fuer w, das noch nicht gematched ist\n\t\t\tif(unmatchedM.contains(m)){// Gefundener Knoten ist noch nicht gematched\n\t\t\t\tmatched.add(m);\n\t\t\t\tmatched.add(w);\n\t\t\t\tunmatchedM.remove(m);\n\t\t\t\tunmatchedW.remove(w);\n\t\t\t\te = g.getEdge(w, m);\n//\t\t\t\tmaxMatch.add(e);\n\t\t\t\treturn e;\n\t\t\t}\n\t\t}\n\t\treturn e;\n\t}", "private int searchNext(JmtCell prev) {\r\n \t\tRectangle boundspadre = GraphConstants.getBounds((prev).getAttributes()).getBounds();\r\n \t\tObject[] listEdges = null;\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \t\tList<Object> next = new ArrayList<Object>();\r\n \r\n \t\tif (flag1 == false && prev.seen == false) {\r\n \r\n \t\t\t// Rectangle bounds =\r\n \t\t\t// GraphConstants.getBounds(((JmtCell)prev).getAttributes()).getBounds();\r\n \t\t\tif (!flag2) {\r\n \t\t\t\tboundspadre.setLocation(x, y + ((e + 1) * (42 + heightMax)) - (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t} else {\r\n \t\t\t\tboundspadre.setLocation(x - (int) (boundspadre.getWidth() / 2), y + ((e + 1) * (42 + heightMax))\r\n \t\t\t\t\t\t- (int) (boundspadre.getHeight() / 2) + 30);\r\n \t\t\t}\r\n \r\n \t\t\tGraphConstants.setBounds(prev.getAttributes(), boundspadre);\r\n \t\t\tx = (int) boundspadre.getCenterX() + widthMax + 50;\r\n \t\t\tprev.seen = true;\r\n \t\t\tflag2 = true;\r\n \t\t}\r\n \r\n \t\t// inserisco tutti gli archi uscenti e entranti di min.get(j) in\r\n \t\t// listEdges\r\n \t\tlistEdges = DefaultGraphModel.getOutgoingEdges(graphmodel, prev);\r\n \t\tVector<Object> listEdgestmp = new Vector<Object>();\r\n \t\tfor (Object listEdge : listEdges) {\r\n \t\t\tJmtCell qq = (JmtCell) (graphmodel.getParent(graphmodel.getTarget(listEdge)));\r\n \t\t\tif (!(qq).seen) {\r\n \t\t\t\tlistEdgestmp.add(listEdge);\r\n \t\t\t}\r\n \t\t}\r\n \t\tlistEdges = listEdgestmp.toArray();\r\n \r\n \t\tint numTarget = listEdges.length;\r\n \t\tif (numTarget == 0) {\r\n \t\t\treturn 1;\r\n \t\t}\r\n \r\n \t\tfor (int k = 0; k < numTarget; k++) {\r\n \t\t\tnext.add((graphmodel.getParent(graphmodel.getTarget(listEdges[k]))));\r\n \t\t}\r\n \r\n \t\tint j = 1;\r\n \t\tif (inRepositionSons == false && ((JmtCell) next.get(0)).seen == false) {\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t} else if (inRepositionSons == true && ((JmtCell) next.get(0)).seen == false) {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(((JmtCell) next.get(0)).getAttributes()).getBounds();\r\n \t\t\tbounds.setLocation((int) (boundspadre.getCenterX()) + widthMax + 50 - (int) (bounds.getWidth() / 2), (int) boundspadre.getCenterY()\r\n \t\t\t\t\t- (int) (bounds.getHeight() / 2));\r\n \t\t\tGraphConstants.setBounds(((JmtCell) next.get(0)).getAttributes(), bounds);\r\n \r\n \t\t\t((JmtCell) next.get(0)).seen = true;\r\n \t\t\tj = searchNext((JmtCell) next.get(0));\r\n \t\t}\r\n \r\n \t\tif (numTarget > 0) {\r\n \t\t\tif (!flag) {\r\n \t\t\t\trepositionSons(prev, next, j - 1, 1);\r\n \t\t\t} else {\r\n \t\t\t\trepositionSons(prev, next, -1, 0);\r\n \t\t\t}\r\n \t\t\tflag = false;\r\n \t\t}\r\n \r\n \t\t(prev).sons = 0;\r\n \t\tfor (int w = 0; w < numTarget; w++) {\r\n \t\t\tprev.sons += ((JmtCell) next.get(w)).sons;\r\n \t\t}\r\n \r\n \t\treturn prev.sons;\r\n \t}", "private boolean isFringe(int w) {\n\t\treturn getVertex(w).isFringe();\n\t}", "public Edge getEdgeReference(Node sourceNode) {\r\n\t\t\t\r\n\t\tEdge edgeReference = null;\r\n\t\tfor (Edge to: edges)\r\n\t\t{\r\n\t\t\tif (to.getDestinationNode().getLabel().equals(sourceNode.getLabel()))\r\n\t\t\t{\r\n\t\t\t\tedgeReference = to;\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn edgeReference;\r\n\t}", "public boolean hasEdge(int i,int j){\n return Matrix[i][j];\n }", "public Set<Pair<V,V>> neighbourEdgesOf(V vertex);", "private SumoEdge getEdge(String id) {\n\t\treturn idToEdge.get(id);\n\t}", "public edge_type getEdge(int from, int to) {\n assert (from < nodeVector.size())\n && (from >= 0)\n && nodeVector.get(from).getIndex() != invalid_node_index :\n \"<SparseGraph::GetEdge>: invalid 'from' index\";\n\n assert (to < nodeVector.size())\n && (to >= 0)\n && nodeVector.get(to).getIndex() != invalid_node_index :\n \"<SparseGraph::GetEdge>: invalid 'to' index\";\n\n ListIterator<edge_type> it = edgeListVector.get(from).listIterator();\n while (it.hasNext()) {\n edge_type curEdge = it.next();\n if (curEdge.getTo() == to) {\n return curEdge;\n }\n }\n\n assert false : \"<SparseGraph::GetEdge>: edge does not exist\";\n return null;\n }", "public Edge partner(){\n\t\treturn partner;\n\t}", "public int getSideIndex(Tile adjacent){\r\n for(int i = 0; i < adjTiles.length; i++){\r\n if(adjTiles[i] == adjacent) return i;\r\n }\r\n return -1;\r\n }", "public int ancestor(Iterable<Integer> v, Iterable<Integer> w) {\n if (v == null || w == null) throw new IllegalArgumentException();\n for (Integer x : v) {\n if (x == null) throw new IllegalArgumentException();\n }\n for (Integer x : w) {\n if (x == null) throw new IllegalArgumentException();\n }\n BreadthFirstDirectedPaths path1 = new BreadthFirstDirectedPaths(wordGraph, v);\n BreadthFirstDirectedPaths path2 = new BreadthFirstDirectedPaths(wordGraph, w);\n int ancestor = -1;\n int len = -1;\n for (int i = 0; i < wordGraph.V(); i++) {\n if (path1.hasPathTo(i) && path2.hasPathTo(i)) {\n if (len == -1) {\n len = path1.distTo(i) + path2.distTo(i);\n ancestor = i;\n }\n if (path1.distTo(i) + path2.distTo(i) < len) {\n len = path1.distTo(i) + path2.distTo(i);\n ancestor = i;\n }\n }\n }\n return ancestor;\n }", "protected ArrayList<int[]> findAdjacentRisk(int[] pair) {\n\t\tint x = pair[0];\n\t\tint y = pair[1];\n\t\tArrayList<int[]> neighbors = new ArrayList<int[]>();\n\t\tfor (int i = x - 1; i <= x + 1; i++) {\n\t\t\tfor (int j = y - 1; j <= y + 1; j++) {\n\t\t\t\tif (i >= 0 && i < maxX && j >= 0 && j < maxY ) {\n\t\t\t\t\tif (coveredMap[i][j] == SIGN_UNKNOWN || coveredMap[i][j] == SIGN_MARK) {\n\t\t\t\t\t\tneighbors.add(new int[]{i, j});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}", "public int ancestor(int v, int w) {\n\t\tBreadthFirstDirectedPaths bfsv = new BreadthFirstDirectedPaths(G, v);\n\t\tBreadthFirstDirectedPaths bfsw = new BreadthFirstDirectedPaths(G, w);\n\t\tint dv, dw, ancestor = -1, dsap = INFINITY;\n\t\tfor(int vertex = 0; vertex < G.V(); vertex++) {\n\t\t\tdv = bfsv.distTo(vertex);\n\t\t\tdw = bfsw.distTo(vertex);\n\t\t\tif (dv != INFINITY && dw != INFINITY && (dv + dw < dsap)) {\n\t\t\t\tancestor = vertex;\n\t\t\t\tdsap = dv + dw;\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn (dsap == INFINITY) ? -1 : ancestor;\n\t}", "private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}", "public int stapelPosition(Farbe farbe);", "@Override\n\tpublic int findSegment(int x, int y) {\n\t\treturn -1;\n\t}" ]
[ "0.68533874", "0.6276935", "0.57412606", "0.56835234", "0.5663634", "0.56366533", "0.56283027", "0.556185", "0.55593365", "0.55381864", "0.5495632", "0.5480291", "0.5477135", "0.54686934", "0.5459437", "0.5451591", "0.5391647", "0.52844787", "0.52737033", "0.52509165", "0.5229596", "0.5219285", "0.52024084", "0.5201774", "0.5168567", "0.5161472", "0.51592135", "0.5159189", "0.5155853", "0.513322", "0.51254165", "0.5113749", "0.5111775", "0.511075", "0.5100806", "0.5097516", "0.5095928", "0.5095226", "0.50847155", "0.50744694", "0.5070061", "0.506572", "0.5057819", "0.50560206", "0.50508463", "0.5045232", "0.5041339", "0.50401473", "0.50213516", "0.5012813", "0.500906", "0.5006343", "0.5002309", "0.5000171", "0.49951696", "0.49922845", "0.49875414", "0.49854952", "0.49842954", "0.4982362", "0.4972898", "0.49692994", "0.4967138", "0.4962317", "0.4957533", "0.49568683", "0.4948046", "0.49425375", "0.49390715", "0.49357948", "0.49357197", "0.493164", "0.49220142", "0.4916699", "0.49161306", "0.49159914", "0.49092615", "0.49044845", "0.49026662", "0.49022377", "0.4897749", "0.48923215", "0.4889569", "0.48889822", "0.4886952", "0.48821193", "0.48753685", "0.48733884", "0.48727703", "0.4872358", "0.48717356", "0.48662233", "0.48657674", "0.48643643", "0.48637253", "0.4863065", "0.48542094", "0.48502603", "0.4844341", "0.48417002" ]
0.6108774
2
return the number of robots.
public int getnumR(game_service game) { int rn=0; String g=game.toString(); JSONObject l; try { l=new JSONObject(g); JSONObject t = l.getJSONObject("GameServer"); rn=t.getInt("robots"); } catch (JSONException e) {e.printStackTrace();} return rn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumRobots() {\n return ((Integer)numRobotsSpinner.getValue()).intValue();\n }", "public int getCantidadRobots();", "public int getNumberOfAgents()\n {\n return this.numberOfAgents;\n }", "public int numberOfOpenSites() {\n \treturn num;\r\n }", "public int getMotorCount() {\n\t\treturn motors.size();\n\t}", "@Exported\n public int getNumberOfOnlineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOnline()) {\n count++;\n }\n }\n return count;\n }", "public int getNumberObstacles() {\n return numberObstacles;\n }", "public long getVehicleCount() {\n return send(\"\", HttpMethod.GET, VEHICLES_GET_URL, Map.of(), Long.class);\n }", "public int numberOfOpenSites() {\n return count;\n }", "public int numberOfOpenSites() {\n return (openCount);\n }", "public int getAgentsCount() {\n if (agentsBuilder_ == null) {\n return agents_.size();\n } else {\n return agentsBuilder_.getCount();\n }\n }", "public int getAgentsCount() {\n return agents_.size();\n }", "public int getNumRoads() {\n \t\treturn roads.size();\n \t}", "public int numberOfOpenSites() {\n return openNum;\n }", "public int getRobotsDestroyed () {\r\n\t\treturn this.robotsDestroyed;\r\n\t}", "int senseActualRobotCount(RobotController rc, Robot[] alliedRobots) throws GameActionException {\r\n\t\t\r\n\t\tRobotCount counter = new RobotCount(alliedRobots,rc);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn counter.getTotalRobotCount();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public int numberOfOpenSites() {\n return NOpen;\r\n }", "int getTotalBotCount() {\n int t = 0;\n\n for (Integer i : m_botTypes.values())\n t += i;\n\n return t;\n }", "public int numberOfOpenSites(){\n return numOpenSites;\n }", "public int getVehicleCount() {\r\n return vehicleCount;\r\n }", "public int numberOfOpenSites() {\n return numOpen;\n }", "@Exported\n public int getNumberOfSlaves() {\n if (this.slaves == null) {\n return 0;\n }\n return this.slaves.size();\n }", "public int numberOfOpenSites() {\n return openSitesCount;\n }", "public int numberOfOpenSites() {\n return openSitesCount;\n }", "public int numberOfOpenSites(){\n\t\treturn numOpen;\n\t}", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return numOpen;\n }", "public int numberOfOpenSites()\r\n { return openSites; }", "public int getNumMotorCycles() {\r\n\t\treturn numMotorCycles;\r\n\t}", "public int numberOfOpenSites() {\n return this.numOfOpenSites;\n }", "public int numberOfOpenSites() {\n\t\treturn openCount;\n\t}", "public int numberOfBalls() {\n this.numberOfBalls = 4;\n return 4;\n }", "public int getNumBalls() {\n return numBalls;\n }", "@Override\n public Long getNumberOfWalkers() {\n return walkerRepo.countById();\n }", "public Integer getNumOfCarbons() {\n return numOfCarbons;\n }", "public int numberOfOpenSites() {\n \treturn size;\n }", "@Override\n\tpublic int countIndex() {\n\t\treturn logoMapper.selectCountLogo()+headbannerMapper.selecCountHB()+succefulMapper.selecCountSucc()+solutionMapper.selecCountSolu();\n\t}", "public int numberOfOpenSites() {\n return numberOfOpenSites;\n }", "public int numberOfOpenSites() {\n return mOpenSites;\n }", "int getResponsesCount();", "int getLinksCount();", "public int getNbVehicles() {\n\t\t\treturn K;\r\n\t\t}", "int getNumberOfBots( String className ) {\n Integer number = m_botTypes.get( className );\n\n if( number == null ) {\n return 0;\n } else {\n return number.intValue();\n }\n }", "public int getBallsCount() {\n return balls.size();\n }", "int getRequestsCount();", "int getRequestsCount();", "Integer getConnectorCount();", "public int numberOfOpenSites() {\n return 0;\n }", "public int getActiveRunwaysCount();", "public int numberOfOpenSites(){ return openSites; }", "public int getNumOfThreads() {\n return numOfThreads;\n }", "int getDetectionRulesCount();", "@Exported\n public int getNumberOfOfflineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOffline()) {\n count++;\n }\n }\n return count;\n }", "public int getNumOfDoors() {\r\n\t\treturn this.numOfDoors;\r\n\t}", "public int\t\t\t\t\t\t\tgetAgentsCount()\t\t\t\t\t\t\t{ return this.agents; }", "public int numberOfBalls() {\r\n return 3;\r\n }", "public int getSize() {\n return hostRobotInfoKeyHostRobotInfoMap.size();\n }", "public int getNumProbes()\r\n\t{\r\n\t\treturn numProbes;\r\n\t}", "public int numberOfOpenSites() {\n return open_blocks;\n }", "public int sizeOfAgentArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(AGENT$0);\r\n }\r\n }", "int getLocationsCount();", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "long getRequestsCount();", "public int getAvailDoorCount() {\n int count = 0;\n for (Door d: getDoors()) {\n if (!d.getUsed()) {\n count++;\n }\n }\n return count;\n }", "public int getWheels() {\n\t\treturn this.numOfWheels;\n\t}", "public int NumOfGames()\n\t{\n\t\treturn gametype.length;\n\t}", "public int rodCount ();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "public static final int getCameraCount(){\n if( !libraryLoaded() )\n return -1;\n return LIBRARY.CLEyeGetCameraCount();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getNumberOfThreads() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(NUMBEROFTHREADS_PROP.get());\n }", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public int numberOfBalls() {\n return 10;\n }", "public int getNumberOfCameras() {\r\n int num = 1;\r\n try {\r\n if (mMethodGetNumberOfCamerasLevel9 != null) {\r\n Integer integer = (Integer) mMethodGetNumberOfCamerasLevel9.invoke(null);\r\n num = integer.intValue();\r\n }\r\n } catch (Exception e) {\r\n Log.w(LOG_TAG, \"CameraHideMethods:mMethodGetNumberOfCamerasLevel9()\", e);\r\n }\r\n\r\n return num;\r\n }", "public int getNCycles() {\n return ncycles;\n }", "int getCameraCount();", "public int getNumAlive() {\n return numAlive;\n }", "public int getNumCars() {\r\n\t\treturn (numCars + numSmallCars);\r\n\t}", "public int getNumConnects() {\n\t\treturn numConnects;\n\t}", "public int count() {\n\t\treturn count;\n\t}", "public int getNumVisits() {\n return this.numVisits;\n }", "public int getRunningDevicesCount();", "public int getBallCount() {\r\n\t\treturn ballCount;\r\n\t}", "public int count() {\r\n return count;\r\n }", "int getNodesCount();", "int getNodesCount();", "public int numLikes() {\n return this.likes.size();\n }", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "int getResponseCount();", "int getCompletedTutorialsCount();", "int getMonstersCount();", "int getMonstersCount();", "public long numHits() {\n return numHits.longValue();\n }", "public int count() {\n return count;\n }", "public int getNumberOfSensors() {\n\t\treturn numSensors;\n\t}", "public int getNumberOfVMOnMobile(){\n\t\t\tint count=0;\n\t\t\tfor (int i = 0; i < vmList.size(); i++) {\n\t\t\t\tcount=count+vmList.get(i).size();\n\t\t\t}\n\t\t\treturn count;\n\t\t}" ]
[ "0.76840645", "0.71644956", "0.657302", "0.6572067", "0.6551966", "0.6537254", "0.6534422", "0.653226", "0.6527914", "0.65226734", "0.64607465", "0.64596176", "0.64523643", "0.6448446", "0.64267844", "0.6424147", "0.63886917", "0.6359016", "0.63569486", "0.6332073", "0.6310409", "0.6306428", "0.6298243", "0.6298243", "0.62903744", "0.62767994", "0.62767994", "0.62767994", "0.62767994", "0.62767994", "0.6267271", "0.62608916", "0.6253712", "0.6245464", "0.6244511", "0.6240153", "0.62199175", "0.62078977", "0.6204771", "0.62035227", "0.6198014", "0.6188908", "0.61818784", "0.6179334", "0.6177478", "0.61548126", "0.6154222", "0.615032", "0.6140703", "0.6140703", "0.6139403", "0.6138849", "0.6132943", "0.61302626", "0.6125989", "0.61221474", "0.61159366", "0.60990274", "0.6091552", "0.6088838", "0.6085498", "0.60836136", "0.6055475", "0.605345", "0.6052178", "0.6049102", "0.60481226", "0.602251", "0.6007946", "0.5993787", "0.59910816", "0.5990031", "0.59849006", "0.59607846", "0.595394", "0.59521353", "0.5947482", "0.5943777", "0.59262544", "0.5925011", "0.5913592", "0.5908874", "0.590715", "0.59029514", "0.59005195", "0.58980715", "0.5890033", "0.5889592", "0.5887203", "0.5887203", "0.58840257", "0.5869297", "0.5858225", "0.58580726", "0.585495", "0.585495", "0.5847128", "0.584082", "0.5838995", "0.5834617" ]
0.5999163
69
return the min and max of x point.
public Range FindXmaxmin(graph g) { double xmin=Double.MAX_VALUE; double xmax=Double.MIN_VALUE; Collection<node_data> nc = g.getV(); for(node_data n: nc) { double px=n.getLocation().x(); if(px>xmax) { xmax=px; } if(px<xmin) { xmin=px; } } return new Range(xmin-0.001,xmax+0.001); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getXRangeMax() {\n return xRangeMax;\n }", "public double getXRangeMin() {\n return xRangeMin;\n }", "public double getMaximumX () {\n return minimumX + width;\n }", "static public double lim(double x,double min,double max) {\r\n\t\t if(x<min) return min;\r\n\t\t if(x>max) return max;\r\n\t\t return x;\r\n\t}", "int getXMin();", "public double getMaxX() {\n\t\treturn mx;\n\t}", "public float getMaxX(){\n return points.get(points.size()-1).getX();\n }", "private void findMinandMaxValues(SparklineValues values) {\n minY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).min().orElse(0.0);\n maxY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).max().orElse(0.0);\n\n if (Math.abs(minY) > 1E30 || Math.abs(maxY) > 1E30) {\n // something is probably wrong\n System.out.println(\"Unexpectedly small/large min or max: \");\n values.getValues().forEach(value -> {\n System.out.print(value.getValue() + \" \");\n });\n System.out.println();\n minY = -1.0;\n maxY = 1.0;\n }\n\n if (minY.equals(maxY)) {\n if (minY.equals(0.0)) {\n minY = -1.0;\n maxY = 1.0;\n } else {\n minY = minY - 0.1 * Math.abs(minY);\n maxY = maxY + 0.1 * Math.abs(maxY);\n }\n }\n }", "public final int getMaxX() {\n return getMinX() + getWidth();\n }", "public double getMaxX() {\n\treturn maxX;\n }", "public int getxMin() {\n\t\treturn xMin;\n\t}", "float xMin();", "public double getMaxX() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn pointList.get(pointList.size()-1 ).getX();\n\t}", "Coordinate getMinX();", "public static Point minmax (int[] a) {\n int n = a.length;\n Point mm = new Point (a[0], a[0]);\n\n for (int i=1; i<n; i++) {\n if (a[i] > mm.x) mm.x = a[i];\n if (a[i] < mm.y) mm.y = a[i];\n }\n return mm;\n }", "private double getStartX() {\n\t\treturn Math.min(x1, x2);\n\t}", "public int getMaxX() {\n\t\treturn maxX;\n\t}", "private void calculateMinMaxPositions() {\n boundingVolume = null;\n if ( minMax == null ) {\n minMax = new double[6];\n\n double minX = Double.MAX_VALUE;\n double minY = Double.MAX_VALUE;\n double minZ = Double.MAX_VALUE;\n double maxX = -Double.MAX_VALUE;\n double maxY = -Double.MAX_VALUE;\n double maxZ = -Double.MAX_VALUE;\n int i;\n\n for ( i = 0; i < getNumVertices(); i++ ) {\n double x = vertexPositions[3*i+0];\n double y = vertexPositions[3*i+1];\n double z = vertexPositions[3*i+2];\n\n if ( x < minX ) minX = x;\n if ( y < minY ) minY = y;\n if ( z < minZ ) minZ = z;\n if ( x > maxX ) maxX = x;\n if ( y > maxY ) maxY = y;\n if ( z > maxZ ) maxZ = z;\n }\n minMax[0] = minX;\n minMax[1] = minY;\n minMax[2] = minZ;\n minMax[3] = maxX;\n minMax[4] = maxY;\n minMax[5] = maxZ;\n }\n }", "public int getXMax(){\n\t\tDouble max = timeIncrements.get(timeIncrements.size()-1);\n\t\txMax = max.intValue();\n\t\treturn xMax;\n\t}", "public double getMaxX() { return getX() + getWidth(); }", "float xMax();", "public double obterXmin() {\n\t\treturn xmin;\n\t}", "public float getMaxX() {\n return maxX;\n }", "public float getMinX(){\n return points.get(0).getX();\n }", "public int getxMax() {\n\t\treturn xMax;\n\t}", "public double getMinX() {\n\treturn minX;\n }", "static int minValues(int[] x) {\n\t\tint min = 0;\n\n\t\tfor (int y : x) {\n\t\t\tif (y < min) {\n\t\t\t\tmin = y;\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public Range getXRange() {\r\n\t\treturn xRange;\r\n\t}", "public Point getXMin()\n {\n return (Point)xMin.clone();\n }", "public double getMinimumX () {\n return minimumX;\n }", "float getXStepMax();", "@Override\n public double[] getMinMax() {\n if ( minMax == null ) {\n calculateMinMaxPositions();\n }\n return minMax;\n }", "private void findExtremes( Vector<? extends AbstractWirelessDevice> coll )\r\n {\r\n for( AbstractWirelessDevice e: coll )\r\n {\r\n double x = e.getLocation().getX();\r\n double y = e.getLocation().getY();\r\n \r\n if( x < minX )\r\n minX = x;\r\n \r\n if( x > maxX )\r\n maxX = x;\r\n \r\n if( y < minY )\r\n minY = y;\r\n \r\n if( y > maxY )\r\n maxY = y;\r\n }\r\n }", "public void initMaxMin(){\n\t\tmax = dja.max();\n\t\tmin = dja.min();\n\t}", "private int maxInt (int x, int y) {\n return (x > y) ? x : y;\n }", "public Point getMin () {\r\n\r\n\treturn getA();\r\n }", "public double getYRangeMin() {\n return yRangeMin;\n }", "@Override\n\tpublic double getMaxX() {\n\t\treturn this.getPosition().getX();\n\t}", "public double getMinX() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn pointList.get(0).getX();\n\t}", "public void theMaxX() {\n\t\tfloat maxx = coords.getFirst().getX(); // set the largest x to the first one\n\t\tfor(Coord2D c: coords) { // go through the whole linked list\n\t\t\tif(c.getX() > maxx) { // if the x of the current coordinate set is larger than the current max\n\t\t\t\tmaxx = c.getX(); // make that current coordinate the new max\n\t\t\t}\n\t\t}\n\t\tthis.setMaxX(maxx);\n\t}", "public int getMinimumValue() {\n/* 276 */ return -this.s.getMaximumValue();\n/* */ }", "public Point getMax () {\r\n\r\n\treturn getB();\r\n }", "protected void calcMinMax() {\n }", "public float min2DX() {\n return Math.min(stop2D.x, start2D.x);\n }", "private float getMaxX(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float maxX = Float.NEGATIVE_INFINITY;\n for (float [] point : points) {\n maxX = Math.max(maxX, point [0]);\n } \n return maxX;\n }", "public void setXRangeMax(double xRangeMax) {\n this.xRangeMax = xRangeMax;\n }", "public void setXDataRange(float min, float max);", "public Point[] getPointsInRangeRegAxis(int min, int max, Boolean axis) {\n\t\tint Number = NumInRangeAxis(min, max, axis); //how much points are there ?\n\t\tPoint[] pointsInRange = new Point[Number];\n\t\tif (Number==0) return pointsInRange;\n\t\tint i = 0;\n\t\tif (axis){\n\t\t\tthis.current=this.minx;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getX()>=min && this.current.getData().getX()<=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextX();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.current=this.miny;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getY()>=min && this.current.getData().getY()<=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextY();\n\t\t\t}\n\t\t}\n\t\treturn pointsInRange;\n\t}", "public double getFrameMaxX() { return isRSS()? getFrame().getMaxX() : getMaxX(); }", "public Point getMaxPoint() {\r\n int maximumX = children.get(0).getShapeEndingPoint().getX();\r\n int maximumY = children.get(0).getShapeEndingPoint().getY();\r\n for(IShape shape: children) {\r\n if(shape.getShapeEndingPoint().getX() > maximumX) {\r\n maximumX = shape.getShapeEndingPoint().getX();\r\n }\r\n if(shape.getShapeEndingPoint().getY() > maximumY) {\r\n maximumY = shape.getShapeEndingPoint().getY();\r\n }\r\n }\r\n maxPoint = new Point(maximumX,maximumY);\r\n return maxPoint;\r\n }", "@Basic\n\tpublic double getVxmax() {\n\t\treturn this.vxmax;\n\t}", "public static void checkMinMax() {\r\n\t\tSystem.out.println(\"Beginning min/max test (should be -6 and 17)\");\r\n\t\tSortedIntList list = new SortedIntList();\r\n\t\tlist.add(5);\r\n\t\tlist.add(-6);\r\n\t\tlist.add(17);\r\n\t\tlist.add(2);\r\n\t\tSystem.out.println(\" min = \" + list.min());\r\n\t\tSystem.out.println(\" max = \" + list.max());\r\n\t\tSystem.out.println();\r\n\t}", "public void allMinMax() {\n\t\tthis.theMaxX();\n\t\tthis.theMinX();\n\t\tthis.theMaxY();\n\t\tthis.theMinY();\n\t}", "public int getMinRange() {\r\n return fMinRange;\r\n }", "public int getXMax(){\n\t\treturn xDim;\n\t}", "public double getMaxCoordinateValue() {\n if (this.max_x > this.max_y)\n return this.max_x;\n else\n return this.max_y;\n }", "public double getMinRange() {\n return minRange;\n }", "public float max2DX() {\n return Math.max(stop2D.x, start2D.x);\n }", "public ArrayList<Integer> pointsInRange( int min, int max )\n {\n ArrayList<Integer> points = new ArrayList<Integer>();\n _root.findPoints( min, max, points );\n return points;\n }", "public int getMax()\n {\n int max = data.get(0).getX();\n\n for(int i = 0; i < data.size(); i++)\n {\n if (data.get(i).getX() > max)\n {\n max = data.get(i).getX();\n }\n }\n\n\n return max;\n }", "public DynamicPart minMax(float min, float max) {\n return this.min(min).max(max);\n }", "double getMin();", "double getMin();", "public double minXp(){\n\t\tmin = xp[0];\n\t\tfor(int i=1;i<xp.length;i++){\n\t\t\tif(xp[i]<min){\n\t\t\t\tmin=xp[i];\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "public int projectX( double x ) {\n double dx = xoff_ + Math.round( x * scale_ );\n return (int) Math.max( (double) Integer.MIN_VALUE,\n Math.min( (double) Integer.MAX_VALUE, dx ) );\n }", "public int getMaxX() {\n return scroller.getMaxX();\n }", "public int minY()\n\t{\n\t\tint m = coords[0][1];\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tm = Math.min(m, coords[i][1]);\n\t\t}\n\t\t\n\t\treturn m;\n\t}", "protected void calcMinMax() {\n if (this.mDataSets != null) {\n T t;\n this.mYMax = -3.4028235E38f;\n this.mYMin = Float.MAX_VALUE;\n this.mXMax = -3.4028235E38f;\n this.mXMin = Float.MAX_VALUE;\n Iterator<T> iterator = this.mDataSets.iterator();\n while (iterator.hasNext()) {\n this.calcMinMax((IDataSet)iterator.next());\n }\n this.mLeftAxisMax = -3.4028235E38f;\n this.mLeftAxisMin = Float.MAX_VALUE;\n this.mRightAxisMax = -3.4028235E38f;\n this.mRightAxisMin = Float.MAX_VALUE;\n T t2 = this.getFirstLeft(this.mDataSets);\n if (t2 != null) {\n this.mLeftAxisMax = t2.getYMax();\n this.mLeftAxisMin = t2.getYMin();\n for (IDataSet iDataSet : this.mDataSets) {\n if (iDataSet.getAxisDependency() != YAxis.AxisDependency.LEFT) continue;\n if (iDataSet.getYMin() < this.mLeftAxisMin) {\n this.mLeftAxisMin = iDataSet.getYMin();\n }\n if (!(iDataSet.getYMax() > this.mLeftAxisMax)) continue;\n this.mLeftAxisMax = iDataSet.getYMax();\n }\n }\n if ((t = this.getFirstRight(this.mDataSets)) != null) {\n this.mRightAxisMax = t.getYMax();\n this.mRightAxisMin = t.getYMin();\n for (IDataSet iDataSet : this.mDataSets) {\n if (iDataSet.getAxisDependency() != YAxis.AxisDependency.RIGHT) continue;\n if (iDataSet.getYMin() < this.mRightAxisMin) {\n this.mRightAxisMin = iDataSet.getYMin();\n }\n if (!(iDataSet.getYMax() > this.mRightAxisMax)) continue;\n this.mRightAxisMax = iDataSet.getYMax();\n }\n }\n }\n }", "public static int[] minmax(int[] a)\n {\n \tint[] b= {0,0};\n \tint min=(int)1e9;\n \tint max=(int)-1e9;\n \tfor(int i=0;i<a.length;i++)\n \t{\n \t\tmin=Math.min(min, a[i]);\n \t\tmax=Math.max(max, a[i]);\n \t}\n \tb[0]=min;\n \tb[1]=max;\n \treturn b;\n }", "private void calcXSize(ArrayList<BarEntry> xValues) {\n for (int i = 0; i < xValues.size(); i++) {\n int xValue = xValues.get(i).getX();\n mMaxX = Math.max(mMaxX, xValue);\n mMinX = Math.min(mMinX, xValue);\n }\n }", "public void setXRangeMin(double xRangeMin) {\n this.xRangeMin = xRangeMin;\n }", "public Point getMinPoint() {\r\n int minX = children.get(0).getShapeStartingPoint().getX();\r\n int minY = children.get(0).getShapeStartingPoint().getY();\r\n for(IShape shape: children) {\r\n if(minX > shape.getShapeStartingPoint().getX()) {\r\n minX = shape.getShapeStartingPoint().getX();\r\n }\r\n if(minY > shape.getShapeStartingPoint().getY()) {\r\n minY = shape.getShapeStartingPoint().getY();\r\n }\r\n }\r\n minPoint = new Point(minX,minY);\r\n return minPoint;\r\n }", "public MaxAndMin(){\n this.list=new ListOfData().getData();\n }", "float getXStepMin();", "private int[] findMinMax(ArrayList<ArrayList<Integer>> objects, int featureNo) {\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\t\n\t\t\tfor(int b = 0; b < objects.size(); b++){\n\t\t\t\t\n\t\t\t\tmax = Math.max(objects.get(b).get(featureNo) , max);\n\t\t\t\tmin = Math.min(objects.get(b).get(featureNo) , min);\n\t\t\t}\n\t\t\t\n\t\t\treturn new int[]{max,min};\n\t\t}", "static int max(int x, int y){\n\t\treturn (x > y)? x : y;\n\t}", "private double findMinY() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn 0;\n\t\t}\n\t\tdouble min = pointList.get(0).getY();\n\t\tfor(int i=0; i<pointList.size(); i++)\n\t\t\tif (min>pointList.get(i).getY())\n\t\t\t\tmin = pointList.get(i).getY();\n\t\treturn min;\n\t}", "float yMin();", "@Override\n public int getMinX() {\n return this.minX;\n }", "@Override\r\n\tpublic Point[] getPointsInRangeRegAxis(int min, int max, Boolean axis) {\n\t\tPoint[] pointsArr = new Point[counter(min, max, axis)];\r\n\t\t//Fill in the array with fitting points\r\n\t\tint ind = 0;\r\n\t\tif(axis){\r\n\t\t\tContainer currX = firstX;\r\n\t\t\twhile (currX!=null){\r\n\t\t\t\tif(((Point)currX.getData()).getX() >= min &&((Point)currX.getData()).getX() <= max){\r\n\t\t\t\t\tpointsArr[ind] = currX.getData();\r\n\t\t\t\t\tind++;\r\n\t\t\t\t}\r\n\t\t\t\tcurrX = currX.next;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tContainer currY = firstY;\r\n\t\t\twhile (currY!=null){\r\n\t\t\t\tif(((Point)currY.getData()).getY() >= min &&((Point)currY.getData()).getY() <= max){\r\n\t\t\t\t\tpointsArr[ind] = currY.getData();\r\n\t\t\t\t\tind++;\r\n\t\t\t\t}\r\n\t\t\t\tcurrY = currY.next;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn pointsArr;\r\n\t}", "public static int min(int x, int y) {\r\n\t\tif(x < y) return x;\r\n\t\treturn y;\r\n\t}", "int getBoundsX();", "public Point[] getPointsInRangeOppAxis(int min, int max, Boolean axis) {\n\t\tint Number = NumInRangeAxis(min, max, axis);\n\t\tPoint[] pointsInRange = new Point[Number];\n\t\tif (Number==0) return pointsInRange;\n\t\tint i = 0;\n\t\tif (axis){ // sorted by axis y\n\t\t\tthis.current=this.miny;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getX()>=min && this.current.getData().getX() <=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextY();\n\t\t\t}\t\n\t\t}\n\t\telse {// sorted by axis x\n\t\t\tthis.current=this.minx;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getY()>=min && this.current.getData().getY() <=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextX();\n\t\t\t}\n\t\t}\n\t\treturn pointsInRange;\n\t}", "protected void calcMinMax(T t) {\n if (this.mYMax < t.getYMax()) {\n this.mYMax = t.getYMax();\n }\n if (this.mYMin > t.getYMin()) {\n this.mYMin = t.getYMin();\n }\n if (this.mXMax < t.getXMax()) {\n this.mXMax = t.getXMax();\n }\n if (this.mXMin > t.getXMin()) {\n this.mXMin = t.getXMin();\n }\n if (t.getAxisDependency() == YAxis.AxisDependency.LEFT) {\n if (this.mLeftAxisMax < t.getYMax()) {\n this.mLeftAxisMax = t.getYMax();\n }\n if (!(this.mLeftAxisMin > t.getYMin())) return;\n {\n this.mLeftAxisMin = t.getYMin();\n return;\n }\n } else {\n if (this.mRightAxisMax < t.getYMax()) {\n this.mRightAxisMax = t.getYMax();\n }\n if (!(this.mRightAxisMin > t.getYMin())) return;\n {\n this.mRightAxisMin = t.getYMin();\n return;\n }\n }\n }", "public double max()\n\n {\n double max=xyValueArray.get(0).getY();\n\n for (int i = 0; i < xyValueArray.size(); i++) {\n if (xyValueArray.get(i).getY() > max) {\n max = xyValueArray.get(i).getY();\n }\n }\n return max;\n }", "public int minX()\n\t{\n\t\tint m = coords[0][0];\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tm = Math.min (m, coords[i][0]);\n\t\t}\n\t\t\n\t\treturn m;\n\t}", "static int clamp(int x, int a, int b) {\n if (x < a) {\n return a;\n }\n if (x > b) {\n return b;\n }\n return x;\n }", "public int getMaximumPoints();", "@Test\n\tpublic void testMinMinMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( max, MaxDiTre.max(min, min, max) );\n\t}", "Double getMinimumValue();", "protected double[] calculateDataBoundingBox() {\n \t\tdouble min_x = Double.MAX_VALUE;\n \t\tdouble min_y = Double.MAX_VALUE;\n \t\tdouble max_x = 0.0D;\n \t\tdouble max_y = 0.0D;\n \t\t// check the points\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tif (p[0][i] < min_x) min_x = p[0][i];\n \t\t\tif (p[1][i] < min_y) min_y = p[1][i];\n \t\t\tif (p[0][i] > max_x) max_x = p[0][i];\n \t\t\tif (p[1][i] > max_y) max_y = p[1][i];\n \t\t}\n \t\treturn new double[]{min_x, min_y, max_x, max_y};\n \t}", "public static int[] findMinMax(int[] nums){\n int[] minMax = new int[2];\n\n if(nums == null || nums.length == 0) return minMax;\n\n minMax[0] = nums[0];\n minMax[1] = nums[1];\n\n int bound = nums.length;\n\n if(nums.length % 2 == 1){\n bound = bound-1; \n }\n\n int min = 0; int max = 0;\n for(int i =0;i<bound;i =i+2){\n if(nums[i]<nums[i+1]){\n min = nums[i];\n max = nums[i+1]; \n }\n else{\n min = nums[i+1];\n max = nums[i];\n }\n if(min<minMax[0]){\n minMax[0] = min;\n }\n if(max>minMax[1]){\n minMax[1] = max;\n }\n }\n\n if(bound != nums.length){\n if(nums[bound] < minMax[0] ){\n minMax[0] = nums[bound];\n }\n if(nums[bound] > minMax[1] ){\n minMax[1] = nums[bound];\n }\n }\n return minMax;\n }", "public double getMinX() {\n\t\treturn nx;\n\t}", "int max(int x, int y) {\n return x > y ? x : y;\n }", "@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }", "@Test\n\tpublic void testMinMinMin(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( min, MaxDiTre.max(min, min, min) );\n\t}", "public int getMinX() {\n return scroller.getMinX();\n }", "@Override\n public int between(int min, int max) {\n return super.between(min, max);\n }", "double getMax();", "double getMax();" ]
[ "0.7140828", "0.70564806", "0.6815795", "0.6758679", "0.6718014", "0.6680131", "0.6649363", "0.6639074", "0.66274464", "0.6569357", "0.6553369", "0.6532331", "0.6517237", "0.6511465", "0.6474588", "0.64565676", "0.6438269", "0.64295167", "0.6412259", "0.63877535", "0.6386146", "0.63538915", "0.63454694", "0.6342884", "0.6338141", "0.6278411", "0.62694144", "0.6268355", "0.6261859", "0.6192027", "0.6161366", "0.6159218", "0.61462873", "0.61198395", "0.60891", "0.60867715", "0.6077817", "0.60756695", "0.60708874", "0.60608757", "0.60318685", "0.60274094", "0.6020125", "0.6008412", "0.60076636", "0.5993902", "0.59927386", "0.598732", "0.59777975", "0.59752107", "0.5972203", "0.5969353", "0.5967868", "0.59446335", "0.5941409", "0.5930144", "0.5928961", "0.59065837", "0.58996725", "0.5895493", "0.58761656", "0.5872477", "0.5872477", "0.58676136", "0.5866412", "0.5866262", "0.58583903", "0.58516246", "0.58351445", "0.5833794", "0.5824741", "0.58180326", "0.58085465", "0.58061415", "0.57960176", "0.5793747", "0.5784521", "0.57639694", "0.5760463", "0.5752904", "0.57527024", "0.57442456", "0.5739768", "0.57003915", "0.56947565", "0.5694256", "0.56903756", "0.56891745", "0.56845045", "0.5680889", "0.56774265", "0.56710774", "0.5671053", "0.5646578", "0.56158924", "0.56150514", "0.5607688", "0.5590984", "0.55777276", "0.55777276" ]
0.6775881
3
return the min and max of y point.
public Range FindYmaxmin(graph g) { double ymin=Double.MAX_VALUE; double ymax=Double.MIN_VALUE; Collection<node_data> nc = g.getV(); for(node_data n: nc) { double py=n.getLocation().y(); if(py>ymax) { ymax=py; } if(py<ymin) { ymin=py; } } return new Range(ymin-0.001,ymax+0.001); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getYRangeMin() {\n return yRangeMin;\n }", "float yMax();", "float yMin();", "public double getYRangeMax() {\n return yRangeMax;\n }", "public double getMaximumY () {\n return minimumY + height;\n }", "public double getMinY() {\n\treturn minY;\n }", "Coordinate getMinY();", "public int getMinY() {\n return minY;\n }", "public int getyMin() {\n\t\treturn yMin;\n\t}", "private double findMaxY() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn Double.NaN;\n\t\t}\n\t\tdouble max = pointList.get(0).getY();\n\t\tfor(int i=0; i<pointList.size(); i++)\n\t\t\tif (max<pointList.get(i).getY())\n\t\t\t\tmax = pointList.get(i).getY();\n\t\treturn max;\n\t}", "private void findMinandMaxValues(SparklineValues values) {\n minY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).min().orElse(0.0);\n maxY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).max().orElse(0.0);\n\n if (Math.abs(minY) > 1E30 || Math.abs(maxY) > 1E30) {\n // something is probably wrong\n System.out.println(\"Unexpectedly small/large min or max: \");\n values.getValues().forEach(value -> {\n System.out.print(value.getValue() + \" \");\n });\n System.out.println();\n minY = -1.0;\n maxY = 1.0;\n }\n\n if (minY.equals(maxY)) {\n if (minY.equals(0.0)) {\n minY = -1.0;\n maxY = 1.0;\n } else {\n minY = minY - 0.1 * Math.abs(minY);\n maxY = maxY + 0.1 * Math.abs(maxY);\n }\n }\n }", "public double getMaxY() {\n\treturn maxY;\n }", "public int getMaxY() {\n return maxY;\n }", "private double findMinY() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn 0;\n\t\t}\n\t\tdouble min = pointList.get(0).getY();\n\t\tfor(int i=0; i<pointList.size(); i++)\n\t\t\tif (min>pointList.get(i).getY())\n\t\t\t\tmin = pointList.get(i).getY();\n\t\treturn min;\n\t}", "public double getMinimumY () {\n return minimumY;\n }", "public double getMaxY() { return getY() + getHeight(); }", "@Override\n public int getMinY() {\n return this.minY;\n }", "public double max()\n\n {\n double max=xyValueArray.get(0).getY();\n\n for (int i = 0; i < xyValueArray.size(); i++) {\n if (xyValueArray.get(i).getY() > max) {\n max = xyValueArray.get(i).getY();\n }\n }\n return max;\n }", "private double getStartY() {\n\t\treturn Math.min(y1, y2);\n\t}", "public int getMaxY() {\n\t\treturn maxY;\n\t}", "public final int getMaxY() {\n return getMinY() + getHeight();\n }", "public double getMaxCoordinateValue() {\n if (this.max_x > this.max_y)\n return this.max_x;\n else\n return this.max_y;\n }", "public double obterYmin() {\n\t\treturn ymin;\n\t}", "private int getYmax(int[] yt){\n\t\tint max = -1;\n\t\tfor(int i = 0;i<=3;i++){\n\t\t\tif(max < yt[i]){\n\t\t\t\tmax = yt[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public Range getYRange() {\r\n\t\treturn yRange;\r\n\t}", "public double getMaxY() {\n\t\treturn my;\n\t}", "public double getMinY() {\n\t\treturn ny;\n\t}", "public int getYMax(){\n\t\tDouble max = Collections.max(byteIncrements);\n\t\tyMax = max.intValue();\n\t\treturn yMax;\n\t}", "public int getyMax() {\n\t\treturn yMax;\n\t}", "public double getBiggestY() {\r\n double y = 0;\r\n List<Enemy> enemyLowest = this.lowestLine();\r\n if (enemyLowest.size() > 0) {\r\n y = enemyLowest.get(0).getCollisionRectangle().getBoundaries().getLowY();\r\n for (Enemy e: enemyLowest) {\r\n if (e.getCollisionRectangle().getBoundaries().getLowY() > y) {\r\n y = e.getCollisionRectangle().getBoundaries().getLowY();\r\n }\r\n }\r\n return y;\r\n }\r\n return y;\r\n }", "public Point getMax () {\r\n\r\n\treturn getB();\r\n }", "private int maxInt (int x, int y) {\n return (x > y) ? x : y;\n }", "public float max2DY() {\n return Math.max(stop2D.y, start2D.y);\n }", "private int getYmin(int[] yt){\n\t\tint min = 256;\n\t\tfor(int i = 0;i<=3;i++){\n\t\t\tif(min > yt[i]){\n\t\t\t\tmin = yt[i];\n\t\t\t}\n\t\t}\n\t\treturn min;\n\t}", "int getMinY(Long id) throws RemoteException;", "public Output<TFloat32> yMin() {\n return yMin;\n }", "public int getYMax(){\n\t\treturn yDim;\n\t}", "protected void calcMinMax() {\n if (this.mDataSets != null) {\n T t;\n this.mYMax = -3.4028235E38f;\n this.mYMin = Float.MAX_VALUE;\n this.mXMax = -3.4028235E38f;\n this.mXMin = Float.MAX_VALUE;\n Iterator<T> iterator = this.mDataSets.iterator();\n while (iterator.hasNext()) {\n this.calcMinMax((IDataSet)iterator.next());\n }\n this.mLeftAxisMax = -3.4028235E38f;\n this.mLeftAxisMin = Float.MAX_VALUE;\n this.mRightAxisMax = -3.4028235E38f;\n this.mRightAxisMin = Float.MAX_VALUE;\n T t2 = this.getFirstLeft(this.mDataSets);\n if (t2 != null) {\n this.mLeftAxisMax = t2.getYMax();\n this.mLeftAxisMin = t2.getYMin();\n for (IDataSet iDataSet : this.mDataSets) {\n if (iDataSet.getAxisDependency() != YAxis.AxisDependency.LEFT) continue;\n if (iDataSet.getYMin() < this.mLeftAxisMin) {\n this.mLeftAxisMin = iDataSet.getYMin();\n }\n if (!(iDataSet.getYMax() > this.mLeftAxisMax)) continue;\n this.mLeftAxisMax = iDataSet.getYMax();\n }\n }\n if ((t = this.getFirstRight(this.mDataSets)) != null) {\n this.mRightAxisMax = t.getYMax();\n this.mRightAxisMin = t.getYMin();\n for (IDataSet iDataSet : this.mDataSets) {\n if (iDataSet.getAxisDependency() != YAxis.AxisDependency.RIGHT) continue;\n if (iDataSet.getYMin() < this.mRightAxisMin) {\n this.mRightAxisMin = iDataSet.getYMin();\n }\n if (!(iDataSet.getYMax() > this.mRightAxisMax)) continue;\n this.mRightAxisMax = iDataSet.getYMax();\n }\n }\n }\n }", "public double getXRangeMax() {\n return xRangeMax;\n }", "private static int peakY(int x, int y, int[][] nums) {\n if (y > 0 && nums[y][x] < nums[y - 1][x])\n return -1;\n if (y < nums.length - 1 && nums[y][x] < nums[y + 1][x])\n return 1;\n return 0;\n }", "public int projectY( double y ) {\n double dy = yoff_ - Math.round( y * scale_ );\n return (int) Math.max( (double) Integer.MIN_VALUE,\n Math.min( (double) Integer.MAX_VALUE, dy ) );\n }", "public double getFrameMaxY() { return isRSS()? getFrame().getMaxY() : getMaxY(); }", "static int max(int x, int y){\n\t\treturn (x > y)? x : y;\n\t}", "public int lowerBoundary(){\r\n\t\treturn this.ypoints[0];\r\n\t}", "public void setYDataRange(float min, float max);", "@Override\n public double[] getMinMax() {\n if ( minMax == null ) {\n calculateMinMaxPositions();\n }\n return minMax;\n }", "public int getY() {\n return (int) Math.round(y);\n }", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "public int getMaxYTxt(){\n\n int max = 0;\n\n for (Point p : points){\n Rect size = getTxtBounds(tetxPaint, Float.toString(p.getY()));\n\n if(max < size.width())\n max = size.width();\n }\n\n return max;\n }", "public int getMinY() {\n return scroller.getMinY();\n }", "int max(int x, int y) {\n return x > y ? x : y;\n }", "public float min2DY() {\n return Math.min(stop2D.y, start2D.y);\n }", "private float getMaxY(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float maxY = Float.NEGATIVE_INFINITY;\n for (float [] point : points) {\n maxY = Math.max(maxY, point [1]);\n } \n return maxY;\n }", "public float getYChartMin() {\n return 0.0F;\n }", "public double getY();", "public float max2DX() {\n return Math.max(stop2D.x, start2D.x);\n }", "private Integer getHighestYAt(Location locationIncludingYmax, int minY) {\n int y = locationIncludingYmax.getBlockY();\n while (y >= minY) {\n locationIncludingYmax.setY(y);\n Block block = locationIncludingYmax.getBlock();\n if (block.getType().isSolid())\n return y;\n y--;\n }\n return -1;\n }", "public Output<TFloat32> yMax() {\n return yMax;\n }", "public double getY() {\n\t\treturn point[1];\n\t}", "public int getMaxY() {\n return scroller.getMaxY();\n }", "int getY();", "int getY();", "int getY();", "int getY();", "int getY();", "private float getMinY(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float minY = Float.POSITIVE_INFINITY;\n for (float [] point : points) {\n minY = Math.min(minY, point [1]);\n } \n return minY;\n }", "protected void calcMinMax(T t) {\n if (this.mYMax < t.getYMax()) {\n this.mYMax = t.getYMax();\n }\n if (this.mYMin > t.getYMin()) {\n this.mYMin = t.getYMin();\n }\n if (this.mXMax < t.getXMax()) {\n this.mXMax = t.getXMax();\n }\n if (this.mXMin > t.getXMin()) {\n this.mXMin = t.getXMin();\n }\n if (t.getAxisDependency() == YAxis.AxisDependency.LEFT) {\n if (this.mLeftAxisMax < t.getYMax()) {\n this.mLeftAxisMax = t.getYMax();\n }\n if (!(this.mLeftAxisMin > t.getYMin())) return;\n {\n this.mLeftAxisMin = t.getYMin();\n return;\n }\n } else {\n if (this.mRightAxisMax < t.getYMax()) {\n this.mRightAxisMax = t.getYMax();\n }\n if (!(this.mRightAxisMin > t.getYMin())) return;\n {\n this.mRightAxisMin = t.getYMin();\n return;\n }\n }\n }", "float getY();", "float getY();", "float getY();", "float getY();", "float getY();", "float getY();", "public void theMinY() {\n\t\tfloat miny = coords.getFirst().getY(); // set the smallest y to the first one\n\t\tfor(Coord2D c: coords) { // go through the whole linked list\n\t\t\tif(c.getY() < miny) { // if the y of the current coordinate set is smaller than the current min\n\t\t\t\tminy = c.getY(); // make that current coordinate the new min\n\t\t\t}\n\t\t}\n\t\tthis.setMinY(miny);\n\t}", "long getY();", "public int getY()\r\n\t{\r\n\t\treturn (int)y;\r\n\t}", "public float getYChartMax() {\n return 0.0F;\n }", "public double getChannelYPositionLast() {\n double max = 0.0;\n for (ChannelGraphic channelGraphic : channelGraphics) {\n if (channelGraphic.getyPosition() > max) {\n max = channelGraphic.getyPosition();\n }\n }\n return max;\n }", "public double getMaximumX () {\n return minimumX + width;\n }", "public int minY()\n\t{\n\t\tint m = coords[0][1];\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tm = Math.min(m, coords[i][1]);\n\t\t}\n\t\t\n\t\treturn m;\n\t}", "public void theMaxY() {\n\t\tfloat maxy = coords.getFirst().getY(); // set the largest y to the first one\n\t\tfor(Coord2D c: coords) { // go through the whole linked list\n\t\t\tif(c.getY() > maxy) { // if the y of the current coordinate set is larger than the current max\n\t\t\t\tmaxy = c.getY(); // make that current coordinate the new max\n\t\t\t}\n\t\t}\n\t\tthis.setMaxY(maxy);\n\t}", "public double getY() { return y; }", "Float getY();", "public double getEndY()\n {\n return endycoord; \n }", "public double getYValue(){\r\n\t\treturn ((Double)(super.yValue) ).doubleValue(); \r\n\t}", "public double getEndY() {\n\treturn v2.getY();\n }", "public void setYRangeMin(double yRangeMin) {\n this.yRangeMin = yRangeMin;\n }", "public int yPos() {\n\t\treturn Engine.scaleY(y);\n\t}", "double getEndY();", "double getMax();", "double getMax();", "public int getTheYPosition(int y){\n\t\tif(y>=1 && y<=4){\n\t\t\treturn 7;\n\t\t}\n\t\telse if(y>=5 && y<=8){\n\t\t\treturn 6;\n\t\t}\n\t\telse if(y>=9 && y<=12){\n\t\t\treturn 5;\n\t\t}\n\t\telse if(y>=13 && y<=16){\n\t\t\treturn 4;\n\t\t}\n\t\telse if(y>=17 && y<=20){\n\t\t\treturn 3;\n\t\t}\n\t\telse if(y>=21 && y<=24){\n\t\t\treturn 2;\n\t\t}\n\t\telse if(y>=25 && y<=28){\n\t\t\treturn 1;\n\t\t}\n\t\telse{\n\t\t\treturn 0;\n\t\t}\n\t}" ]
[ "0.7383032", "0.73279697", "0.72497994", "0.7226281", "0.7181038", "0.71809363", "0.7169811", "0.7168918", "0.71284807", "0.7117647", "0.7010043", "0.6972884", "0.69178367", "0.6906506", "0.69031996", "0.6885623", "0.6846478", "0.6788124", "0.6743504", "0.6715206", "0.66997516", "0.6677784", "0.66490155", "0.66433865", "0.663788", "0.66265625", "0.6570077", "0.65219474", "0.65209186", "0.6509978", "0.6484456", "0.64679676", "0.6447417", "0.6430766", "0.64283955", "0.6426494", "0.642284", "0.6414038", "0.63808936", "0.6355", "0.63481474", "0.63415813", "0.6341014", "0.63387644", "0.6323477", "0.6312333", "0.62625986", "0.6236798", "0.6236798", "0.6236798", "0.6236798", "0.6236798", "0.6236798", "0.6236798", "0.6236798", "0.6236798", "0.6226616", "0.6219208", "0.62041056", "0.620011", "0.6194791", "0.6189091", "0.6187644", "0.6184805", "0.6165298", "0.6156228", "0.61556435", "0.61454177", "0.61192214", "0.61192214", "0.61192214", "0.61192214", "0.61192214", "0.6117816", "0.6109974", "0.6097392", "0.6097392", "0.6097392", "0.6097392", "0.6097392", "0.6097392", "0.60954535", "0.6095345", "0.60889596", "0.60826415", "0.6081116", "0.6061686", "0.60574394", "0.6048949", "0.6047731", "0.60470957", "0.60446864", "0.60427976", "0.60427284", "0.60389566", "0.6037097", "0.6026003", "0.6021735", "0.6021735", "0.6019958" ]
0.67077154
20
Pushes to String extension of .kml.
public static void startKML(String file_name) { if(!file_name.endsWith(".kml") && !file_name.endsWith(".KML")) file_name += ".kml"; KmlName = file_name; KML_Logger.createFile(file_name, numgame); KMLbool = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void makeKMLString(){\n kmlString = \"<Placemark><visibility>1</visibility>\";\n\n if(name != \"\" && name != null){\n\t\t kmlString +=\"<name>\"+name+\"</name>\";\n\t }\n\n //set time stamp\n //we may not always want this\n //TODO: need to add an UI option: animatePlacemark\n /*\n if(point_time != \"\" && point_time!=null){\n\t\t\tkmlString +=\"<TimeStamp><when>\"+point_time+\"</when></TimeStamp>\";\n\t }\n\t */\n\n\n if(description != \"\" && description != null){\n kmlString += description;\n }\n\n if(style != \"\" && style != null){\n kmlString += style;\n }\n\n if(region != \"\" && region != null){\n\t\t kmlString += region;\n\t\t}\n\n kmlString += \"<styleUrl>#style1_roll_over_labels_Earthwatch</styleUrl>\";\n kmlString += \"<Point>\"\n + \"<coordinates>\"+point_lon+\",\"+point_lat+\",\"+\"0</coordinates>\"\n + \"</Point>\"\n + \"</Placemark>\";\n }", "public static void finalKML(String toKML) {\r\n\t\t// The final KML data\r\n\t\tString kmlFinal=\"\";\r\n\t\t\r\n\t\tString kmlstart = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\" +\r\n\t\t\t\t\"<kml xmlns=\\\"http://www.opengis.net/kml/2.2\\\">\\n\"\r\n\t\t\t\t+ \" <Document> <Folder><name>Wifi Networks</name>\\n\";\r\n\t\tkmlFinal=kmlFinal+kmlstart;\r\n\t\tString kmlend = \"</Folder>\\n</Document>\"+\"\\n</kml>\";\r\n\t\ttry{\r\n\t\t\t// Create file of KML\r\n\t\t\tFileWriter fw = new FileWriter(\"GIS_Project.kml\");\r\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\t\t\t \r\n\t\t\tkmlFinal=kmlFinal+toKML;\r\n\r\n\t\t\tkmlFinal=kmlFinal+kmlend;\r\n\t\t\t// Write the KML file and close it\r\n\t\r\n\t\t\t\r\n\t\t\tbw.write(kmlFinal);\r\n\t\t\tbw.close();\r\n\t\t} \r\n\t\tcatch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public String toString(){\n makeKMLString();\n return kmlString;\n }", "private Result outputKml(Request request, Entry entry) throws Exception {\r\n String fieldsArg = request.getString(ATTR_SELECTFIELDS,\r\n (String) null);\r\n String boundsArg = request.getString(ATTR_SELECTBOUNDS,\r\n (String) null);\r\n boolean forMap = request.get(\"formap\", false);\r\n String returnFile =\r\n IOUtil.stripExtension(getStorageManager().getFileTail(entry))\r\n + \".kml\";\r\n String filename = forMap + \"_\" + returnFile;\r\n if (boundsArg != null) {\r\n filename = boundsArg.replaceAll(\",\", \"_\") + filename;\r\n }\r\n if (fieldsArg != null) {\r\n filename =\r\n fieldsArg.replaceAll(\",\", \"_\").replaceAll(\":\",\r\n \"_\").replaceAll(\"<\",\r\n \"_lt_\").replaceAll(\">\",\r\n \"_gt_\").replaceAll(\"=\",\r\n \"_eq_\").replaceAll(\"\\\\.\",\r\n \"_dot_\") + filename;\r\n }\r\n File file = getEntryManager().getCacheFile(entry, filename);\r\n if (file.exists()) {\r\n Result result = new Result(new FileInputStream(file),\r\n KmlOutputHandler.MIME_KML);\r\n result.setReturnFilename(returnFile);\r\n\r\n return result;\r\n }\r\n\r\n\r\n Rectangle2D.Double bounds = null;\r\n if (boundsArg != null) {\r\n List<String> toks = StringUtil.split(boundsArg, \",\");\r\n if (toks.size() == 4) {\r\n double north = Double.parseDouble(toks.get(0));\r\n double west = Double.parseDouble(toks.get(1));\r\n double south = Double.parseDouble(toks.get(2));\r\n double east = Double.parseDouble(toks.get(3));\r\n bounds = new Rectangle2D.Double(west, south, east - west,\r\n north - south);\r\n }\r\n }\r\n\r\n FeatureCollection fc = makeFeatureCollection(request, entry);\r\n long t1 = System.currentTimeMillis();\r\n List<String> fieldValues = null;\r\n if (fieldsArg != null) {\r\n //selectFields=statefp:=:13,....\r\n fieldValues = new ArrayList<String>();\r\n List<String> toks = StringUtil.split(fieldsArg, \",\", true, true);\r\n for (String tok : toks) {\r\n List<String> expr = StringUtil.splitUpTo(tok, \":\", 3);\r\n if (expr.size() >= 2) {\r\n fieldValues.add(expr.get(0));\r\n if (expr.size() == 2) {\r\n fieldValues.add(\"=\");\r\n fieldValues.add(expr.get(1));\r\n } else {\r\n fieldValues.add(expr.get(1));\r\n fieldValues.add(expr.get(2));\r\n }\r\n }\r\n }\r\n }\r\n\r\n // System.err.println(\"fieldValues:\" + fieldValues);\r\n Element root = fc.toKml(forMap, bounds, fieldValues);\r\n long t2 = System.currentTimeMillis();\r\n StringBuffer sb = new StringBuffer(XmlUtil.XML_HEADER);\r\n String xml = XmlUtil.toString(root, false);\r\n sb.append(xml);\r\n IOUtil.writeFile(file, xml);\r\n long t3 = System.currentTimeMillis();\r\n // Utils.printTimes(\"OutputKml time:\", t1,t2,t3);\r\n Result result = new Result(\"\", sb, KmlOutputHandler.MIME_KML);\r\n result.setReturnFilename(returnFile);\r\n\r\n return result;\r\n }", "public void writeFile(ArrayList<GIS_layer> a, String output) {\n\t\tArrayList<String> content = new ArrayList<String>(); // the content in long String\n\t\tString kmlstart = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\r\\n\" + \n\t\t\t\t\"<kml xmlns=\\\"http://www.opengis.net/kml/2.2\\\"><Document>\"\t\n\t\t\t\t+\"<Style id=\\\"red\\\"><IconStyle><Icon><href>http://maps.google.com/mapfiles/ms/icons/red-dot.png</href>\"\n\t\t\t\t+\"</Icon></IconStyle></Style><Style id=\\\"yellow\\\"><IconStyle>\"\n\t\t\t\t+\"<Icon><href>http://maps.google.com/mapfiles/ms/icons/yellow-dot.png</href></Icon>\"\n\t\t\t\t+\"</IconStyle></Style><Style id=\\\"green\\\"><IconStyle><Icon>\"\n\t\t\t\t+\"<href>http://maps.google.com/mapfiles/ms/icons/green-dot.png</href></Icon></IconStyle></Style>\"\n\t\t\t\t+\"<name>GeoLayers</name>\";\n\t\tcontent.add(kmlstart);\n\n\t\tString kmlend = \"</Document></kml>\";\n\t\tIterator<GIS_layer> itr = a.iterator();\n\t\ttry{\n\t\t\tFileWriter fw = new FileWriter(output); // path to the new address\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\twhile(itr.hasNext()) {\n\t\t\t\tGIS_layer currLayer = itr.next();\n\t\t\t\tArrayList<String> GPSelement = currLayer.layerString();\n\t\t\t\tString kmlStartlayer = \"<Folder><name>\"+currLayer.get_Meta_data().getName()+\"</name>\";\n\t\t\t\tcontent.add(kmlStartlayer);\n\t\t\t\tString layerColor = circColor(currLayer.get_Meta_data().getName()); // choose color based on layer ID number.\n\t\t\t\tfor (int i = 0; i < GPSelement.size(); i++) {\n\t\t\t\t\tString[] gpsData = GPSelement.get(i).split(\",\");\n\t\t\t\t\tString kmlelement =\"<Placemark>\\n\" +\n\t\t\t\t\t\t\t\"<name>\"+gpsData[3]+\"</name>\\n\" +\n\t\t\t\t\t\t\t\"<description>BSSID: <b>\"+gpsData[4]+\"</b><br/>Capabilities: <b>\"\n\t\t\t\t\t\t\t+gpsData[5]+\"</b><br/>Type: <b>\"+gpsData[7]+\"</b><br/>Timestamp: <b>\"\n\t\t\t\t\t\t\t+gpsData[6]+\"</b><br/>Date: <b>\"+gpsData[8]+\"</b></description>\\n\"\n\t\t\t\t\t\t\t+ \"<Style id=\\\"color\\\"><IconStyle><Icon><href>\"+layerColor+\"</href></Icon></IconStyle></Style>\\r\\n\" + \n\t\t\t\t\t\t\t\"<Point>\\r\\n\" + \n\t\t\t\t\t\t\t\"<coordinates>\"+gpsData[0]+\",\"+gpsData[1]+\"</coordinates>\" +\n\t\t\t\t\t\t\t\"</Point>\\n\" +\n\t\t\t\t\t\t\t\"</Placemark>\\n\";\n\t\t\t\t\tcontent.add(kmlelement);\n\t\t\t\t}\n\t\t\t\tString kmlEndlayer = \"</Folder>\\n\";\n\t\t\t\tcontent.add(kmlEndlayer);\n\t\t\t} \n\t\t\tcontent.add(kmlend);\n\t\t\tString csv = content.toString().replace(\"[\", \"\").replace(\"]\", \"\");\n\t\t\tbw.write(csv);\n\t\t\tbw.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void DumpLocationCoordinatestoKMLRevised(Places places) throws IOException{\n\n String filen = folder_path+\"loc2kmlRevised.txt\";\n File file = new File(filen);\n if (!file.exists()) {\n file.createNewFile();\n }\n BufferedWriter output = new BufferedWriter(new FileWriter(file));\n\n for(int i=0;i<places.places.size();i++){\n LocationCluster locationcls=places.places.get(i);\n output.write(locationcls.placeID+\"~\");\n\n List<UserPhoto> sublist=locationcls.getIdenticalsubLocations();\n if(sublist.size()>2){\n\n for(int j=0;j<sublist.size()-1;j++){\n\n output.write(sublist.get(j).geotag.lat+\",\"+sublist.get(j).geotag.lng);\n if(j<sublist.size()-2){\n output.write(\"|\");\n }\n }\n\n }\n else{\n\n GeoTag center =locationcls.GetCentriod();\n output.write(center.lat+\",\"+center.lng);\n }\n\n\n output.write(\"\\n\");\n\n\n\n\n }\noutput.flush();\n\n }", "@Override\n\tpublic void endElement(String namespaceURI, String localName, String qName)\n\t{\n\t\ttry { \n\t\t\tif (localName.equals(\"Document\")) {\n\t\t\t\tthis.in_documenttag = false;\n\t\t\t\t// set folder in document\n\t\t\t\tkmlDocument.setPlacemarks(docDataPlacemarks);\n\t\t\t\tkmlDocument.setFolders(folders);\n\t\t\t} else if (localName.equals(\"Placemark\")) {\n\t\t\t\tthis.in_placemarktag = false;\n\t\t\t\tif (!in_foldertag) {\n\t\t\t\t\t\tthis.docDataPlacemarks.add(dpm);\n\t\t\t\t} else {\n\t\t\t\t\tthis.folderDataPlacemarks.add(dpm);\n\t\t\t\t}\n\t\t\t\tdpm = new Placemark();\n\t\t\t} else if (localName.equals(\"Folder\")) {\n\t\t\t\t// take care of the current folder...\n\t\t\t\tif (folderDataPlacemarks.size() > 0) {\n\t\t\t\t\tfolder.addPlacemarks(folderDataPlacemarks);\n\t\t\t\t}\n\t\t\t\t if (folderStack.size() == 0) {\n\t\t\t\t\t\tfolders.add(folder);\n\t\t\t\t\t folder.trailSystemName = folder.name;\n\t\t\t\t\tthis.in_foldertag = false;\n\t\t\t\t\t folder = new Folder(); \n\t\t\t\t\t folders = new ArrayList<Folder>();\n\t\t\t\t } else {\n\t\t\t\t\t Folder tmpFolder = folder;\n\n\t\t\t\t\t // now set the last folder from the stack as the current folder\n\t\t\t\t\t folder = folderStack.remove(folderStack.size()-1);\n\n\t\t\t\t\t // set parentFolder, trailSystem name\n\t\t\t\t\t tmpFolder.trailSystemName = folder.getName();\n\t\t\t\t\t tmpFolder.parentFolder = folder;\n\n\t\t\t\t\t folders.add(tmpFolder);\n\t\t\t\t\t folder.addFolders(folders);\n\n\t\t\t\t\t // set the folders list on the popped/current folder\n\t\t\t\t\t folders = new ArrayList<Folder>();\n\t\t\t\t }\n\t\t\t\t // reset variables\n\t\t\t\t folders = new ArrayList<Folder>();\n\t\t\t\t folderDataPlacemarks = new ArrayList<Placemark>();\n\t\t\t} else if (localName.equals(\"name\")) {\n\t\t\t\tif (in_placemarktag) {\n\t\t\t\t\tthis.in_placemarknametag = false;\n\t\t\t\t} else if (in_foldertag) {\n\t\t\t\t\tthis.in_foldernametag = false;\n\t\t\t\t} else if (in_documenttag) {\n\t\t\t\t\tthis.in_documentnametag = false;\n\t\t\t\t}\n\t\t\t} else if (localName.equals(\"description\")) {\n\t\t\t\tthis.in_descriptiontag = false;\n\t\t\t} else if (localName.equals(\"coordinates\")) {\n\t\t\t\tthis.in_coordinatestag = false;\n\t\t\t\tthis.dpm.addCoordinates(tmpStringList); // moved from in_placemarktag to here...\n\t\t\t\ttmpStringList = new ArrayList<String>();\n\t\t\t} else if (localName.equals(\"Address\")) {\n\t\t\t\tthis.in_addresstag = false;\n//\t\t\t\tLog.e(tag, \"pm.parkingAddress=[\" + this.dpm.parkingAddress + \"]\");\n\t\t\t} else {\n//\t\t\t\tLog.v(tag+\".endElement = \", localName);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.e(tag, \"Exception: \" + e.getMessage());\n\t\t\tLog.e(tag, \"Exception: \" + e.toString());\n\t\t}\n//\t\tLog.e(tag, \"\");\n\t}", "public static void main(String[] args) {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"countries.geojson\")) {\n // lecture du fichier\n Object obj = jsonParser.parse(reader);\n JSONObject feature = (JSONObject) obj;\n\n JSONArray jsonArray = (JSONArray) feature.get(\"features\");\n\n final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n final DocumentBuilder builder = factory.newDocumentBuilder();\n\n final Document document = builder.newDocument();\n\n final Element kmlTag = document.createElement(\"kml\");\n kmlTag.setAttribute(\"xmlns\", \"http://www.opengis.net/kml/2.2\");\n document.appendChild(kmlTag);\n\n final Element documentTag = document.createElement(\"Document\");\n kmlTag.appendChild(documentTag);\n\n for (Object feat : jsonArray) {\n final Element placeMark = document.createElement(\"Placemark\");\n documentTag.appendChild(placeMark);\n\n JSONObject featJ = (JSONObject) feat;\n\n JSONObject featJSON = (JSONObject) featJ.get(\"properties\");\n Properties properties = new Properties((String) featJSON.get(\"ADMIN\"), (String) featJSON.get(\"ISO_A3\"));\n JSONObject coordJSON = (JSONObject) featJ.get(\"geometry\");\n String type = (String) coordJSON.get(\"type\");\n String titre = \"(\" + properties.getIsoA3() + \") \" + properties.getAdmin();\n\n Element extData = document.createElement(\"ExtendedData\");\n placeMark.appendChild(extData);\n\n Element dataAdmin = document.createElement(\"Data\");\n dataAdmin.setAttribute(\"name\", \"ADMIN\");\n extData.appendChild(dataAdmin);\n\n Element dataISO = document.createElement(\"Data\");\n dataISO.setAttribute(\"name\", \"ISO_A3\");\n extData.appendChild(dataISO);\n\n Element valueAdmin = document.createElement(\"value\");\n valueAdmin.appendChild(document.createTextNode(properties.getAdmin()));\n dataAdmin.appendChild(valueAdmin);\n\n Element valueISO = document.createElement(\"value\");\n valueISO.appendChild(document.createTextNode(properties.getIsoA3()));\n dataISO.appendChild(valueISO);\n\n System.out.println(titre);\n if (type.equals(\"Polygon\")){\n Element polygon = document.createElement(\"Polygon\");\n placeMark.appendChild(polygon);\n\n Element outerBoundaryIs = document.createElement(\"outerBoundaryIs\");\n polygon.appendChild(outerBoundaryIs);\n\n Element linearRing = document.createElement(\"LinearRing\");\n outerBoundaryIs.appendChild(linearRing);\n\n Element coordinates = document.createElement(\"coordinates\");\n\n JSONArray coords = (JSONArray) coordJSON.get(\"coordinates\");\n for (Object coord: coords){\n JSONArray coordJ = (JSONArray) coord;\n for (Object o : coordJ) {\n StringBuilder sb = new StringBuilder(o.toString());\n sb.deleteCharAt(0);\n sb.deleteCharAt(sb.length() - 1);\n sb.append(\" \");\n coordinates.appendChild(document.createTextNode(sb.toString()));\n }\n linearRing.appendChild(coordinates);\n\n String nbCoord = \"\\t - \" + coordJ.size() + \" coordinates\";\n System.out.println(nbCoord);\n\n }\n } else if (type.equals(\"MultiPolygon\")){\n Element multiGeometry = document.createElement(\"MultiGeometry\");\n placeMark.appendChild(multiGeometry);\n\n Element polygon = document.createElement(\"Polygon\");\n multiGeometry.appendChild(polygon);\n\n Element outerBoundaryIs = document.createElement(\"outerBoundaryIs\");\n polygon.appendChild(outerBoundaryIs);\n\n Element linearRing = document.createElement(\"LinearRing\");\n outerBoundaryIs.appendChild(linearRing);\n\n Element coordinates = document.createElement(\"coordinates\");\n\n JSONArray coords = (JSONArray) coordJSON.get(\"coordinates\");\n for (Object coord : coords) {\n JSONArray coordJ = (JSONArray) coord;\n for (Object c : coordJ){\n JSONArray c1 = (JSONArray) c;\n for (Object o : c1){\n StringBuilder sb = new StringBuilder(o.toString());\n sb.deleteCharAt(0);\n sb.deleteCharAt(sb.length() - 1);\n sb.append(\" \");\n coordinates.appendChild(document.createTextNode(sb.toString()));\n }\n linearRing.appendChild(coordinates);\n\n String nbCoord = \"\\t - \" + c1.size() + \" coordinates\";\n System.out.println(nbCoord);\n }\n }\n } else {\n throw new Error(\"Type mal forme !\");\n }\n }\n\n // Etape 7 : finalisation\n final TransformerFactory transformerFactory = TransformerFactory.newInstance();\n final Transformer transformer = transformerFactory.newTransformer();\n final DOMSource source = new DOMSource(document);\n final StreamResult sortie = new StreamResult(new File(\"src/output.kml\"));\n\n //prologue\n document.setXmlStandalone(true);\n document.setXmlVersion(\"1.0\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n\n //formatage\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"2\");\n\n //sortie\n transformer.transform(source, sortie);\n\n } catch (IOException | ParseException | ParserConfigurationException | TransformerException e) {\n e.printStackTrace();\n }\n }", "public static String buildTrack(String controlPoints, String id, \n String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, \n SymbolModifiers attributes) {\n \n String pointArrayStringList = \"\"; \n \n // generates the points for the track.\n KmlRenderer kmlRender = new KmlRenderer();\n\n try {\n\n // Get the points of graphic. \n String[] latlons = controlPoints.split(\" \");\n int numberOfPoints = latlons.length; \n \n //ensure enough values in distance and altitude arrays for the number of points M. Deutch 4-15-15\n int numAM=attributes.AM_DISTANCE.size();\n int numX=attributes.X_ALTITUDE_DEPTH.size();\n double nextToLastAlt=attributes.X_ALTITUDE_DEPTH.get(numX-2);\n double lastAlt=attributes.X_ALTITUDE_DEPTH.get(numX-1);\n double lastWidth=attributes.AM_DISTANCE.get(numAM-1);\n int delta=2*(numberOfPoints-1)-numAM; //one width per segment\n if(delta>0)\n for(int j=0;j<delta;j++)\n attributes.AM_DISTANCE.add(lastWidth);\n \n delta=2*(numberOfPoints-1)-numX; //two alts per segment\n int j=0;\n while(j<delta)\n {\n attributes.X_ALTITUDE_DEPTH.add(nextToLastAlt);\n attributes.X_ALTITUDE_DEPTH.add(lastAlt);\n j+=2;\n }\n //end section\n \n // Ensure the track has an appropriate amount of points.\n if (numberOfPoints >= 2) { \n\n Track track = new Track(); \n\n for (int i = 0; i < numberOfPoints - 1; i++) {\n // Create a new route from first point to the next point.\n Route route = new Route();\n route.setAltitudeMode(altitudeMode);\n\n String[] point1String = latlons[i].split(\",\");\n String[] point2String = latlons[i + 1].split(\",\");\n\n double point1lon = 0.0D;\n double point1lat = 0.0D;\n double point2lon = 0.0D;\n double point2lat = 0.0D;\n if (point1String.length >= 2) {\n point1lon = Double.parseDouble(point1String[0]);\n point1lat = Double.parseDouble(point1String[1]);\n } else {\n throw new NumberFormatException();\n }\n\n if (point2String.length >= 2) {\n point2lon = Double.parseDouble(point2String[0]);\n point2lat = Double.parseDouble(point2String[1]);\n } else {\n throw new NumberFormatException();\n }\n\n route.addPoint(new GeoPoint(point1lon, point1lat));\n route.addPoint(new GeoPoint(point2lon, point2lat)); \n route.setLeftWidth(attributes.AM_DISTANCE.get(2 * i));\n route.setRightWidth(attributes.AM_DISTANCE.get(2 * i + 1));\n route.setMinAltitude(attributes.X_ALTITUDE_DEPTH.get(2 * i));\n route.setMaxAltitude(attributes.X_ALTITUDE_DEPTH.get(2 * i + 1));\n \n // Add the route to our track\n track.addRoute(route);\n\n }\n \n pointArrayStringList = kmlRender.getKml(track, id, name, description, lineColor, fillColor);\n\n } else { \n //throw invalid number of points exception\n throw new InvalidNumberOfPointsException();\n } \n } catch (Exception e) {\n pointArrayStringList = \"\"; \n } \n return pointArrayStringList;\n\n }", "@Override\n\tpublic void updateKey() {\n\t\tkey = String.format(\"%s;%s;%s;%s;%s;%s;%s\", dim, x1, y1, z1, x2, y2, z2);\n\t}", "public void handle(HttpExchange t) throws IOException {\n Jedis jed = new Jedis(\"localhost\");\n //read kml String\n String kmlData = jed.get(\"kmlDataString\");\n\n String response;\n if (kmlData == null){\n response = \"a\";\n }\n else {\n response = kmlData;\n }\n\n /*response = \"<kml xmlns=\\\"http://www.opengis.net/kml/2.2\\\">\\n\" +\n \"<Document>\\n\" +\n \"<Style id=\\\"40612C\\\">\\n\" +\n \"<IconStyle>\\n\" +\n \"<scale>0.7</scale>\\n\" +\n \"<heading>137</heading>\\n\" +\n \"<Icon>\\n\" +\n \"<href>http://localhost:3333/icons/plane09.png</href>\\n\" +\n \"</Icon>\\n\" +\n \"</IconStyle>\\n\" +\n \"</Style>\\n\" +\n \"<Placemark>\\n\" +\n \"<name>40612C</name>\\n\" +\n \"<description>\\n\" +\n \"EZY19PE Lon: 9.645923815275493 Lat: 49.78056335449219 Alt: 11292m Dir: 137deg Vel: 483kn Clm: 0ft/min\\n\" +\n \"</description>\\n\" +\n \"<styleUrl>#40612C</styleUrl>\\n\" +\n \"<Point>\\n\" +\n \"<coordinates>9.64592382, 49.78056335, 11292</coordinates>\\n\" +\n \"<altitudeMode>relativeToGround</altitudeMode>\\n\" +\n \"<extrude>1</extrude>\\n\" +\n \"</Point>\\n\" +\n \"</Placemark>\\n\" +\n \"</Document>\\n\" +\n \"</kml>\";*/\n\n t.sendResponseHeaders(200, response.length());\n OutputStream os = t.getResponseBody();\n os.write(response.getBytes());\n os.close();\n\n }", "public String getGeomKML() {\r\n return geomKML;\r\n }", "public final void mo68561KF(String str) {\n AppMethodBeat.m2504i(20113);\n this.igi = str;\n if (this.klC != null) {\n if (C5046bo.isNullOrNil(str)) {\n this.klC.setVisibility(8);\n this.klC.setText(\"\");\n } else {\n this.klC.setVisibility(0);\n Context context = getContext();\n Object[] objArr = new Object[1];\n objArr[0] = TextUtils.ellipsize(C44089j.m79292b(getContext(), C1854s.m3866mJ(this.igi)), this.f17199oz, (float) this.eOf, TruncateAt.END);\n C4990ab.m7411d(\"MicroMsg.ExdeviceRankChampionInfoView\", \"title : %s\", C44089j.m79292b(getContext(), context.getString(C25738R.string.bf_, objArr)));\n this.klC.setText(C44089j.m79293b(getContext(), r0, this.klC.getTextSize()));\n }\n }\n if (this.lxS != null) {\n if (C5046bo.isNullOrNil(str)) {\n this.lxS.setVisibility(4);\n } else {\n C40460b.m69437r(this.lxS, str);\n this.lxS.setVisibility(0);\n AppMethodBeat.m2505o(20113);\n return;\n }\n }\n AppMethodBeat.m2505o(20113);\n }", "@Override\n public void addKit(Kit kit) {\n }", "public void appendKex(KexAlgs alg)\n\t{\n\t\tappendAlgorithm(kexAlgs, alg);\n\t}", "public static String buildCake(String controlPoints, String id, \n String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, \n SymbolModifiers attributes) {\n\n StringBuilder output = new StringBuilder(); \n String pointArrayStringList = \"\";\n\n // Creat a new cake to begin adding layers to.\n Cake letThemEat = new Cake();\n\n // variables for the cylinder position\n double pivotx = 0.0D;\n double pivoty = 0.0D;\n\n // Used to store all the polygons for the cakelayers\n Set<KmlPolygon> combinedCakeLayers = null;\n\n // Used to generate the points\n KmlRenderer kmlRender = new KmlRenderer();\n\n try {\n\n // Get the points of graphic. \n String[] latlons = controlPoints.split(\" \");\n int numberOfPoints = latlons.length;\n\n if (numberOfPoints > 0) {\n\n //get the pivot point for this graphics.\n // all cake layers will use this pivot point for its \n //origin. \n String[] pivotString = latlons[0].split(\",\");\n\n if (pivotString.length >= 2) {\n pivotx = Double.parseDouble(pivotString[0]);\n pivoty = Double.parseDouble(pivotString[1]);\n letThemEat.setPivot(new GeoPoint(pivotx, pivoty));\n } else {\n throw new NumberFormatException();\n }\n \n int attributesArrayLength = attributes.X_ALTITUDE_DEPTH.size(); \n \n for (int i = 0; i < attributesArrayLength; i++) {\n // Create a new cake layer and set its pivot point.\n Radarc layerCake = new Radarc();\n layerCake.setAltitudeMode(altitudeMode);\n layerCake.setPivot(new GeoPoint(pivotx, pivoty));\n \n layerCake.setMinRadius(attributes.AM_DISTANCE.get(i));\n layerCake.setRadius(attributes.AM_DISTANCE.get(i + 1));\n layerCake.setMinAltitude(attributes.X_ALTITUDE_DEPTH.get(i));\n layerCake.setMaxAltitude(attributes.X_ALTITUDE_DEPTH.get(i + 1));\n layerCake.setLeftAzimuthDegrees(attributes.AN_AZIMUTH.get(i));\n layerCake.setRightAzimuthDegrees(attributes.AN_AZIMUTH.get(i + 1));\n i++;\n \n letThemEat.addLayer(layerCake);\n\n }\n\n pointArrayStringList = kmlRender.getKml(letThemEat, id, name, description, lineColor, fillColor);\n \n } else {\n // if not enough points throw exception\n throw new InvalidNumberOfPointsException();\n } \n } catch (Exception e) {\n pointArrayStringList = \"\"; \n }\n\n return pointArrayStringList;\n }", "public void setPathToKing(String[] pathToKing) {\n this.pathToKing = pathToKing;\n }", "private void addKey() {\t\n\t\t// Remember you can use Processing's graphics methods here\n\t\tfill(255, 250, 240);\n\t\t\n\t\tint xbase = 25;\n\t\tint ybase = 50;\n\t\t\n\t\trect(xbase, ybase, 250, 240);\n\t\t\n\t\tfill(0);\n\t\ttextAlign(LEFT, CENTER);\n\t\ttextSize(12);\n\t\ttext(\"Route Info\", xbase+25, ybase+25);\n\t\t\n\t\tfill(150, 30, 30);\n\n\n\t\tfill(0, 0, 0);\n\t\ttextAlign(LEFT, CENTER);\n\t\tString name0 = station0 == null ? \"\" : station0.getName();\n\t\tString name1 = station1 == null ? \"\" : station1.getName();\n\t\t\n\t\t// If two stations are currently selected, generate an API call\n\t\tString peak = \"\";\n\t\tString offPeak = \"\";\n\t\tString discount = \"\";\n\t\tString time = \"\";\n\t\tString distance = \"\";\n\t\tif(routeInfo != null){\n\t\t\tpeak = routeInfo.getPeak();\n\t\t\toffPeak = routeInfo.getOffPeak();\n\t\t\tdiscount = routeInfo.getDiscount();\n\t\t\ttime = routeInfo.getTime();\n\t\t\tdistance = routeInfo.getDistance();\n\t\t}\n\t\ttext(\"Station 1: \" + name0, xbase+25, ybase+65);\n\t\ttext(\"Station 2: \" + name1, xbase+25, ybase+85);\n\t\ttext(\"Peak fare: $\" + peak, xbase+25, ybase+125);\n\t\ttext(\"Off-peak fare: $\" + offPeak, xbase+25, ybase+145);\n\t\ttext(\"Discount fare: $\" + discount, xbase+25, ybase+165);\n\t\ttext(\"Est. travel time: \" + time + \" min\", xbase+25, ybase+205);\n\t\ttext(\"Distance: \" + distance + \" miles\", xbase+25, ybase+225);\t\n\t}", "@Override\n\t\t\t\tpublic void addTopic(String topic) {\n\t\t\t\t\t\tsendData(\"<new><name>\" + topic +\"</name></new>\");\n\t\t\t\t}", "private void printKml(MessageBroker msgBroker, PrintWriter writer, final SearchResultRecord record) {\r\n SearchResultRecords records = new SearchResultRecords();\r\n records.add(record);\r\n KmlFeedWriter kmlWriter = new KmlFeedWriter(msgBroker, writer);\r\n kmlWriter.setKmlSignatureProvider(new KmlSignatureProvider() {\r\n public String getTitle() {\r\n return record.getTitle();\r\n }\r\n public String getDescription() {\r\n return record.getAbstract();\r\n }\r\n });\r\n kmlWriter.write(records);\r\n}", "protected void writeStart() throws IOException {\n writer.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\");\r\n writer.write(\"<kml xmlns=\\\"http://www.opengis.net/kml/2.2\\\" xmlns:gx=\\\"http://www.google.com/kml/ext/2.2\\\">\\n\");\r\n writer.write(\"<Document>\\n\");\r\n writer.write(\"<name>\" + this.title + \"</name>\\n\");\r\n writer.write(\"<description></description>\\n\");\r\n writer.write(\"<Style id=\\\"\" + LINE_STYLE_YELLOW + \"\\\">\\n\");\r\n writer.write(\"<LineStyle>\\n\");\r\n writer.write(\"<color>7f00ffff</color>\\n\");\r\n writer.write(\"<width>4</width>\\n\");\r\n writer.write(\"</LineStyle>\\n\");\r\n writer.write(\"</Style>\\n\");\r\n writer.write(\"<Style id=\\\"\" + LINE_STYLE_BLUE + \"\\\">\\n\");\r\n writer.write(\"<LineStyle>\\n\");\r\n writer.write(\"<color>7fff0000</color>\\n\");\r\n writer.write(\"<width>4</width>\\n\");\r\n writer.write(\"</LineStyle>\\n\");\r\n writer.write(\"</Style>\\n\");\r\n writer.write(\"<Style id=\\\"\" + LINE_STYLE_RED + \"\\\">\\n\");\r\n writer.write(\"<LineStyle>\\n\");\r\n writer.write(\"<color>7f0000ff</color>\\n\");\r\n writer.write(\"<width>4</width>\\n\");\r\n writer.write(\"</LineStyle>\\n\");\r\n writer.write(\"</Style>\\n\");\r\n }", "private void kk12() {\n\n\t}", "public abstract void writeDelete(Kml kml) throws KmlException;", "@Test\n\tpublic void testParse() {\n\t\tString kmlFile = \"C:/travail/JeuVoile/worldsataset/ne_110m_ocean/ne_110m_ocean.kml\";\n\t\tKmlCountryParser parser = new KmlCountryParser();\n\t\t\n\t\tDate debut = new Date();\n\t\tparser.parse(kmlFile);\n\t\tLOG.debug(\"time:{}\", new Date().getTime() - debut.getTime());\n\t\tList<Pays> liste = parser.getPaysList();\n\t\tint cpt = 1;\n\t\tint nbPoint = 0;\n\t\tfor (Pays pays : liste) {\n\t\t\t//LOG.debug(\"{}:{}:{}\",new Object[] {cpt++,pays.getName(), pays.getPolygon().size()});\n\t\t\t\n\t\t\tfor(List<PointGps> polygon : pays.getPolygons()) {\n\t\t\t\tnbPoint += polygon.size();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(pays.getIso3().equals(\"PA1\") || pays.getIso3().equals(\"PA2\") ) {\n\t\t\t\tString json=\"\";\n\t\t\t\tcpt = 1;\n\t\t\t\tLOG.info(\"nb Polygon=\" + pays.getPolygons().size() );\n\t\t\t\tfor(List<PointGps> polygon : pays.getPolygons()) {\n\t\t\t\t\tjson=\"\";\n\t\t\t\t\tfor (PointGps gps : polygon) {\n\t\t\t\t\t\tjson += \"[\" + round(gps.getLatitude()) + \",\" + round(gps.getLongitude()) + \"],\";\t\n\t\t\t\t\t}\n\t\t\t\t\t//json = json.substring(0,json.length() - 1);\n\t\t\t\t\tLOGJ.debug(json);\n\t\t\t\t\tLOG.debug(\"\" + cpt++ );\n\t\t\t\t\t//json += \"],\";\n\t\t\t\t}\n\t\t\t\t//json = json.substring(0,json.length() - 1);\n\t\t\t\t//LOG.info(json);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tLOG.debug(\"nbPoints:{}\", nbPoint);\n\t\t\n\t}", "public static final String shift(String text) {\n return \"+\" + text; /*I18nOK:LINE*/\n }", "Astro leafString(String data, SourceSpan optSpan);", "public void strokeString(float x, float y, String text);", "@Override\n public String toWKT() throws UnsupportedOperationException {\n throw new UnsupportedOperationException();\n }", "@Test\n public void testFromXml() throws Exception\n {\n Element root = XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"kml\",\n XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"Folder\",\n XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"description\", XmlBuilder.text(\"folder description\"))),\n XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"Document\",\n XmlBuilder.element(\"http://earth.google.com/kml/2.1\", \"description\", XmlBuilder.text(\"document description\"))))\n .toDOM().getDocumentElement();\n\n KmlFile file = KmlFile.fromXml(root.getOwnerDocument());\n\n List<Feature<?>> features = file.getFeatures();\n\n assertEquals(\"number of features\", 2, features.size());\n assertEquals(\"first feature type\", Folder.class, features.get(0).getClass());\n assertEquals(\"first feature attribute\", \"folder description\", features.get(0).getDescription());\n assertEquals(\"second feature type\", Document.class, features.get(1).getClass());\n assertEquals(\"second feature attribute\", \"document description\", features.get(1).getDescription());\n }", "public void getK_Gelisir(){\n K_Gelistir();\r\n }", "public void toKml(String outputpath) {\n \t File output = new File(outputpath);\n \t ConvertToKml convert = new ConvertToKml(project,output);\n \t try {\n\t\t\tconvert.csvToKml();\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 }", "void to(String topic);", "public String getTimeKML() {\r\n if (timeKML==null) return \"\";\r\n return timeKML;\r\n }", "private void genRunwayName(Group root, String runwayId, Integer helperHeight){\n Point runwayPos = controller.getRunwayPos(runwayId);\n Dimension runwayDim = controller.getRunwayDim(runwayId);\n\n //text color and text font\n javafx.scene.text.Font font = new javafx.scene.text.Font(\"SansSerif\", runwayDim.height/2);\n Color fontColor = convertToJFXColour(Settings.RUNWAY_NAME_COLOUR);\n\n // rotate to make the string flat on the runway\n Rotate flatRotation = new Rotate(-90,0,-1,0, Rotate.X_AXIS);\n\n //offset for the id\n Integer idOffset = 16;\n //offset for the letter;\n Double letterOffset = 30.5;\n //offset for putting the letter which has a smaller font higher\n Integer letterHeightOffset = 10;\n\n if(runwayId.length() == 2){\n Text text = new Text(runwayId);\n text.setFill(fontColor);\n text.setFont(font);\n text.setTranslateX(runwayPos.x - runwayDim.height/2 + idOffset);\n text.setTranslateZ(-runwayPos.y + runwayNameOffset);\n text.setTranslateY(-helperHeight);\n\n Rotate rotate = new Rotate(controller.getBearing(runwayId), runwayDim.height/2 - idOffset,0, -runwayNameOffset, Rotate.Y_AXIS);\n text.getTransforms().add(rotate);\n text.getTransforms().add(flatRotation);\n\n text.setCache(true);\n text.setCacheHint(CacheHint.QUALITY);\n root.getChildren().add(text);\n\n }else{\n Text newRunwayId = new Text(runwayId.substring(0,2));\n newRunwayId.setFill(fontColor);\n newRunwayId.setFont(font);\n Text letter = new Text(runwayId.charAt(2) + \"\");\n letter.setFill(fontColor);\n letter.setFont(new javafx.scene.text.Font(\"SansSerif\", runwayDim.height/2-10));\n\n newRunwayId.setTranslateX(runwayPos.x - runwayDim.height/2 + idOffset);\n newRunwayId.setTranslateZ(-runwayPos.y + runwayNameOffset);\n newRunwayId.setTranslateY(-helperHeight);\n\n Rotate IdRotate = new Rotate(controller.getBearing(runwayId), runwayDim.height/2 - idOffset,0, - runwayNameOffset, Rotate.Y_AXIS);\n newRunwayId.getTransforms().add(IdRotate);\n\n letter.setTranslateX(runwayPos.x - runwayDim.height/2 + letterOffset);\n letter.setTranslateZ(-runwayPos.y + runwayNameOffset - runwayDim.height/2 + letterHeightOffset);\n letter.setTranslateY(-helperHeight);\n\n Rotate letterRotate = new Rotate(controller.getBearing(runwayId), runwayDim.height/2 - letterOffset,0, - runwayNameOffset + runwayDim.height/2 - letterHeightOffset, Rotate.Y_AXIS);\n letter.getTransforms().add(letterRotate);\n\n newRunwayId.getTransforms().add(flatRotation);\n letter.getTransforms().add(flatRotation);\n\n newRunwayId.setCache(true);\n newRunwayId.setCacheHint(CacheHint.QUALITY);\n\n letter.setCache(true);\n letter.setCacheHint(CacheHint.QUALITY);\n\n root.getChildren().add(newRunwayId);\n root.getChildren().add(letter);\n }\n }", "private String getGeomInsert( String gml ) throws Exception {\r\n Debug.debugMethodBegin( this, \"getGeomInsert\" );\r\n\r\n Document doc = XMLTools.parse( new StringReader( gml ) );\r\n\r\n GMLPoint point = (GMLPoint)GMLFactory.createGMLGeometry( doc.getDocumentElement() );\r\n\r\n StringBuffer geom = new StringBuffer();\r\n\r\n GMLCoord coord = point.getCoord();\r\n\r\n if ( coord != null ) {\r\n geom.append( coord.getX() ).append( \",\" ).append( coord.getY() );\r\n } else {\r\n GMLCoordinates coordinates = point.getCoordinates();\r\n String s = coordinates.getCoordinates();\r\n String sep = \"\" + coordinates.getCoordinateSeperator();\r\n String[] vals = StringExtend.toArray( s, sep, false );\r\n geom.append( vals[0] ).append( \",\" ).append( vals[1] );\r\n }\r\n\r\n Debug.debugMethodEnd();\r\n return geom.toString();\r\n }", "protected abstract void pushStringValue();", "public void push(String s){\n pilha.add(s);\n }", "private void initialize() {\n\t\tfrmKmlTool = new JFrame();\n\t\tfrmKmlTool.setTitle(APP_TITLE);\n\t\tfrmKmlTool.setBounds(100, 100, 1024, 800);\n\t\tfrmKmlTool.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t// File chooser for opening KML/KMZ files.\n\t\topenKmlChooser = new JFileChooser();\n\t\topenKmlChooser.setAcceptAllFileFilterUsed(false);\n\t\topenKmlChooser.setFileFilter(new FileFilter() {\n\t\t\t@Override\n\t\t\tpublic String getDescription() {\n\t\t\t\treturn \"Google KML/KMZ Files (*.kml;*.kmz)\";\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File f) {\n\t\t\t\tif (f.isDirectory())\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\tString name = f.getName().toLowerCase();\n\t\t\t\treturn name.endsWith(\".kml\") || name.endsWith(\".kmz\");\n\t\t\t}\n\t\t});\n\t\t\n\t\t// File chooser for opening DXF files.\n\t\topenDxfChooser = new JFileChooser();\n\t\topenDxfChooser.setAcceptAllFileFilterUsed(false);\n\t\topenDxfChooser.setFileFilter(new FileFilter() {\n\t\t\t@Override\n\t\t\tpublic String getDescription() {\n\t\t\t\treturn \"Autocad DXF Files (*.dxf)\";\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File f) {\n\t\t\t\tif (f.isDirectory())\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\treturn f.getName().toLowerCase().endsWith(\".dxf\");\n\t\t\t}\n\t\t});\n\t\t\n\t\t// File chooser for saving KMZ files.\n\t\tsaveKmzChooser = new JFileChooser();\n\t\tsaveKmzChooser.setAcceptAllFileFilterUsed(false);\n\t\tsaveKmzChooser.setFileFilter(new FileFilter() {\n\t\t\t@Override\n\t\t\tpublic String getDescription() {\n\t\t\t\treturn \"KMZ Files (*.kmz)\";\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File f) {\n\t\t\t\tif (f.isDirectory())\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\treturn f.getName().toLowerCase().endsWith(\".kmz\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tfrmKmlTool.setJMenuBar(menuBar);\n\t\t\n\t\tJMenu mnFile = new JMenu(\"File\");\n\t\tmenuBar.add(mnFile);\n\t\t\n\t\t// Menu item for importing KML/KMZ files.\n\t\tJMenuItem mntmLoadKml = new JMenuItem(\"Load KML/KMZ File...\");\n\t\tmntmLoadKml.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tint ret = openKmlChooser.showOpenDialog(frmKmlTool);\n\t\t\t\t\tif (ret == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\tresetModel();\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew KmlImporter(model).importFile(openKmlChooser.getSelectedFile());\n\t\t\t\t\t\t\n\t\t\t\t\t\tstyleTableModel.fireTableDataChanged();\n\t\t\t\t\t\t\n\t\t\t\t\t\tupdateAppTitle(openKmlChooser.getSelectedFile());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\topenKmlChooser.setSelectedFile(null);\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(frmKmlTool, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\tupdateAppTitle(null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmnFile.add(mntmLoadKml);\n\t\t\n\t\t// Menu item for importing KML/KMZ files.\n\t\tJMenuItem mntmLoadDxf = new JMenuItem(\"Load DXF File...\");\n\t\tmntmLoadDxf.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tint ret = openDxfChooser.showOpenDialog(frmKmlTool);\n\t\t\t\t\tif (ret == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\t// Open the Coordinate Reference System chooser after the user selected a file.\n\t\t\t\t\t\t// Note: JCRSChooser and CRSListModel were taken from the GeoTools library and\n\t\t\t\t\t\t// modified so that it works with the epsg.properties file.\n\t\t\t\t\t\t// See DxfImporter for more information.\n\t\t\t\t\t\tCoordinateReferenceSystem srcCrs = JCRSChooser.showDialog();\n\t\t\t\t\t\tif (srcCrs != null) {\n\t\t\t\t\t\t\tresetModel();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew DxfImporter(model).importFile(openDxfChooser.getSelectedFile(), srcCrs);\n\t\t\t\t\t\t\n\t\t\t\t\t\tstyleTableModel.fireTableDataChanged();\n\t\t\t\t\t\t\n\t\t\t\t\t\tupdateAppTitle(openDxfChooser.getSelectedFile());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\topenDxfChooser.setSelectedFile(null);\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(frmKmlTool, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\tupdateAppTitle(null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmnFile.add(mntmLoadDxf);\n\t\t\n\t\tmnFile.addSeparator();\n\t\t\n\t\t// Menu item for saving a single KMZ file that works in Google Earth (but not Maps).\n\t\tJMenuItem mntmSaveKmz = new JMenuItem(\"Save As KMZ For Google Earth...\");\n\t\tmntmSaveKmz.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tint ret = saveKmzChooser.showSaveDialog(frmKmlTool);\n\t\t\t\t\tif (ret == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\tFile file = saveKmzChooser.getSelectedFile();\n\t\t\t\t\t\tif (!file.getName().toLowerCase().endsWith(\".kmz\")) {\n\t\t\t\t\t\t\tfile = new File(file.getPath() + \".kmz\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew KmlExporter(model).exportKmz(file);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsaveKmzChooser.setSelectedFile(null);\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(frmKmlTool, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmnFile.add(mntmSaveKmz);\n\t\t\n\t\t// Menu item for saving a KMZ file that works in Google Maps (for ZONESCAN net).\n\t\t// Note that multiple KMZ files may be saved if a single file would be too large\n\t\t// for Google Maps.\n\t\tJMenuItem mntmSaveKmzGoogleMaps = new JMenuItem(\"Save As KMZ For Google Maps...\");\n\t\tmntmSaveKmzGoogleMaps.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tint ret = saveKmzChooser.showSaveDialog(frmKmlTool);\n\t\t\t\t\tif (ret == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\tFile file = saveKmzChooser.getSelectedFile();\n\t\t\t\t\t\tif (!file.getName().toLowerCase().endsWith(\".kmz\")) {\n\t\t\t\t\t\t\tfile = new File(file.getPath() + \".kmz\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew KmlExporter(model).exportKmzForGoogleMaps(file);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsaveKmzChooser.setSelectedFile(null);\n\t\t\t\t}\n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(frmKmlTool, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmnFile.add(mntmSaveKmzGoogleMaps);\n\t\t\n\t\tmnFile.addSeparator();\n\t\t\n\t\tJMenuItem mntmExit = new JMenuItem(\"Exit\");\n\t\tmntmExit.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmKmlTool.setVisible(false);\n\t\t\t\tfrmKmlTool.dispose();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tmnFile.add(mntmExit);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n\t\tfrmKmlTool.getContentPane().add(scrollPane, BorderLayout.CENTER);\n\t\t\n\t\t// Table for showing the editable styles in the KML model.\n\t\t// For colors, ColorRenderer and ColorEditor are used. These were taken from Java Swing examples.\n\t\tstyleTableModel = new StyleTableModel(model);\n\t\tstyleTable = new JTable();\n\t\tstyleTable.setColumnSelectionAllowed(true);\n\t\tstyleTable.setRowSelectionAllowed(false);\n\t\tstyleTable.setFillsViewportHeight(true);\n\t\tstyleTable.setCellSelectionEnabled(true);\n\t\tstyleTable.setDefaultRenderer(Color.class, new ColorRenderer(true));\n\t\tstyleTable.setDefaultEditor(Color.class, new ColorEditor());\n\t\tstyleTable.setModel(styleTableModel);\n\t\tscrollPane.setViewportView(styleTable);\n\t\t\n\t}", "@java.lang.Override\n public java.lang.String getK() {\n java.lang.Object ref = k_;\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 k_ = s;\n return s;\n }\n }", "private void strin() {\n\n\t}", "@Override\n\tpublic void draw3dText(Vector3f location, String textString) {\n\n\t}", "public java.lang.String getK() {\n java.lang.Object ref = k_;\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 k_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public interface wkhtmltoimage_str_callback extends Callback {\n\t\tvoid apply(Pointer converter, String str);\n\t}", "String getNewTopic();", "public void onderbreek(){\n \n }", "private void modifyTextActions() {\n\n\t\tfinal String text = this.comboTargetLayer.getText();\n\t\tif (text.length() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// if it was modified by the selection of one item it was handled by\n\t\t// selectedTargetLayerActions\n\t\tif (this.comboTargetLayer.getSelectionIndex() != -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (text.equals(this.currentNewLayerName)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// check the new name with the layer list.\n\t\tif (this.comboTargetLayer.indexOf(text) != -1) {\n\t\t\tInfoMessage msg = new InfoMessage(Messages.ResultLayerComposite__duplicated_layer_name,\n\t\t\t\t\t\tInfoMessage.Type.ERROR);\n\t\t\tthis.setMessage(msg);\n\n\t\t\treturn;\n\t\t}\n\t\t// boolean used to control the back write of the result layer name\n\t\tmodifyNewLayerName = true;\n\t\t// if the new name is correct, notifies to all listeners,\n\t\t// saves the current name and sets Geometry as default for the new layer\n\t\tsetCurrentTarget(text);\n\t\tsetGeometryComboEnabled(true);\n\t\tint index = comboGeometryList.getSelectionIndex();\n\t\tif (index == -1) {\n\n\t\t\tthis.comboGeometryList.select(this.comboGeometryList.indexOf(Geometry.class.getSimpleName()));\n\t\t}\n\n\t\tdispatchEvent(text);\n\t\tmodifyNewLayerName = false;\n\t}", "public void compress(String[] text) throws LineNotExistsException {\n\t\tString[] t = new String[Math.min(text.length, inputLimit)];\r\n\t\tfor (int i = 0; i < t.length; i++) {\r\n\t\t\tt[i] = text[i];\r\n//\t\t\tein += text[i];\r\n\t\t}\r\n//\t\ttext = t;\r\n\r\n\t\t// topic\r\n\t\tText topic = lang.newText(new Coordinates(20, 50), \"LZ78\", \"Topic\", null,\r\n\t\t\t\ttptopic);\r\n\r\n\t\tlang.newRect(new Offset(-5, -5, topic, \"NW\"),\r\n\t\t\t\tnew Offset(5, 5, topic, \"SE\"), \"topicRect\", null, rctp);\r\n\r\n\t\t// Algo in words\r\n\t\tlang.nextStep();\r\n\t\tText algoinWords = lang.newText(new Coordinates(20, 100),\r\n\t\t\t\t\"Der Algorithmus in Worten\", \"inWords\", null, tpwords);\r\n\r\n\t\t// Algo steps\r\n\t\tlang.nextStep();\r\n\t\tText step1 = lang\r\n\t\t\t\t.newText(\r\n\t\t\t\t\t\tnew Offset(0, 100, topic, \"SW\"),\r\n\t\t\t\t\t\t\"1) Lege ein Wörterbuch an, das initial das Ende einer Datei (ferner EOF) mit 0 und\",\r\n\t\t\t\t\t\t\"line1\", null, tpsteps);\r\n\t\tText step12 = lang.newText(new Offset(0, 20, step1, \"SW\"),\r\n\t\t\t\t\" die Buchstaben von A bis Z mit den Zahlen 1 bis 26 kodiert.\",\r\n\t\t\t\t\"line1\", null, tpsteps);\r\n\t\tlang.nextStep();\r\n\t\tText step2 = lang\r\n\t\t\t\t.newText(\r\n\t\t\t\t\t\tnew Offset(0, 40, step12, \"SW\"),\r\n\t\t\t\t\t\t\"2) Nun wird die Eingabe zeichenweise bis zum Ende des Textes eingelesen.\",\r\n\t\t\t\t\t\t\"line2\", null, tpsteps);\r\n\t\tlang.nextStep();\r\n\t\tText step3 = lang\r\n\t\t\t\t.newText(\r\n\t\t\t\t\t\tnew Offset(0, 40, step2, \"SW\"),\r\n\t\t\t\t\t\t\"3) Das eingelesene Zeichen wird mit sovielen folgenden Buchstaben ergänzt,\",\r\n\t\t\t\t\t\t\"line3\", null, tpsteps);\r\n\t\tText step31 = lang\r\n\t\t\t\t.newText(\r\n\t\t\t\t\t\tnew Offset(0, 20, step3, \"SW\"),\r\n\t\t\t\t\t\t\" bie die entstehende Kombination nicht mehr im Wörterbuch enthalten ist. \",\r\n\t\t\t\t\t\t\"line3\", null, tpsteps);\r\n\t\tlang.nextStep();\r\n\t\tText step4 = lang\r\n\t\t\t\t.newText(\r\n\t\t\t\t\t\tnew Offset(0, 40, step31, \"SW\"),\r\n\t\t\t\t\t\t\"4) Diese Kombination wäre also ohne ihren letzten Buchstaben noch im Wörterbuch vorhanden.\",\r\n\t\t\t\t\t\t\"line3\", null, tpsteps);\r\n\t\tText step41 = lang\r\n\t\t\t\t.newText(\r\n\t\t\t\t\t\tnew Offset(0, 20, step4, \"SW\"),\r\n\t\t\t\t\t\t\" Das Ergebnis wird um den passenden Schlüssel dieser nicht vollständigen Kombination erweitert. Für die\",\r\n\t\t\t\t\t\t\"line3\", null, tpsteps);\r\n\t\tText step42 = lang\r\n\t\t\t\t.newText(\r\n\t\t\t\t\t\tnew Offset(0, 20, step41, \"SW\"),\r\n\t\t\t\t\t\t\" vollständige Kombination wird ein Eintrag an der nächsten freien Stelle im Wörterbuch angelegt.\",\r\n\t\t\t\t\t\t\"line3\", null, tpsteps);\r\n\t\tlang.nextStep();\r\n\r\n\t\talgoinWords.hide();\r\n\t\tstep1.hide();\r\n\t\tstep12.hide();\r\n\t\tstep2.hide();\r\n\t\tstep3.hide();\r\n\t\tstep31.hide();\r\n\t\tstep4.hide();\r\n\t\tstep41.hide();\r\n\t\tstep42.hide();\r\n\r\n\t\t// algo\r\n\r\n\t\t// extract the input\r\n\t\tString input = \"\";\r\n\t\tfor (int i = 0; i < t.length; i++) {\r\n\t\t\tinput += t[i];\r\n\t\t}\r\n\t\tinput = input.toUpperCase();\r\n\r\n\t\tStringArray strArray = lang.newStringArray(new Offset(0, 90, topic, \"SW\"),\r\n\t\t\t\tt, \"text\", null, ap);\r\n\t\tArrayMarker marker = lang.newArrayMarker(strArray, 0, \"marker\", null, amp);\r\n\r\n\t\t// fill the initial dictionary\r\n\t\tVector<String> dict = new Vector<String>(0, 1);\r\n\t\tdict.add(\"EOF\"); // 0\r\n\t\tfor (int i = 65; i < 91; i++) {\r\n\t\t\tdict.add(\"\" + (char) i);\r\n\t\t}\r\n\r\n\t\tString[][] dictData = new String[inputLimit][2];\r\n\r\n\t\tfor (int i = 0; i < dictData.length; i++) {\r\n\t\t\tdictData[i][0] = \" \";\r\n\t\t\tdictData[i][1] = \" \";\r\n\t\t}\r\n\t\tdictData[0][0] = \"0\";\r\n\t\tdictData[0][1] = \"EOF\";\r\n\t\tdictData[1][0] = \"1\";\r\n\t\tdictData[1][1] = \"A\";\r\n\t\tdictData[2][0] = \"...\";\r\n\t\tdictData[2][1] = \"...\";\r\n\t\tdictData[3][0] = \"26\";\r\n\t\tdictData[3][1] = \"Z\";\r\n\t\tint matrixCounter = 4;\r\n\r\n\t\tStringMatrix dictMatrix = lang.newStringMatrix(new Offset(110, 0, strArray,\r\n\t\t\t\t\"NE\"), dictData, \"dict\", null, mp);\r\n\r\n\t\tlang.nextStep();\r\n\r\n\t\tString result = \"\";\r\n\r\n\t\tText resultText = lang.newText(new Offset(0, 35, strArray, \"SW\"),\r\n\t\t\t\t\"Ausgabe: \", \"result\", null, tpsteps);\r\n\t\tText resultText2 = lang.newText(new Offset(5, -5, resultText, \"SE\"),\r\n\t\t\t\tresult, \"result\", null, tpsteps);\r\n\t\tresultText2.changeColor(null, Color.RED, null, null);\r\n\r\n\t\tlang.nextStep();\r\n\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tmarker.move(i, null, null);\r\n\t\t\tString tmp = \"\" + input.charAt(i);\r\n\t\t\tstrArray.unhighlightCell(0, i, null, null);\r\n\t\t\tstrArray.highlightCell(i, null, null);\r\n\r\n\t\t\twhile (dict.contains(tmp) && i + 1 < input.length()) {\r\n\t\t\t\tif (dict.contains(tmp + input.charAt(i + 1))) {\r\n\t\t\t\t\ttmp += input.charAt(i + 1);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tstrArray.highlightCell(i, null, null);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdict.add(tmp + input.charAt(i + 1));\r\n\r\n\t\t\t\t\tdictMatrix.put(matrixCounter, 0, \"\" + (matrixCounter + 23), null,\r\n\t\t\t\t\t\t\tnull);\r\n\t\t\t\t\tdictMatrix.put(matrixCounter, 1, \"\" + tmp + input.charAt(i + 1),\r\n\t\t\t\t\t\t\tnull, null);\r\n\t\t\t\t\tdictMatrix.highlightCell(matrixCounter, 0, null, null);\r\n\t\t\t\t\tdictMatrix.highlightCell(matrixCounter, 1, null, null);\r\n\t\t\t\t\tif (matrixCounter > 0) {\r\n\t\t\t\t\t\tdictMatrix.unhighlightCell(matrixCounter - 1, 0, null, null);\r\n\t\t\t\t\t\tdictMatrix.unhighlightCell(matrixCounter - 1, 1, null, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmatrixCounter++;\r\n\t\t\t\t\tif (tmp.length() > 1) {\r\n\t\t\t\t\t\tdictMatrix.highlightCell(dict.indexOf(tmp) - 23, 1, null, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlang.nextStep();\r\n\t\t\t\t\tif (tmp.length() > 1) {\r\n\t\t\t\t\t\tdictMatrix.unhighlightCell(dict.indexOf(tmp) - 23, 1, null, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresult += dict.indexOf(tmp) + \" \";\r\n\t\t\tresultText2.setText(result, null, null);\r\n\t\t\tlang.nextStep();\r\n\t\t}\r\n\r\n\t\tText fazit = lang.newText(new Offset(0, 90, resultText, \"SW\"),\r\n\t\t\t\t\"Damit ergibt sich die Ausgabe: \", \"Ausgabe\", null, tpsteps);\r\n\t\tText fazit2 = lang.newText(new Offset(0, 20, fazit, \"SW\"), result,\r\n\t\t\t\t\"Ausgabe\", null, tpsteps);\r\n\t\tfazit2.changeColor(null, Color.BLUE, null, null);\r\n\r\n\t\tlang.newText(new Offset(0, 20, fazit2, \"SW\"),\r\n\t\t\t\t\"Die zusätzliche Ausgabe des Wörterbuchs ist nicht notwendig.\",\r\n\t\t\t\t\"fazit\", null, tpsteps);\r\n\t}", "@Override\n\tpublic void setTraining(String text) {\n\t\tmyWords = text.split(\"\\\\s+\");\n\t\tmyMap = new HashMap<String , ArrayList<String>>();\n\t\t\n\t\tfor (int i = 0; i <= myWords.length-myOrder; i++)\n\t\t{\n\t\t\tWordGram key = new WordGram(myWords, i, myOrder);\n\t\t\tif (!myMap.containsKey(key))\n\t\t\t{\n\t\t\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\tlist.add(myWords[i+myOrder]);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t} else {\n\t\t\t\t\tlist.add(PSEUDO_EOS);\n\t\t\t\t\tmyMap.put(key, list);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (i+myOrder != myWords.length)\n\t\t\t\t{\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(myWords[i+myOrder]);\n\t\t\t\t} else {\n\t\t\t\t\t((ArrayList<String>) myMap.get(key)).add(PSEUDO_EOS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void importText(String text, Epml epml) {\n\t}", "public final synchronized void mo47205a(String str) {\n this.f49750a.edit().putString(\"topic_operaion_queue\", str).apply();\n }", "public void push(String name);", "void onPart(String partedNick);", "public void sendToKafka(final ExtendedRevisionCallGraph cg) {\n\n logger.debug(\"Writing call graph for {} to Kafka\", cg.uri.toString());\n final var record = new ProducerRecord<Object, String>(this.producerTopic(),\n cg.uri.toString(),\n cg.toJSON().toString()\n );\n\n kafkaProducer.send(record, (recordMetadata, e) -> {\n if (recordMetadata != null) {\n logger.debug(\"Sent: {} to {}\", cg.uri.toString(), this.producerTopic());\n } else {\n setPluginError(e);\n logger.error(\"Failed to write message to Kafka: \" + e.getMessage(), e);\n }\n });\n }", "public interface WindupMarker {\n\t/**\n\t * The id for windup classification markers\n\t */\n\tstatic final String WINDUP_CLASSIFICATION_MARKER_ID = \"org.jboss.tools.windup.core.classificationMarker\"; //$NON-NLS-1$\n\t/**\n\t * The id for windup hint markers\n\t */\n\tstatic final String WINDUP_HINT_MARKER_ID = \"org.jboss.tools.windup.core.hintMarker\"; //$NON-NLS-1$\n\t\n\tstatic final String WINDUP_QUICKFIX_ID = \"org.jboss.tools.windup.core.quickfixMarker\"; //$NON-NLS-1$\n\t\n\tstatic final String WINDUP_MARKER = \"WINDUP_MARKER\";\n\n\tstatic final String CONFIGURATION_ID = \"CONFIGURATION_ID\"; //$NON-NLS-1$\n\tstatic final String URI_ID = \"URI_ID\"; //$NON-NLS-1$\n\tstatic final String ELEMENT_ID = \"ELEMENT_ID\"; //$NON-NLS-1$\n\t\n\tstatic final String TITLE = \"TITLE_ID\";//$NON-NLS-1$\n\tstatic final String SEVERITY = \"SEVERITY_ID\"; //$NON-NLS-1$\n\tstatic final String EFFORT = \"EFFORT_ID\"; //$NON-NLS-1$\n\tstatic final String RULE_ID = \"RULE_ID\"; //$NON-NLS-1$\n\tstatic final String SOURCE_SNIPPET = \"SOURCE_ID\"; //$NON-NLS-1$\n\tstatic final String LENGTH = \"LENGTH_ID\";//$NON-NLS-1$\n\t \n\tstatic final String DESCRIPTION = \"DESCRIPTION_ID\"; //$NON-NLS-1$\n\t\n}", "private String addMusic() {\n\t\t// One Parameter: MusicName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|music:\" + parameters[0]);\n\t\treturn tag.toString();\n\n\t}", "public void putString(ResourceLocation name, String value) {\n data.putString(name.toString(), value);\n }", "public void saveString(String key,String value)\n {\n preference.edit().putString(key,value).apply();\n }", "public String mo27384k() {\n return \"com.google.android.location.internal.GoogleLocationManagerService.START\";\n }", "public abstract String beginGraphString();", "@Override\r\n\tpublic String getUri() {\n\t\treturn \"kbox://global\";\r\n\t}", "private void add(String thestring) {\n\t\t\n\t}", "private static String getString(String key, Object s1) {\r\n\t\treturn ConfmlFeatureEditorPlugin.INSTANCE.getString(key,\r\n\t\t\t\tnew Object[] { s1 });\r\n\t}", "public KI(String spielerwahl){\n\t\teigenerStein = spielerwahl;\n\t\t\n\t\tswitch (spielerwahl) {\n\t\tcase \"o\":\n\t\t\tgegnerStein = \"x\";\n\t\t\tbreak;\n\t\tcase\"x\":\n\t\t\tgegnerStein = \"o\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Ungueltige Spielerwahl.\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\thatAngefangen = gegnerStein;\n\t\t\n\t\tfor(int i=0; i<7; i++) { //initialisiert spielfeld\n\t\t\tfor(int j=0; j<6; j++){\t\t\t\t\n\t\t\t\tspielfeld[i][j] = \"_\";\n\t\t\t}\n\t\t\tmoeglicheZuege[i] = -1; //initialisiert die moeglichen zuege\n\t\t}\n\t\t\n\t}", "public RecodedString getWkn(){\n return wkn;\n }", "public abstract void calcPathToKing(Space kingSpot);", "public void mo5994p() {\n this.f5411d = this.f5389I.getString(R.string.new_recording) + \" \" + C1398b.m6805a();\n C1413m.f5726x = this.f5411d;\n }", "@Override\n public String toString() {\n return \"w\";\n }", "public String toString() {\r\n return \"[\" + geomKML + \", \" + attributes.toString() + \"]\";\r\n }", "public void appendSystem(String text) {\n try {\n StyledDocument doc = screenTP.getStyledDocument();\n doc.insertString(doc.getLength(), formatForPrint(text), doc.getStyle(\"system\"));\n } catch (BadLocationException ex) {\n// ex.printStackTrace();\n AdaptationSuperviser.logger.error(\"Error while trying to append system message in the \" + this.getName(), ex);\n }\n }", "public final void beK() {\n AppMethodBeat.i(88975);\n if (this.kaS.aZV().vTW != null && this.kaS.aZV().vTW.size() > 0) {\n tm tmVar = (tm) this.kaS.aZV().vTW.get(0);\n if (this.iPD != null) {\n this.iPD.setText(tmVar.title);\n }\n if (this.ksp != null) {\n if (TextUtils.isEmpty(tmVar.kbW)) {\n this.ksp.setVisibility(8);\n } else {\n this.ksp.setText(tmVar.kbW);\n }\n }\n if (this.ksq != null) {\n if (TextUtils.isEmpty(tmVar.kbX)) {\n this.ksq.setVisibility(8);\n } else {\n this.ksq.setText(tmVar.kbX);\n AppMethodBeat.o(88975);\n return;\n }\n }\n }\n AppMethodBeat.o(88975);\n }", "@Override\n\tpublic void addAtBeginning(String data) {\n\t}", "public Builder setK(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n k_ = value;\n onChanged();\n return this;\n }", "static void addGridXml(Element root, Path gridpath, Map<FocalMech, Double> mechMap) {\n GR_Data grDat = GR_Data.create(A, B, M_MIN, M_MAX, D_MAG, 1.0);\n if (gridpath.getFileName().toString().contains(\"-m8\")) {\n grDat.cMag = C_MAG;\n }\n Element settings = addElement(SETTINGS, root);\n Element mfdRef = addElement(DEFAULT_MFDS, settings);\n grDat.appendTo(mfdRef, null);\n addWusSourceProperties(settings, mechMap);\n Element nodesElem = addElement(NODES, root);\n addAttribute(PATH, gridpath.getFileName().toString(), nodesElem);\n }", "public static Bitmap addStrToBitmap(Bitmap src){\r\n\t\tBitmap newb= Bitmap.createBitmap(src.getWidth(), src.getHeight(), Config.ARGB_8888);\r\n Canvas canvas = new Canvas(newb);\r\n canvas.drawBitmap(src, 0, 0, new Paint());\r\n Paint paint = new Paint();\r\n paint.setTextSize(48);\r\n String familyName = \"宋体\";\r\n Typeface font = Typeface.create(familyName,Typeface.NORMAL);\r\n paint.setTypeface(font);\r\n paint.setColor(Color.RED);\r\n paint.setStrokeWidth(3);\r\n paint.setStyle(Paint.Style.STROKE);\r\n\r\n\r\n String timeStr = \"经度:\" + Constants.LongitudeStr + \"\\n 纬度:\" + Constants.LatitudeStr+\"\\n 时间:\"+Constants.getPictureTime;\r\n int strWidth = getStringWidth(paint, timeStr);\r\n int strHeight = getStringHeight(paint, timeStr);\r\n int startX = newb.getWidth() - strWidth;\r\n int startY = newb.getHeight() - strHeight + 36;\r\n canvas.drawText(timeStr, startX, startY, paint);\r\n return newb;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public void speak(String text) throws JavaLayerException {\n\t\ttry {\n \n //Create a JLayer instance\n AdvancedPlayer player = new AdvancedPlayer(synthesizer.getMP3Data(text));\n player.play();\n \n } catch (IOException e) {\n \n }\n\t\t\n\t}", "public Object create(String key_letters) throws XtumlException;", "public void paint(MapCanvas canvas, Point insertPoint) {\n Graphics2D graphics = null;\n if ((this.text != null) && (insertPoint != null) && (canvas != null) && \n ((graphics = canvas.graphics) != null)) {\n Font curFont = graphics.getFont();\n Color curColor = graphics.getColor();\n AffineTransform curTransForm = graphics.getTransform();\n try {\n TextStyle style = this.getTextStyle();\n FontMetrics fontMetrics = this.textFont.setCanvas(canvas);\n int textHeight = fontMetrics.getHeight();\n int x = insertPoint.x;\n int y = insertPoint.y;\n int textWidth = fontMetrics.stringWidth(this.text);\n// if ((style.orientation == TextStyle.Orientation.VerticalDn) || \n// (style.orientation == TextStyle.Orientation.VerticalUp)) {\n// if (style.hAlign == TextStyle.Horizontal.Center) {\n// y -= textWidth/2;\n// } else if (style.hAlign == TextStyle.Horizontal.Right) {\n// y -= textWidth;\n// }\n//\n// if (style.vAlign == TextStyle.Vertical.Middle) {\n// x += textHeight/2;\n// } else if (style.vAlign == TextStyle.Vertical.Top) {\n// x += textHeight;\n// }\n// } else {\n if (style.hAlign == TextStyle.Horizontal.Center) {\n x -= textWidth/2;\n } else if (style.hAlign == TextStyle.Horizontal.Right) {\n x -= textWidth;\n }\n\n if (style.vAlign == TextStyle.Vertical.Middle) {\n y += textHeight/2;\n } else if (style.vAlign == TextStyle.Vertical.Top) {\n y += textHeight;\n }\n //} \n float rotate = style.orientation.rotate;\n if (rotate != 0.0f) {\n AffineTransform transform = new AffineTransform();\n transform.translate(0.0d, 0.0d);\n transform.rotate(rotate, insertPoint.x, insertPoint.y);\n graphics.transform(transform);\n }\n \n graphics.drawString(this.text, x, y - fontMetrics.getDescent());\n } catch (Exception exp) {\n LOGGER.log(Level.WARNING, \"{0}.paint Error:\\n {1}\",\n new Object[]{this.getClass().getSimpleName(), exp.getMessage()});\n } finally {\n if (curFont != null) {\n graphics.setFont(curFont);\n }\n if (curColor != null) {\n graphics.setColor(curColor);\n }\n if (curTransForm != null) {\n graphics.setTransform(curTransForm);\n }\n }\n }\n }", "public String[] getPathToKing() {\n return pathToKing;\n }", "public void putStringData(String key, String value) {\n editor.putString(key, value);\n editor.apply();\n }", "public static void main(String[] args) throws IOException {\n\t\tCsv2kml csv2kml = new Csv2kml();\n//\t\tcsv2kml.convertCSVToKML(\"/Users/shilo/Desktop/testkmlconvert.csv\", \"/Users/shilo/Desktop/\", \"kmltest1\");\t\t\n\t\tSystem.out.println(csv2kml.multiCSV(\"/Users/shilo/Downloads/Ex2/Ex2/data\"));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "default void save() {\n NucleusAPI.getKitService().orElseThrow(() -> new IllegalStateException(\"No Kit module\")).saveKit(this);\n }", "public void plotCoordinatesFromText(String text){\n String[] coords = text.split(\",\");\r\n float lat = Float.parseFloat(coords[1]);\r\n float lng = Float.parseFloat(coords[0]);\r\n float ticks = Float.parseFloat(coords[2]);\r\n\r\n double total = (4400.0 - 0.1707*ticks)/44.00;//computers battery life\r\n int total_ = (int)(total + 0.5);\r\n\r\n VariablesSingleton.getInstance().setBATTERY(Double.toString(total_));\r\n TextView t = (TextView)findViewById(R.id.textView2);\r\n t.setText(VariablesSingleton.getInstance().getBATTERY()+\"%\");//displays battery life\r\n\r\n LatLng pos = new LatLng(lat,lng);//\r\n points.add(pos);//adds the point on the google maps\r\n //BikePath = mMap.addPolyline(new PolylineOptions());\r\n BikePath.setPoints(points);//adds the line connecting the markers\r\n\r\n mMap.addMarker(new MarkerOptions()//displays the marker on google map\r\n .title(\"Position\")\r\n .position(pos)\r\n );\r\n Log.d(TAG,coords[0]);\r\n Log.d(TAG,coords[1]);\r\n }", "private void srediTekst() throws SmartScriptParserException {\n\t\tif (stog.isEmpty()) {\n\t\t\tthrow new SmartScriptParserException(\"Too much 'END's.\");\n\t\t}\n\t\telse {\n\t\t\t((Node) stog.peek()).addChildNode(new TextNode(gradiTekst.toString()));\n\t\t}\n\n\t}", "private void publishfeed(String type,JSONObject jsonRoot) throws JSONException {\n\t\t\tJSONObject jLocation = jsonRoot.getJSONObject(\"weather\").getJSONObject(\"location\");\n\t\t\tJSONObject jCondition = jsonRoot.getJSONObject(\"weather\").getJSONObject(\"condition\");\n\t\t\tString city = jLocation.getString(\"city\");\n\t\t\tString region = jLocation.getString(\"region\");\n\t\t\tString country = jLocation.getString(\"country\");\n\t\t\tString text = jCondition.getString(\"text\");\n\t\t\tString temp = jCondition.getString(\"temp\");\n\t\t\tString unit = jsonRoot.getJSONObject(\"weather\").getJSONObject(\"units\").getString(\"temperature\");\n\t\t\tString feed = jsonRoot.getJSONObject(\"weather\").getString(\"feed\");\n\t\t\tString detail = jsonRoot.getJSONObject(\"weather\").getString(\"link\");\n\t\t\tString imgUrl = \"\";\n\t\t\tString name =\"\";\n\t\t\tString caption = \"\";\n\t\t\tString description = \"\";\n\t\t\t\n\t\t\tif(!region.equals(\"\")){\n\t\t\t\tname = city + \",\" + region + \",\" + country;\n\t\t\t} else{\n\t\t\t\tname = city + \",\" + country;\n\t\t\t}\n\t\t\t\n\t\t\tif(type.equals(\"current\")){\n\t\t\t\tcaption = \"The current condition for \" + city + \"is \" + text;\n\t\t\t\tdescription = \"Temperature is \" + temp + (char) 0x00B0 + unit;\n\t\t\t\timgUrl = jsonRoot.getJSONObject(\"weather\").getString(\"img\");\n\t\t\t} else {\n\t\t\t\tcaption = \"Weather forecast for \" + city;\n\t\t\t\timgUrl = \"http://www-scf.usc.edu/~csci571/2013Fall/hw8/weather.jpg\";\n\t\t\t\tJSONArray jsonForecasts = jsonRoot.getJSONObject(\"weather\").getJSONArray(\"forecast\");\n\t\t\t\tfor(int i = 0; i < jsonForecasts.length(); i++){\n\t\t\t\t\tJSONObject obj = jsonForecasts.getJSONObject(i);\n\t\t\t\t\tdescription += obj.getString(\"day\") + \": \" + obj.getString(\"text\") + \", \" \n\t\t\t\t\t + obj.getString(\"high\") + \"/\" + obj.getString(\"low\") + (char) 0x00B0 + unit + \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tJSONObject property = new JSONObject(); \n\t\t\tproperty.put(\"text\", \"here\"); \n\t\t\tproperty.put(\"href\", detail); \n\t\t\tJSONObject properties = new JSONObject(); \n\t\t\tproperties.put(\"Look at details\", property); \n\t\t\tBundle params = new Bundle();\n\t\t\tparams.putString(\"name\", name);\n\t\t params.putString(\"caption\", caption);\n\t\t params.putString(\"description\", description);\n\t\t params.putString(\"link\", feed);\n\t\t params.putString(\"picture\", imgUrl);\n\t\t params.putString(\"properties\", properties.toString());\n\t\t WebDialog feedDialog = (\n\t\t\t new WebDialog.FeedDialogBuilder(MainActivity.this,\n\t\t\t Session.getActiveSession(),\n\t\t\t params))\n\t\t\t .setOnCompleteListener(new OnCompleteListener() {\n\n\t\t\t @Override\n\t\t\t public void onComplete(Bundle values,\n\t\t\t FacebookException error) {\n\t\t\t if (error == null) {\n\t\t\t // When the story is posted, echo the success\n\t\t\t // and the post Id.\n\t\t\t final String postId = values.getString(\"post_id\");\n\t\t\t if (postId != null) {\n\t\t\t Toast.makeText(MainActivity.this,\n\t\t\t \"Posted story, id: \"+postId,\n\t\t\t Toast.LENGTH_SHORT).show();\n\t\t\t } else {\n\t\t\t // User clicked the Cancel button\n\t\t\t Toast.makeText(MainActivity.this.getApplicationContext(), \n\t\t\t \"Publish cancelled\", \n\t\t\t Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t\t } else if (error instanceof FacebookOperationCanceledException) {\n\t\t\t // User clicked the \"x\" button\n\t\t\t Toast.makeText(MainActivity.this.getApplicationContext(), \n\t\t\t \"Publish cancelled\", \n\t\t\t Toast.LENGTH_SHORT).show();\n\t\t\t } else {\n\t\t\t // Generic, ex: network error\n\t\t\t Toast.makeText(MainActivity.this.getApplicationContext(), \n\t\t\t \"Error posting story\", \n\t\t\t Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t\t }\n\n\t\t\t })\n\t\t\t .build();\n\t\t\t feedDialog.show();\n\n\t\t}", "public String aan() {\n AppMethodBeat.i(54302);\n if (this.kum == null) {\n this.kum = o.ahl().c(this.kua.field_imgPath, false, false);\n if (!(bo.isNullOrNil(this.kum) || this.kum.endsWith(\"hd\") || !e.ct(this.kum + \"hd\"))) {\n this.kum += \"hd\";\n }\n }\n String str = this.kum;\n AppMethodBeat.o(54302);\n return str;\n }", "public void insert(String word, Point point)\r\n\t{\r\n\t\t//call insert\r\n\t\troot.insert(new Data(word, point));\r\n\t}", "private void paintHotspotName(Graphics g, String name, int attPoint) {\n point = getPoint(attPoint);\n int[] maxWH = new int[2];\n int x = point[0] + currMatrixX + transformCoordenate(mapPos, X_COORD);\n int y = point[1] + currMatrixY + transformCoordenate(mapPos, Y_COORD);\n maxWH = Utils.getWrappedTextWidthHeigh(name, FCanvas.bigFont,\n x, FCanvas.canvasWidth, false, null, y);\n //draw a point attached to name\n g.setColor(Utils.COLOR_TANGO_BUTTER1);\n g.fillRoundRect(x - 6, y - 6, 12, 12, 6, 6);\n g.setColor(Utils.COLOR_TANGO_SCARLETRED1);\n g.fillRoundRect(x - 3, y - 3, 6, 6, 3, 3);\n //check canvas limits and recalculate if needed\n if (FCanvas.canvasWidth < x + maxWH[0]) {\n x = x - maxWH[0];\n maxWH = Utils.getWrappedTextWidthHeigh(name, FCanvas.bigFont,\n x, FCanvas.canvasWidth, false, null, y);\n }\n if (FCanvas.canvasHeight < y + maxWH[1]) {\n y = y - maxWH[1];\n maxWH = Utils.getWrappedTextWidthHeigh(name, FCanvas.bigFont,\n x, FCanvas.canvasWidth, false, null, y);\n }\n g.setColor(Utils.COLOR_TANGO_SKYBLUE1);\n g.fillRoundRect(x - 3, y - 3, maxWH[0] + 3, maxWH[1] + 3, 3, 3);\n //Utils.fillRoundRect(g, x - 3, y - 3, maxWH[0] + 3, maxWH[1] + 3, Utils.COLOR_TANGO_SKYBLUE1, 0xAA);\n g.setColor(Utils.COLOR_TANGO_ALUMINIUM1);\n Utils.getWrappedTextWidthHeigh(name, FCanvas.bigFont,\n x, FCanvas.canvasWidth, true, g, y);\n }", "@Override\r\n\tpublic void exportShape()\r\n\t{\r\n\t\tMWC.Utilities.ReaderWriter.ImportManager\r\n\t\t\t\t.exportThis(\";;Layer: \" + getName());\r\n\r\n\t\tEditable pl = this;\r\n\t\tif (pl instanceof Exportable)\r\n\t\t{\r\n\t\t\tExportable e = (Exportable) pl;\r\n\t\t\te.exportThis();\r\n\t\t}\r\n\t}", "public void setXkjg(String xkjg) {\n\t\tthis.xkjg = xkjg;\n\t}", "private void addGeoData(String key, double lat, double lon)\n {\n String type=\"\";\n if(mType=='E')\n type=\"Events/\";\n else if(mType=='G')\n type=\"Groups/\";\n\n DatabaseReference placeRef= database.getReference(type+mEntityID+\"/places\");\n GeoFire geoFire= new GeoFire(placeRef);\n geoFire.setLocation(key,new GeoLocation(lat,lon));\n\n }", "public void run() {\n String line = finalArg.toString();\n\n String separate = line, text=\"\";\n boolean isEmoji = false;\n String[] words = separate.split(\" \");\n for (int i = 0; i < words.length; i++) {\n if (words[i].equals(\"Ω:v\") || words[i].equals(\":3\") || words[i].equals(\":)\") || words[i].equals(\":(\") || words[i].equals(\"o.O\") || words[i].equals(\":poop:\")\n || words[i].equals(\"(^^^)\") || words[i].equals(\"-_-\") || words[i].equals(\"<(')\") || words[i].equals(\"><\") || words[i].equals(\":kiss:\") || words[i].equals(\"(y)\")\n || words[i].equals(\":love:\") || words[i].equals(\"<3\") || words[i].equals(\":crysmiley:\") || words[i].equals(\":nervous:\")\n ) {\n isEmoji = true;\n text = words[i];\n words[i] = \"\";\n }\n }\n String ans = \"\";\n for (String i : words) {\n ans += (i + \" \");\n }\n// textPane.setFont(new java.awt.Font(\"Arial\", Font.PLAIN, 15));\n if (line.startsWith(\"Tôi:\")) {\n addColoredText(textPane, ans, Color.BLACK);\n } else if (ans.startsWith(\"***\") || ans.startsWith(\"Welcome\") || ans.startsWith(\"To\")) {\n addColoredText(textPane, ans, Color.red);\n } else {\n addColoredText(textPane, ans, Color.BLUE);\n new Notifications();\n }\n\n if (isEmoji) {\n try {\n addIcon(textPane, text);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n addColoredText(textPane, \"\\n\", Color.red);\n\n }", "public void addMarkerToPref(Marker marker){\n parseClient.pushFavLoc(marker);\n latLngs.add(marker.getPosition());\n locationNames.add(marker.getTitle());\n saveMarkerPrefs();\n }", "JZML getJZML();", "stockFilePT102.StockDocument.Stock addNewStock();", "public String generateNewick() \n { \n \n String newick = new String();\n\n if (type.equals(\"internal\")){\n newick = \"(\";\n }\n \n if (!name.equals(\"\")){\n newick = newick + name;\n }\n \n if (!children.isEmpty()){ //if there are children in this node's arraylist\n Iterator it = children.iterator();\n while(it.hasNext()){\n Node child = (Node) it.next();\n newick = newick + child.generateNewick();\n if(it.hasNext()){\n newick = newick + \",\";\n }\n }\n }\n if (type.equals(\"internal\")){\n newick = newick + \")\";\n }\n if (length >0){\n newick = newick + \":\" + length;\n }\n \n return newick;\n }", "@Override\n\t\t\t\t\tpublic void sendMessage(String message) {\n\t\t\t\t\t\tString toSend = \"<append><topic>\" + xmlData.get(\"topic\") +\"</topic><user>\" + username + \"</user><msg>\" + message + \"</msg></append>\";\n\t\t\t\t\t\tsendData(toSend);\n\t\t\t\t\t}", "@Override\n public void setTraining(String s) {\n this.myText = s.trim();\n buildMap();\n }", "private void addCustomWords() {\r\n\r\n }", "public void setKP(java.lang.String KP) {\n this.KP = KP;\n }", "public void setKm(String km) {\n this.km = km == null ? null : km.trim();\n }" ]
[ "0.6666689", "0.66241044", "0.5862682", "0.5174357", "0.51199013", "0.51153874", "0.50224155", "0.49687177", "0.49236733", "0.4804317", "0.4787901", "0.47474366", "0.47358435", "0.46344", "0.46247986", "0.46128404", "0.459715", "0.45808676", "0.45774013", "0.45472544", "0.44921267", "0.4480697", "0.44685096", "0.44610295", "0.44483373", "0.4430348", "0.44194847", "0.44082025", "0.43943554", "0.43790206", "0.43663648", "0.43420744", "0.43387467", "0.4338609", "0.43312165", "0.43145153", "0.430288", "0.42958927", "0.4291971", "0.4286612", "0.42861155", "0.42839682", "0.42739964", "0.42717418", "0.42592597", "0.4257515", "0.42519686", "0.4244269", "0.42428118", "0.4240049", "0.42344183", "0.4233065", "0.42305607", "0.4219366", "0.42121723", "0.42089885", "0.42082906", "0.420496", "0.42030105", "0.42012253", "0.41994968", "0.41971764", "0.4195044", "0.41945085", "0.4192073", "0.41887668", "0.41873133", "0.41840607", "0.4182809", "0.41783813", "0.41765064", "0.4172547", "0.4170607", "0.41670483", "0.41633296", "0.4155022", "0.41539288", "0.41539115", "0.4151021", "0.4150342", "0.4149637", "0.41492882", "0.41481152", "0.41364148", "0.4135532", "0.41349408", "0.41345212", "0.4133918", "0.41287404", "0.41280934", "0.41263306", "0.41262007", "0.41235238", "0.41228247", "0.41221398", "0.41211644", "0.4121048", "0.41203415", "0.41159955", "0.41151217" ]
0.56670123
3
/ Information about the games relation to myself or everyone.
public static void yourResults() { String[] options = {"In relation to myself", "In relation to everyone"}; Object panel = JOptionPane.showInputDialog(null, " I want to see where I am stand", "Message", JOptionPane.INFORMATION_MESSAGE, null, options, options[0]); if (panel == "In relation to myself") { String forID = ""; int ID; forID = JOptionPane.showInputDialog(null, " What is your ID ?"); try { ID = Integer.parseInt(forID); String forPrintAns = ""; Class.forName("com.mysql.jdbc.Driver"); Connection connect = DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcUserPassword); Statement statement = connect.createStatement(); String query = "SELECT * FROM Logs WHERE UserID =" + ID + " ORDER BY levelID , moves;"; ResultSet result = statement.executeQuery(query); //my level now while (result.next()) { forPrintAns += result.getInt("UserID") + "," + result.getInt("levelID") + "," + result.getInt("moves") + "," + result.getInt("score")+"E"; } String forPrintRusults = ""; String[] arr; int numOfGames = 0; int level = 0; int moves = -1; int grade = 0; boolean flag=false; int maxGrade=Integer.MIN_VALUE; int saveMove=0; String for1="",for3="",for5="",for9="",for11="",for13="",for16="",for20="",for19="",for23=""; int index = 3; for (int i = 0; i < forPrintAns.length(); i++) { if (forPrintAns.charAt(i) == 'E') { numOfGames++; String help = forPrintAns.substring(index, i); index = i; arr = help.split(","); // System.out.println(Arrays.deepToString(arr)); switch(level) { case 0: if (grade >= 125 && moves <= 290) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } forPrintRusults= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 1: if (grade >= 436&& moves <= 580) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for1= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 3: if (grade >= 713&& moves <= 580) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for3= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 5: if (grade >= 570&& moves <= 500) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for5= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 9: if (grade >= 480&& moves <= 580) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for9= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 11: if (grade >= 1050&& moves <= 580) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for11= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 13: if (grade >= 310&& moves <= 580) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for13= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 16: if (grade >= 235&& moves <= 290) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for16= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 19: if (grade >= 250&& moves <= 580) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for19= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 20: if (grade >= 200&& moves <= 290) { if(flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=false; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for20= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; case 23: if (grade >= 1000&& moves <= 1140) { if(!flag) { maxGrade=Integer.MIN_VALUE; saveMove=0; flag=true; } if(maxGrade<grade) { maxGrade=grade; saveMove=moves; } for23= "Level: " + level + " moves: " + saveMove + " Grade: " + maxGrade + "\n"; } break; } level = Integer.parseInt(arr[1]); moves = Integer.parseInt(arr[2]); grade = Integer.parseInt(arr[3]); } } forPrintRusults +="\n"+for1+"\n"+for3+"\n"+for5+"\n"+for9+"\n"+for11+"\n"+for13+"\n"+for16+"\n"+for20+"\n"+for19+"\n"+for23+"\n"; forPrintRusults += "your level is " + level + " and so far you played " + numOfGames + " games."; JOptionPane.showMessageDialog(null, forPrintRusults); result.close(); statement.close(); connect.close(); } catch (SQLException e) { e.getMessage(); e.getErrorCode(); } catch (ClassNotFoundException e) { e.printStackTrace(); } } if (panel == "In relation to everyone") { String forPrintAns = ""; String StringID = JOptionPane.showInputDialog(null, "What is your ID ? "); try { int NumberID = Integer.parseInt(StringID); Connection connect =DriverManager.getConnection(jdbcUrl, jdbcUser, jdbcUserPassword); Statement statement = connect.createStatement(); String query = "SELECT * FROM Logs ORDER BY levelID , score;"; ResultSet result = statement.executeQuery(query); int myPlace = 1; int level = 0; int grade = 0; String forPrintRusults = ""; List<String> IDList = new ArrayList<>(); while (result.next()) { forPrintAns += ("Id: " + result.getInt("UserID") + "," + result.getInt("levelID") + "," + result.getInt("score") + "," + result.getDate("time") + "E"); } int index = 0; boolean weCanPrint = false; boolean notExistID = true; for (int i = 0; i < forPrintAns.length(); i++) { if (forPrintAns.charAt(i) == 'E') { notExistID = true; String help = forPrintAns.substring(index, i); index = i; String[] arr = help.split(","); for (int j = 0; j < IDList.size(); j++) { if (IDList.get(j).equals(arr[0])) //return id notExistID = false; } if (notExistID) { IDList.add(arr[0]); myPlace++; } if (Integer.parseInt(arr[1]) != level && weCanPrint) //we finished to check this level { forPrintRusults += "Level: " + level + " Grade: " + grade + " your Place is:" + myPlace + "\n"; myPlace = 1; level = Integer.parseInt(arr[1]); weCanPrint = false; IDList.clear(); } if (arr[0].contains("" + NumberID)) //the id it's my id { level = Integer.parseInt(arr[1]); weCanPrint = true; grade = Integer.parseInt(arr[2]); myPlace = 1; IDList.clear(); } } } JOptionPane.showMessageDialog(null, forPrintRusults); } catch (SQLException e) { e.getMessage(); e.getErrorCode(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getBelongToPlayer();", "@Override\n\tpublic GameInfo getGameInfo() {\n\t\treturn gameInfo;\n\t}", "public GameInfoDetails(Game g) {\n\t\tthis.matches = g.getNumberOfGames();\n\t\tfor(Player p: g.getPlayers()) {\n\t\t\tplayerWins.add(new GameInfoPlayer(p));\n\t\t}\n\t}", "public void printPersonStats(String fullName)\n\t{\n\t\tSystem.out.println(\"\\n\"+fullName);\n\t\t\n\t\t//assuming person exists in graph\n\t\tfor(String relationship: personMap.get(fullName).inRelationships.keySet())\n\t\t\tSystem.out.println(\"-\"+relationship+\" to \"+personMap.get(fullName).inRelationships.get(relationship));\n\t\t\n\t\tfor(String relationship: personMap.get(fullName).outRelationships.keySet())\n\t\t\tSystem.out.println(\"-\"+personMap.get(fullName).outRelationships.get(relationship)+\" is the \"+relationship);\n\t}", "public String toString(){\n return name + \"|Pop: \" + pop + \"|Gdp: \" +gdp + \"|Social: \" +social + \"|Living: \" + living;\n }", "public Integer getgOtherPeople() {\n return gOtherPeople;\n }", "public String getTurnInfo(){\n if(gameState == GAME_STATE.CREATED){\n return \"Game has not been started!\";\n }\n\n String currentPlayerName;\n\n if( currentPlayerTurn == 1 ){\n currentPlayerName = player1Name;\n }else{\n currentPlayerName = player2Name;\n }\n\n StringBuilder reply = new StringBuilder();\n if( gameState == GAME_STATE.WIN ){\n reply.append(\"Game has ended \")\n .append(currentPlayerName)\n .append(\" wins!\");\n }\n else if(gameState == GAME_STATE.DRAW){\n reply.append(\"Game has ended in a draw\");\n }else{\n reply.append(\"<@\")\n .append(currentPlayerName)\n .append(\"> it is your turn to play\");\n }\n return reply.toString();\n }", "public String getGamesJson() {\n return new GsonBuilder().serializeNulls().create().toJson(new UserGamesJson(this));\n }", "public void printByUser() {\r\n TUseStatus useStatus;\r\n\t for (int a=0; a < m_current_resources_count; a++)\r\n\t for (int b=0; b < m_current_users_count; b++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }", "public String getWhoseTurnDesc() {\n if (gameStatus == null || userId == null) return \"\";\n return userId.equals(gameStatus.getActivePlayer()) ? \"MY TURN\" : \"OPPONENT'S TURN\";\n }", "public String getOpponentName() {\n return opponentName;\n }", "public HashMap<String, Game> getGames() {\n return games;\n }", "public HashMap<String, Game> getGames() {\n return games;\n }", "public void displayRelation() {\n System.out.print(this.name + \"(\");\n for (int i = 0; i < attributes.size(); i++) {\n System.out.print(attributes.get(i) + \":\" + domains.get(i));\n // Don't add a comma on the last key, value pair\n if (i < attributes.size() - 1)\n System.out.print(\",\");\n\n }\n System.out.print(\")\");\n System.out.print(\"\\nNumber of Tuples: \" + table.size() + \"\\n\");\n for (Tuple t : table)\n System.out.println(t);\n\n }", "public String getStatsOfGames(){\n\n String res = \"\";\n\n if (games.size() <= 0){\n return \"No game registered in tournament\";\n }\n\n for(int num=0; num<games.size(); num++)\n {\n SoccerGames game = games.get(num);\n res += \"Game Id: \" + game.getGameId() + \" \"+ game.getHostTeam().getName() + \": \" + game.goalsScored +\n \" VS \" + game.getOpponentTeam().getName() + \": \" + game.concededGoal;\n\n }\n return res;\n }", "public Rogue getRogue() {\n return (gameRoomBelongsTo);\n }", "public GameInfo(Game game) {\n gameState = game.getGameState();\n activeCategory = game.getActiveCategory();\n round = game.getRound();\n humanRoundsWon = game.getHumanWonRounds();\n numDraws = game.getNumDraws();\n\n if (game.getActivePlayer() != null) {\n activePlayerName = game.getActivePlayer().getName();\n activePlayerHuman = game.getActivePlayer().getIsHuman();\n } else {\n activePlayerName = null;\n activePlayerHuman = null;\n }\n\n if (game.getRoundWinner() != null) {\n roundWinnerName = game.getRoundWinner().getName();\n } else {\n roundWinnerName = null;\n }\n\n if (game.getGameWinner() != null) {\n gameWinnerName = game.getGameWinner().getName();\n } else {\n gameWinnerName = null;\n }\n\n if (game.getGameWinner() != null) {\n winnerHuman = game.getGameWinner().getIsHuman();\n } else {\n winnerHuman = null;\n }\n\n\n\n topCards = getTopCards(game);\n playerNames = getPlayerNames(game);\n topCardTitles = getTopCardTitles(game);\n deck = getDeck(game);\n Player humanPlayer = getHumanPlayer(game);\n numOfCardsLeft = getNumOfCards(game);\n\n\n // Determine number of cards in human's deck\n //, the size of the communal pile and the top \n // most card\n if (humanPlayer != null && humanPlayer.getHand() != null) {\n numHumanCards = humanPlayer.getHand().size();\n } else {\n numHumanCards = null;\n }\n \n if (deck.size() > 0) {\n numOfCommunalCards = deck.size();\n } else {\n numOfCommunalCards = 0;\n }\n\n if (humanPlayer != null && humanPlayer.getTopMostCard() != null) {\n humanTopCardTitle = humanPlayer.getTopMostCard().getName();\n cardCategories = humanPlayer.getTopMostCard().getCardProperties();\n } else {\n humanTopCardTitle = null;\n cardCategories = null;\n }\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Title of Game: \" + super.getTitleOfGame()\n\t\t\t\t+ \"\\nPublisher: \" + super.getPublisher()\n\t\t\t\t+ \"\\nDeveloper: \" + super.getDeveloper()\n\t\t\t\t+ \"\\nDirector: \" + super.getDirector()\n\t\t\t\t+ \"\\nProducer: \" + super.getProducer()\n\t\t\t\t+ \"\\nComposer: \" + super.getComposer();\t\n\t}", "public String currentGamePrint(Game gam){\n\t\tString data = String.format(\"Game ID: %-25s \\t Official: %s \", gam.getGameID(), gam.getOfficial().getName());\n\t\treturn data;\n\t}", "People getUser();", "public void sendGameInfo(Player plr){\r\n\t\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\tsendOnePlayer(plr, message);\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nMatchID: \"+gameType+\"00\"+matchNum+\"\\n\"\n\t\t\t\t+\"Referee: \"+staff+\"\\n\"\n\t\t\t\t+\"Participator 1: \"+part1 +\" result: \"+result1+\"s\\n\"\n\t\t\t\t+\"Participator 2: \"+part2 +\" result: \"+result2+\"s\\n\"\n\t\t\t\t+\"Participator 3: \"+part3 +\" result: \"+result3+\"s\\n\"\n\t\t\t\t+\"Participator 4: \"+part4 +\" result: \"+result4+\"s\\n\"\n\t\t\t\t+\"Participator 5: \"+part5 +\" result: \"+result5+\"s\\n\"\n\t\t\t\t+\"Participator 6: \"+part6 +\" result: \"+result6+\"s\\n\"\n\t\t\t\t+\"Participator 7: \"+part7 +\" result: \"+result7+\"s\\n\"\n\t\t\t\t+\"Participator 8: \"+part8 +\" result: \"+result8+\"s\\n\\n\";\n\t}", "public void logGameWinner(Player p){\n\t\t\n\t\tif(p instanceof HumanPlayer) {\n\t\t\tlog += String.format(\"%nUSER WINS GAME\");\n\t\t\twinName =\"Human\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s WINS GAME\", ai.getName().toUpperCase());\n\t\t\twinName = ai.getName();\n\t\t}\n\t\tlineBreak();\n\t}", "public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public String toString() {\r\n return \"\\n\\nTrainer: \"+ name + \", Wins: \" + win + \", team:\" + team;\r\n }", "public static ExecutionResult lookupAllegianceRelationship(Universe universe, Node person, Node allegiance) {\n ExecutionEngine engine = new ExecutionEngine(universe.getGraphDb());\n String query = \"START p=node(\" + person.getId() + \"), a=node(\" + allegiance.getId() + \") MATCH (p)-[r:\" + RelationshipTypes.DEVOTED_TO + \"]->(a) RETURN a.name\";\n return engine.execute(query);\n }", "public String get_relation() {\n\t\treturn relation;\n\t}", "public String printRecord() {\n int win = 0;\n int total = gameList.size();\n for (Game g : gameList) {\n if (g.isWinner(this)) {\n win++;\n }\n }\n return \"(\" + win + \"-\" + (total - win) + \")\";\n }", "@Test\r\n public void lookProfileByOwner() {\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n\r\n // Our member looked at his own profile\r\n member.lookedBy(member);\r\n \r\n // Still no activity for member\r\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n }", "public LinkedList<SoccerGames> getGames() {\n return this.games;\n }", "public Game getGame()\n\t{\n\t\treturn game;\n\t}", "public Game getGame () {\n return game;\n }", "public String getGameName() {\n return gameName;\n }", "public Game getGame()\n {\n return game;\n }", "public Game getGame() {\r\n\t\treturn _game;\r\n\t}", "public Game getGame() {\n\t\treturn gbuilder.getGameProduct();\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\treturn belong+\"-\"+name;\n\t}", "public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}", "protected Game getGame(){\n\t\treturn game;\n\t}", "public GameLogic getGame(){\n\t\treturn game;\n\t}", "@Override\r\n\tpublic void showClassmate() {\n\t\tSystem.out.println(\"你的同学有: \"+classmateRelations);\r\n\t}", "@Nullable\n public RelationInfo relation() {\n return relation;\n }", "@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();", "Participant getOwner();", "public Game getGame() {\n\t\treturn game;\n\t}", "java.lang.String getGameName();", "java.lang.String getGameName();", "private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \n }", "public Game getGame() {\r\n return game;\r\n }", "public Game getGame() {\n return game;\n }", "public Game getGame() {\n return game;\n }", "public Game getGame() {\n return game;\n }", "public Game getGame() {\n return game;\n }", "String getHandOwner();", "@Override\n\tpublic String toString()\n\t{\n\t\treturn String.format(\"[LU-GOV lu=%s governor=%s]\", first, second);\n\t}", "@Override\n public String toString() {\n newPlayer.addPoints(players[0].getPoints());\n WarPlayer winner = players[mostNumOfCards(players)];\n\n if (winner.getPoints() == players[0].getPoints())\n return \"YOU WON!!! With a score of \" + players[0].getPoints();\n return \"Player\" + mostNumOfCards(players) + \" won!!! With a score of \" + winner.getPoints();\n }", "public String toString () {\n return team1 + \" vs. \" + team2 + \": \" + score1 + \" to \" + score2;\n }", "public int getWinRecord()\n {\n return gamesWon;\n }", "public String getDisplayName() {\n return chatRoom.getName();\n }", "public BowlingGame getGame();", "@Override\r\n\tpublic String getGameName() {\n\t\treturn null;\r\n\t}", "interface Game {\n\n // Bank\n String TRANSACTION = \"transaction\";\n\n // Lobby\n String POKE = \"poke\";\n String MEMBER_READY = \"member_ready\";\n }", "static String showPlayerGemsAndPokeballs()\n {\n return \"\\nYou have \" + Player.current.gems + \" gems and \" + Player.current.pokeballs + \" pokeball(s).\\n\";\n }", "public interface League {\n String getIdLeague();\n String getNameLeague();\n String getLogoLeague();\n}", "public String getDetails() {\n\t\tString res = \"\";\n\t\t\n\t\t// -add heading to results String\n\t\tres += \"Scores for game: \" + gameName + \"\\n\";\n\t\t\n\t\t// -does a topScore exist?\n\t\tif ( topScore != -1) {\n\t\t\t\t// -add topScore to results String\n\t\t\tres += \"1st\\t\" + topScore + \"\\t\" + topScorerName + \"\\n\";\n\t\t\t\t// -does a secondScore exist?\n\t\t\tif ( secondScore != -1) {\n\t\t\t\t\t\t// - add secondScore to results String\n\t\t\t\tres += \"2nd\\t\" + secondScore + \"\\t\" + secondScorerName + \"\\n\";\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t// -otherwise \n\t\t\t\t// - add \"Game has not been played.\" to results String\n\t\t\tres += \"Game not played.\\n\";\n\t\t\n\t\t}\n\t\t// return results String\n\t\treturn res;\n\t}", "public void print()\n\t{\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t\tSystem.out.println(\"[Lives: \" + lives + \"][Score: \" + score + \n\t\t\t\t\t\t\t\"][Time: \" + gameTime + \"]\");\n\t\t\tSystem.out.println(\"*********************Player Info*******************************\");\n\t\t}else\n\t\t\tSystem.out.println(\"Spawn a player ship to view game info\");\n\t}", "public String toString () {\r\n\t\treturn (\"\\nName: \" + this.getName()\r\n\t\t\t\t+\"\\nNationality: \" + this.getCountryName()\t\t\r\n\t\t\t\t+\"\\nAge: \"+ this.dob.playerAge() +\" years old \"+ this.getDob() \r\n\t\t\t\t+\"\\nCurrent team:\" + this.getClubName() \r\n\t\t\t\t+\"\\nPosition: Forward\" \r\n\t\t\t\t+\"\\nGames Played: \" + this.getGamesPlayed()\r\n\t\t\t +\"\\nGoals Scored: \" + this.getGoalsScored()\r\n\t\t +\"\\nGoals Assisted: \" + this.getNumAssists ()\r\n\t\t +\"\\nGoals Shot on Target: \" + this.getShotsOnTarget ()\r\n\t\t\t +\"\\nCautions:\"\r\n\t\t\t\t+\"\\nYellow Cards: \" + this.getNumYellowCards()\r\n\t\t\t\t+\"\\nRed Cards: \" + this.getNumRedCards()\r\n\t\t );\r\n\r\n\t\t}", "int getAchieveInfoCount();", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "CharacterEntity getOpponent() {\n return opponent;\n }", "void findOpponent() {\n\t\tif(gameHelper == null){return;}\n\t\tif (gameHelper.isSignedIn()) {\n\t\t\tIntent intent = Games.TurnBasedMultiplayer\n\t\t\t\t\t.getSelectOpponentsIntent(gameHelper.getApiClient(), 1, 1);\n\t\t\tstartActivityForResult(intent, RC_SELECT_PLAYERS);\n\t\t} else if (gameHelper.isConnecting()) {\n\t\t\tToast.makeText(getActivity(), R.string.wait_connecting_to_google,\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "public String getActiveGame() {\n return myActiveGame;\n }", "public String getScoreboardName() {\n/* 1999 */ return getGameProfile().getName();\n/* */ }", "public String toString()\n {\n return \"Player's name: \" + playersName + \". Player's current score: \" + currentScore;\n }", "void opponentInRoom();", "public GPerson getPerson() {\r\n\t\treturn person;\r\n\t}", "public GameSummary(final com.google.gson.JsonObject infoFromServer) {\n\n data = infoFromServer;\n\n id = data.get(\"id\").getAsString();\n mode = data.get(\"mode\").getAsString();\n owner = data.get(\"owner\").getAsString();\n players = data.get(\"players\").getAsJsonArray();\n\n }", "public int getGameSituation() {\n\t\treturn gameSituation;\n\t}", "protected Game getGame() {\n return game;\n }", "public void printWorld()\n\t{\n\t\tSystem.out.println(\"***********************World Info*************************\");\n\t\tfor(int i = 0; i<gameObj.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < gameObj[i].size(); j++)\n\t\t\t\tSystem.out.println(gameObj[i].get(j).toString());\n\t\t}\n\t\tSystem.out.println(\"***********************World Info*************************\");\n\t}", "public String getGameName() {\n\t\treturn gameName;\n\t}", "public boolean getHaveGame()\n\t{\n\t\treturn this.haveGame;\n\t}", "@Override\r\n public String toString()\r\n {\r\n //Returns String representation of this Player object\r\n return (\"Player: \" + username + \" is a \" + title + \" ranked \" + rank\r\n + \", has completed \" + gamesCompleted \r\n + \" with a fastest time of \" + fastestTime + \", and an average time of \" + averageTime\r\n + \" currently completing a game: \" + isCompletingGame);\r\n }", "public void printPlayerStatus() {\n System.out.println(getName() + \" owns \" +\n getOwnedCountries().size() + \" countries and \"\n + getArmyCount() + \" armies.\");\n\n String ownedCountries = \"\";\n for (Country c : getOwnedCountries())\n {\n ownedCountries += c.getCountryName().name() + \": \" + c.getArmyOccupied() + \"\\n\";\n }\n System.out.println (ownedCountries);\n }", "public String getGameId() {\n return gameId;\n }", "public String getGameId() {\n return gameId;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"(relation \" +\n\t\t\t\t(this.source != null ? this.source.getId() : \"nil\") + \" \" +\n\t\t\t\tthis.name.toString() + \" \" +\n\t\t\t\t(this.dest != null ? this.dest.toString() : \"nil\") + \")\";\n\t}", "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "Relations getGroupOfRelations();", "public Player getOpponent() {\n\t\treturn opponent;\n\t}", "public String[] getRelations() {\n/* 270 */ return getStringArray(\"relation\");\n/* */ }", "public String getHomeTeam();", "@Override\n public String toString() {\n return \"RelatedOrg {\"\n + \"}\";\n }", "public int getGameID() {\n return GameID;\n }", "public String[][] getGame() {\n return game;\n }", "public HashMap<Integer, CheckersGame> getCurrentGames() {\n HashMap<Integer, CheckersGame> currentGames = new HashMap<>();\n Iterator<Map.Entry<Integer, CheckersGame>> cgit = games.entrySet().iterator();\n\n while (cgit.hasNext()) {\n Map.Entry<Integer, CheckersGame> entry = cgit.next();\n\n // Remove entry if key is null or equals 0.\n if (!entry.getValue().isGameOver()) {\n currentGames.put(entry.getKey(), entry.getValue());\n }\n }\n return currentGames;\n }", "private GUIGameInfo() {\n this.board = new GUIBoard();\n this.logic = new regLogic();\n this.players = new Player[2];\n this.players[0] = new Player(Symbol.BLACK);\n this.players[1] = new Player(Symbol.WHITE);\n this.guiPlayers = new GUIPlayer[2];\n this.guiPlayers[0] = new GUIPlayer(this.players[0]);\n this.guiPlayers[1] = new GUIPlayer(this.players[1]);\n\n }", "public String getRelation() {\n return relation;\n }", "public void printByResource() {\r\n TUseStatus useStatus;\r\n\t for (int b=0; b < m_current_users_count; b++)\r\n\t for (int a=0; a < m_current_resources_count; a++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }", "public void look() \n {\n System.out.println(currentRoom.getLongDescription());\n }", "public String toString() {\r\n\t\treturn officialID + \", \" + officialName;\r\n\t}" ]
[ "0.5688174", "0.5671722", "0.56358075", "0.5509267", "0.5434052", "0.5414866", "0.53759646", "0.53555536", "0.53349924", "0.5325674", "0.53237337", "0.5285799", "0.5285799", "0.5284006", "0.52696276", "0.52679336", "0.52674145", "0.5243686", "0.5145167", "0.5142306", "0.51371133", "0.5126425", "0.51249063", "0.5121444", "0.5111518", "0.5079577", "0.50742316", "0.5072944", "0.5065788", "0.5064842", "0.50617844", "0.5044547", "0.5041065", "0.503842", "0.5035956", "0.5035012", "0.50225383", "0.50137675", "0.50131315", "0.50110286", "0.500587", "0.50050646", "0.4994916", "0.49943295", "0.49934086", "0.49921972", "0.49921972", "0.49882737", "0.49861696", "0.4974397", "0.4974397", "0.4974397", "0.4974397", "0.49687287", "0.49632746", "0.4962318", "0.4962143", "0.49566218", "0.49538854", "0.49465746", "0.49417585", "0.4938111", "0.49345478", "0.49335533", "0.49324173", "0.4923167", "0.49183825", "0.4916804", "0.49117172", "0.49115604", "0.4911128", "0.49075806", "0.49073172", "0.49058518", "0.4903724", "0.48957333", "0.4882191", "0.48763248", "0.48749155", "0.4868796", "0.48683962", "0.4867026", "0.48669493", "0.48662218", "0.48588717", "0.48588717", "0.48562452", "0.48551404", "0.48516002", "0.48504078", "0.48457304", "0.48409578", "0.48383135", "0.4836924", "0.48311678", "0.48266372", "0.48203346", "0.4819723", "0.48103133", "0.48100808", "0.48088297" ]
0.0
-1
Function to show a message,
private void showMessage(String TStr, String CStr) { Alert alert = new Alert(AlertType.INFORMATION); alert.setTitle(TStr); alert.setHeaderText(null); alert.setContentText(CStr); alert.showAndWait(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showMessage(String message);", "public void showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "@Override\n\tpublic void showMessage(String message) {\n\n\t}", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "private void showMessage(String string) {\n\n }", "public void showMessage(){\n\t jsfMessageHelper.addInfo(\"Mesaj:\", (messageTxt==null?\"?\":messageTxt));\r\n\t}", "public static void displayMsg() {\n\t}", "public void DisplayMessage(String massage);", "void displayMessage(String message);", "private void displayMessage(String message) {\n }", "public void showMsg(String str);", "public void ShowMessage() {\n\t\tthis.ShowMessage(null);\n\t\t\n\t\t/* Exit function. */\n\t\treturn;\n\t}", "public void displayMessage(){\n //getCouseName obtém o nome do curso\n System.out.printf(\"Welcome to the grade book for \\n%s!\\n\\n\", getCouseName());\n }", "static void giveInfo(String message){\n JOptionPane.showMessageDialog(null, message);\n }", "private void display(String msg) {\n cg.append(msg + \"\\n\");\n }", "void showSuccess(String message);", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "public void displayMessage(String message) {\n gameWindowController.showMessage(message);\n }", "@HippyMethod(name = \"show\")\n\tpublic void show(String message)\n\t{\n\t\tLogUtils.d(CLASSNAME, message);\n\t\t// Toast.makeText(hippyRootView.getContext(), message, Toast.LENGTH_SHORT).show();\n\t}", "public static void message() {\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, \"Thanks for your participation\" + \"\\nHave a great day!\");\r\n\t\t\r\n\t\t\r\n\t}", "private void showMessageOnScreen(String message) {\n JOptionPane.showMessageDialog(this, message);\n }", "void showError(String message);", "void showError(String message);", "public void displayMessage(String m){\n\t\tJOptionPane.showMessageDialog(null, m, \"Perfect !\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "public void showMessage(int x, int y, String message) {\n }", "private void displayMessage(String info) {\n \tif (message == null) {\n \t\tsetupMessage();\n \t}\n \tmessage.setLabel(info);\n\t\tadd(message, 6, 15);\n }", "public void showMessage(){\r\n if(message == null) return;\r\n JOptionPane.showMessageDialog(new JFrame(), message);\r\n }", "void msgDisplay(String s);", "public void showMessage(String message) {\n\t\tMessagebox.show(message);\n\t}", "private void displayMessage(String message) {\n Log.d(\"Method\", \"displayMessage()\");\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "private static void displayMessage(String message) {\n\t\toutput.append(message);\n\t}", "public void showMessage(){\n final AlertDialog.Builder alert = new AlertDialog.Builder(context);\n alert.setMessage(message);\n alert.setTitle(title);\n alert.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n alert.create().dismiss();\n }\n });\n alert.create().show();\n }", "void showMessage(@NonNull BaseMessage message);", "private void showMessage(String msg)\n\t{\n\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\tmsg,\n\t\t\t\t\"\",\n\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t}", "public static void showMessage(String message) {\n JOptionPane.showMessageDialog(null, message);\n }", "public void showWinMessage() {\n\n\t}", "void showAlert(String message);", "public static void displayMessage(String message){\n JOptionPane.showInputDialog(message);\n }", "public void displayMessage(String message) {\n Toast.makeText(_context, message, Toast.LENGTH_SHORT).show();\n }", "public void displayMessage(String text)\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.DISPLAY_INFO_TOAST;\r\n message.obj = text;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "public void displayMessage(String message){\n //Display a toast with the message we recieved\n displayMessage(message,Toast.LENGTH_LONG);\n }", "private void showPlainMessage(String msg){\n\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t wrapHTML(msg),\n\t\t\t translations.getInfo(),\n\t\t\t JOptionPane.PLAIN_MESSAGE);\n\t}", "private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "protected void displayMessage(String message) throws IOException {\n FXMLLoader fxmlLoader =\n new FXMLLoader(getClass().getResource(DISPLAY));\n Parent root = fxmlLoader.load();\n\n DisplayController displayController = fxmlLoader.getController();\n System.out.println(\"Messages: \");\n System.out.println(message + \"\\n\");\n displayController.setText(message);\n\n Stage stage = new Stage();\n stage.setScene(new Scene(root));\n stage.showAndWait();\n }", "public void showErrorMessage(String message){\n System.out.println(LocalTime.now() + \": Error: \" + message);\n }", "public void showMessage(String msg) {\n boardController.showMessage(msg);\n }", "private synchronized void display(String msg) {\n\n\t\t//guiConversation.append(msg);\n\t\tSystem.out.println(msg);\n\t}", "public void showMessage(String message){\n Toast.makeText(getContext(), message, Toast.LENGTH_LONG).show();\n }", "int displayNotification(Message message);", "public void showmessage ( String tiltle, String message){\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setCancelable(true);\n builder.setTitle(tiltle);\n builder.setMessage(message);\n builder.show();\n }", "protected void displayMessage() {\n \n System.out.print (\"Message:\\n\");\n userMessage = message.toString();\n\n for(int i = 0; i < userMessage.length(); i++) \n System.out.format (\"%3d\", i);\n System.out.format (\"\\n\");\n for (char c : userMessage.toCharArray()) \n System.out.format(\"%3c\",c);\n System.out.format (\"\\n\");\n }", "private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }", "@Override\n\t\tpublic void displayMessage() {\n\t\t\tsuper.displayMessage();\n\t\t}", "public void message() {\n JOptionPane.showMessageDialog(null,\n \"Task was deleted successfully.\",\n \"Message\", JOptionPane.INFORMATION_MESSAGE);\n }", "public void displayMessage(){//displayMessage body start\n\t\tSystem.out.printf(\"course name = %s\\n\", getCourseName());\n\t}", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void showInfo(String message)\r\n {\r\n infoLabel.setText(message);\r\n }", "private void display(String msg) {\n\t\tString msgF = \"\\tClient- \" + msg + \"\\n\\n >> \";\n System.out.print(msgF);\n }", "public void displayMessage(String message){\n\n\t\tElement mes = nifty.getScreen(\"hud\").findElementByName(\"MessagePanel\");\n\t\tmes.getRenderer(TextRenderer.class).setText(message);\n\t\tmes.startEffect(EffectEventId.onCustom);\n\t}", "public abstract void showMessageBox(String message);", "public void displayMessage(String message) {\r\n TextView messageView = (TextView) findViewById(R.id.message);\r\n messageView.setText(String.valueOf(message));\r\n }", "public void showMessage(String text)\n {\n Toast.makeText(this, text, Toast.LENGTH_SHORT).show();\n }", "private void display(String msg) {\n\t\tif(cg == null)\n\t\t\tSystem.out.println(msg); // println for Console mode\n\t\telse\n\t\t\tcg.append(msg + \"\\n\"); // Append to, for example, JTextArea in the ClientGUI\n\t}", "public static void msgBox(String message){\n JOptionPane.showMessageDialog (null, message);\n }", "private void showInfo(String message){ infoLabel.setText(message);}", "@Override\n public void displayMessage(String message) {\n Toast.makeText(getActivity(),message,Toast.LENGTH_SHORT).show();\n }", "public void showMessage(String msg) {\n\t\tif (message == null)\n\t\t\tcreateMessage(msg);\n\t\tremove(message);\n\t\tcreateMessage(msg);\n\t}", "public void displayMessage()\n\t{\n\t\t// this statement calls getCourseName to get the\n\t\t// name of the course this GradeBook represents\n\t\tSystem.out.printf( \"Welcome to the grade book for\\n%s!\\n\", getCourseName() );\n\t}", "@Override\n\tpublic void showError(String message) {\n\t\t\n\t}", "void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }", "@FXML\r\n public void displayMessage(String message) {\r\n \r\n Alert displayMessage = new Alert(Alert.AlertType.INFORMATION);\r\n displayMessage.setTitle(null);\r\n displayMessage.setHeaderText(null);\r\n displayMessage.setContentText(message);\r\n displayMessage.showAndWait();\r\n \r\n }", "private void displayMessage(final String msg) {\r\n _uiApp.invokeLater(new Runnable() {\r\n /**\r\n * @see Runnable#run()\r\n */\r\n public void run() {\r\n Dialog.alert(msg);\r\n }\r\n });\r\n }", "private void showSnackBar(String message) {\n }", "public void displayErrorMessage(String errorMess)\n {\n JOptionPane.showMessageDialog(this,errorMess);\n }", "@Override\n public void showMessage(String msg) {\n String pesan = msg;\n if (pesan.equals(\"Post tidak ditemukan\")){\n txtNoData.setVisibility(View.VISIBLE);\n }\n }", "public void displayInfo(String message){\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "public void displayMessage()\n {\n // getCourseName gets the name of the course\n System.out.printf( \"Welcome to the grade book for\\n%s!\\n\\n\",\n getCourseName() );\n }", "public static void showMessage(FlyingObject flyingObject, String message) {\n System.out.println(\"[\" + new Date().toString() + \"][\" + flyingObject.getType().toUpperCase() + \"]: \" + message);\n }", "public void showInformationMessage(String msg) {\r\n JOptionPane.showMessageDialog(this,\r\n\t\t\t\t msg, TmplResourceSingleton.getString(\"info.dialog.header\"),\r\n\t\t\t\t JOptionPane.INFORMATION_MESSAGE);\r\n }", "void displayErrorMessage(String message);", "public synchronized void displayMessage(String msg) {\n\t\tthis.commonTxtView.setText(msg);\n\n\t}", "public void displayPreviewMessage(String str) {\n }", "private void displayMessage(String message) {\n TextView priceTextView = (TextView) findViewById(R.id.price_tv);\n priceTextView.setText(message);\n }", "public displayMessage() {}", "private void displayMessage(String message) {\n TextView seeBoxReadMore = (TextView) findViewById(R.id.read_more1);\n seeBoxReadMore.setTextColor(Color.BLACK);\n seeBoxReadMore.setText(message);\n seeBoxReadMore.setGravity(Gravity.CENTER);\n }", "public void displayToastMessage(String msg) {\n\t\tToast toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);\n\t\ttoast.setGravity(Gravity.CENTER, 0, 0);\n\t\ttoast.show();\n\t}", "private void display(String msg) {\n\t\t\tif(clientGui == null)\n\t\t\t\tSystem.out.println(msg); \t// terminal\n\t\t\telse\n\t\t\t\tclientGui.append(msg + \"\\n\");\t// JTextArea\n\t}", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "public void displayMessage(String message){\n gameState = GameState.MESSAGE;\n currentMessage = message;\n notifyObservers();\n currentMessage = \"\";\n }", "private void displayMessage(String message){\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n windowForCommunication.append(message);\n }\n });\n }", "private void showShortMessage(String message) {\n\t\tToast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT)\n\t\t\t\t.show();\n\t}", "private void display(String msg) {\n String time = simpleDateFormat.format(new Date()) + \" | \" + msg;\n System.out.println(time);\n }", "private synchronized void display(Message msg) {\n\t\tSystem.out.println(msg.toString());\n\t\tguiConversation.append(msg.toString());\n\t}", "public void show(Object errorMessage){\n\t\tSystem.out.println(\"Woops, something bad happened\");\n\t\tSystem.out.println(errorMessage);\n\t}", "private void showMessage(final String text){\n\t\t\n\t\tSwingUtilities.invokeLater(\n\n\t\t\t\tnew Runnable () {\n\t\t\t\t\t//This is a thread to update the GUI.\n\t\t\t\t\t\n\t\t\tpublic void run () {\n\t\t\t\t//This is the method that gets called everytime the GUI needs to be updated.\n\t\t\t\t\n\t\t\t\tchatWindow.append(text);\n\t\t\t\t\n\t\t\t\t\n\t\t\t} \t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t);\n\t\t\n\t\t\n\t}", "@Override\n public void showMessage(String message) {\n getRootActivity().showMessage(message);\n }", "void printMsg(){\n\tdisplay();\n }", "public void displayWelcomeMsg();", "private void showMessage ( final String str ){\r\n\t\tSwingUtilities.invokeLater(\r\n\t\t\t\tnew Runnable(){\r\n\t\t\t\t\tpublic void run(){\r\n\t\t\t\t\t\tdisplayArea.append(str);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n );\r\n\t}" ]
[ "0.86456037", "0.8338228", "0.8172832", "0.81722856", "0.8025376", "0.80161107", "0.79810405", "0.79718685", "0.7947782", "0.78937364", "0.77978104", "0.7777531", "0.7633983", "0.75879973", "0.75561476", "0.754165", "0.75101006", "0.75101006", "0.7506218", "0.7491108", "0.74845314", "0.7481353", "0.74562556", "0.74562556", "0.7400433", "0.7392632", "0.7391194", "0.7380513", "0.7370521", "0.73665965", "0.7357813", "0.73337036", "0.73327476", "0.7324978", "0.73036975", "0.7301448", "0.7293934", "0.7268704", "0.7261611", "0.72527224", "0.72374177", "0.722402", "0.7221004", "0.72196233", "0.7201807", "0.71990985", "0.71864676", "0.71863735", "0.71838146", "0.71769744", "0.7170802", "0.7168056", "0.7165486", "0.71388865", "0.71304744", "0.7126659", "0.71127486", "0.7103655", "0.70944923", "0.70877486", "0.7079232", "0.7068461", "0.70577246", "0.7056531", "0.70534104", "0.7047163", "0.70391047", "0.70304185", "0.7022036", "0.70186704", "0.7015991", "0.70092386", "0.699569", "0.6986933", "0.69796807", "0.697344", "0.69617057", "0.6955222", "0.6953421", "0.69517404", "0.69401586", "0.69265836", "0.6926156", "0.6917286", "0.6909764", "0.69047886", "0.68989646", "0.6897805", "0.6894336", "0.68761355", "0.6867759", "0.68675345", "0.68650955", "0.68478584", "0.68465436", "0.6825227", "0.6823565", "0.6819525", "0.6819372", "0.6817399" ]
0.6930142
81
Creating show about message
private void showAbout() { showMessage("About", " Curtis Baldwin's Intelligent Building"); // About message created when about button // pressed }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showAbout() {\n JOptionPane.showMessageDialog(this,\n \"TalkBox\\n\" + VERSION,\n \"About TalkBox\",\n JOptionPane.INFORMATION_MESSAGE);\n }", "public void showInformationMessage(String msg) {\r\n JOptionPane.showMessageDialog(this,\r\n\t\t\t\t msg, TmplResourceSingleton.getString(\"info.dialog.header\"),\r\n\t\t\t\t JOptionPane.INFORMATION_MESSAGE);\r\n }", "private void showInfo(String message){ infoLabel.setText(message);}", "private void tutorial(){\n\t\tString msg = \"[Space] = Inicia e pausa o jogo depois de iniciado.\";\n\t\tmsg += \"\\n[Seta esquerda] = Move o paddle para a esquerda.\";\n\t\tmsg += \"\\n[Seta direita] = Move o paddle para a direita.\";\n\t\tmsg += \"\\n[I] = Abre a janela de informaçoes.\";\n\t\tmsg += \"\\n[R] = Reinicia o jogo.\";\n\t\tJOptionPane.showMessageDialog(null, \"\"+msg, \"Informaçoes\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "private void showInfo(String message)\r\n {\r\n infoLabel.setText(message);\r\n }", "public void showMessage(){\n\t jsfMessageHelper.addInfo(\"Mesaj:\", (messageTxt==null?\"?\":messageTxt));\r\n\t}", "private void displayMessage(String info) {\n \tif (message == null) {\n \t\tsetupMessage();\n \t}\n \tmessage.setLabel(info);\n\t\tadd(message, 6, 15);\n }", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void showMessage(String message) {\n\n\t}", "public void showMessage(){\n final AlertDialog.Builder alert = new AlertDialog.Builder(context);\n alert.setMessage(message);\n alert.setTitle(title);\n alert.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n alert.create().dismiss();\n }\n });\n alert.create().show();\n }", "public void showMessage(String message);", "public void showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "static void giveInfo(String message){\n JOptionPane.showMessageDialog(null, message);\n }", "void show_info() {\n\t\tsetAlwaysOnTop(false);\n\n\t\tString msg = \"<html><ul><li>Shortcuts:<br/>\"\n\t\t\t\t+ \"(\\\") start macro<br/>\"\n\t\t\t\t+ \"(esc) exit<br/><br/>\"\n\t\t\t\t+ \"<li>Author: <b>Can Kurt</b></ul></html>\";\n\n\t\tJLabel label = new JLabel(msg);\n\t\tlabel.setFont(new Font(\"arial\", Font.PLAIN, 15));\n\n\t\tJOptionPane.showMessageDialog(null, label ,\"Info\", JOptionPane.INFORMATION_MESSAGE);\n\n\t\tsetAlwaysOnTop(true);\n\t}", "@FXML public void showAbout() {\n\t\tPopupMessage.getInstance().showAlert(AlertType.INFORMATION, \n\t\t\t\t\t\t\t\t\t\t\taboutTitle,\n\t\t\t\t\t\t\t\t\t\t\taboutHeader, \n\t\t\t\t\t\t\t\t\t\t\taboutDetails);\n\t}", "public void displayInfo(String message){\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "private void about() {\n System.out.println(Strings.MAIN_ABOUT_MESSAGE);\n System.out.println();\n }", "private void helpAbout() {\n JOptionPane.showMessageDialog(this, new ConsoleWindow_AboutBoxPanel1(), \"About\", JOptionPane.PLAIN_MESSAGE);\n }", "private void showInfo() {\n JOptionPane.showMessageDialog(\n this,\n \"Пока что никакой\\nинформации тут нет.\\nДа и вряд ли будет.\",\n \"^^(,oO,)^^\",\n JOptionPane.INFORMATION_MESSAGE);\n }", "public void showmessage ( String tiltle, String message){\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setCancelable(true);\n builder.setTitle(tiltle);\n builder.setMessage(message);\n builder.show();\n }", "private void showInfoMessage(String title, String body)\r\n {\r\n MyLogger.log(Level.INFO, \"Info message initiated. Info Title: {0}\", title);\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n alert.initOwner(currentStage);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(body);\r\n alert.showAndWait();\r\n }", "private void infoMessage(String message) {\n JOptionPane.showMessageDialog(this, message,\n \"VSEGraf - user management\", JOptionPane.INFORMATION_MESSAGE);\n }", "private void showAuthorDetails()\n {\n String message = \"Author: Kyle Russell\\nUniversity: Auckland University of Technology\\nContact: [email protected]\";\n JOptionPane.showMessageDialog(null, message, \"Author information\", JOptionPane.INFORMATION_MESSAGE);\n }", "private void aboutHandler() {\n JOptionPane.showMessageDialog(\n this.getParent(),\n \"YetAnotherChessGame v1.0 by:\\nBen Katz\\nMyles David\\n\"\n + \"Danielle Bushrow\\n\\nFinal Project for CS2114 @ VT\");\n }", "@HippyMethod(name = \"show\")\n\tpublic void show(String message)\n\t{\n\t\tLogUtils.d(CLASSNAME, message);\n\t\t// Toast.makeText(hippyRootView.getContext(), message, Toast.LENGTH_SHORT).show();\n\t}", "void showAbout() {\n\t\tif (aboutScreen == null) {\n\t\t aboutScreen = new Form(\"About AMMS Mansion demo\");\n\t\t aboutScreen.append(\"This MIDlet demonstrates the 3D audio capabilities of AMMS API.\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t aboutScreen.append(\"Copyright (c) 2006 Nokia. All rights reserved.\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t aboutScreen.append(\"\\n\");\n\t\t}\n\t\taboutScreen.addCommand(toggleCommand);\n\t\taboutScreen.setCommandListener(this);\n\t\tdisplay.setCurrent(aboutScreen);\n }", "private void showHelp() {\n\t\tJOptionPane.showMessageDialog(this, \"Created by Mario Bobić\", \"About File Encryptor\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "public void displayMessage(){\n //getCouseName obtém o nome do curso\n System.out.printf(\"Welcome to the grade book for \\n%s!\\n\\n\", getCouseName());\n }", "private void showMessage(String string) {\n\n }", "public void showHelp() {\n final Snackbar snackBar = Snackbar.make(findViewById(R.id.mapscontainer),\n \"Select a location by clicking the map. Press go to search your categories.\",\n Snackbar.LENGTH_INDEFINITE);\n\n snackBar.setAction(\"Got it!\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackBar.dismiss();\n }\n })\n .setActionTextColor(Color.WHITE);\n snackBar.show();\n }", "@Override\n\tpublic void showContents() {\n\t\tprogram.add(returnToMain);\n\t\tprogram.add(congratMessage);\n\t\tprogram.setBackground(Color.DARK_GRAY);\n\t\t\n\t}", "private void showText(String msg)\n {\n\n popup.setText(msg);\n\n listView.animate().alpha(0.3f).setDuration(1000);\n\n popup.setVisibility(View.VISIBLE);\n\n }", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "private void showHelp(){\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this,R.style.MyDialogTheme);\n alertDialogBuilder.setMessage(\"Welcome to NBA Manager 2019\\n\\n\" +\n \"The purpose of the application is to simulate a basketball manager game and draft a team.\\n\\n\" +\n \"You can view your current roster by pressing the right arrow in the top right corner.\\n\\n\" +\n \"*Not all players will have a height or a weight.\");\n alertDialogBuilder.setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface arg0, int arg1) {\n }\n });\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }", "private void displayAboutDialog() {\n final String message = \"AUTHORS\\n\" + \"Kaitlyn Kinerk and Alan Fowler\\n\"\n + \"TCSS 305 - UW Tacoma - 6/8/2016\\n\" + \"\\nIMAGE CREDIT\\n\"\n + \"Background: \"\n + \"http://wallpapercave.com/purple-galaxy-wallpaper\";\n JOptionPane.showMessageDialog(null, message, \"About\", JOptionPane.PLAIN_MESSAGE,\n new ImageIcon(\"icon.gif\"));\n }", "@SkipValidation\n public String makeChangesToShowMessage() {\n important = impService.getImportantNews(important.getImportantNewsId());\n if (important.isShowMessage() == false) {\n important.setShowMessage(true);\n impService.updateImportantNews(important);\n }\n return SUCCESS;\n }", "public void showMessage(String msg) {\n\t\tif (message == null)\n\t\t\tcreateMessage(msg);\n\t\tremove(message);\n\t\tcreateMessage(msg);\n\t}", "public void about()\n\t{\n\t\treadout.setText(\"Thank you for using haste by Beau Bouchard 2013\");\n\t\toutputText(\"\");\n\t}", "public InfoMessage createInfoMessage();", "void showMessage(@NonNull BaseMessage message);", "private void showPlainMessage(String msg){\n\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t wrapHTML(msg),\n\t\t\t translations.getInfo(),\n\t\t\t JOptionPane.PLAIN_MESSAGE);\n\t}", "public void showInformationMessage(final String message) {\r\n JOptionPane.showMessageDialog(window, message, getTitle(), JOptionPane.INFORMATION_MESSAGE);\r\n }", "public void displayMessage(String text)\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.DISPLAY_INFO_TOAST;\r\n message.obj = text;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "public void displayMessage(){//displayMessage body start\n\t\tSystem.out.printf(\"course name = %s\\n\", getCourseName());\n\t}", "public void loadIntroMessage() {\n\n\t\tmessageToDisplay.add(ArtemisCalendar.getMonthName(ArtemisCalendar.getCalendar().get(2)) + \", \"\n\t\t\t\t+ ArtemisCalendar.getCalendar().get(1) + \".\");\n\n\t\tmessageToDisplay.add(\"NASA have chosen you to help them deliver The Artemis Project successfully.\");\n\t\tmessageToDisplay.add(\"The Project aims to launch the first woman, and next man to the moon by \"\n\t\t\t\t+ ArtemisCalendar.getMonthName(ArtemisCalendar.getEndDate().get(2)) + \", \"\n\t\t\t\t+ ArtemisCalendar.getEndDate().get(1) + \".\");\n\t\tmessageToDisplay.add(\n\t\t\t\t\"In order to accomplish this lofty goal, you must work alongside other chosen companies to ensure 'All Systems are Go!' by launch-day.\");\n\t\tmessageToDisplay.add(\n\t\t\t\t\"Can you work together to research and fully develop all of the systems needed for a successful Lift-off?\");\n\t\tmessageToDisplay.add(\"...or will your team just be in it for personal gain?\");\n\t\tmessageToDisplay.add(\"You decide!\");\n\t\tGameLauncher.displayMessage();\n\t}", "private void showAboutDialog() {\n JOptionPane.showMessageDialog(this, \"Sea Battle II Version 1.0\\nCS 232 (Computer Programming II), Fall 2018\");\n }", "public static void message() {\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, \"Thanks for your participation\" + \"\\nHave a great day!\");\r\n\t\t\r\n\t\t\r\n\t}", "private synchronized void display(String msg) {\n\n\t\t//guiConversation.append(msg);\n\t\tSystem.out.println(msg);\n\t}", "private void displayMessage(String message) {\n TextView seeBoxReadMore = (TextView) findViewById(R.id.read_more1);\n seeBoxReadMore.setTextColor(Color.BLACK);\n seeBoxReadMore.setText(message);\n seeBoxReadMore.setGravity(Gravity.CENTER);\n }", "public static void infoDialog(String title,String msgBody) throws IOException{\n \n }", "private void display(String msg) {\n cg.append(msg + \"\\n\");\n }", "public static void displayMsg() {\n\t}", "protected void aboutUs(ActionEvent arg0) {\n\t\tJOptionPane.showMessageDialog(this,\r\n\t\t\t\t\"A Curriculum Design of DBMS By psiphonc in NOV.2019\");\r\n\t}", "public void showLooseMessage() {\n\t\tAlertDialog alert = new AlertDialog.Builder(getContext()).create();\n\t\talert.setCancelable(false);\n\n\t\talert.setMessage(\"You Loose!\");\n\t\talert.setButton(AlertDialog.BUTTON_POSITIVE, \"Replay\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\talert.setButton(AlertDialog.BUTTON_NEGATIVE, \"Exit\",\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tactivity.finish();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\talert.show();\n\n\t}", "private void showInfo() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Guess a letter:\\n\" + this.word);\n\t\tSystem.out.println(\"You have made \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t\tSystem.out.println(\"You will lose the game if you make more than \"\n\t\t\t\t+ this.allowance + \" wrong guesses.\");\n\t\tSystem.out.println(\"The already guessed wrong letters are:\");\n\t\tSystem.out.println(this.wrongLetters);\n\t\tSystem.out.println(\"-----------------------------\");\n\t}", "public void showDetails (Player player) {\r\n\t\tString \tc\t= Term.COLOR_INACTIVE.get();\r\n\t\t\r\n\t\t// Get the color\r\n\t\tif (getActivity() == Activity.SELL\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_SELL.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.BUY\t\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_BUY.get();\r\n\t\t\r\n\t\telse if (getActivity() == Activity.EXCHANGE\t&& isActive())\r\n\t\t\tc\t= Term.COLOR_EXCHANGE.get();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<String>\tmessage\t= new ArrayList<String>();\r\n\t\t\t\t\t\tmessage.add(Term.INFO_1.get() + c + getActivity().toString() \t+ Term.INFO_2.get() + c +scs.formatCurrency(getPrice())\t\t+ Term.INFO_9.get() + c + getOwner());\r\n\t\t\r\n\t\tString \ttext\t= null;\r\n\t\tString\tname\t= getItemName();\r\n\t\t\r\n\t\tif (!isUnlimited()) {\r\n\t\t\tif (getActivity() == Activity.BUY)\r\n\t\t\t\ttext = getAmount()+ \"/\" + getMaxAmount();\r\n\t\t\telse\r\n\t\t\t\ttext = \"\" + getAmount();\r\n\t\t} else {\r\n\t\t\ttext = Term.INFO_UNLIMITED.get();\r\n\t\t}\r\n\t\t\r\n\t\tif (getItemStack().getType() == Material.WRITTEN_BOOK)\r\n\t\t\tname = getNBTStorage().getBookTitle();\r\n\t\t\r\n\t\tmessage.add(Term.INFO_4.get() + c + name\t\t\t\t+ Term.INFO_3.get() + c + text);\r\n//\t\t\t\t\t\tmessage.add(Term.INFO_4.get() + c + getItemName()\t\t\t\t+ Term.INFO_3.get() + c + (!isUnlimited() ? (getActivity() == Activity.BUY ? getMaxAmount() : getAmount()) : Term.INFO_UNLIMITED.get()));\r\n\t\t\r\n\t\tStringBuffer\tbuffer \t= new StringBuffer();\r\n\t\tString\t\t\tdelim\t= \"\";\r\n\t\r\n\t\tfor (Enchantment en : getEnchantments().keySet()) {\r\n\t\t\tint lvl\t= getEnchantments().get(en);\r\n\t\t\t\r\n\t\t\tbuffer.append(delim + en.getName() + \" lvl \" + lvl);\r\n\t\t\tdelim\t= \", \";\r\n\t\t}\r\n\t\t\r\n\t\tif (buffer.toString().length() > 0)\r\n\t\t\tmessage.add(Term.INFO_8.get() + c + buffer.toString());\r\n\t\t\r\n\t\tif (player.hasPermission(Properties.permAdmin))\r\n\t\t\tmessage.add(c + getSHA1());\r\n\t\t\r\n\t\tMessaging.mlSend(player, message);\r\n\t}", "@Override\n\tpublic void showMessage(String hintMessage) {\n\t\tsuper.showMessage(hintMessage);\n\t}", "@Override\n public void showMessage(String msg) {\n String pesan = msg;\n if (pesan.equals(\"Post tidak ditemukan\")){\n txtNoData.setVisibility(View.VISIBLE);\n }\n }", "private void displayMessage23(String message) {\n TextView virtualBankReadMore = (TextView) findViewById(R.id.read_more23);\n virtualBankReadMore.setTextColor(Color.BLACK);\n virtualBankReadMore.setText(message);\n virtualBankReadMore.setGravity(Gravity.CENTER);\n }", "private void showMessage(String TStr, String CStr) {\r\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\r\n\t\talert.setTitle(TStr);\r\n\t\talert.setHeaderText(null);\r\n\t\talert.setContentText(CStr);\r\n\r\n\t\talert.showAndWait();\r\n\t}", "public void ShowMessage() {\n\t\tthis.ShowMessage(null);\n\t\t\n\t\t/* Exit function. */\n\t\treturn;\n\t}", "private synchronized void display(Message msg) {\n\t\tSystem.out.println(msg.toString());\n\t\tguiConversation.append(msg.toString());\n\t}", "protected void aboutUs(ActionEvent ae) {\n\t\tString info =\"欢迎您使用该系统!!!\\n\";\n\t\tinfo +=\"愿为您提供最好的服务!\\n\";\n\t\tinfo +=\"最好的防脱发洗发水!!!\";\n\t\t//JOptionPane.showMessageDialog(this,info);\n\t\tString[] buttons = {\"迫不及待去看看!\",\"心情不好以后再说!\"};\n\t\tint ret=JOptionPane.showOptionDialog(this, info,\"关于我们\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.DEFAULT_OPTION, new ImageIcon(LoginFrm.class.getResource(\"/images/logo.png\")), buttons, null);\n\t\tif(ret==0) \n\t\t{\n\t\t\ttry {\n\t\t\t\tURI uri = new URI(\"https://s.taobao.com/search?q=%E9%98%B2%E8%84%B1%E5%8F%91%E6%B4%97%E5%8F%91%E6%B0%B4&imgfile=&commend=all&ssid=s5-e&search_type=item&sourceId=tb.index&spm=a21bo.2017.201856-taobao-item.1&ie=utf8&initiative_id=tbindexz_20170306\");\n\t\t\t\tDesktop.getDesktop().browse(uri);\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}\n\t\telse \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(this, \"你真是狠心,坏淫!\");\n\t\t}\n\t}", "@Override\n\t\tpublic void displayMessage() {\n\t\t\tsuper.displayMessage();\n\t\t}", "private void displayMessage14(String message) {\n TextView ologaReadMore = (TextView) findViewById(R.id.read_more14);\n ologaReadMore.setTextColor(Color.BLACK);\n ologaReadMore.setText(message);\n ologaReadMore.setGravity(Gravity.CENTER);\n }", "private void showMessage(int position) {\n // Open Bottom sheet and show details\n }", "private void showMessage(String title, String message, Context context) {\r\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\r\n builder.setTitle(title);\r\n builder.setMessage(message);\r\n builder.show();\r\n\r\n\r\n }", "private void displayMessage12(String message) {\n TextView jokkoReadMore = (TextView) findViewById(R.id.read_more12);\n jokkoReadMore.setTextColor(Color.BLACK);\n jokkoReadMore.setText(message);\n jokkoReadMore.setGravity(Gravity.CENTER);\n }", "public void DisplayMessage(String massage);", "public void informationDialog(String paneMessage) {\n showMessageDialog(frame, paneMessage);\n }", "private void displayInformation(String message) {\n informationTextArea.setText(EMPTY);\n informationTextArea.setText(message);\n }", "public void processAbout() {\n AppMessageDialogSingleton dialog = AppMessageDialogSingleton.getSingleton();\n \n // POP UP THE DIALOG\n dialog.show(\"About This Application\", \"Application Name: Metro Map Maker\\n\"\n + \"Written By: Myungsuk Moon and Richard McKenna\\n\"\n + \"Framework Used: DesktopJavaFramework (by Richard McKenna)\\n\"\n + \"Year of Work: 2017\");\n }", "private void displayMessage11(String message) {\n TextView setTicReadMore = (TextView) findViewById(R.id.read_more11);\n setTicReadMore.setTextColor(Color.BLACK);\n setTicReadMore.setText(message);\n setTicReadMore.setGravity(Gravity.CENTER);\n }", "private void showAboutDialog() {\n\n view.aboutDialog();\n }", "public void showWinMessage() {\n\n\t}", "private void displayMessage16(String message) {\n TextView mookhReadMore = (TextView) findViewById(R.id.read_more16);\n mookhReadMore.setTextColor(Color.BLACK);\n mookhReadMore.setText(message);\n mookhReadMore.setGravity(Gravity.CENTER);\n }", "@Override\r\n public final void displayInfo(final String message) {\r\n displayMessage(message, \"Info\", SWT.ICON_INFORMATION);\r\n }", "protected abstract void info(String msg);", "public EObject displayInfo(EObject context, String title, String message) {\r\n\t\tMessageDialog.openInformation(Display.getCurrent().getActiveShell(), title, message);\r\n\t\treturn context;\r\n\t}", "public void buildAndShow(String p_Message, String p_Title, String p_PositiveButton, String p_NegativeButton){\r\n AlertDialog.Builder builder = new AlertDialog.Builder(getParameter());\r\n builder.setMessage(p_Message)\r\n .setTitle(p_Title);\r\n builder.setPositiveButton(p_PositiveButton, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n onClickPositive();\r\n }\r\n });\r\n builder.setNegativeButton(p_NegativeButton, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n onClickNegative();\r\n }\r\n });\r\n AlertDialog dialog = builder.create();\r\n dialog.show();\r\n }", "public void showMessage(int x, int y, String message) {\n }", "private void displayMessage(String message) {\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(frame, \n//\" Programming language: Java\\n\"+\n\" Developer: Monish Gupta\\n\"+\n\" monishgupta.blogspot.com\", \"About\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t}", "protected void aboutUs(ActionEvent ae) {\n\t\tString info = \"【猿来入此】出品\\n\";\n\t\tinfo += \"网址:http://programmer.ischoolbar.com \\n\";\n\t\tinfo += \"每天更新一个项目,并附带视频教程!\";\n\t\tString[] buttons = {\"迫不及待去看看!\",\"心情不好以后再说!\"};\n\t\tint ret = JOptionPane.showOptionDialog(this, info, \"关于我们\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.DEFAULT_OPTION, new ImageIcon(LoginFrm.class.getResource(\"/images/logo.png\")), buttons, null);\n\t\tif(ret == 0){\n\t\t\t//采用Java 调用系统浏览器打开制定\n\t\t\ttry {\n\t\t\t\tURI uri = new URI(\"http://programmer.ischoolbar.com\");\n\t\t\t\tDesktop.getDesktop().browse(uri);\n\t\t\t\t//Runtime.getRuntime().exec(\"explorer http://programmer.ischoolbar.com\");\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}else{\n\t\t\tJOptionPane.showMessageDialog(this, \"你真是狠心,坏淫!\");\n\t\t}\n\t}", "private void displayMessage13(String message) {\n TextView greenwashReadMore = (TextView) findViewById(R.id.read_more13);\n greenwashReadMore.setTextColor(Color.BLACK);\n greenwashReadMore.setText(message);\n greenwashReadMore.setGravity(Gravity.CENTER);\n }", "public abstract String about();", "public void display(String title, String message) throws IOException {\n Stage alertBoxStage = new Stage();\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"AlertBox.fxml\"));\n Parent root = loader.load();\n\n alertBoxStage.setTitle(title);\n AlertBoxController alertBoxController = loader.getController();\n alertBoxController.setMessageLabel(message, alertBoxStage);\n alertBoxStage.initModality(Modality.APPLICATION_MODAL);\n\n alertBoxStage.setScene(new Scene(root, 350, 175));\n Rectangle2D screenBounds = Screen.getPrimary().getVisualBounds();\n alertBoxStage.setX((screenBounds.getWidth() - 350) / 2);\n alertBoxStage.setY((screenBounds.getHeight() - 175) / 2);\n alertBoxStage.setResizable(false);\n alertBoxStage.show();\n\n }", "private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void showShortMessage(String message) {\n\t\tToast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT)\n\t\t\t\t.show();\n\t}", "private void displayMessage15(String message) {\n TextView gomywayReadMore = (TextView) findViewById(R.id.read_more15);\n gomywayReadMore.setTextColor(Color.BLACK);\n gomywayReadMore.setText(message);\n gomywayReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage21(String message) {\n TextView flyingDocReadMore = (TextView) findViewById(R.id.read_more21);\n flyingDocReadMore.setTextColor(Color.BLACK);\n flyingDocReadMore.setText(message);\n flyingDocReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage22(String message) {\n TextView kiliVrReadMore = (TextView) findViewById(R.id.read_more22);\n kiliVrReadMore.setTextColor(Color.BLACK);\n kiliVrReadMore.setText(message);\n kiliVrReadMore.setGravity(Gravity.CENTER);\n }", "public void message() {\n JOptionPane.showMessageDialog(null,\n \"Task was deleted successfully.\",\n \"Message\", JOptionPane.INFORMATION_MESSAGE);\n }", "private void showInfoLabel(Skin skin, String info) {\r\n Label infoLabel = new Label(I18n.t(info), skin);\r\n messageTable.add(infoLabel).colspan(3);\r\n messageTable.row();\r\n }", "public displayMessage() {}", "public void showMsg(String str);", "public void showMessage(String msg) {\n boardController.showMessage(msg);\n }", "public void displayMessage(String m){\n\t\tJOptionPane.showMessageDialog(null, m, \"Perfect !\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "private void showHelp() {\n System.out.println(\"new: \");\n System.out.println(\"new chess and throw the chess bevor away\");\n System.out.println(\"move from to:\");\n System.out.println(\"take the pawn from position from to position to \");\n System.out.println(\"print:\");\n System.out.println(\"print the chess now \");\n System.out.println(\"help:\");\n System.out.println(\"show help\");\n System.out.println(\"quit:\");\n System.out.println(\"quit out\");\n }" ]
[ "0.7284601", "0.7195401", "0.71522355", "0.71406406", "0.7135638", "0.7089317", "0.7088205", "0.70559996", "0.70382655", "0.7018538", "0.700761", "0.6953695", "0.6942984", "0.6909033", "0.6908956", "0.6890938", "0.6880758", "0.6879292", "0.6847416", "0.683139", "0.6828169", "0.68273", "0.68072635", "0.6765429", "0.67237246", "0.6688792", "0.6666238", "0.66580373", "0.6647067", "0.66291654", "0.6605669", "0.6562168", "0.6549136", "0.6549136", "0.65282583", "0.65266657", "0.65223044", "0.6506963", "0.6499114", "0.6496868", "0.6494852", "0.64906245", "0.6488009", "0.6474287", "0.64567095", "0.64506334", "0.6449368", "0.64421743", "0.64243466", "0.6417123", "0.6409581", "0.64006203", "0.6396566", "0.63900614", "0.63870454", "0.63692284", "0.6361786", "0.6353899", "0.63507015", "0.63506776", "0.63505596", "0.6346272", "0.6335047", "0.6325996", "0.632056", "0.63176405", "0.6315556", "0.631341", "0.63075244", "0.6302038", "0.63012815", "0.62961996", "0.6292727", "0.6291232", "0.6289596", "0.62885964", "0.62855643", "0.6283972", "0.628181", "0.62807137", "0.6280129", "0.6279848", "0.6279163", "0.6277441", "0.62699896", "0.6266581", "0.6258704", "0.6257308", "0.6248898", "0.6246998", "0.6243445", "0.6239748", "0.6236245", "0.6235636", "0.6229544", "0.6227021", "0.62267745", "0.6219068", "0.6218464", "0.6218082" ]
0.7509576
0
set up the menu of commands for the GUI
MenuBar setMenu() { // initially set up the file chooser to look for cfg files in current directory MenuBar menuBar = new MenuBar(); // create main menu Menu mFile = new Menu("File"); // add File main menu MenuItem mExit = new MenuItem("Exit"); // whose sub menu has Exit mExit.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { // action on exit timer.stop(); // stop timer System.exit(0); // exit program } }); mFile.getItems().addAll(mExit); // add load, save and exit to File menu Menu mHelp = new Menu("Help"); // create Help menu MenuItem mAbout = new MenuItem("About"); // add Welcome sub menu item mAbout.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent actionEvent) { showAbout(); // whose action is to give welcome message } }); mHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item menuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help return menuBar; // return the menu }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n commands.add(add);\n \n JMenuItem search = new JMenuItem(\"Search\");\n search.addActionListener((ActionEvent e) -> {\n changeState(\"Search\");\n });\n commands.add(search);\n \n JMenuItem quit = new JMenuItem(\"Quit\");\n quit.addActionListener((ActionEvent e) -> {\n System.out.println(\"QUITING\");\n System.exit(0);\n });\n commands.add(quit);\n \n menuBar.add(commands);\n \n setJMenuBar(menuBar);\n }", "private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\n\t}", "private void setupMenu() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tJMenuItem conn = new JMenuItem(connectAction);\n\t\tJMenuItem exit = new JMenuItem(\"退出\");\n\t\texit.addActionListener(new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\texit();\n\t\t\t}\n\t\t});\n\t\tJMenu file = new JMenu(\"客户端\");\n\t\tfile.add(conn);\n\t\tmenuBar.add(file);\n\t\tsetJMenuBar(menuBar);\n\t}", "public void addMenuItems()\n\t{\n\t\tstartButton = new JButton(\"Start\");\n\t\tstartButton.setLayout(null);\n\t\tstartButton.setBounds(350, 225, 100, 50);\n\t\t\n\t\toptionsButton = new JButton(\"Options\");\n\t\toptionsButton.setLayout(null);\n\t\toptionsButton.setBounds(350, 275, 100, 50);\n\t\t\n\t\texitButton = new JButton(\"Exit\");\n\t\texitButton.setLayout(null);\n\t\texitButton.setBounds(350, 375, 100, 50);\n\t\texitButton.setActionCommand(\"exit\");\n\t\texitButton.addActionListener((ActionListener) this);\n\t\t\n\t\tmainMenuPanel.add(startButton);\n\t\tmainMenuPanel.add(optionsButton);\n\t\tmainMenuPanel.add(startButton);\n\t}", "private void createCommands()\n{\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);\n helpCommand=new Command(\"Help\",Command.HELP, 1);\n backCommand = new Command(\"Back\",Command.BACK, 1);\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 }", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "private static void mainMenuLines(){\n setMenuLines(\"\",4,6,7,8,9,10,11,12,13,14,15,16,17,18,19);\n setMenuLines(\"Welcome to Ben's CMR program.\",1);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" for a list of valid commands!\",20);\n setMenuLines(\"Enter \" + HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" to close the application!\",21);\n }", "private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }", "public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }", "public void setMenu() {\n\t \n\t\ttop = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t add(top, BorderLayout.CENTER);\n\t \n\t lPro = new JLabel(\"Projects: \");\n\t top.add(lPro);\n\t \n\t cPro = new JComboBox();\n\t getProject();\n\t\ttop.add(cPro);\n\t\t\n\t\tview = new JButton(\"View Sample\");\n\t\ttop.add(view);\n\t\t\n\t\tbottom = new JPanel(new FlowLayout(FlowLayout.CENTER));\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tcancel = new JButton(\"Cancel\");\n\t\tbottom.add(cancel);\n\t\t\n\t\tdownload = new JButton(\"Download\");\n\t\tbottom.add(download);\n\t\t\n\t\tsetActionListener();\t\n\t}", "public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }", "private void initializeExplorerCommands() {\n\t\tthis.commands.add(new GUICmdGraphMouseMode(\"Transforming\",\n\t\t\t\t\"GUICmdGraphMouseMode.Transforming\", this.hydraExplorer,\n\t\t\t\tModalGraphMouse.Mode.TRANSFORMING));\n\t\tthis.commands.add(new GUICmdGraphMouseMode(\"Picking\",\n\t\t\t\t\"GUICmdGraphMouseMode.Picking\", this.hydraExplorer,\n\t\t\t\tModalGraphMouse.Mode.PICKING));\n\t\tthis.commands.add(new GUICmdGraphRevert(\"Revert to Selected\",\n\t\t\t\tGUICmdGraphRevert.DEFAULT_ID, this.hydraExplorer));\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 initComponents() {\n\n // Executes when window is closed\n addWindowListener(new WindowAdapter() {\n public void windowClosing(WindowEvent windowEvent) {\n store.run();\n setVisible(false);\n }\n });\n\n // Set up commands label\n commands = new JLabel(\"Commands: \");\n newGUI.setButtonFontSize(commands, fontSize);\n\n String[] userCommands = store.currentUser.returnSelectCommandsList();\n // Set up commands Combo Box\n availableCommands = new JComboBox<>(userCommands);\n availableCommands.setEditable(false);\n newGUI.setButtonFontSize(availableCommands, fontSize);\n availableCommands.addActionListener(this);\n\n currentCommand = availableCommands.getItemAt(0); // Set first command as default\n\n // Set up enter button\n enterButton = new JButton(\"Enter\");\n newGUI.setButtonFontSize(enterButton, fontSize);\n enterButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n enterButtonActionPerformed(evt);\n }\n });\n\n addComponents(getContentPane());\n }", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }", "private static void helpMenuLines(){\n setMenuLines(\"\",7,9,11,13,15,16,18,20);\n setMenuLines(\"Welcome to Ben's CMR program. Here are the main commands:\",1);\n setMenuLines(HIGHLIGHT_COLOR + \"new lead\" + ANSI_RESET + \" - Creates a new Lead\",4);\n setMenuLines(HIGHLIGHT_COLOR + \"convert <ID>\" + ANSI_RESET + \" - Converts a Lead into an Opportunity\",6);\n setMenuLines(HIGHLIGHT_COLOR + \"close-won <ID>\" + ANSI_RESET + \" - Close Won Opportunity\",8);\n setMenuLines(HIGHLIGHT_COLOR + \"close-lost <ID>\" + ANSI_RESET + \" - Close Lost Opportunity\",10);\n setMenuLines(HIGHLIGHT_COLOR + \"lookup <OBJECT> <ID>\" + ANSI_RESET + \" - Search for specific Lead, Opportunity, Account or Contact\",12);\n setMenuLines(HIGHLIGHT_COLOR + \"show <OBJECT PLURAL>\" + ANSI_RESET + \" - List all Leads, Opportunities, Accounts or Contacts\",14);\n setMenuLines(HIGHLIGHT_COLOR + \"help\" + ANSI_RESET + \" - Explains usage of available commands\",17);\n setMenuLines(HIGHLIGHT_COLOR + \"save\" + ANSI_RESET + \" - Saves the changed data\",19);\n setMenuLines(HIGHLIGHT_COLOR + \"exit\" + ANSI_RESET + \" - Saves and exits the program\",21);\n }", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "private void designGUI() {\n\t\tmnb= new JMenuBar();\r\n\t\tFileMenu=new JMenu(\"file\");\r\n\t\tEditMenu=new JMenu(\"edit\");\r\n\t\timg1=new ImageIcon(\"s.gif\");\r\n\t\tNew=new JMenuItem(\"new\",img1);\r\n\t\topen=new JMenuItem(\"open\");\r\n\t\tsave=new JMenuItem(\"save\");\r\n\t\tquit=new JMenuItem(\"quit\");\r\n\t\tcut=new JMenuItem(\"cut\");\r\n\t\tcopy=new JMenuItem(\"copy\");\r\n\t\tpaste=new JMenuItem(\"paste\");\r\n\t\t\r\n\t\tFileMenu.add(New);\r\n\t\tFileMenu.add(save);\r\n\t\tFileMenu.add(open);\r\n\t\tFileMenu.add(new JSeparator());\r\n\t\tFileMenu.add(quit);\r\n\t\tEditMenu.add(cut);\r\n\t\tEditMenu.add(copy);\r\n\t\tEditMenu.add(paste);\r\n\t\t\r\n\t\tmnb.add(FileMenu);\r\n\t\tmnb.add(EditMenu);\r\n\t\tsetJMenuBar(mnb);\r\n\t\t\r\n\t\t//to add shortcut\r\n\t\tquit.setMnemonic('q');\r\n\t\t//quit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W,ActionEvent.CTRL_MASK));\r\n\t\tquit.addActionListener((ActionEvent e)->\r\n\t\t\t\t{\r\n\t\t\tSystem.exit(0);\r\n\t\t\t\t});\r\n\t\t\r\n\t\t//moving the mouse near to it we get this\r\n\t\tcut.setToolTipText(\"cut the text\");\r\n\t\t//new way fro get domension\r\n\t\tdim=getToolkit().getScreenSize();\r\n\t\tint x=(int) dim.getHeight();\r\n\t\tint y=(int) dim.getWidth();\r\n\t\tc=getContentPane();\r\n\t\tc.setLayout(new BorderLayout());\r\n\t\tmainpanel=new JPanel();\r\n\t\tta1=new JTextArea(x/18,y/12);\r\n\t\tmainpanel.add(new JScrollPane(ta1));\r\n\t\tc.add(mainpanel,BorderLayout.CENTER);\r\n\t\tmymethods();\r\n\t\topen.addActionListener(this);\r\n\t\tsave.addActionListener(this);\r\n\t\tcut.addActionListener(this);\r\n\t\tcopy.addActionListener(this);\r\n\t\tpaste.addActionListener(this);\r\n\t\t\r\n\t}", "private void buildMenu() {\r\n\t\tJMenuBar mainmenu = new JMenuBar();\r\n\t\tsetJMenuBar(mainmenu);\r\n\r\n\t\tui.fileMenu = new JMenu(\"File\");\r\n\t\tui.editMenu = new JMenu(\"Edit\");\r\n\t\tui.viewMenu = new JMenu(\"View\");\r\n\t\tui.helpMenu = new JMenu(\"Help\");\r\n\t\t\r\n\t\tui.fileNew = new JMenuItem(\"New...\");\r\n\t\tui.fileOpen = new JMenuItem(\"Open...\");\r\n\t\tui.fileImport = new JMenuItem(\"Import...\");\r\n\t\tui.fileSave = new JMenuItem(\"Save\");\r\n\t\tui.fileSaveAs = new JMenuItem(\"Save as...\");\r\n\t\tui.fileExit = new JMenuItem(\"Exit\");\r\n\r\n\t\tui.fileOpen.setAccelerator(KeyStroke.getKeyStroke('O', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.fileSave.setAccelerator(KeyStroke.getKeyStroke('S', InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.fileImport.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doImport(); } });\r\n\t\tui.fileExit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dispose(); doExit(); } });\r\n\t\t\r\n\t\tui.fileOpen.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoLoad();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSave.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSave();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSaveAs.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSaveAs();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editUndo = new JMenuItem(\"Undo\");\r\n\t\tui.editUndo.setEnabled(undoManager.canUndo()); \r\n\t\t\r\n\t\tui.editRedo = new JMenuItem(\"Redo\");\r\n\t\tui.editRedo.setEnabled(undoManager.canRedo()); \r\n\t\t\r\n\t\t\r\n\t\tui.editCut = new JMenuItem(\"Cut\");\r\n\t\tui.editCopy = new JMenuItem(\"Copy\");\r\n\t\tui.editPaste = new JMenuItem(\"Paste\");\r\n\t\t\r\n\t\tui.editCut.addActionListener(new Act() { @Override public void act() { doCut(true, true); } });\r\n\t\tui.editCopy.addActionListener(new Act() { @Override public void act() { doCopy(true, true); } });\r\n\t\tui.editPaste.addActionListener(new Act() { @Override public void act() { doPaste(true, true); } });\r\n\t\t\r\n\t\tui.editPlaceMode = new JCheckBoxMenuItem(\"Placement mode\");\r\n\t\t\r\n\t\tui.editDeleteBuilding = new JMenuItem(\"Delete building\");\r\n\t\tui.editDeleteSurface = new JMenuItem(\"Delete surface\");\r\n\t\tui.editDeleteBoth = new JMenuItem(\"Delete both\");\r\n\t\t\r\n\t\tui.editClearBuildings = new JMenuItem(\"Clear buildings\");\r\n\t\tui.editClearSurface = new JMenuItem(\"Clear surface\");\r\n\r\n\t\tui.editUndo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doUndo(); } });\r\n\t\tui.editRedo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doRedo(); } });\r\n\t\tui.editClearBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearBuildings(true); } });\r\n\t\tui.editClearSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearSurfaces(true); } });\r\n\t\t\r\n\r\n\t\tui.editUndo.setAccelerator(KeyStroke.getKeyStroke('Z', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editRedo.setAccelerator(KeyStroke.getKeyStroke('Y', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCut.setAccelerator(KeyStroke.getKeyStroke('X', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCopy.setAccelerator(KeyStroke.getKeyStroke('C', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPaste.setAccelerator(KeyStroke.getKeyStroke('V', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPlaceMode.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0));\r\n\t\t\r\n\t\tui.editDeleteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));\r\n\t\tui.editDeleteSurface.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editDeleteBoth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editDeleteBuilding.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBuilding(); } });\r\n\t\tui.editDeleteSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteSurface(); } });\r\n\t\tui.editDeleteBoth.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBoth(); } });\r\n\t\tui.editPlaceMode.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doPlaceMode(ui.editPlaceMode.isSelected()); } });\r\n\t\t\r\n\t\tui.editPlaceRoads = new JMenu(\"Place roads\");\r\n\t\t\r\n\t\tui.editResize = new JMenuItem(\"Resize map\");\r\n\t\tui.editCleanup = new JMenuItem(\"Remove outbound objects\");\r\n\t\t\r\n\t\tui.editResize.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoResize();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.editCleanup.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoCleanup();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editCutBuilding = new JMenuItem(\"Cut: building\");\r\n\t\tui.editCutSurface = new JMenuItem(\"Cut: surface\");\r\n\t\tui.editPasteBuilding = new JMenuItem(\"Paste: building\");\r\n\t\tui.editPasteSurface = new JMenuItem(\"Paste: surface\");\r\n\t\tui.editCopyBuilding = new JMenuItem(\"Copy: building\");\r\n\t\tui.editCopySurface = new JMenuItem(\"Copy: surface\");\r\n\t\t\r\n\t\tui.editCutBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editCopyBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editPasteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editCutBuilding.addActionListener(new Act() { @Override public void act() { doCut(false, true); } });\r\n\t\tui.editCutSurface.addActionListener(new Act() { @Override public void act() { doCut(true, false); } });\r\n\t\tui.editCopyBuilding.addActionListener(new Act() { @Override public void act() { doCopy(false, true); } });\r\n\t\tui.editCopySurface.addActionListener(new Act() { @Override public void act() { doCopy(true, false); } });\r\n\t\tui.editPasteBuilding.addActionListener(new Act() { @Override public void act() { doPaste(false, true); } });\r\n\t\tui.editPasteSurface.addActionListener(new Act() { @Override public void act() { doPaste(true, false); } });\r\n\t\t\r\n\t\tui.viewZoomIn = new JMenuItem(\"Zoom in\");\r\n\t\tui.viewZoomOut = new JMenuItem(\"Zoom out\");\r\n\t\tui.viewZoomNormal = new JMenuItem(\"Zoom normal\");\r\n\t\tui.viewBrighter = new JMenuItem(\"Daylight (1.0)\");\r\n\t\tui.viewDarker = new JMenuItem(\"Night (0.5)\");\r\n\t\tui.viewMoreLight = new JMenuItem(\"More light (+0.05)\");\r\n\t\tui.viewLessLight = new JMenuItem(\"Less light (-0.05)\");\r\n\t\t\r\n\t\tui.viewShowBuildings = new JCheckBoxMenuItem(\"Show/hide buildings\", renderer.showBuildings);\r\n\t\tui.viewShowBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewSymbolicBuildings = new JCheckBoxMenuItem(\"Minimap rendering mode\", renderer.minimapMode);\r\n\t\tui.viewSymbolicBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewTextBackgrounds = new JCheckBoxMenuItem(\"Show/hide text background boxes\", renderer.textBackgrounds);\r\n\t\tui.viewTextBackgrounds.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewTextBackgrounds.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleTextBackgrounds(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomIn(); } });\r\n\t\tui.viewZoomOut.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomOut(); } });\r\n\t\tui.viewZoomNormal.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomNormal(); } });\r\n\t\tui.viewShowBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleBuildings(); } });\r\n\t\tui.viewSymbolicBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleMinimap(); } });\r\n\t\t\r\n\t\tui.viewBrighter.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doBright(); } });\r\n\t\tui.viewDarker.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDark(); } });\r\n\t\tui.viewMoreLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doMoreLight(); } });\r\n\t\tui.viewLessLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doLessLight(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD9, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomOut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD3, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomNormal.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD0, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewMoreLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD8, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewLessLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD2, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewBrighter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD7, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewDarker.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD1, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewStandardFonts = new JCheckBoxMenuItem(\"Use standard fonts\", TextRenderer.USE_STANDARD_FONTS);\r\n\t\t\r\n\t\tui.viewStandardFonts.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoStandardFonts();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.viewPlacementHints = new JCheckBoxMenuItem(\"View placement hints\", renderer.placementHints);\r\n\t\tui.viewPlacementHints.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoViewPlacementHints();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.helpOnline = new JMenuItem(\"Online wiki...\");\r\n\t\tui.helpOnline.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.helpAbout = new JMenuItem(\"About...\");\r\n\t\tui.helpAbout.setEnabled(false); // TODO implement\r\n\t\t\r\n\t\tui.languageMenu = new JMenu(\"Language\");\r\n\t\t\r\n\t\tui.languageEn = new JRadioButtonMenuItem(\"English\", true);\r\n\t\tui.languageEn.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"en\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.languageHu = new JRadioButtonMenuItem(\"Hungarian\", false);\r\n\t\tui.languageHu.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"hu\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tButtonGroup bg = new ButtonGroup();\r\n\t\tbg.add(ui.languageEn);\r\n\t\tbg.add(ui.languageHu);\r\n\t\t\r\n\t\tui.fileRecent = new JMenu(\"Recent\");\r\n\t\tui.clearRecent = new JMenuItem(\"Clear recent\");\r\n\t\tui.clearRecent.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoClearRecent();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddAll(ui.fileRecent, ui.clearRecent);\r\n\t\t\r\n\t\taddAll(mainmenu, ui.fileMenu, ui.editMenu, ui.viewMenu, ui.languageMenu, ui.helpMenu);\r\n\t\taddAll(ui.fileMenu, ui.fileNew, null, ui.fileOpen, ui.fileRecent, ui.fileImport, null, ui.fileSave, ui.fileSaveAs, null, ui.fileExit);\r\n\t\taddAll(ui.editMenu, ui.editUndo, ui.editRedo, null, \r\n\t\t\t\tui.editCut, ui.editCopy, ui.editPaste, null, \r\n\t\t\t\tui.editCutBuilding, ui.editCopyBuilding, ui.editPasteBuilding, null, \r\n\t\t\t\tui.editCutSurface, ui.editCopySurface, ui.editPasteSurface, null, \r\n\t\t\t\tui.editPlaceMode, null, ui.editDeleteBuilding, ui.editDeleteSurface, ui.editDeleteBoth, null, \r\n\t\t\t\tui.editClearBuildings, ui.editClearSurface, null, ui.editPlaceRoads, null, ui.editResize, ui.editCleanup);\r\n\t\taddAll(ui.viewMenu, ui.viewZoomIn, ui.viewZoomOut, ui.viewZoomNormal, null, \r\n\t\t\t\tui.viewBrighter, ui.viewDarker, ui.viewMoreLight, ui.viewLessLight, null, \r\n\t\t\t\tui.viewShowBuildings, ui.viewSymbolicBuildings, ui.viewTextBackgrounds, ui.viewStandardFonts, ui.viewPlacementHints);\r\n\t\taddAll(ui.helpMenu, ui.helpOnline, null, ui.helpAbout);\r\n\t\t\r\n\t\taddAll(ui.languageMenu, ui.languageEn, ui.languageHu);\r\n\t\t\r\n\t\tui.fileNew.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoNew();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.toolbar = new JToolBar(\"Tools\");\r\n\t\tContainer c = getContentPane();\r\n\t\tc.add(ui.toolbar, BorderLayout.PAGE_START);\r\n\r\n\t\tui.toolbarCut = createFor(\"res/Cut24.gif\", \"Cut\", ui.editCut, false);\r\n\t\tui.toolbarCopy = createFor(\"res/Copy24.gif\", \"Copy\", ui.editCopy, false);\r\n\t\tui.toolbarPaste = createFor(\"res/Paste24.gif\", \"Paste\", ui.editPaste, false);\r\n\t\tui.toolbarRemove = createFor(\"res/Remove24.gif\", \"Remove\", ui.editDeleteBuilding, false);\r\n\t\tui.toolbarUndo = createFor(\"res/Undo24.gif\", \"Undo\", ui.editUndo, false);\r\n\t\tui.toolbarRedo = createFor(\"res/Redo24.gif\", \"Redo\", ui.editRedo, false);\r\n\t\tui.toolbarPlacementMode = createFor(\"res/Down24.gif\", \"Placement mode\", ui.editPlaceMode, true);\r\n\r\n\t\tui.toolbarUndo.setEnabled(false);\r\n\t\tui.toolbarRedo.setEnabled(false);\r\n\t\t\r\n\t\tui.toolbarNew = createFor(\"res/New24.gif\", \"New\", ui.fileNew, false);\r\n\t\tui.toolbarOpen = createFor(\"res/Open24.gif\", \"Open\", ui.fileOpen, false);\r\n\t\tui.toolbarSave = createFor(\"res/Save24.gif\", \"Save\", ui.fileSave, false);\r\n\t\tui.toolbarImport = createFor(\"res/Import24.gif\", \"Import\", ui.fileImport, false);\r\n\t\tui.toolbarSaveAs = createFor(\"res/SaveAs24.gif\", \"Save as\", ui.fileSaveAs, false);\r\n\t\tui.toolbarZoomNormal = createFor(\"res/Zoom24.gif\", \"Zoom normal\", ui.viewZoomNormal, false);\r\n\t\tui.toolbarZoomIn = createFor(\"res/ZoomIn24.gif\", \"Zoom in\", ui.viewZoomIn, false);\r\n\t\tui.toolbarZoomOut = createFor(\"res/ZoomOut24.gif\", \"Zoom out\", ui.viewZoomOut, false);\r\n\t\tui.toolbarBrighter = createFor(\"res/TipOfTheDay24.gif\", \"Daylight\", ui.viewBrighter, false);\r\n\t\tui.toolbarDarker = createFor(\"res/TipOfTheDayDark24.gif\", \"Night\", ui.viewDarker, false);\r\n\t\tui.toolbarHelp = createFor(\"res/Help24.gif\", \"Help\", ui.helpOnline, false);\r\n\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarNew);\r\n\t\tui.toolbar.add(ui.toolbarOpen);\r\n\t\tui.toolbar.add(ui.toolbarSave);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarImport);\r\n\t\tui.toolbar.add(ui.toolbarSaveAs);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarCut);\r\n\t\tui.toolbar.add(ui.toolbarCopy);\r\n\t\tui.toolbar.add(ui.toolbarPaste);\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarRemove);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarUndo);\r\n\t\tui.toolbar.add(ui.toolbarRedo);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarPlacementMode);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarZoomNormal);\r\n\t\tui.toolbar.add(ui.toolbarZoomIn);\r\n\t\tui.toolbar.add(ui.toolbarZoomOut);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarBrighter);\r\n\t\tui.toolbar.add(ui.toolbarDarker);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarHelp);\r\n\t\t\r\n\t}", "public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }", "public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}", "private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}", "private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}", "private void constructMenuItems()\n\t{\n\t\tthis.saveImageMenuItem = ComponentGenerator.generateMenuItem(\"Save Image\", this, KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));\n\t\tthis.quitMenuItem = ComponentGenerator.generateMenuItem(\"Quit\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));\n\t\tthis.undoMenuItem = ComponentGenerator.generateMenuItem(\"Undo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Z, ActionEvent.CTRL_MASK));\n\t\tthis.redoMenuItem = ComponentGenerator.generateMenuItem(\"Redo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.CTRL_MASK));\n\t\tthis.removeImageMenuItem = ComponentGenerator.generateMenuItem(\"Remove Image from Case\", this);\n\t\tthis.antiAliasMenuItem = ComponentGenerator.generateMenuItem(\"Apply Anti Aliasing\", this);\n\t\tthis.brightenMenuItem = ComponentGenerator.generateMenuItem(\"Brighten by 10%\", this);\n\t\tthis.darkenMenuItem = ComponentGenerator.generateMenuItem(\"Darken by 10%\", this);\n\t\tthis.grayscaleMenuItem = ComponentGenerator.generateMenuItem(\"Convert to Grayscale\", this);\n\t\tthis.resizeMenuItem = ComponentGenerator.generateMenuItem(\"Resize Image\", this);\n\t\tthis.cropMenuItem = ComponentGenerator.generateMenuItem(\"Crop Image\", this);\n\t\tthis.rotate90MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 90\\u00b0 Right\", this);\n\t\tthis.rotate180MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 180\\u00b0 Right\", this);\n\t\tthis.rotate270MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 270\\u00b0 Right\", this);\n\t}", "public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }", "private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}", "private void constructMenus()\n\t{\n\t\tthis.fileMenu = new JMenu(\"File\");\n\t\tthis.editMenu = new JMenu(\"Edit\");\n\t\tthis.caseMenu = new JMenu(\"Case\");\n\t\tthis.imageMenu = new JMenu(\"Image\");\n\t\tthis.fileMenu.add(this.saveImageMenuItem);\n\t\tthis.fileMenu.addSeparator();\n\t\tthis.fileMenu.add(this.quitMenuItem);\n\t\tthis.editMenu.add(this.undoMenuItem);\n\t\tthis.editMenu.add(this.redoMenuItem);\n\t\tthis.caseMenu.add(this.removeImageMenuItem);\n\t\tthis.imageMenu.add(this.antiAliasMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.brightenMenuItem);\n\t\tthis.imageMenu.add(this.darkenMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.grayscaleMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.resizeMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.cropMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.rotate90MenuItem);\n\t\tthis.imageMenu.add(this.rotate180MenuItem);\n\t\tthis.imageMenu.add(this.rotate270MenuItem);\n\t}", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}", "private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "private void makeMenu() {\r\n int i = 0;\r\n int j = 0;\r\n final JMenuBar bar = new JMenuBar();\r\n final Action[] menuActions = {new NewItemAction(MENU_ITEM_STRINGS[i++]),\r\n new ExitAction(MENU_ITEM_STRINGS[i++], myFrame),\r\n new AboutAction(MENU_ITEM_STRINGS[i++], myFrame)};\r\n i = 0;\r\n\r\n final JMenu fileMenu = new JMenu(MENU_STRINGS[j++]);\r\n fileMenu.setMnemonic(KeyEvent.VK_F);\r\n fileMenu.add(menuActions[i++]);\r\n fileMenu.addSeparator();\r\n fileMenu.add(menuActions[i++]);\r\n\r\n final JMenu optionsMenu = new JMenu(MENU_STRINGS[j++]);\r\n optionsMenu.setMnemonic(KeyEvent.VK_O);\r\n\r\n final JMenu helpMenu = new JMenu(MENU_STRINGS[j++]);\r\n helpMenu.setMnemonic(KeyEvent.VK_H);\r\n helpMenu.add(menuActions[i++]);\r\n\r\n bar.add(fileMenu);\r\n bar.add(optionsMenu);\r\n bar.add(helpMenu);\r\n\r\n myFrame.setJMenuBar(bar);\r\n }", "@Override\n\tprotected void setMenu() {\n\t\t\n\t\tfinal ButtonGroup actionButtonGroup = new ButtonGroup();\n\t\tfor (String s : ((TreeSite) object).actions) {\n\t\t\tJRadioButton button = new JRadioButton(s);\n\t\t\tbutton.setActionCommand(s);\n\t\t\tactionButtonGroup.add(button);\n\t\t\tmenu.add(button);\n\t\t}\n\t\t\n\t\tJPanel headingPanel = new JPanel();\n\t\theadingPanel.setLayout(new BoxLayout(headingPanel, BoxLayout.LINE_AXIS));\n\t\theadingPanel.add(new JLabel(\"Heading: \"));\n\t\tfinal JTextField headingField = new JTextField();\n\t\theadingField.setText(Float.toString(INITIAL_FLOAT_VALUE));\n\t\theadingField.setColumns(10);\n\t\theadingPanel.add(headingField);\n\t\tmenu.add(headingPanel);\n\t\t\n\t\tJPanel lengthPanel = new JPanel();\n\t\tlengthPanel.setLayout(new BoxLayout(lengthPanel, BoxLayout.LINE_AXIS));\n\t\tlengthPanel.add(new JLabel(\"Length: \"));\n\t\tfinal JTextField lengthField = new JTextField();\n\t\tlengthField.setText(Integer.toString(INITIAL_INTEGER_VALUE));\n\t\tlengthField.setColumns(10);\n\t\tlengthPanel.add(lengthField);\n\t\tmenu.add(lengthPanel);\n\t\t\n\t\tJPanel counterPanel = new JPanel();\n\t\tcounterPanel.setLayout(new BoxLayout(counterPanel, BoxLayout.LINE_AXIS));\n\t\tcounterPanel.add(new JLabel(\"Counter: \"));\n\t\tfinal JTextField counterField = new JTextField();\n\t\tcounterField.setText(Integer.toString(INITIAL_INTEGER_VALUE));\n\t\tcounterField.setColumns(10);\n\t\tcounterPanel.add(counterField);\n\t\tmenu.add(counterPanel);\n\t\t\n\t\tJPanel targetPanel = new JPanel();\n\t\ttargetPanel.setLayout(new BoxLayout(targetPanel, BoxLayout.LINE_AXIS));\n\t\ttargetPanel.add(new JLabel(\"Target position: \"));\n\t\ttargetFieldX = new JTextField();\n\t\ttargetFieldX.setEditable(false);\n\t\ttargetFieldX.setText(\"\");\n\t\ttargetFieldX.setColumns(4);\n\t\ttargetFieldY = new JTextField();\n\t\ttargetFieldY.setEditable(false);\n\t\ttargetFieldY.setText(\"\");\n\t\ttargetFieldY.setColumns(4);\n\t\ttargetPanel.add(targetFieldX);\n\t\ttargetPanel.add(new JLabel(\", \"));\n\t\ttargetPanel.add(targetFieldY);\n\t\tmenu.add(targetPanel);\n\t\tmenu.add(new SetTargetPositionButton(editor).button);\n\t\t\n\t\tJButton removeTargetButton = new JButton(\"Remove Target\");\n\t\tremoveTargetButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttargetFieldX.setText(\"\");\n\t\t\t\ttargetFieldY.setText(\"\");\n\t\t\t\teditor.targetIcon.setVisible(false);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tmenu.add(removeTargetButton);\n\t\t\n\t\tfinal CyclicButtonGroup cyclicButtons = new CyclicButtonGroup();\n\t\t\n\t\tJRadioButton nonCyclicButton = new JRadioButton(\"Set to non-cyclic\");\n\t\tnonCyclicButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tcyclicButtons.beginningOfCycle.data.cycleStart = false;\n\t\t\t\t\tcyclicButtons.beginningOfCycle = null;\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tcyclicButtons.add(nonCyclicButton);\n\t\t\n\t\tfinal JButton addActionButton = new JButton(\"Add Action\");\n\t\t\n\t\tmenu.add(addActionButton);\n\t\tmenu.add(nonCyclicButton);\n\t\t\n\t\taddActionButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (actionButtonGroup.getSelection() == null) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please select an action type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tFloat headingValue = null;\n\t\t\t\tInteger lengthValue = null;\n\t\t\t\tInteger counterValue = null;\n\t\t\t\tInteger targetValueX = null;\n\t\t\t\tInteger targetValueY = null;\n\t\t\t\tboolean noTarget = false;\n\t\t\t\ttry {\n\t\t\t\t\ttargetValueX = Integer.parseInt(targetFieldX.getText());\n\t\t\t\t\ttargetValueY = Integer.parseInt(targetFieldY.getText());\n\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\tnoTarget = true;\n\t\t\t\t}\n\t\t\t\tif (headingField.getText() == null || !isValidHeading(headingField.getText())) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a heading value greater than or equal to 0 and less than 360\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\theadingValue = Float.parseFloat(headingField.getText());\n\t\t\t\t}\n\t\t\t\tif (lengthField.getText() == null || !isValidLength(lengthField.getText())) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter an integer length value greater than 0\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlengthValue = Integer.parseInt(lengthField.getText());\n\t\t\t\t}\n\t\t\t\tif (counterField.getText() == null || !isValidCounter(counterField.getText(), Integer.parseInt(lengthField.getText()))) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter an integer counter value greater than 0 and less than the length value\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcounterValue = Integer.parseInt(counterField.getText());\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tActionMetadata data = new ActionMetadata(actionButtonGroup.getSelection().getActionCommand(),\n\t\t\t\t\t\theadingValue, lengthValue, counterValue, false, targetValueX, targetValueY);\n\t\t\t\t((TreeSite) object).actionQueue.add(data);\n\t\t\t\tcreateActionPanel(cyclicButtons, data);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tfor (ActionMetadata metadata : ((TreeSite) object).actionQueue) {\n\t\t\tcreateActionPanel(cyclicButtons, metadata);\n\t\t}\n\t\t\n\t}", "public void initMenu(){\n\t}", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }", "private void createContextMenu(){\r\n\t\tmenu = new JMenuBar();\r\n\t\tint ctrl;\r\n\t\tif(MAC)\r\n\t\t\tctrl = ActionEvent.META_MASK;\r\n\t\telse\r\n\t\t\tctrl = ActionEvent.CTRL_MASK;\r\n\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tnewMenu = new JMenuItem(\"New\");\r\n\t\tnewMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ctrl));\r\n\t\tnewMenu.addActionListener(this);\r\n\t\topenMenu = new JMenuItem(\"Open\");\r\n\t\topenMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ctrl));\r\n\t\topenMenu.addActionListener(this);\r\n\t\trecentMenu = new JMenu(\"Open Recent\");\r\n\t\tpopulateRecentMenu();\r\n\t\tsaveMenu = new JMenuItem(\"Save\");\r\n\t\tsaveMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ctrl));\r\n\t\tsaveMenu.addActionListener(this);\r\n\t\tsaveAsMenu = new JMenuItem(\"Save As...\");\r\n\t\tsaveAsMenu.addActionListener(this);\r\n\t\tfileMenu.add(newMenu);\r\n\t\tfileMenu.add(openMenu);\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.add(saveMenu);\r\n\t\tfileMenu.add(saveAsMenu);\r\n\r\n\t\tmenu.add(fileMenu);\r\n\r\n\t\tJMenu editMenu = new JMenu(\"Edit\");\r\n\t\tpreferencesMenu = new JMenuItem(\"Preferences\");\r\n\t\tpreferencesMenu.addActionListener(this);\r\n\t\teditMenu.add(preferencesMenu);\r\n\r\n\t\tmenu.add(editMenu);\r\n\r\n\t\tif(!MAC){\r\n\t\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\t\tJMenuItem aboutMenuI = new JMenuItem(\"About\");\r\n\r\n\t\t\taboutMenuI.addActionListener(new ActionListener(){\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tshowAboutMenu();\r\n\t\t\t\t}\t\t\r\n\t\t\t});\r\n\t\t\thelpMenu.add(aboutMenuI);\r\n\t\t\tmenu.add(helpMenu);\r\n\t\t}\r\n\t}", "public Menu() { //Menu pannel constructor\n\t\tmenuBar = new JMenuBar();\n\t\tmenu = new JMenu(\"Menu\");\n\t\tabout = new JMenu(\"About\");\n\t\tabout.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Ragnarock Web Browser 2017\\nIvan Mykolenko\\u00AE\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\thistory = new JMenu(\"History\");\n\t\thistory.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"history\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"History\");\n\t\t\t\tlayer.show(userViewPort, \"History\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 2;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tbookmarks = new JMenu(\"Bookmarks\");\n\t\tbookmarks.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"bookmarks\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"Bookmarks\");\n\t\t\t\tlayer.show(userViewPort, \"Bookmarks\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 3;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tsettingsMenuItem = new JMenuItem(\"Settings\", KeyEvent.VK_X);\n\t\tsettingsMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcreateSettings();\n\t\t\t\tsettings.setVisible(true);\n\t\t\t}\n\t\t});\n\t\texitMenuItem = new JMenuItem(\"Exit\");\n\t\texitMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tbackButton = new JButton(\"Back\");\n\t\tremoveButton = new JButton(\"Remove\");\n\t\tmenu.add(settingsMenuItem);\n\t\tmenu.add(exitMenuItem);\n\t\tmenuBar.add(menu);\n\t\tmenuBar.add(history);\n\t\tmenuBar.add(bookmarks);\n\t\tmenuBar.add(about);\n\t\tmenuBar.add(Box.createHorizontalGlue()); // Changing backButton's alignment to right\n\t\tsettings = new JDialog();\n\t\tadd(menuBar);\n\t\tsaveButton = new JButton(\"Save\");\n\t\tclearHistory = new JButton(\"Clear History\");\n\t\tclearBookmarks = new JButton(\"Clear Bookmarks\");\n\t\tbuttonsPanel = new JPanel();\n\t\tpanel = new JPanel();\n\t\turlField = new JTextField(15);\n\t\tedit = new JLabel(\"Edit Homepage:\");\n\t\tviewMode = 1;\n\t\tlistModel = new DefaultListModel<String>();\n\t\tlist = new JList<String>(listModel);\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);\n\t\tlist.setLayoutOrientation(JList.VERTICAL);\n\t}", "public void startMenu() {\n setTitle(\"Nier Protomata\");\n setSize(ICoord.LAST_COL + ICoord.ADD_SIZE,\n ICoord.LAST_ROW + ICoord.ADD_SIZE);\n \n setButton();\n }", "public void init() {\n\t\tsuper.init();\n\n\t\tsetName(NAME);\n\n\t\tmoveUpMenuItem = new JMenuItem(MENU_ITEM_MOVE_UP);\n\t\tmoveUpMenuItem.setName(NAME_MENU_ITEM_MOVE_UP);\n\t\tmoveUpMenuItem.setEnabled(true);\n\t\tmoveUpMenuItem.addActionListener(moveUpAction);\n\t\tmoveUpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_UP,\n\t\t\t\tActionEvent.ALT_MASK));\n\n\t\tmoveDownMenuItem = new JMenuItem(MENU_ITEM_MOVE_DOWN);\n\t\tmoveDownMenuItem.setName(NAME_MENU_ITEM_MOVE_DOWN);\n\t\tmoveDownMenuItem.setEnabled(true);\n\t\tmoveDownMenuItem.addActionListener(moveDownAction);\n\t\tmoveDownMenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t\t\tKeyEvent.VK_DOWN, ActionEvent.ALT_MASK));\n\n\t\tdeleteMenuItem = new JMenuItem(MENU_ITEM_DELETE);\n\t\tdeleteMenuItem.setName(NAME_MENU_ITEM_DELETE);\n\t\tdeleteMenuItem.setEnabled(true);\n\t\tdeleteMenuItem.addActionListener(deleteAction);\n\t\tdeleteMenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t\t\tKeyEvent.VK_DELETE, 0));\n\n\t\taddMenuItem = new JMenuItem(MENU_ITEM_ADD);\n\t\taddMenuItem.setName(NAME_MENU_ITEM_ADD);\n\t\taddMenuItem.setEnabled(true);\n\t\taddMenuItem.addActionListener(addAction);\n\t\taddMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\n\t\t\t\tActionEvent.ALT_MASK));\n\n\t\teditMenuItem = new JMenuItem(MENU_ITEM_EDIT);\n\t\teditMenuItem.setName(NAME_MENU_ITEM_EDIT);\n\t\teditMenuItem.setEnabled(true);\n\t\teditMenuItem.addActionListener(editAction);\n\t\teditMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_E,\n\t\t\t\tActionEvent.ALT_MASK));\n\n\t\tsendMidiMenuItem = new JMenuItem(MENU_ITEM_SEND_MIDI);\n\t\tsendMidiMenuItem.setName(NAME_MENU_ITEM_SEND_MIDI);\n\t\tsendMidiMenuItem.setEnabled(false);\n\t\tsendMidiMenuItem.addActionListener(sendMidiAction);\n\t\tsendMidiMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M,\n\t\t\t\tActionEvent.ALT_MASK));\n\t}", "private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }", "public static void helpCommand(){\n\n System.out.println(\"--------list of controls-------\");\n System.out.println(\"'help' : display the list of control\");\n System.out.println(\"'exit' : for quit the app /n\");\n System.out.println(\"'adduser' : you can add user with this command,<fistname>,<lastname>,<country>,<departement>,<age>\");\n System.out.println(\"'edituser' : you can edit an user with this command, <firstname>,<lastname>\");\n System.out.println(\"'removeuser' : you can remove an user with this command, <firstanme>,<lastname>\");\n System.out.println(\"'listusers' : display all of users\");\n System.out.println(\"'addcar' : add a car to the list, <brand>,<model>,<ref>,<year>\");\n System.out.println(\"'editcar' : use this command for edit a car, <ref>\");\n System.out.println(\"'removecar' : use this command for remove a car\");\n System.out.println(\"'listcars' : display all the cars\");\n System.out.println(\"'rentcar' : command for rent a car\");\n System.out.println(\"'returncar' : command for return a car\");\n System.out.println(\"'listrent' : display the list of rents\");\n System.out.println(\"'saveusers' : use this command for save your users file\");\n System.out.println(\"'restoreusers' : use this command open your save users file\");\n System.out.println(\"'serialusers' : use this command serialize object users\");\n System.out.println(\"'saverents' : use this command save the list of rents in file\");\n System.out.println(\"'loadrents' : use this command load the list from file\");\n System.out.println(\"'savecars' : use this command for save the list of cars in a file\");\n System.out.println(\"'loadcars' : use this command for import the list from file \");\n System.out.println(\"'saveall' : use this command for save all the list in a file\");\n System.out.println(\"'loadall' : use this command for import all the list from file\");\n System.out.println(\"----------------------------------\");\n\n }", "private void doMenuCommand(String command) {\n\t\tif (command.equals(\"Save...\")) { \n\t\t\tsaveImageAsText();\n\t\t}\n\t\telse if (command.equals(\"Open...\")) {\n\t\t\topenTextFile();\n\t\t\tcanvas.repaint(); \n\t\t}\n\t\telse if (command.equals(\"Clear\")) { // remove all strings\n\t\t\ttheString = null; // Remove the ONLY string from the canvas.\n\t\t\tundoMenuItem.setEnabled(false);\n\t\t\tcanvas.repaint();\n\t\t}\n\t\telse if (command.equals(\"Remove Item\")) { // remove the most recently added string\n\t\t\t// to apply undo in the program\n\t\t\tif (theString.size() > 0) {\n\t\t\t\ttheString.remove(theString.size() - 1); \n\t\t\t}\n\t\t\tif (theString.size() == 0)\n\t\t\t\tundoMenuItem.setEnabled(false); \n\t\t\tcanvas.repaint();\n\t\t}\n\t\telse if (command.equals(\"Set Text Color...\")) {\n\t\t\tColor c = JColorChooser.showDialog(this, \"Select Text Color\", currentTextColor);\n\t\t\tif (c != null)\n\t\t\t\tcurrentTextColor = c;\n\t\t}\n\t\telse if (command.equals(\"Set Background Color...\")) {\n\t\t\tColor c = JColorChooser.showDialog(this, \"Select Background Color\", canvas.getBackground());\n\t\t\tif (c != null) {\n\t\t\t\tcanvas.setBackground(c);\n\t\t\t\tcanvas.repaint();\n\t\t\t}\n\t\t}\n\t\telse if (command.equals(\"Save Image...\")) { // save a PNG image of the drawing area\n\t\t\tFile imageFile = fileChooser.getOutputFile(this, \"Select Image File Name\", \"textimage.png\");\n\t\t\tif (imageFile == null)\n\t\t\t\treturn;\n\t\t\ttry {\n\t\t\t\t// Because the image is not available, I will make a new BufferedImage and\n\t\t\t\t// draw the same data to the BufferedImage as is shown in the panel.\n\t\t\t\t// A BufferedImage is an image that is stored in memory, not on the screen.\n\t\t\t\t// There is a convenient method for writing a BufferedImage to a file.\n\t\t\t\tBufferedImage image = new BufferedImage(canvas.getWidth(),canvas.getHeight(),\n\t\t\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\t\t\t\tGraphics g = image.getGraphics();\n\t\t\t\tg.setFont(canvas.getFont());\n\t\t\t\tcanvas.paintComponent(g); // draws the canvas onto the BufferedImage, not the screen!\n\t\t\t\tboolean ok = ImageIO.write(image, \"PNG\", imageFile); // write to the file\n\t\t\t\tif (ok == false)\n\t\t\t\t\tthrow new Exception(\"PNG format not supported (this shouldn't happen!).\");\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tJOptionPane.showMessageDialog(this, \n\t\t\t\t\t\t\"Sorry, an error occurred while trying to save the image:\\n\" + e);\n\t\t\t}\n\t\t}\n\t}", "public void initDefaultCommand() {\n \tsetDefaultCommand(new SetPlungerMove());\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void initGui()\n {\n this.buttonList.clear();\n this.multilineMessage = this.fontRendererObj.listFormattedStringToWidth(this.message.getFormattedText(), this.width - 50);\n this.field_175353_i = this.multilineMessage.size() * this.fontRendererObj.FONT_HEIGHT;\n this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 2 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, I18n.format(\"gui.toMenu\", new Object[0])));\n if(!TabGUI.openTabGUI) return;\n this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 2 + 20 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, 100, 20, \"Reconnect\"));\n this.buttonList.add(new GuiButton(2, this.width / 2, this.height / 2 + 20 + this.field_175353_i / 2 + this.fontRendererObj.FONT_HEIGHT, 100, 20, \"Random Alt\"));\n }", "public Menu createToolsMenu();", "public void initDefaultCommand() {\n \tsetDefaultCommand(new boxChange());\n }", "private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }", "@Override\n\tvoid setupAction() {\n\n\t\tgetButton().setOnAction(event -> {\n\t\t\tmainPrevCommandBox.addText(mainTextInput.getText());\n\t\t\tfor (Turtle t : getThisTurtleList()) {\n\n\t\t\t\tlanguage = ((LanguageCombo) mainLanguageComboBox).getLanguage();\n\t\t\t\tCommand test = new Command(mainTextInput.getText(), t, variableMap, userCommandMap, language);\n\t\t\t\ttest.execute();\n\n\t\t\t}\n\t\t\tmainVarTable.updateVars(variableMap);\n\t\t\tmainFuncTable.updateCommandFuncs(userCommandMap);\n\t\t\tmainTurtleTable.updateValues();\n\n\t\t\tmainTextInput.clear();\n\n\t\t});\n\t}", "public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }", "protected void initializeEditMenu() {\n\t\tfinal JMenu editMenu = new JMenu(\"Edit\");\n\t\tthis.add(editMenu);\n\t\t// History Mouse Mode\n\t\tfinal JMenu mouseModeSubMenu = new JMenu(\"History Mouse Mode\");\n\t\teditMenu.add(mouseModeSubMenu);\n\t\t// Transforming\n\t\tfinal JMenuItem transformingItem = new JMenuItem(\n\t\t\t\tthis.commands.findById(\"GUICmdGraphMouseMode.Transforming\"));\n\t\ttransformingItem.setAccelerator(KeyStroke.getKeyStroke('T',\n\t\t\t\tInputEvent.ALT_DOWN_MASK));\n\t\tmouseModeSubMenu.add(transformingItem);\n\t\t// Picking\n\t\tfinal JMenuItem pickingItem = new JMenuItem(\n\t\t\t\tthis.commands.findById(\"GUICmdGraphMouseMode.Picking\"));\n\t\tpickingItem.setAccelerator(KeyStroke.getKeyStroke('P',\n\t\t\t\tInputEvent.ALT_DOWN_MASK));\n\t\tmouseModeSubMenu.add(pickingItem);\n\t}", "private void bind() \r\n\t{\r\n\t\tsuper.menuPut(\"list\", newJMenu(\"List\", 'L'));\r\n\t\tsuper.menuPut(\"list/new\", newJMenuItem(\"New\", 'N', KeyEvent.VK_1, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionNew(x));\r\n\t\tsuper.menuPut(\"list/open\", newJMenuItem(\"Open\", 'O', KeyEvent.VK_2, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionLoad(x));\r\n\t\tsuper.menuPut(\"list/save\", newJMenuItem(\"Save\", 'S', KeyEvent.VK_3, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionSave(x));\r\n\t\tsuper.menuPut(\"list/***1\", \"\");\r\n\t\tsuper.menuPut(\"list/add\", newJMenuItem(\"Add\", 'A', KeyEvent.VK_4, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionAdd(x));\r\n\t\tsuper.menuPut(\"list/remove\", newJMenuItem(\"Remove\", 'R', KeyEvent.VK_5, ActionEvent.SHIFT_MASK | ActionEvent.CTRL_MASK), x -> menuFile.actionRemove(x));\r\n\t\t\r\n\t\tsuper.menuPut(\"tree\", newJMenu(\"Tree\", 'T'));\r\n\t\tsuper.menuPut(\"tree/new\", newJMenuItem(\"New\", 'N', KeyEvent.VK_1, ActionEvent.SHIFT_MASK), x -> menuEdit.actionNew(x));\r\n\t\tsuper.menuPut(\"tree/open\", newJMenuItem(\"Open\", 'O', KeyEvent.VK_2, ActionEvent.SHIFT_MASK), x -> menuEdit.actionLoad(x));\r\n\t\tsuper.menuPut(\"tree/save\", newJMenuItem(\"Save\", 'S', KeyEvent.VK_3, ActionEvent.SHIFT_MASK), x -> menuEdit.actionSave(x));\r\n\t\tsuper.menuPut(\"tree/***1\", \"\");\r\n\t\tsuper.menuPut(\"tree/add\", newJMenuItem(\"Add\", 'A', KeyEvent.VK_4, ActionEvent.SHIFT_MASK), x -> menuEdit.actionAdd(x));\r\n\t\tsuper.menuPut(\"tree/remove\", newJMenuItem(\"Remove\", 'R', KeyEvent.VK_5, ActionEvent.SHIFT_MASK), x -> menuEdit.actionRemove(x));\r\n\t\tsuper.menuPut(\"tree/move\", newJMenuItem(\"Move\", 'V', KeyEvent.VK_6, ActionEvent.SHIFT_MASK), x -> menuEdit.actionMove(x));\r\n\t\t\r\n\t\tsuper.menuPut(\"graph\", newJMenu(\"Graph\", 'G'));\r\n\t\tsuper.menuPut(\"graph/new\", newJMenuItem(\"New\", 'N', KeyEvent.VK_1, ActionEvent.CTRL_MASK), x -> menuHelp.actionNew(x));\r\n\t\tsuper.menuPut(\"graph/open\", newJMenuItem(\"Open\", 'O', KeyEvent.VK_2, ActionEvent.CTRL_MASK), x -> menuHelp.actionOpen(x));\r\n\t\tsuper.menuPut(\"graph/save\", newJMenuItem(\"Save\", 'S', KeyEvent.VK_3, ActionEvent.CTRL_MASK), x -> menuHelp.actionSave(x));\r\n\t\tsuper.menuPut(\"graph/***1\", \"\");\r\n\t\tsuper.menuPut(\"graph/add-node\", newJMenuItem(\"Add node\", 'A', KeyEvent.VK_4, ActionEvent.CTRL_MASK), x -> menuHelp.actionAddNode(x));\r\n\t\tsuper.menuPut(\"graph/remove-node\", newJMenuItem(\"Remove node\", 'R', KeyEvent.VK_5, ActionEvent.CTRL_MASK), x -> menuHelp.actionRemoveNode(x));\r\n\t\tsuper.menuPut(\"graph/move-node\", newJMenuItem(\"Move node\", 'V', KeyEvent.VK_6, ActionEvent.CTRL_MASK), x -> menuHelp.actionMoveNode(x));\r\n\t\tsuper.menuPut(\"graph/***2\", \"\");\r\n\t\tsuper.menuPut(\"graph/add-link\", newJMenuItem(\"Add link\", 'D', KeyEvent.VK_7, ActionEvent.CTRL_MASK), x -> menuHelp.actionAddLink(x));\r\n\t\tsuper.menuPut(\"graph/remove-link\", newJMenuItem(\"Remove link\", 'L', KeyEvent.VK_8, ActionEvent.CTRL_MASK), x -> menuHelp.actionRemoveLink(x));\r\n\t\t\r\n\t\tsuper.menuDump();\t\t\r\n\t}", "void askMenu();", "public void menu() {\n System.out.println(\n \" Warehouse System\\n\"\n + \" Stage 3\\n\\n\"\n + \" +--------------------------------------+\\n\"\n + \" | \" + ADD_CLIENT + \")\\tAdd Client |\\n\"\n + \" | \" + ADD_PRODUCT + \")\\tAdd Product |\\n\"\n + \" | \" + ADD_SUPPLIER + \")\\tAdd Supplier |\\n\"\n + \" | \" + ACCEPT_SHIPMENT + \")\\tAccept Shipment from Supplier |\\n\"\n + \" | \" + ACCEPT_ORDER + \")\\tAccept Order from Client |\\n\"\n + \" | \" + PROCESS_ORDER + \")\\tProcess Order |\\n\"\n + \" | \" + CREATE_INVOICE + \")\\tInvoice from processed Order |\\n\"\n + \" | \" + PAYMENT + \")\\tMake a payment |\\n\"\n + \" | \" + ASSIGN_PRODUCT + \")\\tAssign Product to Supplier |\\n\"\n + \" | \" + UNASSIGN_PRODUCT + \")\\tUnssign Product to Supplier |\\n\"\n + \" | \" + SHOW_CLIENTS + \")\\tShow Clients |\\n\"\n + \" | \" + SHOW_PRODUCTS + \")\\tShow Products |\\n\"\n + \" | \" + SHOW_SUPPLIERS + \")\\tShow Suppliers |\\n\"\n + \" | \" + SHOW_ORDERS + \")\\tShow Orders |\\n\"\n + \" | \" + GET_TRANS + \")\\tGet Transaction of a Client |\\n\"\n + \" | \" + GET_INVOICE + \")\\tGet Invoices of a Client |\\n\"\n + \" | \" + SAVE + \")\\tSave State |\\n\"\n + \" | \" + MENU + \")\\tDisplay Menu |\\n\"\n + \" | \" + EXIT + \")\\tExit |\\n\"\n + \" +--------------------------------------+\\n\");\n }", "public startingMenu() {\r\n initComponents();\r\n }", "private void menu(){\n System.out.println(\"\");\n System.out.println(\"Round: \"+round);\n System.out.println(\"Please choose your action: \");\n\n Scanner tokenizer = parser.getCommand(); // prompt the user to put a new command in\n Command command = parser.parseCommand(tokenizer); // send the \"scanner\" result to make it into a command\n processCommand(command); // process the command\n\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 678, 450);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tframe.setJMenuBar(menuBar);\n\t\t\n\t\tmnuAcciones = new JMenu(\"Acciones\");\n\t\tmenuBar.add(mnuAcciones);\n\t\t\n\t\tmnuABMCPersona = new JMenuItem(\"ABMC de Personas\");\n\t\tmnuABMCPersona.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuABMCPersonaClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(mnuABMCPersona);\n\t\t\n\t\tnuABMCTipoElemento = new JMenuItem(\"ABMC de Tipos de Elemento\");\n\t\tnuABMCTipoElemento.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuABMCTipoElementoClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuABMCTipoElemento);\n\t\t\n\t\tnuABMCElemento = new JMenuItem(\"ABMC de Elementos\");\n\t\tnuABMCElemento.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tmnuABMCElementoClick();\n\t\t\t\t} catch (Exception 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\tmnuAcciones.add(nuABMCElemento);\n\t\t\n\t\tnuAReserva = new JMenuItem(\"Hacer una Reserva\");\n\t\tnuAReserva.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tmnuAReservaClick();\n\t\t\t\t} catch (Exception 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\tmnuAcciones.add(nuAReserva);\n\t\t\n\t\tnuCBReserva = new JMenuItem(\"Listado de Reservas\");\n\t\tnuCBReserva.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmnuListadoPersonaClick();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuCBReserva);\n\t\t\n\t\tnuSalir = new JMenuItem(\"Salir\");\n\t\tnuSalir.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsalir();\n\t\t\t}\n\t\t});\n\t\tmnuAcciones.add(nuSalir);\n\t\tframe.getContentPane().setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tdesktopPane = new JDesktopPane();\n\t\tframe.getContentPane().add(desktopPane, BorderLayout.CENTER);\n\t}", "public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }", "private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}", "public void initDefaultCommand() {\n \tsetDefaultCommand(new SetCanMove());\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n }", "public void generateMenu(){\n\t\tmenuBar = new JMenuBar();\n\n\t\tJMenu file = new JMenu(\"File\");\n\t\tJMenu tools = new JMenu(\"Tools\");\n\t\tJMenu help = new JMenu(\"Help\");\n\n\t\tJMenuItem open = new JMenuItem(\"Open \");\n\t\tJMenuItem save = new JMenuItem(\"Save \");\n\t\tJMenuItem exit = new JMenuItem(\"Exit \");\n\t\tJMenuItem preferences = new JMenuItem(\"Preferences \");\n\t\tJMenuItem about = new JMenuItem(\"About \");\n\n\n\t\tfile.add(open);\n\t\tfile.add(save);\n\t\tfile.addSeparator();\n\t\tfile.add(exit);\n\t\ttools.add(preferences);\n\t\thelp.add(about);\n\n\t\tmenuBar.add(file);\n\t\tmenuBar.add(tools);\n\t\tmenuBar.add(help);\n\t}", "public void init() {\n\t\tMenu menu = new Menu();\n\t\tmenu.register();\n\n\t\t// Application.getInstance().getGUILog().showMessage(\"Show a popup the proper\n\t\t// way !\");\n\n\t\t// final ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\n\t\t// final MDAction action = new ExampleAction();\n\t\t// Adding action to main menu\n\t\t// manager.addMainMenuConfigurator(new MainMenuConfigurator(action));\n\t\t// Adding action to main toolbar\n\t\t// manager.addMainToolbarConfigurator(new MainToolbarConfigurator(action));\n\n\t\t// pluginDir = getDescriptor().getPluginDirectory().getPath();\n\n\t\t// Creating submenu in the MagicDraw main menu\n\t\t// ActionsConfiguratorsManager manager =\n\t\t// ActionsConfiguratorsManager.getInstance();\n\t\t// manager.addMainMenuConfigurator(new\n\t\t// MainMenuConfigurator(getSubmenuActions()));\n\n\t\t/**\n\t\t * @Todo: load project options (@see myplugin.generator.options.ProjectOptions)\n\t\t * from ProjectOptions.xml and take ejb generator options\n\t\t */\n\n\t\t// for test purpose only:\n\t\t// GeneratorOptions ejbOptions = new GeneratorOptions(\"c:/temp\", \"ejbclass\",\n\t\t// \"templates\", \"{0}.java\", true, \"ejb\");\n\t\t// ProjectOptions.getProjectOptions().getGeneratorOptions().put(\"EJBGenerator\",\n\t\t// ejbOptions);\n\n\t\t// ejbOptions.setTemplateDir(pluginDir + File.separator +\n\t\t// ejbOptions.getTemplateDir()); //apsolutna putanja\n\t}", "private void loadGUI() {\n JMenuItem tmp;\n Font font = new Font(\"Arial\", Font.ITALIC, 10);\n \n // Project menu\n projectMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected project\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n projectMenu.add(tmp);\n projectMenu.addSeparator();\n \n properties = new JMenuItem(\"Properties\");\n properties.addActionListener(this);\n projectMenu.add(properties);\n \n reimport = new JMenuItem(\"Re-Import Files\");\n reimport.addActionListener(this);\n projectMenu.add(reimport);\n \n removeProject = new JMenuItem(\"Remove project\");\n removeProject.addActionListener(this);\n projectMenu.add(removeProject);\n \n // Directory menu\n dirMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected directory\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n dirMenu.add(tmp);\n dirMenu.addSeparator();\n \n removeDir = new JMenuItem(\"Remove from project\");\n removeDir.addActionListener(this);\n dirMenu.add(removeDir);\n \n deleteDir = new JMenuItem(\"Delete from disk\");\n deleteDir.addActionListener(this);\n dirMenu.add(deleteDir);\n \n renameDir = new JMenuItem(\"Rename\");\n renameDir.addActionListener(this);\n dirMenu.add(renameDir);\n \n // File menu\n fileMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected file\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n fileMenu.add(tmp);\n fileMenu.addSeparator();\n \n removeFile = new JMenuItem(\"Remove from project\");\n removeFile.addActionListener(this);\n fileMenu.add(removeFile);\n \n deleteFile = new JMenuItem(\"Delete from disk\");\n deleteFile.addActionListener(this);\n fileMenu.add(deleteFile);\n \n renameFile = new JMenuItem(\"Rename\");\n renameFile.addActionListener(this);\n fileMenu.add(renameFile);\n\t\n\t // sutter2k: need to tap in here for preview in browser\n miLaunchBrowser= new JMenuItem(\"Preview in Browser\");\n miLaunchBrowser.addActionListener(this);\n fileMenu.add(miLaunchBrowser);\n\t\n // Menu to show when multiple nodes are selected\n multipleSelMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Multiple selection\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n multipleSelMenu.add(tmp);\n multipleSelMenu.addSeparator();\n \n removeMulti = new JMenuItem(\"Remove from project\");\n removeMulti.addActionListener(this);\n multipleSelMenu.add(removeMulti);\n \n deleteMulti = new JMenuItem(\"Delete from disk\");\n deleteMulti.addActionListener(this);\n multipleSelMenu.add(deleteMulti);\n \n }", "protected abstract void addMenuOptions();", "public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }", "public void controllerMenu(){\n\t\tint option=1;\n\t\t\n\t\twhile(option!=0){ \n\t\t\tSystem.out.println(\"You are in the air controller menu\");\n\t\t\tSystem.out.println(\"Write the number corresponding to the action you quant to perform:\");\n\t\t\tSystem.out.println(\"1. Add plane (basic info)\");\n\t\t\tSystem.out.println(\"2. Add detailed information of a plane\");\n\t\t\tSystem.out.println(\"3. Show airspace\");\n\t\t\tSystem.out.println(\"4. Encrypt plane\");\n\t\t\tSystem.out.println(\"5. Decrypt plane\");\n\t\t\tSystem.out.println(\"Press 0 to exit\");\n\t\t\t\n\t\t\toption = entry.nextInt();\n\t\t\t\n\t\t\tswitch(option){\t// switch with a method for each operation\n\t\t\t\tcase 1: \n\t\t\t\t\taddPlane();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: \n\t\t\t\t\tafegirInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: \n\t\t\t\t\tdisplayInfo();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: \n\t\t\t\t\tencrypt();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tdesencriptar();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void initMenu() {\n\t\tloadImage();\r\n\t\t// Add listeners to buttons\r\n\t\tstartGame.addActionListener(new StartGameListener());\r\n\t\texitGame.addActionListener(new ExitGameListener());\r\n\t\t// Setting buttons in the middle of the screen\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\tGridBagConstraints gbc = new GridBagConstraints();\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 0;\r\n\t\tadd(startGame, gbc);\r\n\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy = 1;\r\n\t\t// Resize \"exitGame\" button to \"startGame\" button size\r\n\t\texitGame.setPreferredSize(startGame.getPreferredSize());\r\n\t\t// Set insets between two buttons in 100 px\r\n\t\tgbc.insets = new Insets(100, 0, 0, 0);\r\n\t\tadd(exitGame, gbc);\r\n\t}", "protected void initDefaultCommand() {\n\t\tsetDefaultCommand(CommandBase.scs);\r\n\t}", "public OptionsMenu() {\n\t\tsuper(OPTIONS_WINDOW_TITLE);\n\t\tQ = new Quoridor();\n\t\tinitialize();\n\t\tsetVisible(true);\n\t}", "private static void displayUserMenu() {\n\t\tSystem.out.println(\"\\t User Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"ar <reponame> : To add a new repo \\n\"\n\t\t\t\t+ \"dr <reponame> : To delete a repo \\n\"\n\t\t\t\t+ \"or <reponame> : To open repo \\n\"\n\t\t\t\t+ \"lr : To list repo \\n\"\n\t\t\t\t+ \"lo : To logout \\n\"\n\t\t\t\t+ \"====================================\\n\");\n\t}", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }", "public void printMenu()\n {\n String menu = (\"------------- Menu -------------\\nDisplay collection\\nCheck out materials\\nQuit\\n--------------------------------\\nPlease click one of the buttons to the right\");\n jTextPane1.setText(menu);\n jButton1.enableInputMethods(true);\n jButton2.enableInputMethods(true);\n jButton3.enableInputMethods(true);\n jButton4.enableInputMethods(false);\n }", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "private void setMenuBarMnemonics()\n {\n if (!OSUtil.IS_MAC)\n {\n // Menus\n if (this.menuFile.getText().length() > 0)\n this.menuFile.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile\").charAt(0));\n if (this.menuProfiles.getText().length() > 0)\n this.menuProfiles.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuProfiles\").charAt(0));\n if (this.menuHelp.getText().length() > 0)\n this.menuHelp.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp\").charAt(0));\n // File sub menus\n if (this.menuFile_Parameters.getText().length() > 0)\n this.menuFile_Parameters.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Parameters\").charAt(0));\n if (this.menuFile_Quit.getText().length() > 0)\n this.menuFile_Quit.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Quit\").charAt(0));\n // Help sub menus\n if (this.menuHelp_Update.getText().length() > 0)\n this.menuHelp_Update.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Update\").charAt(0));\n if (this.menuHelp_Doc.getText().length() > 0)\n this.menuHelp_Doc.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Doc\").charAt(0));\n if (this.menuHelp_FAQ.getText().length() > 0)\n this.menuHelp_FAQ.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_FAQ\").charAt(0));\n if (this.menuHelp_About.getText().length() > 0)\n this.menuHelp_About.setMnemonic(I18nUtil.getInstance().getI18nMsg(\"fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_About\").charAt(0));\n }\n }", "private void createMenu(){\n \n menuBar = new JMenuBar();\n \n game = new JMenu(\"Rummy\");\n game.setMnemonic('R');\n \n newGame = new JMenuItem(\"New Game\");\n newGame.setMnemonic('N');\n newGame.addActionListener(menuListener);\n \n \n \n exit = new JMenuItem(\"Exit\");\n exit.setMnemonic('E');\n exit.addActionListener(menuListener); \n \n \n \n }", "@Override\r\n public void actionPerformed(ActionEvent ae) {\r\n String option = ae.getActionCommand();\r\n PracticaProgramacion3Swing.log.append(ae.getActionCommand()+\"\\n\");\r\n switch(option){\r\n \r\n case \"Crear txt\":\r\n \r\n FuncionesMenus.newFile();\r\n FuncionesMenus.listFiles(); \r\n break;\r\n \r\n case \"Crear bin\":\r\n FuncionesMenus.newFileBin();\r\n FuncionesMenus.listFiles(); \r\n break;\r\n \r\n case \"Eliminar txt\":\r\n case \"Eliminar bin\": \r\n FuncionesMenus.delFile();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n case \"Renombrar txt\":\r\n case \"Renombrar bin\":\r\n FuncionesMenus.renameFile();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n case \"Escribir dni\":\r\n FuncionesMenus.writeLine();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Escribir DNI\":\r\n FuncionesMenus.writeLineBin();\r\n FuncionesMenus.listFiles();\r\n \r\n case \"Buscar dni\":\r\n FuncionesMenus.getID();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n case \"Buscar DNI\":\r\n FuncionesMenus.getIDBin();\r\n FuncionesMenus.listFiles();\r\n \r\n case \"Eliminar dni\":\r\n FuncionesMenus.delLine();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Eliminar DNI\":\r\n FuncionesMenus.delLineBin();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Extraer ficheros\": \r\n FuncionesMenus.getFiles();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Almacenar\":\r\n FuncionesMenus.getAll();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n default:\r\n break;\r\n } \r\n }", "private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "public abstract Menu execute(String commandKey);", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\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 mnbMenuBar = new javax.swing.JMenuBar();\n mnuManage = new javax.swing.JMenu();\n mniEmpoyee = new javax.swing.JMenuItem();\n mniStudent = new javax.swing.JMenuItem();\n mniBook = new javax.swing.JMenuItem();\n mnuLoan = new javax.swing.JMenu();\n mniLoanBook = new javax.swing.JMenuItem();\n mnuFine = new javax.swing.JMenu();\n mniFineStudent = new javax.swing.JMenuItem();\n mnuAbout = new javax.swing.JMenu();\n mniSystem = new javax.swing.JMenuItem();\n mniLicense = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Library\");\n\n mnbMenuBar.setBorder(null);\n mnbMenuBar.setFont(new java.awt.Font(\"Ubuntu\", 0, 18)); // NOI18N\n\n mnuManage.setText(\"Manage\");\n mnuManage.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mnuManage.setPreferredSize(new java.awt.Dimension(75, 23));\n\n mniEmpoyee.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniEmpoyee.setText(\"Employee\");\n mniEmpoyee.setBorder(null);\n mniEmpoyee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniEmpoyeeActionPerformed(evt);\n }\n });\n mnuManage.add(mniEmpoyee);\n\n mniStudent.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniStudent.setText(\"Student\");\n mniStudent.setBorder(null);\n mniStudent.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniStudentActionPerformed(evt);\n }\n });\n mnuManage.add(mniStudent);\n\n mniBook.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniBook.setText(\"Book\");\n mniBook.setBorder(null);\n mniBook.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniBookActionPerformed(evt);\n }\n });\n mnuManage.add(mniBook);\n\n mnbMenuBar.add(mnuManage);\n\n mnuLoan.setText(\"Loan\");\n mnuLoan.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mnuLoan.setPreferredSize(new java.awt.Dimension(53, 23));\n\n mniLoanBook.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniLoanBook.setText(\"Book\");\n mniLoanBook.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniLoanBookActionPerformed(evt);\n }\n });\n mnuLoan.add(mniLoanBook);\n\n mnbMenuBar.add(mnuLoan);\n\n mnuFine.setText(\"Fine\");\n mnuFine.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mnuFine.setPreferredSize(new java.awt.Dimension(49, 23));\n\n mniFineStudent.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniFineStudent.setText(\"Student\");\n mniFineStudent.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniFineStudentActionPerformed(evt);\n }\n });\n mnuFine.add(mniFineStudent);\n\n mnbMenuBar.add(mnuFine);\n\n mnuAbout.setText(\"About\");\n mnuAbout.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mnuAbout.setPreferredSize(new java.awt.Dimension(61, 19));\n\n mniSystem.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniSystem.setText(\"System\");\n mniSystem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniSystemActionPerformed(evt);\n }\n });\n mnuAbout.add(mniSystem);\n\n mniLicense.setFont(new java.awt.Font(\"Ubuntu\", 0, 16)); // NOI18N\n mniLicense.setText(\"License\");\n mniLicense.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n mniLicenseActionPerformed(evt);\n }\n });\n mnuAbout.add(mniLicense);\n\n mnbMenuBar.add(mnuAbout);\n\n setJMenuBar(mnbMenuBar);\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 .addGap(0, 1000, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 677, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public void menu() {\n\t\tstate.menu();\n\t}", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "public MenuAdminGUI() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setVisible(true);\n }", "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }", "public void createMenus()\n {\n EventQueueUtilities.runOnEDT(this::createMenusNow);\n }", "private void registerCommands(){\n getCommand(\"mineregion\").setExecutor(new MineRegionCommand());\n getCommand(\"cellblock\").setExecutor(new CellBlockCommand());\n getCommand(\"cell\").setExecutor(new CellCommand());\n getCommand(\"prisonblock\").setExecutor(new PrisonBlockCommand());\n getCommand(\"rankup\").setExecutor(new RankUpCommand());\n getCommand(\"portal\").setExecutor(new PortalCommand());\n }", "public void setDefaultAttributes() {\n\t\t// sets window information and basic graphical attributes\n\t\tthis.setBounds(50, 50, 1000, 700);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setVisible(true);\n\t\tthis.setTitle(\"Siemens Intuitive Interface\");\n\t\tthis.setBackground(Color.WHITE);\n\t\tthis.setForeground(Color.BLACK);\n\t\tgetContentPane().setLayout(null);\n\t\tthis.setFont(new Font(\"Tahoma\", Font.PLAIN, 24));\n\n\t\t// adds menu items\n\t\tsetJMenuBar(menuBar);\n\n\t\tJMenu fileMenu = new JMenu(\"File\");\n\t\tsubMenuFrameDock = new JMenu(\"Frames Dock/UnDock\");\n\t\tsubMenuGenFrame = new JMenu(\"Show Frames\");\n\n\t\tmItemNew = fileMenu.add(\"New\");\n\t\tmItemNew.addActionListener(this);\n\t\tmItemNew.setActionCommand(\"new\");\n\n\t\tmItemLoad = fileMenu.add(\"Open\");\n\t\tmItemLoad.addActionListener(this);\n\t\tmItemLoad.setActionCommand(\"open\");\n\n\t\tmItemSave = fileMenu.add(\"Save\");\n\t\tmItemSave.addActionListener(this);\n\t\tmItemSave.setActionCommand(\"save\");\n\n\t\tmItemRun = fileMenu.add(\"Run\");\n\t\tmItemRun.addActionListener(this);\n\t\tmItemRun.setActionCommand(\"run\");\n\n\t\t\n\t\tmItemGenCode = new JMenuItem(\"Generate Code\");\n\t\tmItemGenCode.addActionListener(this);\n\t\tmItemGenCode.setActionCommand(\"genCode\");\n\t\t\n\t\tmItemPreferences = fileMenu.add(\"Preferences\");\n\t\tmItemPreferences.addActionListener(this);\n\t\tmItemPreferences.setActionCommand(\"settings\");\n\n\t\t// ------------------------------------------------------------------------------------------------------------------------------\n\t\ti_console_DockFrame = new JMenuItem(\"i_console Dock/Undock\");\n\t\tsubMenuFrameDock.add(i_console_DockFrame);\n\t\ti_console_DockFrame.addActionListener(this);\n\t\ti_console_DockFrame.setActionCommand(\"i_console_Dock/Undock\");\n\n\t\ti_palette_DockFrame = new JMenuItem(\"i_palette Dock/Undock\");\n\t\tsubMenuFrameDock.add(i_palette_DockFrame);\n\t\ti_palette_DockFrame.addActionListener(this);\n\t\ti_palette_DockFrame.setActionCommand(\"i_palette_Dock/Undock\");\n\n\t\t// --------------------------------------------------------------------------------------------------------------------------------\n\n\t\tshow_i_console = new JMenuItem(\"show i_console\");\n\t\tsubMenuGenFrame.add(show_i_console);\n\t\tshow_i_console.addActionListener(this);\n\t\tshow_i_console.setActionCommand(\"show i_console\");\n\n\t\tshow_i_palette = new JMenuItem(\"show i_palette\");\n\t\tsubMenuGenFrame.add(show_i_palette);\n\t\tshow_i_palette.addActionListener(this);\n\t\tshow_i_palette.setActionCommand(\"show i_palette\");\n\n\t\tfileMenu.add(subMenuFrameDock);\n\t\tfileMenu.add(subMenuGenFrame);\n\n\t\tfileMenu.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\trightMenuClick = true;\n\t\t\t}\n\t\t});\n\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(mItemGenCode);\n\t\t\t\n\t}", "public static void initMenuBars()\n\t{\n\t\tmenuBar = new JMenuBar();\n\n\t\t//Build the first menu.\n\t\tmenu = new JMenu(\"Options\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"The only menu in this program that has menu items\");\n\t\tmenuBar.add(menu);\n\n\t\t//a group of JMenuItems\n\t\tmenuItem = new JMenuItem(\"Quit\",\n\t\t KeyEvent.VK_T);\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_1, ActionEvent.ALT_MASK));\n\t\tmenuItem.getAccessibleContext().setAccessibleDescription(\n\t\t \"This doesn't really do anything\");\n\t\tmenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Both text and icon\",\n\t\t new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_B);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(new ImageIcon(\"images/middle.gif\"));\n\t\tmenuItem.setMnemonic(KeyEvent.VK_D);\n\t\tmenu.add(menuItem);\n\n\t\t//a group of radio button menu items\n\t\tmenu.addSeparator();\n\t\tButtonGroup group = new ButtonGroup();\n\t\trbMenuItem = new JRadioButtonMenuItem(\"A radio button menu item\");\n\t\trbMenuItem.setSelected(true);\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_R);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\trbMenuItem = new JRadioButtonMenuItem(\"Another one\");\n\t\trbMenuItem.setMnemonic(KeyEvent.VK_O);\n\t\tgroup.add(rbMenuItem);\n\t\tmenu.add(rbMenuItem);\n\n\t\t//a group of check box menu items\n\t\tmenu.addSeparator();\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"A check box menu item\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_C);\n\t\tmenu.add(cbMenuItem);\n\n\t\tcbMenuItem = new JCheckBoxMenuItem(\"Another one\");\n\t\tcbMenuItem.setMnemonic(KeyEvent.VK_H);\n\t\tmenu.add(cbMenuItem);\n\n\t\t//a submenu\n\t\tmenu.addSeparator();\n\t\tsubmenu = new JMenu(\"A submenu\");\n\t\tsubmenu.setMnemonic(KeyEvent.VK_S);\n\n\t\tmenuItem = new JMenuItem(\"An item in the submenu\");\n\t\tmenuItem.setAccelerator(KeyStroke.getKeyStroke(\n\t\t KeyEvent.VK_2, ActionEvent.ALT_MASK));\n\t\tsubmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(\"Another item\");\n\t\tsubmenu.add(menuItem);\n\t\tmenu.add(submenu);\n\n\t\t//Build second menu in the menu bar.\n\t\tmenu = new JMenu(\"Another Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_N);\n\t\tmenu.getAccessibleContext().setAccessibleDescription(\n\t\t \"This menu does nothing\");\n\t\tmenuBar.add(menu);\n\t}", "public void run(){\n int selection = -1;\n super.myConsole.listOptions(menuOptions);\n selection = super.myConsole.getInputOption(menuOptions);\n branchMenu(selection);\n }", "private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }", "private static void displayRepoMenu() {\n\t\tSystem.out.println(\"\\t Repo Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"su <username> : To subcribe users to repo \\n\"\n\t\t\t\t+ \"ci: To check in changes \\n\"\n\t\t\t\t+ \"co: To check out changes \\n\"\n\t\t\t\t+ \"rc: To review change \\n\"\n\t\t\t\t+ \"vh: To get revision history \\n\"\n\t\t\t\t+ \"re: To revert to previous version \\n\"\n\t\t\t\t+ \"ld : To list documents \\n\"\n\t\t\t\t+ \"ed <docname>: To edit doc \\n\"\n\t\t\t\t+ \"ad <docname>: To add doc \\n\"\n\t\t\t\t+ \"dd <docname>: To delete doc \\n\"\n\t\t\t\t+ \"vd <docname>: To view doc \\n\"\n\t\t\t\t+ \"qu : To quit \\n\" \n\t\t\t\t+ \"====================================\\n\");\n\t}", "private void printMenu() {\n\t\tSystem.out.printf(\"\\n********** MiRide System Menu **********\\n\\n\");\n\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Create Car\", \"CC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Book Car\", \"BC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Complete Booking\", \"CB\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Display ALL Cars\", \"DA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Specific Car\", \"SS\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Search Available Cars\", \"SA\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Seed Data\", \"SD\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Load Cars\", \"LC\");\n\t\tSystem.out.printf(\"%-30s %s\\n\", \"Exit Program\", \"EX\");\n\t\tSystem.out.println(\"\\nEnter your selection: \");\n\t\tSystem.out.println(\"(Hit enter to cancel any operation)\");\n\t}", "public void createActions(IMenuManager manager)\r\n\t{\r\n\t\tEditPart ep = main.getViewer().findObjectAt(clickLocation);\r\n\r\n\t\tif (ep instanceof RootEditPart)\r\n\t\t{\r\n\t\t\t// GRAPH POPUP\r\n\r\n\t\t\tboolean sif = false;\r\n\t\t\tboolean tcgasif = false;\r\n\t\t\tboolean basicsif = false;\r\n\t\t\tObject o = ((ChsRootEditPart) ep.getChildren().get(0)).getModel();\r\n\t\t\tif (o instanceof BasicSIFGraph || o instanceof org.gvt.model.sifl3.SIFGraph)\r\n\t\t\t{\r\n\t\t\t\tsif = true;\r\n\t\t\t\tbasicsif = o instanceof BasicSIFGraph;\r\n\r\n\t\t\t\ttcgasif = TCGASIFAction.okToRun(main, false);\r\n\t\t\t}\r\n\r\n\t\t\tif (tcgasif)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new ShowMutexGroupsAction(main));\r\n\t\t\t\tmanager.add(new HighlightTCGACaseAction(main));\r\n\t\t\t\tmanager.add(new UpdateTCGASIFForACaseAction(main));\r\n\t\t\t\tmanager.add(new LoadTCGASpecificReactionsAction(main));\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tif (basicsif)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new ShowFormatSeriesAction(main));\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tif (sif)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new ShowDruggableAction(main));\r\n\t\t\t\tmanager.add(new HighlightCOSMICGenesActions(main));\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tClosePathwayAction action = new ClosePathwayAction(main);\r\n\t\t\tif (sif) action.setText(\"Close Graph\");\r\n\t\t\tmanager.add(action);\r\n\r\n\t\t\tif (!sif)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new DuplicatePathwayAction(main));\r\n\t\t\t\tmanager.add(new DeletePathwayAction(main));\r\n\t\t\t\tmanager.add(new UpdatePathwayAction(main, false));\r\n\t\t\t}\r\n\t\t\tmanager.add(new Separator());\r\n\r\n\t\t\tif (ChisioMain.cBioPortalAccessor != null)\r\n\t\t\t{\r\n\t\t\t\tmanager.add(new FetchFromCBioPortalAction(main,\r\n\t\t\t\t\tFetchFromCBioPortalAction.CURRENT_STUDY));\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tmanager.add(new ZoomAction(main, 1, null));//clickLocation));\r\n\t\t\tmanager.add(new ZoomAction(main, -1, null));//clickLocation));\r\n\t\t\tmanager.add(new Separator());\r\n\t\t\tmanager.add(new RemoveHighlightsAction(main));\r\n\t\t\tmanager.add(new InspectorAction(main, true));\r\n\t\t\tmanager.add(new Separator());\r\n\t\t\tmanager.add(new LayoutInspectorAction(main));\r\n\t\t\tmain.getViewer().select(ep);\r\n\t\t}\r\n\t\telse if (ep instanceof NodeEditPart)\r\n\t\t{\r\n\t\t\t// NODE-COMPOUND POPUP\r\n\r\n\t\t\tObject o = ep.getModel();\r\n\t\t\tif ((o instanceof BasicSIFGroup && !((BasicSIFGroup) o).getMediators().isEmpty()) ||\r\n\t\t\t\t(o instanceof SIFGroup && !((SIFGroup) o).getMediators().isEmpty()))\r\n\t\t\t{\r\n\t\t\t\tQueryPCGetAction query = new QueryPCGetAction(main, true, QueryPCAction.QueryLocation.PC_MECH);\r\n\t\t\t\tquery.setText(\"Detailed View\");\r\n\t\t\t\tmanager.add(query);\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tExperimentData data = DataLegendAction.getData((NodeModel) o, main);\r\n\t\t\tif (data != null)\r\n\t\t\t\tmanager.add(new DataLegendAction(main, data));\r\n\r\n\t\t\tmanager.add(new HighlightSelectedAction(main));\r\n\t\t\tmanager.add(new RemoveHighlightFromSelectedAction(main));\r\n\t\t\tmanager.add(new DeleteAction(main));\r\n\t\t\tmanager.add(new InspectorAction(main, false));\r\n\t\t\tmanager.add(new Separator());\r\n\r\n\t\t\tMenuManager localQueryMenu = new MenuManager(\"&Local Query\");\r\n\t\t\tlocalQueryMenu.add(new LocalNeighborhoodQueryAction(main, true));\r\n\t\t\tlocalQueryMenu.add(new LocalGoIQueryAction(main, true));\r\n\t\t\tlocalQueryMenu.add(new LocalCommonStreamQueryAction(main, true));\r\n\t\t\tmanager.add(localQueryMenu);\r\n\r\n\t\t\tMenuManager pcQueryMenu = new MenuManager(\"&Pathway Commons Query (Level 3)\");\r\n\t\t\tMenuManager neighMenu = new MenuManager(\"&Neighborhood\");\r\n\t\t\tneighMenu.add(new QueryPCNeighborsAction(main, false, true, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tneighMenu.add(new QueryPCNeighborsAction(main, true, false, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tneighMenu.add(new QueryPCNeighborsAction(main, true, true, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tpcQueryMenu.add(neighMenu);\r\n\t\t\tpcQueryMenu.add(new QueryPCPathsBetweenAction(main, true, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tMenuManager commStreamMenu = new MenuManager(\"&Common Stream\");\r\n\t\t\tcommStreamMenu.add(new QueryPCCommonStreamAction(main, true, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tcommStreamMenu.add(new QueryPCCommonStreamAction(main, false, QueryPCAction.QueryLocation.PC_MECH));\r\n\t\t\tpcQueryMenu.add(commStreamMenu);\r\n manager.add(pcQueryMenu);\r\n\r\n NodeEditPart nep = (NodeEditPart) ep;\r\n Object model = nep.getModel();\r\n CBioPortalAccessor portalAccessor = ChisioMain.cBioPortalAccessor;\r\n\r\n if( (model instanceof Actor || model instanceof BasicSIFNode || model instanceof SIFNode)\r\n && main.hasExperimentData(ExperimentData.CBIOPORTAL_ALTERATION_DATA)\r\n && portalAccessor != null\r\n && !portalAccessor.getCurrentGeneticProfiles().isEmpty() )\r\n {\r\n manager.add(new Separator());\r\n manager.add(new CBioPortalDataStatisticsAction(main));\r\n }\r\n }\r\n\t\telse if (ep instanceof ChsEdgeEditPart)\r\n\t\t{\r\n\t\t\t// EDGE POPUP\r\n\r\n\t\t\tObject o = ep.getModel();\r\n\t\t\tif (o instanceof BasicSIFEdge || o instanceof SIFEdge)\r\n\t\t\t{\r\n\t\t\t\tQueryPCGetAction query = new QueryPCGetAction(main, true, QueryPCAction.QueryLocation.PC_MECH);\r\n\t\t\t\tquery.setText(\"Detailed View\");\r\n\t\t\t\tmanager.add(query);\r\n\t\t\t\tmanager.add(new Separator());\r\n\t\t\t}\r\n\r\n\t\t\tmanager.add(new HighlightSelectedAction(main));\r\n\t\t\tmanager.add(new RemoveHighlightFromSelectedAction(main));\r\n\t\t\tmanager.add(new DeleteAction(main));\r\n\t\t\tmanager.add(new InspectorAction(main, false));\r\n\t\t}\r\n\t}", "public void addMenus(GridBagLayout gridBagLayout) {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tthis.setJMenuBar(menuBar);\n\t\t\n\t\tJMenu mnFile = new JMenu(\"File\");\n\t\tmenuBar.add(mnFile);\n\t\t\n\t\tJMenu mnHelp = new JMenu(\"Help\");\n\t\tmenuBar.add(mnHelp);\n\t\t\n\t\tJMenuItem exit = new JMenuItem(\"Exit\", KeyEvent.VK_X);\n\t\tJMenuItem about = new JMenuItem(\"About\", KeyEvent.VK_A);\n\t\t\n\t\texit.setActionCommand(\"exit\");\n\t\tabout.setActionCommand(\"about\");\n\t\t\n\t\texit.addActionListener(new GUIAction());\n\t\tabout.addActionListener(new GUIAction());\n\t\t\n\t\tmnFile.add(exit);\n\t\tmnHelp.add(about);\n\t}", "public static void mainMenu() {\n\t\tStdDraw.setCanvasSize(600, 600);\n\t\tStdDraw.setScale(0, 1000);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tFont font = new Font(\"Sans Serif\", 20, 20);\n\t\tStdDraw.setFont(font);\n\t\tStdDraw.text(500, 850, \"Six Men Morris Game\");\n\t\tStdDraw.text(500, 750, \"Game Created By: \");\n\t\tStdDraw.text(500, 700, \"Phillip Pavlich, Prakhar Jalan, Dinesh Balakrishnan\");\n\t\tStdDraw.filledRectangle(500, 500, 205, 75);\n\t\tStdDraw.filledRectangle(500, 300, 205, 75);\n\t\tStdDraw.filledRectangle(500, 100, 205, 75);\n\t\t\n\t\tStdDraw.setFont();\n\t\tStdDraw.setPenColor(StdDraw.ORANGE);\n\t\tStdDraw.setPenRadius(0.05);\n\n\t\tStdDraw.filledRectangle(500, 500, 200, 70);\n\t\tStdDraw.filledRectangle(500, 300, 200, 70);\n\t\tStdDraw.filledRectangle(500, 100, 200, 70);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(500, 500, \"Start New Game\");\n\t\tStdDraw.text(500, 300, \"Continue Game\");\n\t\tStdDraw.text(500, 100, \"Load Saved Game\");\n\t}", "private String initialMenu(String command) {\n System.out.println(\"1: Show Arrays On/Off\");\n System.out.println(\"2: Time comparison\");\n System.out.println(\"x: Stop the program\\n\");\n\n command = scanner.nextLine();\n\n return command;\n }", "protected void init(){\n ac = new ButtonEventManager(this);\n \n nameField = new JTextField();\n \n done = new JButton(\"DONE\");\n back = new JButton(\"MAIN MENU\");\n quit = new JButton(\"QUIT\");\n \n done.setActionCommand(\"go to game menu after saving\");\n back.setActionCommand(\"go to the main menu\");\n quit.setActionCommand(\"quit the game\");\n \n Font font = new Font(\"Arial\", Font.PLAIN, 10);\n \n nameField.setFont(font);\n \n nameField.setBounds(2 * this.getWidth() / 3 - buttonWidth / 2, (int)(0.4 * this.getHeight() - textFieldHeight / 2), buttonWidth, textFieldHeight);\n \n done.setBounds((this.getWidth() / 2 - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n back.setBounds((this.getWidth() - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n quit.setBounds(3 * (this.getWidth() - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n \n done.addActionListener(ac);\n back.addActionListener(ac);\n quit.addActionListener(ac);\n \n add(nameField);\n \n add(done);\n add(back);\n add(quit);\n }", "public void initDefaultCommand() {\n \tsetDefaultCommand(new TestCommandEye());\n }" ]
[ "0.7504776", "0.7466636", "0.73664683", "0.73168314", "0.72840613", "0.72344613", "0.71977323", "0.7160817", "0.71432084", "0.7120409", "0.70620435", "0.7055859", "0.7051564", "0.7050939", "0.7045184", "0.7040075", "0.7016573", "0.70144916", "0.698608", "0.6954109", "0.69526684", "0.69506294", "0.69503117", "0.69413865", "0.69366467", "0.6916237", "0.6907867", "0.68999076", "0.68990684", "0.689374", "0.68845564", "0.6878942", "0.6870297", "0.6839065", "0.68273866", "0.681678", "0.68051934", "0.6796087", "0.6787925", "0.67828757", "0.67674625", "0.67645574", "0.6744537", "0.6740426", "0.6725596", "0.6722833", "0.6718269", "0.67001206", "0.6686514", "0.66723114", "0.665362", "0.66498756", "0.6643473", "0.6636398", "0.66287196", "0.66208786", "0.66124725", "0.6596987", "0.65937567", "0.65887886", "0.65747875", "0.65691304", "0.6565105", "0.65595686", "0.6528279", "0.65210295", "0.65182936", "0.6518037", "0.65174264", "0.6517299", "0.65135807", "0.6513274", "0.65114146", "0.6510166", "0.65097624", "0.65089613", "0.65061957", "0.649468", "0.6492507", "0.6491152", "0.6483958", "0.6480536", "0.6478166", "0.6475094", "0.6467623", "0.64668834", "0.64597356", "0.6457528", "0.64531106", "0.64500064", "0.64465225", "0.6443439", "0.6437212", "0.6437018", "0.64130163", "0.64089185", "0.6407956", "0.6405458", "0.6400345", "0.6398809", "0.6395781" ]
0.0
-1
set up the horizontal box for the bottom with relecvant buttons
private HBox setButtons() { Button btnNewBuild = new Button("First Building"); //button to select the first building btnNewBuild.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding = new Building(buildingString()); drawBuilding(); // then redraw the building } }); Button btnNewBuild2 = new Button("Second Building"); //Button to select the second building btnNewBuild2.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding = new Building(buildingString2()); drawBuilding(); // then redraw the building } }); Button btnStart = new Button("Start"); //button to start the animation btnStart.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { timer.start(); // whose action is to start the timer } }); Button btnStop = new Button("Pause"); //button to pause the animation btnStop.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { timer.stop(); // and its action to stop the timer } }); Button btnRestart = new Button("RstBuilding1"); // new button for restarting the first building btnRestart.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding = new Building(buildingString()); //calling the first building timer.stop(); //setting the animation to stop drawBuilding(); //redrawing the building } }); Button btnRestart2 = new Button("RstBuilding2"); // new button for restarting building 2 btnRestart2.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding = new Building(buildingString2()); //calling the second building timer.stop(); //setting the animation time to stop drawBuilding(); //redrawing the building } }); Button btnAdd = new Button("Another Person"); // new button for adding person btnAdd.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding.addPerson(); // and its action to stop the timer drawBuilding(); //re drawing the building } }); Button btnRemove = new Button("Remove A Person"); // new button for removing person btnRemove.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { theBuilding.removePerson(); // and its action to stop the timer drawBuilding(); // redrawing the buildinf } }); // now add these buttons + labels to a HBox HBox hbox = new HBox(new Label("Config: "), btnNewBuild, btnNewBuild2, new Label("Run: "), btnStart, btnStop, new Label("Person: "), btnAdd, btnRemove, new Label("RstBuildings: "), btnRestart, btnRestart2); return hbox; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HBox TableBottomBox()\n {\n HBox bottomBox = new HBox();\n bottomBox.setAlignment(Pos.BOTTOM_RIGHT);\n bottomBox.setSpacing(400);\n\n // add button to add to bottom box\n Button homeButton = new Button();\n homeButton.setPrefWidth(200);\n homeButton.setPrefHeight(50);\n homeButton.setText(\"Home\");\n \n homeButton.setOnMouseClicked((event -> {\n ui.goToScene(new HomeScene(ui));\n }));\n\n Button addNewButton = new Button();\n addNewButton.setPrefWidth(200);\n addNewButton.setPrefHeight(50);\n addNewButton.setText(\"Add New Hike\");\n \n addNewButton.setOnMouseClicked((event -> {\n ui.goToScene(new CreateHikeScene(ui));\n }));\n \n bottomBox.getChildren().addAll(addNewButton, homeButton);\n \n return bottomBox;\n }", "private void initBottom(BorderPane root) {\n // Make bottom box for buttons\n HBox bottomButtons = new HBox();\n bottomButtons.setPrefWidth(150);\n bottomButtons.setAlignment(Pos.CENTER);\n bottomButtons.setPadding(new Insets(0, 60, 20, 60));\n bottomButtons.setSpacing(50);\n\n // Report button\n Button downReportBut = new Button(\"Download Report\");\n downReportBut.setOnAction(e -> {\n downloadReport();\n });\n // Add to HBox\n bottomButtons.getChildren().addAll(downReportBut);\n\n // Add to root\n root.setBottom(bottomButtons);\n root.setPadding(new Insets(20));\n\n }", "public void layoutBottom() {\n\t\t// instantiate panel for bottom of display\n\t\tJPanel bottom = new JPanel(new GridLayout(3, 3));\n\n\t\t// add upper label, text field and button\n\t\tJLabel idLabel = new JLabel(\"Enter Class Id\");\n\t\tbottom.add(idLabel);\n\t\tidIn = new JTextField();\n\t\tbottom.add(idIn);\n\t\tJPanel panel1 = new JPanel();\n\t\taddButton = new JButton(\"Add\");\n\t\taddButton.addActionListener(this);\n\t\tpanel1.add(addButton);\n\t\tbottom.add(panel1);\n\n\t\t// add middle label, text field and button\n\t\tJLabel nmeLabel = new JLabel(\"Enter Class Name\");\n\t\tbottom.add(nmeLabel);\n\t\tclassIn = new JTextField();\n\t\tbottom.add(classIn);\n\t\tJPanel panel2 = new JPanel();\n\t\tdeleteButton = new JButton(\"Delete\");\n\t\tdeleteButton.addActionListener(this);\n\t\tpanel2.add(deleteButton);\n\t\tbottom.add(panel2);\n\n\t\t// add lower label text field and button\n\t\tJLabel tutLabel = new JLabel(\"Enter Tutor Name\");\n\t\tbottom.add(tutLabel);\n\t\ttutorIn = new JTextField();\n\t\tbottom.add(tutorIn);\n\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t}", "public HBox hbButtons() {\r\n\r\n HBox hbBottom = new HBox(10); //HBox for buttons at the bottom\r\n\r\n hbBottom.setAlignment(Pos.CENTER); //Set Buttoms to center\r\n hbBottom.setPadding(new Insets(10, 1, 1, 1)); //Padd it\r\n\r\n //SetId\r\n btnConfirm.setId(\"btn\");\r\n btnEdit.setId(\"btn\");\r\n\r\n //Add buttons to the bottom HBox\r\n hbBottom.getChildren().addAll(btnConfirm, btnEdit);\r\n\r\n //Handlers\r\n btnConfirm.setOnAction(new ConfirmHandler()); //Handler for confirm\r\n btnEdit.setOnAction(new EditHandler()); //Handler for edit\r\n\r\n return hbBottom;\r\n\r\n }", "private HBox addBottomBox() {\n HBox bottom = new HBox();\n bottom.setAlignment(Pos.CENTER_LEFT);\n bottom.setStyle(\"-fx-background-color: DAE6F3;\");\n\n HBox pB = new HBox();\n pB.setPrefWidth(300);\n TextField pT = getTextField(\"Plant\", \"Enter an Integer number for Plant <=30\", \"Enter a custom number for Plant quantity.\");\n pB.getChildren().add(pT);\n\n HBox tB = new HBox();\n TextField tT = getTextField(\"Yoshi\", \"Enter an Integer number for Yoshi <=30\", \"Enter a custom number for Yoshi quantity.\");\n tB.getChildren().add(tT);\n\n bottom.getChildren().addAll(pB, tB);\n return bottom;\n }", "private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }", "private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }", "public void setupBottomPanel() {\n\t\tURL url = getClass().getResource(\".coredata/background/BottomCenter.png\");\n\t\tchatSlot = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\turl = getClass().getResource(\".coredata/background/LeftTeamBans.png\");\n\t\tblueBanSlot = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\turl = getClass().getResource(\".coredata/background/RightTeamBans.png\");\n\t\tpurpleBanSlot = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));\n\t\tbottomPanel = new JLayeredPane();\n\t\tbottomPanel.setPreferredSize(new Dimension(1280, 243));\n\t\tJLabel blueBanLabel = new JLabel();\n\t\tJLabel chatLabel = new JLabel();\n\t\tJLabel purpleBanLabel = new JLabel();\n\t\tblueBanLabel.setIcon(blueBanSlot);\n\t\tchatLabel.setIcon(chatSlot);\n\t\tpurpleBanLabel.setIcon(purpleBanSlot);\n\t\tbottomPanel.add(blueBanLabel, new Integer(0));\n\t\tbottomPanel.add(chatLabel, new Integer(0));\n\t\tbottomPanel.add(purpleBanLabel, new Integer(0));\n\t\tquit = new JButton();\n\t\tquit.setName(\"quit\");\n\t\tquit.setOpaque(false);\n\t\tquit.addActionListener(this);\n\t\tquit.setBorderPainted(false);\n\t\tquit.setContentAreaFilled(false);\n\t\tquit.setBounds(27, 165, 240, 30);\n\t\tbottomPanel.add(quit, new Integer(1));\n\t\tcreateNoBanButton();\n\t\tadd(bottomPanel, BorderLayout.PAGE_END);\n\t\tblueBanLabel.setBounds(0, 0, 279, 243);\n\t\tchatLabel.setBounds(279, 0, 1004, 243);\n\t\tpurpleBanLabel.setBounds(1004, 0, 1280, 243);\n\t}", "public void makeBottomBox() {\n if (timePanel == null) {\n Util.spew (\"makeBottomBox: null timePanel\");\n return;\n }\n bottomBox = new VBox(\"bottomBox\", VBox.Border.TWO_PIXELS_LEFT_RIGHT_BOTTOM_BORDER);\n BoxConstraints bc = new BoxConstraints(\n BoxConstraints.Stretch.SPRING, BoxConstraints.Align.FILL);\n\n // Put the time panel in an HBox and add to the bottom box\n timeBox = new HBox(\"timeBox\", HBox.Border.ONE_PIXEL_BELOW_BORDER);\n timeBox.setBackground(Color.white);\n bc.stretchType = BoxConstraints.Stretch.SPRING;\n timeBox.add(timePanel, bc);\n bc.stretchType = BoxConstraints.Stretch.INCOMPRESSIBLE;\n bottomBox.add(timeBox, bc);\n\n timeBox.setVisible(timePanel.isVisible());\n }", "public void setBorderPaneBottomMain(BorderPane bp){\n GridPane numPad = new GridPane();\n bp.setBottom(numPad); \n numPad.getStyleClass().add(\"nodeBkg\");\n \n //numPad setting for responsive \n numPad.setAlignment(Pos.CENTER);\n numPad.prefWidthProperty().bind(bp.widthProperty());\n numPad.prefHeightProperty().bind(bp.heightProperty());\n numPad.setHgap(4.0);\n numPad.setVgap(4.0);\n numPad.setPadding(new Insets (15));\n \n\n // create columns and rows // not sure why but it offsets it to the right?????\n for (int i = 0; i < 4; i++) {\n ColumnConstraints column = new ColumnConstraints();\n column.setPercentWidth(25);\n numPad.getColumnConstraints().add(column);\n }\n\n // essentialy i am altering it until it works 100% is below the screen (not an issue if numpad is set to centre of the borderPane)\n for (int i = 0; i <= 4; i++) { // if set numpad to bottom of BorderPane added a row to fix it extending over bottom (if numpad was set to borderPane center this would not be included)\n RowConstraints row = new RowConstraints();\n if (i < 4){\n row.setPercentHeight(15); //15 x 4 = 60\n }else{\n row.setPercentHeight(25); // 25% for margin at the bottom row (invisable) leaves 15% somewhere\n }\n \n numPad.getRowConstraints().add(row);\n }\n \n \n \n \n // create buttons\n \n Button empty = new Button (Constants.EMPTY);\n Button empty1 = new Button (Constants.EMPTY);\n Button empty2 = new Button (Constants.EMPTY);\n Button empty3 = new Button (Constants.EMPTY);\n Button enter = new Button(Constants.ENTER);\n Button clear = new Button (Constants.CLEAR);\n Button pageReturn = new Button (Constants.RETURN);\n\n Button zero = new Button(Constants.ZERO);\n Button one = new Button(Constants.ONE);\n Button two = new Button(Constants.TWO);\n Button three = new Button(Constants.THREE);\n Button four = new Button(Constants.FOUR);\n Button five = new Button(Constants.FIVE);\n Button six = new Button(Constants.SIX);\n Button seven = new Button(Constants.SEVEN);\n Button eight = new Button(Constants.EIGHT);\n Button nine = new Button(Constants.NINE); \n\n\n\n\n // add buttons to numPad\n //collumn 1\n numPad.add(one,0,0);\n numPad.add(four,0,1);\n numPad.add(seven,0,2);\n numPad.add(empty,0,3);\n\n // column 2\n numPad.add(two,1,0);\n numPad.add(five,1,1);\n numPad.add(eight,1,2);\n numPad.add(zero,1,3);\n\n // column 3\n numPad.add(three,2,0);\n numPad.add(six,2,1);\n numPad.add(nine,2,2);\n numPad.add(empty1,2,3);\n\n // coulumn 4\n numPad.add(empty2,3,0);\n numPad.add(clear,3,1);\n numPad.add(enter,3,2);\n numPad.add(empty3,3,3);\n \n\n \n// // set button size v2 Responsive\n empty.prefWidthProperty().bind(numPad.widthProperty());\n empty.prefHeightProperty().bind(numPad.heightProperty()); \n empty1.prefWidthProperty().bind(numPad.widthProperty());\n empty1.prefHeightProperty().bind(numPad.heightProperty()); \n empty2.prefWidthProperty().bind(numPad.widthProperty());\n empty2.prefHeightProperty().bind(numPad.heightProperty());\n empty3.prefWidthProperty().bind(numPad.widthProperty());\n empty3.prefHeightProperty().bind(numPad.heightProperty()); \n zero.prefWidthProperty().bind(numPad.widthProperty());\n zero.prefHeightProperty().bind(numPad.heightProperty());\n one.prefWidthProperty().bind(numPad.widthProperty());\n one.prefHeightProperty().bind(numPad.heightProperty());\n two.prefWidthProperty().bind(numPad.widthProperty());\n two.prefHeightProperty().bind(numPad.heightProperty());\n three.prefWidthProperty().bind(numPad.widthProperty());\n three.prefHeightProperty().bind(numPad.heightProperty());\n four.prefWidthProperty().bind(numPad.widthProperty());\n four.prefHeightProperty().bind(numPad.heightProperty());\n five.prefWidthProperty().bind(numPad.widthProperty());\n five.prefHeightProperty().bind(numPad.heightProperty());\n six.prefWidthProperty().bind(numPad.widthProperty());\n six.prefHeightProperty().bind(numPad.heightProperty());\n seven.prefWidthProperty().bind(numPad.widthProperty());\n seven.prefHeightProperty().bind(numPad.heightProperty());\n eight.prefWidthProperty().bind(numPad.widthProperty());\n eight.prefHeightProperty().bind(numPad.heightProperty());\n nine.prefWidthProperty().bind(numPad.widthProperty());\n nine.prefHeightProperty().bind(numPad.heightProperty());\n enter.prefWidthProperty().bind(numPad.widthProperty());\n enter.prefHeightProperty().bind(numPad.heightProperty());\n clear.prefWidthProperty().bind(numPad.widthProperty());\n clear.prefHeightProperty().bind(numPad.heightProperty());\n pageReturn.prefWidthProperty().bind(numPad.widthProperty());\n pageReturn.prefHeightProperty().bind(numPad.heightProperty());\n \n \n //Adding styles\n numPad.getStyleClass().add(\"nodeBkg\");\n enter.getStyleClass().add(\"enterButton\");\n clear.getStyleClass().add(\"clearButton\");\n \n zero.getStyleClass().add(\"genericButton\");\n one.getStyleClass().add(\"genericButton\");\n two.getStyleClass().add(\"genericButton\");\n three.getStyleClass().add(\"genericButton\");\n four.getStyleClass().add(\"genericButton\");\n five.getStyleClass().add(\"genericButton\");\n six.getStyleClass().add(\"genericButton\");\n seven.getStyleClass().add(\"genericButton\");\n eight.getStyleClass().add(\"genericButton\");\n nine.getStyleClass().add(\"genericButton\");\n empty.getStyleClass().add(\"genericButton\");\n empty1.getStyleClass().add(\"genericButton\");\n empty2.getStyleClass().add(\"genericButton\");\n empty3.getStyleClass().add(\"genericButton\");\n \n \n \n // set up button actions/events\n // under buttons\n //currentAccount == choosen Account\n // create the account stage\n // change stage\n\n \n one.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n currentAccount = new SavingAccount();\n createSavingsStage();\n changeStage(mainStage,savingsStage);\n }\n });\n \n two.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n currentAccount = new NetSavingAccount();\n createNetSavingsStage();\n changeStage(mainStage,netSavingsStage);\n }\n });\n \n three.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n currentAccount = new ChequeAccount();\n createChequeStage();\n changeStage(mainStage,chequeStage);\n }\n });\n \n four.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n currentAccount = new FixedAccount();\n createFixedStage();\n changeStage(mainStage,fixedStage);\n }\n });\n \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 }", "private VerticalLayout createVerticalLayout(int hCount,int vCount)\r\n {\n\r\n VerticalLayout verticalLayout = new VerticalLayout();\r\n verticalLayout.setSizeFull();\r\n\r\n // verticalLayout.add(button);\r\n verticalLayout.getStyle().set(\"border\",\"3px dashed gray\");\r\n verticalLayout.getStyle().set(\"border-radius\",\"5px\");\r\n //verticalLayout.setDefaultHorizontalComponentAlignment(Alignment.CENTER);\r\n //verticalLayout.setAlignItems(Alignment.CENTER);\r\n verticalLayout.setAlignItems(Alignment.STRETCH);\r\n\r\n SalonDetay salonDetay = new SalonDetay();\r\n\r\n salonDetay.setX(vCount);\r\n salonDetay.setY(hCount);\r\n\r\n Button btnDefine = new Button(\"Buranın ne olduğunu belirle\");\r\n\r\n btnDefine.addClickListener(e->{\r\n Dialog dialog = new Dialog();\r\n\r\n Button btnMasa = new Button(\"Masa\");\r\n btnMasa.addClickListener(ez-> {\r\n Dialog dialog2 = new Dialog();\r\n dialog2.add(new Label(\"Hoşgeldiniz\"));\r\n\r\n List<Integer> integerList = new ArrayList<>();\r\n for (int i = 1; i < 12; i++)\r\n integerList.add(i);\r\n\r\n ComboBox<Integer> comboBox = new ComboBox<>(\"Katılacak Kişi Sayısını Seçiniz\");\r\n comboBox.setItems(integerList);\r\n\r\n dialog2.add(comboBox);\r\n\r\n Button ekleButton = new Button(\"Tamamla\");\r\n\r\n ekleButton.addClickListener(ex -> {\r\n if (comboBox.getValue() == null) {\r\n Notification.show(\"Lütfen kişi sayısını seçiniz\", 1000, Notification.Position.TOP_STRETCH);\r\n return;\r\n }\r\n List<Component> componentList = beSmart(comboBox.getValue());\r\n componentList.forEach(ele -> verticalLayout.add(ele));\r\n dialog2.close();\r\n dialog.close();\r\n verticalLayout.remove(btnDefine);\r\n });\r\n dialog2.add(ekleButton);\r\n dialog2.open();\r\n });\r\n\r\n Button btnKoridor = new Button(\"Koridor\");\r\n btnKoridor.addClickListener(ex->{\r\n verticalLayout.add(placeHolder(\"Koridor\",dialog));\r\n verticalLayout.remove(btnDefine);\r\n });\r\n\r\n Button btnDugun = new Button(\"Düğün Masası\");\r\n btnDugun.addClickListener(ex->{\r\n verticalLayout.add(placeHolder(\"Düğün Masası\",dialog));\r\n verticalLayout.remove(btnDefine);\r\n });\r\n\r\n Button btnSahne = new Button(\"Sahne\");\r\n btnSahne.addClickListener(ex->{\r\n verticalLayout.add(placeHolder(\"Sahne\",dialog));\r\n verticalLayout.remove(btnDefine);\r\n });\r\n\r\n dialog.add(btnMasa,btnKoridor,btnSahne,btnDugun);\r\n dialog.open();\r\n });\r\n\r\n verticalLayout.add(btnDefine);\r\n /*\r\n button.addClickListener(e->{\r\n\r\n verticalLayout.remove(button);\r\n\r\n Dialog dialog = new Dialog();\r\n dialog.add(new Label(\"Hoşgeldiniz\"));\r\n\r\n List<Integer> integerList = new ArrayList<>();\r\n for (int i=1 ;i<12 ; i++)\r\n integerList.add(i);\r\n\r\n ComboBox<Integer> comboBox = new ComboBox<>(\"Katılacak Kişi Sayısını Seçiniz\");\r\n comboBox.setItems(integerList);\r\n\r\n dialog.add(comboBox);\r\n\r\n Button ekleButton = new Button(\"Tamamla\");\r\n\r\n ekleButton.addClickListener(ex->{\r\n if (comboBox.getValue() == null)\r\n {\r\n Notification.show(\"Lütfen kişi sayısını seçiniz\",1000, Notification.Position.TOP_STRETCH);\r\n return;\r\n }\r\n\r\n List<Component> componentList = beSmart(comboBox.getValue());\r\n\r\n componentList.forEach(ele-> verticalLayout.add(ele));\r\n\r\n dialog.close();\r\n });\r\n\r\n\r\n dialog.add(ekleButton);\r\n\r\n dialog.open();\r\n //verticalLayout.setAlignItems(Alignment.STRETCH);\r\n //verticalLayout.add(createPersonButton(\"1\"),createPersonButton(\"2\"),createPersonButton(\"3\"));\r\n\r\n }); */\r\n\r\n return verticalLayout;\r\n }", "private void addViewBody() {\n\t\tJButton medicosButton = new JButton(\"Médicos\");\n\t\tmedicosButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new MedicosView());\n\t\t});\n\t\tthis.add(medicosButton);\n\n\t\tJButton clientesButton = new JButton(\"Clientes\");\n\t\tclientesButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new ClientesView());\n\t\t});\n\t\tthis.add(clientesButton);\n\n\t\tJButton novaConsultaButton = new JButton(\"Nova Consulta\");\n\t\tnovaConsultaButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new CadastroConsultaView());\n\t\t});\n\t\tthis.add(novaConsultaButton);\n\n\t\tJButton novoTesteButton = new JButton(\"Novo Teste [EM BREVE]\");\n\t\tnovoTesteButton.setEnabled(false);\n\t\tthis.add(novoTesteButton);\n\t}", "private JPanel renderBottom() {\n JPanel bottomPanel = new JPanel(new GridBagLayout());\n\n backBTN = new JButton(\"Back to the chat\");\n backBTN.setForeground(ColorUtil.black);\n backBTN.setBackground(ColorUtil.buttonBack);\n backBTN.setFont(FontUtil.defaultFont);\n\n bottomPanel.add(backBTN);\n\n return bottomPanel;\n }", "private void addComponentsTopane() {\n \tsetLayout(new BorderLayout());\n \t\n \tJButton b1 = new JButton(\"Login\");\n \tColor customBlue = new Color(86, 132, 197);\n \tb1.setBackground(customBlue);\n b1.setForeground(Color.WHITE);\n this.add(b1, BorderLayout.SOUTH);\n }", "public Box getButtonPanel() {\n\t\tBox buttonsPanel = new Box(BoxLayout.Y_AXIS);\n\t\tbuttonsPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\t\tBox treeBox = new Box(BoxLayout.Y_AXIS);\n\t\ttreeBox.setBorder(new TitledBorder(\"Schema\"));\n\n\t\tBox associationBox = new Box(BoxLayout.Y_AXIS);\n\t\tassociationBox.setBorder(new TitledBorder(\"Association\"));\n\n\t\tBox outputBox = new Box(BoxLayout.Y_AXIS);\n\t\toutputBox.setBorder(new TitledBorder(\"Output\"));\n\n\t\tBox numerotationBox = new Box(BoxLayout.X_AXIS);\n\t\tnumerotationBox.setBorder(new TitledBorder(\"Numerotation\"));\n\t\t/* add a button for loading a XML Schema */\n\t\tJButton loadFileb = new JButton(\"Open schema\");\n\t\tUtils.setDefaultSize(loadFileb);\n\t\tloadFileb.addActionListener(new LoadSchemaListener());\n\n\t\t/*\n\t\t * add a button for associating the content of a node to a line in the\n\t\t * flat file\n\t\t */\n\t\tJButton selectLineNodeb = new JButton(\"Main node\");\n\t\tUtils.setDefaultSize(selectLineNodeb);\n\t\tselectLineNodeb.addActionListener(new SelectLineNodeListener());\n\n\t\tJButton selectNodeb = new JButton(\"Select\");\n\t\tUtils.setDefaultSize(selectNodeb);\n\t\tselectNodeb.addActionListener(new SelectNodeListener());\n\n\t\tJButton unselectNodeb = new JButton(\"Unselect\");\n\t\tUtils.setDefaultSize(unselectNodeb);\n\t\tunselectNodeb.addActionListener(new UnselectNodeListener());\n\n\t\tJButton nameb = new JButton(\"Name\");\n\t\tUtils.setDefaultSize(nameb);\n\t\tnameb.addActionListener(new associateNameListener());\n\n\t\tJButton filterb = new JButton(\"Filter\");\n\t\tUtils.setDefaultSize(filterb);\n\t\tfilterb.addActionListener(new AssociateFilterListener());\n\n\t\tJButton infosb = new JButton(\"About\");\n\t\tUtils.setDefaultSize(infosb);\n\t\tinfosb.addActionListener(new InfosListener());\n\n\t\tassociationBox.add(selectNodeb);\n\t\tassociationBox.add(unselectNodeb);\n\t\tassociationBox.add(nameb);\n\t\tassociationBox.add(filterb);\n\t\tfilter = new JLabel(\"no filter\");\n\t\tassociationBox.add(filter);\n\n\t\ttreeBox.add(loadFileb);\n\n\t\tassociationBox.add(infosb);\n\n\t\tJButton loadXmlFileb = new JButton(\"Open document (XML)\");\n\t\tUtils.setDefaultSize(loadXmlFileb);\n\t\tloadXmlFileb.addActionListener(new LoadDocumentListener());\n\n\t\tJButton setSeparatorb = new JButton(\"Separator\");\n\t\tUtils.setDefaultSize(setSeparatorb);\n\t\tsetSeparatorb.addActionListener(new SetSeparatorListener());\n\n\t\tJButton printTabFileb = new JButton(\"Print\");\n\t\tUtils.setDefaultSize(printTabFileb);\n\t\tprintTabFileb.addActionListener(new PrintFlatFileListener());\n\n\t\ttreeBox.add(loadXmlFileb);\n\t\ttreeBox.add(selectLineNodeb);\n\n\t\toutputBox.add(setSeparatorb);\n\t\toutputBox.add(printTabFileb);\n\n\t\tnumerotationButtons = new ButtonGroup();\n\n\t\tnumericb = new JRadioButton(\"1\");\n\t\thighAlphabeticb = new JRadioButton(\"A\");\n\t\tlowAlphabeticb = new JRadioButton(\"a\");\n\t\tnoneb = new JRadioButton(\"none\");\n\n\t\tnumericb.addActionListener(new NumerotationListener());\n\t\thighAlphabeticb.addActionListener(new NumerotationListener());\n\t\tlowAlphabeticb.addActionListener(new NumerotationListener());\n\t\tnumerotationBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tnumerotationButtons.add(numericb);\n\t\tnumerotationButtons.add(highAlphabeticb);\n\t\tnumerotationButtons.add(lowAlphabeticb);\n\t\tnumerotationButtons.add(noneb);\n\n\t\tswitch (((XsdTreeStructImpl) xsdTree).numerotation_type) {\n\t\tcase XsdTreeStructImpl.HIGH_ALPHABETIC_NUMEROTATION:\n\t\t\thighAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.LOW_ALPHABETIC_NUMEROTATION:\n\t\t\tlowAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.NUMERIC_NUMEROTATION:\n\t\t\tnumericb.setSelected(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnoneb.setSelected(true);\n\t\t\tbreak;\n\t\t}\n\n\t\tnumerotationBox.add(numericb);\n\t\tnumerotationBox.add(highAlphabeticb);\n\t\tnumerotationBox.add(lowAlphabeticb);\n\t\tnumerotationBox.add(noneb);\n\n\t\tbuttonsPanel.add(treeBox);\n\t\tbuttonsPanel.add(associationBox);\n\t\tbuttonsPanel.add(outputBox);\n\t\tbuttonsPanel.add(numerotationBox);\n\n\t\tdisplayExample = new JCheckBox(\"preview\");\n\t\tbuttonsPanel.add(displayExample);\n\t\tdisplayExample.addActionListener(new PreviewListener());\n\t\t\n\t\treturn buttonsPanel;\n\t}", "private void createBottomPanel() {\n humanPaquetView = new ViewDeckVisible(false);\n this.getContentPane().add(humanPaquetView);\n }", "public static HBox createWinBtnBox() {\n int numWinBtns = 3;\n ToggleButton winBtn1 = createRoundWinBtn(5);\n ToggleButton winBtn2 = createRoundWinBtn(10);\n ToggleButton winBtn3 = createRoundWinBtn(20);\n\n //Only one map can be selected, hence the use of a toggling system\n final ToggleGroup group = new ToggleGroup();\n winBtn1.setToggleGroup(group);\n winBtn2.setToggleGroup(group);\n winBtn3.setToggleGroup(group);\n winBtn1.setSelected(true);\n endScore = 5; // default\n\n HBox hbox = new HBox(winBtn1, winBtn2, winBtn3);\n hbox.setLayoutX(MainGUI.WIDTH / 2.0 - winBtn1.getPrefWidth() * numWinBtns / 2.0);\n hbox.setLayoutY(MainGUI.HEIGHT / 2.0 + 40);\n return hbox;\n }", "private void addWidgets() {\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(5);\n\t\tgrid.setPadding(new Insets(150, 80, 80, 80));\n\t\tgrid.add(lblPort, 0, 1);\n\t\tgrid.add(txtPort, 1, 1);\n\t\tgrid.add(lblAdress, 0, 2);\n\t\tgrid.add(txtAdress, 1, 2);\n\t\tgrid.add(lblNick, 0, 4);\n\t\tgrid.add(txtNickname, 1, 4);\n\t\tgrid.add(lblNickTaken, 1, 5);\n\t\tgrid.add(lblCardDesign, 0, 3);\n\t\tgrid.add(comboBoxCardDesign, 1, 3);\n\t\tgrid.add(btnLogin, 0, 7);\n\t\timvStart.setImage(imageStart);\n\t}", "private void $$$setupUI$$$() {\n topPanel = new JPanel();\n topPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n headerLabel = new JLabel();\n headerLabel.setText(\"Header\");\n topPanel.add(headerLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n contentPanel = new JPanel();\n contentPanel.setLayout(new BorderLayout(0, 0));\n topPanel.add(contentPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n buttonBack = new JButton();\n buttonBack.setText(\"Back\");\n panel1.add(buttonBack, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonNext = new JButton();\n buttonNext.setText(\"Next\");\n panel1.add(buttonNext, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel1.add(buttonCancel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n topPanel.add(panel2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n statusLabel = new JLabel();\n statusLabel.setText(\"Status\");\n panel2.add(statusLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "private void setButtons(int width, int height) {\n\tint centerX = width / 2;\n\tint centerY = height / 2;\n\tplayButton.setPos(centerX - playButton.getWidth() / 2, centerY + 2\n\t\t* lineHeight);\n\tplaneButton_p1.setPos(centerX - planeButton_p1.getWidth() / 2, centerY\n\t\t+ 1 * lineHeight);\n\tplaneButton_p2.setPos(centerX - planeButton_p2.getWidth() / 2, centerY\n\t\t+ 0 * lineHeight);\n\toptionsButton.setPos(centerX - optionsButton.getWidth() / 2, centerY\n\t\t- 1 * lineHeight);\n\texitButton.setPos(centerX - exitButton.getWidth() / 2, centerY - 5\n\t\t* lineHeight);\n }", "private void init() {\n setBackground(LIGHT_GRAY);\n Box layout = new Box(BoxLayout.Y_AXIS);\n\n jump = createButton(\"Jump\", null);\n exit = createButton(\"Exit!\", null);\n fly = createButton(\"Fly\", null);\n Jfloat = createButton(\"Float\", null);\n layout.add(Box.createRigidArea(new Dimension(0, 150)));\n layout.add(jump);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(Jfloat);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(fly);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(exit);\n add(layout);\n }", "private void initTopPanel()\r\n {\r\n GridBagConstraints TopPanelConstraints = new GridBagConstraints();\r\n GridBagLayout TopPanelLayout = new GridBagLayout();\r\n JPanel TopPanel = new JPanel();\r\n TopPanel.setLayout(TopPanelLayout);\r\n\r\n TopPanelConstraints.insets = new Insets(4, 4, 4, 4);\r\n TopPanelConstraints.anchor = GridBagConstraints.WEST;\r\n TopPanelConstraints.gridwidth = 1;\r\n TopPanelConstraints.gridheight = 1;\r\n TopPanelConstraints.fill = GridBagConstraints.HORIZONTAL;\r\n TopPanelConstraints.weighty = 0.0;\r\n\r\n // The first line.\r\n TopPanelConstraints.gridy = 0;\r\n TopPanelConstraints.gridx = 0;\r\n TopPanelConstraints.weightx = 1.0;\r\n Container FirstLineContainer = buildFirstLine();\r\n TopPanel.add(FirstLineContainer, TopPanelConstraints);\r\n\r\n TopPanelConstraints.gridx = 1;\r\n TopPanelConstraints.weightx = 0.0;\r\n // TopPanel.add(AboutButton, TopPanelConstraints);\r\n\r\n TopPanelConstraints.gridx = 2;\r\n TopPanelConstraints.weightx = 0.0;\r\n // TopPanel.add(ExitButton, TopPanelConstraints);\r\n\r\n // The second line.\r\n TopPanelConstraints.gridy = 1;\r\n TopPanelConstraints.gridx = 0;\r\n TopPanelConstraints.weightx = 1.0;\r\n Container SecondLineContainer = buildSecondLine();\r\n TopPanel.add(SecondLineContainer, TopPanelConstraints);\r\n\r\n TopPanelConstraints.gridx = 1;\r\n TopPanelConstraints.weightx = 0.0;\r\n TopPanelConstraints.gridwidth = 2;\r\n TopPanel.add(SaveResultsButton, TopPanelConstraints);\r\n\r\n \tBrowseButton.addActionListener(new BrowseButtonListener() );\r\n \tSearchButton.addActionListener(new SearchButtonListener() );\r\n \t//ExitButton.addActionListener(new ExitButtonListener() );\r\n \t//AboutButton.addActionListener(new AboutButtonListener() );\r\n \tSaveResultsButton.addActionListener(new SaveButtonListener() );\r\n\r\n\t getContentPane().add(\"North\", TopPanel);\r\n }", "private void initButtons() {\n HBox buttons = new HBox(50);\n yes = new Button(\"Yes!\");\n no = new Button(\"No!\");\n buttons.getChildren().addAll(yes,no);\n buttons.setAlignment(Pos.CENTER);\n root.getChildren().addAll(buttons);\n }", "private void southRegion() {\r\n\t\tContainer southContainer = new Container(new BoxLayout(BoxLayout.X_AXIS));\r\n\t\t\r\n\t\tsouthContainer.getAllStyles().setPadding(Component.TOP, 50);\r\n\t\tsouthContainer.getAllStyles().setBorder(Border.createLineBorder(4, ColorUtil.BLACK));\r\n\t\t\r\n\t\tFlagCommand flagCommand = new FlagCommand(gw);\r\n\t\tButton flagButton = new Button(flagCommand);\r\n\t\t\r\n\t\tSpiderCommand spiderCommand = new SpiderCommand(gw);\r\n\t\tButton spiderButton = new Button(spiderCommand);\r\n\t\t\r\n\t\tFoodStationCommand foodStationCommand = new FoodStationCommand(gw);\r\n\t\tButton foodStationButton = new Button(foodStationCommand);\r\n\t\t\r\n\t\tTickCommand tickCommand = new TickCommand(gw);\r\n\t\tButton tickButton = new Button(tickCommand);\r\n\t\t\r\n\t\tsouthContainer.add(flagButton);\r\n\t\tbuttonStyling(flagButton, false, true);\r\n\t\t\r\n\t\tsouthContainer.add(spiderButton);\r\n\t\tbuttonStyling(spiderButton, false, false);\r\n\t\t\r\n\t\tsouthContainer.add(foodStationButton);\r\n\t\tbuttonStyling(foodStationButton, false, false);\r\n\t\t\r\n\t\tsouthContainer.add(tickButton);\r\n\t\tbuttonStyling(tickButton, false, false);\r\n\t\t\r\n\t\tspiderButton.setCommand(spiderCommand);\r\n\t\taddKeyListener('g', spiderCommand);\r\n\t\t\r\n\t\tfoodStationButton.setCommand(foodStationCommand);\r\n\t\taddKeyListener('f', foodStationCommand);\r\n\t\t\r\n\t\ttickButton.setCommand(tickCommand);\r\n\t\taddKeyListener('t', tickCommand);\r\n\t\t\r\n\t\tadd(BorderLayout.SOUTH, southContainer);\r\n\t}", "public Connect4Final() { //building the GUI\r\n \r\n setTitle(\"Connect 4\"); //title\r\n setSize(1366, 700); //size of frame\r\n setResizable(false); //setting this to false because if resizeable, the board may become unproportional\r\n \r\n GridLayout layout2 = new GridLayout(7, 9); //layouts\r\n BoxLayout layout3 = new BoxLayout(welcome, BoxLayout.Y_AXIS);\r\n \r\n setLayout(new GridBagLayout()); //setting the Layout of the entire frame to a gridBagLayout\r\n board.setLayout(layout2); //setting layouts of the 2 panels\r\n welcome.setLayout(layout3);\r\n \r\n welcome.setBorder(BorderFactory.createEmptyBorder(20,20,20,20)); //setting border around the panel\r\n \r\n winCounter.setFont(small);\r\n welcome.add(winCounter);\r\n winCounter.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n winCounter.add(Box.createRigidArea(new Dimension(0,75)));\r\n \r\n welcomelabel.setFont(f); //setting fonts\r\n welcome.add(welcomelabel);\r\n welcomelabel.setAlignmentX(Component.CENTER_ALIGNMENT); //adding the labels one by one and modifying them -- alignment, extra spacing, size etc.\r\n welcome.add(Box.createRigidArea(new Dimension(0,75)));\r\n \r\n instructions.setFont(f); //setting fonts\r\n welcome.add(instructions);\r\n instructions.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n welcome.add(Box.createRigidArea(new Dimension(0,75))); //creates extra space after each label\r\n \r\n welcome.add(input); \r\n welcome.add(Box.createRigidArea(new Dimension(0,75)));\r\n input.setMaximumSize(new Dimension(200, 25)); //sets the maximum size of textfield\r\n \r\n welcome.add(okButton);\r\n welcome.add(Box.createRigidArea(new Dimension(0,75)));\r\n okButton.setAlignmentX(Component.CENTER_ALIGNMENT); //aligns all the components by their center on the x axis of the panel\r\n \r\n for(int i = 0; i<7; i++){\r\n columnarray[i] = new JButton(\" \"+Integer.toString(i+1)); //adding the column numbers as buttons to the board panel and formatting them preoperly\r\n columnarray[i].setHorizontalAlignment(SwingConstants.LEFT);\r\n columnarray[i].addActionListener(this);\r\n columnarray[i].setBackground(rgb); \r\n columnarray[i].setBorderPainted(false);\r\n board.add(columnarray[i]);\r\n }\r\n \r\n for(int i = 0; i<ROW; i++){\r\n for(int j = 0; j<COL; j++){\r\n arrayCircles[i][j] = new DrawCircle(); //adding the circles to the board panel\r\n board.add(arrayCircles[i][j]);\r\n }\r\n }\r\n \r\n okButton.addActionListener(this); //adding all the actionlisteners\r\n pvp.addActionListener(this);\r\n pvai.addActionListener(this);\r\n black.addActionListener(this);\r\n red.addActionListener(this);\r\n yellow.addActionListener(this);\r\n green.addActionListener(this);\r\n okayButton.addActionListener(this);\r\n easyAI.addActionListener(this);\r\n hardAI.addActionListener(this);\r\n again.addActionListener(this);\r\n notAgain.addActionListener(this);\r\n \r\n add(welcome, makeConstraints(0,0,3,20)); //adding the panels to the frame with specified parameters on where they go\r\n add(board, makeConstraints(3,0,10,20));\r\n \r\n welcome.setPreferredSize(new Dimension(3, 30)); //setting the preferred size of the welcome panel\r\n \r\n board.setBackground(rgb); //setting the background of the board to be a specific customizable colour\r\n \r\n setVisible(true); //setting the frame to be visible\r\n }", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n content = new JPanel();\n content.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(content, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n tabbedPane1 = new JTabbedPane();\n content.add(tabbedPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n Gesture = new JPanel();\n Gesture.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n tabbedPane1.addTab(\"Gesture\", Gesture);\n final JLabel label1 = new JLabel();\n label1.setIcon(new ImageIcon(getClass().getResource(\"/reference/by_gesture.png\")));\n label1.setText(\"\");\n Gesture.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "public SudoFrame() {\n topPanel = new JTabbedPane();\n bottomPanel = new JPanel();\n bottomPanel.setOpaque(false);\n\n paintButton();\n paintSudo();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setTitle(\"Soduku\");\n\n JPanel contentPaneBoss = new ContentPanel();\n this.setContentPane(contentPaneBoss);\n\n contentPaneBoss.setLayout(new BoxLayout(contentPaneBoss, BoxLayout.Y_AXIS));\n// contentPaneBoss.add(Box.createVerticalStrut(5));\n contentPaneBoss.add(topPanel);\n contentPaneBoss.add(Box.createVerticalStrut(5));\n contentPaneBoss.add(bottomPanel);\n contentPaneBoss.add(Box.createVerticalStrut(5));\n\n this.setBounds(900, 100, 450, 450);\n // this.pack();\n// this.setResizable(false);\n this.setVisible(true);\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 }", "private void setUpAllButtons() {\n\t\t\n\t\tGridLayout leftSideGridLayout = new GridLayout(9,1);\n\t\tleftSideGridLayout.setVgap(20);\n\t\t\n\t\tleftSideOfGUI.setLayout(leftSideGridLayout);\n\t\t\n\t\t/*\n\t\t * JRadioButtons\n\t\t */\n\t\t\n\t\taddVertex = new JRadioButton(\"Add a vertex\");\n\t\taddVertex.addActionListener(radioButtonListener);\n\t\t\n\t\taddEdge = new JRadioButton(\"Add an edge\");\n\t\taddEdge.addActionListener(radioButtonListener);\n\t\t\n\t\tmoveVertex = new JRadioButton(\"Move a vertex\");\n\t\tmoveVertex.addActionListener(radioButtonListener);\n\t\t\n\t\tshortestPath = new JRadioButton(\"Shortest Path\");\n\t\tshortestPath.addActionListener(radioButtonListener);\n\t\t\n\t\t//Weight Sections consists of JRadioButton and JTextArea\n\t\tweightSection = new JPanel();\n\t\tweightSection.setLayout(new GridLayout(1,2));\n\t\t\n\t\tchangeWeight = new JRadioButton(\"Change weight to :\");\n\t\tchangeWeight.addActionListener(radioButtonListener);\n\t\t\n\t\tweightInputText = new JTextField();\n\t\tweightInputText.setPreferredSize(new Dimension(20,20));\n\t\t\n\t\t//Adding JRadioButtons to left JPanel\n\t\tleftSideOfGUI.add(addVertex);\n\t\tleftSideOfGUI.add(addEdge);\n\t\tleftSideOfGUI.add(moveVertex);\n\t\tleftSideOfGUI.add(shortestPath);\n\t\t\n\t\t//Adding specific JPanel to the left side, consists of two components\n\t\tweightSection.add(changeWeight);\n\t\tweightSection.add(weightInputText);\n\t\t\n\t\tleftSideOfGUI.add(weightSection);\n\t\t\n\t\t\n\t\t/*\n\t\t * Buttons\n\t\t */\n\t\t\n\t\taddEdgesButton = new JButton(\"Add All Edges\");\n\t\taddEdgesButton.setPreferredSize(new Dimension(50, 50));\n\t\taddEdgesButton.addActionListener(buttonListener);\n\t\t\n\t\trandomWeightsButton = new JButton(\"Random Weights\");\n\t\trandomWeightsButton.setPreferredSize(new Dimension(50, 50));\n\t\trandomWeightsButton.addActionListener(buttonListener);\n\t\t\n\t\tminimalSpanningTreeButton = new JButton(\"Minimal Tree Spanning\");\n\t\tminimalSpanningTreeButton.setPreferredSize(new Dimension(50, 50));\n\t\tminimalSpanningTreeButton.addActionListener(buttonListener);\n\t\t\n\t\thelpButton = new JButton(\"Help\");\n\t\thelpButton.setPreferredSize(new Dimension(50, 50));\n\t\thelpButton.addActionListener(buttonListener);\n\t\t\n\t\t//Adding Buttons to left side of GUI\n\t\tleftSideOfGUI.add(addEdgesButton);\n\t\tleftSideOfGUI.add(randomWeightsButton);\n\t\tleftSideOfGUI.add(minimalSpanningTreeButton);\n\t\tleftSideOfGUI.add(helpButton);\n\t\t\n\t}", "private void designComponents() \n\t{\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\tsetBorder(BorderFactory.createLineBorder(Color.gray));\n\t}", "private void buildTopPanel() {\n \t\tJPanel panel = new JPanel();\n \t\tpanel.setLayout(new BorderLayout(10, 10));\n \t\t\n \t\t// this does not need to be referenced else where, only for layout\n \t\tJPanel paneButtons = new JPanel();\n \t\tGridLayout bl = new GridLayout(2, 1);\n \t\tpaneButtons.setLayout(bl);\n \t\t\n \t\tpaneButtons.add(bCastOff);\n \t\tpaneButtons.add(bSavePlayer);\n \t\t\n \t\t// add all components on top:\n \t\tpanel.add(imgDisplay, BorderLayout.LINE_START);\n \t\tpanel.add(paneEditFields, BorderLayout.CENTER);\n \t\tpanel.add(paneButtons, BorderLayout.LINE_END);\n \t\t\n \t\tadd(panel, BorderLayout.PAGE_START);\n \t}", "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 westRegion() {\r\n\t\tContainer westContainer = new Container(new BoxLayout(BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\twestContainer.getAllStyles().setPadding(Component.TOP, 50);\r\n\t\twestContainer.getAllStyles().setBorder(Border.createLineBorder(4, ColorUtil.BLACK));\r\n\t\t\r\n\t\tAccelerateCommand accelerateCommand = new AccelerateCommand(gw);\r\n\t\tButton accelerateButton = new Button(accelerateCommand);\r\n\t\t\r\n\t\tLeftCommand leftCommand = new LeftCommand(gw);\r\n\t\tButton leftButton = new Button(leftCommand);\r\n\t\t\r\n\t\twestContainer.add(accelerateButton);\r\n\t\tbuttonStyling(accelerateButton, true, false);\r\n\t\t\r\n\t\twestContainer.add(leftButton);\r\n\t\tbuttonStyling(leftButton, false, false);\r\n\t\t\r\n\t\taccelerateButton.setCommand(accelerateCommand);\r\n\t\taddKeyListener('a', accelerateCommand);\r\n\t\t\r\n\t\tleftButton.setCommand(leftCommand);\r\n\t\taddKeyListener('l', leftCommand);\r\n\t\t\r\n\t\tadd(BorderLayout.WEST, westContainer);\r\n\t}", "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}", "private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}", "private JPanel getBottomPanel(JPanel panel) // panel for the buttons to press\n\t{\n\t\t\n\t\tpanel.setLayout(new GridLayout(0,1));\n\t\tpanel.add(startButton);\n\t\tstartButton.addActionListener(new startQuizActionListener());\n\t\treturn panel;\n\t}", "private void createMainMenuMiddleComposite() {\n\t\tString imgSlipUI = null;\n\t\tString imgJackpotBtn = null;\n\t\tString imgVoucherBtn = null;\n\t\tif(Util.isSmallerResolution()) {\n\t\t\timgSlipUI = ImageConstants.S_SLIPS_UI_BUTTON_IMG;\n\t\t\timgJackpotBtn = ImageConstants.S_JACKPOT_UI_BUTTON_IMG;\n\t\t\timgVoucherBtn = ImageConstants.S_VOUCHER_UI_BUTTON_IMG;\n\t\t}\n\t\telse {\n\t\t\timgSlipUI = ImageConstants.SLIPS_UI_BUTTON_IMG;\n\t\t\timgJackpotBtn = ImageConstants.JACKPOT_UI_BUTTON_IMG;\n\t\t\timgVoucherBtn = ImageConstants.VOUCHER_UI_BUTTON_IMG;\n\t\t}\n\t\t\n\t\tGridData gridData11 = new GridData();\n\t\tgridData11.horizontalAlignment = GridData.CENTER;\n\t\tgridData11.grabExcessHorizontalSpace = true;\n\t\tgridData11.grabExcessVerticalSpace = true;\n\t\tgridData11.verticalAlignment = GridData.BEGINNING;\n\t\tGridData gridData10 = new GridData();\n\t\tgridData10.horizontalAlignment = GridData.CENTER;\n\t\tgridData10.grabExcessHorizontalSpace = true;\n\t\tgridData10.grabExcessVerticalSpace = true;\n\t\tgridData10.verticalAlignment = GridData.BEGINNING;\n\t\tGridData gridData9 = new GridData();\n\t\tgridData9.horizontalAlignment = GridData.CENTER;\n\t\tgridData9.verticalAlignment = GridData.BEGINNING;\n\t\tGridData gridData6 = new GridData();\n\t\tgridData6.heightHint = 100;\n\t\t// gridData6.heightHint = 70;\n\t\tgridData6.widthHint = 100;\n\t\t// gridData6.widthHint = 90;\n\t\tgridData6.grabExcessHorizontalSpace = true;\n\t\tgridData6.grabExcessVerticalSpace = true;\n\t\tgridData6.horizontalAlignment = GridData.CENTER;\n\t\tgridData6.verticalAlignment = GridData.END;\n\n\t\tGridLayout gridLayout3 = new GridLayout();\n\t\tgridLayout3.horizontalSpacing = 20;\n\t\tgridLayout3.numColumns = 3;\n\t\tGridData gridData5 = new GridData();\n\t\tgridData5.grabExcessHorizontalSpace = true;\n\t\tgridData5.verticalAlignment = GridData.FILL;\n\t\tgridData5.heightHint = 100;\n\t\tgridData5.grabExcessVerticalSpace = true;\n\t\tgridData5.horizontalAlignment = GridData.FILL;\n\t\tmainMenuMiddleComposite = new Composite(this, SWT.NONE);\n\t\tmainMenuMiddleComposite.setBackground(new Color(Display.getCurrent(),\n\t\t\t\t171, 209, 255));\n\t\tmainMenuMiddleComposite.setLayout(gridLayout3);\n\t\tmainMenuMiddleComposite.setLayoutData(gridData5);\n\n\t\tGridData gridData3 = new GridData();\n\t\tgridData3.grabExcessVerticalSpace = true;\n\t\tgridData3.horizontalAlignment = GridData.CENTER;\n\t\tgridData3.verticalAlignment = GridData.END;\n\t\tgridData3.heightHint = 100;\n\t\tgridData3.widthHint = 100;\n\t\tgridData3.grabExcessHorizontalSpace = true;\n\n\t\tGridData gridData1 = new GridData();\n\t\tgridData1.grabExcessVerticalSpace = true;\n\t\tgridData1.horizontalAlignment = GridData.CENTER;\n\t\tgridData1.verticalAlignment = GridData.END;\n\t\tgridData1.heightHint = 100;\n\t\tgridData1.widthHint = 100;\n\t\tgridData1.grabExcessHorizontalSpace = true;\n\n\t\tbtnSlipUI = new CbctlButton(mainMenuMiddleComposite, SWT.FLAT, \"\",\n\t\t\t\tLabelKeyConstants.SLIPS_UI_BUTTON);\n\t\tbtnSlipUI\n\t\t\t\t.setFont(new Font(Display.getDefault(), \"Arial\", 12, SWT.BOLD));\n\t\t\n\t\tbtnSlipUI.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgSlipUI)));\n\t\tbtnSlipUI.setLayoutData(gridData1);\n\n\t\tbtnJackpotUI = new CbctlButton(mainMenuMiddleComposite, SWT.NONE, \"\",\n\t\t\t\tLabelKeyConstants.JACKPOT_UI_BUTTON);\n\t\tbtnJackpotUI.setFont(new Font(Display.getDefault(), \"Arial\", 12,\n\t\t\t\tSWT.BOLD));\n\t\tbtnJackpotUI.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgJackpotBtn)));\n\t\tbtnJackpotUI.setLayoutData(gridData3);\n\n\t\tbtnVoucherUI = new CbctlButton(mainMenuMiddleComposite, SWT.NONE, \"\",\n\t\t\t\tLabelLoader.getLabelValue(LabelKeyConstants.VOUCHER_UI_BUTTON));\n\t\tbtnVoucherUI.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgVoucherBtn)));\n\t\tbtnVoucherUI.setLayoutData(gridData6);\n\n\t\tlblSlipUI = new CbctlLabel(mainMenuMiddleComposite, SWT.NONE);\n\t\tlblSlipUI.setText(LabelLoader\n\t\t\t\t.getLabelValue(LabelKeyConstants.SLIPS_UI_BUTTON));\n\t\tlblSlipUI.setBackground(new Color(Display.getCurrent(), 171, 209, 255));\n\t\tlblSlipUI\n\t\t\t\t.setFont(new Font(Display.getDefault(), \"Arial\", 12, SWT.BOLD));\n\t\tlblSlipUI.setLayoutData(gridData9);\n\n\t\tlblJackpotUI = new CbctlLabel(mainMenuMiddleComposite, SWT.NONE);\n\t\tlblJackpotUI.setText(LabelLoader\n\t\t\t\t.getLabelValue(LabelKeyConstants.JACKPOT_UI_BUTTON));\n\t\tlblJackpotUI.setBackground(new Color(Display.getCurrent(), 171, 209,\n\t\t\t\t255));\n\t\tlblJackpotUI.setFont(new Font(Display.getDefault(), \"Arial\", 12,\n\t\t\t\tSWT.BOLD));\n\t\tlblJackpotUI.setLayoutData(gridData10);\n\n\t\tlblVoucherUI = new CbctlLabel(mainMenuMiddleComposite, SWT.NONE);\n\t\tlblVoucherUI.setText(LabelLoader\n\t\t\t\t.getLabelValue(LabelKeyConstants.VOUCHER_UI_BUTTON));\n\t\tlblVoucherUI.setBackground(new Color(Display.getCurrent(), 171, 209,\n\t\t\t\t255));\n\t\tlblVoucherUI.setFont(new Font(Display.getDefault(), \"Arial\", 12,\n\t\t\t\tSWT.BOLD));\n\t\tlblVoucherUI.setLayoutData(gridData11);\n\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, new Dimension(100, 20), new Dimension(100, 20), new Dimension(100, 20), 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonClose = new JButton();\n buttonClose.setText(\"Close\");\n panel2.add(buttonClose, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n messageLabel = new JLabel();\n messageLabel.setText(\"\");\n panel3.add(messageLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "public ButtonBar() {\n scrollPane = new JScrollPane();\n scrollPane.setBorder(null);\n scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants\n .HORIZONTAL_SCROLLBAR_NEVER);\n scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants\n .VERTICAL_SCROLLBAR_AS_NEEDED);\n scrollPane.setMinimumSize(new Dimension(0,buttonHeight\n + ((int) PlatformDefaults.getUnitValueX(\"related\").getValue()) * 2));\n \n buttons = Collections.synchronizedMap(new TreeMap<FrameContainer<?>,\n JToggleButton>(new FrameContainerComparator()));\n position = FramemanagerPosition.getPosition(\n IdentityManager.getGlobalConfig().getOption(\"ui\",\n \"framemanagerPosition\"));\n \n if (position.isHorizontal()) {\n buttonPanel = new ButtonPanel(new MigLayout(\"ins rel, fill, flowx\"),\n this);\n } else {\n buttonPanel = new ButtonPanel(new MigLayout(\"ins rel, fill, flowy\"),\n this);\n }\n scrollPane.getViewport().add(buttonPanel);\n }", "public Bottom()\r\n {\r\n /*\r\n * num++; System.out.println(num); if(num>1) { num=1; dispose(); return;\r\n * }\r\n */\r\n // System.out.println(\"num<=1\");\r\n // this.setBounds(0, 765, 1280, 35);\r\n // this.setLayout(new GridLayout(1,11));\r\n setLayout(new FlowLayout());\r\n {\r\n jLabel1 = new JLabel();\r\n getContentPane().add(jLabel1);\r\n jLabel1.setText(\"\\u5f53\\u524d\\u64ad\\u653e\\u5217\\u8868\\uff1a\");\r\n }\r\n {\r\n {\r\n jSongList = new JList();\r\n // jSongList.setVisibleRowCount(7);\r\n jSongList.setAutoscrolls(true);\r\n // jScrollPane1.setViewportView(jSongList);\r\n refreshSongList();\r\n // jSongList.setPreferredSize(new java.awt.Dimension(187, 132));\r\n }\r\n jScrollPane1 = new JScrollPane(jSongList);\r\n // getContentPane().add(jScrollPane1);\r\n jScrollPane1.setPreferredSize(new java.awt.Dimension(187, 132));\r\n }\r\n accompany = new JButton(\"°é³ª\");\r\n suspend = new JButton(\"ÔÝÍ£\");\r\n final BorderLayout suspendLayout = new BorderLayout();\r\n suspend.setLayout(suspendLayout);\r\n // ImageIcon img = new ImageIcon(\"img/volumePlus.jpg\");\r\n volumePlus = new JButton(\"ÒôÁ¿+\");\r\n\r\n // volumePlus.setIcon(getImage(\"img\\\\volumePlus\"));\r\n volumeMinus = new JButton(\"ÒôÁ¿-\");\r\n changeSong = new JButton(\"Çиè\");\r\n playAgain = new JButton(\"ÖØ²¥\");\r\n stop = new JButton(\"Í£Ö¹\");\r\n quit = new JButton(\"Í˳ö\");\r\n // returnHome = new JButton(\"·µ»Ø\");\r\n // indexPage = new JButton(\"Ö÷Ò³\");\r\n\r\n volume = 100;\r\n this.add(jScrollPane1);\r\n this.add(accompany);\r\n this.add(suspend);\r\n this.add(volumePlus);\r\n this.add(volumeMinus);\r\n this.add(changeSong);\r\n this.add(playAgain);\r\n this.add(stop);\r\n this.add(quit);\r\n // this.add(returnHome);\r\n // this.add(indexPage);\r\n\r\n accompany.addActionListener(this);\r\n suspend.addActionListener(this);\r\n quit.addActionListener(this);\r\n playAgain.addActionListener(this);\r\n volumePlus.addActionListener(this);\r\n volumeMinus.addActionListener(this);\r\n changeSong.addActionListener(this);\r\n stop.addActionListener(this);\r\n quit.addActionListener(this);\r\n\r\n setUndecorated(true);\r\n final int screenWidth = java.awt.Toolkit.getDefaultToolkit()\r\n .getScreenSize().width;\r\n this.setLocation(screenWidth - 310, 480);\r\n this.setSize(240, 240);\r\n setVisible(true);\r\n setAlwaysOnTop(true);\r\n }", "public void setupButton() {\n\t\tHBox buttonPane = new HBox();\n\t\tbuttonPane.setPrefHeight(20);\n\t\t_root.setBottom(buttonPane);\n\t\tButton b1 = new Button(\"Quit\");\t\n\t buttonPane.getChildren().addAll(b1);\n\t b1.setOnAction(new QuitHandler()); // register the button with QuitHandler\n\t buttonPane.setAlignment(Pos.CENTER);\n\t buttonPane.setFocusTraversable(false);\n\t\tbuttonPane.setStyle(\"-fx-background-color: darkblue;\");\n\n\t\n\t}", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "public void layoutTop() {\n\t\tJPanel top = new JPanel();\n\t\tcloseButton = new JButton(\"Save and Exit\");\n\t\tcloseButton.addActionListener(this);\n\t\ttop.add(closeButton);\n\t\tattendanceButton = new JButton(\"View Attendances\");\n\t\tattendanceButton.addActionListener(this);\n\t\ttop.add(attendanceButton);\n\t\tadd(top, BorderLayout.NORTH);\n\t}", "public void init() {\n setLayout(new GridLayout(n-1, n));\n setFont(new Font(\"SansSerif\", Font.BOLD, 24));\n \n // Baris 1\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"X\",Color.red));\n add(makeButton(\"Bksp\",Color.red));\n add(makeButton(\"CE\",Color.red));\n add(makeButton(\"X\",Color.red));\n \n // Baris 2\n add(makeButton(\"MC\",Color.red));\n add(new Button(\"7\"));\n add(new Button(\"8\"));\n add(new Button(\"9\"));\n add(new Button(\"/\"));\n add(new Button(\"sqrt\"));\n \n // Baris 3\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"4\"));\n add(new Button(\"5\"));\n add(new Button(\"6\"));\n add(new Button(\"x\"));\n add(new Button(\"%\"));\n \n // Baris 4\n add(makeButton(\"MR\",Color.red));\n add(new Button(\"1\"));\n add(new Button(\"2\"));\n add(new Button(\"3\"));\n add(new Button(\"-\"));\n add(new Button(\"1/x\"));\n\n // Baris 5\n add(makeButton(\"M+\",Color.red));\n add(new Button(\"0\"));\n add(new Button(\"+/-\"));\n add(new Button(\".\"));\n add(new Button(\"+\"));\n add(new Button(\"=\"));\n }", "private HBox createButtons() {\n\t\tButton solve = new Button(\"Solve\");\n\t\tButton clear = new Button(\"Clear\");\n\t\tButton quit = new Button(\"Quit\");\n\t\t\n\t\tsolve.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tclear.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tquit.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\t\n\t\tsolve.setOnAction(e -> solve());\n\t\tclear.setOnAction(e -> clear());\n\t\tquit.setOnAction(e -> quit());\n\t\t\n\t\tHBox buttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setPadding(new Insets(20,20,20,20));\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(solve, clear, quit);\n\t\tbuttons.setStyle(\"-fx-background-color: #DCDCDC;\");\n\t\t\n\t\treturn buttons;\n\t}", "public Pane buildGuiInDerSchonzeit() {\n\t\tVBox root = new VBox(10); \r\n\t\t// Der Hintergrund des GUI wird mit einem Transparenten Bild erstellt\r\n\t\tImage imageBackground = new Image(getClass().getResource(\"transparent.png\").toExternalForm()); // Ein Image wird erstellt und das Bild übergeben\r\n\t\tBackgroundImage backgroundImage = new BackgroundImage(imageBackground, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT);\r\n\t\tBackground background = new Background(backgroundImage); // Ein Background wird ertsellt und das Bild übergeben\r\n\t\troot.setBackground(background); // Der Hintergrund mit dem Bild wird dem root übergeben\r\n\t\t\r\n\t\t//\r\n\t\t// // Allse verschiedenen Boxen werden erstellt\r\n\t\t//\r\n\t\t\r\n\t\t// HBox für die erste Spalte\r\n\t\tHBox hBoxSpalte1 = new HBox(190);\r\n\t\t// 2mal VBox um Button und Text anzuzeigen \r\n\t\tVBox vBox1Spalte1 = new VBox();\r\n\t\tVBox vBox2Spalte1 = new VBox();\r\n\t\t\r\n\t\t// HBox für 2. Spalte\r\n\t\tHBox hBoxSpalte2 = new HBox(190);\r\n\t\t// 2 VBoxen für Bild und Text\r\n\t\tVBox vbox1Spalte2 = new VBox();\r\n\t\tVBox vbox2Spalte2 = new VBox();\r\n\t\t\r\n\t\t// HBox für die 3.Spalte\r\n\t\tHBox hboxSpalte3 = new HBox(190);\r\n\t\t// 2mal VBox für Bild und Text\r\n\t\tVBox vbox1Spalte3 = new VBox();\r\n\t\tVBox vbox2Spalte3 = new VBox();\r\n\t\t\r\n\t\t// HBox für die 4 Spalte\r\n\t\tHBox hboxSpalte4 = new HBox(190);\r\n\t\t// 2mal VBox für Bild und Text\r\n\t\tVBox vbox1Spalte4 = new VBox();\r\n\t\tVBox vbox2Spalte4 = new VBox();\r\n\t\t\r\n\t\t//\r\n\t\t// Button für die Fische\r\n\t\t//\r\n\t\t\r\n\t\t//Label Bild für Hecht\r\n\t\tLabel hechtbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage hechtimage = new Image(getClass().getResource(\"Hecht.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\thechtbildLabel.setGraphic(new ImageView(hechtimage)); // Das Bild wird dem Label übergeben\r\n\t\thechtbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Zander\r\n\t\tLabel zanderbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage zanderImage = new Image(getClass().getResource(\"Zander.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tzanderbildLabel.setGraphic(new ImageView(zanderImage)); // Das Bild wird dem Label übergeben\r\n\t\tzanderbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Aal\r\n\t\tLabel aalbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage aalImage = new Image(getClass().getResource(\"Aal.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\taalbildLabel.setGraphic(new ImageView(aalImage)); // Das Bild wird dem Label übergeben\r\n\t\taalbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Aesche\r\n\t\tLabel aeschebildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage aescheImage = new Image(getClass().getResource(\"Aesche.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\taeschebildLabel.setGraphic(new ImageView(aescheImage)); // Das Bild wird dem Label übergeben\r\n\t\taeschebildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Barsch\r\n\t\tLabel barschbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage barschImage = new Image(getClass().getResource(\"Barsch.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tbarschbildLabel.setGraphic(new ImageView(barschImage)); // Das Bild wird dem Label übergeben\r\n\t\tbarschbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Forelle\r\n\t\tLabel forellebildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage forelleImage = new Image(getClass().getResource(\"Regenbogenforelle.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tforellebildLabel.setGraphic(new ImageView(forelleImage)); // Das Bild wird dem Label übergeben\r\n\t\tforellebildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Schleie\r\n\t\tLabel schleiebildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage schleieImage = new Image(getClass().getResource(\"Schleie.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tschleiebildLabel.setGraphic(new ImageView(schleieImage)); // Das Bild wird dem Label übergeben\r\n\t\tschleiebildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Bild Karpfe\r\n\t\tLabel karpfenbildLabel = new Label(); // Das Label wird erstellt\r\n\t\tImage karpfenImage = new Image(getClass().getResource(\"Schuppenkarpfen.png\").toExternalForm()); // Ein Image mit dem Bild wird erstellt\r\n\t\tkarpfenbildLabel.setGraphic(new ImageView(karpfenImage)); // Das Bild wird dem Label übergeben\r\n\t\tkarpfenbildLabel.setTranslateX(100); // X-Achse des Labels\r\n\t\t\r\n\t\t//\r\n\t\t// Label für die Titel der Fische\r\n\t\t//\r\n\t\t\r\n\t\t// Label Hecht\r\n\t\tLabel hechtlabel = new Label(\"Hecht\"); // Das Label mit dem Namen wird erstellt\r\n\t\thechtlabel.setFont(new Font(30)); // Die Schriftgrösse\r\n\t\thechtlabel.setTranslateX(180); // X-Achse des Labels\r\n\t\t\r\n\t\t//Label Zander\r\n\t\tLabel zanderLabel = new Label(\"Zander\"); // DAs LAabel mit dem Namen wird erstellt\r\n\t\tzanderLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tzanderLabel.setTranslateX(160); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Aal\r\n\t\tLabel aaLabel = new Label(\"Aal\"); // Das Label mit dem Namen wird erstellt\r\n\t\taaLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\taaLabel.setTranslateX(200); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Aesche\r\n\t\tLabel aescheLabel = new Label(\"Äsche\"); // Das Label mit dem Namen wird erstellt\r\n\t\taescheLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\taescheLabel.setTranslateX(180); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Barsch\r\n\t\tLabel barschLabel = new Label(\"Flussbarsch\"); // Das Label mit dem Namen wird erstellt\r\n\t\tbarschLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tbarschLabel.setTranslateX(130); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Forelle\r\n\t\tLabel forelleLabel = new Label(\"Forelle\"); // Das Label mit dem Namen wird erstellt\r\n\t\tforelleLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tforelleLabel.setTranslateX(180); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Schleie\r\n\t\tLabel schleieLabel = new Label(\"Schleie\"); // Das Label mit dem Namen wird erstellt\r\n\t\tschleieLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tschleieLabel.setTranslateX(170); // X-Achse des Labels\r\n\t\t\r\n\t\t// Label Karpfe\r\n\t\tLabel karpfeLabel = new Label(\"Karpfe\"); // Das Label mit dem Namen wird erstellt\r\n\t\tkarpfeLabel.setFont(new Font(30)); // Schriftgrösse\r\n\t\tkarpfeLabel.setTranslateX(170); // X-Achse des Labels\r\n\t\t\r\n\t\t//\r\n\t\t// Label für die Anzeige in der Schonzeit\r\n\t\t//\r\n\t\t\r\n\t\t// Label Schonzeit für Hecht\r\n\t\tLabel schonzeitHechtLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitHechtLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitHechtLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit für Zander\r\n\t\tLabel schonzeitZanderLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitZanderLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitZanderLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit für Aal\r\n\t\tLabel schonzeitaaLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitaaLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitaaLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit für Aesche\r\n\t\tLabel schonzeitaescheLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitaescheLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitaescheLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit Barsch\r\n\t\tLabel schonzeitbarschLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitbarschLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitbarschLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit für Forelle\r\n\t\tLabel schonzeitforelleLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitforelleLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitforelleLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit Schleie\r\n\t\tLabel schonzeitschleieLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitschleieLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitschleieLabel.setTranslateX(140); // X-Achse im root\r\n\t\t\r\n\t\t// Label Schonzeit Karpfe\r\n\t\tLabel schonzeitkarpfeLabel = new Label(); // Das Label wird erstellt\r\n\t\tschonzeitkarpfeLabel.setFont(new Font(25)); // Schriftgrösse\r\n\t\tschonzeitkarpfeLabel.setTranslateX(140); // X-Achse im root\r\n\r\n\t\t\r\n\t\t// Das Label für die überschrift\r\n\t\tLabel fischeAuswahlLabel = new Label(\"Fische und Ihre Schonzeit\"); // Das Label wird mit dem Namen erstellt\r\n\t\tfischeAuswahlLabel.setFont(new Font(40)); // Schriftgrösse\r\n\t\tfischeAuswahlLabel.setTranslateX(10); // X-Achse des Labels\r\n\t\t\r\n\t\t//\r\n\t\t// // Buttons werden erstellt\r\n\t\t//\r\n\t\t\r\n\t\t// Button zurück Hauptmenu\r\n\t\tButton hauptmenuButton = new Button(\"Hauptmenü\"); // Button wird erstellt und Initialisiert\r\n\t\thauptmenuButton.setMinSize(200, 50); // Die Minimumgrösse wird gesetzt\r\n\t\thauptmenuButton.setTranslateX(345); // X- Achse des Buttons im root\r\n\t\thauptmenuButton.setFont(new Font(25)); // Schriftgrösse des Buttons\r\n\t\t// Zoom in und out wird hinzugefügt\r\n\t\tButtonHandling zoomButtonHandling = new ButtonHandling();\r\n\t\tzoomButtonHandling.zoomIn(hauptmenuButton);\r\n\t\tzoomButtonHandling.zoomOut(hauptmenuButton);\r\n\t\t// Funktion zurück ins Hauptmenü\r\n\t\thauptMenuAufrufen(hauptmenuButton);\r\n\t\t\r\n\t\t//\r\n\t\t// // Aktuelles Datum wird eingelesen um die Fische auf Ihre Schonzeit zu prüfen\r\n\t\t//\r\n\t\t\r\n\t\t// Aktueller Monat wird in der Variablen datumAktuell gespeichert.\r\n\t\tCalendar dateNow = Calendar.getInstance(); // Kalender wird erstellt\r\n\t\tint datum = dateNow.get(Calendar.MONTH) +1; // Der aktuelle Monat wird im Int Initialisiert. +1 Da die Monate ab 0 Beginnen\r\n\t\t// Datum Manuell setzten für Test und Debbug \r\n\t\t//int datum = 1;\r\n\t\t\r\n\t\t//\r\n\t\t// // Die einzelnen VBoxen für die Fische werden je nach Schonzeit gefüllt\r\n\t\t//\r\n\t\t\r\n\t\t// 1. Spalte und 1 Box\r\n\t\tvBox1Spalte1.getChildren().addAll(hechtlabel,hechtbildLabel);// Erste Linie und erste Spalte mit Bild und Text wird dem root übergeben\r\n\t\tif (datum >=1 && datum <= 4) { // Die Schonzeit wird geprüft\r\n\t\t\tschonzeitHechtLabel.setText(\"hat Schonzeit !\"); // Trifft die IF zu wird dieser Text gesetzt\r\n\t\t\tschonzeitHechtLabel.setTextFill(Color.RED); // Die Schrifftfarbe wird auf Rot gesetzt\r\n\t\t}else { // Wen die IF nicht erfüllt ist\r\n\t\t\tschonzeitHechtLabel.setText(\"keine Schonzeit\"); // Trift due IF nicht zu wird dieser Text gesetzt\r\n\t\t\tschonzeitHechtLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t}\r\n\t\t// Der VBox wird das Label mit den entsprecheneden Einstellungen übergeben\r\n\t\tvBox1Spalte1.getChildren().add(schonzeitHechtLabel);\r\n\t\t\r\n\t\t// 1. Spalte und 2. Box\r\n\t\tvBox2Spalte1.getChildren().addAll(zanderLabel,zanderbildLabel); // Erste Linie und zweite Spalte mit Bild und Text wird dem root übergeben\r\n\t\tif (datum >= 1 && datum <= 4) { // Die Schonzeit wird geprüft\r\n\t\t\tschonzeitZanderLabel.setText(\"hat Schonzeit !\"); // Trifft die IF zu wird dieser Text gesetzt\r\n\t\t\tschonzeitZanderLabel.setTextFill(Color.RED); // Die Schrifftfarbe wird auf Rot gesetzt\r\n\t\t}else { // Wen die IF nicht erfüllt ist\r\n\t\t\tschonzeitZanderLabel.setText(\"keine Schonzeit\"); // Trift due IF nicht zu wird dieser Text gesetzt\r\n\t\t\tschonzeitZanderLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t}\r\n\t\t// Der VBox wird das Label mit den entsprechenden Einstellungen übergeben\r\n\t\tvBox2Spalte1.getChildren().add(schonzeitZanderLabel);\r\n\t\t\r\n\t\t// 2. Spalte und 1. Box\r\n\t\tvbox1Spalte2.getChildren().addAll(aaLabel,aalbildLabel); // Zweite Linie erste Spalte mit Bild und Text\r\n\t\t// Der Aal hat keine Schonzeit\r\n\t\t\tschonzeitaaLabel.setText(\"keine Schonzeit\"); // Text wird gesetzt\r\n\t\t\tschonzeitaaLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t// Der VBox wird das Label mit den einstellungen übergeben\t\r\n\t\tvbox1Spalte2.getChildren().add(schonzeitaaLabel);\r\n\t\t\r\n\t\t// 2. Spalte und 2. Box\r\n\t\tvbox2Spalte2.getChildren().addAll(aescheLabel,aeschebildLabel); // Zweite Linie zweite Spalte mit Bild und Text\r\n\t\tif (datum >= 2 && datum <= 4) { // Die Schonzeit wird geprüft\r\n\t\t\tschonzeitaescheLabel.setText(\"hat Schonzeit !\"); // Trifft die IF zu wird dieser Text gesetzt\r\n\t\t\tschonzeitaescheLabel.setTextFill(Color.RED); // Die Schrifftfarbe wird auf Rot gesetzt\r\n\t\t}else { // Wen die IF nicht erfüllt ist\r\n\t\t\tschonzeitaescheLabel.setText(\"keine Schonzeit\"); // Trift due IF nicht zu wird dieser Text gesetzt\r\n\t\t\tschonzeitaescheLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t}\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\r\n\t\tvbox2Spalte2.getChildren().add(schonzeitaescheLabel);\r\n\t\t\r\n\t\t// 3. Spalte und 1. Box\r\n\t\tvbox1Spalte3.getChildren().addAll(barschLabel,barschbildLabel); // Dritte Linie erste Spalte mit Bild und Text\r\n\t\t// Der Barsch hat keine Schonzeit\r\n\t\t\tschonzeitbarschLabel.setText(\"keine Schonzeit\");\r\n\t\t\tschonzeitbarschLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\t\r\n\t\tvbox1Spalte3.getChildren().add(schonzeitbarschLabel);\r\n\t\t\r\n\t\t// 3. Spalte und 2. Box\r\n\t\tvbox2Spalte3.getChildren().addAll(forelleLabel,forellebildLabel); // Dritte Linie zweite Spalte mit Bild und Text\r\n\t\tif (datum >= 3 && datum <= 9) { // Die Schonzeit wird geprüft\r\n\t\t\tschonzeitforelleLabel.setText(\"keine Schonzeit\"); // Trifft die IF zu wird dieser Text gesetzt\r\n\t\t\tschonzeitforelleLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t}else { // Wen die IF nicht erfüllt ist\r\n\t\t\tschonzeitforelleLabel.setText(\"hat Schonzeit !\"); // Die Schonzeit des Hechtes wird überprüft\r\n\t\t\tschonzeitforelleLabel.setTextFill(Color.RED); // Trift due IF nicht zu wird dieser Text gesetzt\r\n\t\t}\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\r\n\t\tvbox2Spalte3.getChildren().add(schonzeitforelleLabel);\r\n\t\t\r\n\t\t// 4. Spalte und 1. Box\r\n\t\tvbox1Spalte4.getChildren().addAll(schleieLabel,schleiebildLabel); // Vierte Linie erste Spalte mit Bild und Text\r\n\t\t// Die Schleie hat keien Schonzeit\r\n\t\t\tschonzeitschleieLabel.setText(\"keine Schonzeit\"); // Text wird gesetzt\r\n\t\t\tschonzeitschleieLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\t\r\n\t\tvbox1Spalte4.getChildren().add(schonzeitschleieLabel);\r\n\t\t\r\n\t\t// 4. Spalte und 2. Box\r\n\t\tvbox2Spalte4.getChildren().addAll(karpfeLabel,karpfenbildLabel); // Vierte Linie zweite Spalte mit Bild und Text\r\n\t\t// Der Karpfe hat keine Schonzeit\r\n\t\t\tschonzeitkarpfeLabel.setText(\"keine Schonzeit\"); // Text wird gesetzt\r\n\t\t\tschonzeitkarpfeLabel.setTextFill(Color.GREEN); // Die Schriftfarbe wird auf Grün gesetzt\r\n\t\t// Der VBox wird das Label mit den Einstellungen übergeben\t\r\n\t\tvbox2Spalte4.getChildren().add(schonzeitkarpfeLabel);\r\n\t\t\r\n\t\t//\r\n\t\t// // Die einzelnen HBoxen werden gefüllt für die Spalten in der Root\r\n\t\t//\r\n\t\thBoxSpalte1.getChildren().addAll(vBox1Spalte1,vBox2Spalte1); // Die erste Spalte wird mit den zwei Boxen gefüllt\r\n\t\t// HBox Spalte 2\r\n\t\thBoxSpalte2.getChildren().addAll(vbox1Spalte2,vbox2Spalte2); // Die zweite Spalte wird mit den zwei Boxen gefüllt\r\n\t\t// Hbox Spalte 3\r\n\t\thboxSpalte3.getChildren().addAll(vbox1Spalte3,vbox2Spalte3); // Die dritte Spalte wird mit den zwei Boxen gefüllt\r\n\t\t// Hbox Spalte 4\r\n\t\thboxSpalte4.getChildren().addAll(vbox1Spalte4,vbox2Spalte4); // Die vierte Spalte wird mit den zwei Boxen gefüllt\r\n\t\t\r\n\t\t// Elemente werden der HauptVBox root hinzugefügt\r\n\t\troot.getChildren().addAll(fischeAuswahlLabel,hBoxSpalte1,hBoxSpalte2,hboxSpalte3,hboxSpalte4,hauptmenuButton); // Alle gefüllten Boxen werden der Hauptbox übergeben\r\n\t\t\r\n\t\t// Das root wird zurückgegeben um Angezeigt zu werden\r\n\t\treturn root;\r\n\t}", "public Vbox(ImagePane a, ImagePane b,ImagePane c){\r\n\t\tsuper();\r\n\t\tAppMenuBar menuBar = new AppMenuBar(a,b,c);\r\n\t\t\r\n\t\tHBox hb1 = new HBox();\r\n\t hb1.getChildren().add(menuBar);\r\n\t \t \r\n\t HBox hb2 = new HBox();\r\n\t Button button1 = new Button(\"Checkers\");\r\n\t Button button2 = new Button(\"Horizontal Stripes\");\r\n\t Button button3 = new Button(\"Vertical Stripes\");\r\n\t button1.setOnAction(event ->{\r\n\t \tdoChecker(a,b,c);\t \t\r\n\t });\r\n\t button2.setOnAction(event ->{\t\t\t\r\n\t \thorizontal(a,b,c); \t\r\n\t });\r\n\t \r\n\t button3.setOnAction(event ->{\r\n\t \tvertical(a,b,c);\r\n\t });\r\n\t \r\n\t \r\n\t hb2.setSpacing(10); \r\n\t button1.setPrefSize(100,1);\r\n\t button2.setPrefSize(150,1);\r\n\t button3.setPrefSize(150,1);\r\n\t hb2.getChildren().addAll(button1,button2,button3);\t \r\n\t getChildren().addAll(hb1,hb2);\t\t\r\n\t}", "private JPanel setWestPanel() {\n westPanel = new JPanel();\n westPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n today = new JButton(\"Today\");\n newEvent = new JButton(\"New Event\");\n\n //creating another panel with default flow layout to have the \"<\" and \">\" buttons next to each other\n prevNextPanel = new JPanel();\n\n left = new JButton();\n right = new JButton();\n prevNextPanel.add(left);\n prevNextPanel.add(right);\n prevNextPanel.setMaximumSize(new Dimension(300, 50));\n prevNextPanel.setAlignmentX(CENTER_ALIGNMENT);\n prevNextPanel.setBackground(Color.WHITE);\n\n //attempt to \"beautify\" buttons with icons\n beautifyButtons();\n\n westPanel.setLayout(new BoxLayout(westPanel, Y_AXIS));\n westPanel.setBackground(Color.WHITE);\n\n //dont know of a better way to create empty space between the title of panel and next container\n westPanel.add(Box.createRigidArea(new Dimension(WEST_WIDTH, 20)));\n westPanel.add(today);\n westPanel.add(prevNextPanel);\n westPanel.add(newEvent);\n westPanel.add(Box.createRigidArea(new Dimension(WEST_WIDTH, 20)));\n westPanel.add(addEventTypeMap());\n\n //adding action listened to \"Today\" to update the main display\n today.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n statusLabel.setText(String.format(status, today.getText()));\n date = dayViewComponent.setCurrentDate(LocalDate.now());\n updateDateDisplay();\n }\n });\n\n //adding action listened to \"<\" to update the main display\n left.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n statusLabel.setText(String.format(status, \"Left\"));\n date = dayViewComponent.updateDate(isDayViewSelected(), false);\n updateDateDisplay();\n }\n });\n\n //adding action listened to \">\" to update the main display\n right.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n statusLabel.setText(String.format(status, \"Right\"));\n date = dayViewComponent.updateDate(isDayViewSelected(), true);\n updateDateDisplay();\n }\n });\n\n //adding action listened to \"New event\" to update the main display\n newEvent.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n statusLabel.setText(String.format(status, newEvent.getText()));\n new NewEventDialogue(dayViewComponent);\n }\n });\n\n\n return westPanel;\n }", "public JButtonsPanel() {\r\n setBorder(BorderFactory.createEtchedBorder(Color.GREEN, new Color(148, 145, 140)));\r\n\r\n jOpen.setText(BTN_OPEN);\r\n jOpen.setToolTipText(MSG_OPEN);\r\n jOpen.setBounds(new Rectangle(BTN_LEFT, BTN_VSPACE, BTN_WIDTH, BTN_HEIGHT));\r\n add(jOpen);\r\n\r\n jCheckHealth.setText(BTN_CHECK_HEALTH);\r\n jCheckHealth.setToolTipText(MSG_CHECK_HEALTH);\r\n jCheckHealth.setBounds(new Rectangle(BTN_LEFT, (int) (jOpen.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jCheckHealth);\r\n\r\n jClose.setText(BTN_CLOSE);\r\n jClose.setToolTipText(MSG_CLOSE);\r\n jClose.setBounds(new Rectangle(BTN_LEFT, (int) (jCheckHealth.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClose);\r\n\r\n jClaim.setText(BTN_CLAIM);\r\n jClaim.setToolTipText(MSG_CLAIM);\r\n jClaim.setBounds(new Rectangle(BTN_LEFT, (int) (jClose.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClaim);\r\n\r\n jRelease.setText(BTN_RELEASE);\r\n jRelease.setToolTipText(MSG_RELEASE);\r\n jRelease.setBounds(new Rectangle(BTN_LEFT, (int) (jClaim.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jRelease);\r\n\r\n jDeviceEnable.setText(BTN_DEVICE_ENABLE);\r\n jDeviceEnable.setToolTipText(MSG_DEVICE_ENABLE);\r\n jDeviceEnable.setBounds(new Rectangle(BTN_LEFT, (int) (jRelease.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceEnable);\r\n\r\n jDeviceDisable.setText(BTN_DEVICE_DISABLE);\r\n jDeviceDisable.setToolTipText(MSG_DEVICE_DISABLE);\r\n jDeviceDisable.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceEnable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jDeviceDisable);\r\n\r\n jClearData.setText(BTN_CLEAR_DATA);\r\n jClearData.setToolTipText(MSG_CLEAR_DATA);\r\n jClearData.setBounds(new Rectangle(BTN_LEFT, (int) (jDeviceDisable.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jClearData);\r\n\r\n jBeginEnrollCapture.setText(BTN_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setToolTipText(MSG_BEGIN_ENROLL_CAPTURE);\r\n jBeginEnrollCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jClearData.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginEnrollCapture);\r\n\r\n jEndCapture.setText(BTN_END_CAPTURE);\r\n jEndCapture.setToolTipText(MSG_END_CAPTURE);\r\n jEndCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginEnrollCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jEndCapture);\r\n\r\n jBeginVerifyCapture.setText(BTN_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setToolTipText(MSG_BEGIN_VERIFY_CAPTURE);\r\n jBeginVerifyCapture.setBounds(new Rectangle(BTN_LEFT, (int) (jEndCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jBeginVerifyCapture);\r\n\r\n jIdentifyMatch.setText(BTN_IDENTIFY_MATCH);\r\n jIdentifyMatch.setToolTipText(MSG_IDENTIFY_MATCH);\r\n jIdentifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jBeginVerifyCapture.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentifyMatch);\r\n\r\n jVerifyMatch.setText(BTN_VERIFY_MATCH);\r\n jVerifyMatch.setToolTipText(MSG_VERIFY_MATCH);\r\n jVerifyMatch.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerifyMatch);\r\n\r\n jIdentify.setText(BTN_IDENTIFY);\r\n jIdentify.setToolTipText(MSG_IDENTIFY);\r\n jIdentify.setBounds(new Rectangle(BTN_LEFT, (int) (jVerifyMatch.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jIdentify);\r\n\r\n jVerify.setText(BTN_VERIFY);\r\n jVerify.setToolTipText(MSG_VERIFY);\r\n jVerify.setBounds(new Rectangle(BTN_LEFT, (int) (jIdentify.getBounds().getMaxY() + BTN_VSPACE), BTN_WIDTH, BTN_HEIGHT));\r\n add(jVerify);\r\n }", "private void $$$setupUI$$$() {\r\n panel1 = new BackGroundPanel();\r\n panel1.setOpaque(false);\r\n panel1.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n final Spacer spacer1 = new Spacer();\r\n panel1.add(spacer1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n textPane1 = new JTextArea();\r\n textPane1.setFont(new Font(\"HGMinchoL\", textPane1.getFont().getStyle(), 22));\r\n textPane1.setText(\"\");\r\n textPane1.setEditable(false);\r\n textPane1.setOpaque(false);\r\n panel1.add(textPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\r\n final JLabel label1 = new JLabel();\r\n label1.setText(\"Answer:\");\r\n panel1.add(label1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n textField1 = new JTextField();\r\n panel1.add(textField1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n SWINGButton = createButton(\"bat\", \"SWING!\");\r\n //SWINGButton.setText(\"SWING\");\r\n panel1.add(SWINGButton, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n formattedTextField1 = new JFormattedTextField();\r\n formattedTextField1.setEditable(false);\r\n formattedTextField1.setFont(new Font(\"HGMinchol\", formattedTextField1.getFont().getStyle(), 22));\r\n panel1.add(formattedTextField1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n }", "private void setUpLayout() {\n\n this.setLayout(new GridLayout(7, 1, 40, 37));\n this.setBackground(new Color(72, 0, 0));\n this.setBorder(BorderFactory.createEmptyBorder(8, 150, 8, 150));\n }", "public void resetBottomButtons() {\n SystemBarConfig config = mContext.mTintManager.getConfig();\n boolean hasNavigation = config.hasNavigtionBar();\n if (hasNavigation) {\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mContainer.getLayoutParams();\n int navigationHeight = config.getNavigationBarHeight();\n int navigationWidth = config.getNavigationBarWidth();\n boolean isAtBottom = ScreenUtils.isNavigationAtBottom(mContext);\n if (isAtBottom) {\n params.setMargins(0, 0, 0, navigationHeight);\n } else {\n params.setMargins(0, 0, navigationWidth, 0);\n }\n // if not in ScreenInPortFull,We do not need to setMargin.\n if (ScreenUtils.getScreenInfo(mContext) != ScreenUtils.tempScreenInPortFull) {\n params.setMargins(0, 0, 0, 0);\n }\n mContainer.setLayoutParams(params);\n }\n }", "private void $$$setupUI$$$() {\n myContentPanel = new JPanel();\n myContentPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n myContentPanel.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n myAcceptYoursButton = new JButton();\n myAcceptYoursButton.setEnabled(false);\n myAcceptYoursButton.setText(\"Accept Yours\");\n myAcceptYoursButton.setMnemonic('Y');\n myAcceptYoursButton.setDisplayedMnemonicIndex(7);\n panel1.add(myAcceptYoursButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n myAcceptTheirsButton = new JButton();\n myAcceptTheirsButton.setEnabled(false);\n myAcceptTheirsButton.setText(\"Accept Theirs\");\n myAcceptTheirsButton.setMnemonic('T');\n myAcceptTheirsButton.setDisplayedMnemonicIndex(7);\n panel1.add(myAcceptTheirsButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n myMergeButton = new JButton();\n myMergeButton.setEnabled(false);\n myMergeButton.setText(\"Merge\");\n myMergeButton.setMnemonic('M');\n myMergeButton.setDisplayedMnemonicIndex(0);\n panel1.add(myMergeButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JBScrollPane jBScrollPane1 = new JBScrollPane();\n myContentPanel.add(jBScrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n myItemsTable = new JBTable();\n myItemsTable.putClientProperty(\"Table.isFileList\", Boolean.FALSE);\n jBScrollPane1.setViewportView(myItemsTable);\n }", "private void setupToolBar() {\n\t\tJPanel buttons = new JPanel(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\ttoolBar = new JToolBar(\"Buttons\");\n\t\ttoolBar.setFloatable(false);\n\t\ttoolBar.setOrientation(SwingConstants.VERTICAL);\n\t\tbuttons.add(toolBar, c);\n\t\tadd(buttons, BorderLayout.EAST);\n\t}", "@Override\n protected void createButtonsForButtonBar(final Composite parent) {\n\n GridLayout layout = (GridLayout) parent.getLayout();\n layout.marginHeight = 0;\n }", "public void build() {\n VBox rootLayout = new VBox();\n Pane topPane = new Pane();\n HBox bottomBox = new HBox();\n Pane pluginPane = new Pane();\n Pane iconPane = new Pane();\n rootLayout.setPrefSize(300, 623);\n topPane.setPrefSize(300, 50);\n bottomBox.setPrefSize(300, 573);\n pluginPane.setPrefSize(250, 573);\n iconPane.setPrefSize(50, 573);\n Button b1 = new Button(\"h\");\n pluginPane.getChildren().addAll(b1);\n bottomBox.getChildren().addAll(pluginPane, iconPane);\n rootLayout.getChildren().addAll(topPane, bottomBox);\n\n Scene scene = new Scene(rootLayout);\n setScene(scene);\n }", "private void createContents()\n\t{\n\t\tGridLayout clayout = new GridLayout();\n\t\tclayout.marginHeight = 2;\n\t\tclayout.marginWidth = 2;\n\t\tclayout.marginTop = 2;\n\t\tclayout.marginBottom = 2;\n\t\tclayout.marginLeft = 2;\n\t\tclayout.marginRight = 2;\n\t\tclayout.numColumns = 1;\n\t\tsetLayout(clayout);\n\t\t\n\t\t\n\t\tm_executorsTable = new ExecutorsTable(this);\n\t\tGridData tableLayoutData = new GridData(GridData.FILL_BOTH);\n\t\ttableLayoutData.grabExcessHorizontalSpace = true;\n\t\ttableLayoutData.widthHint = 700;\n\t\ttableLayoutData.heightHint = 200;\n\t\tm_executorsTable.getGrid().setLayoutData(tableLayoutData);\n\t\tm_executorsTable.addDoubleClickListener(this);\n\t\tm_executorsTable.addSelectionChangedListener( new ISelectionChangedListener(){\n\n\t\t\t@Override\n public void selectionChanged(SelectionChangedEvent arg0)\n {\n\t\t\t\tupdateButtons();\n }\n\t\t\t\n\t\t});\n\n\t\tComposite buttonBar = new Composite(this, SWT.BORDER);\n\t\tbuttonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tbuttonBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\n\t\tm_btnTakeControl = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnTakeControl.setText(BTN_TAKE_CONTROL);\n\t\tm_btnTakeControl.addSelectionListener(this);\n\t\t\n\t\tm_btnReleaseControl = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnReleaseControl.setText(BTN_RELEASE_CONTROL);\n\t\tm_btnReleaseControl.addSelectionListener(this);\n\t\t\n\t\tm_btnBackground = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnBackground.setText(BTN_BACKGROUND);\n\t\tm_btnBackground.addSelectionListener(this);\n\n\t\tm_btnStartMonitor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStartMonitor.setText(BTN_START_MONITOR);\n\t\tm_btnStartMonitor.addSelectionListener(this);\n\t\t\n\t\tm_btnStopMonitor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStopMonitor.setText(BTN_STOP_MONITOR);\n\t\tm_btnStopMonitor.addSelectionListener(this);\n\t\t\n\t\tm_btnStopExecutor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStopExecutor.setText(BTN_STOP_EXECUTOR);\n\t\tm_btnStopExecutor.addSelectionListener(this);\n\n\t\tm_btnKillExecutor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnKillExecutor.setText(BTN_KILL_EXECUTOR);\n\t\tm_btnKillExecutor.addSelectionListener(this);\n\t\t\n\t\tm_btnRefresh = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnRefresh.setText(BTN_REFRESH);\n\t\tm_btnRefresh.addSelectionListener(this);\n\t\t\n\t\tapplyFonts();\n\t\tdisableButtons();\n\t}", "public JComponent createBottomPanel() {\n\t\tJButton[] buttons = new JButton[0];\n\t/*\tbuttons[0] = new JButton(\"Save\");\n\t\tbuttons[0].setActionCommand(\"0\");\n\t\tbuttons[1] = new JButton(\"Cancel\");\n\t\tbuttons[1].setActionCommand(\"1\");*/\n\t\tActionHandler actHand = new ActionHandler();\n\t//\tfields[PRODUCT_NAME].addActionListener(actHand);\n\t\treturn new ButtonAndMessagePanel(buttons, messageLabel, actHand);\n\t}", "@Override\n public final void initButtons(int x, int y, int addy){\n \n String data = s_datapath;\n addButton(data + \"SM_NeuesSpiel\" + s_typ, x, y, 1);\n addButton(data + \"OM_SpielSpeichern\" + s_typ, x, y + addy, 2);\n addButton(data + \"SM_SpielLaden\" + s_typ, x, y + addy * 2, 3);\n //addButton(data,x, y + addy*3, 4);\n addButton(data + \"Menu_Element_Blank\" + s_typ, x,/*715*/ y + addy * 4, 5);\n addButton(data + \"SM_SpielBeenden\" + s_typ, x,/*845*/ y + addy * 5, 6);\n }", "private void createContents() {\n shell = new Shell(getParent(), getStyle());\n shell.setSize(540, 297);\n shell.setLayout(new GridLayout(1, false));\n\n Composite cmpTop = new Composite(shell, SWT.NONE);\n cmpTop.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n GridLayout gl_cmpTop = new GridLayout(4, false);\n gl_cmpTop.verticalSpacing = 0;\n cmpTop.setLayout(gl_cmpTop);\n\n Label lblBankAccountNumber = new Label(cmpTop, SWT.CENTER);\n lblBankAccountNumber.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n lblBankAccountNumber.setBounds(0, 0, 59, 14);\n lblBankAccountNumber.setText(\"Bank Account\");\n Label lblBranch = new Label(cmpTop, SWT.CENTER);\n lblBranch.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n lblBranch.setBounds(0, 0, 59, 14);\n lblBranch.setText(\"Branch\");\n\n Label lblBank = new Label(cmpTop, SWT.CENTER);\n lblBank.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n lblBank.setText(\"Bank\");\n new Label(cmpTop, SWT.NONE);\n\n txtBankAccountNumber = new Text(cmpTop, SWT.BORDER);\n txtBankAccountNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n txtBankAccountNumber.setBounds(0, 0, 64, 19);\n\n txtBranch = new Text(cmpTop, SWT.BORDER);\n GridData gd_txtBranch = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\n gd_txtBranch.widthHint = 50;\n txtBranch.setLayoutData(gd_txtBranch);\n txtBranch.setBounds(0, 0, 64, 19);\n\n txtBank = new Text(cmpTop, SWT.BORDER);\n GridData gd_txtBank = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\n gd_txtBank.widthHint = 50;\n txtBank.setLayoutData(gd_txtBank);\n btnSearch = new Button(cmpTop, SWT.NONE);\n btnSearch.setAlignment(SWT.RIGHT);\n btnSearch.setText(\"Search\");\n btnSearch.setEnabled(false);\n\n Composite cmpResults = new Composite(shell, SWT.NONE);\n cmpResults.setLayout(new GridLayout(1, false));\n GridData gd_cmpResults = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n gd_cmpResults.heightHint = 129;\n cmpResults.setLayoutData(gd_cmpResults);\n\n tblAccounts = new Table(cmpResults, SWT.BORDER);\n GridData gd_tblAccounts = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n gd_tblAccounts.heightHint = 71;\n tblAccounts.setLayoutData(gd_tblAccounts);\n tblAccounts.setHeaderVisible(true);\n tblAccounts.setLinesVisible(true);\n\n TableColumn tblclmnAccountNumber = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnAccountNumber.setWidth(120);\n tblclmnAccountNumber.setText(\"Player Account\");\n\n TableColumn tblclmsFirstName = new TableColumn(tblAccounts, SWT.NONE);\n tblclmsFirstName.setWidth(100);\n tblclmsFirstName.setText(\"First Name\");\n\n TableColumn tblclmnLastName = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnLastName.setWidth(100);\n tblclmnLastName.setText(\"Last Name\");\n\n TableColumn tblclmnActivated = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnActivated.setWidth(95);\n tblclmnActivated.setText(\"From\");\n\n TableColumn tblclmnDeactivated = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnDeactivated.setWidth(100);\n tblclmnDeactivated.setText(\"To\");\n\n Composite cmpFooter = new Composite(shell, SWT.NONE);\n cmpFooter.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n cmpFooter.setLayout(new GridLayout(2, false));\n\n lblResultsMessage = new Label(cmpFooter, SWT.NONE);\n lblResultsMessage.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n\n Composite cmpButtons = new Composite(cmpFooter, SWT.NONE);\n cmpButtons.setLayout(new GridLayout(3, false));\n cmpButtons.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false, 1, 1));\n\n btnLoad = new Button(cmpButtons, SWT.NONE);\n btnLoad.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n btnLoad.setText(\"Load Account\");\n btnLoad.setEnabled(false);\n\n btnCancel = new Button(cmpButtons, SWT.NONE);\n btnCancel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n btnCancel.setText(\"Cancel\");\n new Label(cmpButtons, SWT.NONE);\n }", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), getStyle());\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(getText());\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite = new Composite(shell, SWT.NONE);\r\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite_1 = new Composite(composite, SWT.NONE);\r\n\t\tRowLayout rl_composite_1 = new RowLayout(SWT.VERTICAL);\r\n\t\trl_composite_1.center = true;\r\n\t\trl_composite_1.fill = true;\r\n\t\tcomposite_1.setLayout(rl_composite_1);\r\n\t\t\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayout(new FillLayout(SWT.VERTICAL));\r\n\t\t\r\n\t\tButton btnNewButton = new Button(composite_2, SWT.NONE);\r\n\t\tbtnNewButton.setText(\"New Button\");\r\n\t\t\r\n\t\tButton btnRadioButton = new Button(composite_2, SWT.RADIO);\r\n\t\tbtnRadioButton.setText(\"Radio Button\");\r\n\t\t\r\n\t\tButton btnCheckButton = new Button(composite_2, SWT.CHECK);\r\n\t\tbtnCheckButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCheckButton.setText(\"Check Button\");\r\n\r\n\t}", "public static void BottomRow() {\r\n\t\r\n\tb1.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\r\n\r\n\tb2.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\r\n\r\n\tb3.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\r\n\tGUI1Panel.add(b1);\r\n\tGUI1Panel.add(b2);\r\n\tGUI1Panel.add(b3);\r\n\r\n}", "private void setBottomCounter() {\n\t\tVBox bottomBox = new VBox();\n\t\tbottomBox.setAlignment(Pos.BOTTOM_CENTER);\n\t\tbottomBox.setPadding(new Insets(10, 10, 10, 10));\n\t\tbottomBox.setSpacing(5);\n\t\t\n\t\tlastProperty = new Text(\"\");\n\t\tlastProperty.setFont(Font.font(\"TimesNewRoman\", FontWeight.BOLD, 24));\n\t\tlastProperty.setFill(Color.GREEN);\n\t\t\n\t\tcounterText = new Text(\"Total number of properties listed: \" + Property.getTotalProperties());\n\t\tcounterText.setFont(Font.font(\"Bauhaus 93\", FontWeight.BOLD, 24));\n\t\tcounterText.setFill(Color.rgb(100, 0, 150));\n\t\t\n\t\t\n\t\tbottomBox.getChildren().addAll(lastProperty, counterText);\n\t\t\n\t\tmainPane.setBottom(bottomBox);\n\t\t\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1 = new JPanel();\n pan1.setLayout(new GridLayoutManager(4, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(pan1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Название номера\");\n pan1.add(label1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Дата регистрации\");\n pan1.add(label2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Дата истечения\");\n pan1.add(label3, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer2 = new Spacer();\n pan1.add(spacer2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(0, 25), new Dimension(0, 25), new Dimension(0, 25), 0, false));\n number = new JTextField();\n pan1.add(number, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n pan1.add(creationDatePanel, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n pan1.add(expirationDatePanel, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n }", "private void makeFrontGUIButtons(){\n Dimension preferred = getPreferredSize();\n\n optionsButton = new JButton();\n makeFrontButton(optionsButton, \"optionsIcon\", \"showOptions\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() * 0.98), 39, 37));\n makeSearchButton();\n\n zoomInButton = new JButton();\n makeFrontButton(zoomInButton, \"plusIcon\", \"zoomIn\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) preferred.getHeight() / 3 * 2, 39, 37));\n\n zoomOutButton = new JButton();\n makeFrontButton(zoomOutButton, \"minusIcon\", \"zoomOut\", new Rectangle((int) preferred.getWidth() - 60, (int) preferred.getHeight() - (int) (preferred.getHeight() / 3 * 2 + 45), 39, 37));\n\n makeShowRoutePanelButton();\n\n fullscreenButton = new JButton();\n makeFrontButton(fullscreenButton, \"fullscreenIcon\", \"fullscreen\", new Rectangle((int) preferred.getWidth() - 60, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 + 100), 39, 37));\n\n mapTypeButton = new JButton();\n makeFrontButton(mapTypeButton, \"layerIcon\", \"mapType\", new Rectangle((int) preferred.getWidth() - 49, (int) (preferred.getHeight() - preferred.getHeight() / 3 * 2 - 45), 39, 37));\n makeCloseDirectionListPanel();\n }", "private Parent createContent(){\n Pane root = new Pane();\n root.setPrefSize(BRICK_SIZE*(Board.BOUNDARY_RIGHT+7), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n\n Rectangle background = new Rectangle(BRICK_SIZE*(Board.BOUNDARY_RIGHT+7), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n background.setFill(Color.rgb(152, 172, 172));\n root.getChildren().add(background);\n\n Rectangle bar = new Rectangle(BRICK_SIZE*(Board.BOUNDARY_RIGHT+1), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1)); // the Board area\n bar.setFill(Color.rgb(31, 31, 31));\n root.getChildren().add(bar);\n\n Rectangle holdArea = new Rectangle(BRICK_SIZE*(Board.BOUNDARY_RIGHT-1) + 96, 10, BRICK_SIZE*4+4, BRICK_SIZE*4+4);\n holdArea.setFill(Color.rgb(31, 31, 31));\n holdArea.setStroke(Color.WHITE);\n holdArea.setStrokeWidth(1.0);\n root.getChildren().add(holdArea);\n\n Text holdLabel = new Text();\n holdLabel.setText(\"Hold: (X)\");\n holdLabel.setLayoutX(BRICK_SIZE*(Board.BOUNDARY_RIGHT) + 96);\n holdLabel.setLayoutY(32);\n holdLabel.setFill(Color.WHITESMOKE);\n holdLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(holdLabel);\n\n Rectangle next = new Rectangle(BRICK_SIZE*(Board.BOUNDARY_RIGHT-1) + 96, 150, BRICK_SIZE*4+4, BRICK_SIZE*4+4);\n next.setFill(Color.rgb(91, 91, 91));\n next.setStroke(Color.WHITE);\n next.setStrokeWidth(1.0);\n root.getChildren().add(next);\n\n Text nextLabel = new Text();\n nextLabel.setText(\"Next:\");\n nextLabel.setLayoutX(BRICK_SIZE*(Board.BOUNDARY_RIGHT) + 96);\n nextLabel.setLayoutY(172);\n nextLabel.setFill(Color.WHITESMOKE);\n nextLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(nextLabel);\n\n Canvas canvas = new Canvas(BRICK_SIZE*(Board.BOUNDARY_RIGHT+7), BRICK_SIZE*(Board.BOUNDARY_BOTTOM+1));\n g = canvas.getGraphicsContext2D();\n root.getChildren().add(canvas);\n\n Label scoreLabel = new Label();\n scoreLabel.setText(\"Score\");\n scoreLabel.setLayoutX(360);\n scoreLabel.setLayoutY(332);\n scoreLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(scoreLabel);\n\n Label highScoreLabel = new Label();\n highScoreLabel.setText(\"High Score\");\n highScoreLabel.setLayoutX(360);\n highScoreLabel.setLayoutY(382);\n highScoreLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(highScoreLabel);\n\n Label levelLabel = new Label();\n levelLabel.setText(\"Level\");\n levelLabel.setLayoutX(360);\n levelLabel.setLayoutY(432);\n levelLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(levelLabel);\n\n Label linesLabel = new Label();\n linesLabel.setText(\"Lines Cleared\");\n linesLabel.setLayoutX(360);\n linesLabel.setLayoutY(482);\n linesLabel.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(linesLabel);\n\n board = new Board();\n\n score.setText(\"\" + board.getScore());\n score.setLayoutX(360);\n score.setLayoutY(352);\n score.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(score);\n\n highScore.setText(\"\" + Math.max(FileHandler.readHighScore(), board.getScore()));\n highScore.setLayoutX(360);\n highScore.setLayoutY(402);\n highScore.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(highScore);\n\n level.setText(\"\" + board.getLevel());\n level.setLayoutX(360);\n level.setLayoutY(452);\n level.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(level);\n\n lines.setText(\"\" + board.getTotalLinesCleared());\n lines.setLayoutX(360);\n lines.setLayoutY(502);\n lines.setFont(Font.font(\"Impact\", 20));\n root.getChildren().add(lines);\n\n refreshDisplay();\n\n // The AnimationTimer is responsible for moving the currently controlled piece down.\n AnimationTimer animationTimer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n if(time < 0.2){\n time = 0.0;\n }\n time += timeFractionBasedOnLevel();\n if(time >= 60.0){\n board.moveDown();\n refreshDisplay();\n time = 0.0;\n }\n }\n };\n animationTimer.start();\n\n return root;\n }", "private void setButtonPanelComponents(){\n\t\tJPanel buttonPane = new JPanel();\n\t\tbuttonPane.setPreferredSize(new Dimension(-1,32));\n\t\tbuttonPane.setBackground(Constant.DIALOG_BOX_COLOR_BG);\n\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\n\t\tsaveButton = Utilities.getInstance().initializeNewButton(\n\t\t\t-1, -1, -1, -1,\n\t\t\tImages.getInstance().saveBtnDialogImg,\n\t\t\tImages.getInstance().saveBtnDialogImgHover\n\t\t);\n\t\tbuttonPane.add(saveButton);\n\t\n\n\t\n\t}", "public BorderPanel(){\r\n setLayout(new BorderLayout());\r\n setBackground(Color.green);\r\n JButton b1 = new JButton(\"Button 1\");\r\n JButton b2 = new JButton(\"Button 2\");\r\n JButton b3 = new JButton(\"Button 3\");\r\n JButton b4 = new JButton(\"Button 4\");\r\n JButton b5 = new JButton(\"Button 5\");\r\n add(b1, BorderLayout.CENTER);\r\n add(b2, BorderLayout.NORTH);\r\n add(b3, BorderLayout.SOUTH);\r\n add(b4, BorderLayout.EAST);\r\n add(b5, BorderLayout.WEST);\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tadd_values_box();\n\t\t\t\tadd_button.setBounds(endof_box_pos + 5 , 0, 20,20);\n\t\t\t\tremove_button.setBounds(endof_box_pos + 30, 0, 20, 20);\n\t\t\t\tset_button.setBounds(endof_box_pos + 55, 0, 30, 20);\n\t\t\t\tString_box_pane.setSize(endof_box_pos + 110, 20);\n\t\t\t}", "ButtonPanel() {\n setLayout(new GridLayout(0,3));\n setPreferredSize(new Dimension(1000,100));\n setVisible(true);\n setMaximumSize(new Dimension(1000,250));\n reservationButton = new JButton(\"Reservation View\");\n bookingButton = new JButton(\"Booking View\");\n searchButton = new JButton(\"Search View\");\n add(reservationButton);\n add(bookingButton);\n add(searchButton);\n \n }", "public static HBox createMapBtnBox() {\n int mapCount = 4;\n ToggleButton mapBtn1 = createMapBtn(\"Maze\", \"/resources/gui/maze.txt\");\n ToggleButton mapBtn2 = createMapBtn(\"Empty\", \"/resources/gui/empty.txt\");\n ToggleButton mapBtn3 = createMapBtn(\"Oddity\", \"/resources/gui/oddity.txt\");\n ToggleButton mapBtn4 = createColourMapBtn();\n\n //Only one map can be selected, hence the use of a toggling system\n final ToggleGroup group = new ToggleGroup();\n mapBtn1.setToggleGroup(group);\n mapBtn2.setToggleGroup(group);\n mapBtn3.setToggleGroup(group);\n mapBtn4.setToggleGroup(group);\n //Default\n if (isColoured()) {\n setColoured(true);\n mapBtn4.setSelected(true);\n } else {\n setColoured(false);\n mapBtn1.setSelected(true);\n }\n setMapFilePath(\"/resources/gui/maze.txt\");\n\n HBox hbox = new HBox(mapBtn1, mapBtn2, mapBtn3, mapBtn4);\n hbox.setLayoutX(MainGUI.WIDTH / 2.0 - mapBtn1.getPrefWidth() * mapCount / 2.0);\n hbox.setLayoutY(MainGUI.HEIGHT / 2.0 + 5);\n return hbox;\n }", "public Z4Frame() {\n initComponents();\n setSize(new Dimension(330, 370));\n setResizable(false);\n setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);\n\n FlowLayout layout = new FlowLayout();\n\n Container contentPane = getContentPane();\n contentPane.setLayout(layout);\n\n JPanel imagePanel = new JPanel();\n imagePanel.setBackground(new Color(0, 0, 0));\n imagePanel.setPreferredSize(new Dimension(300, 300));\n imagePanel.setVisible(true);\n imagePanel.setLayout(new GridLayout(10, 10, 1, 1));\n\n for (int i = 0; i < BoxPanel.SIZE; i++) {\n for (int j = 0; j < BoxPanel.SIZE; j++) {\n boxes[i][j] = new BoxPanel();\n imagePanel.add(boxes[i][j]);\n }\n }\n\n KolejnyPrzyklad pokazPrzyklad = new KolejnyPrzyklad();\n HopfieldButton hopfieldButton = new HopfieldButton();\n\n contentPane.add(imagePanel);\n\n contentPane.add(pokazPrzyklad);\n contentPane.add(hopfieldButton);\n contentPane.add(new JSeparator(SwingConstants.HORIZONTAL));\n\n setVisible(true);\n }", "public void setLayout() {\n\t\tpersonenListe.getItems().addAll(deck.getPersonenOrdered());\n\t\tpersonenListe.setValue(\"Täter\");\n\t\twaffenListe.getItems().addAll(deck.getWaffenOrdered());\n\t\twaffenListe.setValue(\"Waffe\");\n\t\t// zimmerListe.getItems().addAll(deck.getZimmerOrdered());\n\t\tzimmerListe.setValue(\"Raum\");\n\n\t\tanklage.setMinSize(80, 120);\n\t\tanklage.setMaxSize(80, 120);\n\t\tanklage.setTextFill(Color.BLACK);\n\t\tanklage.setStyle(\"-fx-background-color: #787878;\");\n\n\t\twurfel.setMinSize(80, 120);\n\t\twurfel.setMaxSize(80, 120);\n\t\twurfel.setTextFill(Color.BLACK);\n\t\twurfel.setStyle(\"-fx-background-color: #787878;\");\n\n\t\tgang.setMinSize(80, 120);\n\t\tgang.setMaxSize(80, 120);\n\t\tgang.setTextFill(Color.BLACK);\n\t\tgang.setStyle(\"-fx-background-color: #787878;\");\n\n\t\ttop = new HBox();\n\t\ttop.setSpacing(1);\n\t\ttop.setAlignment(Pos.CENTER);\n\n\t\tbuttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(anklage, wurfel, gang);\n\n\t\tbottom = new HBox();\n\t\tbottom.setSpacing(150);\n\t\tbottom.setAlignment(Pos.CENTER);\n\t\tbottom.getChildren().addAll(close);\n\n\t\tfenster = new BorderPane();\n\t\tfenster.setStyle(\"-fx-background-image: url('media/ZugFensterResized.png');\");\n\t\tfenster.setTop(top);\n\t\tfenster.setCenter(buttons);\n\t\tfenster.setBottom(bottom);\n\t}", "@Override\n\tpublic void doLayout() {\n\t\tthis.transitionsPanel.setBounds(0, 0, this.getWidth(), this.getHeight());\n\t\t//this.timersButton.setBounds(this.getWidth()-2*50, 0, 50, 50);\n\t\t//this.countersButton.setBounds(this.getWidth()-50, 0, 50, 50);\n\t\t//this.salirButton.setBounds(this.getWidth()-40,0,40, 40);\n\t\tsuper.doLayout();\n\t}", "private void initButton() {\r\n\t\tthis.panelButton = new JPanel();\r\n\t\tthis.panelButton.setLayout(new BoxLayout(this.panelButton,\r\n\t\t\t\tBoxLayout.LINE_AXIS));\r\n\t\tthis.modifyButton = new JButton(\"Modify\");\r\n\t\tthis.buttonSize(this.modifyButton);\r\n\t\tthis.deleteButton = new JButton(\"Delete\");\r\n\t\tthis.buttonSize(this.deleteButton);\r\n\t\tthis.cancelButton = new JButton(\"Cancel\");\r\n\t\tthis.buttonSize(this.cancelButton);\r\n\r\n\t\tthis.modifyButton.addActionListener(this.editWeaponControl);\r\n\t\tthis.deleteButton.addActionListener(this.editWeaponControl);\r\n\t\tthis.cancelButton.addActionListener(this.editWeaponControl);\r\n\r\n\t\tthis.panelButton.add(this.modifyButton);\r\n\t\tthis.panelButton.add(Box.createRigidArea(new Dimension(15, 0)));\r\n\t\tthis.panelButton.add(this.deleteButton);\r\n\t\tthis.panelButton.add(Box.createRigidArea(new Dimension(15, 0)));\r\n\t\tthis.panelButton.add(this.cancelButton);\r\n\t}", "private void setGrid(GridPane g2) {\n\t\tg2.setPadding(new Insets(buttonSize, buttonSize, buttonSize, buttonSize));\r\n\t\tg2.setAlignment(Pos.CENTER);\r\n\t\tb = new Button[heigth][width];\r\n\t\t// randMines(); // adding random mines to the grid\r\n\t\tfor (int i = 0; i < heigth; i++) { // creating buttons in the grid\r\n\t\t\tfor (int j = 0; j < width; j++) {\r\n\t\t\t\tb[i][j] = new Button();\r\n\t\t\t\tb[i][j].setPrefSize(buttonSize, buttonSize);\r\n\t\t\t\tb[i][j].setMinSize(buttonSize, buttonSize);\r\n\t\t\t\tb[i][j].setMaxSize(buttonSize, buttonSize);\r\n\t\t\t\tb[i][j].setFont(new Font(\"Ariel\", 15));\r\n\t\t\t\tg2.add(b[i][j], i, j);\r\n\t\t\t\tb[i][j].setStyle(\"-fx-background-radius: 0;\");\r\n\t\t\t\tb[i][j].setOnMouseClicked(new ClickedButton(i, j)); // creating eventhandlers for each button\r\n\t\t\t\tb[i][j].setOnMouseDragEntered(new ClickeAndHovereddButton(i, j));\r\n\t\t\t}\r\n\t\t}\r\n\t\tg2.setMinSize((double) (buttonSize * (heigth) + 20), (double) (buttonSize * (width) + 20));\r\n\t\tg2.setPrefSize(Double.MAX_VALUE, Double.MAX_VALUE);\r\n\t\tg = new Graph(heigth, width);\r\n\t}", "private void addComponents(Container pane) {\n // Reset pane\n pane.removeAll();\n\n GridLayout mainLayout = new GridLayout(4,3);\n JPanel mainPanel = new JPanel();\n mainPanel.setLayout(mainLayout);\n\n // Setting up button sizes\n JButton b = new JButton(\"Filler button\");\n Dimension buttonSize = b.getPreferredSize();\n Dimension preferredSize = new Dimension(\n (int)(buttonSize.getWidth() * 7.5) + newGUI.maxGap,\n (int)(buttonSize.getHeight() * 3.5) + newGUI.maxGap * 2);\n mainPanel.setPreferredSize(preferredSize);\n\n // Add the main panel buttons\n mainPanel.add(commands);\n mainPanel.add(availableCommands);\n mainPanel.add(new JLabel());\n mainPanel.add(enterButton);\n\n pane.add(mainPanel, BorderLayout.NORTH);\n pane.add(new JSeparator(), BorderLayout.CENTER);\n }", "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}", "private VBox createBottomOrderBox() {\n\t\tVBox v = new VBox();\n\t\tVBox.setMargin(v, new Insets(5));\n\t\tv.setStyle(\"-fx-border-color: black; \"\n\t\t\t\t+ \"-fx-background-color: gainsboro\");\n\t\tLabel l1 = new Label(\"Please Check Applicable Storage Shelves\");\n\t\tv.getChildren().add(l1);\n\t\t//Iterate into lines of 5 lables and checkboxes\n\t\tfor (int i = 0; i < cf.getShelf().size(); i += 5) {\n\t\t\t\n\t\t\t/*\n\t\t\t * Create the HBox to store up to 5\n\t\t\t * CheckBoxes. Align its contents to the center.\n\t\t\t */\n\t\t\tHBox h = new HBox();\n\t\t\th.setSpacing(10);\n\t\t\tHBox.setMargin(h, new Insets(5));\n\t\t\th.setPadding(new Insets(5));\n\t\t\th.setAlignment(Pos.CENTER);\n\t\t\t/*\n\t\t\t * Decide what to iterate on:\n\t\t\t * If there are >= 5 shelves remaining, \n\t\t\t * iterate against 5. If there are less than 5 \n\t\t\t * shelves, iterate against no.Shelves remaining.\n\t\t\t * This allows blocks of 5 checkboxes and a final\n\t\t\t * dynamicly sized block for the remaining amount.\n\t\t\t */\n\t\t\tif ((cf.getShelf().size()-i) >= 5) {\n\t\t\t\t//For the next 5 StorageShelves\n\t\t\t\tfor (int j = i; j < i+5; j++) {\n\t\t\t\t\tCheckBox cb = new CheckBox();\n\t\t\t\t\t//Set the CheckBox's text to the Shelf it represents.\n\t\t\t\t\tcb.setText(cf.getShelf().get(j).getuID());\n\n\t\t\t\t\t// Add the checkbox to currentOrder's array to be referenced later.\n\t\t\t\t\tcurrentOrder.addBox(cb);\n\t\t\t\t\t\n\t\t\t\t\t//Add checkbox to Hbox for displaying\n\t\t\t\t\th.getChildren().add(cb);\n\t\t\t\t}\n\t\t\t} else if ((cf.getShelf().size()-i) < 5) {\n\t\t\t\t//For the remaining number of shelves\n\t\t\t\tfor (int j = i; j < cf.getShelf().size(); j++) {\n\t\t\t\t\tCheckBox cb = new CheckBox();\n\t\t\t\t\t//Set the CheckBox's text to the Shelf it represents.\n\t\t\t\t\tcb.setText(cf.getShelf().get(j).getuID());\n\n\t\t\t\t\t// Add the checkbox to currentOrder's array to be referenced later.\n\t\t\t\t\tcurrentOrder.addBox(cb);\n\t\t\t\t\t//Add checkbox to Hbox for displaying\n\t\t\t\t\th.getChildren().add(cb);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"OrderBox Error Found!\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t//Add HBox and its contents into the VBox\n\t\t\tv.getChildren().add(h);\n\t\t}\n\t\treturn v;\n\t}", "@Override\n public void bottomPanel(String bottomType) {\n\n if (getBottomPanel() != null) {\n getBottomPanel().removeAll();\n getBottomPanel().revalidate();\n getBottomPanel().repaint();\n }\n switch (bottomType) {\n case \"Inventory\":\n getBottomPanel().setLayout(new FlowLayout(FlowLayout.CENTER, 150, 10));\n //Creating nextPage BTN\n nextPagebtn = new JButton(\"Next\");\n nextPagebtn.setPreferredSize(new Dimension(150, 35));\n nextPagebtn.addActionListener(this);\n //Creating Previous BTN\n previousPagebtn = new JButton(\"Previous\");\n previousPagebtn.setPreferredSize(new Dimension(150, 35));\n previousPagebtn.addActionListener(this);\n //Add to Panel\n getBottomPanel().add(previousPagebtn);\n getBottomPanel().add(nextPagebtn);\n break;\n case \"Checkout\":\n checkOutbtn = new JButton(\"Go To Checkout\");\n checkOutbtn.setPreferredSize(new Dimension(150, 35));\n checkOutbtn.addActionListener(this);\n getBottomPanel().add(checkOutbtn);\n break;\n case \"Submit Order\":\n submitbtn = new JButton(\"Submit Order\");\n submitbtn.setPreferredSize(new Dimension(150, 35));\n submitbtn.addActionListener(this);\n getBottomPanel().add(submitbtn);\n break;\n }\n }", "public void createHeader() {\n\t\tHBox box = new HBox();\n\t\tButton printBtn = new Button(\"Print\");\n\t\tprintBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton printAllBtn = new Button(\"Print allemaal\");\n\t\tprintAllBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton cancelBtn = new Button(\"Annuleer\");\n\t\tcancelBtn.getStyleClass().addAll(\"btn\", \"btn-danger\");\n\t\tbox.getChildren().addAll(createTitle(), printBtn, printAllBtn, cancelBtn);\n\t\t\n\t\tprintBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printSelected(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tprintAllBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printAll(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tcancelBtn.setOnAction(e -> {\n\t\t\tprintController.cancel();\n\t\t});\n\t\t\n\t\tsetTop(box);\n\t}", "private void makeCloseDirectionListPanel(){\n closeDirectionList = new JPanel();\n closeDirectionList.setVisible(false);\n closeDirectionList.setBounds(25, 280, 400, 20);\n closeDirectionList.setBackground(DrawAttribute.fadeblack);\n closeDirectionList.setLayout(new BoxLayout(closeDirectionList, BoxLayout.LINE_AXIS));\n closeDirectionList.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\n\n closeDirectionListButton = new JButton(new ImageIcon(this.getClass().getResource(\"/data/resetButtonWhiteIcon.png\")));\n closeDirectionListButton.setOpaque(false);\n closeDirectionListButton.setBackground(DrawAttribute.fadeblack);\n closeDirectionListButton.setActionCommand(\"closeDirectionList\");\n closeDirectionList.add(closeDirectionListButton);\n\n travelTimePanel = new JPanel();\n travelTimePanel.setOpaque(false);\n travelTimePanel.setBounds(25, 280, 275, 20);\n travelTimePanel.setVisible(false);\n travelTimeLabel = new JLabel();\n travelTimeLabel.setHorizontalAlignment(SwingConstants.RIGHT);\n travelTimeLabel.setForeground(Color.WHITE);\n travelTimePanel.add(travelTimeLabel);\n }", "private void $$$setupUI$$$ ()\n {\n contentPane = new JPanel();\n contentPane.setLayout(new BorderLayout(0, 0));\n contentPane.setBackground(new Color(-16777216));\n contentPane.setPreferredSize(new Dimension(300, 100));\n contentPane.setRequestFocusEnabled(false);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n panel1.setBackground(new Color(-16777216));\n panel1.setPreferredSize(new Dimension(200, 50));\n contentPane.add(panel1, BorderLayout.SOUTH);\n buttonOK = new JButton();\n buttonOK.setPreferredSize(new Dimension(100, 31));\n buttonOK.setText(\"OK\");\n panel1.add(buttonOK);\n final JLabel label1 = new JLabel();\n label1.setPreferredSize(new Dimension(30, 10));\n label1.setText(\"\");\n panel1.add(label1);\n buttonCancel = new JButton();\n buttonCancel.setPreferredSize(new Dimension(100, 31));\n buttonCancel.setText(\"Cancel\");\n panel1.add(buttonCancel);\n textField1 = new JTextField();\n textField1.setBackground(new Color(-15987184));\n Font textField1Font = Tools.getFont(\"Arial\", -1, 20, textField1.getFont());\n if (textField1Font != null)\n {\n textField1.setFont(textField1Font);\n }\n textField1.setForeground(new Color(-1));\n textField1.setHorizontalAlignment(0);\n textField1.setOpaque(false);\n textField1.setPreferredSize(new Dimension(300, 50));\n contentPane.add(textField1, BorderLayout.CENTER);\n final JLabel label2 = new JLabel();\n label2.setPreferredSize(new Dimension(11, 11));\n label2.setText(\" \");\n contentPane.add(label2, BorderLayout.WEST);\n final JLabel label3 = new JLabel();\n label3.setPreferredSize(new Dimension(11, 11));\n label3.setText(\" \");\n contentPane.add(label3, BorderLayout.EAST);\n final JLabel label4 = new JLabel();\n label4.setPreferredSize(new Dimension(11, 11));\n label4.setText(\"\");\n contentPane.add(label4, BorderLayout.NORTH);\n }", "private void eastRegion() {\r\n\t\tContainer eastContainer = new Container(new BoxLayout(BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\teastContainer.getAllStyles().setPadding(Component.TOP, 50);\r\n\t\teastContainer.getAllStyles().setBorder(Border.createLineBorder(4, ColorUtil.BLACK));\r\n\t\t\r\n\t\tBreakCommand breakCommand = new BreakCommand(gw);\r\n\t\tButton breakButton = new Button(breakCommand);\r\n\t\t\r\n\t\tRightCommand rightCommand = new RightCommand(gw);\r\n\t\tButton rightButton = new Button(rightCommand);\r\n\t\t\r\n\t\teastContainer.add(breakButton);\r\n\t\tbuttonStyling(breakButton, true, false);\r\n\t\t\r\n\t\teastContainer.add(rightButton);\r\n\t\tbuttonStyling(rightButton, false, false);\r\n\t\t\r\n\t\tbreakButton.setCommand(breakCommand);\r\n\t\taddKeyListener('b', breakCommand);\r\n\t\t\r\n\t\trightButton.setCommand(rightCommand);\r\n\t\taddKeyListener('r', rightCommand);\r\n\t\t\r\n\t\tadd(BorderLayout.EAST, eastContainer);\r\n\t}", "private void createButtonsPane(VBox labelsPane){\n\t\tHBox buttonsPane = new HBox();\n\t\tButton easy = new Button(\"EASY\");\n\t\teasy.setFont(new Font(\"Arial Black\", 12));\n\t\teasy.setTextFill(Color.BLUE);\n\t\teasy.setFocusTraversable(false);\n\t\tButton medium = new Button(\"MEDIUM\");\n\t\tmedium.setFont(new Font(\"Arial Black\", 12));\n\t\tmedium.setTextFill(Color.BLUE);\n\t\tmedium.setFocusTraversable(false);\n\t\tButton hard = new Button(\"HARD\");\n\t\thard.setFont(new Font(\"Arial Black\", 12));\n\t\thard.setTextFill(Color.BLUE);\n\t\thard.setFocusTraversable(false);\n\t\tbuttonsPane.getChildren().addAll(easy, medium, hard);\n\t\tbuttonsPane.setMargin(easy, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(medium, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(hard, new Insets(10,5,5,5));\n\t\tbuttonsPane.setSpacing(20);\n\t\tbuttonsPane.setAlignment(Pos.CENTER);\n\t\tbuttonsPane.setStyle(\"-fx-background-color: gray;\");\n\t\teasy.setOnAction(new EasyHandler());\n\t\tmedium.setOnAction(new MediumHandler());\n\t\thard.setOnAction(new HardHandler());\n\t\tlabelsPane.getChildren().add(buttonsPane);\n\t}", "private void setup() {\r\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\r\n // list\r\n listPanel = new JPanel();\r\n listPanel.setLayout(new BoxLayout(listPanel, BoxLayout.PAGE_AXIS));\r\n\r\n JScrollPane scrollPane = new JScrollPane(listPanel);\r\n\r\n // button\r\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));\r\n buttonPanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));\r\n\r\n JButton button = new JButton(\"Close\");\r\n button.addActionListener(this);\r\n buttonPanel.add(button);\r\n\r\n // container\r\n Container contentPane = getContentPane();\r\n contentPane.setLayout(new BorderLayout());\r\n\r\n contentPane.add(scrollPane, BorderLayout.CENTER);\r\n contentPane.add(buttonPanel, BorderLayout.PAGE_END);\r\n }", "public static void main(String[] args) {\n JFrame frame = new JFrame(\"Hello Swing\");\n JLabel label = new JLabel(\"I'm a Scientist\", Scientist.CENTER);\n JPanel panel = new JPanel();\n \n //setting for the panel\n BoxLayout boxlayout = new BoxLayout(panel, BoxLayout.Y_AXIS);\n panel.setLayout(boxlayout);\n panel.setBorder(new EmptyBorder(newInsets(45, 70, 45, 70)));\n \n //define new buttons\n JButton jb1 = new JButton(\"Button 1\");\n JButton jb2 = new JButton(\"Button 2\");\n JButton jb3 = new JButton(\"Button 3\");\n \n //add button to the frame (and spaces between buttons)\n panel.add(jb1);\n panel.add(jb2);\n panel.add(jb3);\n \n //add the label and panel to the frame\n frame.setLayout(new GridLayout(2, 1));\n frame.add(label);\n frame.add(panel);\n \n //settings for the frame\n frame.pack();\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setVisible(true);\n }", "public void crearP(){\n \t\n getContentPane().setLayout(new BorderLayout());\n \n // Create two JPanels one on top on the other\n p1 = new JPanel();\n p2 = new JPanel();\n \n // Set the grid layout \n p1.setLayout(new GridLayout(5,2));\n p2.setLayout(new GridLayout(2,1));\n \n //********************//\n // Create the buttons //\n //********************//\n \n buttonAbonar = new JButton(\"Abonar\");\n botones.add(buttonAbonar);\n \n buttonRetirar = new JButton(\"Retirar\");\n botones.add(buttonRetirar);\n\n buttonComprarPagar = new JButton(\"Comprar / Pagar\");\n botones.add(buttonComprarPagar);\n\n buttonComprarInversion = new JButton(\"Comprar Inversion\");\n botones.add(buttonComprarInversion);\n\n buttonRecibirTransferencia = new JButton(\"Recibir Transferencia\");\n botones.add(buttonRecibirTransferencia);\n\n buttonRealizarTransferencia = new JButton(\"Realizar Transferencia\"); \n botones.add(buttonRealizarTransferencia);\n\n buttonGenerarCorte = new JButton(\"Generar Corte\");\n botones.add(buttonGenerarCorte);\n\n buttonVerEstado= new JButton(\"Ver Estado Datos Banco\"); \n botones.add(buttonVerEstado);\n\n buttonAddConto= new JButton(\"Insertar Cuenta Credito\"); \n botones.add(buttonAddConto);\n buttonAddConto= new JButton(\"Insertar Cuenta Debito\"); \n botones.add(buttonAddConto);\n \n buttonAddUser= new JButton(\"Insertar Cliente\"); \n botones.add(buttonAddUser);\n \n // Set the size for the buttons\n for(JButton x:botones){\n x.setMaximumSize(new Dimension(250,250));\n x.setMinimumSize(new Dimension(200,200));\n x.setPreferredSize(new Dimension(200,200));\n // Adding the button to the view\n p1.add(x);\n }\n \n //***************************//\n // Adding a text to a JLabel //\n //***************************//\n\n labelPanel = new JLabel(\" Estado...\");\n p2.add(labelPanel);\n \n //*******************************//\n // Adding a text to a JTextField //\n // To display the errors..\t\t //\n //*******************************//\n \n tf = new JTextField(\"Detalles del error...\");\n textos.add(tf);\n p2.add(textos.get(0));\n \n // Setting the layout of the Panels\n add(p1, BorderLayout.WEST);\n add(p2, BorderLayout.CENTER);\n }", "private HBox addTopBox() {\n\n // Create a menuTab that is holding all menu nodes to return\n HBox menuTab = new HBox();\n menuTab.setStyle(\"-fx-background-color: DAE6F3;\");\n menuTab.setAlignment(Pos.CENTER);\n menuTab.setPadding(new Insets(15, 12, 15, 12));\n menuTab.setSpacing(10);\n\n // Game status label and Speed controller\n HBox speedTab = new HBox();\n speedTab.setPrefWidth(200);\n speedTab.setSpacing(10);\n speedTab.setAlignment(Pos.CENTER_LEFT);\n Label speedLbl= new Label(\"Speed:\");\n speedLbl.setPrefWidth(80);\n speedLbl.setAlignment(Pos.CENTER);\n\n Slider speedCtrl = new Slider();\n speedCtrl.setPrefWidth(80);\n speedCtrl.setMin(0); speedCtrl.setMax(2);\n speedCtrl.setValue(1);\n speedCtrl.setTooltip(new Tooltip(\"Game Speed\"));\n speedCtrl.setOnMouseDragged(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent mouseEvent) {\n timeline.setRate(speedCtrl.getValue());\n gaming.setRate(Math.max(speedCtrl.getValue(), 0.01D));\n }\n });\n speedTab.getChildren().addAll(speedLbl, speedCtrl);\n //TODO get status?\n timeline.statusProperty().addListener(new ChangeListener<Animation.Status>() {\n @Override\n public void changed(ObservableValue<? extends Animation.Status> observableValue, Animation.Status status, Animation.Status t1) {\n speedLbl.setText(t1.toString());\n }\n });\n\n // Assemble buttons into menuTab\n ButtonBar bb = new ButtonBar();\n Button play = new Button(\"Play\");\n Button pause = new Button(\"Pause\");\n Button reset = new Button(\"Reset\");\n bb.getButtons().addAll(play, pause, reset);\n\n bb.getButtons().forEach(b -> {\n ((Button) b).setPrefWidth(80);\n ((Button) b).setBackground(new Background(bgf));\n ((Button) b).setBorder(new Border(bos));\n });\n\n // Set ActionEvent for 3 buttons\n play.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n if (timeline.getStatus().toString().equals(\"STOPPED\")) {\n gameMap = new CreatureControl(plantQuantity, trexQuantity);\n root.setCenter(gameMap);\n frame = new KeyFrame(Duration.millis(10), new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent e) {\n if (!gameMap.run()) {\n bgmHelper = true;\n playBGM();\n }\n }\n });\n if (!timeline.getKeyFrames().isEmpty()) timeline.getKeyFrames().remove(0); // Help to stable the reset\n timeline.getKeyFrames().add(frame);\n timeline.setRate(1.0D);\n gaming.setRate(1.0D);\n speedCtrl.setValue(1.0D);\n playBGM();\n gameStart = true;\n }\n timeline.play();\n }\n });\n\n pause.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n if (gameStart) timeline.pause();\n }\n });\n\n reset.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n // Reset to title frame in what ever status\n if (gameStart) {\n timeline.stop();\n timeline.setRate(1.0D);\n gaming.setRate(1.0D);\n speedCtrl.setValue(1.0D);\n playBGM();\n gameStart = false;\n bgmHelper = false;\n gameMap = new CreatureControl();\n root.setCenter(gameMap);\n }\n }\n });\n\n // Assemble all nodes into menuTab.\n menuTab.getChildren().addAll(bb, speedTab);\n menuTab.setBorder(new Border(bos));\n return menuTab;\n }", "public void initUI() {\n\t\tFlowLayout flow = new FlowLayout();\r\n\t\tthis.setTitle(\"来一波\");\r\n\t\tthis.setSize(960, 720);\r\n\t\tthis.setLayout(flow);\r\n\t\tthis.setLocationRelativeTo(null);\r\n\t\tthis.setDefaultCloseOperation(3);\r\n\t\t\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tthis.add(panel);\r\n\t\tthis.setBackground(Color.BLACK);\r\n\t\t\r\n\t\tslider1.setName(\"改变大小\");\r\n\t\tslider1.setMinorTickSpacing(20);\r\n\t\tslider1.setPaintTicks(true);\r\n\t\tslider1.setPaintLabels(true);\r\n\t\tthis.add(slider1);\r\n\t\t\r\n\t\tJButton button1 = new JButton(\"导入图片\");\r\n\t\tbutton1.setPreferredSize(new Dimension(100,30));\r\n\t\tthis.add(button1);\r\n\t\t\r\n\t\tJButton button2 = new JButton(\"热感应\");\r\n\t\tbutton2.setPreferredSize(new Dimension(100,30));\r\n\t\tthis.add(button2);\r\n\t\t\r\n\t\tJButton button3 = new JButton(\"模糊化\");\r\n\t\tbutton3.setPreferredSize(new Dimension(100,30));\r\n\t\tthis.add(button3);\r\n\t\t\r\n\t\tJButton button4 = new JButton(\"流行拼接\");\r\n\t\tbutton4.setPreferredSize(new Dimension(100,30));\r\n\t\tthis.add(button4);\r\n\t\t\r\n\t\tJButton button5 = new JButton(\"万花筒\");\r\n\t\tbutton5.setPreferredSize(new Dimension(100,30));\r\n\t\tthis.add(button5);\r\n\t\t\r\n\t\tslider2.setName(\"调整参数\");\r\n\t\tslider2.setMinorTickSpacing(20);\r\n\t\tslider2.setPaintTicks(true);\r\n\t\tslider2.setPaintLabels(true);\r\n\t\tthis.add(slider2);\r\n\t\t\r\n\t\tthis.setVisible(true);\r\n\t\t\r\n\t\tGraphics g = this.getGraphics();//传画笔的操作一定要在设置界面可见后进行\r\n\t\t\r\n\t\tDrawListener ml = new DrawListener(g,this);\r\n\t\tbutton1.addActionListener(ml);\r\n\t\tbutton2.addActionListener(ml);\r\n\t\tbutton3.addActionListener(ml);\r\n\t\tbutton4.addActionListener(ml);\r\n\t\tbutton5.addActionListener(ml);\r\n\t\tslider1.addChangeListener(ml);\r\n\t\tslider2.addChangeListener(ml);\r\n\t\t\r\n\t}", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "public LottoGUI() {\n\t\tsetTitle(\"CompSci Lotto\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 500, 300);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(Color.LIGHT_GRAY);\n\t\tcontentPane.setInheritsPopupMenu(true);\n\t\tcontentPane.setIgnoreRepaint(true);\n\t\tcontentPane.setForeground(Color.RED);\n\t\tcontentPane.setVisible(true); //<--------KEEP THIS SET TO TRUE\n\t\tcontentPane.setOpaque(false);\n\t\tcontentPane.setBorder(new EmptyBorder(1, 5, 1, 5));\n\t\tsetContentPane(contentPane);\t\t\n\n\t\t//3 JPanel variables for text at bottom, numbers & buttons\n\t\tJPanel panel_TextInfo = new JPanel(); //panel for text fields at bottom\n\t\tpanel_TextInfo.setBackground(Color.WHITE);\n\t\t\n\t\tJPanel panel_Numbers = new JPanel(); //panel for numbers\n\t\t\n\t\tJPanel panel_Buttons = new JPanel(); //panel for buttons\n\t\tpanel_Buttons.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\t\n\t\tgl_contentPane_1 = new GroupLayout(contentPane);\n\t\tgl_contentPane_1.setHorizontalGroup(\n\t\t\tgl_contentPane_1.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_contentPane_1.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_contentPane_1.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addComponent(panel_TextInfo, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t.addGroup(gl_contentPane_1.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(panel_Buttons, 0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(panel_Numbers, GroupLayout.PREFERRED_SIZE, 372, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t);\n\t\tgl_contentPane_1.setVerticalGroup(\n\t\t\tgl_contentPane_1.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPane_1.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_contentPane_1.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t.addComponent(panel_Buttons, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(panel_Numbers, GroupLayout.DEFAULT_SIZE, 251, Short.MAX_VALUE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(panel_TextInfo, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addGap(227))\n\t\t);\n\t\tpanel_Numbers.setLayout(null);\n\t\t\n\t\tnumbersPanel(panel_Numbers); //panel of number buttons\n\t\t\n\t\tbuttonsPanel(panel_Buttons); //panel of main colored buttons\n\t\t\n\t\ttextInfoBottom(panel_TextInfo); //info about current status\n\t\t\n\t\t\n\t}", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagButton = new JButton();\n Font memberImportTagButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagButton.getFont());\n if (memberImportTagButtonFont != null) memberImportTagButton.setFont(memberImportTagButtonFont);\n memberImportTagButton.setText(\"导入选择的标签分组-取并集\");\n panel2.add(memberImportTagButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagRetainButton = new JButton();\n Font memberImportTagRetainButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagRetainButton.getFont());\n if (memberImportTagRetainButtonFont != null)\n memberImportTagRetainButton.setFont(memberImportTagRetainButtonFont);\n memberImportTagRetainButton.setText(\"导入选择的标签分组-取交集\");\n panel2.add(memberImportTagRetainButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportAllButton = new JButton();\n Font memberImportAllButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportAllButton.getFont());\n if (memberImportAllButtonFont != null) memberImportAllButton.setFont(memberImportAllButtonFont);\n memberImportAllButton.setText(\"导入所有关注公众号的用户\");\n panel2.add(memberImportAllButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionPanel = new JPanel();\n importOptionPanel.setLayout(new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));\n panel3.add(importOptionPanel, new GridConstraints(1, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n importOptionOpenIdCheckBox = new JCheckBox();\n importOptionOpenIdCheckBox.setEnabled(false);\n importOptionOpenIdCheckBox.setSelected(true);\n importOptionOpenIdCheckBox.setText(\"openId\");\n importOptionPanel.add(importOptionOpenIdCheckBox, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n importOptionPanel.add(spacer1, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n importOptionBasicInfoCheckBox = new JCheckBox();\n importOptionBasicInfoCheckBox.setText(\"昵称、性别等基本信息\");\n importOptionBasicInfoCheckBox.setToolTipText(\"每获取一条信息会花费一次每日接口调用量\");\n importOptionPanel.add(importOptionBasicInfoCheckBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n importOptionAvatarCheckBox = new JCheckBox();\n importOptionAvatarCheckBox.setText(\"头像\");\n importOptionAvatarCheckBox.setToolTipText(\"勾选会导致左侧列表甚至WePush变卡哦\");\n importOptionPanel.add(importOptionAvatarCheckBox, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n clearDbCacheButton = new JButton();\n clearDbCacheButton.setText(\"清空本地缓存\");\n importOptionPanel.add(clearDbCacheButton, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n memberImportTagComboBox = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n memberImportTagComboBox.setModel(defaultComboBoxModel1);\n panel3.add(memberImportTagComboBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n memberImportTagFreshButton = new JButton();\n Font memberImportTagFreshButtonFont = this.$$$getFont$$$(null, Font.PLAIN, -1, memberImportTagFreshButton.getFont());\n if (memberImportTagFreshButtonFont != null) memberImportTagFreshButton.setFont(memberImportTagFreshButtonFont);\n memberImportTagFreshButton.setText(\"刷新\");\n panel3.add(memberImportTagFreshButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, 1, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"标签分组\");\n panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "private void createMainMenuFooterComposite() {\n\n\t\tGridData gridData22 = new GridData();\n\t\tgridData22.horizontalAlignment = GridData.BEGINNING;\n\t\tgridData22.verticalAlignment = GridData.END;\n\t\tGridData gridData2 = new GridData();\n\t\tgridData2.grabExcessHorizontalSpace = true;\n\t\tgridData2.grabExcessVerticalSpace = true;\n\t\tgridData2.verticalAlignment = GridData.END;\n\t\tgridData2.heightHint = 75;\n\t\tgridData2.widthHint = 75;\n\t\tgridData2.horizontalAlignment = GridData.END;\n\n\t\tGridLayout gridLayout2 = new GridLayout();\n\t\tgridLayout2.horizontalSpacing = 30;\n\t\tgridLayout2.marginHeight = 20;\n\t\tgridLayout2.numColumns = 2;\n\t\tgridLayout2.marginWidth = 20;\n\n\t\tGridData gridData = new GridData();\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.verticalAlignment = GridData.END;\n\t\tgridData.heightHint = 150;\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tmainMenuFooterComposite = new Composite(this, SWT.NONE);\n\t\tmainMenuFooterComposite.setBackground(new Color(Display.getCurrent(),\n\t\t\t\t255, 255, 255));\n\t\tmainMenuFooterComposite.setLayout(gridLayout2);\n\t\tmainMenuFooterComposite.setLayoutData(gridData);\n\n\t\tlblBallyCopyright = new CbctlLabel(mainMenuFooterComposite, SWT.NONE);\n\t\tlblBallyCopyright.setText(LabelLoader.getLabelValue(LabelKeyConstants.BALLY_COPYRIGHT_LABEL));\n\t\tlblBallyCopyright.setLayoutData(gridData22);\n\t\tlblBallyCopyright.setFont(new Font(Display.getDefault(), \"Arial\", 8, SWT.NORMAL));\n\t\tbtnExit = new CbctlButton(mainMenuFooterComposite, SWT.NONE, \"\",\n\t\t\t\tLabelKeyConstants.EXIT_BUTTON);\n\t\tbtnExit.setImage(new Image(Display.getCurrent(), getClass()\n\t\t\t\t.getResourceAsStream(imgExitBtn)));\n\t\tbtnExit.setLayoutData(gridData2);\n\t}", "public void setBottom(int x) {\r\n bottomSide = x;\r\n }", "private void setPanel()\r\n\t{\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(5, 2));\r\n\t\t\r\n\t\tpanel.add(bubbleL);\r\n\t\tpanel.add(bubblePB);\r\n\t\t\r\n\t\tpanel.add(insertionL);\r\n\t\tpanel.add(insertionPB);\r\n\t\t\r\n\t\tpanel.add(mergeL);\r\n\t\tpanel.add(mergePB);\r\n\t\t\r\n\t\tpanel.add(quickL);\r\n\t\tpanel.add(quickPB);\r\n\t\t\r\n\t\tpanel.add(radixL);\r\n\t\tpanel.add(radixPB);\r\n\t}" ]
[ "0.71645886", "0.7104736", "0.7023208", "0.7014797", "0.6931384", "0.69083434", "0.6888835", "0.68021667", "0.6605172", "0.6578402", "0.6565779", "0.64511406", "0.6411884", "0.63814616", "0.63668597", "0.6365493", "0.6362252", "0.635152", "0.634858", "0.63284796", "0.6321", "0.631146", "0.63057154", "0.62956107", "0.6293486", "0.62875694", "0.6283095", "0.62799096", "0.62778664", "0.62742925", "0.6270026", "0.6263971", "0.6250483", "0.62453234", "0.62397283", "0.6205645", "0.6196292", "0.61930096", "0.61757386", "0.61702365", "0.61624515", "0.6153547", "0.61451334", "0.61411583", "0.61364806", "0.61311805", "0.61302423", "0.6127231", "0.6109505", "0.6107499", "0.610125", "0.6100773", "0.6092491", "0.608617", "0.60787225", "0.60747474", "0.6057726", "0.6055988", "0.6054556", "0.6050444", "0.60501516", "0.60408145", "0.60361636", "0.60342824", "0.6025902", "0.6024685", "0.60150325", "0.6003394", "0.60010916", "0.59999454", "0.5996607", "0.5976088", "0.5975126", "0.59690136", "0.5968202", "0.59673023", "0.59652185", "0.5955289", "0.59437454", "0.5942229", "0.59376794", "0.593761", "0.5934065", "0.59310657", "0.593044", "0.5922707", "0.5921598", "0.5920077", "0.5917804", "0.5915397", "0.5913713", "0.5913393", "0.5910633", "0.59085625", "0.5905653", "0.59038824", "0.5901366", "0.5897522", "0.5896539", "0.5890814", "0.588427" ]
0.0
-1
function to convert char c to actual colour used
Color colFromChar(char c) { Color ans = Color.BLACK; switch (c) { case 'y': ans = Color.YELLOW; break; case 'r': ans = Color.RED; break; case 'g': ans = Color.GREEN; break; case 'b': ans = Color.BLUE; break; case 'k': ans = Color.BLACK; break; case 'o': ans = Color.ORANGE; break; case 'p': ans = Color.PINK; break; case 'c': ans = Color.CYAN; break; } return ans; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char getColor();", "public Color returnColorForCharacter(char c){\r\n\t\tif (c == 'r'){\r\n\t\t\treturn Color.red;\r\n\t\t}\r\n\t\telse if (c == 'g'){\r\n\t\t\treturn Color.green;\r\n\t\t}\r\n\t\telse if (c == 'b'){\r\n\t\t\treturn Color.blue;\r\n\t\t}\r\n\t\telse if (c == 'w'){\r\n\t\t\treturn Color.white;\r\n\t\t}\r\n\t\telse if (c == 'y'){\r\n\t\t\treturn Color.yellow;\r\n\t\t}\r\n\t\telse if (c == 'o'){\r\n\t\t\treturn Color.orange;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn Color.lightGray;\r\n\t\t}\r\n\t}", "public static String cssColor(final char c) {\n\tfinal short[] array = _cssColor0(c);\n\treturn \"rgb(\"+array[0]+\",\"+array[1]+\",\"+array[2]+\")\";\n\t}", "java.awt.Color getColor();", "String getColor();", "private String colourToRgb(Color c)\n {\n return \"rgb(\" + (int)(c.getRed()*255) + \",\" + (int)(c.getGreen()*255) + \",\" + (int)(c.getBlue()*255) + \")\";\n }", "private String translateColor(CardColor c) {\n if (c == CardColor.BLUE) return Color.BLUE.getAnsiCode();\n if (c == CardColor.VIOLET) return Color.RED.getAnsiCode();\n if (c == CardColor.GREEN) return Color.GREEN.getAnsiCode();\n else return Color.YELLOW.getAnsiCode();\n }", "private Color detectColor(String c){\n switch (c){\n case \"RED\": return Color.RED;\n case \"BLUE\": return Color.BLUE;\n case \"YELLOW\": return Color.YELLOW;\n case \"GREEN\": return Color.GREEN;\n case \"WHITE\": return Color.WHITE;\n case \"BLACK\": return Color.BLACK;\n case \"CYAN\": return Color.CYAN;\n case \"ORANGE\": return Color.ORANGE;\n case \"MAGENTA\": return Color.MAGENTA;\n case \"PINK\": return Color.PINK;\n default: return null;\n }\n }", "public static\n Color convertStringToColor(String val)\n {\n Color ret_Color;\n\n try\n {\n String workstr1;\n int slen = val.length();\n if (val.startsWith(\"0x\") || val.startsWith(\"0X\"))\n {\n workstr1 = val.substring(2);\n slen -= 2;\n }\n else\n if (val.startsWith(\"#\"))\n {\n workstr1 = val.substring(1);\n slen -= 1;\n }\n else\n { // decimal integer\n return new Color(Integer.parseInt(val));\n }\n\n // process hex string\n if (slen <= 6)\n { // no alpha\n int ival = Integer.parseInt(workstr1, 16);\n ret_Color = new Color(ival);\n }\n else\n { // has alpha of some sort\n String workstr2;\n if (slen == 8)\n {\n workstr2 = workstr1;\n }\n else\n if (slen == 7)\n {\n workstr2 = \"0\" + workstr1;\n }\n else\n {\n workstr2 = workstr1.substring(slen - 8); // get rightmost 8\n }\n\n // System.out.println(\"Color,val=[\" + val + \"],key=[\" + key + \"],slen=\" + slen + \"]\");\n // System.out.println(\" workstr1=[\" + workstr1 + \"],workstr2=[\" + workstr2 + \"]\");\n int a = Integer.parseInt(workstr2.substring(0, 2), 16); // a\n int r = Integer.parseInt(workstr2.substring(2, 4), 16); // r\n int g = Integer.parseInt(workstr2.substring(4, 6), 16); // g\n int b = Integer.parseInt(workstr2.substring(6, 8), 16); // b\n // System.out.println(\" ret_Color1=[\" + r + \":\" + g + \":\" + b +\":\" + a + \"]\");\n // int ival = Integer.parseInt(workstr2, 16);\n // ret_Color = new Color(ival, true);\n // System.out.println(\" ival=\" + ival);\n try {\n ret_Color = new Color(r, g, b, a);\n }\n catch (NoSuchMethodError excp1) {\n System.out.println(\"YutilProperties:convertStringToColor|excp1=[\" + excp1 + \"]\");\n ret_Color = new Color(r, g, b);\n }\n // System.out.println(\" ret_Color1=[\" + ret_Color + \"]\");\n }\n }\n catch(NumberFormatException e)\n {\n ret_Color = Color.black;\n // System.out.println(\"Color,ret_Color3=[\" + ret_Color + \"]\");\n }\n\n return ret_Color;\n }", "public static AnsiColor rgb(Color c) {\n return new RgbColor(c);\n }", "public char returnNextColor(char c){\r\n\t\t\r\n\t\tif(c == 'o'){\r\n\t\t\treturn col[0];\r\n\t\t}\r\n\t\tfor(int i = 0; i < col.length-1; i++){\r\n\t\t\tif(c == col[i]){\r\n\t\t\t\treturn col[i+1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn col[0];\r\n\t}", "private static String formatHexString(Color c) {\n return c != null?String.format(null, \"#%02x%02x%02x\", new Object[]{Long.valueOf(Math.round(c.getRed() * 255.0D)), Long.valueOf(Math.round(c.getGreen() * 255.0D)), Long.valueOf(Math.round(c.getBlue() * 255.0D))}).toUpperCase():null;\n }", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "public String getColorString();", "@Override\n\tprotected char getColor(int position) {\n\t\treturn color;\n\t}", "Integer getTxtColor();", "public static String toColor(String s) {\n\t\treturn ChatColor.translateAlternateColorCodes('&', s);\n\t}", "public String colorToLocate() {\n char targetColor;\n gameData = DriverStation.getInstance().getGameSpecificMessage();\n if(gameData.length() > 0) {\n switch (gameData.charAt(0)) {\n case 'B' :\n targetColor = 'R';\n break;\n case 'G' :\n targetColor = 'Y';\n break;\n case 'R' :\n targetColor = 'B';\n break;\n case 'Y' :\n targetColor = 'G';\n break;\n default :\n targetColor = '?';\n break;\n }\n } else {\n targetColor = '?';\n }\n return \"\"+targetColor;\n }", "PieceColor get(char c, char r) {\n assert validSquare(c, r);\n return get(index(c, r));\n }", "public static Color getColor(int c)\n {\n int r = (7*c)%64;\n return new Color((r%4)*63+30,((r/4)%4)*63+30,(r/4/4)*63+30);\n }", "private String singleChar(RubiksColor color) {\n switch(color) {\n case RED:\n return \"R\";\n case GREEN:\n return \"G\";\n case BLUE:\n return \"B\";\n case YELLOW:\n return \"Y\";\n case ORANGE:\n return \"O\";\n case WHITE:\n return \"W\";\n }\n\n return \"R\";\n }", "private int parseColor(int start,int end) {\n char ch = mChars[start];\n if(ch != '\"' && ch != '0') {\n return 0;\n }\n boolean type = ch == '0';\n if(type) {\n String v = new String(mChars,start + 2,end - start - 2);\n try{\n //Copied from Color.java\n long color = Long.parseLong(v, 16);\n if (end - start == 8) {\n // Set the alpha value\n color |= 0x00000000ff000000;\n }\n return (int)color;\n }catch(RuntimeException e){\n return 0;\n }\n }else{\n if(end - start != 11 && end - start != 9) {\n return 0;\n }\n String v = new String(mChars,start + 1,end - start - 2);\n try{\n return Color.parseColor(v);\n }catch(RuntimeException e){\n return 0;\n }\n }\n }", "String getColour();", "public abstract RGBIColor toRGBColor();", "public String c() {\r\n switch (c) {\r\n case RED:\r\n return \"Red\";\r\n case BLUE:\r\n return \"Blue\";\r\n case YELLOW:\r\n return \"Yellow\";\r\n case GREEN:\r\n return \"Green\";\r\n default:\r\n return \"Colorless\";\r\n }\r\n }", "public\n static\n String convertColorToString(Color val)\n {\n String ret_String;\n\n int a;\n try {\n a = val.getAlpha();\n }\n catch (NoSuchMethodError excp) {\n System.out.println(\"YutilProperties:convertColorToString:excp=[\" + excp + \"]\");\n a = 0xFF;\n }\n int r = val.getRed(), g = val.getGreen(), b = val.getBlue();\n String as, rs, gs, bs;\n\n rs = Integer.toHexString(r); if (rs.length() == 1) rs = \"0\" + rs;\n gs = Integer.toHexString(g); if (gs.length() == 1) gs = \"0\" + gs;\n bs = Integer.toHexString(b); if (bs.length() == 1) bs = \"0\" + bs;\n\n if (a == 0xFF)\n {\n ret_String = \"#\" + rs + gs + bs;\n }\n else\n {\n as = Integer.toHexString(a); if (as.length() == 1) as = \"0\" + as;\n ret_String = \"#\" + as + rs + gs + bs;\n } \n\n return ret_String;\n }", "public Color stringToColor (String sColor, Color cDefault)\r\n\t{\r\n\tInteger iRgb;\r\n\t\r\n\tif ((sColor == null)\r\n\t|| (sColor.charAt (0) != '#')\r\n\t|| (sColor.length () != 7))\r\n\t\t{\r\n\t\treturn (cDefault);\r\n\t\t}\r\n\t\t\r\n\ttry\r\n\t {\r\n\t iRgb = Integer.valueOf (sColor.substring (1,7), 16);\r\n\t return (new Color (iRgb.intValue ()));\r\n\t }\r\n\tcatch (Exception e)\r\n\t {\r\n\t return (cDefault);\r\n\t }\r\n\t}", "abstract String getColor();", "private static int get(int colour) {\r\n\t\t// If the color is incorrect (less than 0) the color is set invisible\r\n\t\tif (colour < 0) {\r\n\t\t\treturn 255;\r\n\t\t}\r\n\r\n\t\t// taking each number of the argument\r\n\t\tint r = colour / 100 % 10;\r\n\t\tint g = colour / 10 % 10;\r\n\t\tint b = colour % 10;\r\n\r\n\t\t// returning the 6*6*6 color\r\n\t\treturn r * 6 * 6 + g * 6 + b;\r\n\t}", "public int getColor();", "public int getColor();", "private int[] charToHexa(char c){\n int[] hex = new int[2];\n String h = Integer.toHexString((int) c);\n if (h.length() == 1){\n h = \"0\" + h;\n }\n hex[0] = Integer.parseInt(h.substring(0,1), 16);\n hex[1] = Integer.parseInt(h.substring(1), 16);\n return hex;\n }", "public java.awt.Color colorFromString(String s) {\n if (s.contains(\"RGB\")) {\n String[] parts = s.split(\"\\\\(|\\\\)\");\n String[] parameter = parts[2].split(\",\");\n int r = Integer.parseInt(parameter[0]);\n int g = Integer.parseInt(parameter[1]);\n int b = Integer.parseInt(parameter[2]);\n return new Color(r, g, b);\n }\n if (s.contains(\"color\")) {\n String[] parts = s.split(\"\\\\(|\\\\)\");\n String color = parts[1];\n return colorMap.get(color);\n }\n return null;\n\n }", "public short getColor()\n {\n return font.getColorPaletteIndex();\n }", "public static java.awt.Color colorFromString(String s) {\r\n Color color = null;\r\n s = s.substring(6, s.length() - 1);\r\n if (s.startsWith(\"RGB\")) {\r\n s = s.substring(4, s.length() - 1);\r\n String[] split = s.split(\",\");\r\n int color1 = Integer.parseInt(split[0]);\r\n int color2 = Integer.parseInt(split[1]);\r\n int color3 = Integer.parseInt(split[2]);\r\n color = new Color(color1, color2, color3);\r\n } else {\r\n Field field = null;\r\n try {\r\n field = Class.forName(\"java.awt.Color\").getField(s);\r\n } catch (NoSuchFieldException | SecurityException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n color = (Color) field.get(null);\r\n } catch (IllegalArgumentException e) {\r\n e.printStackTrace();\r\n } catch (IllegalAccessException e) {\r\n e.printStackTrace();\r\n }\r\n// if (s.equals(\"blue\")) {\r\n// return Color.blue;\r\n// } else if (s.equals(\"black\")) {\r\n// return Color.black;\r\n// } else if (s.equals(\"cyan\")) {\r\n// return Color.cyan;\r\n// } else if (s.equals(\"gray\")) {\r\n// return Color.gray;\r\n// } else if (s.equals(\"lightGray\")) {\r\n// return Color.lightGray;\r\n// } else if (s.equals(\"green\")) {\r\n// return Color.green;\r\n// } else if (s.equals(\"orange\")) {\r\n// return Color.orange;\r\n// } else if (s.equals(\"pink\")) {\r\n// return Color.pink;\r\n// } else if (s.equals(\"red\")) {\r\n// return Color.red;\r\n// } else if (s.equals(\"white\")) {\r\n// return Color.white;\r\n// } else if (s.equals(\"yellow\")) {\r\n// return Color.yellow;\r\n// }\r\n }\r\n return color;\r\n }", "public void setColor(String c);", "protected static String getColouredString(final String colour, final String line) {\n String res = null;\n if (colour.length() < 3) {\n int num;\n \n try {\n num = Integer.parseInt(colour);\n } catch (NumberFormatException ex) {\n num = -1;\n }\n \n if (num >= 0 && num <= 15) {\n res = String.format(\"%c%02d%s%1$c\", Styliser.CODE_COLOUR, num, line);\n }\n } else if (colour.length() == 6) {\n try {\n Color.decode('#' + colour);\n res = String.format(\"%c%s%s%1$c\", Styliser.CODE_HEXCOLOUR, colour, line);\n } catch (NumberFormatException ex) { /* Do Nothing */ }\n }\n \n if (res == null) {\n res = String.format(\"%c%02d%s%1$c\", Styliser.CODE_COLOUR, 14, line);\n }\n return res;\n }", "static public String charToHex(char c) {\n\t\tbyte hi = (byte) (c >>> 8);\n\t\tbyte lo = (byte) (c & 0xff);\n\t\treturn byteToHex(hi) + byteToHex(lo);\n\t}", "public void setColour(String c)\n\t{\n\t\tcolour = c;\n\t}", "private int parseColour(final String value) {\n\n\t\tint result = 0xffffff;\n\n\t\t// Handle colour values that are in the format \"rgb(r,g,b)\"\n\t\tif (value.startsWith(\"rgb\")) {\n\t\t\tint r, g, b;\n\t\t\tfinal ValueTokenizer t = new ValueTokenizer();\n\t\t\tt.getToken(value.substring(3));\n\t\t\tif (t.currentTok == ValueTokenizer.LTOK_NUMBER) {\n\t\t\t\tr = (int) t.tokenF;\n\t\t\t\tt.getToken(null);\n\t\t\t\tif (t.currentTok == ValueTokenizer.LTOK_NUMBER) {\n\t\t\t\t\tg = (int) t.tokenF;\n\t\t\t\t\tt.getToken(null);\n\t\t\t\t\tif (t.currentTok == ValueTokenizer.LTOK_NUMBER) {\n\t\t\t\t\t\tb = (int) t.tokenF;\n\t\t\t\t\t\tresult = (r << 16) + (g << 8) + b;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Handle colour values that are in the format #123abc. (Assume that's what it is,\n\t\t// if the length is seven characters).\n\t\telse if (value.length() == 7) {\n\t\t\ttry {\n\t\t\t\tresult = Integer.parseInt(value.substring(1, 7), 16);\n\t\t\t}\n\t\t\tcatch (final NumberFormatException e) {\n\t\t\t\tresult = 0xff0000;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n Color getColor() {\n return new Color(32, 83, 226, 255);\n }", "private static String colorDisplayName(Color c) {\n if(c != null) {\n return formatHexString(c);\n } else {\n return null;\n }\n }", "public abstract int rgbColor(double u, double v);", "public abstract HSLColor toHSLColor();", "private static String ColorHexString(final Color c) {\n\t\treturn (\"#\" // +Integer.toHexString(c.getRGB());\n\t\t + Integer.toHexString(256 + c.getRed()).substring(1)\n\t\t + Integer.toHexString(256 + c.getGreen()).substring(1)\n\t\t + Integer.toHexString(256 + c.getBlue()).substring(1));\n\t}", "public static int charToNybbl(char c) {\n int val;\n switch (c) {\n case '0':\n val = 0;\n break;\n case '1':\n val = 1;\n break;\n case '2':\n val = 2;\n break;\n case '3':\n val = 3;\n break;\n case '4':\n val = 4;\n break;\n case '5':\n val = 5;\n break;\n case '6':\n val = 6;\n break;\n case '7':\n val = 7;\n break;\n case '8':\n val = 8;\n break;\n case '9':\n val = 9;\n break;\n case 'A':\n case 'a':\n val = 10;\n break;\n case 'B':\n case 'b':\n val = 11;\n break;\n case 'C':\n case 'c':\n val = 12;\n break;\n case 'D':\n case 'd':\n val = 13;\n break;\n case 'E':\n case 'e':\n val = 14;\n break;\n case 'F':\n case 'f':\n val = 15;\n break;\n default:\n throw new NumberFormatException(\"Invalid character '\" + c\n + \"' is not hex\");\n }\n return val;\n }", "private static String parseColor(String msg) {\n\t\tif (msg.contains(CS)) {\r\n\t\t\tmsg = msg.replaceAll(CS+\"a\", \"<span style=\\\"color: #8afb17\\\">\")\r\n\t\t\t .replace(CS+\"b\", \"<span style=\\\"color: #00ffff\\\">\")\r\n\t\t\t .replace(CS+\"c\", \"<span style=\\\"color: #e55451\\\">\")\r\n\t\t\t .replace(CS+\"d\", \"<span style=\\\"color: #ff55ff\\\">\")\r\n\t\t\t .replace(CS+\"e\", \"<span style=\\\"color: #fff380\\\">\")\r\n\t\t\t .replace(CS+\"f\", \"<span style=\\\"color: #ffffff\\\">\")\r\n\t\t\t .replace(CS+\"1\", \"<span style=\\\"color: #0000a0\\\">\")\r\n\t\t\t .replace(CS+\"2\", \"<span style=\\\"color: #348017\\\">\")\r\n\t\t\t .replace(CS+\"3\", \"<span style=\\\"color: #008080\\\">\")\r\n\t\t\t .replace(CS+\"4\", \"<span style=\\\"color: #9f000f\\\">\")\r\n\t\t\t .replace(CS+\"5\", \"<span style=\\\"color: #6c2dc7\\\">\")\r\n\t\t\t .replace(CS+\"6\", \"<span style=\\\"color: #d4a017\\\">\")\r\n\t\t\t .replace(CS+\"7\", \"<span style=\\\"color: #837e7c\\\">\")\r\n\t\t\t .replace(CS+\"8\", \"<span style=\\\"color: #555555\\\">\")\r\n\t\t\t .replace(CS+\"9\", \"<span style=\\\"color: #1f45fc\\\">\")\r\n\t\t\t .replace(CS+\"0\", \"<span style=\\\"color: #000000\\\">\")\r\n\t\t\t .replace(CS+\"l\", \"<span style=\\\"font-weight: bold\\\">\") //bold\r\n\t\t\t .replace(CS+\"o\", \"<span style=\\\"font-style: italic\\\">\") //italics\r\n\t\t\t .replace(CS+\"r\", \"<span style=\\\"font-weight: normal; font-style: normal\\\">\"); //normal text\r\n\t\t\tnumCloseSpans = msg.split(CS).length - 1;\r\n\t\t} else {\r\n\t\t\t//nothing\r\n\t\t}\r\n\t\treturn msg;\r\n\t}", "public static int convert(char c) {\n switch (c) {\n case 'A': return 0;\n case 'T': return 1;\n case 'G': return 2;\n case 'C': return 3;\n default: return 4;\n }\n }", "public Color getColor();", "public Color getColor();", "public Color getColor();", "RGB getOldColor();", "public abstract RGBFColor toRGBFColor();", "public static String toColor(String string) {\n return ChatColor.translateAlternateColorCodes('&', string);\n }", "private char invertColor(char color) {\r\n\t\tassert color == 'B' || color == 'W';\r\n\t\tchar invertedColor = 'W';\r\n\t\tif (color == 'W') {\r\n\t\t\tinvertedColor = 'B';\r\n\t\t}\r\n\t\treturn invertedColor;\r\n\t}", "int getColour();", "RGB getNewColor();", "public Paint convertToPaint(String str) {\r\n\t\tswitch (str) {\r\n\t\tcase(\"BLU\"): return Color.BLUE; \r\n\t\tcase(\"YEL\"): return Color.YELLOW;\r\n\t\tcase(\"BLA\"): return Color.BLACK;\r\n\t\tcase(\"RED\"): return Color.RED;\r\n\t\tcase(\"BRO\"): return Color.BROWN;\r\n\t\tcase(\"GRE\"): return Color.GREEN;\r\n\t\tcase(\"WHI\"): return Color.WHITE;\r\n\t\tcase(\"PUR\"): return Color.PURPLE;\r\n\t\tcase(\"PIN\"): return Color.PINK;\r\n\t\tcase(\"TEA\"): return Color.TEAL;\r\n\t\tcase(\"GRA\"): return Color.GRAY;\r\n\t\tcase(\"VIO\"): return Color.VIOLET;\r\n\t\tdefault: throw new UnsupportedOperationException(\"Why is the string not a valid paint?\");\r\n\t\t}\r\n\t}", "public static String color(String textToTranslate){\n\t\tif (textToTranslate == null) return null;\n\t\tif (!textToTranslate.contains(\"&\")) return textToTranslate;\n\t\tchar[] b = textToTranslate.toCharArray();\n\t\tfor (int i = 0; i < b.length - 1; i++) {\n\t\t\tif ((b[i] == '&') && (\"0123456789AaBbCcDdEeFfKkLlMmNnOoRr\".indexOf(b[(i + 1)]) > -1)){\n\t\t\t\tb[i] = Shared.COLOR;\n\t\t\t\tb[(i + 1)] = Character.toLowerCase(b[(i + 1)]);\n\t\t\t}\n\t\t}\n\t\treturn new String(b);\n\t}", "private static int fromHexChar(final char c) {\n\t\tif (c >= 0x30 && c <= 0x39) {\n\t\t\t// ASCII codes from 0 to 9\n\t\t\treturn c - 0x30;\n\t\t} else if (c >= 0x61 && c <= 0x66) {\n\t\t\t// ASCII codes from 'a' to 'f'\n\t\t\treturn c - 0x57;\n\t\t} else if (c >= 0x41 && c <= 0x46) {\n\t\t\t// ASCII codes from 'A' to 'F'\n\t\t\treturn c - 0x37;\n\t\t}\n\t\treturn 0;\n\t}", "public String obtenColor() {\r\n return color;\r\n }", "char convert (int c1, int c2) {\n char c = 0;\n c |= ((c1 & 0x1f) << 6); // 00011111\n c |= ((c2 & 0x3f) << 0); // 00111111\n return c;\n }", "Color decodeColor(String p) {\n StringTokenizer st = new StringTokenizer(p, \",\");\n if (st.countTokens() > 4) {\n return null;\n }\n int[] d = new int[4];\n int tokens = 0;\n while (st.hasMoreTokens()) {\n d[tokens] = Integer.parseInt(st.nextToken().trim());\n tokens++;\n }\n if (tokens == 4) {\n return new Color(d[0], d[1], d[2], d[3]);\n } else {\n return new Color(d[0], d[1], d[2]);\n }\n }", "public Color getC(){\n\t\treturn c;\n\t}", "@Override\n\t\tpublic char[] getPrintChars() {\n\t\t\tif(this.color == RedBlackTree.BLACK){\n\t\t\t\tString intString = data.toString()+\"(B)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tString intString = data.toString()+\"(R)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t}\n\t\t\t\n\t\t}", "abstract public String getColor();", "abstract public String getColor();", "public static int ColorToInt(Color c) {\n\t\treturn android.graphics.Color.argb(cap((int) (c.getAlpha() * 255), 0, 255), cap((int) (c.getRed() * 255), 0, 255), cap((int) (c.getGreen() * 255), 0, 255), cap((int) (c.getBlue() * 255), 0, 255));\n\t}", "public Color getColor(String key) {\r\n String cs = getString(key);\r\n cs.trim();\r\n int i1 = cs.indexOf(','), i2 = cs.lastIndexOf(',');\r\n if (i1 != i2) {\r\n try {\r\n int r = Integer.decode(cs.substring(0, i1).trim()).intValue();\r\n int g = Integer.decode(cs.substring(i1 + 1, i2).trim()).intValue();\r\n int b = Integer.decode(cs.substring(i2 + 1).trim()).intValue();\r\n\r\n return new Color(r, g, b);\r\n }\r\n catch (Exception e) {}\r\n }\r\n\r\n return null;\r\n }", "public String seeColor(String str) {\r\n if (str.startsWith(\"red\")) {\r\n return \"red\";\r\n }\r\n if (str.startsWith(\"blue\")) {\r\n return \"blue\";\r\n }\r\n\r\n return \"\";\r\n }", "String getTextStrokeColorAsString();", "public String getColor() { \n return color; \n }", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "public static float[] color(Color c) {\r\n \r\n if (c == null) c = Color.BLUE;\r\n return new float[]{ ((float) c.getRed() / 255.0f), \r\n ((float) c.getGreen() / 255.0f), ((float) c.getBlue() / 255.0f) };\r\n }", "public String getColor(){\r\n return color;\r\n }", "RGB getRealRGB(Color color) {\n\tImage colorImage = new Image(display, 10, 10);\n\tGC imageGc = new GC(colorImage);\n\tImageData imageData;\n\tPaletteData palette;\n\tint pixel;\n\t\n\timageGc.setBackground(color);\n\timageGc.setForeground(color);\n\timageGc.fillRectangle(0, 0, 10, 10);\n\timageData = colorImage.getImageData();\n\tpalette = imageData.palette;\n\timageGc.dispose();\n\tcolorImage.dispose();\n\tpixel = imageData.getPixel(0, 0);\n\treturn palette.getRGB(pixel);\n}", "public static Color valueOf(String s) {\n Matcher m = THREE_DIGIT_PATTERN.matcher(s);\n if (m.matches()) {\n return new Color(Integer.parseInt(m.group(1), 16) * 0x11,\n Integer.parseInt(m.group(2), 16) * 0x11,\n Integer.parseInt(m.group(3), 16) * 0x11);\n }\n m = SIX_DIGIT_PATTERN.matcher(s);\n if (m.matches()) {\n return new Color(Integer.parseInt(m.group(1), 16),\n Integer.parseInt(m.group(2), 16),\n Integer.parseInt(m.group(3), 16));\n }\n Color color = KEYWORD_MAP.get(s);\n if (color != null) {\n return color;\n }\n throw new IllegalArgumentException(\"Can't parse \\\"\" + s\n + \"\\\" as a CSS color.\");\n }", "public String Color2Hex(int r, int g, int b)\n\t{\n Color c = new Color(r,g,b);\n String s=Integer.toHexString( c.getRGB() & 0x00ffffff ).toUpperCase() ;\n while(s.length()<6)\n \t s=\"0\"+s;\n return s;\n }", "public String getCharColor(String prefix) {\r\n\t\ttry {\r\n\t\t\tlastCharColor = bundle.getString(prefix + \".color\");\r\n\t\t} catch (MissingResourceException e) {\r\n\t\t}\r\n\t\treturn lastCharColor;\r\n\t}", "@Test\n public void testColorCodeExtraction() {\n String text = \"§aHello §b§oWhat's up?\";\n\n String colorResult = stringUtils.extractColorCodes(text).toString();\n String styleResult = stringUtils.extractStyleCodes(text).toString();\n\n Assert.assertEquals(\"[§a, §b]\", colorResult);\n Assert.assertEquals(\"[§o]\", styleResult);\n }", "public static char highSurrogate(int c) {\n return (char) (((c - 0x00010000) >> 10) + 0xD800);\n }", "public String getColor()\n {\n return color;\n }", "public String getColor()\n {\n return color;\n }", "public GameColor getColor();", "public final String getColorName(final Color c) {\n if (Color.BLUE.equals(c)) {\n return \"Blue\";\n } else if (Color.YELLOW.equals(c)) {\n return \"Jaune\";\n } else if (Color.RED.equals(c)) {\n return \"Red\";\n } else if (Color.PINK.equals(c)) {\n return \"Rose\";\n } else if (Color.GREEN.equals(c)) {\n return \"Vert\";\n }\n return null;\n }", "public Color getCurrentColor();", "public static String color(final String string) {\n return ChatColor.translateAlternateColorCodes('&', string);\n }", "public String getColor(){\n\t\treturn color;\n\t}", "public int getColor() {\n \t\treturn color;\n \t}", "Color userColorChoose();", "public static BufferedImage getCharacterImage(char c) throws CharacterNotSupportedException{\n int a = (int)'a';\n int o = (int)'o';\n int p = (int)'p';\n int z = (int)'z';\n \n int zero = (int)'0';\n int nine = (int)'9';\n \n int ac = (int)'A';\n int oc = (int)'O';\n int pc = (int)'P';\n int zc = (int)'Z';\n \n int ci = (int)c;\n \n //System.out.print(c);\n \n if(ci>=zero && ci<=nine){ \n for(int i=zero;i<=nine;i++){//from 0 to 9\n int d = i-zero;//difference between i and zero; a number from 0 to nine-zero.\n if(ci == i){\n return font.getImage(new Location(d,3));\n }\n }\n }\n else if(ci>=ac && ci<=zc){\n for(int i=ac;i<=oc;i++){//from A to O\n int d = i-ac;//difference between i and ac. a number from 0 to pc-ac.\n if(ci == i){\n return font.getImage(new Location(d+1,4));\n }\n }\n for(int j=pc;j<=zc;j++){//from P to Z\n int d = j-pc;//difference between j and pc. a number from 0 to zc-pc.\n if(ci == j){\n return font.getImage(new Location(d,5));\n }\n } \n } \n else if(ci>=a && ci<=z){\n for(int i=a;i<=o;i++){\n int d = i-a;//difference between i and a. a number from 0 to p-a.\n if(ci == i){\n return font.getImage(new Location(d+1,6));\n }\n }\n for(int j=p;j<=z;j++){//from p to z\n int d = j-p;//difference between j and p. Number from 0 to z-p.\n if(ci == j){\n return font.getImage(new Location(d,7));\n }\n } \n }\n else if(ci == ' '){//space\n return font.getImage(new Location(0,0));\n }\n else if(ci == ','){\n return font.getImage(new Location(12,2));\n }\n else if(ci == '.'){\n return font.getImage(new Location(14,2));\n }\n else if(ci == '!'){\n return font.getImage(new Location(1,2));\n }\n else if(ci == '\\''){//apostrophe or '\n return font.getImage(new Location(7,2));\n }\n else if(ci == '#'){\n return font.getImage(new Location(3,2));\n }\n else if(ci == '?'){\n return font.getImage(new Location(15,3));\n }\n else if(ci == ':'){\n return font.getImage(new Location(11,3));\n }\n else if(ci == ';'){\n return font.getImage(new Location(12,3));\n }\n \n throw new CharacterNotSupportedException(\"Character \"+c+\" is not supported in StringImage\");\n }", "public void setColor(String c)\n { \n color = c;\n draw();\n }", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public void controlEvent(ControlEvent c) {\n if(c.isFrom(cp)) {\n int r = PApplet.parseInt(c.getArrayValue(0));\n int g = PApplet.parseInt(c.getArrayValue(1));\n int b = PApplet.parseInt(c.getArrayValue(2));\n int a = PApplet.parseInt(c.getArrayValue(3));\n col = color(r,g,b,a);\n println(col);\n }\n}", "public String getColor() {\r\n return color;\r\n }" ]
[ "0.7644888", "0.7196006", "0.70997965", "0.68429476", "0.67710876", "0.6752592", "0.6677115", "0.65754455", "0.6554449", "0.6468218", "0.6462816", "0.6434127", "0.64290106", "0.64290106", "0.64290106", "0.64290106", "0.64290106", "0.6423746", "0.6390009", "0.6378739", "0.635926", "0.63294417", "0.6266598", "0.620734", "0.620294", "0.61688095", "0.6144389", "0.61376065", "0.61073786", "0.6092803", "0.60675406", "0.6064598", "0.6042514", "0.60269713", "0.60269713", "0.5938868", "0.590842", "0.5896731", "0.5891078", "0.58869904", "0.58848447", "0.5879457", "0.58777606", "0.58726376", "0.5852706", "0.5841675", "0.58321923", "0.5818546", "0.5805786", "0.58022404", "0.57992005", "0.5795853", "0.5782024", "0.5782024", "0.5782024", "0.57778937", "0.5776511", "0.57576996", "0.5747257", "0.5741757", "0.57379305", "0.5731813", "0.5727583", "0.5722463", "0.5717816", "0.5705228", "0.57029814", "0.5691476", "0.5688079", "0.5684843", "0.5684843", "0.5684558", "0.5678434", "0.5666699", "0.56587374", "0.5653679", "0.5646221", "0.56427896", "0.5639041", "0.56248534", "0.56232464", "0.56199664", "0.56178427", "0.56061363", "0.5600768", "0.56000525", "0.56000525", "0.5599168", "0.55965894", "0.559603", "0.5595846", "0.5592541", "0.5589109", "0.5581233", "0.5574688", "0.55679876", "0.5567208", "0.5567208", "0.5563205", "0.55616057" ]
0.72223747
1
show a Line from first xy point to second xy point, with given width and colour
void showLine(int[] xy1, int[] xy2, int width, char col) { gc.setStroke(colFromChar(col)); // set the stroke colour gc.setLineWidth(width); gc.strokeLine(xy1[0], xy1[1], xy2[0], xy2[1]); // draw line }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawLine(float x, float y, float x2, float y2, float width) {\n throw new NotImplementedException(); // TODO Implement\n }", "public void drawLine(int x, int y, int x2, int y2, int color);", "public void drawLine(float x, float y, float x2, float y2, float width, float u, float v, float texW, float texH) {\n throw new NotImplementedException(); // TODO Implement\n }", "public void Dasherline(long x0, long y0, long x1, long y1, int iWidth, int iColour) {\r\n\t\ttemp1.init(x0,y0);\r\n\t\tDasher2Screen(temp1);\r\n\t\t\r\n\t\ttemp2.init(x1,y1);\r\n\t\tDasher2Screen(temp2);\r\n\t\tScreen().drawLine((int)temp1.x, (int)temp1.y, (int)temp2.x, (int)temp2.y, iWidth, iColour);\r\n\t}", "private void drawLine(int x1, int y1, int x2, int y2)\n {\n System.out.println(\"Draw a line from x of \" + x1 + \" and y of \" + y1);\n System.out.println(\"to x of \" + x2 + \" and y of \" + y2);\n System.out.println(\"The line color is \" + lineColor);\n System.out.println(\"The width of the line is \" + lineWidth);\n System.out.println(\"Then length of the line is \" + df.format(getLength()) + \"\\n\" );\n }", "public void drawLine(int x1, int y1, int x2, int y2);", "public void drawLine(int x, int y, int x2, int y2, int color){\n int dy = y - y2;\n int dx = x - x2;\n int fraction, stepx, stepy;\n\n if(dy < 0){\n dy = -dy;\n stepy = -1;\n }else{\n stepy = 1;\n }\n if(dx < 0){\n dx = -dx;\n stepx = -1;\n }else{\n stepx = 1;\n }\n dy <<= 1;\n dx <<= 1;\n\n set(x, y, color);\n\n if(dx > dy){\n fraction = dy - (dx >> 1);\n while(x != x2){\n if(fraction >= 0){\n y += stepy;\n fraction -= dx;\n }\n x += stepx;\n fraction += dy;\n set(x, y, color);\n }\n }else{\n fraction = dx - (dy >> 1);\n while(y != y2){\n if(fraction >= 0){\n x += stepx;\n fraction -= dy;\n }\n y += stepy;\n fraction += dx;\n set(x, y, color);\n }\n }\n }", "public static void writeLine(Model model, int x1, int y1, int x2, int y2, char colour) {\n int xLength = model.getWidth();\n int yLength = model.getHeight();\n\n if (x1 > xLength || x2 > xLength || y1 > yLength || y2 > yLength) {\n System.out.println(String.format(\"Couldn't create line inside current simpleCanvas width: %d, height: %d\", xLength, yLength));\n return;\n }\n\n // Simple optimization if the line are orthogonal x or y.\n if (x1 == x2 || y1 == y2) {\n for (int i = Math.min(x1, x2); i <= Math.max(x1, x2); i++)\n for (int j = Math.min(y1, y2); j <= Math.max(y1, y2); j++)\n model.set(i, j, colour);\n } else {\n // try to draw line from left to write\n // To do this we should find min x coordinate\n int startx, starty, endx, endy;\n if (x1 < x2) {\n startx = x1;\n starty = y1;\n endx = x2;\n endy = y2;\n } else {\n startx = x2;\n starty = y2;\n endx = x1;\n endy = y1;\n }\n\n model.set(startx, starty, colour);\n model.set(endx, endy, colour);\n\n if (y1 < y2) {\n // Find line equation of the line\n // (y - y1)/(y2-y1) = (x - x1)/(x2 - x1)\n // y - y1 = (x - x1)(y2-y1)/(x2 - x1)\n // y = y1 + (x - x1)(y2-y1)/(x2 - x1)\n int newX = startx;\n int newY = starty;\n while (newX < endx && newY <= endy) {\n //TODO optimize coefficient\n double newYcompare = findY(newX + 1, startx, starty, endx, endy);\n\n if (newYcompare == newY + 1) {\n newY++;\n newX++;\n model.set(newX, newY, colour);\n model.set(newX, newY - 1, colour);\n } else if (newYcompare < newY + 1) {\n newX++;\n model.set(newX, newY, colour);\n } else {\n newY++;\n model.set(newX, newY, colour);\n }\n }\n } else {\n // Find line equation of the line\n // (x - x1)/(x2 - x1) = (y - y1)/(y2-y1)\n // (x - x1) = (y - y1)(x2 - x1)/(y2-y1)\n // x = x1 + (y - y1)(x2 - x1)/(y2-y1)\n int newX = startx;\n int newY = starty;\n while (newX <= endx && newY > endy) {\n //TODO optimize coefficient\n double newXcompare = findX(newY - 1, startx, starty, endx, endy);\n\n if (newXcompare == newX + 1) {\n newY--;\n newX++;\n model.set(newX, newY, colour);\n // array[newX - 2][newY - 1] = colour;\n model.set(newX, newY + 1, colour);\n } else if (newXcompare < newX + 1) {\n newY--;\n model.set(newX, newY, colour);\n } else {\n newX++;\n model.set(newX, newY, colour);\n }\n }\n }\n }\n }", "public LineElement(\n final double firstPointX, final double firstPointY,\n final double secondPointX, final double secondPointY,\n final double width, final Color color) {\n this.firstPointX = firstPointX;\n this.firstPointY = firstPointY;\n this.secondPointX = secondPointX;\n this.secondPointY = secondPointY;\n this.width = width;\n this.color = color;\n }", "private void drawLine( Graphics2D g2, Point2D.Double p1, Point2D.Double p2, Color colour, Stroke strk )\r\n {\r\n double x1 = translateX( p1.getX() );\r\n double y1 = translateY( p1.getY() );\r\n \r\n double x2 = translateX( p2.getX() );\r\n double y2 = translateY( p2.getY() );\r\n \r\n Line2D.Double line = new Line2D.Double( x1, y1, x2, y2 );\r\n \r\n g2.setStroke( strk );\r\n \r\n g2.setColor( colour );\r\n g2.draw( line );\r\n }", "private void drawLine(double x1, double y1, double x2, double y2) {\r\n\t\tGLine line = new GLine(x1,y1,x2,y2);\r\n\t\tadd(line);\r\n\t}", "private void drawLine( Graphics2D g2, Point2D.Double p1, Point2D.Double p2, Color colour )\r\n {\r\n drawLine( g2, p1, p2, colour, DEFAULT_STROKE );\r\n }", "public void drawLine(double x0, double y0, double x1, double y1, int red, int green, int blue){\n\t\tif( x0 > x1 ) {\n\t\t\tdouble xt = x0 ; x0 = x1 ; x1 = xt ;\n\t\t\tdouble yt = y0 ; y0 = y1 ; y1 = yt ;\n\t\t}\n\t\t\n\t\tdouble a = y1-y0;\n\t\tdouble b = -(x1-x0);\n\t\tdouble c = x1*y0 - x0*y1;\n\n\t\t\tif(y0<y1){ // Octant 1 or 2\n\t\t\t\tif( (y1-y0) <= (x1-x0) ) { //Octant 1\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y+0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or SE\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\ty = y+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { // Octant 2\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Calculate initial x and initial y\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y+1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go SE or S\t\t\t\t\t\n\t\t\t\t\twhile(y<=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){\n\t\t\t\t\t\t\td = d+b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a+b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y+1;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else { // Octant 7 or 8\n\t\t\t\tif( (y0-y1) <= (x1-x0) ) { // Octant 8\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint x = (int)Math.round(x0);\n\t\t\t\t\tint y = (int)Math.round((-a*x-c)/b);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+1) + b*(y-0.5) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go E or NE\t\t\t\t\t\n\t\t\t\t\twhile(x<=Math.round(x1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d>0){ \n\t\t\t\t\t\t\td = d+a;\n\t\t\t\t\t\t} else { \n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\ty = y-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else { //Octant 7\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tint y = (int)Math.round(y0);\n\t\t\t\t\tint x = (int)Math.round((-b*y-c)/a);\n\t\t\t\t\t\n\t\t\t\t\tdouble d = a*(x+0.5) + b*(y-1) + c;\n\t\t\t\t\t\n\t\t\t\t\t// Do we need to go NE or N\n\t\t\t\t\twhile(y>=Math.round(y1)){\n\t\t\t\t\t\tRenderer.setPixel(x, y, red, green, blue);\n\t\t\t\t\t\tif(d<0){\n\t\t\t\t\t\t\td = d-b; \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\td = d+a-b;\n\t\t\t\t\t\t\tx = x+1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty = y-1;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}", "public void drawLine(byte[] screen, int width, int x1, int x2, int y) \n\t{\n int pos1 = y*width + x1; // starting position, in terms of bits/pixels\n int pos2 = y*width + x2; // ending position, in terms of bits/pixels\n \n int start = pos1;\n \n while (start <= pos2)\n {\n int row = start / 8; // in terms of bytes\n int col = start % 8; // in terms of bits/pixels\n \n // the \"coloring\" process of each byte is actually started from right to left in terms of bits/pixels \n screen[row] = (byte) (screen[row] | (1<<col));\n start++; // increment in terms of bits/pixels\n } \n\t}", "public void drawLine(Point2D startPoint, Point2D endPoint, double lineStroke, int EndType);", "public void lineDraw(GraphNodeAL<MapPoint> l1, GraphNodeAL<MapPoint> l2) {\n Line l = new Line((int) l1.data.xCo, (int) l1.data.yCo, (int) l2.data.xCo, (int) l2.data.yCo);\n l.setTranslateX(mapImage.getLayoutX());\n l.setTranslateY(mapImage.getLayoutY());\n ((Pane) mapImage.getParent()).getChildren().add(l);\n }", "public void drawOneLine(float x1, float y1,float x2,float y2){\n \tGL11.glBegin(GL11.GL_LINES);\n \tGL11.glVertex2f(x1,y1);\n \tGL11.glVertex2f(x2,y2);\n \tGL11.glEnd();\n }", "public void drawLine(int x1, int y1, int x2, int y2){\n int a1 = new Coordinate2D(x1, y1).getPixelPointX();\n int b1 = new Coordinate2D(x1, y1).getPixelPointY();\n int a2 = new Coordinate2D(x2, y2).getPixelPointX();\n int b2 = new Coordinate2D(x2, y2).getPixelPointY();\n graphics2D.drawLine(a1, b1, a2, b2);\n }", "private void drawConnectLine(double[] startPoint, double[] endPoint, Color color) {\r\n\t\tdouble startX = startPoint[0];\r\n\t\tdouble startY = startPoint[1];\r\n\t\t\r\n\t\tdouble endX = endPoint[0];\r\n\t\tdouble endY = endPoint[1];\r\n\t\t\r\n\t\tGLine line = new GLine();\r\n\t\tline.setStartPoint(startX, startY);\r\n\t\tline.setEndPoint(endX, endY);\r\n\t\tline.setColor(color);\r\n\t\tadd(line);\r\n\t}", "public static void drawLine(PixelWriter writer, Color color, int startX, int endX, int startY, int endY) {\n\t\tdouble stepY;\n\t\tdouble stepX;\n\t\tdouble yLength = (double) endY - startY;\n\t\tdouble xLength = (double) endX - startX;\n\t\tif (xLength < yLength) {\n\t\t\tstepY = 1;\n\t\t\tstepX = yLength == 0 ? 0 : (xLength / yLength);\n\t\t} else {\n\t\t\tstepX = 1;\n\t\t\tstepY = xLength == 0 ? 0 : (yLength / xLength);\n\t\t}\n\n\t\tdouble y = startY;\n\t\tdouble x = startX;\n\t\tdo {\n\t\t\tdo {\n\t\t\t\twriter.setColor((int) x, (int) y, color);\n\t\t\t\tx += stepX;\n\t\t\t} while (x < endX);\n\t\t\ty += stepY;\n\t\t} while (y < endY);\n\t}", "public void drawHorizontalLine(int RGB, int x, int y, int length) {\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tdrawPixel(RGB, x + i, y);\n\t\t}\n\t}", "private void drawLine(Graphics g, int x1, int y1, int x2, int y2) {\n int d = 0;\n\n int dx = Math.abs(x2 - x1);\n int dy = Math.abs(y2 - y1);\n\n int dx2 = 2 * dx; // slope scaling factors to\n int dy2 = 2 * dy; // avoid floating point\n\n int ix = x1 < x2 ? 1 : -1; // increment direction\n int iy = y1 < y2 ? 1 : -1;\n\n int x = x1;\n int y = y1;\n\n if (dx >= dy) {\n while (true) {\n plot(g, x, y);\n if (x == x2)\n break;\n x += ix;\n d += dy2;\n if (d > dx) {\n y += iy;\n d -= dx2;\n }\n }\n } else {\n while (true) {\n plot(g, x, y);\n if (y == y2)\n break;\n y += iy;\n d += dx2;\n if (d > dy) {\n x += ix;\n d -= dy2;\n }\n }\n }\n }", "public void drawLine(int x1, int y1, int x2, int y2 , Graphics g) {\r\n \tfloat dY, dX;\r\n \tfloat x,y;\r\n \tdX = x2-x1;\r\n \tdY = y2-y1;\r\n \tx = x1;\r\n \ty = y1;\r\n \t\t\t\r\n \tfloat range = Math.max(Math.abs(dX), Math.abs(dY));\r\n \tdY = dY/range;\r\n \tdX = dX/range;\r\n \t\r\n \tfor (int i =0 ; i < range ; i++ ) { \r\n \t\tg.drawRect(Math.round(x), Math.round(y),1,1);\r\n \t\tx = x + dX;\r\n \t\ty = y + dY;\r\n \t}\r\n\r\n \t\r\n }", "public void drawLine(int i, int y1, int j, int y2, Paint paint) {\n\t\t\n\t}", "public abstract void lineTo(double x, double y);", "public void drawLine(double startx, double starty, double endx, double endy, Color color) {\n\t\tgc.setStroke(color);\n\t\tgc.strokeLine(startx,starty,endx,endy);\n\t}", "private void drawLine(Vector2 vt1, Vector2 vt2, GLayerGroup pGroup){\n DrawLineLaser.DrawLine(vt1,vt2);\n\n }", "private void connectPoints(Graphics2D g, double x1, double y1, double x2, double y2, int colour)\n\t{\n\t\tStroke drawingStroke = new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND);\t\n\t\tg.setStroke(drawingStroke);\n\t\tLine2D.Double line = new Line2D.Double();\n\t\tline.setLine(ORIGIN_X + x1, ORIGIN_Y - y1, ORIGIN_X + x2, ORIGIN_Y - y2);\n\t\tswitch(colour) {\n\t\tcase 0:\n\t\t\tg.setColor(C1);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tg.setColor(C2);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tg.setColor(C3);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tg.setColor(C4);\n\t\t\tbreak;\n\t\t}\n\t\tg.draw(line);\n\t}", "private void drawLineSeg(int entryNum, GPoint from, GPoint to) {\n\t\tGLine line = new GLine(from.getX(), from.getY(),\n\t\t\t\t\t\t\t to.getX(), to.getY());\n\t\tline.setColor(getColor(entryNum));\n\t\tadd(line);\n\t}", "public Polyline drawLine(Star one, Star two)\r\n\t{\t\t\r\n\t\treturn lang.newPolyline(new Offset[] { getStarPosition(one.x, one.y), getStarPosition(two.x, two.y) }, \"line\" + one.toString() + two.toString(), null, connectionLines);\r\n\t}", "public static void drawLine(RasterImage image, int x1, int y1, int x2, int y2, int color)\n\t{\n\t\tassert\n\t\t\timage != null\n\t\t\t&& image.getWidth() > x1 && x1 >= 0\n\t\t\t&& image.getWidth() > x2 && x2 >= 0\n\t\t\t&& image.getHeight() > y1 && y1 >= 0\n\t\t\t&& image.getHeight() > y2 && y2 >= 0\n\t\t\t&& (color & 0xff000000) == 0;\n\t\t\n\t\t\n\t\tint\n\t\t\twidth = image.getWidth(),\n\t\t\theight = image.getHeight(),\n\t\t\tsize = width * height;\n\t\t\n\t\tint dx, dy, s, sx, sy, kl, swap, incr1, incr2;\n\t\t\n\t\t\n\t\t\n\t\t//Вычисление приращений и шагов\n\t\t\n\t\tsx = 0;\n\t\t\n\t\tif ((dx = x2 - x1) < 0)\n\t\t{\n\t\t\tdx = -dx;\n\t\t\t--sx;\n\t\t}\n\t\telse if (dx > 0)\n\t\t{\n\t\t\t++sx;\n\t\t}\n\t\t\n\t\tsy = 0;\n\t\t\n\t\tif ((dy = y2 - y1) < 0)\n\t\t{\n\t\t\tdy = -dy;\n\t\t\t--sy;\n\t\t}\n\t\telse if (dy > 0)\n\t\t{\n\t\t\t++sy;\n\t\t}\n\t\t\n\t\t// Учёт наклона\n\t\t\n\t\tswap = 0;\n\t\t\n\t\tif ((kl = dx) < (s = dy))\n\t\t{\n\t\t\tdx = s;\n\t\t\tdy = kl;\n\t\t\tkl = s;\n\t\t\t++swap;\n\t\t}\n\t\t\n\t\ts = (incr1 = 2 * dy) - dx;\t\t// incr1 - константа перевычисления\n\t\t\n\t\t//разности если текущее s < 0 и\n\t\t//s - начальное значение разности\n\t\tincr2 = 2 * dx;\t\t\t// Константа для перевычисления\n\t\t// разности если текущее s >= 0\n\t\t\n\t\timage.setRgb(x1, y1, color);\t\t//Первый пиксел вектора\n\t\t\n\t\twhile (--kl >= 0)\n\t\t{\n\t\t\tif (s >= 0)\n\t\t\t{\n\t\t\t\tif (swap != 0)\n\t\t\t\t{\n\t\t\t\t\tx1 += sx;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ty1 += sy;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ts -= incr2;\n\t\t\t}\n\t\t\t\n\t\t\tif (swap != 0)\n\t\t\t{\n\t\t\t\ty1 += sy;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tx1 += sx;\n\t\t\t}\n\t\t\t\n\t\t\ts += incr1;\n\t\t\t\n\t\t\timage.setRgb(x1, y1, color);\t\t//Текущая точка вектора\n\t\t}\n\t}", "public void paintLine(Point2D pt1, Point2D pt2, Graphics graphics) {\n Graphics2D g = (Graphics2D) graphics;\n g.setXORMode(java.awt.Color.lightGray);\n g.setColor(java.awt.Color.darkGray);\n if (pt1 != null && pt2 != null) {\n // the line connecting the segments\n OMLine cLine = new OMLine((float) pt1.getY(), (float) pt1.getX(), (float) pt2.getY(), (float) pt2.getX(), lineType);\n // get the map projection\n Projection proj = theMap.getProjection();\n // prepare the line for rendering\n cLine.generate(proj);\n // render the line graphic\n cLine.render(g);\n }\n }", "protected abstract void drawBorderLine(\n // CSOK: ParameterNumber\n final float x1, final float y1, final float x2, final float y2,\n final boolean horz, final boolean startOrBefore, final int style,\n final Color col);", "private void lineColor() {\n\n\t}", "public void drawVerticalLine(int RGB, int x, int y, int length) {\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tdrawPixel(RGB, x, y + i);\n\t\t}\n\t}", "private void drawHorizontalLines(){\r\n\r\n\t\tdouble x1 = START_X;\r\n\t\tdouble x2 = getWidth();\r\n\t\tdouble y1 = GRAPH_MARGIN_SIZE;\r\n\t\tdouble y2 = y1;\r\n\r\n\t\tdrawLine(x1,y1,x2,y2);\r\n\r\n\t\tdouble newY1 = getHeight() - y1;\r\n\t\tdouble newY2 = newY1;\r\n\r\n\t\tdrawLine(x1,newY1,x2,newY2);\r\n\t}", "protected abstract void lineTo(final float x, final float y);", "public void markLine(int x1, int y1, int x2, int y2) {\n for (int row = y1 - 1; row <= y2 - 1 && row < height; row++) {\n for (int col = x1 - 1; col <= x2 - 1 && col < width; col++) {\n pixels[row][col] = DRAWING_CHAR;\n }\n }\n }", "@Override\n\tpublic void drow(int w, int h, Color color) {\n\t\tSystem.out.println(\"drow Line : \" + w + \" \" + h + \" \" + color );\n\t}", "private void drawLine(int x, int y, int x1, int y1, int count, Color color) {\n\n // draw a line if count is greater than 0\n if (count > 0) {\n\n NscLine newLine = new NscLine(x+count, y, x1+count, y1);\n newLine.setForeground(color);\n add(newLine);\n \n // ensure we repaint the window\n repaint();\n\n // recursively call this method, decreasing count each time\n drawLine(x, y, x1, y1, count-1, color);\n\n }\n\n }", "protected LineaAbstract(Point2D p1,Point2D p2){\n super(p1,p2);\n this.ColorRelleno=Color.BLACK;\n ColorRelleno=null;\n this.width=1.0F;\n isRelleno=false;\n isContinuo=true;\n isGradiente=false;\n }", "private void computeLinePoints (Point2D point1, Point2D point2, List<Point2D> points, int width) {\n\n int x1 = point1.getX();\n int y1 = point1.getY();\n int x2 = point2.getX();\n int y2 = point2.getY();\n\n int deltaX = Math.abs(x2 - x1);\n int deltaY = Math.abs(y2 - y1);\n\n int sx = x1 < x2 ? 1 : -1;\n int sy = y1 < y2 ? 1 : -1;\n\n int error = deltaX - deltaY;\n int error2 = 0, x3 = 0, y3 = 0;\n\n float ed = (deltaX + deltaY == 0) ? 1 : (float) Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n\n for (width = (width + 1) / 2; ; ) {\n points.add(new GridPoint(x1, y1));\n error2 = error;\n x3 = x1;\n if (2 * error2 >= -deltaX) {\n for (error2 += deltaY, y3 = y1;\n error2 < ed * width && (y2 != y3 || deltaX > deltaY);\n error2 += deltaX) {\n points.add(new GridPoint(x1, y3 += sy));\n }\n if (x1 == x2) { break; }\n error2 = error;\n error -= deltaY;\n x1 += sx;\n }\n if (2 * error2 <= deltaY) {\n for (error2 = deltaX - error2; error2 < ed * width &&\n (x2 != x3 || deltaX < deltaY);\n error2 += deltaY) {\n points.add(new GridPoint(x3 += sx, y1));\n }\n if (y1 == y2) { break; }\n error += deltaX;\n y1 += sy;\n\n }\n\n }\n }", "void addLine(int index, Coordinate start, Coordinate end);", "public void makeEndPoints(Double aWidth, Double x, Double y) {\n\n\t\t// create the end points based on locStart location and width\n\t\ta = new Location(x, (y + A * aWidth));\n\t\tb = new Location(x + (B * aWidth), y);\n\t\tc = new Location(x + (C * aWidth), y + aWidth);\n\t\td = new Location(x + DX * aWidth, y + DY * aWidth);\n\t\te = new Location(x + EX * aWidth, y + EY * aWidth);\n\t\tf = new Location(x + FX * aWidth, y + FY * aWidth);\n\n\t\t// and setting the lines endpoints to the new vertices\n\t\t// line from A to B\n\t\toutLine[0].setEndPoints(a, b);\n\t\t// line from B to C\n\t\toutLine[1].setEndPoints(b, c);\n\t\t// line from C TO D\n\t\toutLine[2].setEndPoints(c, d);\n\t\t// line from D to E\n\t\toutLine[3].setEndPoints(d, e);\n\t\t// line from E to F\n\t\toutLine[4].setEndPoints(e, f);\n\t\t// line from F to A\n\t\toutLine[5].setEndPoints(f, a);\n\n\t\t// make the lines white\n\t\tmakeWhite();\n\t}", "public void setLineWidth(float lineWidth);", "public void rasterizeLine (int x0, int y0, int x1, int y1)\n {\n \tfloat dX = (x1 - x0);\n \tfloat dY = (y1 - y0);\n \tfloat m = (dY / dX);\t//slope\n \tint x = x0;\n \tfloat y = y0;\n \t\n \twhile(x < x1)\n \t{\n \t\traster.setPixel(x, Math.round(y), new int[]{255, 50, 100});\n \t\tx += 1;\n \t\ty += m;\n \t}\n }", "public GLGraphics drawLine(float x, float y, float x2, float y2) {\n\t\tstats.incLine();\n\t\tgl.glBegin(GL.GL_LINES);\n\t\tgl.glVertex3f(x, y, z);\n\t\tgl.glVertex3f(x2, y2, z);\n\t\tgl.glEnd();\n\t\treturn this;\n\t}", "void plotLine(int argbA, boolean tScreenedA, int argbB, boolean tScreenedB,\n int xA, int yA, int zA, int xB, int yB, int zB,\n boolean clipped) {\n x1t = xA;\n x2t = xB;\n y1t = yA;\n y2t = yB;\n z1t = zA;\n z2t = zB;\n //if (xA != 250 && xB != 250)return;\n //System.out.println(\"\\t\\t\\t\" + xA + \",\" + yA + \" \" + xB + \",\" + yB);\n\n if (clipped)\n switch (getTrimmedLine()) {\n case VISIBILITY_UNCLIPPED:\n clipped = false;\n break;\n case VISIBILITY_OFFSCREEN:\n return;\n }\n plotLineClipped(argbA, tScreenedA, argbB, tScreenedB, xA, yA, zA, xB - xA,\n yB - yA, zB - zA, clipped, 0, 0);\n }", "public Linea2D(Punto a, Punto b)\n {\n this.a=a;\n this.b=b;\n }", "@Override\n\tvoid draw(Graphics2D g2) {\n\t\t// TODO Auto-generated method stub\n\t\tg2.setColor(color);\n\t\tPoint2D.Double from = new Point2D.Double(this.getXPos(), this.getYPos());\n\t\tPoint2D.Double to = new Point2D.Double(x2, y2);\n\t\tsegment = new Line2D.Double(from, to);\n\t\tg2.drawLine((int) this.getXPos() - 8, (int) this.getYPos() - 96, (int) x2 - 8, (int) y2 - 96);\n\n\t}", "@Override\r\n public final void draw(final Line l, final BufferedImage paper) {\n int x1 = l.getxStart();\r\n int x2 = l.getxFinish();\r\n int y1 = l.getyStart();\r\n int y2 = l.getyFinis();\r\n\r\n if (x1 == x2) {\r\n if (y1 < y2) {\r\n for (int i = y1; i <= y2; i++) {\r\n if (checkBorder(x1, i, paper)) {\r\n paper.setRGB(x1, i, l.getColor().getRGB());\r\n }\r\n }\r\n } else {\r\n for (int i = y2; i <= y1; i++) {\r\n if (checkBorder(x1, i, paper)) {\r\n paper.setRGB(x1, i, l.getColor().getRGB());\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n \r\n int deltaX = Math.abs(x2 - x1);\r\n int deltaY = Math.abs(y2 - y1);\r\n int s1 = (int) (Math.signum(x2 - x1) * 1);\r\n int s2 = (int) (Math.signum(y2 - y1) * 1);\r\n\r\n boolean interchanged = false;\r\n if (deltaY > deltaX) {\r\n int aux = deltaX;\r\n deltaX = deltaY;\r\n deltaY = aux;\r\n interchanged = true;\r\n }\r\n\r\n int error = 2 * deltaY - deltaX;\r\n\r\n for (int i = 0; i <= deltaX; i++) {\r\n if (x1 >= 0 && y1 >= 0 && x1 < paper.getWidth() && y1 < paper.getHeight()) {\r\n\r\n paper.setRGB(x1, y1, l.getColor().getRGB());\r\n }\r\n while (error > 0) {\r\n if (interchanged) {\r\n x1 = x1 + s1;\r\n } else {\r\n y1 = y1 + s2;\r\n }\r\n error = error - 2 * deltaX;\r\n }\r\n\r\n if (interchanged) {\r\n y1 = y1 + s2;\r\n } else {\r\n x1 = x1 + s1;\r\n }\r\n\r\n error = error + 2 * deltaY;\r\n }\r\n }", "private void drawLine(Vector3 point1, Vector3 point2, Node n) {\n\n Node nodeForLine= new Node();\n nodeForLine.setName(LINE_STRING);\n //First, find the vector extending between the two points and define a look rotation\n //in terms of this Vector.\n final Vector3 difference = Vector3.subtract(point1, point2);\n final Vector3 directionFromTopToBottom = difference.normalized();\n final Quaternion rotationFromAToB =\n Quaternion.lookRotation(directionFromTopToBottom, Vector3.up());\n MaterialFactory.makeTransparentWithColor(getApplicationContext(), new Color(this.colorLine.x, this.colorLine.y, this.colorLine.z,this.alphaColor))\n .thenAccept(\n material -> {\n /* Then, create a rectangular prism, using ShapeFactory.makeCube() and use the difference vector\n to extend to the necessary length. */\n ModelRenderable model = ShapeFactory.makeCube(\n new Vector3(this.sizeLine, this.sizeLine, difference.length()),\n Vector3.zero(), material);\n /* Last, set the world rotation of the node to the rotation calculated earlier and set the world position to\n the midpoint between the given points . */\n\n nodeForLine.setParent(n);\n\n\n nodeForLine.setRenderable(model);\n nodeForLine.setWorldPosition(Vector3.add(point1, point2).scaled(.5f));\n nodeForLine.setWorldRotation(rotationFromAToB);\n }\n );\n\n }", "public void drawLine(int x1, int y1, int x2, int y2) {\n canvas.drawLine(x1, y1, x2, y2, paint);\n }", "@Override\n\tpublic void drawLine(Vector3f from, Vector3f to, Vector3f color) {\n\n\t\tfloat[] positions = new float[6];\n\t\tpositions[0] = from.x;\n\t\tpositions[1] = from.y;\n\t\tpositions[2] = from.z;\n\n\t\tpositions[3] = to.x;\n\t\tpositions[4] = to.y;\n\t\tpositions[5] = to.z;\n\n\t\t// Create a rawmodel to store the line\n\t\tRawModel model = Globals.getLoader().loadToVAO(positions, 3);\n\n\t\tshader.start();\n\t\tshader.loadProjectionMatrix(Globals.getRenderer().getProjectionMatrix());\n\t\tshader.loadViewMatrix(Globals.getActiveCamera());\n\t\tGL30.glBindVertexArray(model.getVaoID());\n\n\t\tGL20.glEnableVertexAttribArray(0);\n\t\tGL11.glDrawArrays(GL11.GL_LINES, 0, 6);\n\t\tGL20.glDisableVertexAttribArray(0);\n\t\tGL30.glBindVertexArray(0);\n\t\tshader.stop();\n\t\tmodel.cleanUp();\n\n\t}", "private void defineLinePoints(int x1, int y1,int x2,int y2){\n Line line1 = new Line(x1, y1, x2, y2);\n for(int i = 0; i < line1.points.size(); i++){\n super.points.add(line1.points.get(i));\n }\n }", "protected void drawLineFromPointToPrevPoint(PointFloat[] points, int index, int thickness, Color c)\n\t{\n\t\t\tint x1 = (int) (points[index].x * drawnPlot.getScale().x + drawnPlot\n\t\t\t\t\t.getOffset().x);\n\t\t\tint y1 = (int) (-points[index].y * drawnPlot.getScale().y + drawnPlot\n\t\t\t\t\t.getOffset().y);\n\t\t\tint x2 = (int) (points[index - 1].x * drawnPlot.getScale().x + drawnPlot\n\t\t\t\t\t.getOffset().x);\n\t\t\tint y2 = (int) (-points[index - 1].y * drawnPlot.getScale().y + drawnPlot\n\t\t\t\t\t.getOffset().y);\n\t\t\tGraphics2D g2 = (Graphics2D) g;\n\t\t\tg.setColor(c);\n\t\t\tg2.setStroke(new BasicStroke(thickness));\n\t\t\tg.drawLine(x1, y1, x2, y2);\n\t}", "public void draw()\n {\n drawLine(x1, y1, x2, y2);\n }", "public void addEdge(Integer x1, Integer y1, Integer x2, Integer y2, boolean added){\n\t\tif(!added){\n\t\t\toutput += \"<line x1=\\\"\" + x1*scale + \"\\\" y1=\\\"\" + y1*scale + \"\\\" x2=\\\"\" \n\t\t\t\t\t\t+ x2*scale + \"\\\" y2=\\\"\" + y2*scale + \"\\\" style=\\\"stroke:black; stroke-width:1;\\\"/>\\n\";\n\t\t}else{\n\t\t\toutput += \"<line x1=\\\"\" + x1*scale + \"\\\" y1=\\\"\" + y1*scale + \"\\\" x2=\\\"\" \n\t\t\t\t\t\t+ x2*scale + \"\\\" y2=\\\"\" + y2*scale + \"\\\" style=\\\"stroke:#d7d7d7; stroke-width:1;\\\"/>\\n\";\n\t\t}\n\t}", "public GeoLine(GeoPoint start, Color color, GeoPoint end ){\n super(start,color);\n this.setEnd(end);\n this.setEdgeColor(color);\n }", "public LineXY( final PointXY p1, final PointXY p2 ) {\n\t\tthis.p1 = p1;\n\t\tthis.p2\t= p2;\n\t}", "public void drawLine() {\n for(int i=0; i < nCols; i++) {\n System.out.print(\"----\");\n }\n System.out.println(\"\");\n }", "public Line(double x1, double y1, double x2, double y2) {\r\n this(new Point(x1, y1), new Point(x2, y2));\r\n }", "@Override\n public void drawOn(DrawSurface d) {\n d.setColor(getColor());\n for (int i = 0; i < thick / 2; i++) {\n d.drawLine((int) p1.getX() + i, (int) p1.getY() + i,\n (int) p2.getX() + i, (int) p2.getY() + i);\n d.drawLine((int) p1.getX() - i, (int) p1.getY() - i,\n (int) p2.getX() - i, (int) p2.getY() - i);\n }\n }", "static Line2 pointsToLine2(PointDouble p1, PointDouble p2) {\n Line2 line = new Line2();\n if (Math.abs(p1.x - p2.x) < EPS) {\n // Vertical Line through both points\n line.m = INF; // l contains m = INF and c = x_value\n line.c = p1.x; // to denote vertical Line x = x_value\n }\n else {\n // Non-vertical Line through the points.\n line.m = (p1.y - p2.y) / (p1.x - p2.x);\n line.c = p1.y - line.m * p1.x;\n }\n return line;\n }", "public Line(Point p1, Point p2) {\n super(p1, p2);\n this.p1 = p1;\n this.p2 = p2;\n }", "private void drawTimeLineForLine(Graphics2D g2d, RenderContext myrc, Line2D line, \n Composite full, Composite trans,\n int tl_x0, int tl_x1, int tl_w, int tl_y0, int tl_h, \n long ts0, long ts1) {\n g2d.setComposite(full); \n\t// Parametric formula for line\n double dx = line.getX2() - line.getX1(), dy = line.getY2() - line.getY1();\n\tdouble len = Utils.length(dx,dy);\n\tif (len < 0.001) len = 0.001; dx = dx/len; dy = dy/len; double pdx = dy, pdy = -dx;\n\tif (pdy < 0.0) { pdy = -pdy; pdx = -pdx; } // Always point down\n double gather_x = line.getX1() + dx*len/2 + pdx*40, gather_y = line.getY1() + dy*len/2 + pdy*40;\n\n\t// Find the bundles, for this with timestamps, construct the timeline\n\tSet<Bundle> set = myrc.line_to_bundles.get(line);\n\tIterator<Bundle> itb = set.iterator(); double x_sum = 0.0; int x_samples = 0;\n while (itb.hasNext()) {\n\t Bundle bundle = itb.next();\n\t if (bundle.hasTime()) { x_sum += (int) (tl_x0 + (tl_w*(bundle.ts0() - ts0))/(ts1 - ts0)); x_samples++; }\n }\n\tif (x_samples == 0) return;\n\tdouble x_avg = x_sum/x_samples;\n ColorScale timing_marks_cs = RTColorManager.getTemporalColorScale();\n itb = set.iterator();\n\twhile (itb.hasNext()) { \n\t Bundle bundle = itb.next();\n\n\t if (bundle.hasTime()) {\n double ratio = ((double) (bundle.ts0() - ts0))/((double) (ts1 - ts0));\n\t g2d.setColor(timing_marks_cs.at((float) ratio));\n\n\t int xa = (int) (tl_x0 + (tl_w*(bundle.ts0() - ts0))/(ts1 - ts0));\n // g2d.setComposite(full); \n g2d.draw(line);\n\t if (bundle.hasDuration()) {\n int xb = (int) (tl_x0 + (tl_w*(bundle.ts1() - ts0))/(ts1 - ts0)); \n double r = (tl_h-2)/2;\n g2d.fill(new Ellipse2D.Double(xa-r,tl_y0-tl_h/2-r,2*r,2*r));\n g2d.fill(new Ellipse2D.Double(xb-r,tl_y0-tl_h/2-r,2*r,2*r));\n if (xa != xb) g2d.fill(new Rectangle2D.Double(xa, tl_y0-tl_h/2-r, xb-xa, 2*r));\n\t if (xa != xb) { g2d.drawLine(xa,tl_y0-tl_h,xb,tl_y0); g2d.drawLine(xa,tl_y0, xb,tl_y0); }\n\t }\n\t g2d.drawLine(xa,tl_y0-tl_h,xa,tl_y0); // Make it slightly higher at the start\n double x0 = line.getX1() + dx * len * 0.1 + dx * len * 0.8 * ratio,\n\t y0 = line.getY1() + dy * len * 0.1 + dy * len * 0.8 * ratio;\n\t g2d.draw(new CubicCurve2D.Double(x0, y0, \n x0 + pdx*10, y0 + pdy*10,\n gather_x - pdx*10, gather_y - pdy*10,\n gather_x, gather_y));\n g2d.draw(new CubicCurve2D.Double(gather_x, gather_y, \n\t gather_x + pdx*40, gather_y + pdy*40,\n\t\t\t\t\t x_avg, tl_y0 - 10*tl_h, \n\t x_avg, tl_y0 - 8*tl_h));\n g2d.draw(new CubicCurve2D.Double(x_avg, tl_y0 - 8*tl_h,\n (x_avg+xa)/2, tl_y0 - 6*tl_h,\n xa, tl_y0 - 2*tl_h,\n xa, tl_y0 - tl_h/2));\n }\n\t}\n }", "public void setLineWidth(int width)\n {\n if (width > 0)\n lineWidth = width;\n else \n lineWidth = 1;\n }", "public abstract void setLineWidth(float lineWidth);", "public Line (double x0, double y0, double x1, double y1) {\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n }", "static Line pointsToLine(PointDouble p1, PointDouble p2) {\n Line line = new Line();\n if (Math.abs(p1.x - p2.x) < EPS) {\n // Vertical Line through both points\n line.a = 1.0; line.b = 0.0; line.c = -p1.x;\n } else {\n // Non-vertical Line through the points.\n // Since the Line eq. is homogeneous we fix the scaling by setting b = 1.0.\n line.a = -(p1.y - p2.y) / (p1.x - p2.x);\n line.b = 1.0;\n line.c = -(line.a * p1.x) - p1.y;\n }\n return line;\n }", "public Line(final Pos first, final Pos second) {\n this(first, second, new Black());\n }", "public Rectangle(Point point1, Point point2){\n super(4);\n if(point1.getX() == point2.getX() || point1.getY() == point2.getY())\n throw new IllegalArgumentException(\"Input points are not opposite to each other.\");\n int point1X = point1.getX(); //stores the x of the first point\n int point1Y = point1.getY(); //stores the y of the first point\n int point2X = point2.getX(); //stores the x of the second point\n int point2Y = point2.getY(); //stores the y of the second point\n \n if(point1X < point2X){\n width = point2X - point1X;\n if(point1Y < point2Y){\n height = point2Y - point1Y;\n topLine = new Line(point1X, point1Y, point2X, point1Y);\n rightLine = new Line(point2X, point1Y, point2X, point2Y);\n bottomLine = new Line(point2X, point2Y, point1X, point2Y);\n leftLine = new Line(point1X, point2Y, point1X, point1Y);\n }\n if(point1Y > point2Y){\n height = point1Y - point2Y;\n topLine = new Line(point1X, point2Y, point2X, point2Y);\n rightLine = new Line(point2X, point2Y, point2X, point1Y);\n bottomLine = new Line(point2X, point1Y, point1X, point1Y);\n leftLine = new Line(point1X, point1Y, point1X, point2Y);\n }\n }\n if(point1X > point2X){\n width = point1X - point2X;\n if(point1Y > point2Y){\n height = point1Y - point2Y;\n bottomLine = new Line(point1X, point1Y, point2X, point1Y);\n leftLine = new Line(point2X, point1Y, point2X, point2Y);\n topLine = new Line(point2X, point2Y, point1X, point2Y);\n rightLine = new Line(point1X, point2Y, point1X, point1Y);\n }\n if(point1Y < point2Y){\n height = point2Y - point1Y;\n leftLine = new Line(point2X, point2Y, point2X, point1Y);\n topLine = new Line(point2X, point1Y, point1X, point1Y);\n rightLine = new Line(point1X, point1Y, point1X, point2Y);\n bottomLine = new Line(point1X, point2Y, point2X, point2Y);\n }\n }\n referencePoint = topLine.getFirstPoint();\n }", "public abstract float getLineWidth();", "private void drawLine(GraphicsContext canvas, Point start, Point end) {\n canvas.strokeLine(\n start.X, start.Y,\n end.X, end.Y\n );\n }", "public void drawLine(int x0, int y0, int x1, int y1) {\n \t\tmyCanvas.drawLine(x0, y0, x1, y1, myPaint);\n \t}", "public LineXY( final double x1,\n\t\t\t\t final double y1,\n\t\t\t\t final double x2,\n\t\t\t\t final double y2 ) {\n\t\tthis.p1 = new PointXY( x1, y1 ); \n\t\tthis.p2 = new PointXY( x2, y2 );\n\t}", "public void drawLine(Position scanPos, Position mypos)// in\n \t\t// ver�nderter\n \t\t// Form von\n \t\t// http://www-lehre.informatik.uni-osnabrueck.de\n \t\t\t{\n \t\t\t\tint x, y, error, delta, schritt, dx, dy, inc_x, inc_y;\n \n \t\t\t\tx = mypos.getX(); // \n \t\t\t\ty = mypos.getY(); // As i am center\n \n \t\t\t\tdx = scanPos.getX() - x;\n \t\t\t\tdy = scanPos.getY() - y; // Hoehenzuwachs\n \n \t\t\t\t// Schrittweite\n \n \t\t\t\tif (dx > 0) // Linie nach rechts?\n \t\t\t\t\tinc_x = 1; // x inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach links\n \t\t\t\t\tinc_x = -1; // x dekrementieren\n \n \t\t\t\tif (dy > 0) // Linie nach oben ?\n \t\t\t\t\tinc_y = 1; // y inkrementieren\n \t\t\t\telse\n \t\t\t\t\t// Linie nach unten\n \t\t\t\t\tinc_y = -1; // y dekrementieren\n \n \t\t\t\tif (Math.abs(dy) < Math.abs(dx))\n \t\t\t\t\t{ // flach nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dx); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dy); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (x != scanPos.getX())\n \t\t\t\t\t\t\t{\n \n \t\t\t\t\t\t\t\tif (x != mypos.getX())\n \t\t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY()); // Fuer\n \t\t\t\t\t\t\t\t\t\t// jede\n \t\t\t\t\t\t\t\t\t\t// x-Koordinate\n \t\t\t\t\t\t\t\t\t\t// System.out.println(\"inc pos \"+ (x +\n \t\t\t\t\t\t\t\t\t\t// mypos.getX()));\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\tx += inc_x; // naechste x-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Spalte erreicht?\n \t\t\t\t\t\t\t\t\t\ty += inc_y; // y-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t} else\n \t\t\t\t\t{ // steil nach oben oder unten\n \t\t\t\t\t\terror = -Math.abs(dy); // Fehler bestimmen\n \t\t\t\t\t\tdelta = 2 * Math.abs(dx); // Delta bestimmen\n \t\t\t\t\t\tschritt = 2 * error; // Schwelle bestimmen\n \t\t\t\t\t\twhile (y != scanPos.getY())\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\tif (y != mypos.getY())\n \t\t\t\t\t\t\t\t\t{// fuer jede y-Koordinate\n \t\t\t\t\t\t\t\t\t\tincPix(x + mypos.getX(), y + mypos.getY());\n \t\t\t\t\t\t\t\t\t}// setze\n \t\t\t\t\t\t\t\t// Pixel\n \t\t\t\t\t\t\t\ty += inc_y; // naechste y-Koordinate\n \t\t\t\t\t\t\t\terror = error + delta; // Fehler aktualisieren\n \t\t\t\t\t\t\t\tif (error > 0)\n \t\t\t\t\t\t\t\t\t{ // neue Zeile erreicht?\n \t\t\t\t\t\t\t\t\t\tx += inc_x; // x-Koord. aktualisieren\n \t\t\t\t\t\t\t\t\t\terror += schritt; // Fehler\n \t\t\t\t\t\t\t\t\t\t// aktualisieren\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\tif ((x != scanPos.getX() && y != scanPos.getY()))\n \t\t\t\t\t{\n \t\t\t\t\t\tdecPix(scanPos.getX() + x, scanPos.getY() + y);\n \t\t\t\t\t}\n \t\t\t}", "public PointRelation pointLineRelation(Coordinates point, Coordinates linePointA, Coordinates linePointB);", "public Vector2d getLineNormal(Line2d line)\n\t{\n\n\t\tthis.color = Color.BLACK;\n\t\t\n\n//\t\tDraw2DApplet da = new Draw2DApplet(this);\n//\t\tthis.display();\n\n\t\tVector2d dir = new Vector2d(line.getDirection());\n\t\tVector2d nDir = new Vector2d(-dir.y, dir.x);\n\t\tVector2d negDir = new Vector2d();\n\t\tnegDir.negate(nDir);\n\t\tVector2d sc = new Vector2d(nDir);\n\t\tsc.scale(20. * GeometryConstants.EPSILON);\n\t\tfinal Point2d mp = line.pointOnLine(line.getLength()/2);\n\t\tmp.add(sc);\n\t\tList points = getPoints();\n\t\tfinal int n = points.size();\n\t\tfinal double[] xp = new double[n];\n\t\tfinal double[] yp = new double[n];\n//\t\tSystem.out.println(\">>>>>>>>>> mpoint is: \" + mp);\n\t\tfor(int i = 0; i < n; i++) \n\t\t{\n\t\t\tPoint2d point = (Point2d) points.get(i);\n\t\t\txp[i] = point.x;\n\t\t\typ[i] = point.y;\n//\t\t\tSystem.out.println(\"-------------- point\" + i + \" is: \" + xp[i] + \", \" + yp[i]);\n\t\t}\n/*\t\tViewObject vo = new ViewObject () {\n\t\t\tpublic LinkedList getDrawList () {\n\t\t\t\tLinkedList list = new LinkedList(); \n\t\t\t\tfor (int i = 0; i <n-1; i++) {\n\t\t\t\t\tlist.add(new Line2D.Double (xp[i], yp[i], xp[i+1], yp[i+1]));\n\t\t\t\t}\n\t\t\t\tlist.add (new Ellipse2D.Double(mp.x, mp.y, mp.x+0.2, mp.y+0.2));\n\t\t\t\treturn list;\n\t\t\t}\n\t\t};\n\t\tvo.setApplet (new Draw2DApplet(vo));\n\t\tvo.display();*/\n\t\t try {\n\t\t\treturn Polygon2d.isPointInside(xp, yp, mp.x, mp.y)? negDir: nDir;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} \n\t}", "public static void renderLine(double startx , double starty , double endx , double endy) {\n\t\t//Find out what rendering mode to use\n\t\tif (! Settings.Android && Settings.Video.OpenGL)\n\t\t\t//Render a line using OpenGL\n\t\t\tBasicRendererOpenGL.renderLine(startx , starty , endx , endy);\n\t\telse if (! Settings.Android && ! Settings.Video.OpenGL)\n\t\t\t//Render a line using Java\n\t\t\tBasicRendererJava.renderLine(startx , starty , endx , endy);\n\t\telse if (Settings.Android && ! Settings.Video.OpenGL)\n\t\t\t//Render a line using Android\n\t\t\tBasicRendererAndroid.renderLine(startx , starty , endx , endy);\n\t}", "private void drawLineNumbers(Canvas canvas, float offsetX, float width, int color){\n if(width + offsetX <= 0){\n return;\n }\n int first = getFirstVisibleLine();\n int last = getLastVisibleLine();\n mPaint.setTextAlign(mLineNumberAlign);\n mPaint.setColor(color);\n mPaint.setTypeface(mTypefaceLineNumber);\n for(int i = first;i <= last;i++){\n switch(mLineNumberAlign){\n case LEFT:\n canvas.drawText(Integer.toString(i + 1), offsetX, getLineBaseLine(i) - getOffsetY(), mPaint);\n break;\n case RIGHT:\n canvas.drawText(Integer.toString(i + 1), offsetX + width, getLineBaseLine(i) - getOffsetY(), mPaint);\n break;\n case CENTER:\n canvas.drawText(Integer.toString(i + 1), offsetX + width / 2f, getLineBaseLine(i) - getOffsetY(), mPaint);\n }\n }\n mPaint.setTextAlign(Paint.Align.LEFT);\n }", "@Override\n public void drawLine(String id, Location start, Location end, double weight, Color color, boolean screenCoords) {\n drawLine(id, start, end, weight, color, false, screenCoords);\n }", "public SmoothLine(Point2D[] points){ \n this.points = points; \n }", "public String toString() {\n\t\treturn \"LINE:(\"+startPoint.getX()+\"-\"+startPoint.getY() + \")->(\" + endPoint.getX()+\"-\"+endPoint.getY()+\")->\"+getColor().toString();\n\t}", "Line createLine();", "private static void lineTo(float x, float y) {\n setPenDown();\n mPivotX = mPenX = x;\n mPivotY = mPenY = y;\n mPath.lineTo(x * mScale, y * mScale);\n elements.add(\n new PathElement(ElementType.kCGPathElementAddLineToPoint, new Point[] {new Point(x, y)}));\n }", "public LineStrip2D(float... values) {\n if (values.length % 2 != 0)\n throw new IllegalArgumentException(\"Odd number of arguments\");\n List<Point2D> points = new ArrayList<Point2D>();\n for (int i = 0; i < values.length / 2; i++) {\n points.add(new Point2D(values[2*i], values[2*i + 1]));\n }\n this.points = points;\n }", "public void lineTo(int x, int y){\n paint.setColor(Color.parseColor(\"#000000\"));\n //ToDo: implement line drawing here\n\n canvas.drawLine(lastX, lastY, x, y, paint);\n lastX = x;\n lastY = y;\n Log.d(\"Canvas Element\", \"drawing line from: \" + lastX + \", \" + lastY +\",\" + \" to: \" + x +\", \" + y);\n }", "public void paintLine(Point2D pt1, Point2D pt2) {\n if (theMap != null) {\n paintLine(pt1, pt2, theMap.getGraphics());\n }\n }", "private void drawLines()\n {\n getBackground().setColor( Color.BLACK );\n \n for( int i = 200; i < getWidth(); i += 200 )\n {\n getBackground().drawLine(i, 0, i, getHeight() );\n getBackground().drawLine(0, i, getWidth(), i);\n }\n \n Greenfoot.start();\n }", "private void drawLines() {\n int min = BORDER_SIZE;\n int max = PANEL_SIZE - min;\n int pos = min;\n g2.setColor(LINE_COLOR);\n for (int i = 0; i <= GUI.SIZE[1]; i++) {\n g2.setStroke(new BasicStroke(i % GUI.SIZE[0] == 0 ? 5 : 3));\n g2.drawLine(min, pos, max, pos);\n g2.drawLine(pos, min, pos, max);\n pos += CELL_SIZE;\n }\n }", "private void plotLineClippedBits(int[] shades1, boolean tScreened1,\n int[] shades2, boolean tScreened2,\n int shadeIndex, int x, int y, int z, int dx,\n int dy, int dz, int run, int rise) {\n int[] zbuf = g3d.zbuf;\n int width = g3d.width;\n int runIndex = 0;\n if (run == 0) {\n rise = Integer.MAX_VALUE;\n run = 1;\n }\n int shadeIndexUp = (shadeIndex < Shader.shadeIndexLast ? shadeIndex + 1\n : shadeIndex);\n int shadeIndexDn = (shadeIndex > 0 ? shadeIndex - 1 : shadeIndex);\n int argb1 = shades1[shadeIndex];\n int argb1Up = shades1[shadeIndexUp];\n int argb1Dn = shades1[shadeIndexDn];\n int argb2 = shades2[shadeIndex];\n int argb2Up = shades2[shadeIndexUp];\n int argb2Dn = shades2[shadeIndexDn];\n boolean tScreened = tScreened1;\n boolean flipflop = (((x ^ y) & 1) != 0);\n int offset = y * width + x;\n int offsetMax = g3d.bufferSize;\n int i0, iMid, i1, i2, iIncrement, xIncrement, yIncrement;\n float zIncrement;\n if (lineTypeX) {\n i0 = x;\n i1 = x1t;\n i2 = x2t;\n iMid = x + dx / 2;\n iIncrement = (dx >= 0 ? 1 : -1);\n xIncrement = iIncrement;\n yIncrement = (dy >= 0 ? width : -width);\n zIncrement = (float)dz/(float)Math.abs(dx);\n } else {\n i0 = y;\n i1 = y1t;\n i2 = y2t;\n iMid = y + dy / 2;\n iIncrement = (dy >= 0 ? 1 : -1);\n xIncrement = (dy >= 0 ? width : -width);\n yIncrement = (dx >= 0 ? 1 : -1);\n zIncrement = (float)dz/(float)Math.abs(dy);\n }\n //System.out.println(lineTypeX+\" dx dy dz \" + dx + \" \" + dy + \" \" + dz);\n float zFloat = z;\n int argb = argb1;\n int argbUp = argb1Up;\n int argbDn = argb1Dn;\n boolean isInWindow = false;\n\n // \"x\" is not necessarily the x-axis.\n \n // x----x1t-----------x2t---x2\n // ------------xMid-----------\n //0-|------------------>-----------w\n\n // or\n \n // x2---x2t-----------x1t----x\n // ------------xMid----------- \n //0-------<-------------------|----w\n \n for (int i = i0, iBits = i0;; i += iIncrement, iBits += iIncrement) {\n if (i == i1)\n isInWindow = true;\n if (i == iMid) {\n argb = argb2;\n if (argb == 0)\n return;\n argbUp = argb2Up;\n argbDn = argb2Dn;\n tScreened = tScreened2;\n if (tScreened && !tScreened1) {\n int yT = offset / width;\n int xT = offset % width;\n flipflop = ((xT ^ yT) & 1) == 0;\n }\n }\n //if(test > 0)System.out.println(isInWindow + \" i1=\"+ i1 + \" i0=\" + i0 + \" i=\" + i + \" offset=\"+offset );\n if (argb != 0 && isInWindow && offset >= 0 && offset < offsetMax \n && runIndex < rise && (!tScreened || (flipflop = !flipflop))) {\n if (zFloat < zbuf[offset]) {\n int rand8 = shader.nextRandom8Bit();\n g3d.addPixel(offset, (int) zFloat, rand8 < 85 ? argbDn : (rand8 > 170 ? argbUp : argb));\n }\n }\n if (i == i2)\n break;\n runIndex = (runIndex + 1) % run;\n offset += xIncrement;\n while (iBits < 0)\n iBits += nBits;\n if (lineBits.get(iBits % nBits))\n offset += yIncrement;\n zFloat += zIncrement;\n //System.out.println(\"x y z \"+offset+\" \"+zFloat+ \" \"+xIncrement+\" \"+yIncrement+\" \"+zIncrement);\n }\n }", "public void setLine(int x1, int y1, int x2, int y2){\n\t\tint slope = 0;\n\t\tboolean vert = true;\n\t\t\n\t\tif((x2 - x1) != 0){\n\t\t\tslope = (y2 - y1) / (x2 - x1);\n\t\t\tvert = false;\n\t\t}\n\t\tif(!vert){\n\t\t\tfor(int a = 0; a < Math.abs(x2 - x1) + 1; a++){\n\t\t\t\tif(a >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tif((x2 - x1) < 0){\n\t\t\t\t\tpathX[a] = x1 - a;\n\t\t\t\t\tpathY[a] = y1 - (a * slope);\n\t\t\t\t}\n\t\t\t\telse if((x2 - x1) > 0){\n\t\t\t\t\tpathX[a] = x1 + a;\n\t\t\t\t\tpathY[a] = y1 + (a * slope);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(vert && (y2 - y1) < 0){\n\t\t\tfor(int b = 0; b < Math.abs(y2 - y1) + 1; b++){\n\t\t\t\tif(b >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tpathX[b] = x1;\n\t\t\t\tpathY[b] = y1 - b;\n\t\t\t}\n\t\t}\n\t\telse if(vert && (y2 - y1) > 0){\n\t\t\tfor(int b = 0; b < Math.abs(y2 - y1) + 1; b++){ \n\t\t\t\tif(b >= 1025)\n\t\t\t\t\tbreak;\n\t\t\t\tpathX[b] = x1;\n\t\t\t\tpathY[b] = y1 + b;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t\t\n\t}", "public void setLineWidth(int width) {\n mPaintLine.setStrokeWidth(width);\n }", "public Color getLineColor();", "public void drawLineTo(int oth, float goodness) {\n\t\t\tif (headless) return;\n\t\t\t//Done.\n\t\t\tboolean trans = transparentCountdown>0;\n\t\t\tif (!trans) {\n\t\t\t\tif (showLines && distances[oth]<SHOW_LINES) {\n\t\t\t\t\tstrokeWeight(2);\n\t\t\t\t\tstrokeColors(distances[oth]);\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tsetStroke(goodness, distances[oth]);\n\t\t\t}\n\n\t\t\tdrawLineTo0(oth, goodness);\n\t\t}", "public void setLineWidth ( int width ) {\r\n\t\tline_width = width;\r\n\t}", "@Override\n public boolean drawPathLine(Location loc1, Location loc2) {\n if (loc1.distanceTo(loc2) < DRAW_LINE_THRESHOLD_METERS) {\n return false;\n }\n Polyline line = new Polyline();\n List<GeoPoint> points = Arrays.asList(MapUtils.makeGeoPoint(loc1), MapUtils.makeGeoPoint(loc2));\n line.setPoints(points);\n line.setColor(Color.RED);\n line.setWidth(2.0f);\n mMap.getOverlayManager().add(line);\n\n mPathLines.add(line);\n return true;\n }", "private void drawRect(double x0, double y0, double width, double height, int lWidth, Color color){\n \n lWidth = Math.min(lWidth, max_width);\n \n x0 += 0.5 * lWidth;\n y0 += 0.5 * lWidth;\n width -= lWidth;\n height -= lWidth;\n \n x0 /= this.width;\n y0 /= this.height;\n width /= this.width;\n height /= this.height;\n \n x0 -= 0.5;\n y0 -= 0.5;\n \n glLineWidth(lWidth);\n \n glBegin(GL_LINES);\n glEnable(GL_LINE_WIDTH);\n glColor3f(color.getRed(), color.getGreen(), color.getBlue());\n \n //left side\n glVertex3d(x0, y0 + height, 0);\n glVertex3d(x0, y0, 0);\n \n //Right side\n glVertex3d(x0 + width, y0, 0);\n glVertex3d(x0 + width, y0 + height, 0);\n \n x0 -= (double)lWidth / (double)this.width / 2d;\n width += (double)lWidth / (double)this.width;\n \n //bottom\n glVertex3d(x0, y0, 0);\n glVertex3d(x0 + width, y0, 0);\n \n //top\n glVertex3d(x0, y0 + height, 0);\n glVertex3d(x0 + width, y0 + height, 0);\n \n \n glEnd();\n }", "private void drawLine(KdNode kdNode, double x0, double x1, double y0, double y1) {\n if (kdNode.dimension) { // True, or node is vertical\n StdDraw.setPenColor(Color.red);\n StdDraw.line(kdNode.point.x(), y0, kdNode.point.x(), y1);\n if (kdNode.left != null) drawLine(kdNode.left, x0, kdNode.point.x(), y0, y1);\n if (kdNode.right != null) drawLine(kdNode.right, kdNode.point.x(), x1, y0, y1);\n }\n else { // False, or node is horizontal\n StdDraw.setPenColor(Color.blue);\n StdDraw.line(x0, kdNode.point.y(), x1, kdNode.point.y());\n if (kdNode.left != null) drawLine(kdNode.left, x0, x1, y0, kdNode.point.y());\n if (kdNode.right != null) drawLine(kdNode.right, x0, x1, kdNode.point.y(), y1);\n }\n\n }" ]
[ "0.7651861", "0.7529009", "0.7037254", "0.69506705", "0.6926378", "0.6914613", "0.6908096", "0.69059646", "0.6850482", "0.6775175", "0.6582606", "0.652036", "0.6512476", "0.6443262", "0.64078254", "0.6384383", "0.6362707", "0.63463575", "0.6318334", "0.63131666", "0.6300947", "0.6272079", "0.625467", "0.6214365", "0.61520076", "0.6142683", "0.61382246", "0.61020577", "0.6085041", "0.6066541", "0.6055651", "0.60534656", "0.6051169", "0.6049428", "0.6029756", "0.60123056", "0.6001492", "0.59979856", "0.5972716", "0.5931026", "0.58761585", "0.5867566", "0.5866035", "0.5861503", "0.58596563", "0.5857363", "0.585511", "0.5848974", "0.58414614", "0.58388656", "0.5810713", "0.57983017", "0.5782983", "0.57714516", "0.5752964", "0.57498574", "0.57495105", "0.5740598", "0.57236034", "0.57224065", "0.5712249", "0.5693152", "0.5671539", "0.5661515", "0.56609154", "0.56562114", "0.5637337", "0.5628852", "0.5618664", "0.5616738", "0.560343", "0.5602674", "0.560262", "0.5602187", "0.5580088", "0.5577314", "0.55737936", "0.55689067", "0.55628663", "0.5561756", "0.5555376", "0.55546874", "0.5549338", "0.5547484", "0.5539551", "0.5532049", "0.553035", "0.5527755", "0.5525721", "0.5517942", "0.551687", "0.550498", "0.5504168", "0.5502389", "0.5500139", "0.54988617", "0.54832345", "0.54763293", "0.54640585", "0.5460468" ]
0.7776956
0
Show the entity of given size in the interface at position x,y Do so by drawing a circle in the colour specified by character c
public void showItem(int x, int y, int size, char col) { gc.setFill(colFromChar(col)); // set the fill colour gc.fillArc(x - size, y - size, size * 2, size * 2, 0, 360, ArcType.ROUND); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void show(int c) {\n noFill();\n stroke(255, c, 0);\n strokeWeight(5);\n ellipse(x, y, size, size);\n \n }", "private void drawPosition(Position pos, TextColor color, char c, boolean wide) {\n TextGraphics text = screen.newTextGraphics();\n text.setForegroundColor(color);\n text.putString(pos.getX() * 2, pos.getY() + 1, String.valueOf(c));\n\n if (wide) {\n text.putString(pos.getX() * 2 + 1, pos.getY() + 1, String.valueOf(c));\n }\n }", "@Override\r\n\tpublic void dibujar(Entorno ent, Coordenada c) {\n\t\tent.dibujarRectangulo(c.getX(), c.getY(), 20, 20, 0, Color.YELLOW);\r\n\t}", "@Override\n\tprotected void display(Coordination c) {\n\t\tSystem.out.println(\"白棋,颜色是:\" + color + \"位置是:\" + c.getX() + \"--\" + c.getY());\n\t}", "private void drawBuilding(Graphics2D g2d, int x, int y, Cell c, Color color) {\n try {\r\n \tg2d.setPaint(Color.CYAN.darker());\r\n \tg2d.fill(cellBorder);\r\n g2d.setPaint(Color.DARK_GRAY);\r\n g2d.draw(cellBorder);\r\n String msg = c.getGarbageString();\r\n g2d.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,\r\n java.awt.RenderingHints.VALUE_ANTIALIAS_ON);\r\n java.awt.Font font = new java.awt.Font(\"Serif\", java.awt.Font.PLAIN, 11);\r\n g2d.setFont(font);\r\n g2d.setPaint(color);\r\n g2d.drawString(msg,dx-40,dy);\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n \r\n }", "abstract public char drawGadget(Vect position);", "public void display() {\n PVector d = location.get();\n float diam = d.y/height;\n println(diam);\n\n stroke(0);\n fill(255,0,0);\n ellipse (location.x, location.y, diameter, diameter);\n }", "public void drawCircle(int xC, int yC, int xP,int yP, Graphics g) {\r\n \tfloat x, y;\r\n \tint partA = xC-xP;\r\n \tint partB= yC-yP;\r\n \tint r = (int) Math.sqrt(Math.pow(partA, 2)+ Math.pow(partB,2));\r\n \tdouble delta = Math.PI / (2*Math.sqrt(2)*r);\r\n \t \tfor (int i = 0; i < (Math.sqrt(2) * r) / 2; i++) {\r\n \tx = (float) (r * Math.cos( i * delta));\r\n \ty = (float) (r * Math.sin( i * delta));\r\n \tdrawSymmetricalPoints(Math.round(xC),Math.round(x),Math.round(yC),Math.round(y),g);\r\n \t\t\r\n \t}\r\n \r\n }", "@Override\n public void draw( Graphics g )\n {\n g.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\n g.setColor( Color.BLUE );\n g.fillOval( baseX, baseY, myWidth, myHeight );\n g.setColor( Color.BLACK );\n g.drawString( card, baseX + 7, baseY + 20 ); }", "private void drawCircle(GraphicsContext gc, double x, double y) {\r\n GraphicsContext gc1 = myCanvas.getGraphicsContext2D();\r\n gc1.setFill(randomColor());\r\n gc1.fillOval(x - 20, y - 20, 40, 40);\r\n }", "public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }", "public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }", "private void drawRecyclingCenter(Graphics2D g2d, int x, int y, Cell c) {\n try {\r\n \tg2d.setPaint(Color.WHITE);\r\n \tg2d.fill(cellBorder);\r\n g2d.setPaint(Color.DARK_GRAY);\r\n g2d.draw(cellBorder);\r\n String msg = c.getGarbagePointsString();\r\n g2d.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,\r\n java.awt.RenderingHints.VALUE_ANTIALIAS_ON);\r\n java.awt.Font font = new java.awt.Font(\"Serif\", java.awt.Font.PLAIN, 11);\r\n g2d.setFont(font);\r\n g2d.setPaint(Color.BLACK);\r\n g2d.drawString(msg,dx-40,dy);\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "void draw_rect(int x, int y, int w, int h, char[][] _display, char c) {\n for (int i = 0; i < w; i++) {\n draw_char(x + i, y, _display, c);\n }\n for (int i = 0; i < h; i++) {\n draw_char(x + w, y + i, _display, c);\n }\n for (int i = w; i > 0; i--) {\n draw_char(x + i, y + h, _display, c);\n }\n for (int i = h; i > 0; i--) {\n draw_char(x, y + i, _display, c);\n }\n }", "public void draw(){\n\t\tSystem.out.println(\"You are drawing a CIRCLE\");\n\t}", "private static void draw(int r, int c) {\n StdDraw.setPenColor (openSite);\n StdDraw.filledSquare(2 * c * SQR_SIZE + SQR_SIZE, 2 * (N - r - 1) * SQR_SIZE + SQR_SIZE, SQR_SIZE);\n StdDraw.setPenColor(filledSite);\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++) {\n if (perc.isFull(i, j) && perc.isOpen(i, j)) {\n StdDraw.filledSquare(2 * j * SQR_SIZE + SQR_SIZE, 2 * (N - i - 1) * SQR_SIZE + SQR_SIZE, SQR_SIZE);\n }\n }\n }", "private void DrawCircle(GL2 gl, int xC, int yC, int radius) {\n gl.glPointSize(10.0f);\n gl.glColor3d(1, 2, 1);\n gl.glBegin(GL2.GL_POINTS);\n\n gl.glVertex2d(xC, yC);\n\n int x = radius, y = 0, d = -4 * radius + 5;\n draw8SymmetricCurves(gl, xC, yC, x, y);\n while (y <= x) {\n if (d < 0) {\n d = d + ((2 * y + 3) * 4);\n y++;\n } else {\n d += ((-2 * x + 2 * y + 5) * 4);\n x--;\n y++;\n }\n draw8SymmetricCurves(gl, xC, yC, x, y);\n }\n gl.glEnd();\n }", "public void drawCircle(double radius, double x, double y, Color color) {\n\t\tdouble xx = x - radius;\n\t\tdouble yy = y - radius;\n\t\tif (xx < 0.0 || yy < 0.0 || xx > (VIEWING_AREA_WIDTH - radius)|| yy > (VIEWING_AREA_HEIGHT - radius)) {\n\t\t\tthrow new IllegalArgumentException(\"drawCircle: invalid set of radius and x/y cordnates\");\n\t\t}\n\t\tgc.setFill(color);\n\t\tgc.fillOval(xx,yy, radius * 2, radius * 2);\n\t}", "public void drawOval(int x, int y, int width, int height);", "protected void renderCircle(Graphics g, int x, int y, int diameter)\n {\n\tx -= diameter/2;\n\ty -= diameter/2;\n\t\n\tg.drawOval(x,y,diameter,diameter);\n\tig.drawOval(x,y,diameter,diameter);\n }", "public void draw() {\n\t\tSystem.out.println(getMessageSource().getMessage(\"greeting2\", null, null));\r\n\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.circle\", null, null));\r\n\t\tSystem.out.println(\"Center's Coordinates: (\" + getCenter().getX() + \", \" + getCenter().getY() + \")\");\r\n\t\tSystem.out.println(getMessageSource().getMessage(\"drawing.center\",\r\n\t\t\t\tnew Object[] { getCenter().getX(), getCenter().getY() }, \"Default point coordinates msg\", null));\r\n\t}", "public void drawCircle(int radius, int x, int y, Color color) {\n\t\tint xx = x - radius;\n\t\tint yy = y - radius;\n\t\tif (xx < 0 || yy < 0 || xx > (VIEWING_AREA_WIDTH - radius)|| yy > (VIEWING_AREA_HEIGHT - radius)) {\n\t\t\tthrow new IllegalArgumentException(\"drawCircle: invalid set of radius and x/y cordnates\");\n\t\t}\n\t\tgc.setFill(color);\n\t\tgc.fillOval(xx,yy, radius * 2, radius * 2);\n\t}", "@Override\r\n public void paintComponent(Graphics g) {\r\n super.paintComponent(g); g.setColor(Color.ORANGE);\r\n if (drawCirc == 0) {\r\n \tg.fillOval(txtLft,txtTop,txtWidth,txtHeight);\r\n }\r\n }", "public static void caja(int x, int y,String cadena,Color color,Graphics g){\n \n g.setColor(color); \n g.fillRect(x, y, 200, 50);\n //rectangulo color contorno\n int blue = color.getBlue();\n color = new Color(color.getRed(),color.getGreen(),color.getBlue(),color.getAlpha()-50);\n g.setColor(color); \n g.drawRect(x, y, 200, 50);\n \n \n //g.setColor( new Color(33,107,255,100));\n g.setColor(Color.white);\n g.setFont(new java.awt.Font(\"Monospaced\", 0, 18));\n g.drawString(cadena, 50+x, 25+y);\n }", "public void draw(Graphics g){\n g.setColor (colour);\n g.fillOval (x,y,DIAMETER, DIAMETER);\n g.setColor (Color.black);\n g.drawString(name, x+5, y+30);\n g.setFont (new Font (\"Times New Roman\", Font.PLAIN, 16) );\n g.setColor (Color.black);\n g.drawString (Integer.toString(seatNum), x+13 ,y+18) ;\n \n \n \n \n \n \n }", "public void display() {\n float dRadial = reactionRadialMax - reactionRadial;\n if(dRadial != 0){\n noStroke();\n reactionRadial += abs(dRadial) * radialEasing;\n fill(255,255,255,150-reactionRadial*(255/reactionRadialMax));\n ellipse(location.x, location.y, reactionRadial, reactionRadial);\n }\n \n // grow text from point of origin\n float dText = textSizeMax - textSize;\n if(dText != 0){\n noStroke();\n textSize += abs(dText) * surfaceEasing;\n textSize(textSize);\n }\n \n // draw agent (point)\n fill(255);\n pushMatrix();\n translate(location.x, location.y);\n float r = 3;\n ellipse(0, 0, r, r);\n popMatrix();\n noFill(); \n \n // draw text \n textSize(txtSize);\n float lifeline = map(leftToLive, 0, lifespan, 25, 255);\n if(mouseOver()){\n stroke(229,28,35);\n fill(229,28,35);\n }\n else {\n stroke(255);\n fill(255);\n }\n \n text(word, location.x, location.y);\n \n // draw connections to neighboars\n gaze();\n }", "public void draw(String str, double x, double y, double size, int color) {\n draw(str, x, y, size, color, Align.LEFT);\n }", "public void display2() { // for drag action -> color change\n stroke (255);\n fill(0,255,255);\n ellipse (location.x, location.y, diameter, diameter);\n }", "@Override\r\n public void paint(Graphics g) {\r\n super.paint(g);\r\n Letter letter = new Letter(\"C\", getPosition());\r\n letter.paint(g);\r\n }", "@Override\n public void draw() {\n drawAPI.drawCircle(radius, x, y); \n }", "void draw_char(int x, int y, char[][] _display, char c) {\n _display[x][y] = c;\n }", "public Dragon(int x,int y, int size, Color c, String n){\n this.x = x;\n this.y = y;\n this.size = size;\n this.c = c; // You saw nothing.\n health = 50;\n name = n;\n bodyX = x + size * 25;\n bodyY = y + size * 25;\n bodyWidth = size * 60;\n bodyHeight = size * 50;\n }", "protected int drawEchoCharacter(Graphics g, int x, int y, char c) {\n ONE[0] = c;\n SwingUtilities2.drawChars(Utilities.getJComponent(this), g, ONE, 0, 1, x, y);\n return x + g.getFontMetrics().charWidth(c);\n }", "public void showItem2(int x, int y, int size, char col) {\r\n\t\tgc.setFill(colFromChar(col)); // set the fill colour\r\n\t\tgc.fillArc(x - size, y - size, size * 2, size * 2, 0, 180, ArcType.CHORD);\r\n\t}", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n\t{\r\n\t\t// Get the width and height of the component window\r\n\t\twidth = getWidth();\r\n\t\theight = getHeight();\t\t\t\t\r\n\t\t\r\n\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\tgenerateCircles();\r\n\t\tdrawCircles(g2);\r\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"Inside draw of Circle ..Point is: \"+center.getX() +\",\"+center.getY());\n\t}", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "public Circle(int x, int y, int r, Color c) {\n super(x-r,y-r);\n color = c;\n name = \"Circle\";\n width = 2*r;\n height = 2*r;\n radius = r;\n }", "public void display()\n\t{\n\t\tfor(Character characher : characterAdded)\n\t\t{\t\n\t\t\tif(!characher.getIsDragging())\n\t\t\t{ \n\t\t\t\t//when dragging, the mouse has the exclusive right of control\n\t\t\t\tcharacher.x = (float)(circleX + Math.cos(Math.PI * 2 * characher.net_index/net_num) * radius);\n\t\t\t\tcharacher.y = (float)(circleY + Math.sin(Math.PI * 2 * characher.net_index/net_num) * radius);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint lineWeight = 0;\n\t\t//draw the line between the characters on the circle\n\t\tif(characterAdded.size() > 0)\n\t\t{\n\t\t\tfor(Character characher : characterAdded)\n\t\t\t{\n\t\t\t\tfor(Character ch : characher.getTargets())\n\t\t\t\t{\n\t\t\t\t\tif(ch.net_index != -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int i = 0; i < links.size(); i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJSONObject tem = links.getJSONObject(i);\n\t\t\t\t\t\t\tif((tem.getInt(\"source\") == characher.index) && \n\t\t\t\t\t\t\t\t\t\t\t\t(tem.getInt(\"target\") == ch.index))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlineWeight = tem.getInt(\"value\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tparent.strokeWeight(lineWeight/4 + 1);\t\t\n\t\t\t\t\t\tparent.noFill();\n\t\t\t\t\t\tparent.stroke(0);\n\t\t\t\t\t\tparent.line(characher.x, characher.y, ch.x, ch.y);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void drawPiece(int row, int col, Graphics g, Color color){\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\r\n g.setColor(color);\r\n g.fillOval((col*tileSize)+2, (row*tileSize)+2, tileSize-4, tileSize-4);\r\n }", "public abstract void drawPiece(int x, int y, Graphics g);", "private void addColoredCircle(int row, int col, Color c) {\n\t\tdouble size = CIRCLE_RADIUS * 2;\n\t\tGOval oval = new GOval(size, size);\n\t\toval.setFilled(true);\n\t\toval.setColor(c);\n\t\tadd(oval, col - CIRCLE_RADIUS, row - CIRCLE_RADIUS);\n\t}", "@Override\r\n\tprotected void draw() {\n\t\tgoodCabbage = new Oval(center.x - CABBAGE_RADIUS, center.y\r\n\t\t\t\t- CABBAGE_RADIUS, 2 * CABBAGE_RADIUS, 2 * CABBAGE_RADIUS,\r\n\t\t\t\tColor.red, true);\r\n\t\twindow.add(goodCabbage);\r\n\t}", "public void display (Graphics2D g, double x, double y);", "@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(new Color(255, 0, 0));\r\n\t\tg.drawOval(mp1.getX(), mp1.getY(), 3*length, 3*length);\r\n\t\tg.setColor(new Color(0,0,255));\r\n\t\tg.drawOval(enenmy.getX(), enenmy.getY(), 3, 3);\r\n\t}", "@Override\n\tpublic void draw(int radus,int x, int y) {\n\t\tSystem.out.printf(\"draw red circle in %d ,%d by radus is %d %n\",x,y,radus);\n\t}", "@Override public void draw(){\n // this take care of applying all styles (colors/stroke)\n super.draw();\n // draw our shape\n pg.ellipseMode(PGraphics.CORNER); // TODO: make configurable\n pg.ellipse(0,0,getSize().x,getSize().y);\n }", "public void draw(String str, double x, double y, double size, int color, Align align) {\n GL11.glEnable(GL11.GL_BLEND);\n //GL11.glDepthMask(false);\n double scale = size / mcFont().FONT_HEIGHT;\n GL11.glPushMatrix(); {\n GL11.glTranslated(x, y, 0);\n GL11.glScaled(scale, scale, 1);\n String[] ss = str.split(\"\\n\");\n for(int i = 0; i < ss.length; ++i) {\n GL11.glPushMatrix(); {\n double dy = i * mcFont().FONT_HEIGHT;\n GL11.glTranslated(0, dy, 0);\n drawSingleLine(ss[i], color, align);\n } GL11.glPopMatrix();\n }\n } GL11.glPopMatrix();\n }", "@Override\r\n\tpublic void render(Graphics g) {\n\t\tg.setColor(Color.yellow);\r\n\t\tg.fillRect((int) getX(), (int) getY(), 5, 10);\r\n\t}", "@Override\n public void paintComponent() {\n Graphics2D graphics = gameInstance.getGameGraphics();\n graphics.setColor(Color.ORANGE);\n\n final int diff = (PacmanGame.GRID_SIZE/2) - pointCircleRadius;\n graphics.fill(new Ellipse2D.Double(this.x + diff, this.y + diff, pointCircleRadius*2, pointCircleRadius*2));\n }", "@Override\n\tpublic void render(Canvas c) {\n\t\tc.drawText(text,(float)x+width,(float)y+height , paint);\n\t\t\n\t}", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\tSystem.out.println(\"Circle Drawn\");\r\n\t}", "@Override\r\n public void setPixel(int size, int x, int y, Color c) {\r\n int color = c.getRGB();\r\n\r\n for (int i = 0; i < size; i++) {\r\n for (int j = 0; j < size; j++) {\r\n canvas.setRGB(x + i, y + j, color);\r\n }\r\n }\r\n\r\n repaint();\r\n }", "protected void visualizeCharacter(Character c, PdfDrawer drawer) throws VisualizerException {\n visualizePosition(c.getPosition(), drawer, Color.BLACK);\n }", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tGraphics2D g2 = (Graphics2D) g; \n\t\tg2.setColor(Color.lightGray);\n\t\tg2.fill(model.bg);\n\t\tg2.setColor(Color.darkGray);\n\t\tg2.fillPolygon(model.terrain);\n\t\tg2.setColor(Color.gray);\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tg2.draw(model.circles.get(i));\n\t\t}\n\t\tif (model.curCircleSel != -1) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.circles.get(model.curCircleSel));\n\t\t}\n\t\tg2.setColor(Color.RED);\n\t\tg2.fill(model.pad);\n\t\tif (curPadSel) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.pad);\n\t\t}\n\t}", "public void showCircle(double x, double y, double rad, char col) {\n\t \tsetFillColour(colFromChar(col));\t\t\t\t\t\t\t\t\t// set the fill colour\r\n\t\t\tgc.fillArc(x-rad, y-rad, rad*2, rad*2, 0, 360, ArcType.ROUND);\t// fill circle\r\n\t\t\t\r\n\t}", "public void draw(GraphicsContext gc) {\r\n gc.setStroke(Color.BLACK);\r\n gc.setFill(Color.BLUE);\r\n gc.setLineWidth(5.0);\r\n double r = radius / 2;\r\n gc.fillRect(x - r, y - r, radius * 2, radius * 2);\r\n gc.strokeRect(x - r, y - r, radius * 2, radius * 2);\r\n }", "public void toCanvas(ICanvas c) {\n for (int y = ys - r; y <= ys + r; y++) {\n for (int x = xs - r; x <= xs + r; x++) {\n if (inCircle(x, y)) {\n c.writeToPosition(x, y, 1);\n }\n }\n }\n }", "public void draw(Graphics2D gc){\r\n\r\n Font curFont = gc.getFont();\r\n gc.setFont(font);\r\n Paint curColor = gc.getPaint();\r\n gc.setPaint(textColor);\r\n //gc.drawString(text, x, y); // This would look better but doesn't seem to work with hit testing.\r\n\r\n FontRenderContext frc = gc.getFontRenderContext();\r\n TextLayout textLayout = new TextLayout(text, font, frc);\r\n AffineTransform moveTo = AffineTransform.getTranslateInstance(x, y);\r\n textShape = textLayout.getOutline(moveTo);\r\n gc.fill(textShape);\r\n gc.setFont(curFont);\r\n gc.setPaint(curColor);\r\n }", "@Override\n void draw()\n {\n \n System.out.println(\"Drawing Circle at\" + super.x +\"and\"+ super.y+\"!\");\n \n }", "public void paintComponent(Graphics g) {\n\t int horz, vert; \r\n\t// The 'outer loop' \r\n\tfor ( vert = 0; vert < size; vert++ ) { \t\t\t\r\n\t // The 'inner loop' \t\t\t\r\n\t for( horz = 0; horz < size; horz++ ) {\r\n\t // Create a new Color object \t\t\t\t\r\n\t int icol = 256*horz*12 + (vert*12);\r\n\t Color c = new Color(icol); \r\n\t // Set the drawing colour.\r\n\t g.setColor(c);\r\n\t // Create a circle \r\n\t g.fillOval(horz*size,vert*size,size-1,size-1);\r\n\t } \t\t\r\n\t } \r\n }", "public void Display() \n {\n float theta = velocity.heading() + PI/2;\n fill(175);\n stroke(0);\n pushMatrix();\n translate(pos.x,pos.y);\n rotate(theta);\n beginShape();\n vertex(0, -birdSize*2);\n vertex(-birdSize, birdSize*2);\n vertex(birdSize, birdSize*2);\n endShape(CLOSE);\n popMatrix();\n }", "protected void renderFilledCircle(Graphics g, int x, int y, int diameter)\n {\n\tx -= diameter/2;\n\ty -= diameter/2;\n\t\n\tg.fillOval(x,y,diameter,diameter);\n\tig.fillOval(x,y,diameter,diameter);\n }", "private void displayParticles(Player p, double radius, ParticleColor color){\n //just some math to create a circle, and send it to the player. z+0.1f so they arent inside of the bottom block.\n double part = 2 * Math.PI / particlePoints;\n for (int i = 0; i < particlePoints; i++)\n {\n double alpha = part * i;\n float x = (float) (location.getX() + radius * Math.cos(alpha));\n float z = (float) (location.getZ() + radius * Math.sin(alpha));\n float y = (float) (location.getY()+0.1f);\n PacketHelper.displaySingleParticle(p, x, y, z, color);\n }\n }", "@Override\n\tpublic void render(GameContainer gc, Graphics g) {\n\t\tfloat x = getX(), y = getY(), width = getWidth(), height = getHeight();\n\t\tg.setColor(new Color(0.5f, 0.5f, 0.5f, 0.8f));\n\t\tg.fillRoundRect(x, y, width, height, 5);\n\t\t\n\t\tg.setColor(Color.black);\n\t\tg.drawString(\"Map needs to be drawn below\", x + (width - g.getFont().getWidth(\"Map needs to be drawn below\")) * 0.5f , y + 20);\n\t\tg.drawString(\"Orange - current cell\", x + 20, y + 50);\n\t\tg.drawString(\"Green - explored cell\", x + 20, y + 70);\n\t\tg.drawString(\"White - unexplored cell\", x + 20, y + 90);\n\t\tg.drawString(\"Line - connection\", x + 20, y + 110);\n\t\tg.drawString(\"Dot - contains item\", x + 20, y + 130);\n\t\t\n\t\tg.setColor(Color.orange);\n\t\tg.fillRoundRect(x + width/2 - 3, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.green);\n\t\tg.fillRoundRect(x + width/2 - 3 + 50, y + height/2 - 3, 46, 46, 5);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3 + 50, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.darkGray);\n\t\tg.fillRoundRect(x + width/2, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 50, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2 + 50, 40, 40, 5);\n\t\t\n\t\tg.drawLine(x + width/2 + 40, y + height/2 + 20, x + width/2 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 40 + 50, y + height/2 + 20, x + width/2 + 50 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 120, y + height/2 + 40, x + width/2 +\t120, y + height/2 + 50);\n\t\t\n\n g.setColor(Color.cyan);\n g.fillOval(x + width/2 - 3 + 120, y + height/2 + 17, 6, 6);\n\t\t\n\t}", "@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawString(str, 10, 10);\r\n\t\tg.drawLine(10, 20, 110, 20);\r\n\t\tg.drawRect(pX, 30, 100, 100);\r\n\t\t\r\n\t}", "public ShapeComponent drawCircle()\n\t{\n\t\tShapeComponent circleComponent = new ShapeComponent(radius*2, radius*2, \n\t\t\t\t\"circle\");\n\t\treturn circleComponent;\n\t}", "public void drawCircle(Graphics g, int x, int y, int radius)\n\t{\n\t\tg.drawOval(x - radius, y - radius, 2 * radius, 2 * radius);\n\t}", "public void setToken(char c)\n\t\t{\n\t\t\ttoken = c;\n\t\n\t\t\tif (token == 'X')\n\t\t\t{\n\t\t\t\tLine line1 = new Line(10, 10, this.getWidth() - 10, this.getHeight() - 10);\n\t\t\t\tline1.endXProperty().bind(this.widthProperty().subtract(10));\n\t\t\t\tline1.endYProperty().bind(this.heightProperty().subtract(10));\n\t\t\t\tLine line2 = new Line(10, this.getHeight() - 10, this.getWidth() - 10, 10);\n\t\t\t\tline2.startYProperty().bind(this.heightProperty().subtract(10));\n\t\t\t\tline2.endXProperty().bind(this.widthProperty().subtract(10));\n\t\n\t\t\t\t// Add the lines to the pane\n\t\t\t\tthis.getChildren().addAll(line1, line2);\n\t\t\t}\n\t\t\telse if (token == 'O') {\n\t\t\t\tEllipse ellipse = new Ellipse(this.getWidth() / 2,\n\t\t\t\t\t\tthis.getHeight() / 2, this.getWidth() / 2 - 10,\n\t\t\t\t\t\tthis.getHeight() / 2 - 10);\n\t\t\t\tellipse.centerXProperty().bind(this.widthProperty().divide(2));\n\t\t\t\tellipse.centerYProperty().bind(this.heightProperty().divide(2));\n\t\t\t\tellipse.radiusXProperty().bind(this.widthProperty().divide(2).subtract(10));\n\t\t\t\tellipse.radiusYProperty().bind(this.heightProperty().divide(2).subtract(10));\n\t\t\t\tellipse.setStroke(Color.BLACK);\n\t\t\t\tellipse.setFill(Color.WHITE);\n\t\t\t\tgetChildren().add(ellipse); // Add the ellipse to the pane\n\t\t\t}\n\t\n\t\t}", "@Override\r\n\tpublic void render(GameContainer gc, Renderer r) {\n\t\tr.drawTextInBox(posX, posY, width, height, color1, text);\r\n\t\t//r.noiseGen();\r\n\t}", "private void drawCenter(double x, double y) {\n\t\tdouble r = findCenterRadius(x, y);\n\t\tGPoint corner = findCenterCorner(r, x ,y);\n\t\tcenterCircle = new GOval(2*r,2*r);\n\t\tadd(centerCircle, corner);\n\t\t//GPoint center = new GPoint(corner.getX() - r, corner.getY() - r );\n\t}", "void drawGraphic(Component c, Graphics2D g, int x, int y)\n {\n mRawIcon.paintIcon(c, g, x, y);\n }", "private void paintPoint(int x, int y, Color c) {\n\t\traster.setDataElements(x, y, model.getDataElements(c.getRGB(), null));\t\t\n\t}", "private void subDraw(Graphics2D g, Body myBody, Color c)\r\n\t{\r\n\t\tg.setColor(c);\r\n\r\n\t\t//This drawing code inspired by drawBody() method in net.phys2d.raw.test.AbstractDemo\r\n\t\t//by Kevin Glass, 2006\r\n\t\t//Source: http://www.cokeandcode.com/phys2d/source/builds/src060408.zip\r\n\t\tif (myBody.getShape() instanceof Box)\r\n\t\t{\r\n\t\t\tVector2f[] pts = ((Box)myBody.getShape()).getPoints(myBody.getPosition(), myBody.getRotation());\r\n\t\t\tg.drawLine((int) pts[0].x,(int) pts[0].y,(int) pts[1].x,(int) pts[1].y);\r\n\t\t\tg.drawLine((int) pts[1].x,(int) pts[1].y,(int) pts[2].x,(int) pts[2].y);\r\n\t\t\tg.drawLine((int) pts[2].x,(int) pts[2].y,(int) pts[3].x,(int) pts[3].y);\r\n\t\t\tg.drawLine((int) pts[3].x,(int) pts[3].y,(int) pts[0].x,(int) pts[0].y);\r\n\t\t}\r\n\t\tif (myBody.getShape() instanceof Circle)\r\n\t\t{\r\n\t\t\tCircle myCircle;\r\n\t\t\tmyCircle = (Circle)myBody.getShape();\r\n\t\t\tg.drawOval((int)myBody.getPosition().getX()-(int)myCircle.getRadius(), (int)myBody.getPosition().getY()-(int)myCircle.getRadius(), \r\n\t\t\t\t\t(int)myCircle.getRadius()*2, (int)myCircle.getRadius()*2);\r\n\t\t}\r\n\t}", "public void paintIcon(Component c, Graphics g, int x, int y)\n\t{\n\t\tGraphics2D g2 = (Graphics2D) g;\n\t\tshape.draw(g2);\n\t}", "@Override\n public void draw(){\n ellipse(mouseX, mouseY, 50, 50);\n }", "@Override\n public void display(GLAutoDrawable drawable) {\n GL2 gl = drawable.getGL().getGL2();\n gl.glClear(GL2.GL_COLOR_BUFFER_BIT);\n\n DrawCircle(gl, 50, 50, 400);\n \n }", "protected void paintComponent(Graphics g){\n g.drawOval(110,110,50,50);\n }", "public void drawSpaceObject(CTS_SpaceObject obj, double radius, Color color) {\n\t\tdouble[] result = getPositionOfSpaceObject(obj);\n\t\tif (result == null) {\n\t\t\t//System.err.println(\"getPostionOfSpaceObject returned null!\");\n\t\t\tthrow new IllegalArgumentException(\"Something went wrong\");\n\t\t}\n\t\tdrawCircle(radius, result[0], result[1], color);\n\t}", "public void draw(Graphics g){\n\n g.setColor(Color.red);\n g.drawLine(x1,y1,x2,y2);\n g.drawLine(x2,y2,x3,y3);\n g.drawLine(x3,y3,x1,y1);\n g.setFont(new Font(\"Courier\", Font.BOLD, 12));\n DecimalFormat fmt = new DecimalFormat(\"0.##\"); \n g.setColor(Color.blue);\n g.drawString(fmt.format(perimeter()) + \" \" + name,x1+2 , y1 -2);\n \n }", "public static void showCircle(DrawingPanel panel, int i, boolean integrity) {\n pen.fillOval(xTopLeft[i],yTopLeft[i],shapeSize[i],shapeSize[i]);\n\n if (integrity){// If the boolean parameter is true, it then changes the color to BLACK\n pen.setColor(Color.BLACK);\n }\n\n pen.drawOval(xTopLeft[i],yTopLeft[i],shapeSize[i],shapeSize[i]);//drawing the shape's border with the same xPos, yPos, size, and size.\n }", "public void drawRect(int x, int y, int width, int height, int color);", "public void drawSpaceObject(CTS_SpaceObject obj, int radius, Color color) {\n\t\tdouble[] result = getPositionOfSpaceObject(obj);\n\t\tif (result == null) {\n\t\t\t//System.err.println(\"getPostionOfSpaceObject returned null!\");\n\t\t\tthrow new IllegalArgumentException(\"Something went wrong\");\n\t\t}\n\t\tdrawCircle(radius, (int) result[0], (int) result[1], color);\n\t}", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }", "private void drawBox(Graphics window, int hsBtoRGB, int x, int y) {\n\t\t\n\t}", "@Override\n\tpublic void paintComponent(java.awt.Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg.setColor(java.awt.Color.green);\n\t\tg.fillOval(x, y, 50, 50);\n\t\tg.setColor(java.awt.Color.black);\n\t\tg.drawOval(x, y, 50, 50);\n\t}", "public void draw(Graphics g, int scale, int offset) {\n\t\tColor tColor;\n\t\ttColor = g.getColor(); // save exisiting color\n\t\tg.setColor(color);\n Point translated = translateToAWT(point);\n if (fill == ShapeAttribute.SOLID && shape == ShapeAttribute.BOX)\n\t\t g.fillRect( offset + translated.x * scale - radius, \n offset + translated.y * scale - radius, \n scale * 2 * radius, scale * 2 * radius);\n else if (fill == ShapeAttribute.SOLID && shape == ShapeAttribute.OVAL)\n g.fillOval( offset + translated.x * scale - radius, \n offset + translated.y * scale - radius, \n scale * 2 * radius, scale * 2 * radius);\n else if (fill == ShapeAttribute.WIRE && shape == ShapeAttribute.BOX)\n \t\t g.fillRect( offset + translated.x * scale - radius, \n offset + translated.y * scale - radius, \n scale * 2 * radius, scale * 2 * radius); \n else if (fill == ShapeAttribute.WIRE && shape == ShapeAttribute.OVAL)\n g.fillOval( offset + translated.x * scale - radius, \n offset + translated.y * scale - radius, \n scale * 2 * radius, scale * 2 * radius); \n else // shape == dot\n g.drawLine( offset + translated.x * scale, \n offset + translated.y * scale, \n offset + translated.x * scale, \n offset + translated.y * scale);\n\t\tg.setColor(Color.black); // set label color\n if (drawLabel) g.drawString(label, offset + translated.x * scale + radius, \n offset + translated.y * scale - radius);\n g.setColor(tColor); // restore existing color\n\t\t}", "public void drawFrame(int x, int y, String s, boolean k) {\n if (!k) {\n Font font1 = new Font(\"Monaco\", Font.BOLD, 15);\n StdDraw.setPenColor(StdDraw.WHITE);\n StdDraw.setFont(font1);\n int centX = x;\n int centY = y;\n StdDraw.text(centX, centY, s);\n StdDraw.show();\n } else {\n StdDraw.clear(Color.BLACK);\n StdDraw.show();\n drawFrame(x, y, s, false);\n\n }\n }", "public void paintComponent(Graphics g) {\n \n g.setColor(Color.yellow);\n g.fillRect(0, 0, 150, 250);\n\n //rondeur des couleurs (taille et position)\n \n g.setColor(rouge);\n g.fillOval(50, 30, 50, 50);\n \n g.setColor(jaune);\n g.fillOval(50, 100, 50, 50);\n \n g.setColor(vert);\n g.fillOval(50, 170, 50, 50); \n }", "public void drawWrapped(String str, double x, double y, double size, int color, double limit) {\n double scale = size / mcFont().FONT_HEIGHT;\n FontRenderer font = mcFont();\n List<String> list = split(str, limit * font.FONT_HEIGHT / size);\n //System.out.println(\"---{\" + list.size());\n for(String s : list) {\n //System.out.println(str);\n draw(s, x, y, size, color);\n y += size;\n } \n //System.out.println(\"---}\");\n }", "private void newCircle()\n {\n setMinimumSize(null);\n\n //Generate a new circle\n panel.generateNewCircle();\n\n //Calculate the circle properties and setup the text area with their values\n generateTextArea();\n\n //Repack the frame to fit everything perfectly\n pack();\n\n setMinimumSize(getSize());\n }", "public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }", "public void print(char c) {\n\n if(c == '\\n') {\n x = 0;\n if(++y >= ROWS)\n y = 0;\n return;\n } else if(c == '\\t') {\n print(' ');\n print(' ');\n print(' ');\n print(' ');\n return;\n }\n\n int value = calculateMemValue(c);\n content[y][x] = value;\n\n if(focused == this) {\n int index = (y * Terminal.COLS) + x;\n if(0 <= index && index < (COLS * ROWS))\n mem.screen[index] = (short) value;\n }\n\n if(++x >= COLS) {\n x = 0;\n if(++y >= ROWS)\n y = 0;\n }\n }", "public void displayIcon(Graphics g, int xPos, int yPos){\n\t\t\n\t}", "public void displayOilIcon(Graphics g, int xPos, int yPos){\n\t\t\n\t}", "void render(GraphicsContext gc, double xOffSet, double yOffSet);", "public void draw(){\n if (! this.isFinished() ){\n UI.setColor(this.color);\n double left = this.xPos-this.radius;\n double top = GROUND-this.ht-this.radius;\n UI.fillOval(left, top, this.radius*2, this.radius*2);\n }\n }", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n g.setColor(Color.YELLOW);\n g.fillOval(0, 0, H-1, H-1);\n g.setColor(Color.BLACK);\n g.drawOval(0, 0, H-1, H-1);\n if (gameLost) //Frowny face\n {\n g.drawArc(H/4, 3*H/5, H/2, H/2, SMILE_START, SMILE_LENGTH);\n Font f = g.getFont();\n g.setFont(new Font(f.getName(), f.getStyle(), 2*f.getSize()/3));\n g.drawString(\"x\", H/4 - 1, H/4 + DEAD_EYE_SIZE);\n g.drawString(\"x\", 3*H/4 - DEAD_EYE_SIZE + 1, H/4 + DEAD_EYE_SIZE);\n g.setFont(f);\n }\n else //Smiley face\n {\n g.drawArc(H/4, H/4, H/2, H/2, -SMILE_START, -SMILE_LENGTH);\n if (gameWon) //with sunglasses\n {\n g.fillOval(H/4 - 1, H/4, GLASSES_WIDTH, GLASSES_HEIGHT);\n g.fillOval(3*H/4 - GLASSES_WIDTH + 1, H/4, GLASSES_WIDTH, GLASSES_HEIGHT);\n g.drawLine(H/4 - 1, H/4 + GLASSES_HEIGHT/2, 1, H/4);\n g.drawLine(3*H/4 + 1, H/4 + GLASSES_HEIGHT/2, H-2, H/4);\n }\n else //without sunglasses\n {\n g.fillOval(H/4, H/4, EYE_SIZE, EYE_SIZE);\n g.fillOval(3*H/4 - EYE_SIZE, H/4, EYE_SIZE, EYE_SIZE);\n }\n }\n }", "public void drawOn(DrawSurface d) {\r\n d.setColor(Color.decode(\"#00B5DC\"));\r\n d.fillRectangle(0, 0, d.getWidth(), d.getHeight());\r\n\r\n d.setColor(Color.white);\r\n for (int i = 0; i < 10; i++) {\r\n d.drawLine(160 + i * 10, 390, 130 + i * 10, d.getHeight());\r\n }\r\n for (int i = 0; i < 10; i++) {\r\n d.drawLine(560 + i * 10, 440, 520 + i * 10, d.getHeight());\r\n }\r\n d.setColor(Color.decode(\"#B8BDBC\"));\r\n d.fillCircle(150, 390, 25);\r\n d.setColor(Color.decode(\"#B3B8B7\"));\r\n d.fillCircle(170, 420, 30);\r\n d.setColor(Color.decode(\"#ACB1B0\"));\r\n d.fillCircle(200, 390, 30);\r\n d.setColor(Color.decode(\"#A4A9A8\"));\r\n d.fillCircle(210, 420, 25);\r\n d.setColor(Color.decode(\"#9BA09F\"));\r\n d.fillCircle(240, 405, 30);\r\n\r\n d.setColor(Color.decode(\"#B8BDBC\"));\r\n d.fillCircle(550, 440, 25);\r\n d.setColor(Color.decode(\"#B3B8B7\"));\r\n d.fillCircle(570, 470, 30);\r\n d.setColor(Color.decode(\"#ACB1B0\"));\r\n d.fillCircle(600, 440, 30);\r\n d.setColor(Color.decode(\"#A4A9A8\"));\r\n d.fillCircle(610, 470, 25);\r\n d.setColor(Color.decode(\"#9BA09F\"));\r\n d.fillCircle(640, 455, 30);\r\n }" ]
[ "0.73587143", "0.69951046", "0.67054987", "0.6659661", "0.65373063", "0.6489175", "0.64142966", "0.6410703", "0.63716805", "0.636548", "0.63316584", "0.63271207", "0.6266546", "0.6263887", "0.6262257", "0.62519336", "0.6239599", "0.6236449", "0.6230056", "0.62215894", "0.6218275", "0.6214724", "0.6207576", "0.62014997", "0.61978096", "0.61638993", "0.615508", "0.61500984", "0.6127316", "0.61076844", "0.6089207", "0.60847235", "0.60774535", "0.6063584", "0.6059015", "0.60348606", "0.603377", "0.6025638", "0.6012358", "0.59895873", "0.5989392", "0.5986771", "0.59797525", "0.5978509", "0.5978473", "0.59719807", "0.5958822", "0.5951668", "0.593931", "0.59344673", "0.5929058", "0.59224176", "0.5906535", "0.59049225", "0.5899117", "0.5883843", "0.58826864", "0.5880854", "0.5880781", "0.58749807", "0.5874571", "0.5871499", "0.58643425", "0.58621466", "0.5847591", "0.5833097", "0.58230764", "0.582155", "0.58191425", "0.58186966", "0.5817318", "0.58153266", "0.58054245", "0.5796445", "0.57876056", "0.57860875", "0.57844985", "0.57753974", "0.57717144", "0.5769028", "0.5767558", "0.5764971", "0.575382", "0.57516015", "0.5744647", "0.5740053", "0.5724637", "0.5722539", "0.5721295", "0.57122725", "0.5711821", "0.57117486", "0.5705279", "0.5705198", "0.56983566", "0.5697601", "0.56964445", "0.5696175", "0.56923604", "0.56897515" ]
0.65365076
5
fill 360 degree arc
public void showItem2(int x, int y, int size, char col) { gc.setFill(colFromChar(col)); // set the fill colour gc.fillArc(x - size, y - size, size * 2, size * 2, 0, 180, ArcType.CHORD); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillArc(float x, float y, float radius, float startAngle, float endAngle);", "public void strokeArc(float x, float y, float radius, float startAngle, float endAngle);", "public void paint (Graphics g) {\n g.fillArc (20, 30, 150, 130, 240, 90);\n }", "public ResetArc(){}", "private void arc(int centerX, int centerY, float angle) {\n tail(centerX, centerY, getSize() - (MARGIN / 2), getSize() - (MARGIN / 2), angle);\n }", "void resetAngle();", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n float width = (float) getWidth();\n float height = (float) getHeight();\n float radius;\n\n if (width > height) {\n radius = height / 4;\n } else {\n radius = width / 2.1f;\n }\n\n\n Path path = new Path();\n path.addCircle(width ,\n height , radius,\n Path.Direction.CW);\n\n Paint paint = new Paint();\n paint.setColor(getResources().getColor(R.color.colorPrimary));\n new Color();\n paint.setStrokeWidth(10);\n paint.setAlpha(200);\n paint.setStyle(Paint.Style.FILL);\n\n Paint alphaPaint = new Paint();\n //alphaPaint.setColor(Color.BLUE);\n alphaPaint.setStrokeWidth(10);\n alphaPaint.setAlpha(200);\n alphaPaint.setStyle(Paint.Style.FILL);\n //alphaPaint.setStyle(Paint.Style.STROKE);\n alphaPaint.setShader(new LinearGradient(0, 0, 0, getHeight() ,\n Color.parseColor(\"#00000000\"), getResources().getColor(R.color.colorPrimary) , Shader.TileMode.MIRROR));\n\n\n\n float center_x, center_y;\n final RectF oval = new RectF();\n paint.setStyle(Paint.Style.STROKE);\n alphaPaint.setStyle(Paint.Style.STROKE);\n\n center_x = width / 2;\n center_y = height / 2;\n\n //Shader gradient = new SweepGradient(center_x,center_y, Color.WHITE, Color.parseColor(\"#00000000\"));\n //alphaPaint.setShader(gradient);\n\n oval.set(center_x - radius,\n center_y - radius,\n center_x + radius,\n center_y + radius);\n\n canvas.drawArc(oval, 0, 90, false, alphaPaint);\n canvas.drawArc(oval, 90, 180, false, paint);\n\n\n float percent = 50;\n float arcRadius = 360;\n float angle = arcRadius * (percent/100);\n double startX = Math.cos(Math.toRadians(270)) * radius + center_x;\n double startY = Math.sin(Math.toRadians(270)) * radius + center_y;\n double endX = Math.cos(Math.toRadians(270 + angle)) * radius + center_x;\n double endY = Math.sin(Math.toRadians(270 + angle)) * radius + center_y;\n\n Paint paint2 = new Paint();\n paint2.setColor(Color.YELLOW);\n paint2.setStrokeWidth(5);\n paint2.setStyle(Paint.Style.FILL);\n\n canvas.drawCircle((float)startX, (float)startY, 7, paint2);\n //canvas.drawCircle((float)endX, (float)endY, 5, paint2);\n\n\n }", "public void calling() {\n\t\tCircle tc = new Circle(new Coordinate(-73, 42), 0);\n\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n\t\t\tPaintShapes.paint.addCircle(tc);\n\t\t\tPaintShapes.paint.myRepaint();\n\t\t}\n\t\t\n//\t\tMap<Double, Coordinate>angle_coordinate=new HashMap<Double, Coordinate>();\n//\t\tLinkedList<double[]>coverangle=new LinkedList<double[]>();\n//\t\tMap<Double[], Coordinate[]>uncoverArc=new HashMap<Double[], Coordinate[]>();\n//\t\tdouble a1[]=new double[2];\n//\t\ta1[0]=80;\n//\t\ta1[1]=100;\n//\t\tangle_coordinate.put(a1[0], new Coordinate(1, 0));\n//\t\tangle_coordinate.put(a1[1], new Coordinate(0, 1));\n//\t\tcoverangle.add(a1);\n//\t\tdouble a2[]=new double[2];\n//\t\ta2[0]=0;\n//\t\ta2[1]=30;\n//\t\tangle_coordinate.put(a2[0], new Coordinate(2, 0));\n//\t\tangle_coordinate.put(a2[1], new Coordinate(0, 2));\n//\t\tcoverangle.add(a2);\n//\t\tdouble a3[]=new double[2];\n//\t\ta3[0]=330;\n//\t\ta3[1]=360;\n//\t\tangle_coordinate.put(a3[0], new Coordinate(3, 0));\n//\t\tangle_coordinate.put(a3[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a3);\n//\t\tdouble a4[]=new double[2];\n//\t\ta4[0]=20;\n//\t\ta4[1]=90;\n//\t\tangle_coordinate.put(a4[0], new Coordinate(4, 0));\n//\t\tangle_coordinate.put(a4[1], new Coordinate(0, 4));\n//\t\tcoverangle.add(a4);\n//\t\tdouble a5[]=new double[2];\n//\t\ta5[0]=180;\n//\t\ta5[1]=240;\n//\t\tangle_coordinate.put(a5[0], new Coordinate(5, 0));\n//\t\tangle_coordinate.put(a5[1], new Coordinate(0, 5));\n//\t\tcoverangle.add(a5);\n//\t\tdouble a6[]=new double[2];\n//\t\ta6[0]=270;\n//\t\ta6[1]=300;\n//\t\tangle_coordinate.put(a6[0], new Coordinate(6, 0));\n//\t\tangle_coordinate.put(a6[1], new Coordinate(0, 6));\n//\t\tcoverangle.add(a6);\n//\t\tdouble a7[]=new double[2];\n//\t\ta7[0]=360;\n//\t\ta7[1]=360;\n//\t\tangle_coordinate.put(a7[0], new Coordinate(7, 7));\n//\t\tangle_coordinate.put(a7[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a7);\n//\t\t// sort the cover arc\n//\t\tint minindex = 0;\n//\t\tfor (int j = 0; j < coverangle.size() - 1; j++) {\n//\t\t\tminindex = j;\n//\t\t\tfor (int k = j + 1; k < coverangle.size(); k++) {\n//\t\t\t\tif (coverangle.get(minindex)[0] > coverangle.get(k)[0]) {\n//\t\t\t\t\tminindex = k;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tdouble tem[] = new double[2];\n//\t\t\ttem = coverangle.get(j);\n//\t\t\tcoverangle.set(j, coverangle.get(minindex));\n//\t\t\tcoverangle.set(minindex, tem);\n//\t\t}\n//\t\tfor(int ii=0;ii<coverangle.size();ii++){\n//\t\t\tdouble aa[]=coverangle.get(ii);\n//\t\t\tSystem.out.println(aa[0]+\" \"+aa[1]);\n//\t\t}\n//\t\tSystem.out.println(\"----------------------------\");\n//\t\t// find the uncover arc\n//\t\tint startposition = 0;\n//\t\twhile (startposition < coverangle.size() - 1) {\n//\t\t\tdouble coverArc[] = coverangle.get(startposition);\n//\t\t\tboolean stop = false;\n//\t\t\tint m = 0;\n//\t\t\tfor (m = startposition + 1; m < coverangle.size() && !stop; m++) {\n//\t\t\t\tdouble bb[] = coverangle.get(m);\n//\t\t\t\tif (bb[0] <= coverArc[1]) {\n//\t\t\t\t\tcoverArc[0] = Math.min(coverArc[0], bb[0]);\n//\t\t\t\t\tcoverArc[1] = Math.max(coverArc[1], bb[1]);\n//\t\t\t\t} else {\n//\t\t\t\t\tCoordinate uncover[]=new Coordinate[2];\n//\t\t\t\t\t//record the consistant uncover angle\n//\t\t\t\t\tDouble[] uncoverA=new Double[2];\n//\t\t\t\t\tuncoverA[0]=coverArc[1];\n//\t\t\t\t\tuncoverA[1]=bb[0];\n//\t\t\t\t\tIterator<Map.Entry<Double, Coordinate>> entries = angle_coordinate\n//\t\t\t\t\t\t\t.entrySet().iterator();\n//\t\t\t\t\twhile (entries.hasNext()) {\n//\t\t\t\t\t\tMap.Entry<Double, Coordinate> entry = entries.next();\n//\t\t\t\t\t\tif (entry.getKey() == coverArc[1])\n//\t\t\t\t\t\t\tuncover[0] = entry.getValue();\n//\t\t\t\t\t\telse if (entry.getKey() == bb[0])\n//\t\t\t\t\t\t\tuncover[1] = entry.getValue();\n//\t\t\t\t\t}\n//\t\t\t\t\tuncoverArc.put(uncoverA, uncover);\n//\t\t\t\t\tstartposition = m;\n//\t\t\t\t\tstop = true;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tif(m==coverangle.size()){\n//\t\t\t\tstartposition=m;\n//\t\t\t}\n//\t\t}\n//\t\n//\t\tSystem.out.println(uncoverArc.entrySet().size());\n//\t\tint n=uncoverArc.entrySet().size();\n//\t\tint k=2;\n//\t\twhile(n>0){\n//\t\t\tIterator<Map.Entry<Double[],Coordinate[]>>it=uncoverArc.entrySet().iterator();\n//\t\t\tMap.Entry<Double[], Coordinate[]>newneighbor=it.next();\n//\t\t\tSystem.out.println(newneighbor.getKey()[0]+\" \"+newneighbor.getValue()[0]);\n//\t\t\tSystem.out.println(newneighbor.getKey()[1]+\" \"+newneighbor.getValue()[1]);\n//\t\t uncoverArc.remove(newneighbor.getKey());\n//\t\t \n//\t\tif(k==2){\n//\t\tDouble[] a8=new Double[2];\n//\t\ta8[0]=(double)450;\n//\t\ta8[1]=(double)500;\n//\t\tCoordinate a9[]=new Coordinate[2];\n//\t\ta9[0]=new Coordinate(9, 0);\n//\t\ta9[1]=new Coordinate(0, 9);\n//\t\tuncoverArc.put(a8, a9);\n//\t\tk++;\n//\t\t}\n//\t\tn=uncoverArc.entrySet().size();\n//\t\tSystem.out.println(\"new size=\"+uncoverArc.entrySet().size());\n//\t\t}\n//\t\t\t\n\t\t\t\n\t\t\n\t\t/***************new test*************************************/\n//\t\tCoordinate startPoint=new Coordinate(500, 500);\n//\t\tLinkedList<VQP>visitedcircle_Queue=new LinkedList<VQP>();\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 500), 45));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(589, 540), 67));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 550), 95));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(439, 560), 124));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(460, 478), 69));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(580, 580), 70));\n//\t\tIterator<VQP>testiterator=visitedcircle_Queue.iterator();\n//\t\twhile(testiterator.hasNext()){\n//\t\t\tVQP m1=testiterator.next();\n//\t\t\tCircle tm=new Circle(m1.getCoordinate(), m1.getRadius());\n//\t\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n//\t\t\t\tPaintShapes.paint.addCircle(tm);\n//\t\t\t\tPaintShapes.paint.myRepaint();\n//\t\t\t}\n//\t\t\t\n//\t\t}\n//\t\tdouble coverradius=calculateIncircle(startPoint, visitedcircle_Queue);\n//\t\tCircle incircle=new Circle(startPoint, coverradius);\n//\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\tPaintShapes.paint.color = PaintShapes.paint.blueTranslucence;\n//\t\t\tPaintShapes.paint.addCircle(incircle);\n//\t\t\tPaintShapes.paint.myRepaint();\n//\t\t}\n//\t\t/***************end test*************************************/\n\t\tEnvelope envelope = new Envelope(-79.76259, -71.777491,\n\t\t\t\t40.477399, 45.015865);\n\t\tdouble area=envelope.getArea();\n\t\tdouble density=57584/area;\n\t\tSystem.out.println(\"density=\"+density);\n\t\tSystem.out.println(\"end calling!\");\n\t}", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n for (int i = 0; i < value_degree.length; i++) {//values2.length; i++) {\n if (i == 0) {\n paint.setColor(COLORS[i]);\n canvas.drawArc(rectf, 0, value_degree[i], true, paint);\n \n } \n else\n {\n temp += value_degree[i - 1];\n paint.setColor(COLORS[i]);\n canvas.drawArc(rectf, temp, value_degree[i], true, paint);\n Log.i(\"sum\"+(temp+value_degree[i]), temp+\" : \"+value_degree[i]);\n\n }\n }\n }", "Angle createAngle();", "private void drawRoundHead(Canvas canvas, int centerX, int centerY, float degree, int radius, int color){\n double radian = degree * Math.PI / 180;\n double drawX = centerX + Math.cos(radian) * DOWNLOAD_ARC_DRAW_R;\n double drawY = centerY + Math.sin(radian) * DOWNLOAD_ARC_DRAW_R;\n Paint paint = new Paint();\n paint.setColor(color);\n paint.setAntiAlias(true);\n canvas.drawCircle((float)drawX, (float)drawY, radius, paint);\n }", "@Override\n public void fillRoundRectangle(Rectangle rect, int arcWidth, int arcHeight) {\n RoundRectangle2D roundRect = new RoundRectangle2D.Float(rect.x + transX, rect.y + transY, rect.width - 1, rect.height - 1, arcWidth,\n arcHeight);\n\n checkState();\n getGraphics2D().setPaint(getColor(getSWTGraphics().getBackgroundColor()));\n getGraphics2D().fill(roundRect);\n }", "public void fillCircle(int x, int y, int radius, int color){\n int f = 1 - radius;\n int ddF_x = 1;\n int ddF_y = -2 * radius;\n int px = 0;\n int py = radius;\n\n hline(x, x, y + radius, color);\n hline(x, x, y - radius, color);\n hline(x - radius, x + radius, y, color);\n\n while(px < py){\n if(f >= 0){\n py--;\n ddF_y += 2;\n f += ddF_y;\n }\n px++;\n ddF_x += 2;\n f += ddF_x;\n hline(x - px, x + px, y + py, color);\n hline(x - px, x + px, y - py, color);\n hline(x - py, x + py, y + px, color);\n hline(x - py, x + py, y - px, color);\n }\n }", "public void setCenterCircleFill(){\n if(solvable){\n solvableCircle.setFill(Color.GREEN);\n }\n else{\n solvableCircle.setFill(Color.RED);\n }\n }", "private void m217f() {\n RectF rectF = new RectF(-this.f407h, -this.f407h, this.f407h, this.f407h);\n RectF rectF2 = new RectF(rectF);\n rectF2.inset(-this.f411l, -this.f411l);\n if (this.f408i == null) {\n this.f408i = new Path();\n } else {\n this.f408i.reset();\n }\n this.f408i.setFillType(FillType.EVEN_ODD);\n this.f408i.moveTo(-this.f407h, 0.0f);\n this.f408i.rLineTo(-this.f411l, 0.0f);\n this.f408i.arcTo(rectF2, 180.0f, 90.0f, false);\n this.f408i.arcTo(rectF, 270.0f, -90.0f, false);\n this.f408i.close();\n float f = this.f407h / (this.f407h + this.f411l);\n Paint paint = this.f404e;\n RadialGradient radialGradient = new RadialGradient(0.0f, 0.0f, this.f407h + this.f411l, new int[]{this.f414o, this.f414o, this.f415p}, new float[]{0.0f, f, 1.0f}, TileMode.CLAMP);\n paint.setShader(radialGradient);\n Paint paint2 = this.f405f;\n LinearGradient linearGradient = new LinearGradient(0.0f, (-this.f407h) + this.f411l, 0.0f, (-this.f407h) - this.f411l, new int[]{this.f414o, this.f414o, this.f415p}, new float[]{0.0f, 0.5f, 1.0f}, TileMode.CLAMP);\n paint2.setShader(linearGradient);\n this.f405f.setAntiAlias(false);\n }", "public PXRadialGradient() {\n center = new PointF();\n }", "void increaseAngle() {\n this.strokeAngle += 3;\n this.updateAcc();\n this.updateStick();\n }", "AngleSmaller createAngleSmaller();", "public void fillRoundRect(int x, int y, int width, int height, int arcWidth,\r\n\t\t\tint arcHeight)\r\n\t{\r\n\t\t// System.out.println(\"fillRoundRect\");\r\n\t}", "public void mo2186a(Canvas canvas, RectF rectF, float f, Paint paint) {\n Canvas canvas2 = canvas;\n RectF rectF2 = rectF;\n float f2 = 2.0f * f;\n float width = (rectF.width() - f2) - 1.0f;\n float height = (rectF.height() - f2) - 1.0f;\n if (f >= 1.0f) {\n float f3 = f + 0.5f;\n float f4 = -f3;\n C0315c.this.f1366a.set(f4, f4, f3, f3);\n int save = canvas.save();\n canvas2.translate(rectF2.left + f3, rectF2.top + f3);\n Paint paint2 = paint;\n canvas.drawArc(C0315c.this.f1366a, 180.0f, 90.0f, true, paint2);\n canvas2.translate(width, 0.0f);\n canvas2.rotate(90.0f);\n canvas.drawArc(C0315c.this.f1366a, 180.0f, 90.0f, true, paint2);\n canvas2.translate(height, 0.0f);\n canvas2.rotate(90.0f);\n canvas.drawArc(C0315c.this.f1366a, 180.0f, 90.0f, true, paint2);\n canvas2.translate(width, 0.0f);\n canvas2.rotate(90.0f);\n canvas.drawArc(C0315c.this.f1366a, 180.0f, 90.0f, true, paint2);\n canvas2.restoreToCount(save);\n float f5 = (rectF2.left + f3) - 1.0f;\n float f6 = rectF2.top;\n canvas.drawRect(f5, f6, (rectF2.right - f3) + 1.0f, f6 + f3, paint2);\n float f7 = (rectF2.left + f3) - 1.0f;\n float f8 = rectF2.bottom;\n canvas.drawRect(f7, f8 - f3, (rectF2.right - f3) + 1.0f, f8, paint2);\n }\n canvas.drawRect(rectF2.left, rectF2.top + f, rectF2.right, rectF2.bottom - f, paint);\n }", "private void initTrack(Canvas canvas, boolean isFilled){\n if(circleBroken){\n canvas.drawArc(mOval, 135, 270, isFilled, progressPaint);\n }else {\n canvas.drawArc(mOval, 90, 360, isFilled, progressPaint);\n }\n }", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tswitch(this.getAngle()){\r\n\t\tcase 0 :\r\n\t\t\tg.fillRect(this.getX()+(this.getTaille()/4), this.getY(), this.getTaille()/2, this.getTaille());\r\n\t\t\tbreak;\r\n\t\tcase 90:\r\n\t\t\tg.fillRect(this.getX(), this.getY()+(this.getTaille()/4), this.getTaille(), this.getTaille()/2);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private static void arcTo(\n float rx, float ry, float rotation, boolean outer, boolean clockwise, float x, float y) {\n float tX = mPenX;\n float tY = mPenY;\n\n ry = Math.abs(ry == 0 ? (rx == 0 ? (y - tY) : rx) : ry);\n rx = Math.abs(rx == 0 ? (x - tX) : rx);\n\n if (rx == 0 || ry == 0 || (x == tX && y == tY)) {\n lineTo(x, y);\n return;\n }\n\n float rad = (float) Math.toRadians(rotation);\n float cos = (float) Math.cos(rad);\n float sin = (float) Math.sin(rad);\n x -= tX;\n y -= tY;\n\n // Ellipse Center\n float cx = cos * x / 2 + sin * y / 2;\n float cy = -sin * x / 2 + cos * y / 2;\n float rxry = rx * rx * ry * ry;\n float rycx = ry * ry * cx * cx;\n float rxcy = rx * rx * cy * cy;\n float a = rxry - rxcy - rycx;\n\n if (a < 0) {\n a = (float) Math.sqrt(1 - a / rxry);\n rx *= a;\n ry *= a;\n cx = x / 2;\n cy = y / 2;\n } else {\n a = (float) Math.sqrt(a / (rxcy + rycx));\n\n if (outer == clockwise) {\n a = -a;\n }\n float cxd = -a * cy * rx / ry;\n float cyd = a * cx * ry / rx;\n cx = cos * cxd - sin * cyd + x / 2;\n cy = sin * cxd + cos * cyd + y / 2;\n }\n\n // Rotation + Scale Transform\n float xx = cos / rx;\n float yx = sin / rx;\n float xy = -sin / ry;\n float yy = cos / ry;\n\n // Start and End Angle\n float sa = (float) Math.atan2(xy * -cx + yy * -cy, xx * -cx + yx * -cy);\n float ea = (float) Math.atan2(xy * (x - cx) + yy * (y - cy), xx * (x - cx) + yx * (y - cy));\n\n cx += tX;\n cy += tY;\n x += tX;\n y += tY;\n\n setPenDown();\n\n mPenX = mPivotX = x;\n mPenY = mPivotY = y;\n\n if (rx != ry || rad != 0f) {\n arcToBezier(cx, cy, rx, ry, sa, ea, clockwise, rad);\n } else {\n\n float start = (float) Math.toDegrees(sa);\n float end = (float) Math.toDegrees(ea);\n float sweep = Math.abs((start - end) % 360);\n\n if (outer) {\n if (sweep < 180) {\n sweep = 360 - sweep;\n }\n } else {\n if (sweep > 180) {\n sweep = 360 - sweep;\n }\n }\n\n if (!clockwise) {\n sweep = -sweep;\n }\n\n RectF oval =\n new RectF((cx - rx) * mScale, (cy - rx) * mScale, (cx + rx) * mScale, (cy + rx) * mScale);\n\n mPath.arcTo(oval, start, sweep);\n elements.add(\n new PathElement(\n ElementType.kCGPathElementAddCurveToPoint, new Point[] {new Point(x, y)}));\n }\n }", "@Override\n public void reAngle() {\n }", "private Group drawSemiRing() {\n Group root = new Group();\r\n\r\n List<CaseWheel> arcs = new ArrayList<>();\r\n double rayon = 100;\r\n double nbAngle = (360 / 24)-1;\r\n\r\n double startAngle = 8;\r\n\r\n Polygon polygon = new Polygon();\r\n polygon.getPoints().addAll(390.0, 150.0,\r\n 420.0, 160.0,\r\n 420.0, 140.0);\r\n\r\n int cpt=0;\r\n for(int i = 0; i <24; i++){\r\n CaseWheel c = new CaseWheel(cpt,300,150,100,startAngle,nbAngle);\r\n startAngle += nbAngle+1;\r\n c.addTo(root);\r\n arcs.add(c);\r\n cpt++;\r\n }\r\n\r\n root.getChildren().add(polygon);\r\n ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);\r\n\r\n time = System.currentTimeMillis();\r\n int nbMilliRandom = new Random().nextInt(7000 - 3000 + 1) + 3000;\r\n Runnable task1 = new Runnable() {\r\n @Override\r\n public void run() {\r\n Platform.runLater(()->{\r\n\r\n for(CaseWheel n : arcs) {\r\n n.rotateAngle(angle);\r\n if(n.isCurrent()){\r\n System.out.println(n.arc.getStartAngle()+\" \"+n.valueAngle);\r\n System.out.print(\"Case current id : \"+n.id+\"\\n\");\r\n }\r\n }\r\n if(System.currentTimeMillis()-time>nbMilliRandom){\r\n angle-=0.01;\r\n }\r\n if(angle<=0) executor.shutdownNow();\r\n });\r\n }\r\n };\r\n\r\n executor.scheduleAtFixedRate(task1, 0, 16, TimeUnit.MILLISECONDS);\r\n\r\n return root;\r\n }", "private void tail(int centerX, int centerY, int radiusX, int radiusY, float angle) {\n Arc arc = new Arc();\n arc.setFill(getColor());\n arc.setType(ArcType.ROUND);\n arc.setRadiusX(radiusX);\n arc.setRadiusY(radiusY);\n arc.setCenterX(centerX);\n arc.setCenterY(centerY);\n arc.setStartAngle(angle);\n arc.setLength(90.0F);\n add(arc);\n }", "private static void arcToBezier(\n float cx, float cy, float rx, float ry, float sa, float ea, boolean clockwise, float rad) {\n float cos = (float) Math.cos(rad);\n float sin = (float) Math.sin(rad);\n float xx = cos * rx;\n float yx = -sin * ry;\n float xy = sin * rx;\n float yy = cos * ry;\n\n // Bezier Curve Approximation\n float arc = ea - sa;\n if (arc < 0 && clockwise) {\n arc += Math.PI * 2;\n } else if (arc > 0 && !clockwise) {\n arc -= Math.PI * 2;\n }\n\n int n = (int) Math.ceil(Math.abs(round(arc / (Math.PI / 2))));\n\n float step = arc / n;\n float k = (float) ((4 / 3.0) * Math.tan(step / 4));\n\n float x = (float) Math.cos(sa);\n float y = (float) Math.sin(sa);\n\n for (int i = 0; i < n; i++) {\n float cp1x = x - k * y;\n float cp1y = y + k * x;\n\n sa += step;\n x = (float) Math.cos(sa);\n y = (float) Math.sin(sa);\n\n float cp2x = x + k * y;\n float cp2y = y - k * x;\n\n float c1x = (cx + xx * cp1x + yx * cp1y);\n float c1y = (cy + xy * cp1x + yy * cp1y);\n float c2x = (cx + xx * cp2x + yx * cp2y);\n float c2y = (cy + xy * cp2x + yy * cp2y);\n float ex = (cx + xx * x + yx * y);\n float ey = (cy + xy * x + yy * y);\n\n mPath.cubicTo(\n c1x * mScale, c1y * mScale, c2x * mScale, c2y * mScale, ex * mScale, ey * mScale);\n elements.add(\n new PathElement(\n ElementType.kCGPathElementAddCurveToPoint,\n new Point[] {new Point(c1x, c1y), new Point(c2x, c2y), new Point(ex, ey)}));\n }\n }", "public void paint(Graphics g) {\n g.setColor(Color.black);\n g.drawLine(50, 120, 300, 120);\n g.drawRect(50, 150, 250, 100 );\n g.drawRoundRect(50,275,250,100, 25, 25);\n g.setColor(Color.magenta);\n g.fillRect(350, 150, 250, 100);\n g.setColor(Color.black);\n g.drawArc(350, 150, 250, 100, 90, 360);\n g.setColor(Color.magenta);\n g.fillArc(350,275, 250, 100, 90 , 360 );\n g.setColor(Color.black);\n g.drawArc(650, 150, 250, 100, 90, 360);\n g.setColor(Color.magenta);\n g.fillArc(650,150, 250, 100, 0 , 45 );\n g.setColor(Color.black);\n g.drawArc(725, 275, 100, 100, 90, 360);\n }", "public void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n canvas.drawArc(this.f3586ds, 180.0f, this.f3587dt, false, this.f3585dr);\n }", "private void fill() {\n\t\tseries1.clear();\n\t\tint m = 50;\n\t\tdouble tmpX, tmpZ;\n\n\t\tfor (double x=-m; x <= +m; x++) {\n\t\t\ttmpX = MathUtils.sqr(x/30);\n\t\t\tfor (double z=-m; z <= +m; z++) {\n\t\t\t\ttmpZ = MathUtils.sqr(z/30);\n\t\t\t\ttmpZ = Math.sqrt(tmpX+tmpZ);\n\t\t\t\tseries1.add(x, 4*Math.cos(3*tmpZ)*Math.exp(-0.5*tmpZ), z);\n\t\t\t}\n\t\t}\n\t }", "protected void calculateTotalDegrees() {\r\n\t\tmTotalCircleDegrees = (360f - (mStartAngle - mEndAngle)) % 360f; // Length of the entire circle/arc\r\n\t\tif (mTotalCircleDegrees <= 0f) {\r\n\t\t\tmTotalCircleDegrees = 360f;\r\n\t\t}\r\n\t}", "public static Arc2D drawArc(Coordinates currentNode,Graphics2D g){\n\t\tArc2D temp= new Arc2D.Double();\n\t\ttemp.setArcByCenter(currentNode.getX()+3, currentNode.getY()-3,150 , 0, 120, Arc2D.PIE);\n\t\tColor c=new Color(1.0f,1.0f,0.0f,.3f );\n\t\tg.setColor(c);\n\t\tg.fill(temp);\n\t\treturn temp;\n\t}", "private void initProgressDrawing(Canvas canvas, boolean isFilled){\n\n if(circleBroken){\n Log.e(TAG, \"circleBroken>>>>>>\"+\"yes\" );\n canvas.drawArc(mOval, 135 + mStartProgress*2.7f, (moveProgress - mStartProgress) * 2.7f, isFilled, progressPaint);\n\n }else {\n Log.e(TAG, \"circleBroken>>>>>>\"+\"no\" );\n canvas.drawArc(mOval, 270 + mStartProgress*3.6f , (moveProgress - mStartProgress) * 3.6f, isFilled, progressPaint);\n }\n\n }", "public void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tint angleAdHoc = getAngle(model.getNumberOfAdHocCars());\n\t\tint anglePass = getAngle(model.getNumberOfPassCars());\n\t\tint angleRes = getAngle(model.getNumberOfResCars());\n\t\t\n\t\tint ADHCAR = angleAdHoc;\n\t\tint NOPASS = anglePass;\n\t\tint NORES = angleRes;\n\t\t\n\t \tg.setColor(Color.WHITE);\n\t\tg.fillArc(50, 50, 200, 200, 0, 360 );\n\t\tg.drawString(\"4. lege plekken\"+ ADHCAR , 10, 55);\n\t\tg.setColor(Color.RED);\n\t\tg.drawString(\"Auto's\"+ ADHCAR, 10, 10);\n\t\tg.fillArc(50, 50, 200, 200, 90, angleAdHoc);\n\t\tg.setColor(Color.GREEN);\n\t\tg.fillArc(50, 50, 200, 200, 90 + angleAdHoc, anglePass);\n\t\tg.drawString(\"Auto's\" + NOPASS, 10, 25);\n\t\tg.setColor(Color.BLUE);\n\t\tg.fillArc(50, 50, 200, 200, 90 + angleAdHoc + anglePass, angleRes);\n\t\tg.drawString(\"Auto's\"+ NORES, 10, 40);\n\t\tg.setColor(Color.BLACK);\n\t\tg.drawArc(50, 50, 200, 200, 90, 360 + 90);\n\t}", "public void fillCircle(Graphics g, int x, int y, int radius)\n\t{\n\t\tg.fillOval(x - radius, y - radius, 2 * radius, 2 * radius);\n\t}", "void setAngle(int id, double value);", "public void drawRadar () {\n // material red (229,28,35)\n // philo red 204,17, 17 \n stroke(229,28,35, 255-cursorRad*(255/cursorRadMax));\n if (cursorRad < cursorRadMax) {\n ellipse(mouseX, mouseY, cursorRad, cursorRad);\n }\n else if (cursorRad > (cursorRadMax + cursorThreshold)) {\n cursorRad = 5;\n }\n cursorRad = cursorRad + cursorDelta;\n noStroke();\n }", "private void drawDataPoint(Graphics g, int radius, int x, int y)\r\n/* 123: */ {\r\n/* 124: 99 */ g.fillOval(x - radius, y - radius, 2 * radius, 2 * radius);\r\n/* 125: */ }", "void setAngle(double angle);", "@Override\r\n\tpublic void perimetre(Graphics g) {\n\t\tswitch(this.getAngle()){\r\n\t\tcase 0 :\r\n\t\t\tg.drawRect(this.getX()+(this.getTaille()/4), this.getY(), this.getTaille()/2, this.getTaille());\r\n\t\t\tbreak;\r\n\t\tcase 90:\r\n\t\t\tg.drawRect(this.getX(), this.getY()+(this.getTaille()/4), this.getTaille(), this.getTaille()/2);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void pintarRines(Graphics2D pG) {\n\n\n double cos = 0.829;\n double sin = 0.559;\n int radius = DIAMETER / 2;\n int diameter1 = 2 * DIAMETER / 5;\n int diameter2 = DIAMETER / 5;\n int diameter3 = DIAMETER / 10;\n int delta0 = DIAMETER / 5;\n int delta1 = radius - diameter1 / 2;\n int delta2 = radius - diameter2 / 2;\n int delta3 = radius - diameter3 / 2;\n int d2 = (int) (diameter1 * cos / 2);\n int d1 = (int) (diameter1 * sin / 2);\n\n // Points\n int x1 = x + radius - d2; // Represents the x value in QII and QIII\n int y1 = y + radius - d1; // Represents the y value in QI and QII\n int x2 = x + radius + d2; // Represents the x value in QI and QIV\n int y2 = y + radius + d1; // Represents the y value in QIII and QIV\n int vertX = x+ radius;\n int topY = y + radius - diameter1/2;\n int bottomY = y + radius+diameter1/2;\n\n // Paints circle with diameter1\n pG.setColor(new Color(14, 14, 14));\n pG.fillOval(x + delta1, y + delta1, diameter1, diameter1);\n\n\n // Paint circle with diamater 2\n pG.setColor(Color.DARK_GRAY);\n pG.fillOval(x + delta2, y + delta2, diameter2, diameter2);\n\n\n pG.setColor(Color.DARK_GRAY);\n BasicStroke stroke = new BasicStroke(DIAMETER / 15);\n pG.setStroke(stroke);\n pG.drawLine(x1, y1, x2, y2);\n pG.drawLine(x1,y2,x2,y1);\n pG.drawLine(vertX, topY, vertX, bottomY);\n\n // Draw center donut shape\n pG.setColor(Color.GRAY);\n BasicStroke stroke1 = new BasicStroke(DIAMETER / 50);\n pG.setStroke(stroke1);\n pG.drawOval(x + delta3, y + delta3, diameter3, diameter3);\n\n\n }", "@Override\n\t\t\tpublic void draw(Canvas canvas) {\n\t\t\t\t\n\t\t\t\tfloat graphBrushWidth = (float)((90*width)/1080);\n\t\t\t\t\n\t\t\t\tbackgroundColor = basePad.getResources().getColor(R.color.TRANSPARENT);\n\t\t paint1.setColor(basePad.getResources().getColor(R.color.white));\n\t\t paint1.setAntiAlias(true); \n\t\t canvas.drawColor(backgroundColor);\n\t\t paint1.setStrokeWidth(graphBrushWidth);\n\n\t\t paint1.setStyle(Style.STROKE);\n//\t\t paint.setStyle(Paint.Style.FILL);\n\t\t \n\t\t paint2.setColor(basePad.getResources().getColor(R.color.total_ring2));\n\t\t paint2.setAntiAlias(true); \n\t\t paint2.setStrokeWidth(graphBrushWidth);\n\t\t paint2.setStyle(Style.STROKE);\n\t\t \n\t\t int[] graphX = new int[]{width/2, (width*5/32), (width*28/32)};\n\t\t int[] graphY = new int[]{(height*3/8), (height*11/16), (height*11/16)};\n\t\t int[] graphRadius = new int[]{(int)((width*6)/8), width/5, width/5};\n\t\t int[] graphContent = new int[]{usageAngle, daylyAngle, dayLeft};\n\t\t \n\t\t for (int count = 0; count < 3; count++){\n\t\t \tpaint1.setColor(basePad.getResources().getColor(R.color.white));\n\t\t \tpaint2.setColor(basePad.getResources().getColor(R.color.total_ring2));\n\t\t\t RectF oval = new RectF();\n\t\t\t oval.left = graphX[count] - (int)(graphRadius[count]/2);\n\t\t\t oval.top = graphY[count] - (int)(graphRadius[count]/2);\n\t\t\t oval.right = graphX[count] + (int)(graphRadius[count]/2);\n\t\t\t oval.bottom = graphY[count] + (int)(graphRadius[count]/2);\n\t\t\t if (count != 0){\n\t\t\t \tgraphBrushWidth = (float)((20*width)/1080);\n\t\t\t \tpaint1.setStrokeWidth(graphBrushWidth);\n\t\t\t \tpaint2.setStrokeWidth(graphBrushWidth);\n\t\t\t }\n\t\t\t if (graphContent[count] >= 360){\n\t\t\t \tpaint1.setColor(basePad.getResources().getColor(R.color.red));\n\t\t\t \tpaint2.setColor(basePad.getResources().getColor(R.color.red));\n\t\t\t }\n\t\t\t canvas.drawArc(oval, 270, graphContent[count] + 1, false, paint2);\n\t\t\t\t canvas.drawArc(oval, 270 + graphContent[count], 361 - graphContent[count], false, paint1);\n\t\t }\n\t\t\t\t\n//\t\t graphBrushWidth = (float)((3*width)/1080);\n//\t\t paint1.setStrokeWidth(graphBrushWidth);\n//\t\t canvas.drawLine(total_x, total_y, total_x + ((160*width)/1080), total_y, paint1);\n//\t\t canvas.drawLine(daily_x, daily_y, daily_x + ((160*width)/1080), daily_y, paint1);\n//\t\t canvas.drawLine(day_x, day_y, day_x + ((160*width)/1080), day_y, paint1);\n\t\t \n//\t\t int bannerY = (int)((175*width)/1080);\n//\t\t int bannerWidth = (int)((170*width)/1080);\n//\t\t bot = y + radius;\n\t\t \n//\t\t Paint coverPaint = new Paint();\n//\t\t coverPaint.setColor(basePad.getResources().getColor(R.color.white));\n//\t\t coverPaint.setAntiAlias(true); \n//\t\t coverPaint.setStrokeWidth((float) 5.0);\n//\t\t coverPaint.setStyle(Style.STROKE);\n//\t\t coverPaint.setStyle(Paint.Style.FILL);\n//\t\t \n//\t\t RectF coverOval = new RectF();\n//\t\t coverOval.left = x + 100;\n//\t\t coverOval.top = y + 100;\n//\t\t coverOval.right = x + 800;\n//\t\t coverOval.bottom = bot - 100;\n//\t\t canvas.drawArc(coverOval, 0, 360, true, coverPaint);\n\t\t\t}", "public abstract void drawFill();", "public void fillCircle(int RGB, int startX, int startY, int radius) {\n\t\t// Kinda slow\n\t\tfor (int r = 0; r <= radius; r += 2) {\n\t\t\tdrawCircle(RGB, startX + (r / 2), startY + (r / 2), radius - r);\n\t\t}\n\t}", "protected void paintClock(){\n\t\tdouble clockRadius = Math.min(width, height) * 0.8 * 0.5;\n\t\tdouble centerX = width / 2;\n\t\tdouble centerY = height / 2;\n\t\t//Draw circle \n\t\tCircle circle = new Circle(centerX, centerY, clockRadius);\n\t\tcircle.setFill(Color.WHITE);\n\t\tcircle.setStroke(Color.BLACK);\n\t\t\n\t\tText t1 = new Text(centerX - 5, centerY - clockRadius + 12, \"12\");\n\t\t\n\t}", "protected void renderFilledCircle(Graphics g, int x, int y, int diameter)\n {\n\tx -= diameter/2;\n\ty -= diameter/2;\n\t\n\tg.fillOval(x,y,diameter,diameter);\n\tig.fillOval(x,y,diameter,diameter);\n }", "public Circle(double r)\n {\n setRad(r);\n\n }", "void fill(int rgb);", "public void drawArcs(Graphics2D g) {\n\n\t\tStroke oldStroke = g.getStroke();\n\t\tGraphicsContext gc = new GraphicsContext();\n\t\tgc.setForegroundColor(arcColor);\n\t\tgc.setStroke(new BasicStroke(4));\n\n\t\tfor (int j = 0; j < face.edges().size(); j++) {\n\n\t\t\tDCEL_Edge edge = (DCEL_Edge) face.edges().get(j);\n\t\t\tif (edge.reference instanceof Arc2_Sweep) {\n\t\t\t\tArc2_Sweep arc = (Arc2_Sweep) edge.reference;\n\t\t\t\tarc.draw(g, gc);\n\t\t\t} else if (edge.reference instanceof Circle2) {\n\t\t\t\tCircle2 circle = (Circle2) edge.reference;\n\t\t\t\tcircle.draw(g, gc);\n\t\t\t}\n\t\t}\n\n\t\tg.setStroke(oldStroke);\n\t}", "public void setAngle( double a ) { angle = a; }", "@Override\n\t\t\tpublic void drawExtra(Canvas canvas) {\n\t\t\t\tint radius = circleView.getRadius();\n\t\t\t\tfloat strokeWidth = radius/10;\n\t\t\t\toval.left = strokeWidth/2;\n\t\t\t\toval.right = radius*2 - strokeWidth/2;\n\t\t\t\toval.top = strokeWidth/2;\n\t\t\t\toval.bottom = radius*2 - strokeWidth/2;\n\t\t\t\tfloat angle = batteryLevel*360/100;\n\t\t\t\tpaint.setAntiAlias(true);\n\t\t\t\tpaint.setColor(Color.argb(0xee, 0xff, 0x99, 0x22));\n\t\t\t\tpaint.setStyle(Paint.Style.STROKE);\n\t\t\t\tpaint.setStrokeWidth(strokeWidth);\n\t\t\t\tcanvas.drawArc(oval, 0, angle, false, paint);\n\t\t\t}", "public Circle(double radius, String color, boolean filled){\n super(color, filled);\n this.radius = radius;\n }", "public CircularGameObject(GameObject parent, double radius, double[] fillColour, double[] lineColour) {\n super(parent);\n\n setRadius(radius);\n setFillColour(fillColour);\n setLineColour(lineColour);\n }", "public void arcDrive (double inches, float degreesToTurn, double basePower, boolean clockwise, double p_coeff) throws InterruptedException {\n\n int target = (int) (inches * ticksPerInch);\n double correction;\n double leftPower = basePower;\n double rightPower = basePower;\n double max;\n int lastEncoder;\n int currentEncoder = 0;\n int deltaEncoder;\n double proportionEncoder;\n float lastHeading;\n float currentHeading = zRotation;\n float deltaHeading;\n double proportionHeading;\n double proportionArc;\n long loops = 0;\n\n if(basePower<0){\n clockwise = !clockwise;\n degreesToTurn *= -1;\n }\n\n double P_ARC_COEFF = p_coeff;\n\n setEncoderBase();\n\n frontRight.setPower(basePower);\n backRight.setPower(basePower);\n frontLeft.setPower(basePower);\n backLeft.setPower(basePower);\n\n Thread.sleep(10);\n\n while (((LinearOpMode) callingOpMode).opModeIsActive()) {\n\n lastEncoder = currentEncoder;\n currentEncoder = getCurrentAveragePosition();\n\n deltaEncoder = currentEncoder - lastEncoder;\n\n lastHeading = currentHeading;\n currentHeading = zRotation;\n\n deltaHeading = currentHeading - lastHeading;\n deltaHeading = normalize360two(deltaHeading);\n\n proportionEncoder = (double) deltaEncoder / target;\n proportionHeading = (double) deltaHeading / degreesToTurn;\n\n proportionArc = proportionEncoder - proportionHeading;\n\n correction = proportionArc * P_ARC_COEFF;\n\n if(clockwise) {\n leftPower += correction;\n rightPower -= correction;\n } else {\n leftPower -= correction;\n rightPower += correction;\n }\n\n max = Math.max(Math.abs(leftPower), Math.abs(rightPower));\n if (max > 1.0) {\n leftPower /= max;\n rightPower /= max;\n }\n frontRight.setPower(rightPower);\n backRight.setPower(rightPower);\n frontLeft.setPower(leftPower);\n backLeft.setPower(leftPower);\n\n if (((loops + 10) % 10) == 0) {\n callingOpMode.telemetry.addData(\"TARGET\", target);\n callingOpMode.telemetry.addData(\"gyro\", zRotation);\n callingOpMode.telemetry.addData(\"encoder\", currentEncoder);\n callingOpMode.telemetry.addData(\"heading\", currentHeading);\n callingOpMode.telemetry.addData(\"dEncoder\", deltaEncoder);\n callingOpMode.telemetry.addData(\"dHeading\", deltaHeading);\n callingOpMode.telemetry.addData(\"pEncoder\", proportionEncoder);\n callingOpMode.telemetry.addData(\"pHeading\", proportionHeading);\n callingOpMode.telemetry.addData(\"arc\", proportionArc);\n callingOpMode.telemetry.addData(\"correction\", correction);\n callingOpMode.telemetry.addData(\"leftPower\", leftPower);\n callingOpMode.telemetry.addData(\"rightPower\", rightPower);\n callingOpMode.telemetry.addData(\"loops\", loops);\n callingOpMode.telemetry.update();\n }\n\n loops++;\n\n updateGlobalPosition();\n\n Thread.sleep(10);\n\n if(Math.abs(target) <= Math.abs(getCurrentAveragePosition())) {\n callingOpMode.telemetry.addData(\"TARGET\", target);\n callingOpMode.telemetry.addData(\"gyro\", zRotation);\n callingOpMode.telemetry.addData(\"encoder\", currentEncoder);\n callingOpMode.telemetry.addData(\"heading\", currentHeading);\n callingOpMode.telemetry.addData(\"dEncoder\", deltaEncoder);\n callingOpMode.telemetry.addData(\"dHeading\", deltaHeading);\n callingOpMode.telemetry.addData(\"pEncoder\", proportionEncoder);\n callingOpMode.telemetry.addData(\"pHeading\", proportionHeading);\n callingOpMode.telemetry.addData(\"arc\", proportionArc);\n callingOpMode.telemetry.addData(\"correction\", correction);\n callingOpMode.telemetry.addData(\"leftPower\", leftPower);\n callingOpMode.telemetry.addData(\"rightPower\", rightPower);\n callingOpMode.telemetry.addData(\"loops\", loops);\n callingOpMode.telemetry.update();\n break;\n }\n }\n }", "public LabelBuilder setArc(boolean arc) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.setArc(arc);\n\t\treturn this;\n\t}", "public final native void setFill(RadialGradientFillStyle radialGradient) /*-{\n\t\t\n\t\t// Create array of colour stops\n\t\tvar theColourStops = [];\n var stopList = [email protected]::getColourStopPositions()();\n for (i=0; i < [email protected]::size()(); ++i) {\n \tvar stop = [email protected]::get(I)(i)[email protected]::doubleValue()();\n \ttheColourStops.push(stop);\n \ttheColourStops.push([email protected]::getColourforStopPosition(D)(stop)[email protected]::toString()());\n }\n\t\t\n\t\tthis.attrs.fill = ({\n\t\t\tstart: {\n\t\t\t\tx: [email protected]::getStart()()[email protected]::x, \n\t y: [email protected]::getStart()()[email protected]::y,\n\t radius: [email protected]::getStartRadius()()\n\t },\n\t end: {\n\t\t\t\tx: [email protected]::getEnd()()[email protected]::x, \n\t y: [email protected]::getEnd()()[email protected]::y,\n\t radius: [email protected]::getEndRadius()()\n\t },\n \t\tcolorStops: theColourStops\n\t\t});\n\t}-*/;", "public void setAngle(final float angle);", "double getAngle();", "double getAngle();", "private void drawCircle(Canvas canvas, float progress, boolean isInHotseatOrHideseat){\n int circleBackColor = 0x3fffffff;//25% alpha of Color.WHITE\n int circleFrontColor = 0xffffffff;//Color.WHITE\n int point[] = getAppIconCenter(isInHotseatOrHideseat);\n int centerX = point[0];\n int centerY = point[1];\n int roundHeadRadius = DOWNLOAD_ARC_WIDTH / 2;\n float sweep = Math.min(360, 360 * progress / 100);\n canvas.save();\n RectF rect = new RectF(centerX - DOWNLOAD_ARC_DRAW_R,\n centerY - DOWNLOAD_ARC_DRAW_R,\n centerX + DOWNLOAD_ARC_DRAW_R,\n centerY + DOWNLOAD_ARC_DRAW_R);\n drawHoloSector(canvas, rect, 0, 360, circleBackColor);\n if ( progress != PROGRESS_NOT_DOWNLOAD ) {\n drawHoloSector(canvas, rect, 270, sweep, circleFrontColor);\n drawRoundHead(canvas, centerX, centerY, 270, roundHeadRadius, circleFrontColor);\n drawRoundHead(canvas, centerX, centerY, 270 + sweep, roundHeadRadius, circleFrontColor);\n }\n canvas.restore();\n }", "public void drawAngleIndicator(){\n\t\tfloat bottomLineHyp = 60;\n\t\tfloat topLineHyp = 100;\n\t\t\n\t\tfloat bottomXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\tfloat bottomYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\t\n\t\tfloat bottomX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale()) / 2 ) + bottomXCoord;\n\t\tfloat bottomY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale()) / 2 ) + bottomYCoord ;\n\t\t\n\t\tfloat topXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * topLineHyp);\n\t\tfloat topYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * topLineHyp);\n\t\t\n\t\tfloat topX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale() ) / 2 ) + topXCoord;\n\t\tfloat topY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale() ) / 2 ) + topYCoord;\n\t\t\n\t\tShapeRenderer shape = new ShapeRenderer();\n\t\tshape.setColor(Color.BLACK);\n\t\tshape.begin(ShapeType.Line);\n\t\tshape.line(bottomX, bottomY, topX, topY);\n\t\tshape.end();\n\t}", "public synchronized void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n if (Constants.l) {\n this.f = Color.parseColor(\"#f63d03\");\n } else {\n this.f = Color.parseColor(\"#ffffff\");\n }\n int width = getWidth() / 2;\n int height = getHeight() / 2;\n int i = width < height ? width : height;\n float f = this.g / 2.0f;\n this.c.setColor(this.e);\n this.c.setDither(true);\n this.c.setFlags(1);\n this.c.setAntiAlias(true);\n this.c.setStrokeWidth(this.g / 2.0f);\n this.c.setStyle(Style.STROKE);\n canvas.drawCircle((float) width, (float) height, ((float) i) - f, this.c);\n this.c.setColor(this.f);\n this.d.top = ((float) (height - i)) + f;\n this.d.bottom = ((float) (height + i)) - f;\n this.d.left = ((float) (width - i)) + f;\n this.d.right = ((float) (width + i)) - f;\n canvas.drawArc(this.d, -90.0f, getRateOfProgress() * 360.0f, false, this.c);\n canvas.save();\n }", "public void fillOval(int x, int y, int width, int height) {\n this.paint.setStyle(Paint.Style.FILL_AND_STROKE);\n int left = x;\n int top = y;\n int right = x + width;\n int bottom = y + height;\n canvas.drawOval(new RectF(left, top, right, bottom), paint);\n }", "public void clearCircle();", "public void testEquals() {\r\n\t\t// direct circle\r\n\t\tCircleArc2D arc0 = new CircleArc2D();\r\n\t\tCircle2D circle = new Circle2D(0, 0, 1, true);\r\n\t\tCircleArc2D arc1 = new CircleArc2D(circle, 0, PI/2);\r\n\t\tCircleArc2D arc2 = new CircleArc2D(circle, 0, PI/2, true);\r\n\t\tCircleArc2D arc3 = new CircleArc2D(0, 0, 1, 0, PI/2);\r\n\t\tCircleArc2D arc4 = new CircleArc2D(0, 0, 1, 0, PI/2, true);\r\n\t\tassertTrue(arc1.equals(arc0));\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\r\n\t\t// direct circle, with different angles\r\n\t\tcircle = new Circle2D(0, 0, 1, true);\r\n\t\tarc1 = new CircleArc2D(circle, PI/2, PI/2);\r\n\t\tarc2 = new CircleArc2D(circle, PI/2, PI, true);\r\n\t\tarc3 = new CircleArc2D(0, 0, 1, PI/2, PI/2);\r\n\t\tarc4 = new CircleArc2D(0, 0, 1, PI/2, PI, true);\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\t\t\r\n\t\t// indirect circle, with different angles\r\n\t\tcircle = new Circle2D(0, 0, 1, true);\r\n\t\tarc1 = new CircleArc2D(circle, PI/2, -PI/2);\r\n\t\tarc2 = new CircleArc2D(circle, PI/2, 2*PI, false);\r\n\t\tarc3 = new CircleArc2D(0, 0, 1, PI/2, -PI/2);\r\n\t\tarc4 = new CircleArc2D(0, 0, 1, PI/2, 2*PI, false);\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\t}", "public void paint(Graphics g) {\n\n Graphics2D g2d = (Graphics2D)g;\n\n // Draw an oval that fills the window\n\n int x = 0;\n\n int y = 0;\n\n int w = getSize().width-1;\n\n int h = getSize().height-1;\n\n /**\n * The coordinate system of a graphics context is such that the origin is at the\n * northwest corner and x-axis increases toward the right while the y-axis increases\n * toward the bottom.\n */\n\n g2d.drawLine(x, y, w, h);\n\n // to draw a filled oval use : g2d.fillOval(x, y, w, h) instead\n\n g2d.drawOval(x, y, w, h);\n\n // to draw a filled rectangle use : g2d.fillRect(x, y, w, h) instead\n\n g2d.drawRect(x, y, w, h);\n\n // A start angle of 0 represents a 3 o'clock position, 90 represents a 12 o'clock position,\n\n // and -90 (or 270) represents a 6 o'clock position\n\n int startAngle = 45;\n\n int arcAngle = -60;\n\n // to draw a filled arc use : g2d.fillArc(x, y, w, h, startAngle, arcAngle) instead\n\n g2d.drawArc(x, y, w/2, h/2, startAngle, arcAngle);\n\n // to draw a filled round rectangle use : g2d.fillRoundRect(x, y, w, h, arcWidth, arcHeight) instead\n\n g2d.drawRoundRect(x, y, w, h, w/2, h/2);\n\n Polygon polygon = new Polygon();\n\n polygon.addPoint(w/4, h/2);\n\n polygon.addPoint(0, h/2);\n\n polygon.addPoint(w/4, 3*h/4);\n\n polygon.addPoint(w/2, 3*h/4);\n\n // Add more points...\n\n // to draw a filled round rectangle use : g2d.fillPolygon(polygon) instead\n\n g2d.drawPolygon(polygon);\n\n }", "public void resetAngle() {\n\t\t//this.angle = (this.orientation % 4 + 4) * (90);\n\t\tthis.angle = this.orientation * 90*-1;\n\t\tthis.tweenAngle.setCurrentValue(this.angle);\n\t\tthis.tweenAngle.setTargetValue(this.angle);\n\t}", "void decreaseAngle() {\n this.strokeAngle -= 3;\n this.updateAcc();\n this.updateStick();\n }", "AngleResource inclination();", "private void drawCenter(Graphics2D g2d) {\n\t\tint width = size * 3/4;\n\t\tint offset = size / 8 + 5;\n\t\t\n\t\tRectangle2D bounds = new Rectangle2D.Double(offset, offset, width, width);\n\t\tArc2D center = new Arc2D.Double(bounds, 100, 350, Arc2D.PIE);\n\n\t\t// stroke\n\t\tg2d.setPaint(darkGrey);\n\t\tg2d.setStroke(new BasicStroke(5.0f));\n\t\tg2d.draw(center);\n\t\t\n\t\t// fill \n\t\tg2d.setPaint(white);\n\t\tg2d.fill(center);\n\t\t\n\t\t// fix for arc stroke\n\t\tEllipse2D circle = new Ellipse2D.Double(offset, offset, width, width);\n\t\tg2d.setPaint(white);\n\t\tg2d.fill(circle);\n\t}", "AngleSubtract createAngleSubtract();", "public CircularGameObject(GameObject parent, double[] fillColour, double[] lineColour) {\n super(parent);\n\n setRadius(1);\n setFillColour(fillColour);\n setLineColour(lineColour);\n\n }", "public void fillRoundRectangle(RectangleShape rectangle, int radius);", "public void DrawScreen(int scanDegree, boolean dir, java.util.List<Reading> objects) {\r\n cw = window.getWidth();\r\n ch = window.getHeight();\r\n centerX = cw / 2;\r\n centerY = ch;\r\n radius = cw / 2 - 50;\r\n\r\n img = window.createVolatileImage(cw, ch);\r\n g = (Graphics2D) img.getGraphics();\r\n g.setColor(new Color(bgColor, bgColor, bgColor));\r\n g.fillRect(0, 0, img.getWidth(null), img.getHeight(null));\r\n\r\n /* Radar Arcs */\r\n g.setColor(radarColor);\r\n g.setStroke(new BasicStroke(strokeWidth));\r\n\r\n for (int i = 1; i <= divisons; i++) {\r\n int r = i * radius / divisons;\r\n g.drawArc(centerX - r, centerY - r, 2 * r, 2 * r, 0, 180);\r\n }\r\n\r\n /* Draw objects */\r\n g.setColor(ObjectColor);\r\n g.setStroke(new BasicStroke(scanWidth));\r\n int last_val = 0;\r\n int xx, yy;\r\n if (objects != null) {\r\n for (Reading r : objects) {\r\n\r\n float dist = radius * (1 - ((float) r.value-110) / 300.0f);\r\n\r\n \r\n if(r.value>130){// && abs(last_val-r.value)>20) {\r\n xx = centerX - (int) round(dist * cos(r.degree * PI / 180));\r\n yy = centerY - (int) round(dist * sin(r.degree * PI / 180));\r\n g.drawRect(xx, yy, 1, 1);\r\n \r\n if(abs(r.degree-scanDegree)==2){\r\n sound.PlaySound();\r\n }\r\n }\r\n last_val = r.value;\r\n }\r\n }\r\n\r\n /* Trace drawing */\r\n g.setStroke(new BasicStroke(scanWidth));\r\n int dirf = dir ? 1 : -1;\r\n\r\n int R = radarColor.getRed();\r\n int G = radarColor.getGreen();\r\n int B = radarColor.getBlue();\r\n double a = 230f;\r\n\r\n for (int i = 0; i < 40; i++) {\r\n int d = scanDegree + i * dirf;\r\n\r\n if (d < 0 || d > 180)\r\n break;\r\n\r\n g.setColor(new Color(R, G, B, (int) a));\r\n g.drawLine(centerX, centerY, centerX - (int) round(radius * cos(d * PI / 180)),\r\n centerY - (int) round(radius * sin(d * PI / 180)));\r\n\r\n a = a / 1.1f;\r\n }\r\n\r\n /* Print message(s) */\r\n g.setColor(radarColor);\r\n g.setFont(font);\r\n String message;\r\n int y = 50;\r\n while ((message = Logger.next()) != null) {\r\n g.drawString(message, 50, y);\r\n y = y + 20;\r\n }\r\n\r\n // Apply frame\r\n // windowgfx.setColor(Color.BLACK);\r\n windowgfx.drawImage(img, 0, 0, null);\r\n\r\n }", "AngleAdd createAngleAdd();", "public void draw(Graphics2D g2, int xPos, int yPos, int width, int height){\r\n int eyeD = width/10;\r\n if (this.isLeft){\r\n eye = new Arc2D.Double(xPos+width/4 ,yPos+height/3, eyeD, eyeD, 180, 180, Arc2D.PIE);\r\n eyeC = new Arc2D.Double(xPos+width/4-eyeD/2 ,yPos+height/3-eyeD/2, 2*eyeD, 2*eyeD, 180, 180, Arc2D.PIE);\r\n }\r\n else{\r\n eye = new Arc2D.Double(xPos+width*5/8 ,yPos+height/3, eyeD, eyeD, 180, 180, Arc2D.PIE);\r\n eyeC = new Arc2D.Double(xPos+width*5/8-eyeD/2 ,yPos+height/3-eyeD/2, 2*eyeD, 2*eyeD, 180, 180, Arc2D.PIE);\r\n }\r\n g2.setColor(color);\r\n g2.fill(eye);\r\n g2.setColor(Color.BLACK);\r\n g2.setStroke(new BasicStroke(2.0f));\r\n g2.draw(eye);\r\n g2.draw(eyeC);\r\n }", "public double getAngle();", "public void rotate(float val){\n\t\trot = val % 360;\n\t\tif(w>0){\n\t\t\tinvalidate();\t\n\t\t}\n\t\t\n\t\t\n\t}", "private void drawArcs(Graphics2D g2d) {\n\t\tContig contig = genome.contigs().get(0);\n\t\tint length = contig.length();\n\t\t\n\t\tfor (Cluster cluster : contig.clusters()) {\n\t\t\tint clusterSize = cluster.size();\n\t\t\tint start = cluster.start();\n\t\t\tdouble offset = ((double) start / length * 350) + 100;\n\t\t\tdouble extent = (double) clusterSize / length * 350;\n\t\t\t\n\t\t\tList<ClusterFamilies> families = cluster.families();\n\t\t\tint numFamilies = families.size();\n\t\t\tSystem.out.println(\"[CircularGenomeGraph] Graphing cluster with \" + numFamilies + \" families\");\n\t\t\t\n\t\t\tif (this.cluster != null && cluster == this.cluster) {\n\t\t\t\tRectangle2D bounds = new Rectangle2D.Double(5, 5, size, size);\n\t\t\t\tArc2D arc = new Arc2D.Double(bounds, offset, extent, Arc2D.PIE);\n\n\t\t\t\tg2d.setPaint(black);\n\t\t\t\tg2d.fill(arc);\n\t\t\t} else {\n\t\t\t\tint o = 5;\n\t\t\t\tint s = size;\n\t\t\t\tfor (int i = 0; i < numFamilies; i++) {\n\t\t\t\t\tRectangle2D bounds = new Rectangle2D.Double(o, o, s, s);\n\t\t\t\t\tArc2D arc = new Arc2D.Double(bounds, offset, extent, Arc2D.PIE);\n\t\t\t\t\t\n\t\t\t\t\tClusterFamilies family = families.get(i);\n\t\t\t\t\tg2d.setPaint(family.color());\n\t\t\t\t\tg2d.fill(arc);\n\t\t\t\t\t\n\t\t\t\t\to += (50/numFamilies);\n\t\t\t\t\ts -= (100/numFamilies);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void Fill(){\n new FloodFill().floodFill(crossSection, new Point(4, 4), Color.GRAY, Color.BLUE);\n\n ReplaceColor(crossSection, Color.GRAY, Color.TRANSPARENT);\n ReplaceColor(crossSection, Color.YELLOW, Color.TRANSPARENT);\n ReplaceColor(crossSection, Color.BLUE, Color.GRAY);\n\n //crossSection = filling.copy(Bitmap.Config.ARGB_8888, true);\n cutMarks.eraseColor(Color.TRANSPARENT);\n }", "public Path insidePath(float startAngle, float sweepAngle, float radius){\n Path path = new Path();\n //FPoint startPoint = sliceStartPoit(startAngle, radius);\n //path.moveTo(startPoint.x, startPoint.y);\n\n FPoint center = mChart.getCenterOfCircleBox();\n RectF rect = new RectF();\n rect.set(center.x - radius, center.y - radius, center.x + radius, center.y + radius);\n path.arcTo(rect, startAngle, sweepAngle);\n\n path.close();\n\n\n\n return path;\n }", "private void drawOnTheCanvasAdvanced(Graphics canvas)\n {\n final int nInputE = Math.round((float)inputE);\n final int nInputF = Math.round((float)inputF);\n // This is a more full-featured\n \n // You could try this: \n // canvas.drawArc(10, 10, 110, 110, 45, 90);\n // Or this:\n // canvas.drawArc(10, 10, 110, 110, 45, nInputE);\n\n }", "private Arc2D.Double getPie(double cenX, double cenY, double radius,\r\n\t\t\tdouble init, double angle) {\r\n\t\t// Arc2D.Double's constructor requires the upper-left corner of the\r\n\t\t// framing rectangle; which is equal to the central coordinate minus the\r\n\t\t// radius. Passing this calculation allows the path to be created in\r\n\t\t// terms of central position, by this method.\r\n\t\t// Constructor also requires the width and height of the framing\r\n\t\t// rectangle, which is arc diameter, or double the radius.\r\n\t\t// The arc stretches from angle 0 degrees, over an angle of the passed\r\n\t\t// number of degrees.\r\n\t\t// Arc2D.PIE specifies an arc closed by drawing straight line segments\r\n\t\t// from the start of the arc segment to the center of the full ellipse\r\n\t\t// and from that point to the end of the arc segment; a pie.\r\n\t\treturn new Arc2D.Double(cenX - radius, cenY - radius, 2.0 * radius,\r\n\t\t\t\t2.0 * radius, 0.0, angle, Arc2D.PIE);\r\n\t}", "public void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n this.f174a = new Paint();\n RectF rectf = new RectF();\n this.f174a.setColor(-16777216);\n this.f174a.setStyle(Paint.Style.FILL);\n this.f174a.setAntiAlias(true);\n this.f174a.setStrokeWidth(2.0f);\n int r = getMeasuredWidth() > getMeasuredHeight() ? getMeasuredWidth() : getMeasuredHeight();\n rectf.set((float) getPaddingLeft(), (float) getPaddingTop(), (float) (r - getPaddingRight()), (float) (r - getPaddingBottom()));\n canvas.drawArc(rectf, 0.0f, 360.0f, false, this.f174a);\n this.f174a.setColor(-1);\n this.f174a.setStyle(Paint.Style.STROKE);\n canvas.drawArc(rectf, 0.0f, 360.0f, false, this.f174a);\n this.f174a.setStrokeWidth(3.0f);\n canvas.drawLine((float) (getWidth() / 3), (float) (getWidth() / 3), (float) (getWidth() - (getWidth() / 3)), (float) (getWidth() - (getWidth() / 3)), this.f174a);\n canvas.drawLine((float) (getWidth() - (getWidth() / 3)), (float) (getWidth() / 3), (float) (getWidth() / 3), (float) (getWidth() - (getWidth() / 3)), this.f174a);\n }", "private final void \n\tputArcPointsInBuffer(\n\t\t\tfinal float x,\n\t\t\tfinal float y,\n\t\t\tfinal float radiusX,\n\t\t\tfinal float radiusY,\n\t\t\tfinal float startAngle,\n\t\t\tfinal float angle,\n\t\t\tfinal float pointCount,\n\t\t\tfinal float wantCenterPoint ) {\n\t\t\n\t\t// calculation of the step width:\n\t\t// 2 * Pi is a full circle multiplied by the float representation of the angle == the desired angle \n\t\t// The desired angle is divided by the given BitsApp.CirclePoints == the step width for the desired angle with the given circle points\n\t\tfinal float stepWidth = (2f * (float)(Math.PI) * (angle / 360f)) / pointCount;\n\n\t\t//calculate the start angle/step\n\t\tfloat currentStep = (2f * (float)Math.PI) * (startAngle / 360f);\n\t\tint totalSteps = (int) (pointCount); //how many steps between \n\t\t\n\t\tif( wantCenterPoint == 0 ) {\n\t\t\t// show a center point if the arc is not 360 degrees\n\t\t\tif(angle > 0 && angle < 360) {\n\t\t\t\tthis.mVertices[this.mBufferIndex++] = x;\n\t\t\t\tthis.mVertices[this.mBufferIndex++] = y;\n\t\t\t}\n\t\t}\n\n\t\t// calculating the steps\n\t\tfor (int i = 0; i < totalSteps; i++) {\n\t\t\tthis.mVertices[this.mBufferIndex++] = (float) (Math.cos(currentStep) * radiusX + x);\n\t\t\tthis.mVertices[this.mBufferIndex++] = (float) (Math.sin(currentStep) * radiusY + y);\n\t\t\tcurrentStep += stepWidth;\n\t\t}\n\n\t\t// setting the last point to the desired angle position (step width does not always get to this point)\n\t\tthis.mVertices[this.mBufferIndex++] = (float) (Math.cos(currentStep) * radiusX + x);\n\t\tthis.mVertices[this.mBufferIndex++] = (float) (Math.sin(currentStep) * radiusY + y);\n\t}", "@Test\r\n public void testCalculateAngle2() {\r\n System.out.println(\"calculateAngle2\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(0);\r\n double expResult = Math.toRadians(180);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "public Circle() {\n radius = 1.0;\n color = \"red\";\n }", "void setFill(boolean fill);", "public void setFill(boolean fill) {\r\n if (fill) {\r\n \tmPaint.setStyle(Paint.Style.FILL);\r\n }else{\r\n \tmPaint.setStyle(Paint.Style.STROKE);\r\n }\r\n }", "public void drawCircle(Graphics g, int x, int y, int rad) {\n if (n == 5) {\n g.fillOval(x+25, y+25, rad, rad);\n }else if (n==6) {\n g.fillOval(x+18, y+18, rad, rad);\n }else {\n g.fillOval(x+14, y+14, rad, rad);\n }\n }", "public float calculateCelestialAngle(long par1, float par3)\n {\n return 0.5F;\n }", "public void setAngle(float angle){\n\n\t}", "@Test\r\n public void testCalculateAngle4() {\r\n System.out.println(\"calculateAngle4\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(90);\r\n double expResult = Math.toRadians(18);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "public void star(float x, float y, float r, float R) {\n float angle = TWO_PI / 5;\n float halfAngle = angle/2.0f;\n beginShape();\n noStroke();\n for (float a = 0; a < TWO_PI; a += angle) {\n float sx = x + cos(a) * r;\n float sy = y + sin(a) * r;\n vertex(sx, sy);\n sx = x + cos(a+halfAngle) * R;\n sy = y + sin(a+halfAngle) * R;\n vertex(sx, sy);\n }\n endShape(CLOSE);\n}", "@Override\n public void fill() {\n graphicsEnvironmentImpl.fill(canvas);\n }", "public double getAngle () {\n return super.getAngle() % 360D;\n }", "public void showCircle(double x, double y, double rad, char col) {\n\t \tsetFillColour(colFromChar(col));\t\t\t\t\t\t\t\t\t// set the fill colour\r\n\t\t\tgc.fillArc(x-rad, y-rad, rad*2, rad*2, 0, 360, ArcType.ROUND);\t// fill circle\r\n\t\t\t\r\n\t}", "public RMFill getFill() { return _fill; }", "public void\n\t\tfillRoi(final Canvas3D canvas, final Roi roi, final byte fillValue)\n\t{\n\t\tif (roi == null) return;\n\n\t\tfinal Polygon p = roi.getPolygon();\n\t\tfinal Transform3D volToIP = new Transform3D();\n\t\tcanvas.getImagePlateToVworld(volToIP);\n\t\tvolToIP.invert();\n\t\tvolumeToImagePlate(volToIP);\n\n\t\tfinal VoltexVolume vol = renderer.getVolume();\n\t\tfinal Point2d onCanvas = new Point2d();\n\t\tfor (int z = 0; z < vol.zDim; z++) {\n\t\t\tfor (int y = 0; y < vol.yDim; y++) {\n\t\t\t\tfor (int x = 0; x < vol.xDim; x++) {\n\t\t\t\t\tvolumePointInCanvas(canvas, volToIP, x, y, z, onCanvas);\n\t\t\t\t\tif (p.contains(onCanvas.x, onCanvas.y)) {\n\t\t\t\t\t\tvol.setNoCheckNoUpdate(x, y, z, fillValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tIJ.showStatus(\"Filling...\");\n\t\t\tIJ.showProgress(z, vol.zDim);\n\t\t}\n\t\tvol.updateData();\n\n\t\t// also fill the original image\n\t\tfinal ImagePlus image = c.getImage();\n\t\tfinal int factor = c.getResamplingFactor();\n\t\tif (image == null || factor == 1) return;\n\n\t\tfinal ij3d.Volume volu = new ij3d.Volume(image);\n\t\tfor (int z = 0; z < volu.zDim; z++) {\n\t\t\tfor (int y = 0; y < volu.yDim; y++) {\n\t\t\t\tfor (int x = 0; x < volu.xDim; x++) {\n\t\t\t\t\tvolumePointInCanvas(canvas, volToIP, x / factor, y / factor, z /\n\t\t\t\t\t\tfactor, onCanvas);\n\t\t\t\t\tif (p.contains(onCanvas.x, onCanvas.y)) {\n\t\t\t\t\t\tvolu.set(x, y, z, fillValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tIJ.showStatus(\"Filling...\");\n\t\t\tIJ.showProgress(z, volu.zDim);\n\t\t}\n\t}", "public void fillRoundRectangle(int x, int y, int width, int height, int radius);", "public static float headingToArc(float pHeading, boolean pTurnRight){\n pHeading %= 360;\n pHeading = pHeading < 0 ? 360 + pHeading : pHeading;\n pHeading = 360 - pHeading;\n pHeading = pTurnRight ? pHeading - 90 : pHeading + 90;\n return pHeading;\n }" ]
[ "0.79873663", "0.7074346", "0.6906222", "0.6585227", "0.6399921", "0.6320027", "0.615386", "0.6140309", "0.60775316", "0.6045081", "0.6019712", "0.5948346", "0.59479725", "0.59478706", "0.5938456", "0.58678895", "0.5805557", "0.5776445", "0.5770993", "0.5765943", "0.5749016", "0.57470864", "0.57390803", "0.5728394", "0.5703008", "0.568036", "0.5674687", "0.5672811", "0.56707954", "0.56474566", "0.5639565", "0.5632069", "0.5629183", "0.55808425", "0.557525", "0.5569778", "0.55592084", "0.5550723", "0.5549078", "0.5467592", "0.54506373", "0.5437781", "0.54369617", "0.5430329", "0.5429219", "0.54268587", "0.5426026", "0.5422624", "0.5380366", "0.53538686", "0.535363", "0.5344553", "0.53416306", "0.5319429", "0.5310132", "0.5307394", "0.52997583", "0.52977526", "0.52977526", "0.5285528", "0.52848107", "0.5273155", "0.526813", "0.5263692", "0.5262565", "0.52517146", "0.5250442", "0.5238776", "0.52275294", "0.5226663", "0.52173144", "0.5211935", "0.521187", "0.51992303", "0.51972926", "0.5195259", "0.5192436", "0.51894295", "0.5169502", "0.51687974", "0.5165022", "0.5163885", "0.5163551", "0.5160454", "0.51600516", "0.5157916", "0.51569515", "0.5155766", "0.51528174", "0.51463515", "0.5146275", "0.5141529", "0.5138836", "0.5137197", "0.51363856", "0.51340246", "0.5133081", "0.51295143", "0.5128178", "0.5123439", "0.5119769" ]
0.0
-1
fill 360 degree arc draw the arena and its contents
void drawBuilding() { gc.setFill(Color.BEIGE); gc.fillRect(0, 0, theBuilding.getXSize(), theBuilding.getYSize()); // clear the canvas theBuilding.showBuilding(this); // draw all items String s = theBuilding.toString(); rtPane.getChildren().clear(); // clear rtpane Label l = new Label(s); // turn string to label rtPane.getChildren().add(l); // add label }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillArc(float x, float y, float radius, float startAngle, float endAngle);", "public void paint (Graphics g) {\n g.fillArc (20, 30, 150, 130, 240, 90);\n }", "public void strokeArc(float x, float y, float radius, float startAngle, float endAngle);", "public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }", "@Override\n public void fillRoundRectangle(Rectangle rect, int arcWidth, int arcHeight) {\n RoundRectangle2D roundRect = new RoundRectangle2D.Float(rect.x + transX, rect.y + transY, rect.width - 1, rect.height - 1, arcWidth,\n arcHeight);\n\n checkState();\n getGraphics2D().setPaint(getColor(getSWTGraphics().getBackgroundColor()));\n getGraphics2D().fill(roundRect);\n }", "@Override\n public void fill() {\n graphicsEnvironmentImpl.fill(canvas);\n }", "void drawLauncher(double angle)\n {\n \tlauncherCanvas.rotateProperty().set(angle);\n \tlauncher.setFill(Color.GREY);\n launcher.fillRect(0,0,launcherCanvas.getWidth(),launcherCanvas.getHeight());\n }", "public void fillRoundRect(int x, int y, int width, int height, int arcWidth,\r\n\t\t\tint arcHeight)\r\n\t{\r\n\t\t// System.out.println(\"fillRoundRect\");\r\n\t}", "public void calling() {\n\t\tCircle tc = new Circle(new Coordinate(-73, 42), 0);\n\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n\t\t\tPaintShapes.paint.addCircle(tc);\n\t\t\tPaintShapes.paint.myRepaint();\n\t\t}\n\t\t\n//\t\tMap<Double, Coordinate>angle_coordinate=new HashMap<Double, Coordinate>();\n//\t\tLinkedList<double[]>coverangle=new LinkedList<double[]>();\n//\t\tMap<Double[], Coordinate[]>uncoverArc=new HashMap<Double[], Coordinate[]>();\n//\t\tdouble a1[]=new double[2];\n//\t\ta1[0]=80;\n//\t\ta1[1]=100;\n//\t\tangle_coordinate.put(a1[0], new Coordinate(1, 0));\n//\t\tangle_coordinate.put(a1[1], new Coordinate(0, 1));\n//\t\tcoverangle.add(a1);\n//\t\tdouble a2[]=new double[2];\n//\t\ta2[0]=0;\n//\t\ta2[1]=30;\n//\t\tangle_coordinate.put(a2[0], new Coordinate(2, 0));\n//\t\tangle_coordinate.put(a2[1], new Coordinate(0, 2));\n//\t\tcoverangle.add(a2);\n//\t\tdouble a3[]=new double[2];\n//\t\ta3[0]=330;\n//\t\ta3[1]=360;\n//\t\tangle_coordinate.put(a3[0], new Coordinate(3, 0));\n//\t\tangle_coordinate.put(a3[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a3);\n//\t\tdouble a4[]=new double[2];\n//\t\ta4[0]=20;\n//\t\ta4[1]=90;\n//\t\tangle_coordinate.put(a4[0], new Coordinate(4, 0));\n//\t\tangle_coordinate.put(a4[1], new Coordinate(0, 4));\n//\t\tcoverangle.add(a4);\n//\t\tdouble a5[]=new double[2];\n//\t\ta5[0]=180;\n//\t\ta5[1]=240;\n//\t\tangle_coordinate.put(a5[0], new Coordinate(5, 0));\n//\t\tangle_coordinate.put(a5[1], new Coordinate(0, 5));\n//\t\tcoverangle.add(a5);\n//\t\tdouble a6[]=new double[2];\n//\t\ta6[0]=270;\n//\t\ta6[1]=300;\n//\t\tangle_coordinate.put(a6[0], new Coordinate(6, 0));\n//\t\tangle_coordinate.put(a6[1], new Coordinate(0, 6));\n//\t\tcoverangle.add(a6);\n//\t\tdouble a7[]=new double[2];\n//\t\ta7[0]=360;\n//\t\ta7[1]=360;\n//\t\tangle_coordinate.put(a7[0], new Coordinate(7, 7));\n//\t\tangle_coordinate.put(a7[1], new Coordinate(7, 7));\n//\t\tcoverangle.add(a7);\n//\t\t// sort the cover arc\n//\t\tint minindex = 0;\n//\t\tfor (int j = 0; j < coverangle.size() - 1; j++) {\n//\t\t\tminindex = j;\n//\t\t\tfor (int k = j + 1; k < coverangle.size(); k++) {\n//\t\t\t\tif (coverangle.get(minindex)[0] > coverangle.get(k)[0]) {\n//\t\t\t\t\tminindex = k;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tdouble tem[] = new double[2];\n//\t\t\ttem = coverangle.get(j);\n//\t\t\tcoverangle.set(j, coverangle.get(minindex));\n//\t\t\tcoverangle.set(minindex, tem);\n//\t\t}\n//\t\tfor(int ii=0;ii<coverangle.size();ii++){\n//\t\t\tdouble aa[]=coverangle.get(ii);\n//\t\t\tSystem.out.println(aa[0]+\" \"+aa[1]);\n//\t\t}\n//\t\tSystem.out.println(\"----------------------------\");\n//\t\t// find the uncover arc\n//\t\tint startposition = 0;\n//\t\twhile (startposition < coverangle.size() - 1) {\n//\t\t\tdouble coverArc[] = coverangle.get(startposition);\n//\t\t\tboolean stop = false;\n//\t\t\tint m = 0;\n//\t\t\tfor (m = startposition + 1; m < coverangle.size() && !stop; m++) {\n//\t\t\t\tdouble bb[] = coverangle.get(m);\n//\t\t\t\tif (bb[0] <= coverArc[1]) {\n//\t\t\t\t\tcoverArc[0] = Math.min(coverArc[0], bb[0]);\n//\t\t\t\t\tcoverArc[1] = Math.max(coverArc[1], bb[1]);\n//\t\t\t\t} else {\n//\t\t\t\t\tCoordinate uncover[]=new Coordinate[2];\n//\t\t\t\t\t//record the consistant uncover angle\n//\t\t\t\t\tDouble[] uncoverA=new Double[2];\n//\t\t\t\t\tuncoverA[0]=coverArc[1];\n//\t\t\t\t\tuncoverA[1]=bb[0];\n//\t\t\t\t\tIterator<Map.Entry<Double, Coordinate>> entries = angle_coordinate\n//\t\t\t\t\t\t\t.entrySet().iterator();\n//\t\t\t\t\twhile (entries.hasNext()) {\n//\t\t\t\t\t\tMap.Entry<Double, Coordinate> entry = entries.next();\n//\t\t\t\t\t\tif (entry.getKey() == coverArc[1])\n//\t\t\t\t\t\t\tuncover[0] = entry.getValue();\n//\t\t\t\t\t\telse if (entry.getKey() == bb[0])\n//\t\t\t\t\t\t\tuncover[1] = entry.getValue();\n//\t\t\t\t\t}\n//\t\t\t\t\tuncoverArc.put(uncoverA, uncover);\n//\t\t\t\t\tstartposition = m;\n//\t\t\t\t\tstop = true;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tif(m==coverangle.size()){\n//\t\t\t\tstartposition=m;\n//\t\t\t}\n//\t\t}\n//\t\n//\t\tSystem.out.println(uncoverArc.entrySet().size());\n//\t\tint n=uncoverArc.entrySet().size();\n//\t\tint k=2;\n//\t\twhile(n>0){\n//\t\t\tIterator<Map.Entry<Double[],Coordinate[]>>it=uncoverArc.entrySet().iterator();\n//\t\t\tMap.Entry<Double[], Coordinate[]>newneighbor=it.next();\n//\t\t\tSystem.out.println(newneighbor.getKey()[0]+\" \"+newneighbor.getValue()[0]);\n//\t\t\tSystem.out.println(newneighbor.getKey()[1]+\" \"+newneighbor.getValue()[1]);\n//\t\t uncoverArc.remove(newneighbor.getKey());\n//\t\t \n//\t\tif(k==2){\n//\t\tDouble[] a8=new Double[2];\n//\t\ta8[0]=(double)450;\n//\t\ta8[1]=(double)500;\n//\t\tCoordinate a9[]=new Coordinate[2];\n//\t\ta9[0]=new Coordinate(9, 0);\n//\t\ta9[1]=new Coordinate(0, 9);\n//\t\tuncoverArc.put(a8, a9);\n//\t\tk++;\n//\t\t}\n//\t\tn=uncoverArc.entrySet().size();\n//\t\tSystem.out.println(\"new size=\"+uncoverArc.entrySet().size());\n//\t\t}\n//\t\t\t\n\t\t\t\n\t\t\n\t\t/***************new test*************************************/\n//\t\tCoordinate startPoint=new Coordinate(500, 500);\n//\t\tLinkedList<VQP>visitedcircle_Queue=new LinkedList<VQP>();\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 500), 45));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(589, 540), 67));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(500, 550), 95));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(439, 560), 124));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(460, 478), 69));\n//\t\tvisitedcircle_Queue.add(new VQP(new Coordinate(580, 580), 70));\n//\t\tIterator<VQP>testiterator=visitedcircle_Queue.iterator();\n//\t\twhile(testiterator.hasNext()){\n//\t\t\tVQP m1=testiterator.next();\n//\t\t\tCircle tm=new Circle(m1.getCoordinate(), m1.getRadius());\n//\t\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\t\tPaintShapes.paint.color = PaintShapes.paint.redTranslucence;\n//\t\t\t\tPaintShapes.paint.addCircle(tm);\n//\t\t\t\tPaintShapes.paint.myRepaint();\n//\t\t\t}\n//\t\t\t\n//\t\t}\n//\t\tdouble coverradius=calculateIncircle(startPoint, visitedcircle_Queue);\n//\t\tCircle incircle=new Circle(startPoint, coverradius);\n//\t\tif (PaintShapes.painting && logger.isDebugEnabled()) {\n//\t\t\tPaintShapes.paint.color = PaintShapes.paint.blueTranslucence;\n//\t\t\tPaintShapes.paint.addCircle(incircle);\n//\t\t\tPaintShapes.paint.myRepaint();\n//\t\t}\n//\t\t/***************end test*************************************/\n\t\tEnvelope envelope = new Envelope(-79.76259, -71.777491,\n\t\t\t\t40.477399, 45.015865);\n\t\tdouble area=envelope.getArea();\n\t\tdouble density=57584/area;\n\t\tSystem.out.println(\"density=\"+density);\n\t\tSystem.out.println(\"end calling!\");\n\t}", "@Override\n\t\t\tpublic void draw(Canvas canvas) {\n\t\t\t\t\n\t\t\t\tfloat graphBrushWidth = (float)((90*width)/1080);\n\t\t\t\t\n\t\t\t\tbackgroundColor = basePad.getResources().getColor(R.color.TRANSPARENT);\n\t\t paint1.setColor(basePad.getResources().getColor(R.color.white));\n\t\t paint1.setAntiAlias(true); \n\t\t canvas.drawColor(backgroundColor);\n\t\t paint1.setStrokeWidth(graphBrushWidth);\n\n\t\t paint1.setStyle(Style.STROKE);\n//\t\t paint.setStyle(Paint.Style.FILL);\n\t\t \n\t\t paint2.setColor(basePad.getResources().getColor(R.color.total_ring2));\n\t\t paint2.setAntiAlias(true); \n\t\t paint2.setStrokeWidth(graphBrushWidth);\n\t\t paint2.setStyle(Style.STROKE);\n\t\t \n\t\t int[] graphX = new int[]{width/2, (width*5/32), (width*28/32)};\n\t\t int[] graphY = new int[]{(height*3/8), (height*11/16), (height*11/16)};\n\t\t int[] graphRadius = new int[]{(int)((width*6)/8), width/5, width/5};\n\t\t int[] graphContent = new int[]{usageAngle, daylyAngle, dayLeft};\n\t\t \n\t\t for (int count = 0; count < 3; count++){\n\t\t \tpaint1.setColor(basePad.getResources().getColor(R.color.white));\n\t\t \tpaint2.setColor(basePad.getResources().getColor(R.color.total_ring2));\n\t\t\t RectF oval = new RectF();\n\t\t\t oval.left = graphX[count] - (int)(graphRadius[count]/2);\n\t\t\t oval.top = graphY[count] - (int)(graphRadius[count]/2);\n\t\t\t oval.right = graphX[count] + (int)(graphRadius[count]/2);\n\t\t\t oval.bottom = graphY[count] + (int)(graphRadius[count]/2);\n\t\t\t if (count != 0){\n\t\t\t \tgraphBrushWidth = (float)((20*width)/1080);\n\t\t\t \tpaint1.setStrokeWidth(graphBrushWidth);\n\t\t\t \tpaint2.setStrokeWidth(graphBrushWidth);\n\t\t\t }\n\t\t\t if (graphContent[count] >= 360){\n\t\t\t \tpaint1.setColor(basePad.getResources().getColor(R.color.red));\n\t\t\t \tpaint2.setColor(basePad.getResources().getColor(R.color.red));\n\t\t\t }\n\t\t\t canvas.drawArc(oval, 270, graphContent[count] + 1, false, paint2);\n\t\t\t\t canvas.drawArc(oval, 270 + graphContent[count], 361 - graphContent[count], false, paint1);\n\t\t }\n\t\t\t\t\n//\t\t graphBrushWidth = (float)((3*width)/1080);\n//\t\t paint1.setStrokeWidth(graphBrushWidth);\n//\t\t canvas.drawLine(total_x, total_y, total_x + ((160*width)/1080), total_y, paint1);\n//\t\t canvas.drawLine(daily_x, daily_y, daily_x + ((160*width)/1080), daily_y, paint1);\n//\t\t canvas.drawLine(day_x, day_y, day_x + ((160*width)/1080), day_y, paint1);\n\t\t \n//\t\t int bannerY = (int)((175*width)/1080);\n//\t\t int bannerWidth = (int)((170*width)/1080);\n//\t\t bot = y + radius;\n\t\t \n//\t\t Paint coverPaint = new Paint();\n//\t\t coverPaint.setColor(basePad.getResources().getColor(R.color.white));\n//\t\t coverPaint.setAntiAlias(true); \n//\t\t coverPaint.setStrokeWidth((float) 5.0);\n//\t\t coverPaint.setStyle(Style.STROKE);\n//\t\t coverPaint.setStyle(Paint.Style.FILL);\n//\t\t \n//\t\t RectF coverOval = new RectF();\n//\t\t coverOval.left = x + 100;\n//\t\t coverOval.top = y + 100;\n//\t\t coverOval.right = x + 800;\n//\t\t coverOval.bottom = bot - 100;\n//\t\t canvas.drawArc(coverOval, 0, 360, true, coverPaint);\n\t\t\t}", "public void draw(Graphics2D g2, int xPos, int yPos, int width, int height){\r\n int eyeD = width/10;\r\n if (this.isLeft){\r\n eye = new Arc2D.Double(xPos+width/4 ,yPos+height/3, eyeD, eyeD, 180, 180, Arc2D.PIE);\r\n eyeC = new Arc2D.Double(xPos+width/4-eyeD/2 ,yPos+height/3-eyeD/2, 2*eyeD, 2*eyeD, 180, 180, Arc2D.PIE);\r\n }\r\n else{\r\n eye = new Arc2D.Double(xPos+width*5/8 ,yPos+height/3, eyeD, eyeD, 180, 180, Arc2D.PIE);\r\n eyeC = new Arc2D.Double(xPos+width*5/8-eyeD/2 ,yPos+height/3-eyeD/2, 2*eyeD, 2*eyeD, 180, 180, Arc2D.PIE);\r\n }\r\n g2.setColor(color);\r\n g2.fill(eye);\r\n g2.setColor(Color.BLACK);\r\n g2.setStroke(new BasicStroke(2.0f));\r\n g2.draw(eye);\r\n g2.draw(eyeC);\r\n }", "public abstract void drawFill();", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "public void draw(){\n if (! this.isFinished() ){\n UI.setColor(this.color);\n double left = this.xPos-this.radius;\n double top = GROUND-this.ht-this.radius;\n UI.fillOval(left, top, this.radius*2, this.radius*2);\n }\n }", "public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }", "private void arc(int centerX, int centerY, float angle) {\n tail(centerX, centerY, getSize() - (MARGIN / 2), getSize() - (MARGIN / 2), angle);\n }", "protected void paintClock(){\n\t\tdouble clockRadius = Math.min(width, height) * 0.8 * 0.5;\n\t\tdouble centerX = width / 2;\n\t\tdouble centerY = height / 2;\n\t\t//Draw circle \n\t\tCircle circle = new Circle(centerX, centerY, clockRadius);\n\t\tcircle.setFill(Color.WHITE);\n\t\tcircle.setStroke(Color.BLACK);\n\t\t\n\t\tText t1 = new Text(centerX - 5, centerY - clockRadius + 12, \"12\");\n\t\t\n\t}", "private void drawRoundHead(Canvas canvas, int centerX, int centerY, float degree, int radius, int color){\n double radian = degree * Math.PI / 180;\n double drawX = centerX + Math.cos(radian) * DOWNLOAD_ARC_DRAW_R;\n double drawY = centerY + Math.sin(radian) * DOWNLOAD_ARC_DRAW_R;\n Paint paint = new Paint();\n paint.setColor(color);\n paint.setAntiAlias(true);\n canvas.drawCircle((float)drawX, (float)drawY, radius, paint);\n }", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n float width = (float) getWidth();\n float height = (float) getHeight();\n float radius;\n\n if (width > height) {\n radius = height / 4;\n } else {\n radius = width / 2.1f;\n }\n\n\n Path path = new Path();\n path.addCircle(width ,\n height , radius,\n Path.Direction.CW);\n\n Paint paint = new Paint();\n paint.setColor(getResources().getColor(R.color.colorPrimary));\n new Color();\n paint.setStrokeWidth(10);\n paint.setAlpha(200);\n paint.setStyle(Paint.Style.FILL);\n\n Paint alphaPaint = new Paint();\n //alphaPaint.setColor(Color.BLUE);\n alphaPaint.setStrokeWidth(10);\n alphaPaint.setAlpha(200);\n alphaPaint.setStyle(Paint.Style.FILL);\n //alphaPaint.setStyle(Paint.Style.STROKE);\n alphaPaint.setShader(new LinearGradient(0, 0, 0, getHeight() ,\n Color.parseColor(\"#00000000\"), getResources().getColor(R.color.colorPrimary) , Shader.TileMode.MIRROR));\n\n\n\n float center_x, center_y;\n final RectF oval = new RectF();\n paint.setStyle(Paint.Style.STROKE);\n alphaPaint.setStyle(Paint.Style.STROKE);\n\n center_x = width / 2;\n center_y = height / 2;\n\n //Shader gradient = new SweepGradient(center_x,center_y, Color.WHITE, Color.parseColor(\"#00000000\"));\n //alphaPaint.setShader(gradient);\n\n oval.set(center_x - radius,\n center_y - radius,\n center_x + radius,\n center_y + radius);\n\n canvas.drawArc(oval, 0, 90, false, alphaPaint);\n canvas.drawArc(oval, 90, 180, false, paint);\n\n\n float percent = 50;\n float arcRadius = 360;\n float angle = arcRadius * (percent/100);\n double startX = Math.cos(Math.toRadians(270)) * radius + center_x;\n double startY = Math.sin(Math.toRadians(270)) * radius + center_y;\n double endX = Math.cos(Math.toRadians(270 + angle)) * radius + center_x;\n double endY = Math.sin(Math.toRadians(270 + angle)) * radius + center_y;\n\n Paint paint2 = new Paint();\n paint2.setColor(Color.YELLOW);\n paint2.setStrokeWidth(5);\n paint2.setStyle(Paint.Style.FILL);\n\n canvas.drawCircle((float)startX, (float)startY, 7, paint2);\n //canvas.drawCircle((float)endX, (float)endY, 5, paint2);\n\n\n }", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tswitch(this.getAngle()){\r\n\t\tcase 0 :\r\n\t\t\tg.fillRect(this.getX()+(this.getTaille()/4), this.getY(), this.getTaille()/2, this.getTaille());\r\n\t\t\tbreak;\r\n\t\tcase 90:\r\n\t\t\tg.fillRect(this.getX(), this.getY()+(this.getTaille()/4), this.getTaille(), this.getTaille()/2);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void paint(Graphics g) {\n g.setColor(Color.black);\n g.drawLine(50, 120, 300, 120);\n g.drawRect(50, 150, 250, 100 );\n g.drawRoundRect(50,275,250,100, 25, 25);\n g.setColor(Color.magenta);\n g.fillRect(350, 150, 250, 100);\n g.setColor(Color.black);\n g.drawArc(350, 150, 250, 100, 90, 360);\n g.setColor(Color.magenta);\n g.fillArc(350,275, 250, 100, 90 , 360 );\n g.setColor(Color.black);\n g.drawArc(650, 150, 250, 100, 90, 360);\n g.setColor(Color.magenta);\n g.fillArc(650,150, 250, 100, 0 , 45 );\n g.setColor(Color.black);\n g.drawArc(725, 275, 100, 100, 90, 360);\n }", "public void mo2186a(Canvas canvas, RectF rectF, float f, Paint paint) {\n Canvas canvas2 = canvas;\n RectF rectF2 = rectF;\n float f2 = 2.0f * f;\n float width = (rectF.width() - f2) - 1.0f;\n float height = (rectF.height() - f2) - 1.0f;\n if (f >= 1.0f) {\n float f3 = f + 0.5f;\n float f4 = -f3;\n C0315c.this.f1366a.set(f4, f4, f3, f3);\n int save = canvas.save();\n canvas2.translate(rectF2.left + f3, rectF2.top + f3);\n Paint paint2 = paint;\n canvas.drawArc(C0315c.this.f1366a, 180.0f, 90.0f, true, paint2);\n canvas2.translate(width, 0.0f);\n canvas2.rotate(90.0f);\n canvas.drawArc(C0315c.this.f1366a, 180.0f, 90.0f, true, paint2);\n canvas2.translate(height, 0.0f);\n canvas2.rotate(90.0f);\n canvas.drawArc(C0315c.this.f1366a, 180.0f, 90.0f, true, paint2);\n canvas2.translate(width, 0.0f);\n canvas2.rotate(90.0f);\n canvas.drawArc(C0315c.this.f1366a, 180.0f, 90.0f, true, paint2);\n canvas2.restoreToCount(save);\n float f5 = (rectF2.left + f3) - 1.0f;\n float f6 = rectF2.top;\n canvas.drawRect(f5, f6, (rectF2.right - f3) + 1.0f, f6 + f3, paint2);\n float f7 = (rectF2.left + f3) - 1.0f;\n float f8 = rectF2.bottom;\n canvas.drawRect(f7, f8 - f3, (rectF2.right - f3) + 1.0f, f8, paint2);\n }\n canvas.drawRect(rectF2.left, rectF2.top + f, rectF2.right, rectF2.bottom - f, paint);\n }", "public ResetArc(){}", "public void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tint angleAdHoc = getAngle(model.getNumberOfAdHocCars());\n\t\tint anglePass = getAngle(model.getNumberOfPassCars());\n\t\tint angleRes = getAngle(model.getNumberOfResCars());\n\t\t\n\t\tint ADHCAR = angleAdHoc;\n\t\tint NOPASS = anglePass;\n\t\tint NORES = angleRes;\n\t\t\n\t \tg.setColor(Color.WHITE);\n\t\tg.fillArc(50, 50, 200, 200, 0, 360 );\n\t\tg.drawString(\"4. lege plekken\"+ ADHCAR , 10, 55);\n\t\tg.setColor(Color.RED);\n\t\tg.drawString(\"Auto's\"+ ADHCAR, 10, 10);\n\t\tg.fillArc(50, 50, 200, 200, 90, angleAdHoc);\n\t\tg.setColor(Color.GREEN);\n\t\tg.fillArc(50, 50, 200, 200, 90 + angleAdHoc, anglePass);\n\t\tg.drawString(\"Auto's\" + NOPASS, 10, 25);\n\t\tg.setColor(Color.BLUE);\n\t\tg.fillArc(50, 50, 200, 200, 90 + angleAdHoc + anglePass, angleRes);\n\t\tg.drawString(\"Auto's\"+ NORES, 10, 40);\n\t\tg.setColor(Color.BLACK);\n\t\tg.drawArc(50, 50, 200, 200, 90, 360 + 90);\n\t}", "public void paint(Graphics g) {\n\n Graphics2D g2d = (Graphics2D)g;\n\n // Draw an oval that fills the window\n\n int x = 0;\n\n int y = 0;\n\n int w = getSize().width-1;\n\n int h = getSize().height-1;\n\n /**\n * The coordinate system of a graphics context is such that the origin is at the\n * northwest corner and x-axis increases toward the right while the y-axis increases\n * toward the bottom.\n */\n\n g2d.drawLine(x, y, w, h);\n\n // to draw a filled oval use : g2d.fillOval(x, y, w, h) instead\n\n g2d.drawOval(x, y, w, h);\n\n // to draw a filled rectangle use : g2d.fillRect(x, y, w, h) instead\n\n g2d.drawRect(x, y, w, h);\n\n // A start angle of 0 represents a 3 o'clock position, 90 represents a 12 o'clock position,\n\n // and -90 (or 270) represents a 6 o'clock position\n\n int startAngle = 45;\n\n int arcAngle = -60;\n\n // to draw a filled arc use : g2d.fillArc(x, y, w, h, startAngle, arcAngle) instead\n\n g2d.drawArc(x, y, w/2, h/2, startAngle, arcAngle);\n\n // to draw a filled round rectangle use : g2d.fillRoundRect(x, y, w, h, arcWidth, arcHeight) instead\n\n g2d.drawRoundRect(x, y, w, h, w/2, h/2);\n\n Polygon polygon = new Polygon();\n\n polygon.addPoint(w/4, h/2);\n\n polygon.addPoint(0, h/2);\n\n polygon.addPoint(w/4, 3*h/4);\n\n polygon.addPoint(w/2, 3*h/4);\n\n // Add more points...\n\n // to draw a filled round rectangle use : g2d.fillPolygon(polygon) instead\n\n g2d.drawPolygon(polygon);\n\n }", "protected void renderFilledCircle(Graphics g, int x, int y, int diameter)\n {\n\tx -= diameter/2;\n\ty -= diameter/2;\n\t\n\tg.fillOval(x,y,diameter,diameter);\n\tig.fillOval(x,y,diameter,diameter);\n }", "public void drawRoundRect(int x, int y, int width, int height, int arcWidth,\r\n\t\t\tint arcHeight)\r\n\t{\r\n\t\t// System.out.println(\"drawRoundRect\");\r\n\t}", "@Override\r\n\tpublic void perimetre(Graphics g) {\n\t\tswitch(this.getAngle()){\r\n\t\tcase 0 :\r\n\t\t\tg.drawRect(this.getX()+(this.getTaille()/4), this.getY(), this.getTaille()/2, this.getTaille());\r\n\t\t\tbreak;\r\n\t\tcase 90:\r\n\t\t\tg.drawRect(this.getX(), this.getY()+(this.getTaille()/4), this.getTaille(), this.getTaille()/2);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void drawCenter(Graphics2D g2d) {\n\t\tint width = size * 3/4;\n\t\tint offset = size / 8 + 5;\n\t\t\n\t\tRectangle2D bounds = new Rectangle2D.Double(offset, offset, width, width);\n\t\tArc2D center = new Arc2D.Double(bounds, 100, 350, Arc2D.PIE);\n\n\t\t// stroke\n\t\tg2d.setPaint(darkGrey);\n\t\tg2d.setStroke(new BasicStroke(5.0f));\n\t\tg2d.draw(center);\n\t\t\n\t\t// fill \n\t\tg2d.setPaint(white);\n\t\tg2d.fill(center);\n\t\t\n\t\t// fix for arc stroke\n\t\tEllipse2D circle = new Ellipse2D.Double(offset, offset, width, width);\n\t\tg2d.setPaint(white);\n\t\tg2d.fill(circle);\n\t}", "private Group drawSemiRing() {\n Group root = new Group();\r\n\r\n List<CaseWheel> arcs = new ArrayList<>();\r\n double rayon = 100;\r\n double nbAngle = (360 / 24)-1;\r\n\r\n double startAngle = 8;\r\n\r\n Polygon polygon = new Polygon();\r\n polygon.getPoints().addAll(390.0, 150.0,\r\n 420.0, 160.0,\r\n 420.0, 140.0);\r\n\r\n int cpt=0;\r\n for(int i = 0; i <24; i++){\r\n CaseWheel c = new CaseWheel(cpt,300,150,100,startAngle,nbAngle);\r\n startAngle += nbAngle+1;\r\n c.addTo(root);\r\n arcs.add(c);\r\n cpt++;\r\n }\r\n\r\n root.getChildren().add(polygon);\r\n ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);\r\n\r\n time = System.currentTimeMillis();\r\n int nbMilliRandom = new Random().nextInt(7000 - 3000 + 1) + 3000;\r\n Runnable task1 = new Runnable() {\r\n @Override\r\n public void run() {\r\n Platform.runLater(()->{\r\n\r\n for(CaseWheel n : arcs) {\r\n n.rotateAngle(angle);\r\n if(n.isCurrent()){\r\n System.out.println(n.arc.getStartAngle()+\" \"+n.valueAngle);\r\n System.out.print(\"Case current id : \"+n.id+\"\\n\");\r\n }\r\n }\r\n if(System.currentTimeMillis()-time>nbMilliRandom){\r\n angle-=0.01;\r\n }\r\n if(angle<=0) executor.shutdownNow();\r\n });\r\n }\r\n };\r\n\r\n executor.scheduleAtFixedRate(task1, 0, 16, TimeUnit.MILLISECONDS);\r\n\r\n return root;\r\n }", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制圆形\");\n\t}", "public static void mainDraw(Graphics graphics){\n\n int centerX = WIDTH / 3 ;\n int centerY = HEIGHT / 3;\n int rectA2 = 20 / 2;\n\n graphics.setColor(Color.GREEN);\n graphics.drawRect(centerX - rectA2, centerY - rectA2, rectA2 * 2, rectA2 * 2);\n\n centerX = WIDTH /5 ;\n centerY = HEIGHT / 2;\n rectA2 = 40 / 2;\n\n graphics.setColor(Color.YELLOW);\n graphics.drawRect(centerX - rectA2, centerY - rectA2, rectA2 * 2, rectA2 * 2);\n\n centerX = WIDTH / 2 ;\n centerY = HEIGHT / 6;\n rectA2 = 70 / 2;\n\n graphics.setColor(Color.BLUE);\n graphics.drawRect(centerX - rectA2, centerY - rectA2, rectA2 * 2, rectA2 * 2);\n\n centerX = WIDTH / 2 ;\n centerY = HEIGHT / 2;\n rectA2 = 100 / 2;\n\n graphics.setColor(Color.RED);\n graphics.drawRect(centerX - rectA2, centerY - rectA2, rectA2 * 2, rectA2 * 2);\n\n }", "public static void mainDraw(Graphics graphics) {\n Color[] colors = {Color.green, Color.blue, Color.red, Color.cyan};\n int rectangles[] = {50, 100, 150, 200};\n for (int k = 0; k < 4; k++) {\n toCenter(graphics, rectangles[k], colors[k]);\n }\n }", "private void initTrack(Canvas canvas, boolean isFilled){\n if(circleBroken){\n canvas.drawArc(mOval, 135, 270, isFilled, progressPaint);\n }else {\n canvas.drawArc(mOval, 90, 360, isFilled, progressPaint);\n }\n }", "public void DrawScreen(int scanDegree, boolean dir, java.util.List<Reading> objects) {\r\n cw = window.getWidth();\r\n ch = window.getHeight();\r\n centerX = cw / 2;\r\n centerY = ch;\r\n radius = cw / 2 - 50;\r\n\r\n img = window.createVolatileImage(cw, ch);\r\n g = (Graphics2D) img.getGraphics();\r\n g.setColor(new Color(bgColor, bgColor, bgColor));\r\n g.fillRect(0, 0, img.getWidth(null), img.getHeight(null));\r\n\r\n /* Radar Arcs */\r\n g.setColor(radarColor);\r\n g.setStroke(new BasicStroke(strokeWidth));\r\n\r\n for (int i = 1; i <= divisons; i++) {\r\n int r = i * radius / divisons;\r\n g.drawArc(centerX - r, centerY - r, 2 * r, 2 * r, 0, 180);\r\n }\r\n\r\n /* Draw objects */\r\n g.setColor(ObjectColor);\r\n g.setStroke(new BasicStroke(scanWidth));\r\n int last_val = 0;\r\n int xx, yy;\r\n if (objects != null) {\r\n for (Reading r : objects) {\r\n\r\n float dist = radius * (1 - ((float) r.value-110) / 300.0f);\r\n\r\n \r\n if(r.value>130){// && abs(last_val-r.value)>20) {\r\n xx = centerX - (int) round(dist * cos(r.degree * PI / 180));\r\n yy = centerY - (int) round(dist * sin(r.degree * PI / 180));\r\n g.drawRect(xx, yy, 1, 1);\r\n \r\n if(abs(r.degree-scanDegree)==2){\r\n sound.PlaySound();\r\n }\r\n }\r\n last_val = r.value;\r\n }\r\n }\r\n\r\n /* Trace drawing */\r\n g.setStroke(new BasicStroke(scanWidth));\r\n int dirf = dir ? 1 : -1;\r\n\r\n int R = radarColor.getRed();\r\n int G = radarColor.getGreen();\r\n int B = radarColor.getBlue();\r\n double a = 230f;\r\n\r\n for (int i = 0; i < 40; i++) {\r\n int d = scanDegree + i * dirf;\r\n\r\n if (d < 0 || d > 180)\r\n break;\r\n\r\n g.setColor(new Color(R, G, B, (int) a));\r\n g.drawLine(centerX, centerY, centerX - (int) round(radius * cos(d * PI / 180)),\r\n centerY - (int) round(radius * sin(d * PI / 180)));\r\n\r\n a = a / 1.1f;\r\n }\r\n\r\n /* Print message(s) */\r\n g.setColor(radarColor);\r\n g.setFont(font);\r\n String message;\r\n int y = 50;\r\n while ((message = Logger.next()) != null) {\r\n g.drawString(message, 50, y);\r\n y = y + 20;\r\n }\r\n\r\n // Apply frame\r\n // windowgfx.setColor(Color.BLACK);\r\n windowgfx.drawImage(img, 0, 0, null);\r\n\r\n }", "public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }", "@Override\n public void paintComponent() {\n Graphics2D graphics = gameInstance.getGameGraphics();\n graphics.setColor(Color.ORANGE);\n\n final int diff = (PacmanGame.GRID_SIZE/2) - pointCircleRadius;\n graphics.fill(new Ellipse2D.Double(this.x + diff, this.y + diff, pointCircleRadius*2, pointCircleRadius*2));\n }", "public void draw(){\r\n\r\n\t\t\t//frame of house\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(250,0);\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.move(0,300);\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.move(-250,0);\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(250,150);\r\n\t\t\tpen.down();\r\n\t\t\tpen.move(-250,150);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(0,0);\r\n\t\t\tpen.down();\r\n\r\n\t\t\t//door\r\n\t\t\tpen.setColor(Color.blue);\r\n\t\t\tpen.setWidth(10);\r\n\t\t\tpen.move(50,0);\r\n\t\t\tpen.move(50,100);\r\n\t\t\tpen.move(-50,100);\r\n\t\t\tpen.move(-50,0);\r\n\t\t\tpen.move(0,0);\r\n\r\n\t\t\t//windows\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\t\t\tpen.move(-150,80);\r\n\t\t\tpen.down();\r\n\t\t\tpen.drawCircle(30);\r\n\t\t\tpen.up();\r\n\r\n\t\t\t//extra\r\n\t\t\tpen.move(-45,120);\r\n\t\t\tpen.down();\r\n\t\t\tpen.setColor(Color.black);\r\n\t\t\tpen.drawString(\"This is a house\");\r\n\t}", "public void draw(GraphicsContext gc) {\r\n gc.setStroke(Color.BLACK);\r\n gc.setFill(Color.BLUE);\r\n gc.setLineWidth(5.0);\r\n double r = radius / 2;\r\n gc.fillRect(x - r, y - r, radius * 2, radius * 2);\r\n gc.strokeRect(x - r, y - r, radius * 2, radius * 2);\r\n }", "private void drawCircle(Canvas canvas, float progress, boolean isInHotseatOrHideseat){\n int circleBackColor = 0x3fffffff;//25% alpha of Color.WHITE\n int circleFrontColor = 0xffffffff;//Color.WHITE\n int point[] = getAppIconCenter(isInHotseatOrHideseat);\n int centerX = point[0];\n int centerY = point[1];\n int roundHeadRadius = DOWNLOAD_ARC_WIDTH / 2;\n float sweep = Math.min(360, 360 * progress / 100);\n canvas.save();\n RectF rect = new RectF(centerX - DOWNLOAD_ARC_DRAW_R,\n centerY - DOWNLOAD_ARC_DRAW_R,\n centerX + DOWNLOAD_ARC_DRAW_R,\n centerY + DOWNLOAD_ARC_DRAW_R);\n drawHoloSector(canvas, rect, 0, 360, circleBackColor);\n if ( progress != PROGRESS_NOT_DOWNLOAD ) {\n drawHoloSector(canvas, rect, 270, sweep, circleFrontColor);\n drawRoundHead(canvas, centerX, centerY, 270, roundHeadRadius, circleFrontColor);\n drawRoundHead(canvas, centerX, centerY, 270 + sweep, roundHeadRadius, circleFrontColor);\n }\n canvas.restore();\n }", "@Override\n protected void buildGraphics() {\n GArc rightWing = new GArc(100, 100, -60, 120);\n rightWing.setColor(Color.magenta);\n rightWing.setFilled(true);\n rightWing.setFillColor(Color.magenta);\n // position in format (cx - r, cy - r) for arc\n getGraphics().add(rightWing, (-15 - 50), (0 - 50));\n\n GArc leftWing = new GArc(100, 100, 120, 120);\n leftWing.setColor(Color.magenta);\n leftWing.setFilled(true);\n leftWing.setFillColor(Color.magenta);\n getGraphics().add(leftWing, (-15 - 50), (0 - 50));\n\n GOval rightWingDot = new GOval(-3, -15, 30, 30);\n rightWingDot.setColor(Color.blue);\n rightWingDot.setFilled(true);\n rightWingDot.setFillColor(Color.blue);\n getGraphics().add(rightWingDot);\n\n GOval rightWingDot2 = new GOval(7, -5, 10, 10);\n rightWingDot2.setColor(Color.cyan);\n rightWingDot2.setFilled(true);\n rightWingDot2.setFillColor(Color.cyan);\n getGraphics().add(rightWingDot2);\n\n GLine rightWingLine = new GLine(-15, 0, 35, 0);\n rightWingLine.setColor(Color.green);\n getGraphics().add(rightWingLine);\n\n GOval leftWingDot = new GOval(-57, -15, 30, 30);\n leftWingDot.setColor(Color.blue);\n leftWingDot.setFilled(true);\n leftWingDot.setFillColor(Color.blue);\n getGraphics().add(leftWingDot);\n\n GOval leftWingDot2 = new GOval(-47, -5, 10, 10);\n leftWingDot2.setColor(Color.cyan);\n leftWingDot2.setFilled(true);\n leftWingDot2.setFillColor(Color.cyan);\n getGraphics().add(leftWingDot2);\n\n GLine leftWingLine = new GLine(-15, 0, -65, 0);\n leftWingLine.setColor(Color.green);\n getGraphics().add(leftWingLine);\n\n GOval body = new GOval(-20, -30, 10, 60);\n body.setColor(Color.black);\n body.setFilled(true);\n body.setFillColor(Color.black);\n getGraphics().add(body);\n\n GOval head = new GOval(-23, -43, 16, 16);\n head.setColor(Color.black);\n head.setFilled(true);\n head.setFillColor(Color.black);\n getGraphics().add(head);\n }", "public void med1() {\n DrawingPanel win = new DrawingPanel(WIDTH, HEIGHT);\n java.awt.Graphics g = win.getGraphics();\n win.setTitle(\"Med. 1\");\n win.setLocation(300, 10);\n win.setBackground(java.awt.Color.red);\n for(int y = -10; y < HEIGHT; y += 24) {\n for(int x = -10; x < WIDTH; x += 24) {\n octagon(x, y, g);\n }\n }\n }", "public void drawRadar () {\n // material red (229,28,35)\n // philo red 204,17, 17 \n stroke(229,28,35, 255-cursorRad*(255/cursorRadMax));\n if (cursorRad < cursorRadMax) {\n ellipse(mouseX, mouseY, cursorRad, cursorRad);\n }\n else if (cursorRad > (cursorRadMax + cursorThreshold)) {\n cursorRad = 5;\n }\n cursorRad = cursorRad + cursorDelta;\n noStroke();\n }", "@Override\n public void draw() {\n drawAPI.drawCircle(radius, x, y); \n }", "public void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n canvas.drawArc(this.f3586ds, 180.0f, this.f3587dt, false, this.f3585dr);\n }", "public void draw(Graphics2D g2)\n {\n Random randomGenerator = new Random();\n Ellipse2D.Double object = new Ellipse2D.Double(xLeft, yTop, 50,50);\n g2.setPaint(stars);\n int randomNum = randomGenerator.nextInt(20) + 10;\n for(int i = 0; i < randomNum; i++)\n {\n int randomX = randomGenerator.nextInt(1200);\n int randomY = randomGenerator.nextInt(280);\n g2.fillArc(randomX, randomY, 5,5,0,360);\n }\n g2.setPaint(main);\n g2.fillArc(xLeft,yTop,75,75,0,360);\n g2.setPaint(secondary);\n g2.fillArc(xLeft + 45, yTop + 10,10,10, 0, 360);\n g2.fillArc(xLeft + 20, yTop + 15,15,15, 0, 360);\n g2.fillArc(xLeft + 55, yTop + 50,10,10, 0, 360);\n g2.fillArc(xLeft + 35, yTop + 45,12,12, 0, 360);\n }", "private void drawCircle(GraphicsContext gc, double x, double y) {\r\n GraphicsContext gc1 = myCanvas.getGraphicsContext2D();\r\n gc1.setFill(randomColor());\r\n gc1.fillOval(x - 20, y - 20, 40, 40);\r\n }", "private void drawOnTheCanvasAdvanced(Graphics canvas)\n {\n final int nInputE = Math.round((float)inputE);\n final int nInputF = Math.round((float)inputF);\n // This is a more full-featured\n \n // You could try this: \n // canvas.drawArc(10, 10, 110, 110, 45, 90);\n // Or this:\n // canvas.drawArc(10, 10, 110, 110, 45, nInputE);\n\n }", "public static void setBoard() {\n\t\tStdDraw.setPenColor(StdDraw.BOOK_LIGHT_BLUE);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.filledCircle(200, 800, 35);\n\t\tStdDraw.filledCircle(500, 800, 35);\n\t\tStdDraw.filledCircle(800, 800, 35);\n\t\tStdDraw.filledCircle(200, 200, 35);\n\t\tStdDraw.filledCircle(500, 200, 35);\n\t\tStdDraw.filledCircle(800, 200, 35);\n\t\tStdDraw.filledCircle(200, 500, 35);\n\t\tStdDraw.filledCircle(800, 500, 35);\n\t\tStdDraw.filledCircle(350, 650, 35);\n\t\tStdDraw.filledCircle(500, 650, 35);\n\t\tStdDraw.filledCircle(650, 650, 35);\n\t\tStdDraw.filledCircle(350, 350, 35);\n\t\tStdDraw.filledCircle(500, 350, 35);\n\t\tStdDraw.filledCircle(650, 350, 35);\n\t\tStdDraw.filledCircle(350, 500, 35);\n\t\tStdDraw.filledCircle(650, 500, 35);\n\n\t\tStdDraw.setPenRadius(0.01);\n\t\tStdDraw.line(200, 200, 800, 200);\n\t\tStdDraw.line(200, 800, 800, 800);\n\t\tStdDraw.line(350, 350, 650, 350);\n\t\tStdDraw.line(350, 650, 650, 650);\n\t\tStdDraw.line(200, 500, 350, 500);\n\t\tStdDraw.line(650, 500, 800, 500);\n\t\tStdDraw.line(200, 800, 200, 200);\n\t\tStdDraw.line(800, 800, 800, 200);\n\t\tStdDraw.line(350, 650, 350, 350);\n\t\tStdDraw.line(650, 650, 650, 350);\n\t\tStdDraw.line(500, 800, 500, 650);\n\t\tStdDraw.line(500, 200, 500, 350);\n\n\t\tStdDraw.setPenColor(StdDraw.BLUE);\n\t\tStdDraw.filledCircle(80, 200, 35);\n\t\tStdDraw.filledCircle(80, 300, 35);\n\t\tStdDraw.filledCircle(80, 400, 35);\n\t\tStdDraw.filledCircle(80, 500, 35);\n\t\tStdDraw.filledCircle(80, 600, 35);\n\t\tStdDraw.filledCircle(80, 700, 35);\n\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledCircle(920, 200, 35);\n\t\tStdDraw.filledCircle(920, 300, 35);\n\t\tStdDraw.filledCircle(920, 400, 35);\n\t\tStdDraw.filledCircle(920, 500, 35);\n\t\tStdDraw.filledCircle(920, 600, 35);\n\t\tStdDraw.filledCircle(920, 700, 35);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\n\t}", "@Override\n\t\t\tpublic void drawExtra(Canvas canvas) {\n\t\t\t\tint radius = circleView.getRadius();\n\t\t\t\tfloat strokeWidth = radius/10;\n\t\t\t\toval.left = strokeWidth/2;\n\t\t\t\toval.right = radius*2 - strokeWidth/2;\n\t\t\t\toval.top = strokeWidth/2;\n\t\t\t\toval.bottom = radius*2 - strokeWidth/2;\n\t\t\t\tfloat angle = batteryLevel*360/100;\n\t\t\t\tpaint.setAntiAlias(true);\n\t\t\t\tpaint.setColor(Color.argb(0xee, 0xff, 0x99, 0x22));\n\t\t\t\tpaint.setStyle(Paint.Style.STROKE);\n\t\t\t\tpaint.setStrokeWidth(strokeWidth);\n\t\t\t\tcanvas.drawArc(oval, 0, angle, false, paint);\n\t\t\t}", "void effacer() {\r\n Graphics g = this.zoneDessin.getGraphics();\r\n g.setColor(Color.gray);\r\n g.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n }", "private void m217f() {\n RectF rectF = new RectF(-this.f407h, -this.f407h, this.f407h, this.f407h);\n RectF rectF2 = new RectF(rectF);\n rectF2.inset(-this.f411l, -this.f411l);\n if (this.f408i == null) {\n this.f408i = new Path();\n } else {\n this.f408i.reset();\n }\n this.f408i.setFillType(FillType.EVEN_ODD);\n this.f408i.moveTo(-this.f407h, 0.0f);\n this.f408i.rLineTo(-this.f411l, 0.0f);\n this.f408i.arcTo(rectF2, 180.0f, 90.0f, false);\n this.f408i.arcTo(rectF, 270.0f, -90.0f, false);\n this.f408i.close();\n float f = this.f407h / (this.f407h + this.f411l);\n Paint paint = this.f404e;\n RadialGradient radialGradient = new RadialGradient(0.0f, 0.0f, this.f407h + this.f411l, new int[]{this.f414o, this.f414o, this.f415p}, new float[]{0.0f, f, 1.0f}, TileMode.CLAMP);\n paint.setShader(radialGradient);\n Paint paint2 = this.f405f;\n LinearGradient linearGradient = new LinearGradient(0.0f, (-this.f407h) + this.f411l, 0.0f, (-this.f407h) - this.f411l, new int[]{this.f414o, this.f414o, this.f415p}, new float[]{0.0f, 0.5f, 1.0f}, TileMode.CLAMP);\n paint2.setShader(linearGradient);\n this.f405f.setAntiAlias(false);\n }", "private static void arcTo(\n float rx, float ry, float rotation, boolean outer, boolean clockwise, float x, float y) {\n float tX = mPenX;\n float tY = mPenY;\n\n ry = Math.abs(ry == 0 ? (rx == 0 ? (y - tY) : rx) : ry);\n rx = Math.abs(rx == 0 ? (x - tX) : rx);\n\n if (rx == 0 || ry == 0 || (x == tX && y == tY)) {\n lineTo(x, y);\n return;\n }\n\n float rad = (float) Math.toRadians(rotation);\n float cos = (float) Math.cos(rad);\n float sin = (float) Math.sin(rad);\n x -= tX;\n y -= tY;\n\n // Ellipse Center\n float cx = cos * x / 2 + sin * y / 2;\n float cy = -sin * x / 2 + cos * y / 2;\n float rxry = rx * rx * ry * ry;\n float rycx = ry * ry * cx * cx;\n float rxcy = rx * rx * cy * cy;\n float a = rxry - rxcy - rycx;\n\n if (a < 0) {\n a = (float) Math.sqrt(1 - a / rxry);\n rx *= a;\n ry *= a;\n cx = x / 2;\n cy = y / 2;\n } else {\n a = (float) Math.sqrt(a / (rxcy + rycx));\n\n if (outer == clockwise) {\n a = -a;\n }\n float cxd = -a * cy * rx / ry;\n float cyd = a * cx * ry / rx;\n cx = cos * cxd - sin * cyd + x / 2;\n cy = sin * cxd + cos * cyd + y / 2;\n }\n\n // Rotation + Scale Transform\n float xx = cos / rx;\n float yx = sin / rx;\n float xy = -sin / ry;\n float yy = cos / ry;\n\n // Start and End Angle\n float sa = (float) Math.atan2(xy * -cx + yy * -cy, xx * -cx + yx * -cy);\n float ea = (float) Math.atan2(xy * (x - cx) + yy * (y - cy), xx * (x - cx) + yx * (y - cy));\n\n cx += tX;\n cy += tY;\n x += tX;\n y += tY;\n\n setPenDown();\n\n mPenX = mPivotX = x;\n mPenY = mPivotY = y;\n\n if (rx != ry || rad != 0f) {\n arcToBezier(cx, cy, rx, ry, sa, ea, clockwise, rad);\n } else {\n\n float start = (float) Math.toDegrees(sa);\n float end = (float) Math.toDegrees(ea);\n float sweep = Math.abs((start - end) % 360);\n\n if (outer) {\n if (sweep < 180) {\n sweep = 360 - sweep;\n }\n } else {\n if (sweep > 180) {\n sweep = 360 - sweep;\n }\n }\n\n if (!clockwise) {\n sweep = -sweep;\n }\n\n RectF oval =\n new RectF((cx - rx) * mScale, (cy - rx) * mScale, (cx + rx) * mScale, (cy + rx) * mScale);\n\n mPath.arcTo(oval, start, sweep);\n elements.add(\n new PathElement(\n ElementType.kCGPathElementAddCurveToPoint, new Point[] {new Point(x, y)}));\n }\n }", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(this.color);\r\n\t\tg.fillOval((int)x, (int)y, side, side);\r\n\t\tg.setColor(this.color2);\r\n\t\tg.fillOval((int)x+5, (int)y+2, side/2, side/2);\r\n\t}", "public void drawAngleIndicator(){\n\t\tfloat bottomLineHyp = 60;\n\t\tfloat topLineHyp = 100;\n\t\t\n\t\tfloat bottomXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\tfloat bottomYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\t\n\t\tfloat bottomX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale()) / 2 ) + bottomXCoord;\n\t\tfloat bottomY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale()) / 2 ) + bottomYCoord ;\n\t\t\n\t\tfloat topXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * topLineHyp);\n\t\tfloat topYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * topLineHyp);\n\t\t\n\t\tfloat topX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale() ) / 2 ) + topXCoord;\n\t\tfloat topY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale() ) / 2 ) + topYCoord;\n\t\t\n\t\tShapeRenderer shape = new ShapeRenderer();\n\t\tshape.setColor(Color.BLACK);\n\t\tshape.begin(ShapeType.Line);\n\t\tshape.line(bottomX, bottomY, topX, topY);\n\t\tshape.end();\n\t}", "public void draw(){\n textAlign(CENTER);\n route.update(pp, qq);\n SoundSys();\n fill(0xff31F0FF, 127);\n noStroke();\n ellipse(mouseX, mouseY, 30, 30);\n}", "public void drawOne (Graphics g){\r\n\t\tbeep1.play();\r\n\t\tif (screen == 1){\r\n\t\tg.setColor(Color.RED);\r\n\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t\telse if (screen == 2 || screen == 3){ //Colour Arc's will light up white for non traditional options because it was more convenient and shorter to code :)\r\n\t\tg.setColor(Color.WHITE);\t\r\n\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t\t\r\n\t\tdelay(500);\r\n\r\n\t\tif (screen == 1){\r\n\t\t\tg.setColor(REDFADE);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t\telse if (screen == 2){\r\n\t\t\tg.setColor(PURPLE_1);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t\telse if (screen == 3){\r\n\t\t\tg.setColor(PINK_TROP);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t}\r\n\t}", "public void fillOval(int x, int y, int width, int height) {\n this.paint.setStyle(Paint.Style.FILL_AND_STROKE);\n int left = x;\n int top = y;\n int right = x + width;\n int bottom = y + height;\n canvas.drawOval(new RectF(left, top, right, bottom), paint);\n }", "private void initProgressDrawing(Canvas canvas, boolean isFilled){\n\n if(circleBroken){\n Log.e(TAG, \"circleBroken>>>>>>\"+\"yes\" );\n canvas.drawArc(mOval, 135 + mStartProgress*2.7f, (moveProgress - mStartProgress) * 2.7f, isFilled, progressPaint);\n\n }else {\n Log.e(TAG, \"circleBroken>>>>>>\"+\"no\" );\n canvas.drawArc(mOval, 270 + mStartProgress*3.6f , (moveProgress - mStartProgress) * 3.6f, isFilled, progressPaint);\n }\n\n }", "private void tail(int centerX, int centerY, int radiusX, int radiusY, float angle) {\n Arc arc = new Arc();\n arc.setFill(getColor());\n arc.setType(ArcType.ROUND);\n arc.setRadiusX(radiusX);\n arc.setRadiusY(radiusY);\n arc.setCenterX(centerX);\n arc.setCenterY(centerY);\n arc.setStartAngle(angle);\n arc.setLength(90.0F);\n add(arc);\n }", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }", "@Override\n public void fillRectangle(int x, int y, int width, int height) {\n Rectangle2D rect = new Rectangle2D.Float(x + transX, y + transY, width - 1, height - 1);\n\n checkState();\n getGraphics2D().setPaint(getColor(getSWTGraphics().getBackgroundColor()));\n getGraphics2D().fill(rect);\n }", "public void draw() {\r\n\t\tbackground(255); // Clear the screen with a white background\r\n\r\n\t\ttextSize(12);\r\n\t\tfill(0);\r\n\r\n\t\tstroke(0);\r\n\t\tcurve.draw(this);\r\n\t}", "public void drawOn(DrawSurface surface){\r\n surface.setColor(color);\r\n surface.fillCircle((int)center.getX(),(int)center.getY(),radius);\r\n }", "@Override\n public void draw( Graphics g )\n {\n g.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\n g.setColor( Color.BLUE );\n g.fillOval( baseX, baseY, myWidth, myHeight );\n g.setColor( Color.BLACK );\n g.drawString( card, baseX + 7, baseY + 20 ); }", "public void fillCircle(int x, int y, int radius, int color){\n int f = 1 - radius;\n int ddF_x = 1;\n int ddF_y = -2 * radius;\n int px = 0;\n int py = radius;\n\n hline(x, x, y + radius, color);\n hline(x, x, y - radius, color);\n hline(x - radius, x + radius, y, color);\n\n while(px < py){\n if(f >= 0){\n py--;\n ddF_y += 2;\n f += ddF_y;\n }\n px++;\n ddF_x += 2;\n f += ddF_x;\n hline(x - px, x + px, y + py, color);\n hline(x - px, x + px, y - py, color);\n hline(x - py, x + py, y + px, color);\n hline(x - py, x + py, y - px, color);\n }\n }", "public void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n this.f174a = new Paint();\n RectF rectf = new RectF();\n this.f174a.setColor(-16777216);\n this.f174a.setStyle(Paint.Style.FILL);\n this.f174a.setAntiAlias(true);\n this.f174a.setStrokeWidth(2.0f);\n int r = getMeasuredWidth() > getMeasuredHeight() ? getMeasuredWidth() : getMeasuredHeight();\n rectf.set((float) getPaddingLeft(), (float) getPaddingTop(), (float) (r - getPaddingRight()), (float) (r - getPaddingBottom()));\n canvas.drawArc(rectf, 0.0f, 360.0f, false, this.f174a);\n this.f174a.setColor(-1);\n this.f174a.setStyle(Paint.Style.STROKE);\n canvas.drawArc(rectf, 0.0f, 360.0f, false, this.f174a);\n this.f174a.setStrokeWidth(3.0f);\n canvas.drawLine((float) (getWidth() / 3), (float) (getWidth() / 3), (float) (getWidth() - (getWidth() / 3)), (float) (getWidth() - (getWidth() / 3)), this.f174a);\n canvas.drawLine((float) (getWidth() - (getWidth() / 3)), (float) (getWidth() / 3), (float) (getWidth() / 3), (float) (getWidth() - (getWidth() / 3)), this.f174a);\n }", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n Graphics2D g2d = (Graphics2D)g;\n\n\n g.setColor(Color.black);\n g2d.drawRect(clock_x, clock_y, clock_width, clock_height);\n Font fontClock = new Font(\"Courier\", Font.PLAIN, 130);\n g.setFont(fontClock);\n g.drawString(Long.toString(gameClock.displayTime()), clock_x, clock_y + clock_height);\n \n //enemy area\n //g.setColor(Color.black);\n //g2d.drawRect(enemy_x, enemy_y, enemy_width, enemy_height);\n if(enemyImage != null) {\n g2d.drawImage(enemyImage,\n enemy_x, enemy_y, enemy_width+enemy_x, enemy_height+enemy_y,\n 0, 0, enemyImage.getWidth(null),\n enemyImage.getHeight(null), null); \n } else {\n System.out.println(\"Enemy image is null\");\n }\n \n //draw targets\n for(target t : targets) {\n g.setColor(t.getColor());\n Ellipse2D.Double targ = new Ellipse2D.Double(t.get_x(), t.get_y(), t.get_diam(), t.get_diam());\n g2d.fill(targ);\n //g.drawRect(t.get_x(), t.get_y(), t.get_diam(), t.get_diam());\n Ellipse2D.Double hitCircle = new Ellipse2D.Double(t.get_x() - target_radius / 2, t.get_y() - target_radius / 2, t.get_diam() + target_radius, t.get_diam() + target_radius);\n g2d.draw(hitCircle);\n }\n\n //draw bullet holes\n for(bulletHole b : bullets) {\n //translate circle so that it\n //displays at correct coordinates\n //double translation = Math.sqrt(2 * (Math.pow(bullet_diam / 2, 2)));\n double translation = bullet_diam / 2;\n g.setColor(bulletHole);\n Ellipse2D.Double hole = new Ellipse2D.Double(b.get_x() - translation, b.get_y() - translation, b.get_diam(), b.get_diam());\n g2d.fill(hole);\n }\n\n //end of game\n //... or next round\n switch(end_round()) {\n case(1):\n g.setColor(Color.black);\n g.setFont(new Font(\"Narkisim\", Font.PLAIN, 150));\n current_round++;\n g.drawString(\"Round \"+current_round, 253, 350);\n refreshAll(false);\n break;\n \n case(2):\n g.setColor(Color.black);\n g.setFont(new Font(\"Narkisim\", Font.PLAIN, 135));\n g.drawString(\"You Lose!\", 240, 350);\n \n g.setColor(Color.black);\n Font fontPlayAgain = new Font(\"Mool Boran\", Font.PLAIN, 20);\n g.setFont(fontPlayAgain);\n g.drawString(\"Right Click to play again!\", 400, 400);\n //show score\n //then prompt to replay\n break;\n \n default:\n break;\n }\n }", "protected void drawStartGame(){\n startBorder = new Rectangle(355, 525, 90, 50);\n startBorder.setFillColor(pink);\n startBorder.setFilled(true);\n\n startBox = new Rectangle(360, 530, 80, 40);\n startBox.setFillColor(Color.black);\n startBox.setFilled(true);\n\n startText = new GraphicsText(\"START\", 365, 555);\n startText.setFont(font);\n startText.setStrokeColor(new Color(88, 30, 220));\n\n canvas.add(startBorder);\n canvas.add(startBox);\n canvas.add(startText);\n }", "public void fillRoundRectangle(int x, int y, int width, int height, int radius);", "public void Fill(){\n new FloodFill().floodFill(crossSection, new Point(4, 4), Color.GRAY, Color.BLUE);\n\n ReplaceColor(crossSection, Color.GRAY, Color.TRANSPARENT);\n ReplaceColor(crossSection, Color.YELLOW, Color.TRANSPARENT);\n ReplaceColor(crossSection, Color.BLUE, Color.GRAY);\n\n //crossSection = filling.copy(Bitmap.Config.ARGB_8888, true);\n cutMarks.eraseColor(Color.TRANSPARENT);\n }", "public void fillCircle(Graphics g, int x, int y, int radius)\n\t{\n\t\tg.fillOval(x - radius, y - radius, 2 * radius, 2 * radius);\n\t}", "@Override\n public void run() {\n drawBack(holder);\n drawClock();\n// drawCircle();\n }", "public void setCenterCircleFill(){\n if(solvable){\n solvableCircle.setFill(Color.GREEN);\n }\n else{\n solvableCircle.setFill(Color.RED);\n }\n }", "public void pintarRines(Graphics2D pG) {\n\n\n double cos = 0.829;\n double sin = 0.559;\n int radius = DIAMETER / 2;\n int diameter1 = 2 * DIAMETER / 5;\n int diameter2 = DIAMETER / 5;\n int diameter3 = DIAMETER / 10;\n int delta0 = DIAMETER / 5;\n int delta1 = radius - diameter1 / 2;\n int delta2 = radius - diameter2 / 2;\n int delta3 = radius - diameter3 / 2;\n int d2 = (int) (diameter1 * cos / 2);\n int d1 = (int) (diameter1 * sin / 2);\n\n // Points\n int x1 = x + radius - d2; // Represents the x value in QII and QIII\n int y1 = y + radius - d1; // Represents the y value in QI and QII\n int x2 = x + radius + d2; // Represents the x value in QI and QIV\n int y2 = y + radius + d1; // Represents the y value in QIII and QIV\n int vertX = x+ radius;\n int topY = y + radius - diameter1/2;\n int bottomY = y + radius+diameter1/2;\n\n // Paints circle with diameter1\n pG.setColor(new Color(14, 14, 14));\n pG.fillOval(x + delta1, y + delta1, diameter1, diameter1);\n\n\n // Paint circle with diamater 2\n pG.setColor(Color.DARK_GRAY);\n pG.fillOval(x + delta2, y + delta2, diameter2, diameter2);\n\n\n pG.setColor(Color.DARK_GRAY);\n BasicStroke stroke = new BasicStroke(DIAMETER / 15);\n pG.setStroke(stroke);\n pG.drawLine(x1, y1, x2, y2);\n pG.drawLine(x1,y2,x2,y1);\n pG.drawLine(vertX, topY, vertX, bottomY);\n\n // Draw center donut shape\n pG.setColor(Color.GRAY);\n BasicStroke stroke1 = new BasicStroke(DIAMETER / 50);\n pG.setStroke(stroke1);\n pG.drawOval(x + delta3, y + delta3, diameter3, diameter3);\n\n\n }", "@Override\r\n\tpublic void draw(Graphics g) {\n\t\tg.setColor(Color.PINK);\r\n\t\tg.fillRect(getX(), getY(), getWidth(), getHeight());\r\n\t\t\r\n\t}", "public void paint (Graphics g) {\r\n super.paint (g);\r\n\r\n Graphics2D g2d = (Graphics2D) g;\r\n\r\n g2d.setPaint (new GradientPaint (5, 30, Color.BLUE, 35, 100, \r\n Color.YELLOW, true));\r\n g2d.fill (new Ellipse2D.Double (5, 30, 65, 100));\r\n\r\n g2d.setPaint (Color.RED);\r\n g2d.setStroke (new BasicStroke (10.0f));\r\n g2d.draw (new Rectangle2D.Double (80, 30, 65, 100));\r\n\r\n BufferedImage buffImage = new BufferedImage (10, 10, \r\n BufferedImage.TYPE_INT_RGB);\r\n\r\n Graphics2D gg = buffImage.createGraphics ();\r\n\r\n gg.setColor (Color.YELLOW);\r\n gg.fillRect (0, 0, 10, 10);\r\n\r\n gg.setColor (Color.BLACK);\r\n gg.drawRect (1, 1, 6, 6);\r\n\r\n gg.setColor (Color.BLUE);\r\n gg.fillRect (1, 1, 3, 3);\r\n\r\n gg.setColor (Color.RED);\r\n gg.fillRect (4, 4, 3, 3);\r\n\r\n g2d.setPaint (new TexturePaint (buffImage, new Rectangle (10, 10)));\r\n g2d.fill (new RoundRectangle2D.Double (155, 30, 75, 100, 50, 50));\r\n\r\n g2d.setPaint (Color.WHITE);\r\n g2d.setStroke (new BasicStroke (6.0f));\r\n g2d.draw (new Arc2D.Double (240, 30, 75, 100, 0, 270, Arc2D.PIE));\r\n\r\n float dashes [] = {10};\r\n\r\n g2d.setPaint (Color.YELLOW);\r\n g2d.setStroke (new BasicStroke (4, BasicStroke.CAP_ROUND, \r\n BasicStroke.JOIN_ROUND, 10, dashes, 0));\r\n g2d.draw (new Line2D.Double (320, 30, 395, 150));\r\n }", "@Override\n public void draw() {\n super.draw(); \n double radius = (this.getLevel() * 0.0001 + 0.025) * 2.5e10;\n double x = this.getR().cartesian(0) - Math.cos(rot) * radius;\n double y = this.getR().cartesian(1) - Math.sin(rot) * radius;\n StdDraw.setPenRadius(0.01);\n StdDraw.setPenColor(StdDraw.RED);\n StdDraw.point(x, y);\n \n }", "@Override\r\n\tprotected void draw() {\n\t\tgoodCabbage = new Oval(center.x - CABBAGE_RADIUS, center.y\r\n\t\t\t\t- CABBAGE_RADIUS, 2 * CABBAGE_RADIUS, 2 * CABBAGE_RADIUS,\r\n\t\t\t\tColor.red, true);\r\n\t\twindow.add(goodCabbage);\r\n\t}", "public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark blue\n rect(0,110,600,215);\n rect(0,380,600,215);\n}", "void drawSky()\n {\n \tPaint color = canvas.getFill();\n \tcanvas.setFill(Color.DEEPSKYBLUE);\n \tcanvas.fillRect(0, 0, mainCanvas.getWidth(), mainCanvas.getHeight());\n \tcanvas.setFill(color);\n }", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\n\t\tcanvas.drawArc(mArcRectF, 270, sweepAngle, false, arcPaint);\n\t\tcanvas.drawCircle(mCircleXY, mCircleXY, radius, circlePaint);\n\n\t\ttextPaint.measureText(mShowText, 0, mShowText.length());\n\n\t\tfloat baseLine = (circleWidth / 2)\n\t\t\t\t- ((textPaint.descent() + textPaint.ascent()) / 2);\n\n\t\tcanvas.drawText(mShowText, 0, mShowText.length(), mCircleXY, baseLine,\n\t\t\t\ttextPaint);\n\t}", "@Override\r\n public void paintComponent(Graphics g) {\r\n super.paintComponent(g); g.setColor(Color.ORANGE);\r\n if (drawCirc == 0) {\r\n \tg.fillOval(txtLft,txtTop,txtWidth,txtHeight);\r\n }\r\n }", "public static Arc2D drawArc(Coordinates currentNode,Graphics2D g){\n\t\tArc2D temp= new Arc2D.Double();\n\t\ttemp.setArcByCenter(currentNode.getX()+3, currentNode.getY()-3,150 , 0, 120, Arc2D.PIE);\n\t\tColor c=new Color(1.0f,1.0f,0.0f,.3f );\n\t\tg.setColor(c);\n\t\tg.fill(temp);\n\t\treturn temp;\n\t}", "public void drawAngleInfo(){\n\t\tfont2.draw(batch, (\"The angle of Projection is \" + angle),(float)(screenWidth * .45), 20);\n\t}", "public void show(){\n fill(255);\n stroke(255);\n \n if (left){\n rect(0, y, size, brickLength);\n x = 0;\n }\n else{\n rect(width - size, y, size, brickLength);\n x = width - size;\n }\n }", "@Override public void draw(){\n // this take care of applying all styles (colors/stroke)\n super.draw();\n // draw our shape\n pg.ellipseMode(PGraphics.CORNER); // TODO: make configurable\n pg.ellipse(0,0,getSize().x,getSize().y);\n }", "@Override\n public void fill(GL2 gl) {\n draw(gl);\n }", "public void draw(){\n\t\t int startRX = 100;\r\n\t\t int startRY = 100;\r\n\t\t int widthR = 300;\r\n\t\t int hightR = 300;\r\n\t\t \r\n\t\t \r\n\t\t // start points on Rectangle, from the startRX and startRY\r\n\t\t int x1 = 0;\r\n\t\t int y1 = 100;\r\n\t\t int x2 = 200;\r\n\t\t int y2 = hightR;\r\n\t\t \r\n //direction L - false or R - true\r\n\t\t \r\n\t\t boolean direction = true;\r\n\t\t \t\r\n\t\t\r\n\t\t //size of shape\r\n\t\t int dotD = 15;\r\n\t\t //distance between shapes\r\n\t int distance = 30;\r\n\t\t \r\n\t rect(startRX, startRY, widthR, hightR);\r\n\t \r\n\t drawStripesInRectangle ( startRX, startRY, widthR, hightR,\r\n\t \t\t x1, y1, x2, y2, dotD, distance, direction) ;\r\n\t\t \r\n\t\t super.draw();\r\n\t\t}", "@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(new Color(255, 0, 0));\r\n\t\tg.drawOval(mp1.getX(), mp1.getY(), 3*length, 3*length);\r\n\t\tg.setColor(new Color(0,0,255));\r\n\t\tg.drawOval(enenmy.getX(), enenmy.getY(), 3, 3);\r\n\t}", "public void paint(Graphics g)\r\n/* 58: */ {\r\n/* 59: 40 */ super.paint(g);\r\n/* 60: 41 */ if (this.data.length == 0) {\r\n/* 61: 41 */ return;\r\n/* 62: */ }\r\n/* 63: 42 */ int totalWidth = getWidth();\r\n/* 64: 43 */ int totalHeight = getHeight();\r\n/* 65: 44 */ if ((totalWidth == 0) || (totalHeight == 0)) {\r\n/* 66: 44 */ return;\r\n/* 67: */ }\r\n/* 68: 45 */ int width = this.fillPercentage * totalWidth / 100;\r\n/* 69: 46 */ int height = this.fillPercentage * totalHeight / 100;\r\n/* 70: 47 */ int radius = Math.min(width, height) / 2;\r\n/* 71: 48 */ int xCenter = totalWidth / 2;\r\n/* 72: 49 */ int yCenter = totalHeight / 2;\r\n/* 73: 50 */ drawData(g, radius, xCenter, yCenter);\r\n/* 74: */ }", "public void Display() \n {\n float theta = velocity.heading() + PI/2;\n fill(175);\n stroke(0);\n pushMatrix();\n translate(pos.x,pos.y);\n rotate(theta);\n beginShape();\n vertex(0, -birdSize*2);\n vertex(-birdSize, birdSize*2);\n vertex(birdSize, birdSize*2);\n endShape(CLOSE);\n popMatrix();\n }", "public void clearCircle();", "public void bolita1() {\n noStroke();\n fill(colores[f]);\n ellipse(x, y, d, e);\n }", "@Override\n\tprotected void drawSub(Canvas canvas) {\n\t\tpaint.setTextSize(30);\n\t\tcanvas.drawText(\"Logic View\", rx, 30, paint);\n\t\t\n\t\tcanvas.drawArc(oval, 0, sweepAngle, true, paint);\n\n\t}", "public void paint(Graphics g){\n super.paint(g);\n Graphics2D g2d = (Graphics2D) g;\n g.setColor(Color.WHITE);\n for(int i = 0; i < ROWS; i++){\n g.drawLine(0, i * HEIGHT / ROWS - 1, \n WIDTH, i * HEIGHT / ROWS - 1);\n g.drawLine(0, i * HEIGHT / ROWS - 2, \n WIDTH, i * HEIGHT / ROWS - 2);\n }\n for (int i = 0; i <= COLS; i++) {\n g.drawLine(i * Game.getWindowWidth() / Game.getCols(), 0,\n i * Game.getWindowWidth() / Game.getCols(), HEIGHT);\n g.drawLine(i * Game.getWindowWidth() / Game.getCols() - 1, 0,\n i * Game.getWindowWidth() / Game.getCols() - 1, HEIGHT);\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paintShadow(g2d);\n }\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paint(g2d);\n }\n }\n \n for(Ball b : balls) {\n b.paint(g2d);\n }\n g2d.setColor(Color.BLACK);\n //segment at the top\n g2d.drawLine(0, 0, WIDTH, 0);\n g2d.drawLine(0, 1, WIDTH, 1);\n g2d.drawLine(0, 2, WIDTH, 2);\n //segment at the bottom\n g2d.drawLine(0, HEIGHT, WIDTH, HEIGHT);\n g2d.drawLine(0, HEIGHT + 1, WIDTH, HEIGHT + 1);\n g2d.drawLine(0, HEIGHT + 2, WIDTH, HEIGHT + 2);\n \n for(Point p : corners){\n g2d.drawOval(p.x, p.y, 3, 3);\n }\n\n if(aimStage){\n //draw the firing line\n g2d.setColor(lineColor);\n drawFatPath(g2d, startX, startY, endX, endY);\n g2d.setColor(arrowColor);\n drawArrow(g2d);\n }\n if(mouseHeld){\n// drawFatPath(g, Ball.restPositionX, HEIGHT - Ball.diameter, \n// getEndPoint().x, getEndPoint().y);\n }\n }", "public void draw() {\n\tbackground(bg_count); // set background to something\n\tbg_count = bg_count + bg_dir;\n\tif (bg_count >= 255) {\n\t bg_dir = -1;\n\t} else if (bg_count <= 0) {\n\t bg_count = 0;\n\t bg_dir = 1;\n\t}\n\tellipse_x = ellipse_x + ellipse_x_dir;\n\tellipse_y = ellipse_y - ellipse_y_dir;\n\n\tif (ellipse_x > width) {\n\t ellipse_x_dir = -1;\n\t ellipse_x = width - 1;\n\t} else if (ellipse_x < 0) {\n\t ellipse_x_dir = 1;\n\t ellipse_x = 0;\n\t}\n\tif (ellipse_y > height) {\n\t ellipse_y_dir = -1;\n\t ellipse_y = height - 1;\n\t} else if (ellipse_y < 0) {\n\t ellipse_y_dir = 1;\n\t ellipse_y = 0;\n\t}\n\n\tfill(0, 64, 0);\n\t// x y w h\n\trect(400, 300, 200, 100);\n\n\tfill(212, 111, 249);\n\t\n\tstrokeWeight(4.0f);\n\n\t// x y r1 r2 // can set to mouseX, mouseY\n\tellipse(ellipse_x, ellipse_y, 30, 30);\n\n\t// some draw methods associated with PApplet:\n\t// background(int)\n\t// stroke(int, int, int)\n\t// fill(int)\n\t// ellipse(x, y, radius_1, radius_2)\n\t// noFill()\n\n\t// text(str, x, y)\n }", "public void draw(Graphics g) {\n g.setColor(Color.red);\r\n //g2d.rotate(Math.toRadians(degree), restX-X_SIZE/2 , restY-Y_SIZE/2 );\r\n g.fillOval(deltaX-xSize/2, deltaY-ySize/2, xSize, ySize);\r\n //g2d.setTransform(old);\r\n }", "private void drawArcs(Graphics2D g2d) {\n\t\tContig contig = genome.contigs().get(0);\n\t\tint length = contig.length();\n\t\t\n\t\tfor (Cluster cluster : contig.clusters()) {\n\t\t\tint clusterSize = cluster.size();\n\t\t\tint start = cluster.start();\n\t\t\tdouble offset = ((double) start / length * 350) + 100;\n\t\t\tdouble extent = (double) clusterSize / length * 350;\n\t\t\t\n\t\t\tList<ClusterFamilies> families = cluster.families();\n\t\t\tint numFamilies = families.size();\n\t\t\tSystem.out.println(\"[CircularGenomeGraph] Graphing cluster with \" + numFamilies + \" families\");\n\t\t\t\n\t\t\tif (this.cluster != null && cluster == this.cluster) {\n\t\t\t\tRectangle2D bounds = new Rectangle2D.Double(5, 5, size, size);\n\t\t\t\tArc2D arc = new Arc2D.Double(bounds, offset, extent, Arc2D.PIE);\n\n\t\t\t\tg2d.setPaint(black);\n\t\t\t\tg2d.fill(arc);\n\t\t\t} else {\n\t\t\t\tint o = 5;\n\t\t\t\tint s = size;\n\t\t\t\tfor (int i = 0; i < numFamilies; i++) {\n\t\t\t\t\tRectangle2D bounds = new Rectangle2D.Double(o, o, s, s);\n\t\t\t\t\tArc2D arc = new Arc2D.Double(bounds, offset, extent, Arc2D.PIE);\n\t\t\t\t\t\n\t\t\t\t\tClusterFamilies family = families.get(i);\n\t\t\t\t\tg2d.setPaint(family.color());\n\t\t\t\t\tg2d.fill(arc);\n\t\t\t\t\t\n\t\t\t\t\to += (50/numFamilies);\n\t\t\t\t\ts -= (100/numFamilies);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void paint(Graphics2D g) {\n\t\tg.setColor(Color.WHITE);\n\t\tg.drawOval(this.x,this.y, width,height);\n\t\tg.fillOval(this.x,this.y, width,height);\n\t}", "public static void drawArc(MapLocation start, MapLocation end, MapLocation[] arc) throws GameActionException {\n\t\tint len = arc.length;\n\t\tif (len < 1) {\n\t\t\tdebug_print(\"Arc is screwed up!!!\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint r = 120, g = 120, b = 120;\n\t\tdebug_line(start, arc[0], r, g, b);\t\t// first seg\n\t\tdebug_line(arc[len-1], end, r, g, b);\t// last seg\n\t\tfor (int s = 1; s < len; s++) {\n\t\t\tdebug_line(arc[s-1], arc[s], r, g, b);\t// middle seg\n\t\t}\n\t\t\n\t\tdebug_print(\"Arc sucessfully drawn.\");\n\t\t\n\t}" ]
[ "0.6947974", "0.6841627", "0.6403331", "0.63699496", "0.63675404", "0.6307114", "0.6296748", "0.6268832", "0.6260394", "0.62165236", "0.62140065", "0.61981934", "0.6160322", "0.613004", "0.61073005", "0.61049366", "0.6071827", "0.60427946", "0.597116", "0.59411746", "0.59132046", "0.5900757", "0.5878447", "0.5832468", "0.583161", "0.5798746", "0.57865334", "0.5760532", "0.5753026", "0.57488996", "0.5720691", "0.57150257", "0.56877977", "0.56866837", "0.568461", "0.5670466", "0.56654537", "0.5659296", "0.56487215", "0.56381816", "0.5632026", "0.56218976", "0.5591863", "0.5590766", "0.55781317", "0.5577723", "0.55476403", "0.5537057", "0.5536125", "0.55299383", "0.5523115", "0.5516784", "0.55135435", "0.551289", "0.5509075", "0.55090094", "0.5498692", "0.5497472", "0.54906076", "0.5480231", "0.5477764", "0.5464156", "0.5460763", "0.5459565", "0.5453353", "0.54476714", "0.5446762", "0.5431674", "0.5429177", "0.54280186", "0.54280055", "0.54216105", "0.54181445", "0.54141927", "0.5408884", "0.5400129", "0.5397157", "0.53916615", "0.5388737", "0.5388451", "0.53838164", "0.53756", "0.5373408", "0.5370403", "0.5370089", "0.5367058", "0.5366928", "0.5365578", "0.5361467", "0.5361019", "0.5357261", "0.5351598", "0.53446645", "0.53398424", "0.53243655", "0.532395", "0.5321395", "0.5317553", "0.5314539", "0.53133875", "0.53110313" ]
0.0
-1
return as String definition of bOpt'th building
public String buildingString() { whichBuild = 1 - whichBuild; if (whichBuild == 1) { } return "420 400;10 10 140 60 60 60 10;140 10 240 60 180 60 10;240 10 400 60 320 60 20 ;10 90 120 180 40 90 15;120 90 280 180 160 90 10;280 90 400 180 340 90 10"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String build() {\n StringBuilder sb = new StringBuilder();\n\n appendColor(sb);\n sb.append(flagSymbol);\n appendIndentation(sb);\n appendProperty(sb);\n appendValue(sb);\n appendDefaultColor(sb);\n\n return sb.toString();\n }", "@Override\n public String toString() {\n final StringBuilder sb = new StringBuilder();\n\n if(argsIsSet) {\n for(String arg : args) {\n if(sb.length() > 0) {\n sb.append(' ');\n }\n sb.append(arg);\n }\n }\n else {\n\n // first the options\n if(options.size() > 0) {\n sb.append(DefaultOptionSet.toString(options));\n }\n // operand: <files>\n if(filesIsSet) {\n if(sb.length() > 0) {\n sb.append(' ');\n }\n sb.append(\"--\").append(\"files\");\n sb.append(\" \").append(toString(getFiles()));\n }\n // operand: <paths>\n if(pathsIsSet) {\n if(sb.length() > 0) {\n sb.append(' ');\n }\n sb.append(\"--\").append(\"paths\");\n sb.append(\" \").append(toString(getPaths()));\n }\n // operand: <args>\n if(argsIsSet) {\n if(sb.length() > 0) {\n sb.append(' ');\n }\n sb.append(\"--\").append(\"args\");\n sb.append(\" \").append(toString(getArgs()));\n }\n }\n\n return sb.toString();\n }", "java.lang.String getJavacOpt(int index);", "public String build() {\n\treturn prefixes.toString() + \" \\n CONSTRUCT { \" + variables.toString()\n\t\t+ \" } WHERE { \" + wheres.toString() + \" }\";\n }", "java.lang.String getBuilder();", "public String formatBuild(B build);", "public String toString() {\n \n String str = m_Classifier.getClass().getName();\n \n str += \" \"\n + Utils\n .joinOptions(((OptionHandler) m_Classifier)\n\t .getOptions());\n \n return str;\n \n }", "public String build();", "public String build();", "@Override\n\tpublic String toString(){\n\t\treturn (printBuildingName(type) + \"(\" + printBuildingCost(cost) + \")\");\n\t\t\n\t}", "public String getBuildInfoVerbose() {\n return FxSharedUtils.getFlexiveEditionFull() + \" \" + FxSharedUtils.getFlexiveVersion() + \"/build #\" + FxSharedUtils.getBuildNumber() + \" - \" + FxSharedUtils.getBuildDate();\n }", "private String generateConfigurationString() {\n\t\tStringBuilder configuration = new StringBuilder();\n\t\tconfigurationHolder.entrySet().stream().forEach(line -> {\n\t\t\tconfiguration.append(line.getKey()+\"=\"+line.getValue()+\"\\n\");\n\t\t});\n\t\treturn configuration.toString();\n\t}", "public String toString(){ \n //--------------------------------------------------------------------------- \n StringBuffer buffer=new StringBuffer(\"*****GeneratorProperties:\"); \n buffer.append(\"\\tdatabaseDriver\"+databaseDriver); \n buffer.append(\"\\turlString\"+urlString); \n buffer.append(\"\\tuserName=\"+userName); \n buffer.append(\"\\tpassword=\"+password); \n buffer.append(\"\\tpackageName=\"+packageName); \n buffer.append(\"\\toutputDirectory=\"+outputDirectory); \n buffer.append(\"\\tjarFilename=\"+jarFilename); \n buffer.append(\"\\twhereToPlaceJar=\"+whereToPlaceJar); \n buffer.append(\"\\ttmpWorkDir=\"+tmpWorkDir); \n buffer.append(\"\\taitworksPackageBase=\"+aitworksPackageBase); \n buffer.append(\"\\tincludeClasses=\"+includeClasses); \n buffer.append(\"\\tincludeSource=\"+includeSource); \n buffer.append(\"\\tgeneratedClasses=\"+generatedClasses); \n return buffer.toString();\n }", "private String descFormat() {\n File f = cfg.getReadFromFile();\n if (f != null) {\n return f.getPath();\n }\n return StringUtils.defaultString(cfg.getName(), \"(unnamed)\");\n }", "public String toString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif(isFlag()==true){\n\t\t\t\tif(isDownBlock()==true){\n\t\t\t\t\tsb.append(\"g\"); //use G represent the goal\n\t\t\t\t\t\t\t\t\t\t// if down block is a block use small letter\n\t\t\t\t}\n\t\t\t\telse if(isRobot()==true){\n\t\t\t\t\tsb.append(\"V\"); //flag and robot on same position VICTORY!\n\t\t\t\t}\n\t\t\t\telse sb.append(\"G\"); \t\t\n\t\t\t}\n\t\telse if(isRobot()==true){\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"r\");//use R represent the Robot\n\t\t\t\t\t// if down move is a block use small letter\n\t\t\t}\n\t\t\telse sb.append(\"R\");\n\t\t}\n\t\telse{\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"_\"); \n\t\t\t\t//if down move is blocked then use underline\n\t\t\t}\n\t\t\telse sb.append(\"O\"); // use o represent the grid\n\t\t}\n\t\t\t\n\t\tif(isRightBlock()==true){\n\t\t\tsb.append(\"|\"); //best way to represent right block\n\t\t}\n\t\telse{\n\t\t\tsb.append(\" \"); // if no block just a space\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String getHelp(){\r\n\t\tString out=\"\";\r\n\r\n\t\tout+=this.beforeTextHelp;\r\n\r\n\t\t//uso\r\n\t\tout += \"\\nUsage: \"+this.programName+\" \";\r\n\t\t//short arg\r\n\t\tout += \"[\";\r\n\t\tint i = 0;\r\n\t\twhile(i<opts.size()){\r\n\t\t\tout += \"-\"+opts.get(i).getArgument();\r\n\t\t\tif(i<opts.size()-1){out+=\"|\";}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tout += \"] \";\r\n\r\n\t\t//long arg\r\n\t\tout += \"[\";\r\n\t\ti = 0;\r\n\t\twhile(i<opts.size()){\r\n\t\t\tout += \"--\"+opts.get(i).getLongArgument();\r\n\t\t\tif(i<opts.size()-1){out+=\"|\";}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tout += \"]\\n\\n\";\r\n\r\n\t\tout += \"*\\tArgument required\\n\";\r\n\t\tout += \"**\\tValue required\\n\\n\";\r\n\r\n\t\t//lista degli argomenti\r\n\t\ti = 0;\r\n\t\twhile(i<opts.size()){\r\n\t\t\tout += \"-\"+opts.get(i).getArgument()+\"\\t\"; //short arg\r\n\t\t\tif(opts.get(i).getLongArgument().equals(null)){out += \"\\t\\t\";}else{out += \"--\"+opts.get(i).getLongArgument()+\"\\t\";} //long arg\r\n\t\t\tout += opts.get(i).getDescription()+\"\\n\";//description\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tout +=\"\\n\";\t\r\n\r\n\t\tout+=this.afterTextHelp;\r\n\r\n\t\tout +=\"\\n\";\r\n\t\treturn out;\r\n\t}", "public String produceHelpMessage() {\n\t\t// first calculate how much space is necessary for the options\n\t\tint maxlen = 0;\n\t\tfor (OptionContainer oc : options) {\n\t\t\tfinal String shorta = oc.getShort();\n\t\t\tfinal String longa = oc.getLong();\n\t\t\tint len = 0;\n\t\t\tif (shorta != null)\n\t\t\t\tlen += shorta.length() + 1 + 1;\n\t\t\tif (longa != null)\n\t\t\t\tlen += longa.length() + 1 + (longa.charAt(0) == 'X' ? 0 : 1) + 1;\n\t\t\t// yes, we don't care about branch mispredictions here ;)\n\t\t\tif (maxlen < len)\n\t\t\t\tmaxlen = len;\n\t\t}\n\n\t\t// get the individual strings\n\t\tfinal StringBuilder ret = new StringBuilder();\n\t\tfor (OptionContainer oc : options) {\n\t\t\tret.append(produceHelpMessage(oc, maxlen));\n\t\t}\n\n\t\treturn ret.toString();\n\t}", "public String getOptionsAsString() {\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (!runtimeKeys.get(i))\n buf.append(key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (runtimeKeys.get(i))\n buf.append(\"* \" + key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\treturn buf.toString();\n\t}", "public java.lang.String getBuilder() {\n java.lang.Object ref = builder_;\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 builder_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String toCmdLine() {\n\t\tif( Utils.isEmpty(value) ) {\n\t\t\treturn prefix + name;\n\t\t}\n\t\t\n\t\t/*\n\t\t * check \n\t\t */\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor( String v : getAll() ) {\n\t\t\tif( result.length()>0 ) result.append(\" \");\n\t\t\tresult\n\t\t\t\t.append(prefix) \n\t\t\t\t.append(name)\n\t\t\t\t.append(separator)\n\t\t\t\t.append(v);\n\t\t}\n\t\t\n\t\treturn result.toString();\n\t}", "public String getDefaultBuilder() {\n\n\t\treturn this.defaultBuilder;\n\t}", "@java.lang.Override\n public java.lang.String getBuilder() {\n java.lang.Object ref = builder_;\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 builder_ = s;\n return s;\n }\n }", "@Override\n\tpublic String toString()\n\t{\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(\"Init: \" + initialState.toString() + \"\\n\");\n\t\tbuffer.append(\"Goal: \" + explicitGoal.toString() + \"\\n\");\n\t\tbuffer.append(\"Vars: \");\n\t\tfor (int var = 0; var < variableNames.size(); var++)\n\t\t{\n\t\t\tbuffer.append(var + \":\" + domainSizes.get(var) + \" \");\n\t\t}\n\t\tbuffer.append(\"\\n\");\n\t\tbuffer.append(\"Num ops: \" + getOperators().size() + \"\\n\");\n\t\treturn buffer.toString();\n\t}", "public String getBuiltOnStr() {\n return builtOn;\n }", "String buildVersion();", "public String getBuildInfo() {\n return FxSharedUtils.getFlexiveEdition() + \" \" + FxSharedUtils.getFlexiveVersion();\n }", "protected String getBuilderNameFor( final String filename )\n throws AntException\n {\n return DEFAULT_BUILDER;\n }", "default String toHelpString() {\n // Builder\n StringBuilder builder = new StringBuilder();\n // Name\n builder.append(ChatColor.RED).append(getName()).append(\" \");\n // Parameter\n Iterator<PowreedCommandParameter> iterator = this.getParameters().iterator();\n while (iterator.hasNext()) {\n PowreedCommandParameter next = iterator.next();\n\n if (next.isRequired()) {\n builder.append(ChatColor.GOLD).append(\"<\").append(next.getName()).append(\">\");\n } else {\n builder.append(ChatColor.DARK_GRAY).append(\"[\").append(next.getName()).append(\"]\");\n }\n\n if (iterator.hasNext()) {\n builder.append(\" \");\n }\n }\n // Description\n builder.append(ChatColor.RED).append(\": \").append(ChatColor.GRAY).append(getDescription());\n // Return to string\n return builder.toString();\n }", "private String constructGeneralArgs() {\n StringBuilder cmd = new StringBuilder();\n\n cmd.append(size).append(ExternalExecutor.TOKEN_SEP);\n\n cmd.append(writeDataPipeFile).append(ExternalExecutor.TOKEN_SEP);\n cmd.append(readDataPipeFile).append(ExternalExecutor.TOKEN_SEP);\n\n cmd.append(writePipeFiles.length).append(ExternalExecutor.TOKEN_SEP);\n for (int i = 0; i < writePipeFiles.length; ++i) {\n cmd.append(writePipeFiles[i]).append(ExternalExecutor.TOKEN_SEP);\n }\n\n cmd.append(readPipeFiles.length).append(ExternalExecutor.TOKEN_SEP);\n for (int i = 0; i < readPipeFiles.length; ++i) {\n cmd.append(readPipeFiles[i]).append(ExternalExecutor.TOKEN_SEP);\n }\n\n return cmd.toString();\n }", "protected String buildConfigString() {\n if (multicastAddress == null) {\n throw new IllegalStateException(\"'multcastAddress' is not set\");\n }\n\n if (multicastPort == null) {\n throw new IllegalStateException(\"'multcastPort' is not set\");\n }\n\n return \"UDP(mcast_addr=\"\n + multicastAddress\n + \";mcast_port=\"\n + multicastPort\n + \";ip_ttl=32):\"\n + \"PING(timeout=3000;num_initial_members=6):\"\n + \"FD(timeout=3000):\"\n + \"VERIFY_SUSPECT(timeout=1500):\"\n + \"pbcast.NAKACK(gc_lag=10;retransmit_timeout=600,1200,2400,4800):\"\n + \"pbcast.STABLE(desired_avg_gossip=10000):\"\n + \"FRAG:\"\n + \"pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;\"\n + \"shun=true;print_local_addr=false)\";\n }", "public String toString_long() {\n StringBuffer sb = new StringBuffer();\n if (addedEdges != null) {\n sb.append(\" writes: \");\n for (Iterator i=addedEdges.entrySet().iterator(); i.hasNext(); ) {\n java.util.Map.Entry e = (java.util.Map.Entry)i.next();\n jq_Field f = (jq_Field)e.getKey();\n Object o = e.getValue();\n if (o == null) continue;\n sb.append(f);\n sb.append(\"={\");\n if (o instanceof Node)\n sb.append(((Node)o).toString_short());\n else {\n for (Iterator j=((Set)o).iterator(); j.hasNext(); ) {\n sb.append(((Node)j.next()).toString_short());\n if (j.hasNext()) sb.append(\", \");\n }\n }\n sb.append(\"} \");\n }\n }\n if (accessPathEdges != null) {\n sb.append(\" reads: \");\n sb.append(accessPathEdges);\n }\n if (passedParameters != null) {\n sb.append(\" called: \");\n sb.append(passedParameters);\n }\n return sb.toString();\n }", "public String buildingString2() {\r\n\t\twhichBuild = 1 - whichBuild;\r\n\t\tif (whichBuild == 1) {\r\n\r\n\t\t}\r\n\t\treturn \"400 400;10 10 90 140 70 140 20;90 10 320 70 220 70 10;10 180 100 380 60 180 15;100 180 320 380 200 180 20;320 10 400 380 320 110 25\";\r\n\t}", "public String getVCML() {\n\n\t\t//\n\t\t// write format as follows:\n\t\t//\n\t\t// SolverTaskDescription {\n\t\t//\t\tTaskType Unsteady\n\t\t//\t\tMaxTime 1\n\t\t//\t\tSolverDescription \"Runga-Kutta Fehlberg\"\n\t\t//\t\tUseSymbolicJacobian false\n\t\t//\t\tTimeBounds {\n\t\t//\t\t\tStartingTime\t0.0\n\t\t//\t\t\tEndingTime\t\t0.0\n\t\t//\t\t}\n\t\t//\t\tTimeStep {\n\t\t//\t\t\tDefaultTimeStep\t\t0.0\n\t\t//\t\t\tMinimumTimeStep\t\t0.0\n\t\t//\t\t\tMaximumTimeStep\t\t0.0\n\t\t//\t\t}\n\t\t//\t\tErrorTolerance {\n\t\t//\t\t\tAbsoluteErrorTolerance 1e-8\n\t\t//\t\t\tRelativeErrorTolerance 1e-4\n\t\t//\t\t}\n\t\t// \tStochSimOptions {\n\t\t//\t\t\tUseCustomSeed\tfalse\n\t\t//\t\t\tCustomSeed\t0\n\t\t//\t\t\tNumOfTrials\t1\n\t\t// //if Hybrid, we have following four more\n\t\t// Epsilon 100\n\t\t// Lambda 10\n\t\t// MSRTolerance 0.01\n\t\t// SDETolerance 1e-4\n\t\t// \t}\n\t\t//\t\tStopAtSpatiallyUniform {\n\t\t//\t\t\tAbsoluteErrorTolerance\t1e-8\n\t\t//\t\t\tRelativeErrorTolerance 1e-4\n\t\t//\t\t}\n\t\t//\t\tNFSimSimulationOptions {\n\t\t//\t\t\tObservableComputationOff 1\n\t\t//\t\t\tMoleculeDistance 1000\n\t\t//\t\t\t...\n\t\t//\t\t\tNumOfTrials\t1\n\t\t//\t\t}\n\t\t// RunParameterScanSerially false\n\t\t//\t\tKeepEvery 1\n\t\t//\t\tKeepAtMost\t1000\n\t\t//\t\tSensitivityParameter {\n\t\t//\t\t\tConstant k1 39.0;\n\t\t//\t\t}\n\t\t//\t\tNumProcessors 1\n\t\t// }\n\t\t//\n\t\t//\n\t\tStringBuffer buffer = new StringBuffer();\n\n\t\tbuffer.append(VCML.SolverTaskDescription+\" \"+VCML.BeginBlock+\"\\n\");\n\n\t\tif (getTaskType() == TASK_UNSTEADY){\n\t\t\tbuffer.append(VCML.TaskType+\" \"+VCML.TaskType_Unsteady+\"\\n\");\n\t\t}else if (getTaskType() == TASK_STEADY){\n\t\t\tbuffer.append(VCML.TaskType+\" \"+VCML.TaskType_Steady+\"\\n\");\n\t\t}else{\n\t\t\tthrow new RuntimeException(\"unexpected task type\");\n\t\t}\n\n\t\tbuffer.append(VCML.SolverDescription+\" \\\"\"+getSolverDescription().getDatabaseName()+\"\\\"\"+\"\\n\");\n\n\t\tbuffer.append(VCML.UseSymbolicJacobian+\" \"+getUseSymbolicJacobian()+\"\\n\");\n\n\t\tbuffer.append(getTimeBounds().getVCML()+\"\\n\");\n\n\t\tbuffer.append(getTimeStep().getVCML()+\"\\n\");\n\n\t\tbuffer.append(getErrorTolerance().getVCML()+\"\\n\");\n\n\t\tif(getStochOpt() != null)\n\t\t\tbuffer.append(getStochOpt().getVCML()+\"\\n\");\n\n\t\tbuffer.append(fieldOutputTimeSpec.getVCML() + \"\\n\");\n\n\t\tif (getSensitivityParameter()!=null){\n\t\t\tbuffer.append(VCML.SensitivityParameter+\" \"+VCML.BeginBlock+\"\\n\");\n\t\t\tbuffer.append(getSensitivityParameter().getVCML()+\"\\n\");\n\t\t\tbuffer.append(VCML.EndBlock+\"\\n\");\n\t\t}\n\n\t\tif (stopAtSpatiallyUniformErrorTolerance != null) {\n\t\t\tbuffer.append(VCML.StopAtSpatiallyUniform + \" \" + stopAtSpatiallyUniformErrorTolerance.getVCML() + \"\\n\");\n\t\t}\n\n\t\tif (bSerialParameterScan) {\n\t\t\tbuffer.append(VCML.RunParameterScanSerially + \" \" + bSerialParameterScan + \"\\n\");\n\t\t}\n\t\tif (nfsimSimulationOptions != null) {\n\t\t\tbuffer.append(nfsimSimulationOptions.getVCML());\n\t\t}\n\t\tif (langevinSimulationOptions != null) {\n\t\t\tbuffer.append(langevinSimulationOptions.getVCML());\n\t\t}\n\t\tif (smoldynSimulationOptions != null) {\n\t\t\tbuffer.append(smoldynSimulationOptions.getVCML());\n\t\t}\n\t\tif (sundialsPdeSolverOptions != null) {\n\t\t\tbuffer.append(sundialsPdeSolverOptions.getVCML());\n\t\t}\n\n\t\tif (chomboSolverSpec != null) {\n\t\t\tbuffer.append(chomboSolverSpec.getVCML()+\"\\n\");\n\t\t}\n\t\tbuffer.append(\"\\t\" + VCML.NUM_PROCESSORS + \" \" + numProcessors + \"\\n\");\n\t\tif (bTimeoutDisabled) {\n\t\t\tbuffer.append(VCML.TimeoutSimulationDisabled + \" \" + bTimeoutDisabled + \"\\n\");\n\t\t}\n\t\tif (bBorderExtrapolationDisabled) {\n\t\t\tbuffer.append(VCML.BorderExtrapolationDisabled + \" \" + bBorderExtrapolationDisabled + \"\\n\");\n\t\t}\n\n\t\tif (movingBoundarySolverOptions != null) {\n\t\t\tbuffer.append(movingBoundarySolverOptions.getVCML()+\"\\n\");\n\t\t}\n\t\tbuffer.append(VCML.EndBlock+\"\\n\");\n\n\t\treturn buffer.toString();\n\t}", "public static String getAppBuild() {\n \t\tif (props.containsKey(\"app.build\")) {\n \t\t\treturn props.getProperty(\"app.build\");\n \t\t} else {\n \t\t\treturn \"unspecified\";\n \t\t}\n \t}", "public String getSolutionDotFormat() {\n StringBuilder solution = new StringBuilder();\n\n String input = \"\\\"Workflow INPUT\\\"\";\n String output = \"\\\"Workflow OUTPUT\\\"\";\n boolean inputDefined = false;\n boolean outputDefined = false;\n\n for (TypeNode workflowInput : this.workflowInputTypeStates) {\n if (!inputDefined) {\n solution.append(input + \" [shape=box, color = red];\\n\");\n inputDefined = true;\n }\n solution.append(input + \"->\" + workflowInput.getNodeID() + \";\\n\");\n solution.append(workflowInput.getDotDefinition());\n }\n\n for (ModuleNode currTool : this.moduleNodes) {\n solution.append(currTool.getDotDefinition());\n for (TypeNode toolInput : currTool.getInputTypes()) {\n if (!toolInput.isEmpty()) {\n solution.append(\n toolInput.getNodeID() + \"->\" + currTool.getNodeID() + \"[label = in, fontsize = 10];\\n\");\n }\n }\n for (TypeNode toolOutput : currTool.getOutputTypes()) {\n if (!toolOutput.isEmpty()) {\n solution.append(toolOutput.getDotDefinition());\n solution.append(\n currTool.getNodeID() + \"->\" + toolOutput.getNodeID() + \" [label = out, fontsize = 10];\\n\");\n }\n }\n }\n for (TypeNode workflowOutput : this.workflowOutputTypeStates) {\n if (!outputDefined) {\n solution.append(output + \" [shape=box, color = red];\\n\");\n outputDefined = true;\n }\n solution.append(workflowOutput.getDotDefinition());\n solution.append(workflowOutput.getNodeID() + \"->\" + output + \";\\n\");\n }\n\n return solution.toString();\n }", "public String getProjectBuilder() {\n\t\treturn projectBuilder;\n\t}", "public ProcessBuilder buildCommand() {\n return null;\n }", "public String toString() {\n/* 57 */ return (this.suffix == null) ? (this.major + \".\" + this.minor + \".\" + this.release) : (this.major + \".\" + this.minor + \".\" + this.release + this.suffix);\n/* */ }", "String getOutputName();", "public String getConfigString()\n {\n return debug ? \"debug\" : \"release\";\n }", "public String optionToString() {\n return new StringBuffer().append(\"<\").append(base16.toString(this.data)).append(\">\").toString();\n }", "C getConfiguration();", "public java.lang.String getBUILDING()\n {\n \n return __BUILDING;\n }", "public Label getLabel() {\n return pkgBuilder.getBuildFileLabel();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getConfiguration() != null)\n sb.append(\"Configuration: \").append(getConfiguration()).append(\",\");\n if (getGrafanaVersion() != null)\n sb.append(\"GrafanaVersion: \").append(getGrafanaVersion()).append(\",\");\n if (getWorkspaceId() != null)\n sb.append(\"WorkspaceId: \").append(getWorkspaceId());\n sb.append(\"}\");\n return sb.toString();\n }", "private static String optionsListing() {\n\t\tString result = \"\\nUsage: java -jar comtor.jar -dir dirname\\n\\n\";\n\t\tresult += \"Options:\\n\";\n\t\t\n\t\tresult += \"-dir dirname\\t\\tSpecified the pathname of the directory in which COMTOR will \"; \n\t\tresult += \"search for Java source code\\n\\t\\t\\tfiles (packaged and non-packaged).\\n\\n\";\n\t\t\n\t\tresult += \"-help | --help\\t\\tThis help message\\n\";\n\t\tresult += \"\\n\\n\";\n\t\treturn result;\n\t}", "public void buildCommandLine(StringBuilder sb) {\r\n super.buildCommandLine(sb);\r\n SelectControlParameters.appendToCommandLine(this, sb);\r\n QueryParameters.appendToCommandLine(this, sb);\r\n QAlgorithmParameters.appendToCommandLine(this, sb, false);\r\n if (getInventoryOnly() != TriState.NOT_SPECIFIED) {\r\n sb.append(String.format(\"-io%s\", new Object[]{getInventoryOnly().getArgument()}));\r\n }\r\n if (getWriteMode() != WriteMode.NOT_SPECIFIED) {\r\n sb.append(String.format(\"-wm%s\", new Object[]{getWriteMode().getArgument()}));\r\n }\r\n if (getQtMode() != QtMode.NOT_SPECIFIED) {\r\n sb.append(String.format(\"-qm%s\", new Object[]{getQtMode().getArgument()}));\r\n }\r\n if (getImpinjBlockWriteMode() != ImpinjBlockWriteMode.NOT_SPECIFIED) {\r\n sb.append(String.format(\"-wx%s\", new Object[]{getImpinjBlockWriteMode().getArgument()}));\r\n }\r\n }", "public String toShortString() {\n LogBuilder lb = new LogBuilder(32);\n lb.add(getModeString(), \" \", transportable);\n Location lt = getTransportTarget();\n lb.add(\" @ \", ((lt == null) ? \"null\" : lt.toShortString()));\n Location ct = getCarrierTarget();\n if (ct != lt) lb.add(\"/\", ct.toShortString());\n return lb.toString();\n }", "com.google.protobuf.ByteString\n getJavacOptBytes(int index);", "public String getToolFlags() throws BuildException ;", "java.lang.String getOutput();", "public interface ITool extends IBuildObject, IHoldsOptions {\n\t// Schema element names\n\tpublic static final String COMMAND = \"command\";\t//$NON-NLS-1$\n\tpublic static final String COMMAND_LINE_PATTERN = \"commandLinePattern\"; //$NON-NLS-1$\n\tpublic static final String COMMAND_LINE_GENERATOR = \"commandLineGenerator\"; //$NON-NLS-1$\n\tpublic static final String DEP_CALC_ID =\"dependencyCalculator\"; //$NON-NLS-1$\n\tpublic static final String INTERFACE_EXTS = \"headerExtensions\";\t//$NON-NLS-1$\n\tpublic static final String NATURE =\t\"natureFilter\";\t//$NON-NLS-1$\n\tpublic static final String OUTPUT_FLAG = \"outputFlag\";\t//$NON-NLS-1$\n\tpublic static final String INPUT_TYPE = \"inputType\";\t//$NON-NLS-1$\n\tpublic static final String OUTPUT_TYPE = \"outputType\";\t//$NON-NLS-1$\n\tpublic static final String OUTPUT_PREFIX = \"outputPrefix\";\t//$NON-NLS-1$\n\tpublic static final String OUTPUTS = \"outputs\";\t//$NON-NLS-1$\n\tpublic static final String SOURCES = \"sources\";\t//$NON-NLS-1$\n\tpublic static final String ADVANCED_INPUT_CATEGORY = \"advancedInputCategory\";\t//$NON-NLS-1$\n\tpublic static final String CUSTOM_BUILD_STEP = \"customBuildStep\";\t//$NON-NLS-1$\n\tpublic static final String ANNOUNCEMENT = \"announcement\";\t//$NON-NLS-1$\n\tpublic static final String TOOL_ELEMENT_NAME = \"tool\";\t//$NON-NLS-1$\n\tpublic static final String WHITE_SPACE = \" \";\t//$NON-NLS-1$\n\tpublic static final String EMPTY_STRING = \"\";\t//$NON-NLS-1$\n\tpublic static final String IS_SYSTEM = \"isSystem\";\t\t\t\t\t\t\t//$NON-NLS-1$\n\t\n\tpublic static final String VERSIONS_SUPPORTED = \"versionsSupported\";\t//$NON-NLS-1$\n\tpublic static final String CONVERT_TO_ID = \"convertToId\";\t\t\t\t//$NON-NLS-1$\n\tpublic static final String OPTIONPATHCONVERTER = \"optionPathConverter\";\t\t\t\t//$NON-NLS-1$\n\t\n\tpublic static final String SUPPORTS_MANAGED_BUILD = \"supportsManagedBuild\"; //$NON-NLS-1$\n\t\n\n\tpublic static final int FILTER_C = 0;\n\tpublic static final int FILTER_CC = 1;\n\tpublic static final int FILTER_BOTH = 2;\n\n\t/**\n\t * Returns the tool-chain or resource configuration that is the parent of this tool.\n\t * \n\t * @return IBuildObject\n\t */\n\tpublic IBuildObject getParent();\n\n\t/**\n\t * Creates a child InputType for this tool.\n\t * \n\t * @param InputType The superClass, if any\n\t * @param String The id for the new InputType \n\t * @param String The name for the new InputType\n\t * @param boolean Indicates whether this is an extension element or a managed project element\n\t * \n\t * @return IInputType\n\t * @since 3.0\n\t */\n\tpublic IInputType createInputType(IInputType superClass, String Id, String name, boolean isExtensionElement);\n\n\t/**\n\t * Removes an InputType from the tool's list.\n\t * \n\t * @param type\n\t * @since 3.0\n\t */\n\tpublic void removeInputType(IInputType type);\n\t\n\t/**\n\t * Returns the complete list of input types that are available for this tool.\n\t * The list is a merging of the input types specified for this tool with the \n\t * input types of its superclasses. The lowest input type instance in the hierarchy\n\t * takes precedence. \n\t * \n\t * @return IInputType[]\n\t * @since 3.0\n\t */\n\tpublic IInputType[] getInputTypes();\n\n\t/**\n\t * Returns the <code>IInputType</code> in the tool with the specified \n\t * ID. This is an efficient search in the receiver.\n\t * \n\t * <p>If the receiver does not have an InputType with that ID, the method \n\t * returns <code>null</code>. It is the responsibility of the caller to \n\t * verify the return value. \n\t * \n\t * @param id unique identifier of the InputType to search for\n\t * @return <code>IInputType</code>\n\t * @since 3.0\n\t */\n\tpublic IInputType getInputTypeById(String id);\n\n\t/**\n\t * Returns the <code>IInputType</code> in the tool that uses the \n\t * specified extension.\n\t * \n\t * <p>If the receiver does not have an InputType that uses the extension, \n\t * the method returns <code>null</code>. It is the responsibility of the \n\t * caller to verify the return value. \n\t * \n\t * @param inputExtension File extension\n\t * @return <code>IInputType</code>\n\t * @since 3.0\n\t */\n\tpublic IInputType getInputType(String inputExtension);\n\n\t/**\n\t * Returns the primary <code>IInputType</code> in this tool\n\t * \n\t * <p>If the receiver has no InputTypes, \n\t * the method returns <code>null</code>. It is the responsibility of the \n\t * caller to verify the return value. \n\t * \n\t * @return <code>IInputType</code>\n\t * @since 3.0\n\t */\n\tpublic IInputType getPrimaryInputType();\n\n\t/**\n\t * Returns all of the additional input resources of all InputType children.\n\t * Note: This does not include the primary InputType and does not include\n\t * additional dependencies.\n\t * \n\t * @return IPath[]\n\t */\n\tpublic IPath[] getAdditionalResources();\n\n\t/**\n\t * Returns all of the additional dependency resources of all InputType children.\n\t * Note: This does not include the primary InputType and does not include \n\t * additional inputs.\n\t * \n\t * @return IPath[]\n\t */\n\tpublic IPath[] getAdditionalDependencies();\n\n\t/**\n\t * Creates a child OutputType for this tool.\n\t * \n\t * @param OutputType The superClass, if any\n\t * @param String The id for the new OutputType \n\t * @param String The name for the new OutputType\n\t * @param boolean Indicates whether this is an extension element or a managed project element\n\t * \n\t * @return IOutputType\n\t * @since 3.0\n\t */\n\tpublic IOutputType createOutputType(IOutputType superClass, String Id, String name, boolean isExtensionElement);\n\n\t/**\n\t * Removes an OutputType from the tool's list.\n\t * \n\t * @param type\n\t * @since 3.0\n\t */\n\tpublic void removeOutputType(IOutputType type);\n\t\n\t/**\n\t * Returns the complete list of output types that are available for this tool.\n\t * The list is a merging of the output types specified for this tool with the \n\t * output types of its superclasses. The lowest output type instance in the hierarchy\n\t * takes precedence. \n\t * \n\t * @return IOutputType[]\n\t * @since 3.0\n\t */\n\tpublic IOutputType[] getOutputTypes();\n\t/**\n\t * Get the <code>IOutputType</code> in the receiver with the specified \n\t * ID. This is an efficient search in the receiver.\n\t * \n\t * <p>If the receiver does not have an OutputType with that ID, the method \n\t * returns <code>null</code>. It is the responsibility of the caller to \n\t * verify the return value. \n\t * \n\t * @param id unique identifier of the OutputType to search for\n\t * @return <code>IOutputType</code>\n\t * @since 3.0\n\t */\n\tpublic IOutputType getOutputTypeById(String id);\n\n\t/**\n\t * Returns the <code>IOutputType</code> in the tool that creates the \n\t * specified extension.\n\t * \n\t * <p>If the receiver does not have an OutputType that creates the extension, \n\t * the method returns <code>null</code>. It is the responsibility of the \n\t * caller to verify the return value. \n\t * \n\t * @param outputExtension File extension\n\t * @return <code>IOutputType</code>\n\t * @since 3.0\n\t */\n\tpublic IOutputType getOutputType(String outputExtension);\n\n\t/**\n\t * Returns the primary <code>IOutputType</code> in this tool\n\t * \n\t * <p>If the receiver has no OutputTypes, \n\t * the method returns <code>null</code>. It is the responsibility of the \n\t * caller to verify the return value. \n\t * \n\t * @return <code>IOutputType</code>\n\t * @since 3.0\n\t */\n\tpublic IOutputType getPrimaryOutputType();\n\n\t/**\n\t * Returns the <code>ITool</code> that is the superclass of this\n\t * tool, or <code>null</code> if the attribute was not specified.\n\t * \n\t * @return ITool\n\t */\n\tpublic ITool getSuperClass();\n\t\n\t/**\n\t * Returns whether this element is abstract. Returns <code>false</code>\n\t * if the attribute was not specified.\n\t * @return boolean \n\t */\n\tpublic boolean isAbstract();\n\n\t/**\n\t * Sets the isAbstract attribute of the tool-chain. \n\t * \n\t * @param b\n\t */\n\tpublic void setIsAbstract(boolean b);\n\t\n\t/**\n\t * Returns a semi-colon delimited list of child Ids of the superclass'\n\t * children that should not be automatically inherited by this element.\n\t * Returns an empty string if the attribute was not specified. \n\t * @return String \n\t */\n\tpublic String getUnusedChildren();\n\n\t/**\n\t * Returns the semicolon separated list of unique IDs of the error parsers associated\n\t * with the tool.\n\t * \n\t * @return String\n\t */\n\tpublic String getErrorParserIds();\n\n\t/**\n\t * Returns the ordered list of unique IDs of the error parsers associated with the \n\t * tool.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getErrorParserList();\n\n\t/**\n\t * Sets the semicolon separated list of error parser ids\n\t * \n\t * @param ids\n\t */\n\tpublic void setErrorParserIds(String ids);\n\t\n\t/**\n\t * Returns the list of valid source extensions this tool knows how to build.\n\t * The list may be empty but will never be <code>null</code>.\n\t * \n\t * @return List\n\t * @deprecated - use getPrimaryInputExtensions or getAllInputExtensions\n\t */\n\tpublic List getInputExtensions();\n\t\n\t/**\n\t * Returns the array of valid primary source extensions this tool knows how to build.\n\t * The array may be empty but will never be <code>null</code>.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getPrimaryInputExtensions();\n\t\n\t/**\n\t * Returns the array of all valid source extensions this tool knows how to build.\n\t * The array may be empty but will never be <code>null</code>.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getAllInputExtensions();\n\t\n\t/**\n\t * Returns the default input extension for the primary input of the tool\n\t * \n\t * @return String\n\t */\n\tpublic String getDefaultInputExtension();\n\t\n\t/**\n\t * Returns the array of all valid dependency extensions for this tool's inputs.\n\t * The array may be empty but will never be <code>null</code>.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getAllDependencyExtensions();\n\t\n\t/**\n\t * Returns the list of valid header extensions for this tool.\n\t * Returns the value of the headerExtensions attribute\n\t * The list may be empty but will never be <code>null</code>.\n\t * \n\t * @return List\n\t * @deprecated - use getDependency* methods\n\t */\n\tpublic List getInterfaceExtensions();\n\n\t/**\n\t * Answers a constant corresponding to the project nature the tool should be used \n\t * for. Possible answers are:\n\t * \n\t * <dl>\n\t * <dt>ITool.FILTER_C\n\t * <dd>The tool should only be displayed for C projects. <i>Notes:</i> even \n\t * though a C++ project has a C nature, this flag will mask the tool for C++ \n\t * projects. \n\t * <dt>ITool.FILTER_CC\n\t * <dd>The tool should only be displayed for C++ projects.\n\t * <dt>ITool.FILTER_BOTH\n\t * <dd>The tool should be displayed for projects with both natures.\n\t * </dl>\n\t * \n\t * @return int\n\t */\n\tpublic int getNatureFilter();\n\t\n\t/**\n\t * Returns the array of all valid output extensions this tool can create.\n\t * The array may be empty but will never be <code>null</code>.\n\t * \n\t * @return String[]\n\t */\n\tpublic String[] getAllOutputExtensions();\n\t\n\t/**\n\t * Answers all of the output extensions that the receiver can build.\n\t * This routine returns the value if the outputs attribute.\n\t * \n\t * @return <code>String[]</code> of extensions\n\t * @deprecated - use getAllOutputExtensions\n\t */\n\tpublic String[] getOutputExtensions();\n\t\n\t/**\n\t * Answers all of the output extensions that the receiver can build,\n\t * from the value of the outputs attribute\n\t * \n\t * @return <code>String[]</code> of extensions\n\t */\n\tpublic String[] getOutputsAttribute();\n\t\n\t/**\n\t * Answer the output extension the receiver will create from the input, \n\t * or <code>null</code> if the tool does not understand that extension.\n\t * \n\t * @param inputExtension The extension of the source file. \n\t * @return String\n\t */\n\tpublic String getOutputExtension(String inputExtension);\n\t\n\t/**\n\t * Sets all of the output extensions that the receiver can build,\n\t * into the outputs attribute. Note that the outputs attribute is\n\t * ignored when one or more outputTypes are specified. \n\t * \n\t * @param String\n\t */\n\tpublic void setOutputsAttribute(String extensions);\n\t\n\t/**\n\t * Answers the argument that must be passed to a specific tool in order to \n\t * control the name of the output artifact. For example, the GCC compile and \n\t * linker use '-o', while the archiver does not. \n\t * \n\t * @return String\n\t */\n\tpublic String getOutputFlag();\n\t\n\t/**\n\t * Sets the argument that must be passed to a specific tool in order to \n\t * control the name of the output artifact. For example, the GCC compile and \n\t * linker use '-o', while the archiver does not. \n\t * \n\t * @param String\n\t */\n\tpublic void setOutputFlag(String flag);\n\n\t/**\n\t * Answers the prefix that the tool should prepend to the name of the build artifact.\n\t * For example, a librarian usually prepends 'lib' to the target.a\n\t * @return String\n\t */\n\tpublic String getOutputPrefix();\n\n\t/**\n\t * Sets the prefix that the tool should prepend to the name of the build artifact.\n\t * For example, a librarian usually prepends 'lib' to the target.a\n\t * @param String\n\t * @see {@link #setOutputPrefixForPrimaryOutput(String)} \n\t */\n\tpublic void setOutputPrefix(String prefix);\n\t\n\tpublic void setOutputPrefixForPrimaryOutput(String prefix);\n\t\n\t/**\n\t * Returns <code>true</code> if the Tool wants the MBS to display the Advanced \n\t * Input category that allows the user to specify additional input resources and\n\t * dependencies, else <code>false</code>.\n\t * \n\t * @return boolean \n\t */\n\tpublic boolean getAdvancedInputCategory();\n\t\n\t/**\n\t * Sets whether the Tool wants the MBS to display the Advanced \n\t * Input category that allows the user to specify additional input resources and\n\t * dependencies. \n\t * \n\t * @param display \n\t */\n\tpublic void setAdvancedInputCategory(boolean display);\n\t\n\t/**\n\t * Returns <code>true</code> if the Tool represents a user-define custom build\n\t * step, else <code>false</code>.\n\t * \n\t * @return boolean \n\t */\n\tpublic boolean getCustomBuildStep();\n\t\n\t/**\n\t * Sets whether the Tool represents a user-define custom build step.\n\t * \n\t * @param customBuildStep\n\t */\n\tpublic void setCustomBuildStep(boolean customBuildStep);\n\t\n\t/**\n\t * Returns the announcement string for this tool \n\t * @return String\n\t */\n\tpublic String getAnnouncement();\n\t\n\t/**\n\t * Sets the announcement string for this tool \n\t * @param announcement\n\t */\n\tpublic void setAnnouncement(String announcement);\n\t\n\t/**\n\t * Answers the command-line invocation defined for the receiver.\n\t * \n\t * @return String\n\t */\n\tpublic String getToolCommand();\n\t\n\t/**\n\t * Sets the command-line invocation command defined for this tool.\n\t * \n\t * @param String\n\t * \n\t * @return boolean if <code>true</code>, then the tool command was modified \n\t */\n\tpublic boolean setToolCommand(String command);\n\t\n\t/**\n\t * Returns command line pattern for this tool \n\t * @return String\n\t */\n\tpublic String getCommandLinePattern();\n\t\n\t/**\n\t * Sets the command line pattern for this tool \n\t * @param String\n\t */\n\tpublic void setCommandLinePattern(String pattern);\n\t\n\t/**\n\t * Returns the plugin.xml element of the commandLineGenerator extension or <code>null</code> if none. \n\t * \n\t * @return IConfigurationElement\n\t * \n\t * @deprecated - use getCommandLineGenerator\n\t */\n\tpublic IConfigurationElement getCommandLineGeneratorElement();\n\t\n\t/**\n\t * Sets the CommandLineGenerator plugin.xml element\n\t * \n\t * @param element\n\t * @deprecated\n\t */\n\tpublic void setCommandLineGeneratorElement(IConfigurationElement element);\n\t\n\t/**\n\t * Returns the command line generator specified for this tool\n\t * @return IManagedCommandLineGenerator\n\t */\n\tpublic IManagedCommandLineGenerator getCommandLineGenerator();\n\t\n\t/**\n\t * Returns the plugin.xml element of the dependencyGenerator extension or <code>null</code> if none. \n\t * \n\t * @return IConfigurationElement\n\t * @deprecated - use getDependencyGeneratorForExtension or IInputType#getDependencyGenerator method\n\t */\n\tpublic IConfigurationElement getDependencyGeneratorElement();\n\t\n\t/**\n\t * Sets the DependencyGenerator plugin.xml element\n\t * \n\t * @param element\n\t * @deprecated \n\t */\n\tpublic void setDependencyGeneratorElement(IConfigurationElement element);\n\t\n\t/**\n\t * Returns a class instance that implements an interface to generate \n\t * source-level dependencies for the tool specified in the argument. \n\t * This method may return <code>null</code> in which case, the receiver \n\t * should assume that the tool does not require dependency information \n\t * when the project is built.\n\t *\n\t * @return IManagedDependencyGenerator\n\t * @deprecated - use getDependencyGeneratorForExtension or IInputType method\n\t */\n\tpublic IManagedDependencyGenerator getDependencyGenerator();\n\t\n\t/**\n\t * Returns a class instance that implements an interface to generate \n\t * source-level dependencies for the tool specified in the argument. \n\t * This method may return <code>null</code> in which case, the receiver \n\t * should assume that the tool does not require dependency information \n\t * when the project is built.\n\t *\n\t * @param sourceExt source file extension\n\t * @return IManagedDependencyGeneratorType\n\t */\n\tpublic IManagedDependencyGeneratorType getDependencyGeneratorForExtension(String sourceExt);\n\t\n\t/**\n\t * Returns an array of command line arguments that have been specified for\n\t * the tool.\n\t * The flags contain build macros resolved to the makefile format.\n\t * That is if a user has chosen to expand all macros in the buildfile,\n\t * the flags contain all macro references resolved, otherwise, if a user has \n\t * chosen to keep the environment build macros unresolved, the flags contain\n\t * the environment macro references converted to the buildfile variable format,\n\t * all other macro references are resolved \n\t * \n\t * @return String[]\n\t * @throws BuildException\n\t * \n\t * @deprecated - use getToolCommandFlags instead\n\t */\n\tpublic String[] getCommandFlags() throws BuildException;\n\t\n\t/**\n\t * Returns the command line arguments that have been specified for\n\t * the tool.\n\t * The string contains build macros resolved to the makefile format.\n\t * That is if a user has chosen to expand all macros in the buildfile,\n\t * the string contains all macro references resolved, otherwise, if a user has \n\t * chosen to keep the environment build macros unresolved, the string contains\n\t * the environment macro references converted to the buildfile variable format,\n\t * all other macro references are resolved \n\t * \n\t * @return String\n\t * \n\t * @deprecated - use getToolCommandFlagsString instead\n\t */\n\tpublic String getToolFlags() throws BuildException ;\n\t\n\t/**\n\t * Returns an array of command line arguments that have been specified for\n\t * the tool.\n\t * The flags contain build macros resolved to the makefile format.\n\t * That is if a user has chosen to expand all macros in the buildfile,\n\t * the flags contain all macro references resolved, otherwise, if a user has \n\t * chosen to keep the environment build macros unresolved, the flags contain\n\t * the environment macro references converted to the buildfile variable format,\n\t * all other macro references are resolved \n\t * \n\t * @param inputFileLocation\n\t * @param outputFileLocation\n\t * @return\n\t * @throws BuildException\n\t */\n\tpublic String[] getToolCommandFlags(IPath inputFileLocation, IPath outputFileLocation) throws BuildException;\n\t\n\t/**\n\t * Returns the command line arguments that have been specified for\n\t * the tool.\n\t * The string contains build macros resolved to the makefile format.\n\t * That is if a user has chosen to expand all macros in the buildfile,\n\t * the string contains all macro references resolved, otherwise, if a user has \n\t * chosen to keep the environment build macros unresolved, the string contains\n\t * the environment macro references converted to the buildfile variable format,\n\t * all other macro references are resolved \n\t * \n\t * @param inputFileLocation\n\t * @param outputFileLocation\n\t * @return\n\t * @throws BuildException\n\t */\n\tpublic String getToolCommandFlagsString(IPath inputFileLocation, IPath outputFileLocation) throws BuildException;\n\n\t/**\n\t * Options are organized into categories for UI purposes.\n\t * These categories are organized into a tree. This is the root\n\t * of that tree.\n\t * \n\t * @return IOptionCategory\n\t */\n\tpublic IOptionCategory getTopOptionCategory(); \n\n\t/**\n\t * Return <code>true</code> if the receiver builds files with the\n\t * specified extension, else <code>false</code>.\n\t * \n\t * @param extension file extension of the source\n\t * @return boolean\n\t */\n\tpublic boolean buildsFileType(String extension);\n\n\t/**\n\t * Return <code>true</code> if the receiver uses files with the\n\t * specified extension as input, else <code>false</code>. This\n\t * returns true for a superset of the extensions that buildFileType\n\t * returns true for - it includes secondary inputs.\n\t * \n\t * @param extension file extension of the source\n\t * @return boolean\n\t */\n\tpublic boolean isInputFileType(String extension);\n\t\n\t/**\n\t * Answers <code>true</code> if the tool considers the file extension to be \n\t * one associated with a header file.\n\t * \n\t * @param ext file extension of the source\n\t * @return boolean\n\t */\n\tpublic boolean isHeaderFile(String ext);\n\n\t/**\n\t * Answers <code>true</code> if the receiver builds a file with the extension specified\n\t * in the argument, else <code>false</code>.\n\t * \n\t * @param outputExtension extension of the file being produced by a tool\n\t * @return boolean\n\t */\n\tpublic boolean producesFileType(String outputExtension);\n\n\t/**\n\t * Returns <code>true</code> if this tool has changes that need to \n\t * be saved in the project file, else <code>false</code>.\n\t * \n\t * @return boolean \n\t */\n\tpublic boolean isDirty();\n\t\n\t/**\n\t * Sets the element's \"dirty\" (have I been modified?) flag.\n\t * \n\t * @param isDirty\n\t */\n\tpublic void setDirty(boolean isDirty);\n\t\n\t/**\n\t * Returns <code>true</code> if this tool was loaded from a manifest file,\n\t * and <code>false</code> if it was loaded from a project (.cdtbuild) file.\n\t * \n\t * @return boolean \n\t */\n\tpublic boolean isExtensionElement();\n\t\n\t/**\n\t * Returns the 'versionsSupported' of this tool\n\t * \n\t * @return String\n\t */\n\tpublic String getVersionsSupported();\n\t\n\t/**\n\t * Returns the 'convertToId' of this tool\n\t * \n\t * @return String\n\t */\n\tpublic String getConvertToId();\n\n\t/**\n\t * Sets the 'versionsSupported' attribute of the tool. \n\t * \n\t * @param versionsSupported\n\t */\t\n\tpublic void setVersionsSupported(String versionsSupported);\n\t\n\t/**\n\t * Sets the 'convertToId' attribute of the tool. \n\t * \n\t * @param convertToId\n\t */\n\tpublic void setConvertToId(String convertToId);\n\t\n\t/**\n\t * Returns an array of the Environment Build Path variable descriptors\n\t * \n\t * @return IEnvVarBuildPath[]\n\t */\n\tpublic IEnvVarBuildPath[] getEnvVarBuildPaths();\n\t\n\t/**\n\t * Returns an IOptionPathConverter implementation for this tool\n\t * or null, if no conversion is required\n\t */\n\tpublic IOptionPathConverter getOptionPathConverter() ;\n\t\n\tCLanguageData getCLanguageData(IInputType type);\n\t\n\tCLanguageData[] getCLanguageDatas();\n\t\n\tIInputType getInputTypeForCLanguageData(CLanguageData data);\n\t\n\tIResourceInfo getParentResourceInfo();\n\t\n/*\tIInputType setSourceContentTypeIds(IInputType type, String[] ids);\n\n\tIInputType setHeaderContentTypeIds(IInputType type, String[] ids);\n\t\n\tIInputType setSourceExtensionsAttribute(IInputType type, String[] extensions);\n\n\tIInputType setHeaderExtensionsAttribute(IInputType type, String[] extensions);\n*/\n\tIInputType getEditableInputType(IInputType base);\n\t\n\tIOutputType getEditableOutputType(IOutputType base);\n\t\n\tboolean isEnabled();\n\t\n//\tboolean isReal();\n\t\n\tboolean supportsBuild(boolean managed);\n\t\n\tboolean matches(ITool tool);\n\t\n\tboolean isSystemObject();\n\t\n\tString getUniqueRealName();\n}", "public static String getSolutionString(MLPipeline classifier) {\n\t\tif (classifier == null) {\n\t\t\treturn \"error\";\n\t\t}\n\n\t\tClassifier baseClassifier = classifier.getBaseClassifier();\n\t\tString[] classifierOptionsArray;\n\t\tString classifierOptionsString = \"\";\n\t\tString classifierString = baseClassifier.getClass().getName();\n\t\tif (baseClassifier instanceof OptionHandler) {\n\t\t\tclassifierOptionsArray = ((OptionHandler) baseClassifier).getOptions();\n\t\t\tclassifierOptionsString = classifierOptionsArray.length > 0\n\t\t\t\t\t? Arrays.stream(classifierOptionsArray).collect(Collectors.joining(\", \", \"[\", \"]\"))\n\t\t\t\t\t: \"\";\n\t\t}\n\n\t\tSupervisedFilterSelector preprocessor = !classifier.getPreprocessors().isEmpty()\n\t\t\t\t? classifier.getPreprocessors().get(0)\n\t\t\t\t: null;\n\t\tString preprocessorString = preprocessor != null ? preprocessor.getClass().getName() : \"\";\n\n\t\tString[] preprocessorOptionsArray;\n\t\tString preprocessorOptionsString = \"\";\n\t\tif (preprocessor instanceof OptionHandler) {\n\t\t\tpreprocessorOptionsArray = !preprocessorString.equals(\"\") ? ((OptionHandler) preprocessor).getOptions()\n\t\t\t\t\t: new String[0];\n\t\t\tpreprocessorOptionsString = preprocessorOptionsArray.length > 0\n\t\t\t\t\t? Arrays.stream(preprocessorOptionsArray).collect(Collectors.joining(\",\", \"[\", \"]\"))\n\t\t\t\t\t: \"\";\n\t\t}\n\n\t\treturn classifierString + \" \" + classifierOptionsString + \" \" + preprocessorString + \" \"\n\t\t\t\t+ preprocessorOptionsString;\n\t}", "public String toString(){\n StringBuffer sb = new StringBuffer();\n sb.append(\"\\n###################################################\\n\");\n sb.append(\" DESCRIPTION VARIANTE MONCLAR\\n\");\n sb.append(\"- 7 : Fait passer le tour du joueur suivant\\n\");\n sb.append(\"- 8 : Changer la couleur du Talon\\n\");\n sb.append(\" Permet de stopper les attaques\\n\");\n sb.append(\"- 9 : Faire piocher 1 carte au joueur suivant\t\\n\");\n sb.append(\" Sans Recours !\\n\");\n sb.append(\"- 10 : Permet de rejouer\\n\");\n sb.append(\"- Valet : Permet de changer le sens de la partie\\n\");\n sb.append(\"- As : Faire piocher 3 cartes au joueur suivant\t\\n\");\n sb.append(\" Contrable par un 8 ou un autre As !\\n\");\n sb.append(\"###################################################\\n\");\n return sb.toString();\n }", "public String getCompiler();", "com.google.protobuf.ByteString\n getBuilderBytes();", "public String toString() {\r\n\treturn \"batch image builder for:\\n\\tnew state: \"/*nonNLS*/ + getNewState();\r\n}", "static String makeHelpString() {\r\n\r\n String s;\r\n s=\"The parameters set through this interface control many of the\";\r\n s+=\" details of the calculation. Once the parameters are set,\";\r\n s+=\" store them by clicking the \\\"Save Changes\\\" button.\\n\\n\";\r\n\r\n s+=\"Log10 Start Time\\nBase-10 logarithm of the start time for\";\r\n s+=\" integration, in seconds. Distinguish from logx- below, which is\";\r\n s+= \" the start time for the plot. \\n\\n\";\r\n\r\n s+=\"Log10 END TIME\\nBase-10 logarithm of the final time for\";\r\n s+=\" integration, in seconds. Distinguish from logx+ below, which is\";\r\n s+= \" the end time for the plot. \\n\\n\";\r\n\r\n s+=\"Precision\\nPrecision factor for integration timestep.\";\r\n s+=\" Smaller values give smaller adaptive timestep and more precision.\\n\\n\";\r\n\r\n s+=\"CalcMode\\nCalculation mode (QSS=quasi-steady-state, Asy=normal asymptotic,\";\r\n s+=\" AsyMott=Mott asymptotic, AsyOB=Oran-Boris asymptotic, Explicit=explicit, F90Asy=F90).\\n\\n\";\r\n\r\n s+=\"dX\\nPermitted tolerance in deviation of sum of mass fractions X\";\r\n s+=\" from unity. For example, a value of 0.01 requires the timestep to be\";\r\n s+=\" adjusted such that sum X lies between 0.99 and 1.01\";\r\n s+=\" after each timestep.\\n\\n\";\r\n\r\n// s+=\"Max Light-Ion Mass\\nMaximum mass light ion permitted to\";\r\n// s+=\" contribute to reactions. For example, if this variable is set\";\r\n// s+=\" to 4, p + O16 and He4 + O16 reactions can contribute (if\";\r\n// s+=\" the corresponding Reaction Class is selected), but C12 + O16\";\r\n// s+=\" would be excluded since 12 is larger than 4. As another\";\r\n// s+=\" example, if Reaction Class 5 is selected and this variable\";\r\n// s+=\" is set equal to 1, p-gamma reactions contribute but not\";\r\n// s+=\" alpha-p reactions.\\n\\n\";\r\n\r\n s+=\"HYDRODYNAMIC VARIABLES\\nThe temperature (in units\";\r\n s+=\" of 10^9 K), the density (in units of g/cm^3), and electron fraction Ye are set in\";\r\n s+=\" one of two mutually exclusive ways, chosen through the radio\";\r\n s+=\" buttons. If \\\"Constant\\\" is selected the (constant)\";\r\n s+=\" temperature (T), density (rho), and electron fraction (Ye) are entered in the\";\r\n s+=\" corresponding fields. If \\\"Specify Profile\\\"\";\r\n s+=\" is selected instead, a file name is specified that\";\r\n s+=\" contains the time profile for T, rho, and Ye to be used in the\";\r\n s+=\" calculation\";\r\n s+=\" (note: assume to be case-sensitive) if in the same directory\";\r\n s+=\" as the Java class files, or by a properly qualified path\";\r\n s+=\" for the machine in question if in another directory. For\";\r\n s+=\" example, on a Unix machine \\\"../file.ext\\\" would specify the\";\r\n s+=\" file with name \\\"file.ext\\\" in the parent directory.\";\r\n s+=\" See the file jin/sampleHydroProfile.inp for sample file format\\n\\n\";\r\n\r\n\r\n s+=\"logx-\\nThe lower limit in log time for plot.\";\r\n s+=\" This differs from LOG10 START TIME, which is the integration start time.\";\r\n s+=\" Generally logx- must be greater than or equal to LOG10 START TIME \";\r\n s+= \" (the program will set logx- = LOG10 START TIME otherwise).\\n\\n\";\r\n\r\n s+=\"logx+\\nThe upper limit in log time for plot.\";\r\n s+=\" This differs from LOG10 END TIME, which is the integration stop time.\";\r\n s+=\" Generally logx+ must be less than or equal to LOG10 END TIME \";\r\n s+= \" (the program will set logx+ = LOG10 END TIME otherwise).\\n\\n\";\r\n\r\n s+=\"logy-\\nThe lower limit in log X (mass fraction) or log Y (abundance) for plot\";\r\n s+= \" (which one is determined by the X/Y selection widget).\\n\\n\";\r\n\r\n s+=\"logy+\\nThe upper limit in log X (mass fraction) or log Y (abundance) for plot.\";\r\n s+= \" (which one is determined by the X/Y selection widget).\\n\\n\";\r\n\r\n s+=\"x tics\\nNumber of tic marks on x axis.\\n\\n\";\r\n\r\n s+=\"y tics\\nNumber of tic marks on y axis.\\n\\n\";\r\n\r\n s+=\"Isotopes\\nMaximum number of curves to plot (500 is the largest permitted value).\\n\\n\";\r\n\r\n s+=\"E/dE\\nWhether integrated energy E or differential energy dE is plotted.\\n\\n\";\r\n\r\n s+=\"X/Y\\nWhether mass fraction X or molar abundance Y is plotted.\\n\\n\";\r\n\r\n s+=\"Lines/Symbols\\nWhether curves are drawn with lines or series of symbols.\\n\\n\";\r\n\r\n s+=\"Color/BW\\nWhether curves are drawn in color or black and white.\\n\\n\";\r\n\r\n s+=\"Steps\\nNumber of time intervals to plot (time intervals\";\r\n s+=\" will be equally spaced on log scale). Typical values are ~100. Max is\";\r\n s+=\" StochasticElements.tintMax. Larger values give better plot resolution but\"; \r\n s+=\" larger postscript files.\\n\\n\";\r\n\r\n s+=\"MinCon\\nApproximate minimum contour for 2D and 3D plots.\\n\\n\";\r\n\r\n s+=\"3D\\nWhether to output data in ascii file 3D.data for 3D plot animation by rateViewer3D.\\n\\n\";\r\n\r\n s+=\"AlphaOnly\\nIf No, include only triple-alpha among alpha reactions with light ions\";\r\n s+=\" (for alpha network). Otherwise, include all alpha reactions with light ions.\\n\\n\";\r\n\r\n s+=\"x deci\\nNumber of digits beyond decimal for x-axis labels.\\n\\n\";\r\n\r\n s+=\"y deci\\nNumber of digits beyond decimal for y-axis labels.\\n\\n\";\r\n\r\n s+=\"Ymin\\nFractional particle number threshold for including a box in network in a given\";\r\n s+=\" timestep. Roughly, in given timestep only isotopes having an an abundance Y\";\r\n s+=\" larger than Ymin will be processed.\\n\\n\";\r\n\r\n s+=\"renormX\\nWhether to renormalize sum of mass fractions to 1 after each timestep.\\n\\n\";\r\n \r\n s+=\"Lineplot\\nDetermines whether the lineplot produced\";\r\n s+=\" of populations as a function of time has a tall or \";\r\n s+=\" short vertical aspect.\\n\\n\";\r\n \r\n s+=\"PopCM\\nChooses colormap for 2D population animation.\\n\\n\";\r\n \r\n s+=\"FluxCM\\nChooses colormap for 2D flux ratio animation.\\n\\n\";\r\n\r\n s+=\"Comments\\nOptional comments that will be included in output text and graphics.\\n\\n\";\r\n\r\n// Remove following for now\r\n/*\r\n s+=\"Zmax\\nThe maximum value of proton number that will be considered\";\r\n s+=\" in the calculation. Set larger than the highest Z likely\";\r\n s+=\" to be encountered in the reactions of the network.\";\r\n\t\ts+=\" Can't be larger than StochasticElements.pmax.\\n\\n\";\r\n\r\n s+=\"Nmax\\nThe maximum value of neutron number that will be considered\";\r\n s+=\" in the calculation. Set larger than the highest N likely\";\r\n s+=\" to be encountered in the reactions of the network.\";\r\n\t\ts+=\" Can't be larger than StochasticElements.nmax.\\n\\n\";\r\n\r\n s+=\"Zmin\\nThe minimum value of proton number that will be considered\";\r\n s+=\" in the calculation for heavier ions. (Note: protons, neutrons,\";\r\n s+=\" He3, and He4 are always considered, irrespective of this\";\r\n s+=\" parameter). For example, if Zmin=6, no isotopes with mass\";\r\n s+=\" numbers less than 6 will be considered, except for protons,\";\r\n s+=\" neutrons (if Include Neutrons is set to \\\"Yes\\\"), He3, and\";\r\n s+=\" alpha particles. Normally changed only for diagnostic purposes. \\n\\n\";\r\n*/\r\n\r\n return s;\r\n\r\n }", "public String toString() {\r\n\t\treturn \"Jump branchLabel: \" + branchLabel;\r\n\t}", "public String toString()\n\t{\n\t\treturn this.defline + \"\\n\" + this.sequence + \"\\n + \\n\" + this.quality + \"\\n\";\n\t}", "private String getConfigInfo(boolean verbose) {\r\n StringBuilder builder = new StringBuilder();\r\n\r\n GridHubConfiguration config = getRegistry().getConfiguration();\r\n builder.append(\"<b>Config for the hub :</b><br/>\");\r\n builder.append(prettyHtmlPrint(config));\r\n\r\n if (verbose) {\r\n\r\n GridHubConfiguration tmp = new GridHubConfiguration();\r\n\r\n builder.append(\"<b>Config details :</b><br/>\");\r\n builder.append(\"<b>hub launched with :</b>\");\r\n builder.append(tmp.hubConfig);\r\n\r\n\r\n builder.append(\"<br/><b>the final configuration comes from :</b><br/>\");\r\n builder.append(\"<b>the default :</b><br/>\");\r\n builder.append(prettyHtmlPrint(tmp));\r\n\r\n builder.append(prettyHtmlPrint(tmp));\r\n }\r\n return builder.toString();\r\n }", "public String classOut() {\n\t\tStringBuilder s = new StringBuilder();\n\t\ts.append(objective());\n\t\ts.append(' ');\n\t\ts.append(optimal() ? 1 : 0);\n\t\ts.append('\\n');\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts.append(item(i) ? 1 : 0);\n\t\t\ts.append(i < n - 1 ? ' ' : '\\n');\n\t\t}\n\t\treturn s.toString();\n\t}", "@Override\n void buildString(boolean full, StringBuilder sb)\n {\n String sn = PkgUtil.simpleName(clazz);\n if(full)\n {\n String cn = PkgUtil.canonName(clazz);\n sb.append(cn, 0, cn.length()-sn.length());\n }\n buildAnnoString(full, sb);\n sb.append(sn);\n if(typeArgs.isEmpty())\n return;\n sb.append('<');\n for(int i=0; i< typeArgs.size(); i++)\n {\n if(i>0)\n sb.append(',');\n typeArgs.get(i).asRefType().buildString(full, sb);\n }\n sb.append('>');\n }", "public static String globalInfo() {\n return \"This is a GA individual suited to optimize binary values.\";\n }", "public String getToolString() {\r\n\t\treturn Utility.convertTo4Byte(ScoolConstants.NEW_WHITEBOARD_ACTION);\r\n\t}", "default StringBuilder builder() {\n return templateBuilder.get();\n }", "public String toProgram()\n\t{\n\t\tString prog = \"\";\n\t\tif(this.type == nodetype.root)\n\t\t{\n\t\t\tfor(ParseTreeNode node:this.children)\n\t\t\t{\n\t\t\t\tprog+= node.toProgram()+\"+\";\n\t\t\t}\n\t\t\tif(prog.length() > 0)\n\t\t\t{\n\t\t\t\tprog = prog.substring(0,prog.length()-1);\n\t\t\t}\n\t\t}\n\t\telse if(this.type == nodetype.segment)\n\t\t{\n\t\t\tif(this.children.size()==0)\n\t\t\t{\n\t\t\t\tprog = this.value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprog = String.format(\"substr(value,%s,%s)\", this.children.get(0).value,this.children.get(1).value);\n\t\t\t}\n\t\t}\n\t\treturn prog;\n\t}", "java.lang.String getHowToUse();", "java.lang.String getHowToUse();", "private static String getHelp() {\n StringBuffer sb = new StringBuffer();\n\n // License\n //sb.append(License.get());\n\n // Usage\n sb.append(\"Usage: java -cp dist/jcore.jar -mx2G eu.fbk.fm.profiling.extractors.LSA.LSM input threshold size dim idf\\n\\n\");\n\n // Arguments\n sb.append(\"Arguments:\\n\");\n sb.append(\"\\tinput\\t\\t-> root of files from which to read the model\\n\");\n sb.append(\"\\tthreshold\\t-> similarity threshold\\n\");\n sb.append(\"\\tsize\\t\\t-> number of similar terms to return\\n\");\n sb.append(\"\\tdim\\t\\t-> number of dimensions\\n\");\n sb.append(\"\\tidf\\t\\t-> if true rescale using the idf\\n\");\n //sb.append(\"\\tterm\\t\\t-> input term\\n\");\n\n // Arguments\n //sb.append(\"Arguments:\\n\");\n\n return sb.toString();\n }", "private String getQueryHint() {\n return ApiProperties.getProperty(\n \"api.bigr.library.\" + ApiFunctions.shortClassName(getClass().getName()) + \".hint\");\n }", "String getConfigName();", "@Override\n public String[] getOptions() {\n\n Vector<String> result = new Vector<String>();\n\n result.add(\"-K\");\n result.add(\"\" + m_kBEPPConstant);\n\n if (getL()) {\n result.add(\"-L\");\n }\n\n if (getUnbiasedEstimate()) {\n result.add(\"-U\");\n }\n\n if (getB()) {\n result.add(\"-B\");\n }\n\n result.add(\"-Ba\");\n result.add(\"\" + m_bagInstanceMultiplier);\n\n result.add(\"-M\");\n result.add(\"\" + m_SplitMethod);\n\n result.add(\"-A\");\n result.add(\"\" + m_AttributesToSplit);\n\n result.add(\"-An\");\n result.add(\"\" + m_AttributeSplitChoices);\n\n Collections.addAll(result, super.getOptions());\n\n return result.toArray(new String[result.size()]);\n }", "public IConfigurationElement getCommandLineGeneratorElement();", "public String getConfig () { \n StringBuffer ar_sb = new StringBuffer();\n if (active_relationships.size() > 0) {\n ar_sb.append(Utils.encToURL(active_relationships.get(0)));\n for (int i=1;i<active_relationships.size();i++) ar_sb.append(\",\" + Utils.encToURL(active_relationships.get(i)));\n }\n\n return \"RTGraphPanel\" + BundlesDT.DELIM +\n \"nodesize=\" + Utils.encToURL(nodeSize()) + BundlesDT.DELIM +\n \"nodecolor=\" + Utils.encToURL(nodeColor()) + BundlesDT.DELIM +\n\t \"linksize=\" + Utils.encToURL(linkSize()) + BundlesDT.DELIM +\n\t \"linkcolor=\" + Utils.encToURL(linkColor()) + BundlesDT.DELIM +\n\t \"linkcurves=\" + Utils.encToURL(\"\" + linkCurves()) + BundlesDT.DELIM +\n\t \"linktrans=\" + Utils.encToURL(\"\" + linksTransparent()) + BundlesDT.DELIM +\n\t \"arrows=\" + Utils.encToURL(\"\" + drawArrows()) + BundlesDT.DELIM +\n\t \"timing=\" + Utils.encToURL(\"\" + drawTiming()) + BundlesDT.DELIM +\n\t \"strict=\" + Utils.encToURL(\"\" + strictMatches()) + BundlesDT.DELIM +\n\t \"dynlabels=\" + Utils.encToURL(\"\" + dynamicLabels()) + BundlesDT.DELIM +\n\t \"nodelabels=\" + Utils.encToURL(\"\" + nodeLabels()) + BundlesDT.DELIM +\n\t \"linklabels=\" + Utils.encToURL(\"\" + linkLabels()) + BundlesDT.DELIM +\n\t \"nlabels=\" + commaDelimited(nodeLabelsArray()) + BundlesDT.DELIM +\n\t \"clabels=\" + commaDelimited(colorLabelsArray()) + BundlesDT.DELIM +\n\t \"llabels=\" + commaDelimited(linkLabelsArray()) +\n\t (ar_sb.length() > 0 ? BundlesDT.DELIM + \"relates=\" + ar_sb.toString() : \"\");\n }", "public synchronized String toString() {\n StringBuffer oBuffer = new StringBuffer();\n\n oBuffer\n .append(\"Preprocessing params: \").append(this.oPreprocessingParams).append(\"\\n\")\n .append(\"Feature extraction params: \").append(this.oFeatureExtractionParams).append(\"\\n\")\n .append(\"Classification params: \").append(this.oClassificationParams);\n\n return oBuffer.toString();\n }", "public String toString() {\n return new ToStringBuilder(this)\n .append(\"number\", this.number)\n .append(\"fileSets\", this.fileSets)\n .toString();\n }", "public String getReadableSolution() {\n StringBuilder solution = new StringBuilder();\n\n solution.append(\"WORKFLOW_IN:{\");\n int i = 0;\n for (TypeNode workflowInput : this.workflowInputTypeStates) {\n solution.append(workflowInput.toString());\n if (++i < this.workflowInputTypeStates.size()) {\n solution.append(\", \");\n }\n }\n solution.append(\"} |\");\n\n for (ModuleNode currTool : this.moduleNodes) {\n solution.append(\" IN:{\");\n i = 0;\n for (TypeNode toolInput : currTool.getInputTypes()) {\n if (!toolInput.isEmpty()) {\n if (i++ > 1) {\n solution.append(\", \");\n }\n solution.append(toolInput.toString());\n }\n }\n solution.append(\"} \").append(currTool.toString());\n solution.append(\" OUT:{\");\n i = 0;\n for (TypeNode toolOutput : currTool.getOutputTypes()) {\n if (!toolOutput.isEmpty()) {\n if (i++ > 1) {\n solution.append(\", \");\n }\n solution.append(toolOutput.toString());\n }\n }\n solution.append(\"} |\");\n }\n i = 0;\n solution.append(\"WORKFLOW_OUT:{\");\n for (TypeNode workflowOutput : this.workflowOutputTypeStates) {\n solution.append(workflowOutput.toString());\n if (++i < this.workflowOutputTypeStates.size()) {\n solution.append(\", \");\n }\n }\n solution.append(\"}\");\n\n return solution.toString();\n }", "public String getToolCommandFlagsString(IPath inputFileLocation, IPath outputFileLocation) throws BuildException;", "public String generateSpec() {\n\t\tString spec = \"\\noval\\n\" + rb + \" \" + cb + \" \" + height + \" \" + width + \"\\n\" + character + \"\\n.\";\n\t\treturn spec;\n\t}", "public String configurationInfo();", "public String toString() {\n String s = \"\";\n\n if (FormEditor.compress) {\n if (domNode.getNodeName().equals(\"concept\")) {\n // s = \"ConceptName\";\n org.w3c.dom.Node name = domNode.getFirstChild();\n\n while ((name != null) && !name.getNodeName().equals(\"name\")) {\n name = name.getNextSibling();\n }\n\n if (name == null) {\n s += \"ConceptName\";\n } else {\n AdapterNode adpNode = new AdapterNode(name);\n s += adpNode.content();\n }\n } else if (domNode.getNodeName().equals(\"conceptList\")) {\n // s = \"ConceptName\";\n org.w3c.dom.Node name = domNode.getFirstChild();\n\n while ((name != null) && !name.getNodeName().equals(\"name\")) {\n name = name.getNextSibling();\n }\n\n if (name == null) {\n s += \"ConceptList\";\n } else {\n AdapterNode adpNode = new AdapterNode(name);\n s += adpNode.content();\n }\n } else if (domNode.getNodeName().equals(\"attribute\")) {\n org.w3c.dom.NamedNodeMap attributeList =\n domNode.getAttributes();\n org.w3c.dom.Node name = attributeList.getNamedItem(\"name\");\n s = name.getNodeValue();\n } else {\n String nodeName = domNode.getNodeName();\n\n if (!nodeName.startsWith(\"#\")) {\n s = nodeName;\n } else {\n s = typeName[domNode.getNodeType()];\n }\n }\n\n return s;\n }\n\n s = typeName[domNode.getNodeType()];\n\n String nodeName = domNode.getNodeName();\n\n if (!nodeName.startsWith(\"#\")) {\n s += (\": \" + nodeName);\n }\n\n if (domNode.getNodeValue() != null) {\n if (s.startsWith(\"ProcInstr\")) {\n s += \", \";\n } else {\n s += \": \";\n }\n\n // Trim the value to get rid of NL's at the front\n String t = domNode.getNodeValue().trim();\n int x = t.indexOf(\"\\n\");\n\n if (x >= 0) {\n t = t.substring(0, x);\n }\n\n s += t;\n }\n\n return s;\n }", "String getDefinition();", "public String toString()\n\t{\n\t\treturn \"connection type \" + connType + \" length \" + length + \" data \"\n\t\t\t\t+ (opt.length == 0 ? \"-\" : DataUnitBuilder.toHex(opt, \" \"));\n\t}", "public String getToolCommand();", "public String build() {\r\n if (this.isNotEmpty()) {\r\n final StringBuilder sb = new StringBuilder();\r\n\r\n final List<MessageAssertor> messages;\r\n if (this.isPreconditionsNotEmpty()) {\r\n messages = this.preconditions;\r\n } else {\r\n messages = this.messages;\r\n }\r\n\r\n for (final MessageAssertor message : messages) {\r\n sb.append(HelperMessage.getMessage(message));\r\n }\r\n\r\n return sb.toString();\r\n }\r\n return StringUtils.EMPTY;\r\n }", "public String toString() {\n\t\t\tswitch(this) {\n\t\t\tcase INSERT_BSI_RESOURCES_BASE:{\n\t\t\t\treturn \"INSERT INTO lry.aut_bsi_prc_cfg_resources(CFG_ID, RSC_NAME, RSC_DESCRIPTION, RSC_LOCATION_INPUT, RSC_LOCATION_OUTPUT, RSC_ITEM, RSC_ITEM_KEY) VALUES(?,?,?,?,?,?,?);\";\n\t\t\t}\n\t\t\tcase SELECT_ALL_BSI_RESOURCES_BASE:{\n\t\t\t\treturn \"SELECT RSC_ID FROM lry.aut_bsi_prc_cfg_resources;\";\n\t\t\t}\n\t\t\tcase SELECT_BSI_RESOURCES_BASE_BY_CFG_BASE_ID:{\n\t\t\t\treturn \"SELECT RSC_ID FROM lry.aut_bsi_prc_cfg_resources WHERE CFG_ID=?;\";\n\t\t\t}\n\t\t\tdefault:{\n\t\t\t\treturn this.name();\n\t\t\t}\n\t\t\t}\n\t\t}", "protected StringBuilder toStringBuilder()\r\n/* 741: */ {\r\n/* 742:808 */ StringBuilder buf = new StringBuilder(64);\r\n/* 743:809 */ buf.append(StringUtil.simpleClassName(this));\r\n/* 744:810 */ buf.append('@');\r\n/* 745:811 */ buf.append(Integer.toHexString(hashCode()));\r\n/* 746: */ \r\n/* 747:813 */ Object result = this.result;\r\n/* 748:814 */ if (result == SUCCESS)\r\n/* 749: */ {\r\n/* 750:815 */ buf.append(\"(success)\");\r\n/* 751: */ }\r\n/* 752:816 */ else if (result == UNCANCELLABLE)\r\n/* 753: */ {\r\n/* 754:817 */ buf.append(\"(uncancellable)\");\r\n/* 755: */ }\r\n/* 756:818 */ else if ((result instanceof CauseHolder))\r\n/* 757: */ {\r\n/* 758:819 */ buf.append(\"(failure(\");\r\n/* 759:820 */ buf.append(((CauseHolder)result).cause);\r\n/* 760:821 */ buf.append(')');\r\n/* 761: */ }\r\n/* 762: */ else\r\n/* 763: */ {\r\n/* 764:823 */ buf.append(\"(incomplete)\");\r\n/* 765: */ }\r\n/* 766:825 */ return buf;\r\n/* 767: */ }", "public String toString() {\n\t\treturn super.toString()+\" for \"+purpose+\" using \";}", "public Option build() {\n if (description == null) {\n description = \"Description is not available for this option\";\n }\n return new Option(this);\n }", "public java.lang.String getHowToUse() {\n java.lang.Object ref = howToUse_;\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 howToUse_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getHowToUse() {\n java.lang.Object ref = howToUse_;\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 howToUse_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private static String getUsage()\n {\n final StringBuilder usage = new StringBuilder(400);\n\n // Empty line before usage info\n usage.append(\"\\n \" \n // Describe commands/options\n + \"those <option> <command> <cmd-options> \\n\"\n + \" Options:\\n\"\n + \"\\t-v : Allows stack trace to be printed.\\n\" \n + \" Commands:\\n\"\n + getCreateUsage()\n + \" help\\n\" \n + \"\\t Displays this help message\\n\" \n + \" version\\n\" \n + \"\\t Displays the SDK version and supported Core APIs\\n\");\n\n return usage.toString();\n }", "public String toString() {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tthis.createSpecSection(buffer);\n\t\tthis.createOperatorSection(buffer);\n\t\treturn buffer.toString();\n\t}", "public String toString(){\n return \"MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION - sysid:\"+sysid+\" compid:\"+compid+\" time_boot_ms:\"+time_boot_ms+\" firmware_version:\"+firmware_version+\" tilt_max:\"+tilt_max+\" tilt_min:\"+tilt_min+\" tilt_rate_max:\"+tilt_rate_max+\" pan_max:\"+pan_max+\" pan_min:\"+pan_min+\" pan_rate_max:\"+pan_rate_max+\" cap_flags:\"+cap_flags+\" vendor_name:\"+vendor_name+\" model_name:\"+model_name+\"\";\n }", "public String toString() {\n\t\treturn getClass().getName() + \"[mode=\" + mode + \",size=\" + size\n\t\t\t + \",hgap=\" + hgap + \",vgap=\" + vgap + \"]\";\n\t}", "public final /* synthetic */ String zzqq() throws Exception {\n return this.zzckn.getString(\"flag_configuration\", \"{}\");\n }", "public String defaultName()\n {\n return \"Rx Version Build Number Product Condition\";\n }", "private String finishBuild(StringBuilder strBuilder) {\n if (location != null && !location.isEmpty()) {\n strBuilder.append(\" LOCATION '\")\n .append(location)\n .append(\"'\");\n }\n\n // table properties is never empty because of required cdap properties\n strBuilder.append(\" TBLPROPERTIES \");\n appendMap(strBuilder, tableProperties);\n return strBuilder.toString();\n }", "public String toString(){\r\n // creating instance\r\n StringBuilder sb = new StringBuilder();\r\n if(!isAvailable()){\r\n if(veh.getSize() == VehicleSize.Bus){\r\n sb.append('B');\r\n } else if (veh.getSize() == VehicleSize.Car){\r\n sb.append('C');\r\n } else {\r\n sb.append('M');\r\n }\r\n } else {\r\n if(sizeOfSp == VehicleSize.Bus){\r\n sb.append('b');\r\n } else if (sizeOfSp == VehicleSize.Car){\r\n sb.append('c');\r\n } else {\r\n sb.append('m');\r\n }\r\n }\r\n // return statement\r\n return sb.toString();\r\n }" ]
[ "0.6412772", "0.62719595", "0.62039447", "0.6144383", "0.6093139", "0.6048385", "0.5930024", "0.5927403", "0.5927403", "0.5829111", "0.5805362", "0.57386446", "0.5734888", "0.567098", "0.56319535", "0.55870897", "0.55843747", "0.5583728", "0.5561451", "0.55516815", "0.55514747", "0.5550857", "0.5524613", "0.55136615", "0.5511076", "0.5493079", "0.5491695", "0.54847413", "0.5473043", "0.5469886", "0.54607785", "0.5460118", "0.54390013", "0.5409722", "0.5406387", "0.5405162", "0.5400442", "0.538495", "0.537808", "0.536242", "0.53587246", "0.5357108", "0.5320082", "0.5315191", "0.5313025", "0.52988344", "0.529374", "0.5282648", "0.5274777", "0.5274006", "0.5269882", "0.5255483", "0.52438617", "0.5236973", "0.5227973", "0.5219559", "0.5215699", "0.52064043", "0.52053195", "0.52053154", "0.51973736", "0.51913244", "0.5185605", "0.5182664", "0.5175555", "0.5174948", "0.5173748", "0.51728004", "0.51728004", "0.517179", "0.5169666", "0.5165981", "0.5157485", "0.5142572", "0.51375705", "0.5137052", "0.51342916", "0.5127257", "0.5126868", "0.51183504", "0.51116073", "0.5105045", "0.51032245", "0.51026714", "0.5101612", "0.5098605", "0.50963366", "0.5094099", "0.50906396", "0.5088903", "0.5087726", "0.5087726", "0.5080986", "0.5079977", "0.50747496", "0.5072966", "0.5069485", "0.50687206", "0.50652635", "0.50652075" ]
0.6060992
5
Returning the second building
public String buildingString2() { whichBuild = 1 - whichBuild; if (whichBuild == 1) { } return "400 400;10 10 90 140 70 140 20;90 10 320 70 220 70 10;10 180 100 380 60 180 15;100 180 320 380 200 180 20;320 10 400 380 320 110 25"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T2 build();", "public static Builder<?> builder() {\n return new Builder2();\n }", "private BDD buildEndGame(){\n\t\tBDD res = factory.makeOne();\n\n\t\tfor(int i = 0; i < this.dimension; i++){\n\t\t\tfor(int j = 0; j < this.dimension; j++){\n\t\t\t\tres.andWith(board[i][j].not());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn res;\n\t}", "public Building getBuilding();", "protected GuiTestObject bed_2() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"bed_2\"));\n\t}", "public Resource2Builder but() {\n return (Resource2Builder)clone();\n }", "public Pokemon.RequestEnvelop.Unknown6.Unknown2.Builder getUnknown2Builder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getUnknown2FieldBuilder().getBuilder();\n }", "private MetaSparqlRequest createQueryMT2() {\n\t\treturn createQueryMT1();\n\t}", "public Provider1 build() {\r\n return provider1;\r\n }", "private com.google.protobuf.SingleFieldBuilder<\n Pokemon.RequestEnvelop.Unknown6.Unknown2, Pokemon.RequestEnvelop.Unknown6.Unknown2.Builder, Pokemon.RequestEnvelop.Unknown6.Unknown2OrBuilder> \n getUnknown2FieldBuilder() {\n if (unknown2Builder_ == null) {\n unknown2Builder_ = new com.google.protobuf.SingleFieldBuilder<\n Pokemon.RequestEnvelop.Unknown6.Unknown2, Pokemon.RequestEnvelop.Unknown6.Unknown2.Builder, Pokemon.RequestEnvelop.Unknown6.Unknown2OrBuilder>(\n getUnknown2(),\n getParentForChildren(),\n isClean());\n unknown2_ = null;\n }\n return unknown2Builder_;\n }", "T build();", "T build();", "public Pokemon.ResponseEnvelop.Unknown6.Unknown2.Builder getUnknown2Builder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getUnknown2FieldBuilder().getBuilder();\n }", "public B second() {\n return second;\n }", "Lighter build();", "private Container buildSecondLine()\r\n {\r\n GridBagConstraints SecondLineConstraints = new GridBagConstraints();\r\n GridBagLayout SecondLineLayout = new GridBagLayout();\r\n Container SecondLineContainer = new Container();\r\n SecondLineContainer.setLayout(SecondLineLayout);\r\n\r\n SecondLineConstraints.insets = new Insets(0, 2, 2, 0);\r\n SecondLineConstraints.anchor = GridBagConstraints.WEST;\r\n SecondLineConstraints.gridwidth = 1;\r\n SecondLineConstraints.gridheight = 1;\r\n SecondLineConstraints.fill = GridBagConstraints.HORIZONTAL;\r\n SecondLineConstraints.weightx = 0.0;\r\n SecondLineConstraints.weighty = 0.0;\r\n SecondLineConstraints.gridy = 0;\r\n SecondLineConstraints.gridx = 0;\r\n SecondLineContainer.add(new JLabel(\"in directory\"), SecondLineConstraints);\r\n\r\n SecondLineConstraints.gridx = 1;\r\n SecondLineConstraints.weightx = 1.0;\r\n SecondLineContainer.add(DirPatternField, SecondLineConstraints);\r\n DirPatternField.setNextFocusableComponent(BrowseButton);\r\n DirPatternField.addActionListener(this);\r\n\r\n SecondLineConstraints.gridx = 2;\r\n SecondLineConstraints.weightx = 0.0;\r\n SecondLineContainer.add(BrowseButton, SecondLineConstraints);\r\n BrowseButton.setNextFocusableComponent(SubDirsTooCheckBox);\r\n\r\n SecondLineConstraints.gridx = 3;\r\n SecondLineConstraints.insets = new Insets(0, 6, 2, 0);\r\n SecondLineContainer.add(SubDirsTooCheckBox, SecondLineConstraints);\r\n SubDirsTooCheckBox.setSelected(true);\r\n SubDirsTooCheckBox.setNextFocusableComponent(SearchButton);\r\n return SecondLineContainer;\r\n }", "private com.google.protobuf.SingleFieldBuilder<\n Pokemon.ResponseEnvelop.Unknown6.Unknown2, Pokemon.ResponseEnvelop.Unknown6.Unknown2.Builder, Pokemon.ResponseEnvelop.Unknown6.Unknown2OrBuilder> \n getUnknown2FieldBuilder() {\n if (unknown2Builder_ == null) {\n unknown2Builder_ = new com.google.protobuf.SingleFieldBuilder<\n Pokemon.ResponseEnvelop.Unknown6.Unknown2, Pokemon.ResponseEnvelop.Unknown6.Unknown2.Builder, Pokemon.ResponseEnvelop.Unknown6.Unknown2OrBuilder>(\n getUnknown2(),\n getParentForChildren(),\n isClean());\n unknown2_ = null;\n }\n return unknown2Builder_;\n }", "public PileupElement getSecond() { return PE2; }", "protected Arena makeGame(Arena one, Arena two){\n\t\tGameMap map = maps.get(random.nextInt(maps.size()));\n\t\tfinalBuilder.setArenas(one, two);\n\t\tArena arena = finalBuilder.newArena();\n\t\tarena.setGameMap(map);\n\t\tUser leader = null;\n\t\tfor(ArenaSlot slot:arena.getSlots()){\n\t\t\tif (slot.getUser()!=null){\n\t\t\t\tleader = slot.getUser();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassert leader != null;\n\t\tarena.getAttributes().put(\"hostID\", String.valueOf(leader.getId()));\n\t\tarena.setName(leader.getName() + \"的房间\");\n\t\treturn arena;\n\t}", "public static Building getBuilding(int index) {\n return buildings.get(index);\n }", "@Test\n\tpublic void testADSBTupleBuilder2() {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.ADSB_2D);\n\t\t\n\t\tfinal Tuple tuple1 = tupleBuilder.buildTuple(ADS_B_3);\n\t\tfinal Tuple tuple2 = tupleBuilder.buildTuple(ADS_B_2);\n\t\tfinal Tuple tuple3 = tupleBuilder.buildTuple(ADS_B_1);\n\t\tfinal Tuple tuple4 = tupleBuilder.buildTuple(ADS_B_3);\n\n\t\tAssert.assertNull(tuple1);\n\t\tAssert.assertNull(tuple2);\n\t\tAssert.assertNull(tuple3);\n\t\tAssert.assertNotNull(tuple4);\n\t}", "Object getBuilderObject() {\n if (isBuilt) {\n throw new YobException(E_OBJ_IS_ALREADY_BUILT_NOT_FETCH);\n }\n\n if (builderOrBuiltObject == null) {\n throw new YobException(E_BUILDER_IS_NOT_SET);\n }\n\n return builderOrBuiltObject;\n }", "Object build();", "public Building getRoof();", "public Building getBuilding(String name) throws NullPointerException{\n // Placeholder method looks up the building in a dictionary\n Building building = demoBuildings.get(name);\n if(building == null){\n throw new NullPointerException(\"No buidling with given name\");\n }\n return building;\n }", "StatePac build();", "private BDD build_X() {\n\t\tBDD res = factory.makeOne();\n\n\t\tfor(int i = 0; i < this.dimension; i++){\n\t\t\tfor(int j = 0; j < this.dimension; j++){\n\t\t\t\tres.andWith(board[i][j].copy());\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}", "private MetaSparqlRequest createInsertMT2() {\n\t\t//is the same of MT1\n\t\treturn createInsertMT1();\n\t}", "public void assemble2() {\n\t\t\r\n\t}", "private Stack<String> pickLongerStack(Stack<String> first, Stack<String> second)\n {\n\treturn first.size() > second.size() ? first : second;\n }", "abstract SharedBuilder<B, C, M1, M2> setM2(M2 m2);", "abstract SharedBuilder<B, C, M1, M2> setM2(M2 m2);", "public WorldObject getSecondObject(){\r\n\t\treturn this.secondObject;\r\n\t}", "private Optional<MotorTorpedoBoat> buildBoat(final ShipId shipId) {\n try {\n MotorTorpedoBoat boat = boatDAO.load(shipId);\n boat.setFlotilla(this);\n return Optional.of(boat);\n } catch (ShipyardException ex) {\n log.error(\"Unable to build sub '{}' for side {}\", shipId.getName(), shipId.getSide());\n return Optional.empty();\n }\n }", "public Report.LocationOuterClass.GCJ02.Builder getGcj02Builder() {\n \n onChanged();\n return getGcj02FieldBuilder().getBuilder();\n }", "public Group getGroup_2_1() { return cGroup_2_1; }", "public static void buildStage2 ()\r\n {\r\n \r\n lgt.findParent(); //4\r\n lgt.findChild(0); //6\r\n lgt.insert(12);\r\n lgt.findParent();\r\n lgt.insert(13);\r\n lgt.findParent();\r\n lgt.insert(14);\r\n \r\n lgt.findRoot();\r\n lgt.findChild(0);//2\r\n lgt.findChild(0);//5\r\n lgt.insert(8);\r\n lgt.findParent();\r\n lgt.insert(9);\r\n lgt.findParent();\r\n lgt.insert(10);\r\n lgt.findParent();\r\n lgt.insert(11);\r\n \r\n }", "abstract T build();", "private IConfigBuilder _getTopLevelBuilder(int index) {\n // Next handle the sequence component (if any). Gemini uses a\n // \"dummy\" node as the root of the sequence\n // If this doesn't yet exist, return false\n final ISPSeqComponent top = _obs.getSeqComponent();\n if (top == null) return null;\n\n // Get all the seq builders that are children of top. If there\n // are none, return false\n final List<ISPSeqComponent> seqCompList = top.getSeqComponents();\n if (seqCompList == null) return null;\n\n // If the requested builder is out of range, return false\n final int size = seqCompList.size();\n if (index >= size) return null;\n\n final ISPSeqComponent seqComp = seqCompList.get(index);\n\n // Now try to get a builder\n final IConfigBuilder cb = (IConfigBuilder) seqComp.getClientData(IConfigBuilder.USER_OBJ_KEY);\n\n // Ignore nodes like SeqDataProc that don't have a config builder\n return (cb == null) ? _getTopLevelBuilder(++_seqBuilderIndex) : cb;\n }", "public Integer CreateBuilding(Building B) {\n\t\tif (BuildingContainer.size() == 0) {\n\t\t\tif ((TileID !=4)&(TileID != 3)){\n\t\t\t\tBuildingContainer.add(B);\n\t\t\t\tB.locate(xloc, yloc);\n\t\t\t\treturn 1; //Placement success\n\t\t\t} else {\n\t\t\t\treturn 0; //Tile is mountains or water\n\t\t\t}\n\t\t} else {\n\t\t\treturn 0; //Already a building here\n\t\t}\n\t}", "java.lang.String getBuilder();", "long getBuild();", "public Leilao builder() {\n\t\treturn this.leilao;\r\n\t}", "Object getBuiltObject() {\n if (!isBuilt) {\n throw new YobException(E_OBJ_IS_NOT_SET_NOT_FETCH);\n }\n\n if (builderOrBuiltObject == null) {\n throw new YobException(E_BUILT_OBJ_IS_NOT_SET);\n }\n\n return builderOrBuiltObject;\n }", "public GraphNode buildGraph()\n {\n GraphNode node1 = new GraphNode(1);\n GraphNode node2 = new GraphNode(2);\n GraphNode node3 = new GraphNode(3);\n GraphNode node4 = new GraphNode(4);\n List<GraphNode> v = new ArrayList<GraphNode>();\n v.add(node2);\n v.add(node4);\n node1.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node1);\n v.add(node3);\n node2.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node2);\n v.add(node4);\n node3.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node3);\n v.add(node1);\n node4.neighbours = v;\n return node1;\n }", "private SingleMatch matchBuilder() {\n\t\treturn new SingleMatch(currentMatchSettings.getSequenceLength(), currentMatchSettings.getAttempts(),\n\t\t\t\tcurrentMatchSettings.getGameViewFactory(), currentMatchSettings.getBreakerFactory(),\n\t\t\t\tcurrentMatchSettings.getMakerFactory());\n\t}", "public BuildingType getFirstLevel() {\n BuildingType buildingType = this;\n while (buildingType.getUpgradesFrom() != null) {\n buildingType = buildingType.getUpgradesFrom();\n }\n return buildingType;\n }", "public Image getBlast2() { return blast2;\t}", "public bb b() {\n return a(this.a);\n }", "public T2 _2() {\n return _2;\n }", "private Point getMoveDestination(Building b)\n\t{\n\t\tObjectType buildType = b.getObjectType();\n\t\tPoint workPoint = b.getPosition();\n\t\tfor (int i = workPoint.getX(); i < workPoint.getX()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType) - 1; i++)\n\t\t{\n\t\t\tPoint p1 = new Point(i, workPoint.getY() - 1);\n\t\t\tif (p1.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p1.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p1.getY()])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(i, workPoint.getY()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType));\n\t\t\tif ((p2.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length)\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p2.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p2.getY()])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\tfor (int j = workPoint.getY(); j < workPoint.getY()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType); j++)\n\t\t{\n\t\t\tPoint p1 = new Point(workPoint.getX() - 1, j);\n\t\t\tif (p1.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p1.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p1.getX()][j])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(workPoint.getX()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType), j);\n\t\t\tif (p2.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p2.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p2.getX()][j])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\treturn null;\n\t}", "public Building getBuilding() {\n return building;\n }", "public Object build();", "protected DNA NEATcross(DNA other) {\n\t\tDNA hifit;\n\t\tDNA lofit;\n\n\t\tif (this.fitness == null || other.fitness == null)\n\t\t\treturn null;\n\n\t\tDNA ret = new DNA(population, false);\n\n\t\t// Choose the genome with the higher fitness\n\t\tif (this.fitness > other.fitness) {\n\t\t\thifit = this;\n\t\t\tlofit = other;\n\t\t} else {\n\t\t\thifit = this;\n\t\t\tlofit = other;\n\t\t}\n\n\t\t// Populate gene list of ret\n\t\tfor (Integer i : hifit.getInnovations()) {\n\t\t\tGene submission;\n\t\t\tif (!lofit.hasGene(i)) {\n\t\t\t\tsubmission = hifit.getGene(i);\n\t\t\t} else {\n\t\t\t\tGene newgene;\n\t\t\t\tif (Braincraft\n\t\t\t\t\t\t.randomChance(population.inheritFromHigherFitRate))\n\t\t\t\t\tnewgene = new Gene(hifit.getGene(i));\n\t\t\t\telse\n\t\t\t\t\tnewgene = new Gene(lofit.getGene(i));\n\t\t\t\tif (!hifit.getGene(i).enabled || !lofit.getGene(i).enabled) {\n\t\t\t\t\tif (Braincraft.randomChance(population.disabledRate))\n\t\t\t\t\t\tnewgene.enabled = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tnewgene.enabled = true;\n\t\t\t\t}\n\t\t\t\tsubmission = newgene;\n\t\t\t}\n\t\t\tif (!ret.hasNode(submission.start)) {\n\t\t\t\tret.submitNewNode(hifit.getNode(submission.start));\n\t\t\t}\n\t\t\tif (!ret.hasNode(submission.end)) {\n\t\t\t\tret.submitNewNode(hifit.getNode(submission.end));\n\t\t\t}\n\t\t\tret.submitNewGene(submission);\n\t\t}\n\n\t\tif (Braincraft.randomChance(population.weightMutationRate))\n\t\t\tret.mutateWeights();\n\t\tif (Braincraft.randomChance(population.linkMutationRate))\n\t\t\tret.mutateAddLink();\n\t\tif (Braincraft.randomChance(population.nodeMutationRate))\n\t\t\tret.mutateAddNode();\n\t\tif (Braincraft.randomChance(population.linkDisableRate))\n\t\t\tret.mutateDisableLink();\n\n\t\treturn ret;\n\t}", "public static Finder<WebElement, WebDriver> second(final Finder<WebElement, WebDriver> finder) {\n \t\treturn new BaseFinder<WebElement, WebDriver>() {\n \t\t\t\n \t\t\t@Override\n \t\t\tpublic Collection<WebElement> findFrom(WebDriver context) {\n \t\t\t\tCollection<WebElement> collection = super.findFrom(context);\n \t\t\t\tif (collection.size() > 1) {\n \t\t\t\t\tIterator<WebElement> iter = collection.iterator();\n \t\t\t\t\titer.next();\n \t\t\t\t\treturn Collections.singletonList(iter.next());\n \t\t\t\t} else {\n \t\t\t\t\treturn collection;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tprotected Collection<WebElement> extractFrom(WebDriver context) {\n \t\t\t\treturn finder.findFrom(context);\n \t\t\t}\n \t\t\t\n \t\t\tprotected void describeTargetTo(Description description) {\n \t\t\t\tdescription.appendText(\"second \");\n \t\t\t\tfinder.describeTo(description);\n \t\t\t}\n \t\t};\n \t}", "Builder makePermanent();", "abstract Object build();", "private com.google.protobuf.SingleFieldBuilderV3<\n Report.LocationOuterClass.GCJ02, Report.LocationOuterClass.GCJ02.Builder, Report.LocationOuterClass.GCJ02OrBuilder> \n getGcj02FieldBuilder() {\n if (gcj02Builder_ == null) {\n gcj02Builder_ = new com.google.protobuf.SingleFieldBuilderV3<\n Report.LocationOuterClass.GCJ02, Report.LocationOuterClass.GCJ02.Builder, Report.LocationOuterClass.GCJ02OrBuilder>(\n getGcj02(),\n getParentForChildren(),\n isClean());\n gcj02_ = null;\n }\n return gcj02Builder_;\n }", "SharedBuilder<B, C, M1, M2> setM2(M2 m2);", "SharedBuilder<B, C, M1, M2> setM2(M2 m2);", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public Group getGroup_2() { return cGroup_2; }", "public String getBuilding() {\n return building;\n }", "public Ialialbuilding(Ial myIal, Ial my2Ial, int buildSize, int buildHeight) {\n this.myIal = myIal;\n this.my2Ial = my2Ial;\n this.buildSize = buildSize;\n this.buildHeight = buildHeight;\n\n if(buildSize == 2) {\n rmov0_0 = new float[]{-10, 10, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov1_0 = new float[]{1, -10, -1, 10, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov0_1 = new float[]{1, 1, -1, -10, 10, -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov1_1 = new float[]{1, 1, -1, 1, -10, -1, -1, -1, -1, 10, 5, -1, -1, -1, -1, -1, -1, -1};\n }\n if(buildSize == 3) {\n rmov0_0 = new float[]{-10, 10, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov1_0 = new float[]{1, -10, 10, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov2_0 = new float[]{1, 1, -10, 10, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov0_1 = new float[]{1, 1, 1, -10, 10, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov1_1 = new float[]{1, 1, 1, 1, -10, 10, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov2_1 = new float[]{1, 1, 1, 1, 1, -10, 10, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov0_2 = new float[]{1, 1, 1, 1, 1, 1, -10, 10, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov1_2 = new float[]{1, 1, 1, 1, 1, 1, 1, -10, 10, 5, -1, -1, -1, -1, -1, -1, -1, -1};\n rmov2_2 = new float[]{1, 1, 1, 1, 1, 1, 1, 1, -10, 10, 5, -1, -1, -1, -1, -1, -1, -1};\n }\n if(buildHeight == 1 && buildSize == 2) {\n rmovu0_0 = new float[]{1, 1, -1, 1, 1, -1, -1, -1, -1, -10, 10, -1, 5, -1, -1, -1, -1, -1};\n rmovu1_0 = new float[]{1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -10, -1, 10, 5, -1, -1, -1, -1};\n rmovu0_1 = new float[]{5, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -10, 10, -1, -1, -1, -1};\n rmovu1_1 = new float[]{10, 5, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -10, -1, -1, -1, -1};\n } \n if(buildHeight == 1 && buildSize == 3) {\n rmovu0_0 = new float[]{1, 1, 1, 1, 1, 1, 1, 1, 1, -10, 10, 5, -1, -1, -1, -1, -1, -1};\n rmovu1_0 = new float[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -10, 10, 5, -1, -1, -1, -1, -1};\n rmovu2_0 = new float[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -10, 10, 5, -1, -1, -1, -1};\n rmovu0_1 = new float[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -10, 10, 5, -1, -1, -1};\n rmovu1_1 = new float[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -10, 10, 5, -1, -1};\n rmovu2_1 = new float[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -10, 10, 5, -1};\n rmovu0_2 = new float[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -10, 10, 5};\n rmovu1_2 = new float[]{5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -10, 10};\n rmovu2_2 = new float[]{10, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -10};\n }\n }", "private BDD build_T() {\n\t\tExecutorService executorService = Executors.newCachedThreadPool();\n\t\tList<Future<BDD>> tasks = new ArrayList<>(processors);\n\n\t\tint scheduler = processors;\n\t\tint work = endGenerations / processors;\n\t\tint half = work;\n\n\t\tif((endGenerations % processors) != 0)\n\t\t\tscheduler--;\n\n\t\tfor (int i = 0; i < scheduler; i++){\n\t\t\ttasks.add(executorService.submit(new AsyncTask(work - half, work)));\t\n\n\t\t\twork += half;\n\t\t}\n\n\t\tif((endGenerations % processors) != 0)\n\t\t\ttasks.add(executorService.submit(new AsyncTask(work - half, work+1)));\t\n\t\t\n\n\t\tBDD res = factory.makeZero();\n\t\tfor (int i = 0; i < processors; i++) {\n\t\t\ttry {\n\n\t\t\t\tres.orWith(tasks.get(i).get());\n\n\t\t\t} catch (InterruptedException | ExecutionException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\t\n\t\t}\n\n\t\texecutorService.shutdown();\n\n\t\treturn res;\n\t}", "@Test\n public void testBuild() {\n assertEquals(r1.build(new Position2D(21, 42), new Color(255, 0, 0),\n new Dimension2D(100, 20)), new Rectangle(100, 20, new Color(255, 0, 0),\n new Position2D(21, 42)));\n\n assertEquals(r1.build(new Position2D(-28, 0), new Color(255, 255, 255),\n new Dimension2D(4, 0)), new Rectangle(4, 0, new Color(255, 255, 255),\n new Position2D(-28, 0)));\n }", "public static void main(String[] args) {\n\n House house=new House.HouseBuilder().build();\n\n House house1=new House.HouseBuilder()\n .addGarage(true)\n .addGarden(new Garden())\n .addRooms(5)\n .addWindows(10)\n .build();\n\n\n\n\n House houseWithoutGarden=new House.HouseBuilder().addGarage(true).addRooms(5).addWindows(10).build();\n\n }", "public String getBuild2Number() {\n\t\treturn \"\"+nb_build2;\n\t}", "public static Object builder() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void buildPart2() {\n\t\tproduct.setPart2(\"ASPEC2\");\r\n\t}", "public Rectangle getBuilding()\r\n {\r\n return building;\r\n }", "public B getSecond() {return second; }", "public abstract Object build();", "public static Object builder() {\n\t\treturn null;\r\n\t}", "protected BattleSecondMoveState secondMoveState(){\n return new BattleSecondMoveState(\n this.mFightButton,\n this.mPokemonButton,\n this.mBagButton,\n this.mRunButton,\n this.mActionButton,\n this.mOptionList,\n this.mBattle,\n this.mMessage\n );\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Rect2, godot.wire.Wire.Rect2.Builder, godot.wire.Wire.Rect2OrBuilder> \n getRect2ValueFieldBuilder() {\n if (rect2ValueBuilder_ == null) {\n if (!(typeCase_ == 7)) {\n type_ = godot.wire.Wire.Rect2.getDefaultInstance();\n }\n rect2ValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Rect2, godot.wire.Wire.Rect2.Builder, godot.wire.Wire.Rect2OrBuilder>(\n (godot.wire.Wire.Rect2) type_,\n getParentForChildren(),\n isClean());\n type_ = null;\n }\n typeCase_ = 7;\n onChanged();;\n return rect2ValueBuilder_;\n }", "protected abstract SelfChainingDataObject getNewIndependentInstance();", "private ByteBuffer passTwo() {\r\n\t\t// int hiAddress = ((((instructionCounter.getCurrentLocation() - 1) / SIXTEEN) + 2) * SIXTEEN) - 1;\r\n\t\tint hiAddress = (instructionCounter.getCurrentLocation() - 1) | 0X0F;\r\n\t\tByteBuffer memoryImage = ByteBuffer.allocate(hiAddress + 1);\r\n\r\n\t\tint lowestLocationSet = instructionCounter.getLowestLocationSet();\r\n\t\tinstructionCounter.reset(lowestLocationSet);\r\n\t\tinstructionCounter.setCurrentLocation(lowestLocationSet);\r\n\t\tint currentLocation;\r\n\t\tString instructionImage;\r\n\t\tSourceLineParts sourceLineParts;\r\n\r\n\t\twhile (!allLineParts.isEmpty()) {\r\n\t\t\tinstructionImage = EMPTY_STRING;\r\n\r\n\t\t\tcurrentLocation = instructionCounter.getCurrentLocation();\r\n\t\t\tsourceLineParts = allLineParts.poll();\r\n\r\n\t\t\tif (sourceLineParts.hasInstruction()) {\r\n\t\t\t\tinstructionImage = setMemoryBytesForInstruction(sourceLineParts);\r\n\t\t\t} else if (sourceLineParts.hasDirective()) {\r\n\t\t\t\tinstructionImage = setMemoryBytesForDirective(sourceLineParts);\r\n\t\t\t} // if\r\n\t\t\tmakeListing(currentLocation, instructionImage, sourceLineParts);\r\n\t\t\tif (!instructionImage.equals(EMPTY_STRING)) {\r\n\t\t\t\tbuildMemoryImage(currentLocation, instructionImage, memoryImage);\r\n\t\t\t} // if\r\n\t\t} // while\r\n\r\n\t\ttpListing.setCaretPosition(0);\r\n\t\tmakeXrefListing();\r\n\t\t// makeMemoryFile(memoryImage);\r\n\t\treturn memoryImage;\r\n\t}", "public C build() {\n if (configs.isEmpty()) {\n throw new RuntimeException(\"There should be at least one configuration provided\");\n }\n\n // Handling config files\n ConfigSource firstConfigSource = configs.get(0);\n Config firstConfigOrig = getConfigSupplier(firstConfigSource).getConfig();\n if (!(supportedConfig.isInstance(firstConfigOrig))) {\n throw new RuntimeException(\n String.format(\n \"Config is not of parameterized type %s, got instead %s\",\n supportedConfig.getName(), firstConfigOrig.getClass().getName()));\n }\n C firstConfig = (C) firstConfigOrig;\n for (int i = 1; i < configs.size(); ++i) {\n ConfigSource nextConfigSource = configs.get(i);\n Config nextConfig = getConfigSupplier(nextConfigSource).getConfig();\n try {\n firstConfig = copyProperties(firstConfig, nextConfig);\n } catch (Exception ex) {\n throw new RuntimeException(\n String.format(\"Failed to merge config %s into main config\", nextConfigSource), ex);\n }\n }\n\n // Handling string pathValue pairs config overrides\n for (Pair<String, Object> pathValue : pathValueOverrides) {\n try {\n PropertyUtils.setNestedProperty(firstConfig, pathValue.getValue0(), pathValue.getValue1());\n } catch (Exception e) {\n throw new RuntimeException(\n String.format(\n \"Cannot override property %s with value %s\",\n pathValue.getValue0(), pathValue.getValue1()),\n e);\n }\n }\n\n return firstConfig;\n }", "public Student build() { \n\t return new Student(this); \n\t }", "public Number getWork2()\r\n {\r\n return (m_work2);\r\n }", "public String getBuilding() {\n return building;\n }", "public Pizza build(){\n Pizza pizza = new Pizza(this);\n return pizza;\n }", "private GeneralPath buildPath() {\n path = new GeneralPath();\n path.moveTo(p1.x, p1.y);\n path.lineTo(p2.x, p2.y);\n path.lineTo(p3.x, p3.y);\n path.closePath();\n assert path != null;\n return path;\n }", "public String buildingString() {\r\n\t\twhichBuild = 1 - whichBuild;\r\n\t\tif (whichBuild == 1) {\r\n\r\n\t\t}\r\n\t\treturn \"420 400;10 10 140 60 60 60 10;140 10 240 60 180 60 10;240 10 400 60 320 60 20 ;10 90 120 180 40 90 15;120 90 280 180 160 90 10;280 90 400 180 340 90 10\";\r\n\t}", "public com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.flightLeg.Builder getReturnFlightLegBuilder() {\n \n onChanged();\n return getReturnFlightLegFieldBuilder().getBuilder();\n }" ]
[ "0.6505593", "0.57511836", "0.5717202", "0.56210905", "0.5518668", "0.5512543", "0.5509886", "0.5497062", "0.54597485", "0.54368466", "0.54108316", "0.54108316", "0.539822", "0.5390375", "0.53870887", "0.538432", "0.53652275", "0.5357321", "0.5330798", "0.53095204", "0.52972084", "0.52823365", "0.52510065", "0.52400184", "0.52053255", "0.5199304", "0.51953024", "0.5161667", "0.51555693", "0.5152772", "0.5142776", "0.5142776", "0.5105402", "0.50985163", "0.5089634", "0.50858814", "0.50731844", "0.5070464", "0.5065038", "0.5037963", "0.50269353", "0.50221425", "0.5012539", "0.50061375", "0.49956042", "0.49752378", "0.49568132", "0.495253", "0.49520662", "0.4949873", "0.49456486", "0.49389532", "0.4930648", "0.4929268", "0.4921016", "0.48978868", "0.4888273", "0.48773825", "0.48739377", "0.48739377", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48712215", "0.48701283", "0.4863746", "0.48575795", "0.48571151", "0.48486024", "0.48457146", "0.4843049", "0.48361254", "0.48356447", "0.48339885", "0.48255756", "0.48213658", "0.4815358", "0.48150986", "0.48100826", "0.48100495", "0.4808277", "0.4806879", "0.48003235", "0.4798841", "0.4787552", "0.47863352", "0.4786137", "0.47736916" ]
0.5959453
1
adding everything into the canvas
@Override public void start(Stage primaryStage) throws Exception { stagePrimary = primaryStage; stagePrimary.setTitle("Intelligent Building By Curtis Baldwin"); BorderPane bp = new BorderPane(); bp.setPadding(new Insets(10, 20, 10, 20)); bp.setTop(setMenu()); // put menu at the top Group root = new Group(); // create group with canvas Canvas canvas = new Canvas(500, 500); root.getChildren().add(canvas); bp.setCenter(root); // load canvas to left area gc = canvas.getGraphicsContext2D(); // context for drawing timer = new AnimationTimer() { // set up timer public void handle(long currentNanoTime) { theBuilding.update(); theBuilding.updateHoover(); drawBuilding(); } }; rtPane = new VBox(); // set vBox on right to list items rtPane.setAlignment(Pos.TOP_LEFT); rtPane.setPadding(new Insets(5, 75, 75, 5)); bp.setRight(rtPane); bp.setBottom(setButtons()); // set bottom pane with buttons Scene scene = new Scene(bp, 800, 600); // set overall scene bp.prefHeightProperty().bind(scene.heightProperty()); bp.prefWidthProperty().bind(scene.widthProperty()); primaryStage.setScene(scene); primaryStage.show(); whichBuild = 0; theBuilding = new Building(buildingString()); showWelcome(); // set welcome message drawBuilding(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void newCanvas() {\n\t\timgCanvas = new ImageCanvas(1000, 563);\n\t\t//canvasJP.add(imgCanvas);\n\t}", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }", "public GreetingCardCanvas(){\n array = new ArrayList<>();\n //Winter background\n array.add(new Square(0, 0, 256, 768,new Color(123, 165, 248)));\n array.add(new Square(0, 700, 256, 68, new Color(255,250,250)));\n //Autumn background\n array.add(new Square(256, 0, 256, 768,new Color(162, 163, 3)));\n array.add(new Square(256, 700, 256, 68, new Color(218,165,32)));\n //Spring background\n array.add(new Square(512, 0, 256, 768,new Color(0, 255, 127)));\n array.add(new Square(512, 700, 256, 68, new Color(124, 252, 0)));\n //Summer background\n array.add(new Square(768, 0, 256, 768,new Color(202,238,249)));\n array.add(new Square(768, 700, 256, 68, new Color(249, 209, 153)));\n //Sun\n array.add(new Sun (974, -50, 100, new Color(255, 170, 0),new Color(255, 195, 77)));\n //Winter Trunk\n array.add(new Trunk(120, 720, new Color(160, 82, 45)));\n //Autumm Trunk\n array.add(new Trunk(376, 720, new Color(160, 82, 45)));\n //Spring Trunk\n array.add(new Trunk(632, 720, new Color(160, 82, 45)));\n //Summer Trunk\n array.add(new Trunk(888, 720, new Color(160, 82, 45)));\n //Summer Leaves\n array.add(new Leaves(968, 600, Color.GREEN));\n //Spring Leaves\n array.add(new Leaves(712, 600, new Color(255, 183, 197)));\n //Autumn Leaves\n array.add(new Leaves(456, 600, new Color(218, 120, 27)));\n //Falling Autumn Leaves\n array.add(new Leaf(440, 650, new Color(218, 120, 27)));\n array.add(new Leaf(456, 700, new Color(218, 120, 27)));\n array.add(new Leaf(300, 680, new Color(218, 120, 27)));\n array.add(new Leaf(356, 710, new Color(218, 120, 27)));\n array.add(new Leaf(330, 650, new Color(218, 120, 27)));\n //Winter Snow\n array.add(new Snow(50, 50, 10, Color.WHITE));\n array.add(new Snow(123, 400, 10, Color.WHITE));\n array.add(new Snow(90, 90, 10, Color.WHITE));\n array.add(new Snow(100, 340, 10, Color.WHITE));\n array.add(new Snow(200, 200, 10, Color.WHITE));\n array.add(new Snow(140, 100, 10, Color.WHITE));\n array.add(new Snow(80, 200, 10, Color.WHITE));\n array.add(new Snow(60, 250, 10, Color.WHITE));\n array.add(new Snow(210, 250, 10, Color.WHITE));\n //Summer Clouds\n array.add(new Cloud(800, 20, 50, Color.WHITE));\n array.add(new Cloud(850, 120, 50, Color.WHITE));\n //Summer Birds\n array.add(new Bird(800, 100, 20, new Color(64,224,208), new Color(224,255,255)));\n array.add(new Bird(900, 70, 30, new Color(218,165,32), new Color(204,204,0)));\n //Beach ball\n array.add(new BeachBall(800, 710, 40));\n //Spring Flowers\n array.add(new Flowers(570, 720, 10, new Color(255, 183, 197)));\n array.add(new Flowers(610, 740, 10, new Color(255, 183, 197)));\n array.add(new Flowers(670, 720, 10, new Color(255, 183, 197)));\n array.add(new Flowers(720, 730, 10, new Color(255, 183, 197)));\n array.add(new Flowers(570, 520, 10, new Color(255, 183, 197)));\n array.add(new Flowers(610, 500, 10, new Color(255, 183, 197)));\n array.add(new Flowers(670, 530, 10, new Color(255, 183, 197)));\n array.add(new Flowers(720, 540, 10, new Color(255, 183, 197)));\n //More Winter Snow\n array.add(new Snow(123, 0, 10, Color.WHITE));\n array.add(new Snow(90, -310, 10, Color.WHITE));\n array.add(new Snow(100, -60, 10, Color.WHITE));\n array.add(new Snow(200, -200, 10, Color.WHITE));\n array.add(new Snow(140, -300, 10, Color.WHITE));\n array.add(new Snow(80, -200, 10, Color.WHITE));\n array.add(new Snow(60, -250, 10, Color.WHITE));\n array.add(new Snow(210, -250, 10, Color.WHITE));\n //The displayed text\n array.add(new Fonts());\n //Spring Clouds\n array.add(new Cloud(544, 20, 50, new Color(239,238,237)));\n array.add(new Cloud(594, 120, 50, new Color(239,238,237)));\n //Autumn Clouds\n array.add(new Cloud(288, 20, 50, new Color(224,223,221)));\n array.add(new Cloud(338, 120, 50, new Color(224,223,221)));\n //Winter Clouds\n array.add(new Cloud(32, 20, 50, new Color(168,167,165)));\n array.add(new Cloud(82, 120, 50, new Color(168,167,165)));\n //Autumn Flowers\n array.add(new AutumnLeaf(314, 720, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(354, 740, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(414, 720, 20, new Color(176, 101, 75)));\n array.add(new AutumnLeaf(464, 730, 20, new Color(176, 101, 75)));\n setPreferredSize(new Dimension(1024, 768));\n \n }", "public void start() {\n\t\t\n\t\t/*\n\t\t * This is the main JFrame that everything will be placed on. \n\t\t * The size is set to a maximum value, and made unresizable to make repainting easier to achieve.\n\t\t */\n\t\tJFrame frame = new JFrame(\"Paint\");\n\t\tframe.setSize(Canvas.getMaxWindowSize(), Canvas.getMaxWindowSize());\n\t\tframe.setResizable(false);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t/*\n\t\t * The mainPanel is the panel on which all the other panels will be organized.\n\t\t * It uses a BorderLayout to divide the panel into 5 possible areas: North, South, West, East, and Center.\n\t\t */\n\t\tJPanel mainPanel = new JPanel(new BorderLayout());\n\t\tframe.add(mainPanel);\n\t\t\n\t\t/*\n\t\t * The canvas is added to the center of the mainPanel.\n\t\t */\n\t\tCanvas canvas = new Canvas();\n\t\tmainPanel.add(canvas, BorderLayout.CENTER);\n\t\t\n\t\t/*\n\t\t * The topToolPanel is a JPanel that will also use a BorderLayout to organize items placed upon it.\n\t\t * It is placed in the North portion of the mainPanel.\n\t\t */\n\t\tJPanel topToolPanel = new JPanel(new BorderLayout());\n\t\tmainPanel.add(topToolPanel, BorderLayout.NORTH);\n\t\t\n\t\t/*\n\t\t * The shapeToolsPanel is JPanel on which all the buttons for different shapes will be placed. \n\t\t * It is placed in the West portion of the topToolPanel.\n\t\t */\n\t\tJPanel shapeToolsPanel = new JPanel();\n\t\ttopToolPanel.add(shapeToolsPanel, BorderLayout.WEST);\n\t\t\n\t\t/*\n\t\t * The usefulToolPanel will hold buttons for options like \"Fill\" or \"No Fill\", as well as our \"Undo\" button.\n\t\t */\n\t\tJPanel usefulToolPanel = new JPanel();\n\t\ttopToolPanel.add(usefulToolPanel, BorderLayout.EAST);\n\t\t\n\t\t/*\n\t\t * Each of the next five buttons added represent an option to choose a certain shape to draw.\n\t\t * They all get added to the shapeToolsPanel from left to right.\n\t\t */\n\t\tJButton rectButton = new JButton(\"Rectangle\");\n\t\tshapeToolsPanel.add(rectButton);\n\t\trectButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"rectangle\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton circButton = new JButton (\"Circle\");\n\t\tshapeToolsPanel.add(circButton);\n\t\tcircButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"circle\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton triButton = new JButton (\"Triangle\");\n\t\tshapeToolsPanel.add(triButton);\n\t\ttriButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"triangle\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton lineButton = new JButton (\"Line\");\n\t\tshapeToolsPanel.add(lineButton);\n\t\tlineButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"line\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton penButton = new JButton (\"Pen\");\n\t\tshapeToolsPanel.add(penButton);\n\t\tpenButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeSelection(\"pen\");\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t/*\n\t\t * The following three buttons are useful tools for the program to use: the option to choose whether or not to fill shapes, and the undo option.\n\t\t * Each of these will be added to the usefulToolPanel, once again from right to left.\n\t\t */\n\t\tJButton fillButton = new JButton(\"Fill\");\n\t\tusefulToolPanel.add(fillButton);\n\t\tfillButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setIsFilled(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton outlineButton = new JButton(\"No Fill\");\n\t\tusefulToolPanel.add(outlineButton);\n\t\toutlineButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setIsFilled(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton increaseButton = new JButton (\"Increase width\");\n\t\tusefulToolPanel.add(increaseButton);\n\t\tincreaseButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setShapeThickness(Canvas.getShapeThickness() + 1);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton decreaseButton = new JButton (\"Decrease width\");\n\t\tusefulToolPanel.add(decreaseButton);\n\t\tdecreaseButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tCanvas.setShapeThickness(Canvas.getShapeThickness() - 1);\n\t\t\t\t}catch(IllegalArgumentException exception) {\n\t\t\t\t\tSystem.out.println(\"The shape thickness cannot be zero.\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton undoButton = new JButton (\"Undo\");\n\t\tusefulToolPanel.add(undoButton);\n\t\tundoButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tcanvas.undo();\n\t\t\t\t}catch(IndexOutOfBoundsException exception) {\n\t\t\t\t\tSystem.out.println(\"No item in shape list to undo.\");\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\t * The colorPanel is a JPanel which utilizes a GridLayout to organize buttons from the top to the bottom.\n\t\t * It is set up to have more rows than are actually filled to minimize the size of each button on it.\n\t\t */\n\t\tJPanel colorPanel = new JPanel(new GridLayout(defaultGridRows, defaultGridColumns, defaultGridPadding, defaultGridPadding));\n\t\tmainPanel.add(colorPanel, BorderLayout.WEST);\n\t\t\n\t\t/*\n\t\t * Each of the following buttons will be added to the colorPanel.\n\t\t * They will stack one on top of the other as the grid is set up to only have one column.\n\t\t * Additionally, the text portion of each button will be set to the color that the button is connected to.\n\t\t */\n\t\tJButton blackButton = new JButton (\"Black\");\n\t\tcolorPanel.add(blackButton);\n\t\tblackButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.black);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton yellowButton = new JButton (\"Yellow\");\n\t\tyellowButton.setForeground(Color.yellow);\n\t\tcolorPanel.add(yellowButton);\n\t\tyellowButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.yellow);\n\t\t\t}\n\t\t});\n\n\t\tJButton greenButton = new JButton (\"Green\");\n\t\tgreenButton.setForeground(Color.green);\n\t\tcolorPanel.add(greenButton);\n\t\tgreenButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.green);\n\t\t\t}\n\t\t});\n\n\t\tJButton blueButton = new JButton (\"Blue\");\n\t\tblueButton.setForeground(Color.blue);\n\t\tcolorPanel.add(blueButton);\n\t\tblueButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.blue);\n\t\t\t}\n\t\t});\n\n\t\tJButton magentaButton = new JButton (\"Magenta\");\n\t\tmagentaButton.setForeground(Color.magenta);\n\t\tcolorPanel.add(magentaButton);\n\t\tmagentaButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.magenta);\n\t\t\t}\n\t\t});\n\n\t\tJButton redButton = new JButton (\"Red\");\n\t\tredButton.setForeground(Color.red);\n\t\tcolorPanel.add(redButton);\n\t\tredButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.red);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton pinkButton = new JButton (\"Pink\");\n\t\tpinkButton.setForeground(Color.pink);\n\t\tcolorPanel.add(pinkButton);\n\t\tpinkButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCanvas.setColorSelection(Color.pink);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tframe.setVisible(true);\n\t}", "@Override\n\tpublic void draw(Canvas canvas) {\n\t\t\n\t}", "@Override\n\tpublic void draw(Canvas canvas) {\n\n\t}", "public Canvas() {\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }", "public void draw(Canvas canvas);", "public void draw(Canvas canvas);", "@Override\n public void draw(Canvas canvas){\n final float scaleFactorX = getWidth()/(WIDTH*1.f);\n final float scaleFactorY = getHeight()/(HEIGHT*1.f);\n if(canvas!=null){\n final int savedState = canvas.save();\n canvas.scale(scaleFactorX, scaleFactorY);\n bg.draw(canvas);\n //below was to draw collis boxes\n // canvas.drawRect(new Rect(10, 10, 200,300 - 15*jumpCounter), myPaint);\n // if(!bananas.isEmpty())\n // canvas.drawRect(bananas.get(0).getRectangle(), myPaint );\n player.draw(canvas);\n for(TallBricks c: cones){\n c.draw(canvas);\n }\n for(Banana b: bananas){\n b.draw(canvas);\n }\n drawText(canvas);\n canvas.restoreToCount(savedState);\n }\n }", "private void createCanvasAndFrame(){\n image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n canvas = new Canvas();\n Dimension dimension = new Dimension((int)(width*scale), (int)(height*scale));\n canvas.setPreferredSize(dimension);\n canvas.setMaximumSize(dimension);\n canvas.setMinimumSize(dimension);\n\n frame = new JFrame(title);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLayout(new BorderLayout());\n frame.add(canvas, BorderLayout.CENTER);\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setResizable(false);\n frame.setVisible(true);\n\n canvas.createBufferStrategy(2);\n bufferStrategy = canvas.getBufferStrategy();\n graphics = bufferStrategy.getDrawGraphics();\n }", "public void draw(float delta) {\n\t\tcanvas.clear();\n\t\tcanvas.begin();\n\t\tcw = canvas.getWidth();\n\t\tch = canvas.getHeight();\n\t\tfor (int i = -5; i < 5; i++) {\n\t\t\tfor (int j = -5; j < 5; j++) {\n\t\t\t\tcanvas.draw(getBackground(dayTime), Color.WHITE, cw*i * 2, ch*j * 2, cw * 2, ch * 2);\n\t\t\t\tif(dayTime == 0 || dayTime == 1){\n\t\t\t\t\tcanvas.draw(getBackground(dayTime + 1), levelAlpha, cw*i * 2, ch*j * 2, cw * 2, ch * 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcanvas.end();\n\t\tif (walls.size() > 0){ \n\t\t\tfor (ArrayList<Float> wall : walls) canvas.drawPath(wall);\n\t\t}\n\t\tcanvas.begin();\n\t\t//\t\tcanvas.draw(background, Color.WHITE, 0, 0, canvas.getWidth(), canvas.getHeight());\n\t\t//canvas.draw(rocks, Color.WHITE, 0, 0, canvas.getWidth(), canvas.getHeight());\n\t\t\n\t\t\n//\t\tfor (ArrayList<Float> wall : walls) canvas.drawPath(wall);\n\t\t\n\t\tfor(Obstacle obj : objects) {\n\t\t\tobj.draw(canvas);\n\t\t}\n\t\t\n\n\t\tfor (int i = -5; i < 5; i++) {\n\t\t\tfor (int j = -5; j < 5; j++) {\n\t\t\t\tcanvas.draw(overlay, referenceC, cw*i, ch*j, cw, ch);\n\t\t\t}\n\t\t}\n\n\t\tcanvas.end();\n\n\t\tif (debug) {\n\t\t\tcanvas.beginDebug();\n\t\t\tfor(Obstacle obj : objects) {\n\t\t\t\tobj.drawDebug(canvas);\n\t\t\t}\n\t\t\tcanvas.endDebug();\n\t\t}\n\n\n\n//\t\t// Final message\n//\t\tif (complete && !failed) {\n//\t\t\tdisplayFont.setColor(Color.BLACK);\n//\t\t\tcanvas.begin(); // DO NOT SCALE\n//\t\t\tcanvas.drawTextCentered(\"VICTORY!\", displayFont, 0.0f);\n//\t\t\tcanvas.end();\n//\t\t\tdisplayFont.setColor(Color.BLACK);\n//\t\t} else if (failed) {\n//\t\t\tdisplayFont.setColor(Color.RED);\n//\t\t\tcanvas.begin(); // DO NOT SCALE\n//\t\t\tcanvas.drawTextCentered(\"FAILURE!\", displayFont, 0.0f);\n//\t\t\tcanvas.end();\n//\t\t}\n\t}", "@Override\r\n\tpublic void draw(final Canvas canvas) {\n\r\n\t}", "public void dispatchDraw(Canvas canvas) {\n int[] iArr = new int[2];\n int[] iArr2 = new int[2];\n this.f2856b.getLocationOnScreen(iArr);\n this.f2857c.getLocationOnScreen(iArr2);\n canvas.translate((float) (iArr2[0] - iArr[0]), (float) (iArr2[1] - iArr[1]));\n canvas.clipRect(new Rect(0, 0, this.f2857c.getWidth(), this.f2857c.getHeight()));\n super.dispatchDraw(canvas);\n ArrayList<Drawable> arrayList = this.f2858d;\n int size = arrayList == null ? 0 : arrayList.size();\n for (int i2 = 0; i2 < size; i2++) {\n ((Drawable) this.f2858d.get(i2)).draw(canvas);\n }\n }", "@Override\n\tpublic void draw(Graphics canvas) {}", "public DrawCanvas(DrawConsoleUI drawConsole) {\n /*Call the super constructor and set the background colour*/\n super();\n this.setBackground(Color.white);\n\n /*Set the size of this component*/\n this.setPreferredSize(new Dimension(970,800));\n\n /*Enable autoscroll for this panel, when there is a need to\n update component's view*/\n this.setAutoscrolls(true);\n\n /*Construct a list that will hold the shapes*/\n //shapesBuffer = Collections.synchronizedList(new ArrayList());\n labelBuffer = Collections.synchronizedList(new ArrayList());\n\n /*Hold a reference to the DrawConsoleUI class*/\n drawConsoleUI = drawConsole;\n\n \n /***\n * Register Listeners to the canvas\n */\n\n /*Mouse move*/\n this.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n //panelMouseMoved(evt);\n }//end mouse motion moved\n\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n try {\n panelMouseDragged(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end mouse motion Dragged\n });\n\n /*Mouse Clicked*/\n this.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n try {\n panelMouseClicked(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n\n /*Mouse Pressed*/\n public void mousePressed(java.awt.event.MouseEvent evt) {\n try {\n panelMousePressed(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n\n /*Mouse Released*/\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n try {\n panelMouseReleased(evt);\n } catch (Exception e) {e.getMessage(); }\n }//end\n });\n\n\n }", "private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\tb1.paint(canvas);\n\t\tb2.paint(canvas);\n\t\tb3.paint(canvas);\n\t\tb4.paint(canvas);\n\t}", "public CanvasPanel() {\n\t \t\taddMouseListener(this);\n\t \t\taddMouseMotionListener(this);\n\t }", "private static void setupWindow() {\n window.setSize((2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n window.add(canvas);\n window.setVisible(true);\n window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n canvas.createBufferStrategy(2);\n }", "public void show() {\n\t\tJFrame frame = new JFrame(\"Canvas\");\r\n\r\n\t\tContainer content = frame.getContentPane();\r\n\t\t// set layout on content pane\r\n\t\tcontent.setLayout(new BorderLayout());\r\n\t\t// create draw area\r\n\t\tcanvas = new Canvas(dos, dis);\r\n\t\t\r\n\t\t\r\n\t\t// add to content pane\r\n\t\tcontent.add(canvas, BorderLayout.CENTER);\r\n\t\tJPanel controls = new JPanel();\r\n\t\tframe.addComponentListener(new ComponentListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent arg0) {\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 arg0) {\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 arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t/*\tSystem.out.println(\"Frame size : \" + frame.getSize());\r\n\t\t\t\tSystem.out.println(\"Canvas size : \" + canvas.getSize());\r\n\t\t\t\tSystem.out.println(\"Control panel size : \" + controls.getSize());\r\n\t\t\t\tcanvas.validate();*/\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentShown(ComponentEvent arg0) {\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\t\t\r\n\t\t// create controls to apply colors and call clear feature\r\n\t\t/*JPanel controls = new JPanel();*/\r\n\r\n\t\tclearBtn.addActionListener(actionListener);\r\n\t\tblackBtn.addActionListener(actionListener);\r\n\t\tblueBtn.addActionListener(actionListener);\r\n\t\tgreenBtn.addActionListener(actionListener);\r\n\t\tredBtn.addActionListener(actionListener);\r\n\t\tmagentaBtn.addActionListener(actionListener);\r\n\t\tyellowBtn.addActionListener(actionListener);\r\n\r\n\t\t// add to panel\r\n\t\tcontrols.add(greenBtn);\r\n\t\tcontrols.add(blueBtn);\r\n\t\tcontrols.add(blackBtn);\r\n\t\tcontrols.add(redBtn);\r\n\t\tcontrols.add(magentaBtn);\r\n\t\tcontrols.add(yellowBtn);\r\n\t\tcontrols.add(clearBtn);\r\n\r\n\t\t// add to content pane\r\n\t\tcontent.add(controls, BorderLayout.NORTH);\r\n\r\n\t\tframe.setSize(600, 600);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t// show the swing paint result\r\n\t\tframe.setVisible(true);\r\n\t}", "private VecCanvas(){\n MouseAdapter mouse = new CanvasMouse();\n this.addMouseListener(mouse);\n this.addMouseMotionListener(mouse);\n setupKeyBindings();\n }", "@Override\n protected void onDraw(Canvas canvas) {\n // Draw the components\n Arrange();\n box.draw(canvas);\n for (Node node : nodes) {\n node.draw(canvas);\n }\n line.draw(canvas);\n invalidate(); // Force a re-draw\n }", "DrawingCanvas() {\n super();\n\n // ArrayList to hold all shape objects\n shapes = new ArrayList<>();\n\n // ArrayList to hold all point objects\n points = new ArrayList<>();\n\n // Initialize colour arrays\n lineColours = new ArrayList<>();\n fillColours = new ArrayList<>();\n\n lineColours.add(Color.black);\n fillColours.add(null);\n\n clickStatus = true;\n activeTool = 1;\n this.addMouseListener(this);\n this.addMouseMotionListener(new MouseMotionAdapter() {\n public void mouseDragged(MouseEvent e) {\n endDrag = new Point(e.getX(), e.getY());\n repaint();\n }\n });\n\n // Initialize the WriteVec object, so it can be written to\n writeFile = new WriteVec();\n\n // Initialize the ShapeCreator object\n newShape = new ShapeCreator();\n\n // Set colours\n currentFillColour = null;\n currentPenColour = Color.BLACK;\n }", "public Canvas(MainWindow main){\n super();\n this.setBounds(0, 0, Const.WINDOW_SIZE, Const.WINDOW_SIZE); //Seta o tamanho do canvas\n this.init(); //Chama as threads\n }", "public void draw() {\n\n // Make sure our drawing surface is valid or we crash\n if (ourHolder.getSurface().isValid()) {\n // Lock the canvas ready to draw\n canvas = ourHolder.lockCanvas();\n // Draw the background color\n paint.setTypeface(tf);\n canvas.drawColor(Color.rgb(178,223,219));\n paint.setColor(Color.rgb(255,255,255));\n canvas.drawRect(offsetX, offsetY, width-offsetX, (height-100)-offsetY, paint);\n // Choose the brush color for drawing\n paint.setColor(Color.argb(50,0,0,0));\n paint.setFlags(Paint.ANTI_ALIAS_FLAG);\n // Make the text a bit bigger\n paint.setTextSize(40);\n paint.setStrokeWidth(5);\n paint.setStrokeCap(Paint.Cap.ROUND);\n // Display the current fps on the screen\n canvas.drawText(\"FPS:\" + fps, 20, 40, paint);\n paint.setTextSize(400);\n if(hasTouched == true) {\n if (count < 0) {\n canvas.drawText(0 + \"\", (width / 2) - 100, height / 2, paint);\n } else if(count<=numLines) {\n canvas.drawText(count + \"\", (width / 2) - 100, height / 2, paint);\n }\n } else {\n paint.setTextSize(100);\n canvas.drawText(\"TAP TO START\", (width / 2) - 300, height / 2, paint);\n }\n paint.setColor(Color.rgb(0,150,136));\n\n paint.setColor(color);\n\n canvas.drawCircle(xPosition, yPosition, radius, paint);\n\n paint.setColor(lineColor);\n\n if(isMoving==true && hasHit == false && count>=0) {\n canvas.drawLine(initialX, initialY, endX, endY, paint);\n }\n paint.setColor(Color.rgb(103,58,183));\n\n for(int i=0; i<verts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, verts[0].length, verts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n for (int i=0; i<innerVerts.length; i++) {\n canvas.drawVertices(Canvas.VertexMode.TRIANGLES, innerVerts[0].length, innerVerts[i], 0, null, 0, verticesColors, 0, null, 0, 0, new Paint());\n }\n // Draw everything to the screen\n ourHolder.unlockCanvasAndPost(canvas);\n\n //Display size and width\n\n }\n\n }", "@Override\n public void draw(Canvas canvas) {\n super.draw(canvas);\n\n manager.draw(canvas);\n }", "void clearCanvasAndDraw()\n {\n \tlauncher.clearRect(0, 0, launcherCanvas.getWidth(), launcherCanvas.getHeight());\n \tdrawLauncher(angle);\n \tcanvas.clearRect(0, 0, mainCanvas.getWidth(), mainCanvas.getHeight());\n \tdrawSky();\n \tdrawGrass();\n }", "private void draw() {\n\t\tCanvas c = null;\n\t\ttry {\n\t\t\t// NOTE: in the LunarLander they don't have any synchronization here,\n\t\t\t// so I guess this is OK. It will return null if the holder is not ready\n\t\t\tc = mHolder.lockCanvas();\n\t\t\t\n\t\t\t// TODO this needs to synchronize on something\n\t\t\tif (c != null) {\n\t\t\t\tdoDraw(c);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (c != null) {\n\t\t\t\tmHolder.unlockCanvasAndPost(c);\n\t\t\t}\n\t\t}\n\t}", "public void draw() {\n GraphicsContext gc = getGraphicsContext2D();\n /*gc.clearRect(0, 0, getWidth(), getHeight());\n\n if (squareMap != null) {\n squareMap.draw(gc);\n }\n if (hexMap != null) {\n hexMap.draw(gc);\n }*/\n\n // Draw animations\n for (SpriteAnimationInstance anim : animationList) {\n anim.draw(gc);\n }\n\n // Lastly draw the dialogue window, no matter which canvas\n // we are on, all the same.\n DfSim.dialogueWindow.draw(gc);\n\n /*if (landMap != null) {\n landMap.draw(gc);\n }*/\n\n // Draw a border around the canvas\n //drawBorder(gc);\n\n // And now just draw everything directly from the simulator\n /*for (Raindrop item : sim.getDrops()) {\n drawMovableCircle(gc, item);\n }\n for (Earthpatch item : sim.getPatches()) {\n drawMovableCircle(gc, item);\n }\n for (SysShape item : sim.getShapes()) {\n drawSysShape(gc, item);\n }\n for (Spike item : sim.getSpikes()) {\n drawMovablePolygon(gc, item);\n }\n for (GravityWell item : sim.getGravityWells()) {\n drawGravityWell(gc, item);\n }*/\n }", "private void drawImages() {\n\t\t\r\n\t}", "public void draw(Canvas canvas) {\n // Draw the game\n for (int i = 0; i < width + 2; i++) {\n for (int j = 0; j < height + 2; j++) {\n canvas.setPoint(i, j, '.');\n }\n }\n\n for (int i = 0; i < width + 2; i++) {\n canvas.setPoint(i, 0, '-');\n canvas.setPoint(i, height + 1, '-');\n }\n\n for (int i = 0; i < height + 2; i++) {\n canvas.setPoint(0, i, '|');\n canvas.setPoint(width + 1, i, '|');\n }\n\n for (BaseObject object : getAllItems()) {\n object.draw(canvas);\n }\n }", "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 void drawCanvas() {\n \n // Change the background color to match the state of the plotter\n if( plotter != null ) {\n int state = plotter.getState();\n switch(state) {\n case 0:\n background(33, 134, 248, 100);\n break;\n case 1:\n background(254, 26, 26, 100);\n break;\n case 2:\n background(28, 247, 12, 100);\n break;\n default:\n background(100);\n }\n } else {\n background(100);\n }\n\n // Draw the canvas rectangle\n translate(SCREEN_PADDING, SCREEN_PADDING);\n scale(screenScale * plotterScale);\n fill(255); \n rect(0, 0, MAX_PLOTTER_X, MAX_PLOTTER_Y);\n \n // Draw the grid\n if(DRAW_GRID) {\n stroke(210);\n int cols = MAX_PLOTTER_X / 100;\n int rows = MAX_PLOTTER_Y / 100;\n \n for(int i=0; i<cols; i++)\n line(i*100, 0, i*100, MAX_PLOTTER_Y);\n \n for(int i=0; i<rows; i++)\n line(0, i*100, MAX_PLOTTER_X, i*100);\n }\n \n // Draw the homing crosshairs\n strokeWeight(1);\n stroke(150);\n line(MAX_PLOTTER_X/2, 0, MAX_PLOTTER_X/2, MAX_PLOTTER_Y);\n line(0, MAX_PLOTTER_Y/2, MAX_PLOTTER_X, MAX_PLOTTER_Y/2);\n\n translate(dx, dy); \n \n // Draw the bounding box of the current shape\n if(DRAW_BOUNDING_BOX) {\n // Bounding box\n RPoint bounds[] = shape.getBoundsPoints();\n strokeWeight(5);\n stroke(255,0,0);\n line( bounds[0].x, bounds[0].y, bounds[1].x, bounds[1].y );\n line( bounds[1].x, bounds[1].y, bounds[2].x, bounds[2].y );\n line( bounds[2].x, bounds[2].y, bounds[3].x, bounds[3].y );\n line( bounds[3].x, bounds[3].y, bounds[0].x, bounds[0].y );\n \n // Center cross hairs\n RPoint center = shape.getCenter();\n line( center.x, bounds[0].y, center.x, bounds[0].y - 200 );\n line( center.x, bounds[3].y, center.x, bounds[3].y + 200 );\n line( bounds[0].x, center.y, bounds[0].x - 200, center.y );\n line( bounds[1].x, center.y, bounds[1].x + 200, center.y );\n }\n \n // Draw the SVG content\n strokeWeight(STROKE_WEIGHT);\n stroke(0);\n drawShape(shape);\n }", "@Override\n\tprotected synchronized void onDraw(Canvas canvas){\n//\t\tdata.add(49);\n//\t\tdata.add(40);\n//\t\tdata.add(36);\n//\t\tdata.add(20);\n//\t\tdata.add(10);\n//\t\tdata.add(50);\n//\t\tdata.add(40);\n//\t\tdata.add(38);\n//\t\tdata.add(20);\n//\t\tdata.add(10);\n\n\t\tmAnalysts.pre();\n\t\twidth = this.getWidth();\n\t\theight = this.getHeight();\n\t\tline0_x1 = (float)width*0.1f;\n\t\tline0_x2 = (float)width;\n\t\tline0_y = (float)height*0.9f;\n\t\tline50_x1 = line0_x1;\n\t\tline50_x2 = line0_x2;\n\t\tline50_y = (float)height*0.1f;\n\t\tline37_x1 = line0_x1;\n\t\tline37_x2 = line0_x2;\n\t\tline37_y = (float)height*0.8f*(50-37)/50.0f+line50_y;\n\t\tif(layoutLand){//show all item\n\t\t\tint num = data.size();\n\t\t\tif(0==num){\n\t\t\t\tpadding = 0;\n\t\t\t\tsub_width = 0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(num<10)\n\t\t\t\t\tnum = 10;\n\t\t\t\tpadding = (float)width*0.9f*0.1f/(num+1);\n\t\t\t\tsub_width = (float)width*0.9f*0.9f/num;\n\t\t\t}\n\t\t}\n\t\telse{//only show 10 item\n\t\t\tpadding = (float)width*0.9f*0.1f/11;\n\t\t\tsub_width = (float)width*0.9f*0.9f/10;\n\t\t}\n\t\tdrawBackground(canvas, width, height);\n\t\tdrawValues(canvas);\n\t\tmAnalysts.post();\n\t}", "public void draw() {\n \n // TODO\n }", "@Override\n\t\tpublic void draw(Canvas canvas) {\n\t\t\tcombineButton.draw(canvas);\n\t\t\tclose.draw(canvas);\n\t\t\t//canvas.drawColor(Color.WHITE);\n\t\t\t//scroll.draw(canvas);\n\t\t\t//canvas.drawBitmap(panel, new Rect(0,0,panel.getWidth(), panel.getHeight()), new RectF(20,90,70,140), null);\n\t\t\t/*if(show)\n\t\t\t\tbuy.draw(canvas);\n\t\t\telse{\n\t\t\t\ttext.setText(sbInfo.toString());\n\t\t\t}\n\t\t\ttext.draw(canvas);\n\t\t\tInteger it = player.getMoney();\n\t\t\ttextMoney.setText(\"Money : \" + it.toString());\n\t\t\ttextMoney.draw(canvas);*/\n\t\t}", "private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }", "public Paint(){\n triangles = new ArrayList<>();\n rectangles = new ArrayList<>();\n circles = new ArrayList<>();\n }", "public void draw() {\r\n try{\r\n while(vidas!=0) {\r\n Canvas canvas = ourHolder.lockCanvas();\r\n canvas.drawBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.space), 0, 0, null);\r\n canvas.drawBitmap(airplane, xPos, yPos, null);\r\n canvas.drawBitmap(mars, 490, 0, null);\r\n canvas.drawBitmap(lune, 430, 380, null);\r\n\r\n for (int i = 1; i < vidas; i++) {\r\n int x = 475;\r\n int y = 285;\r\n canvas.drawBitmap(heart, x, y, null);\r\n\r\n }\r\n\r\n //RECTANGULOS PARA COLISION//\r\n\r\n RectF drawRect = new RectF();\r\n RectF drawRect2 = new RectF();\r\n RectF drawRect3 = new RectF();\r\n\r\n\r\n drawRect.set(425, 50, 585, 215);\r\n drawRect3.set(425, 400, 585, 575);\r\n drawRect2.set(xPos, yPos, xPos + 100, yPos + 100);\r\n ourHolder.unlockCanvasAndPost(canvas); //BLOQUEA EL CANVAS NO SE PUEDE DIBUJAR NADA MAS DEBEMOS UTILIZARLO AL FINAL\r\n\r\n\r\n rect1 = new Rect(450, 50, 575, 200);\r\n rect2 = new Rect(Math.round(xPos), Math.round(yPos), Math.round(xPos + 100), Math.round(yPos + 100));\r\n rect3 = new Rect(450, 400, 585,560);\r\n\r\n //COLISION\r\n\r\n if(opcion==1){\r\n ourView.Colision(rect1, rect2, rect3);\r\n }\r\n else{\r\n ourView.Colision2(rect1,rect2,rect3);\r\n }\r\n\r\n\r\n }}\r\n catch (Exception e) {\r\n\r\n }\r\n }", "private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }", "@SuppressLint(\"MissingSuperCall\")\n @Override\n public void draw(Canvas canvas) {\n final float scaleX = getWidth() / (WIDTH * 1.f); //set scale factor of bg image and screen area\n final float scaleY = getHeight() / (HEIGHT * 1.f);\n if (canvas != null) {\n final int savedState = canvas.save();\n canvas.scale(scaleX, scaleY); //scale bg\n //draw order means that demons walk over gargants, demon shots go over all ground troops and under dragon.\n //also means dragons fly over all enemies cus, ya know, they fly\n bg.draw(canvas); //draw bg\n player.draw(canvas); //draw player\n for (LightningBall b : bullets) {\n b.draw(canvas); //draw each player bullet\n }\n for (Gargant g : gargants) {\n g.draw(canvas); //draw each gargant\n }\n for (Demon de : demons) {\n de.draw(canvas); //draw each demon\n }\n for (HellFire ds : demonShots) {\n ds.draw(canvas); //draw each demon shot\n }\n for (Dragon d : dragons) {\n d.draw(canvas); //draw each dragon\n }\n\n drawText(canvas); //draw the text on screen\n canvas.restoreToCount(savedState);\n }\n }", "public void addNotify() {\r\n\t\tsuper.addNotify(); // load canvas functions\r\n\r\n\t\t// double buffer\r\n\t\tthis.createBufferStrategy(2);\r\n\t\tbuffer = this.getBufferStrategy();\r\n\r\n\t\t// event listeners\r\n\t\tthis.addMouseListener(this);\r\n\t\tthis.addMouseMotionListener(this);\r\n\t\tthis.addKeyListener(player);\r\n\r\n\t\t// load game\r\n\t\tthis.requestFocus();\r\n\t\tstartGame();\r\n\t}", "private EnlargeCanvas() {\n }", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n if (gameOver) {\n // end game - loss\n gameOverDialog();\n } else if (gameWon) {\n // end game - win\n gameWonDialog();\n }\n\n //Convert dp to pixels by multiplying times density.\n canvas.scale(density, density);\n\n // draw horizon\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n canvas.drawRect(0, horizon, getWidth() / density, getHeight() / density, paint);\n\n // draw cities\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.FILL);\n textPaint.setColor(Color.WHITE);\n textPaint.setTextSize(10);\n\n for (int i = 0; i < cityCount; ++i) {\n canvas.drawRect(cityLocations[i].x - citySize, cityLocations[i].y - citySize, cityLocations[i].x + citySize, cityLocations[i].y + citySize, paint);\n canvas.drawText(cityNames[i], cityLocations[i].x - (citySize / 2) - 5, cityLocations[i].y - (citySize / 2) + 10, textPaint);\n }\n\n // draw rocks\n for (RockView rock : rockList) {\n PointF center = rock.getCenter();\n String color = rock.getColor();\n\n paint.setColor(Color.parseColor(color));\n\n paint.setStyle(Paint.Style.FILL);\n //Log.d(\"center.x\", center.x + \"\");\n //Log.d(\"center.y\", center.y + \"\");\n canvas.drawCircle(center.x, center.y, rockRadius, paint);\n }\n\n // draw MagnaBeam circle\n if (touchActive) {\n canvas.drawCircle(touchPoint.x, touchPoint.y, touchWidth, touchPaint);\n }\n }", "private void builder(){\r\n //Objects\r\n //Left\r\n canvasStackPane.setAlignment(Pos.TOP_LEFT);\r\n left1HintButton = new Button(\"Hint\");\r\n left2Button = new Button(\"New Graph\");\r\n left3Button = new Button(\"New GameMode\");\r\n left4Button = new Button(\"New GraphMode\");\r\n left5Button = new Button(\"Finished\");\r\n leftRestLabel = new Label();\r\n //Up\r\n upperLeftButton = new Label(\"Menu\");\r\n upperLeftButton.setAlignment(Pos.CENTER);\r\n upper1Label = new Label();\r\n upper2Label = new Label();\r\n upper3Label = new Label();\r\n upperRestLabel = new Label();\r\n //calculateVectors\r\n backPane.setPickOnBounds(false);\r\n textFieldVertices.setPromptText(\"Vertices\");\r\n textFieldEdges.setPromptText(\"Edges\");\r\n gameEnd.setSpacing(30);\r\n gameEnd.setAlignment(Pos.CENTER);\r\n gameWinStackPane.setAlignment(Pos.CENTER);\r\n hBoxWin.setAlignment(Pos.CENTER);\r\n hBoxWin.setSpacing(30);\r\n canvasStackPane.setPickOnBounds(true);\r\n canvas.setPickOnBounds(true);\r\n canvas.getGraphicsContext2D().setLineWidth(2.5);\r\n }", "private void drawOnTheCanvas(DrawingCanvas.ExposedDrawingCanvas canvas)\n {\n final int nInputE = Math.round((float)inputE); // Is there a better way?\n final int nInputF = Math.round((float)inputF);\n // TODO: Place your loop code in here.\n \n drawHorizontalLine(canvas, 20, 50, 75);\n \n // Example of how to fill in a pixel:\n canvas.drawPoint(10, 15);\n }", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n int width = getWidth();\n int height = getHeight();\n float pieceWidth = width/5.0f-5;\n float pieceHeight = height/3.0f-20;\n Log.d(\"hello\", \"DRAWINGGGGGGG\");\n\n //this.paint.setColor(Color.WHITE);\n this.paint.setStyle(Paint.Style.FILL);\n //canvas.drawPaint(this.paint);\n canvas.drawColor(0x00000000);\n\n this.paint.setColor(Color.WHITE);\n //canvas.drawRect(0, 0, 100, 100, this.paint);\n\n\n for(int i = 0; i < 5; i++)\n for(int j = 0; j<3; j++){\n Cell cell = grid.getCellAt(i, j);\n if(cell!=null){\n //Before you can call any drawing methods, though, it's necessary to create a Paint object.\n\n this.paint.setColor(cell.getColor());\n canvas.drawRect(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n this.paint.setColor(Color.WHITE);\n this.paint.setStrokeWidth(4);\n //Lines on window\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth + pieceWidth, j*pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n canvas.drawLine(i*pieceWidth, j*pieceHeight + pieceHeight, i*pieceWidth + pieceWidth, j*pieceHeight + pieceHeight, this.paint);\n\n }\n }\n\n\n\n }", "public void draw(){\n if(isVisible) {\n double diameter = calcularLado(area);\n double side = 2*diameter;\n Canvas circle = Canvas.canvas;\n circle.draw(this, color, \n new Ellipse2D.Double(xPosition, yPosition, \n (int)diameter, side));\n }\n }", "public void draw(Canvas canvas) {\n for (Line line: lines) {\n line.draw(canvas);\n }\n }", "@Override\n\tpublic void doDraw(Canvas canvas) {\n\t\tcanvas.save();\n\t\tcanvas.translate(0,mScreenSize[1]/2.0F - mScreenSize[1]/6.0F);\n\t\tcanvas.scale(1.0F/3.0F, 1.0F/3.0F);\n\t\tfor(int i = 0; i < Math.min(mPatternSets.size(), 3); i++) {\n\t\t\tPatternSet.Pattern pattern = mPatternSets.get(i).get(0);\n\t\t\tcanvas.save();\n\t\t\tfor(int y = 0; y < pattern.height(); y++) {\n\t\t\t\tcanvas.save();\n\t\t\t\tfor(int x = 0; x < pattern.width(); x++) {\n\t\t\t\t\tif(pattern.get(x,y) > 0) {\n\t\t\t\t\t\t//Log.d(TAG, \"Ping!\");\n\t\t\t\t\t\tmBlockPaint.setColor(mBlockColors[pattern.get(x,y)]);\n\t\t\t\t\t\tcanvas.drawRect(1, 1, mBlockSize[0]-1, mBlockSize[1]-1, mBlockPaint);\n\t\t\t\t\t}\n\t\t\t\t\tcanvas.translate(mBlockSize[0], 0);\n\t\t\t\t}\n\t\t\t\tcanvas.restore();\n\t\t\t\tcanvas.translate(0, mBlockSize[1]);\n\t\t\t}\n\t\t\tcanvas.restore();\n\t\t\tcanvas.translate(mScreenSize[0], 0);\n\t\t}\n\t\tcanvas.restore();\n\t}", "public Canvas(){\r\n\t\tsuper(new FlowLayout());\r\n\t\tthis.setPreferredSize(new Dimension(400, 400));\r\n\t\tthis.setBackground(Color.WHITE);\r\n\t}", "public void drawGraphic(Canvas canvas) {\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n bitmap.setPixels(getPixels(), 0, getWidth(), 0, 0, getWidth(), getHeight());\n canvas.drawBitmap(bitmap,\n new Rect(0, 0, getWidth(), getHeight()),\n new Rect(getXOffset(), getYOffset(), getXOffset() + getWidth(), getYOffset() + getHeight()),\n null);\n bitmap.recycle();\n }", "private void reloadCanvas() {\n reloadCanvas(1f);\n }", "public void Draw() {\n \tapp.fill(this.r,this.g,this.b);\n\t\tapp.ellipse(posX, posY, 80, 80);\n\n\t}", "public void draw() {\n draw(root, true);\n }", "private void addComponentsToLayers() {\n JLayeredPane layer = getLayeredPane();\n layer.add(canvas, new Integer(1));\n layer.add(searchArea, new Integer(2));\n layer.add(searchButton, new Integer(2));\n layer.add(zoomInButton, new Integer(2));\n layer.add(zoomOutButton, new Integer(2));\n layer.add(fullscreenButton, new Integer(2));\n layer.add(showRoutePanelButton, new Integer(2));\n layer.add(routePanel, new Integer(2));\n layer.add(optionsButton, new Integer(2));\n layer.add(mapTypeButton, new Integer(2));\n layer.add(mapTypePanel, new Integer(2));\n layer.add(resultPane, new Integer(3));\n layer.add(resultStartPane, new Integer(3));\n layer.add(resultEndPane, new Integer(3));\n layer.add(iconPanel, new Integer(3));\n layer.add(optionsPanel, new Integer(2));\n layer.add(directionPane, new Integer(2));\n layer.add(closeDirectionList, new Integer(2));\n layer.add(travelTimePanel, new Integer(3));\n\n }", "private void drawMe(Canvas canvas) {\n\n float halfNegative = mFullBlockSize*(1 - mDividerScale)/2;\n float borderLength = getWidth() - 2*halfNegative;\n float borderMargin = halfNegative + (1 - mBorderScale)*borderLength/2;\n\n// if(mDividerScale == 1 && mBorderScale == 1) {\n// canvas.drawPath(mBorderPath, mBorderPaint);\n// canvas.drawPath(mDividersPath, mDividerPaint);\n// } else {\n\n //left border\n canvas.drawLine(0, borderMargin, 0, mHeight - borderMargin, mBorderPaint);\n\n //right border\n canvas.drawLine(mWidth, borderMargin, mWidth, mHeight - borderMargin, mBorderPaint);\n\n //top border\n canvas.drawLine(borderMargin, 0, mWidth - borderMargin, 0, mBorderPaint);\n\n //bottom border\n canvas.drawLine(borderMargin, mHeight, mWidth - borderMargin, mHeight, mBorderPaint);\n\n\n for(int i = 0; i < mFieldSize; i++) {\n for(int j = 0; j < mFieldSize; j++) {\n if(i != 0)\n canvas.drawLine(mFullBlockSize*i, mFullBlockSize*j + halfNegative, mFullBlockSize*i, mFullBlockSize*(j + 1) - halfNegative, mDividerPaint);\n if(j != 0)\n canvas.drawLine(mFullBlockSize*i + halfNegative, mFullBlockSize*j, mFullBlockSize*(i + 1) - halfNegative, mFullBlockSize*j, mDividerPaint);\n }\n }\n// }\n\n\n float radius = (mFullBlockSize - halfNegative*2)*mTileRadiusRatio;\n for(int i = 0; i < mTiles.size(); i++) {\n Tile tile = mTiles.get(i);\n\n canvas.save();\n canvas.translate(tile.x + halfNegative, tile.y + halfNegative);\n\n if(tile.scale != 1) {\n canvas.scale(tile.scale, tile.scale, realTileSize()/2, realTileSize()/2);\n }\n\n mTilePaint.setColor(mColorMap.get(tile.number));\n mTextPaint.setColor(mColorMap.get(tile.number));\n\n canvas.save();\n if(tile.borderRotation + tile.rotation != 0 && tile.borderRotation + tile.rotation != 360) {\n canvas.rotate(tile.borderRotation + tile.rotation, realTileSize()/2, realTileSize()/2);\n }\n\n// canvas.drawPath(mBaseTilePath, mTilePaint);\n canvas.drawRoundRect(0, 0, realTileSize(), realTileSize(),\n radius, radius, mTilePaint);\n\n canvas.restore();\n\n if(tile.rotation != 0 && tile.rotation != 360) {\n canvas.rotate(tile.rotation, realTileSize()/2, realTileSize()/2);\n }\n\n String text = String.valueOf(tile.number);\n\n TextConfig config = mTextConfigs[text.length() - 1];\n\n config.paint.setColor(mColorMap.get(tile.number));\n\n float textWidth = config.paint.measureText(text);\n\n\n canvas.translate(0, config.yOffset);\n//\n canvas.drawText(text, ((float) mFullBlockSize - 2*halfNegative)/2f - textWidth/2 - 1, 0, config.paint);\n\n canvas.restore();\n\n }\n\n\n // canvas.restore();\n\n\n }", "public void drawAllGraphics(){\r\n\t\t \r\n\t}", "private void setUp()\n {\n path = new Path();\n drawPaint = new Paint();\n brushSize = getResources().getInteger(R.integer.medium_size);\n lastBrushSize = brushSize;\n //initialize paint color\n drawPaint.setColor(paintColor);\n drawPaint.setAntiAlias(true);\n drawPaint.setStrokeWidth(brushSize);\n drawPaint.setStyle(Paint.Style.STROKE);\n drawPaint.setStrokeJoin(Paint.Join.ROUND);\n drawPaint.setStrokeCap(Paint.Cap.ROUND);\n //initialize canvas background\n canvasPaint = new Paint(Paint.DITHER_FLAG);\n }", "public void draw()\n {\n canvas.setForegroundColor(color);\n canvas.fillCircle(xPosition, yPosition, diameter);\n }", "private void draw() {\n Graphics2D g2 = (Graphics2D) image.getGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);\n\n AffineTransform transform = AffineTransform.getTranslateInstance(0, height);\n transform.concatenate(AffineTransform.getScaleInstance(1, -1));\n g2.setTransform(transform);\n\n int width = this.width;\n int height = this.height;\n if (scale != 1) {\n g2.scale(scale, scale);\n width = (int) Math.round(width / scale);\n height = (int) Math.round(height / scale);\n }\n AbstractGraphics g = new GraphicsSWT(g2);\n\n g.setScale(scale);\n if (background != null) {\n g.drawImage(background, 0, 0, width, height);\n }\n\n synchronized (WFEventsLoader.GLOBAL_LOCK) {\n for (Widget widget : widgets) {\n if (widget != null) widget.paint(g, width, height);\n }\n }\n // draw semi-transparent pixel in top left corner to workaround famous OpenGL feature\n g.drawRect(0, 0, 1, 1, Color.WHITE, .5, PlateStyle.RectangleType.SOLID);\n\n g2.dispose();\n }", "private void drawView(Canvas canvas){\n //long start = System.currentTimeMillis();\n\n getCursor().updateCache(getFirstVisibleLine());\n\n ColorScheme color = mColors;\n drawColor(canvas, color.getColor(ColorScheme.WHOLE_BACKGROUND), mViewRect);\n\n float lineNumberWidth = measureLineNumber();\n float offsetX = - getOffsetX();\n\n drawLineNumberBackground(canvas, offsetX, lineNumberWidth + mDividerMargin, color.getColor(ColorScheme.LINE_NUMBER_BACKGROUND));\n\n drawCurrentLineBackground(canvas, color.getColor(ColorScheme.CURRENT_LINE));\n drawCurrentCodeBlockLabelBg(canvas);\n\n drawDivider(canvas, offsetX + lineNumberWidth + mDividerMargin, color.getColor(ColorScheme.LINE_DIVIDER));\n\n drawLineNumbers(canvas, offsetX, lineNumberWidth, color.getColor(ColorScheme.LINE_NUMBER));\n offsetX += lineNumberWidth + mDividerMargin * 2 + mDividerWidth;\n\n if(mCursor.isSelected()){\n drawSelectedTextBackground(canvas,offsetX, color.getColor(ColorScheme.SELECTED_TEXT_BACKGROUND));\n }\n\n drawText(canvas, offsetX, color.getColor(ColorScheme.TEXT_NORMAL));\n drawComposingTextUnderline(canvas,offsetX, color.getColor(ColorScheme.UNDERLINE));\n\n if(!mCursor.isSelected()){\n drawSelectionInsert(canvas, offsetX, color.getColor(ColorScheme.SELECTION_INSERT));\n if(mEventHandler.shouldDrawInsertHandle()) {\n drawHandle(canvas,mCursor.getLeftLine(),mCursor.getLeftColumn(),mInsertHandle);\n }\n }else if(!mTextActionPanel.isShowing()){\n drawHandle(canvas,mCursor.getLeftLine(),mCursor.getLeftColumn(),mLeftHandle);\n drawHandle(canvas,mCursor.getRightLine(),mCursor.getRightColumn(),mRightHandle);\n }else{\n mLeftHandle.setEmpty();\n mRightHandle.setEmpty();\n }\n\n drawBlockLines(canvas,offsetX);\n drawScrollBars(canvas);\n\n //These are for debug\n //long end = System.currentTimeMillis();\n //canvas.drawText(\"Draw:\" + (end - start) + \"ms\" + \"Last highlight:\" + m + \"ms\", 0, getLineBaseLine(11), mPaint);\n }", "public void init() {\n\t\t//initializing graphics area\n \tcanvas = new FacePamphletCanvas();\n \tadd(canvas);\n \t\n\t\taddInteractors();\n\t\taddActionListeners();\n }", "@Override\n protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n hip.preDraw(purplePaint);\n body.preDraw(redPaint);\n neck.preDraw(purplePaint);\n head.preDraw(bluePaint);\n leftArm1.preDraw(bluePaint);\n leftArm2.preDraw(greenPaint);\n leftArm3.preDraw(cyanPaint);\n rightArm1.preDraw(bluePaint);\n rightArm2.preDraw(greenPaint);\n rightArm3.preDraw(cyanPaint);\n leftLeg1.preDraw(bluePaint);\n leftLeg2.preDraw(greenPaint);\n leftLeg3.preDraw(redPaint);\n rightLeg1.preDraw(bluePaint);\n rightLeg2.preDraw(greenPaint);\n rightLeg3.preDraw(redPaint);\n\n Cube[] renderCubes = {\n hip,\n body,\n neck,\n head,\n leftArm1, leftArm2, leftArm3,\n rightArm1, rightArm2, rightArm3,\n leftLeg1, leftLeg2, leftLeg3,\n rightLeg1, rightLeg2, rightLeg3,\n };\n sort(renderCubes, new Comparator<Cube>() {\n @Override\n public int compare(Cube o1, Cube o2) {\n return new Double(o2.getMaxZ()).compareTo(o1.getMaxZ());\n }\n });\n for (Cube c: renderCubes) {\n c.draw(canvas);\n }\n }", "public ImageCanvas() {\r\n super();\r\n }", "public void compose() {\n\t\tg2d.setBackground(bgColor);\n\t\tg2d.clearRect(0, 0, width, height);\n\t\tboolean drawed=g2d.drawImage(gridImg, gridImgX, gridImgY, null);\n\t\tdrawed=g2d.drawImage(colorCodeImg, colorCodeImgX, colorCodeImgY, null);\n\t\tdrawed=g2d.drawImage(celestialObjectTextImg, celestialObjectTextImgX, celestialObjectTextImgY, null);\n\t\tdrawed=g2d.drawImage(observationTextImg, observationTextImgX, observationTextImgY, null);\n\t\tdrawed=g2d.drawImage(maserImg, maserImgX, maserImgY, null);\n\t}", "public void drawGrid(){\r\n gc.setLineWidth(0.5f);//this is how thick the 'pen' will be, 1 pixel for now\r\n gc.setStroke(divisionsColour);\r\n //this for loop will start at (canvas.widthProperty().intValue()/2)%pixelsPerDivision\r\n //this means that one line will pass through the center of the screen, for 0 which we need\r\n //canvas width and height properties are the width and height of the display of the waves only\r\n //then we draw a line every pixelsPerDivision pixels, this is so one division is pixelsPerDivision pixels.\r\n //the one directly below is for the time domain\r\n for (int x = (canvas.widthProperty().intValue() / 2) % pixelsPerDivision; x < canvas.widthProperty().intValue(); x += pixelsPerDivision) {\r\n //we begin to draw a line\r\n gc.beginPath();\r\n //starting at the top of the page\r\n gc.moveTo(x, 0);\r\n //going to the bottom\r\n gc.lineTo(x, canvas.heightProperty().intValue());\r\n //then finish this line\r\n gc.stroke();\r\n }\r\n\r\n\r\n //the one directly below is for the voltage domain\r\n //this one it is much more important that a line goes through the center as this is where the 0 mark for the waves is\r\n for (int y = (canvas.heightProperty().intValue() / 2) % pixelsPerDivision; y < canvas.heightProperty().intValue(); y += pixelsPerDivision) {\r\n gc.beginPath();\r\n gc.moveTo(0, y);\r\n gc.lineTo(canvas.widthProperty().intValue(), y);\r\n gc.stroke();\r\n }\r\n gc.setStroke(voltageTextColour);\r\n int numberOfPositiveDivisions = (canvas.heightProperty().intValue() / 2) / pixelsPerDivision;\r\n\r\n\r\n\r\n\r\n for (int i = 0; i < numberOfPositiveDivisions; i+=2) {\r\n gc.strokeText(\"+\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"+\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i));\r\n if (i != 0) {\r\n gc.strokeText(\"-\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"-\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i));\r\n }\r\n }\r\n gc.rotate(-90);\r\n\r\n for (int i=4; i<canvasSizeXY/pixelsPerDivision;i+=4){\r\n gc.strokeText(getScienceNumber(i*secondsPerDivision)+\"ms\", -(canvasSizeXY-10),(pixelsPerDivision * i)+5);\r\n }\r\n gc.rotate(90);\r\n //the following will draw a center line over the 0V axis part, but with a thicker pen so we can see 0 clearer\r\n gc.beginPath();\r\n gc.setLineWidth(3);//makes the line thicker\r\n gc.moveTo(0, canvas.heightProperty().intValue() / 2);\r\n gc.lineTo(canvas.widthProperty().intValue(), canvas.heightProperty().intValue() / 2);\r\n gc.stroke();\r\n\r\n }", "void drawGridLayout() {\n\t\tpiecesGrid = (GridLayout) findViewById(R.id.layout_container); //get a reference to the GridLayout\n\t\tpiecesGrid.setColumnCount(NUM[COLS]); //set number of columns\n\t\tpiecesGrid.setRowCount(NUM[ROWS]); //set number of rows\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\tpiecesGrid.addView(pieceViews.get(i), i); //add the ImageViews\n\t\t}\n\t}", "public void draw()\n {\n Rectangle hatbox = new Rectangle(x, y, 20, 20);\n hatbox.fill();\n Rectangle brim = new Rectangle(x-10, y+20, 40, 0);\n brim.draw();\n Ellipse circle = new Ellipse (x, y+20, 20, 20);\n circle.draw();\n Ellipse circle2 = new Ellipse (x-10, y+40, 40, 40);\n circle2.draw();\n Ellipse circle3 = new Ellipse (x-20, y+80, 60, 60);\n circle3.draw();\n \n }", "public void paint() {\r\n\r\n\t\tsuper.paint();\r\n\t\r\n\t\tint len = _composites.size();\r\n\t\tfor (int i = 0; i < len; i++) {\r\n\t\t\tComposite c = _composites.get(i);\r\n\t\t\tc.paint();\r\n\t\t}\t\t\t\t\t\t\r\n\t}", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\t\n\t\t\n\t}", "protected void doDraw(Canvas canvas) {\n // Primera posición de la pelota en el centro\n if (pos_x < 0 && pos_y < 0) {\n pos_x = this.width / 2;\n pos_y = this.height / 2;\n } else {\n // La nueva posición es la posición anterior + la velocidad en\n // cada coordenada X e Y\n pos_x += xVelocidad;\n pos_y += yVelocidad;\n // Si el usuario ha tocado la pelota cambiamos el sentido de\n // la misma\n if (touched && touched_x > (pos_x - pelota.getBitmap().getWidth())\n && touched_x < (pos_x + pelota.getBitmap().getWidth())\n && touched_y > (pos_y - pelota.getBitmap().getHeight())\n && touched_y < (pos_y + pelota.getBitmap().getHeight())) {\n\n touched = false;\n xVelocidad = xVelocidad * -1;\n yVelocidad = yVelocidad * -1;\n }\n // Si pos_x es mayor que el ancho de la pantalla teniendo en\n // cuenta el ancho de la pelota o la nueva posición es < 0\n // entonces cambiamos el sentido de la pelota\n if ((pos_x > this.width - pelota.getBitmap().getWidth()) ||\n (pos_x < 0)) {\n xVelocidad = xVelocidad * -1;\n }\n // Si pos_y es mayor que el alto de la pantalla teniendo en\n // cuenta el alto de la pelota o la nueva posición es < 0\n // entonces cambiamos el sentido de la pelota\n if ((pos_y > this.height - pelota.getBitmap().getHeight()) ||\n (pos_y < 0)) {\n yVelocidad = yVelocidad * -1;\n }\n }\n // Color gris para el fondo de la aplicación\n canvas.drawColor(Color.LTGRAY);\n // Dibujamos la pelota en la nueva posición\n canvas.drawBitmap(pelota.getBitmap(), pos_x, pos_y, null);\n }", "public void draw() {\n for (Point2D p: mPoints) {\n StdDraw.filledCircle(p.x(), p.y(), 0.002);\n }\n }", "void repaintCanvas() {\n objCanvas.repaint();\n\n objCanvas.setImage(_img);\n ArrayList<ObjLabel> objLabels = objCanvas.getObjLabels();\n\n status(\"Parsed: \" + objLabels.size() + \" objects for \" + getFilename());\n objLabels.forEach((objLabel) -> {\n addObjLabel(objLabel);\n\n });\n }", "private void drawOnTheCanvasAdvanced(Graphics canvas)\n {\n final int nInputE = Math.round((float)inputE);\n final int nInputF = Math.round((float)inputF);\n // This is a more full-featured\n \n // You could try this: \n // canvas.drawArc(10, 10, 110, 110, 45, 90);\n // Or this:\n // canvas.drawArc(10, 10, 110, 110, 45, nInputE);\n\n }", "public abstract void draw(Canvas canvas, int x, int y, int width, int height, Paint paint);", "private void updateCanvas()\r\n\t{\r\n\t\tboardCanvas.repaint();\r\n\t\tdiceCanvas.repaint();\r\n\t}", "public SignalCanvas() {\n\t\tsuper();\n\t}", "private void draw() {\n if (surfaceHolder.getSurface().isValid()) {\n //lock the canvas\n canvas = surfaceHolder.lockCanvas();\n //set background colour\n canvas.drawColor(Color.BLACK);\n //draw stars\n paint.setColor(Color.WHITE);\n starManager.draw(this.canvas, this.paint);\n //draw player\n player.draw(this.canvas, this.paint);\n //draw enemies\n enemyManager.draw(this.canvas, this.paint);\n //draw asteroids\n asteroidManager.draw(this.canvas, this.paint);\n\n //draw the score as well\n paint.setTextSize(100);\n paint.setColor(Color.WHITE);\n canvas.drawText(\"\" + Constants.SCORE, 50, paint.descent() - paint.ascent(), paint);\n\n //if game is over\n if (Constants.GAME_OVER) {\n paint.setTextSize(100);\n paint.setTextAlign(Paint.Align.CENTER);\n paint.setColor(Color.WHITE);\n\n //tell the player\n int yPos = (int) ((canvas.getHeight() / 2) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Game over\", canvas.getWidth() / 2, yPos, paint);\n\n paint.setTextSize(50);\n yPos = (int) ((canvas.getHeight() - 2 * paint.descent()) - ((paint.descent() + paint.ascent()) / 2));\n canvas.drawText(\"Tap anywhere to return to main menu...\", canvas.getWidth() / 2, yPos, paint);\n }\n //unlock canvas\n surfaceHolder.unlockCanvasAndPost(canvas);\n }\n }", "@Override\r\n\tpublic void onDraw(Canvas canvas) {\r\n\t\tsuper.onDraw(canvas);\r\n\t}", "@Override\n public void draw(Canvas canvas){\n\n final float scaleX = getWidth()/(width*1.f);\n final float scaleY = getHeight()/(height*1.f);\n\n if (canvas!=null) {\n final int savedState = canvas.save();\n canvas.scale(scaleX, scaleY);\n background.draw(canvas);\n if(!disappear){\n newPlayer.draw(canvas);\n }\n\n //Top border\n for (TopBorder tp : topborder){\n tp.draw(canvas);\n }\n\n //Draws bottom border\n for (BotBorder bp : botborder){\n bp.draw(canvas);\n }\n\n //Draws effects\n for (Effects sp : effect){\n sp.draw(canvas);\n }\n\n //Draws first enemy\n for (Enemy sp : enemy){\n sp.draw(canvas);\n }\n\n //Draws second enemy\n for (secondaryEnemy se : newEnemy){\n se.draw(canvas);\n }\n\n //Draws third enemy\n for (thirdShip ls : thirdEnemy){\n ls.draw(canvas);\n }\n\n //draws death animation\n if(started){\n death.draw(canvas);\n }\n\n //Draws screen text\n screenText(canvas);\n canvas.restoreToCount(savedState);\n }\n }", "public void draw() {\n draw(root, false);\n }", "@Override\n\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\n\t\t\t\t\t\twhile (isRunning)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (!holder.getSurface().isValid())\n\t\t\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t\t\tPaint paint = new Paint();\n\t\t\t\t\t\t\t\tpaint.setColor(Color.WHITE);\n\t\t\t\t\t\t\t\tpaint.setStrokeWidth(5);\n\t\t\t\t\t\t\t\tPaint pt=new Paint();\n\t\t\t\t\t\t\t\tpt.setStrokeWidth(8);\n\t\t\t\t\t\t\t\tpt.setColor(Color.GREEN);\n\t\t\t\t\t\t\t\tPaint pt2=new Paint();\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\tCanvas canvas = holder.lockCanvas();\n\t\t\t\t\t\t\t\t//Bitmap bbb = BitmapFactory.decodeResource(\n\t\t\t\t\t\t\t\t\t//\tgetResources(), R.drawable.superman);\n\t\t\t\t\t\t\t\t//canvas.drawBitmap(bbb, 0, 0, null);\n\t\t\t\t\t\t\t\tw = canvas.getWidth();\n\t\t\t\t\t\t\t\th = canvas.getHeight();\n\t\t\t\t\t\t\t\ta = w / 4;\n\t\t\t\t\t\t\t\tint x_coordinates[] = { w / 2 - a / 2 - a,\n\t\t\t\t\t\t\t\t\t\tw / 2 - a / 2, w / 2 + a / 2,\n\t\t\t\t\t\t\t\t\t\tw / 2 - a / 2 - a, w / 2 - a / 2,\n\t\t\t\t\t\t\t\t\t\tw / 2 + a / 2, w / 2 - a / 2 - a,\n\t\t\t\t\t\t\t\t\t\tw / 2 - a / 2, w / 2 + a / 2 };\n\t\t\t\t\t\t\t\tint y_coordinates[] = { h / 2 - a / 2 - a,\n\t\t\t\t\t\t\t\t\t\th / 2 - a / 2 - a, h / 2 - a / 2 - a,\n\t\t\t\t\t\t\t\t\t\th / 2 - a / 2, h / 2 - a / 2,\n\t\t\t\t\t\t\t\t\t\th / 2 - a / 2, h / 2 + a / 2,\n\t\t\t\t\t\t\t\t\t\th / 2 + a / 2, h / 2 + a / 2 };\n\t\t\t\t\t\t\t\tint xextreme=w/2+a/2+a;int yextreme=h/2+a/2+a;\n\t\t\t\t\t\t\t\tcanvas.drawLine(w / 2 - a / 2 - a, h / 2 - a\n\t\t\t\t\t\t\t\t\t\t/ 2, w / 2 + a + a / 2, h / 2 - a / 2,\n\t\t\t\t\t\t\t\t\t\tpaint);\n\t\t\t\t\t\t\t\tcanvas.drawLine(w / 2 - a / 2 - a, h / 2 + a\n\t\t\t\t\t\t\t\t\t\t/ 2, w / 2 + a + a / 2, h / 2 + a / 2,\n\t\t\t\t\t\t\t\t\t\tpaint);\n\t\t\t\t\t\t\t\tcanvas.drawLine(w / 2 - a / 2, h / 2 - a - a\n\t\t\t\t\t\t\t\t\t\t/ 2, w / 2 - a / 2, h / 2 + a + a / 2,\n\t\t\t\t\t\t\t\t\t\tpaint);\n\t\t\t\t\t\t\t\tcanvas.drawLine(w / 2 + a / 2, h / 2 - a - a\n\t\t\t\t\t\t\t\t\t\t/ 2, w / 2 + a / 2, h / 2 + a + a / 2,\n\t\t\t\t\t\t\t\t\t\tpaint);\n\t\t\t\t\t\t\t\tif (flag[0] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[0]+a/5, y_coordinates[0]+a/5, x_coordinates[4]-a/5, y_coordinates[4]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[0]+a/5, y_coordinates[3]-a/5, x_coordinates[1]-a/5, y_coordinates[0]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[0]+a/2, y_coordinates[0]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[0]+a/2, y_coordinates[0]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (flag[1] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[1]+a/5, y_coordinates[1]+a/5, x_coordinates[5]-a/5, y_coordinates[5]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[1]+a/5, y_coordinates[4]-a/5, x_coordinates[2]-a/5, y_coordinates[1]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[1]+a/2, y_coordinates[1]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[1]+a/2, y_coordinates[1]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (flag[2] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[2]+a/5, y_coordinates[2]+a/5, xextreme-a/5, y_coordinates[4]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[2]+a/5, y_coordinates[5]-a/5, xextreme-a/5, y_coordinates[2]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[2]+a/2, y_coordinates[2]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[2]+a/2, y_coordinates[2]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (flag[3] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[3]+a/5, y_coordinates[3]+a/5, x_coordinates[7]-a/5, y_coordinates[7]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[0]+a/5, y_coordinates[6]-a/5, x_coordinates[4]-a/5, y_coordinates[3]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[3]+a/2, y_coordinates[3]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[3]+a/2, y_coordinates[3]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (flag[4] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[4]+a/5, y_coordinates[4]+a/5, x_coordinates[8]-a/5, y_coordinates[8]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[4]+a/5, y_coordinates[7]-a/5, x_coordinates[5]-a/5, y_coordinates[4]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[4]+a/2, y_coordinates[4]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[4]+a/2, y_coordinates[4]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (flag[5] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[5]+a/5, y_coordinates[5]+a/5, xextreme-a/5, y_coordinates[8]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[5]+a/5, y_coordinates[8]-a/5, xextreme-a/5, y_coordinates[5]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[5]+a/2, y_coordinates[5]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[5]+a/2, y_coordinates[5]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (flag[6] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[6]+a/5, y_coordinates[6]+a/5, x_coordinates[7]-a/5, yextreme-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[6]+a/5, yextreme-a/5, x_coordinates[7]-a/5, y_coordinates[7]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[6]+a/2, y_coordinates[6]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[6]+a/2, y_coordinates[6]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (flag[7] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[7]+a/5, y_coordinates[7]+a/5, x_coordinates[8]-a/5, yextreme-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[7]+a/5, yextreme-a/5, x_coordinates[8]-a/5, y_coordinates[8]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[7]+a/2, y_coordinates[7]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[7]+a/2, y_coordinates[7]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (flag[8] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[8]+a/5, y_coordinates[8]+a/5, xextreme-a/5, yextreme-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[8]+a/5, yextreme-a/5, xextreme-a/5, y_coordinates[8]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[8]+a/2, y_coordinates[8]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[8]+a/2, y_coordinates[8]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t * try { thread.sleep(200); } catch\n\t\t\t\t\t\t\t\t * (InterruptedException e) { // TODO\n\t\t\t\t\t\t\t\t * Auto-generated catch block\n\t\t\t\t\t\t\t\t * e.printStackTrace(); }\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\tif (cpuflag[0] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[0]+a/5, y_coordinates[0]+a/5, x_coordinates[4]-a/5, y_coordinates[4]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[0]+a/5, y_coordinates[3]-a/5, x_coordinates[1]-a/5, y_coordinates[0]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[0]+a/2, y_coordinates[0]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[0]+a/2, y_coordinates[0]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (cpuflag[1] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[1]+a/5, y_coordinates[1]+a/5, x_coordinates[5]-a/5, y_coordinates[5]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[1]+a/5, y_coordinates[4]-a/5, x_coordinates[2]-a/5, y_coordinates[1]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[1]+a/2, y_coordinates[1]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[1]+a/2, y_coordinates[1]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (cpuflag[2] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[2]+a/5, y_coordinates[2]+a/5, xextreme-a/5, y_coordinates[4]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[2]+a/5, y_coordinates[5]-a/5, xextreme-a/5, y_coordinates[2]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[2]+a/2, y_coordinates[2]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[2]+a/2, y_coordinates[2]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (cpuflag[3] == true)\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\tif(Start.character==0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[3]+a/5, y_coordinates[3]+a/5, x_coordinates[7]-a/5, y_coordinates[7]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[0]+a/5, y_coordinates[6]-a/5, x_coordinates[4]-a/5, y_coordinates[3]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[3]+a/2, y_coordinates[3]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[3]+a/2, y_coordinates[3]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (cpuflag[4] == true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(Start.character==0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[4]+a/5, y_coordinates[4]+a/5, x_coordinates[8]-a/5, y_coordinates[8]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[4]+a/5, y_coordinates[7]-a/5, x_coordinates[5]-a/5, y_coordinates[4]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[4]+a/2, y_coordinates[4]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[4]+a/2, y_coordinates[4]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (cpuflag[5] == true)\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\tif(Start.character==0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[5]+a/5, y_coordinates[5]+a/5, xextreme-a/5, y_coordinates[8]-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[5]+a/5, y_coordinates[8]-a/5, xextreme-a/5, y_coordinates[5]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[5]+a/2, y_coordinates[5]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[5]+a/2, y_coordinates[5]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (cpuflag[6] == true)\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\tif(Start.character==0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[6]+a/5, y_coordinates[6]+a/5, x_coordinates[7]-a/5, yextreme-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[6]+a/5, yextreme-a/5, x_coordinates[7]-a/5, y_coordinates[7]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[6]+a/2, y_coordinates[6]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[6]+a/2, y_coordinates[6]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (cpuflag[7] == true)\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\tif(Start.character==0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[7]+a/5, y_coordinates[7]+a/5, x_coordinates[8]-a/5, yextreme-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[7]+a/5, yextreme-a/5, x_coordinates[8]-a/5, y_coordinates[8]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[7]+a/2, y_coordinates[7]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[7]+a/2, y_coordinates[7]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (cpuflag[8] == true)\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\tif(Start.character==0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[8]+a/5, y_coordinates[8]+a/5, xextreme-a/5, yextreme-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(x_coordinates[8]+a/5, yextreme-a/5, xextreme-a/5, y_coordinates[8]+a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[8]+a/2, y_coordinates[8]+a/2, a/2-a/5, pt);\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawCircle(x_coordinates[8]+a/2, y_coordinates[8]+a/2, a/2-a/5-8, pt2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (result != -1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (result == 0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[8] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[8] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaint);\n\t\t\t\t\t\t\t\t\t\t\t} else if (result == 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[0] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[2] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[0] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2, paint);\n\t\t\t\t\t\t\t\t\t\t\t} else if (result == 2)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[3] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[2] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[3] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2, paint);\n\t\t\t\t\t\t\t\t\t\t\t} else if (result == 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[6] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[2] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[6] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2, paint);\n\t\t\t\t\t\t\t\t\t\t\t} else if (result == 4)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[0] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[0] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[6] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaint);\n\t\t\t\t\t\t\t\t\t\t\t} else if (result == 5)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[1] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[1] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[6] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaint);\n\t\t\t\t\t\t\t\t\t\t\t} else if (result == 6)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[2] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[2] + a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/ 2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[6] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpaint);\n\t\t\t\t\t\t\t\t\t\t\t} else if (result == 7)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas.drawLine(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[6] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tx_coordinates[2] + a,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ty_coordinates[0], paint);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tholder.unlockCanvasAndPost(canvas);\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "public void draw() {\n draw(this.root, new RectHV(0.0, 0.0, 1.0, 1.0));\n }", "Canvas(int width, int height){\n\t\tthis.components = new ArrayList<Component>();\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t}", "public abstract void mo3998c(Canvas canvas);", "public Canvas(GLCapabilities capabilities) {\n super(capabilities);\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }", "@FXML\n public void fullPatternButtonPressed()\n {\n GraphicsContext gc = clearCanvasAndGetGraphicsContext();\n\n\n // loop to draw lines for each number of lines\n for(int i = 0; i <= lines; i++) {\n\n // draw L shape in bottom left\n gc.strokeLine(\n 0,\n (canvas.getHeight()/lines)*i,\n (canvas.getWidth()/lines)*i,\n canvas.getHeight()\n );\n\n // draw L shape in top right\n gc.strokeLine(\n (canvas.getWidth()/lines)*i,\n 0,\n canvas.getWidth(),\n (canvas.getHeight()/lines)*i\n );\n\n // draw L shape in bottom right\n gc.strokeLine(\n (canvas.getWidth()/lines)*i,\n canvas.getHeight(),\n canvas.getWidth(),\n canvas.getHeight() - (canvas.getHeight()/lines)*i\n );\n\n // draw L shape in top left\n gc.strokeLine(\n (canvas.getWidth()/lines)*i,\n 0,\n 0,\n canvas.getHeight() - (canvas.getHeight()/lines)*i\n );\n }\n }", "public void renewImage() {\r\n\t\t//myHistoryManager.clearHistory();\r\n\t\tindexes.clear();\r\n\t\tcache.clear();\r\n\t\tcolorCache.clear();\r\n\t\tstrokeSizes.clear();\r\n\t\t\r\n//\t\tfor (AbstractHistory tempHistory : newHistorys) {\r\n//\t\t\tmyHistoryManager.addHistory(tempHistory);\r\n//\t\t}\r\n\r\n\t\tsurface.clear();\r\n\t\tint start = 0;\r\n\t\tfor (start = 0; start < myHistoryManager.historys.size(); start++) {\r\n\r\n\t\t\tAbstractHistory history = myHistoryManager.historys.get(start);\r\n\t\t\tif (history.getType() == \"AddHistory\") {\r\n\r\n\t\t\t\tPoint endPos = ((AddHistory) history).endPos;\r\n\t\t\t\tMyColor pathColor = ((AddHistory) history).pathColor;\r\n\t\t\t\tstrokeSize = ((AddHistory) history).strokeSize;\r\n\t\t\t\tdouble x = endPos.getVector2().getX();\r\n\t\t\t\tdouble y = endPos.getVector2().getY();\r\n\r\n\t\t\t\tif (strokePointCount == 2) {\r\n\t\t\t\t\tcanvas_context.setStrokeStyle(pathColor.getColorCode());\r\n\t\t\t\t\tcanvas_context.setFillStyle(pathColor.getColorCode());\r\n\t\t\t\t\tcanvas_context.setLineWidth(((double) strokeSize) * 0.5);\r\n\t\t\t\t\tcanvas_context.setLineCap(LineCap.ROUND);\r\n\t\t\t\t\tcanvas_context.setLineJoin(LineJoin.ROUND);\r\n\t\t\t\t\tcanvas_context.setShadowBlur(((double) strokeSize) * 0.3);\r\n\t\t\t\t\tcanvas_context.setShadowColor(pathColor.getColorCode());\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* get the x, y */\r\n\t\t\t\t\tp3.x = x;\r\n\t\t\t\t\tp3.y = y;\r\n\t\t\t\t\tp0.x = p1.x + (p1.x - p2.x);\r\n\t\t\t\t\tp0.y = p1.y + (p1.y - p2.y);\r\n\t\t\t\t\tstrokePointCount++;\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\tget_buffer(p0, p1, p2, p3, bufferCount);\r\n\t\t\t\t\tbufferCount = buffList.size();\r\n\t\t\t\t\toldx = (int) buffList.get(0).x;\r\n\t\t\t\t\toldy = (int) buffList.get(0).y;\r\n\t\t\t\t\tcanvas_context.beginPath();\r\n\t\t\t\t\tcanvas_context.moveTo(oldx, oldy);\r\n\t\t\t\t\tcache.add(new Vector2(oldx, oldy));\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * draw all interpolated points found through Hermite\r\n\t\t\t\t\t * interpolation\r\n\t\t\t\t\t */\r\n\t\t\t\t\tint i = 1;\r\n\t\t\t\t\tfor (i = 1; i < bufferCount - 2; i++) {\r\n\t\t\t\t\t\tx = buffList.get(i).x;\r\n\t\t\t\t\t\ty = buffList.get(i).y;\r\n\t\t\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\t\t\tdouble nextx = buffList.get(i + 1).x;\r\n\t\t\t\t\t\tdouble nexty = buffList.get(i + 1).y;\r\n\t\t\t\t\t\tdouble c = (x + nextx) / 2;\r\n\t\t\t\t\t\tdouble d = (y + nexty) / 2;\r\n\t\t\t\t\t\tcanvas_context.quadraticCurveTo(x, y, c, d);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tx = buffList.get(i).x;\r\n\t\t\t\t\ty = buffList.get(i).y;\r\n\t\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\t\tdouble nextx = buffList.get(i + 1).x;\r\n\t\t\t\t\tdouble nexty = buffList.get(i + 1).y;\r\n\t\t\t\t\tcache.add(new Vector2(nextx, nexty));\r\n\t\t\t\t\t\r\n\t\t\t\t\tcanvas_context.quadraticCurveTo(x, y, nextx, nexty);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* adaptive buffering using Hermite interpolation */\r\n\t\t\t\t\tint distance = (int) Math.sqrt(Math.pow(x - p2.x, 2)\r\n\t\t\t\t\t\t\t+ Math.pow(y - p2.y, 2));\r\n\t\t\t\t\tbufferCount = ((int) distance / 10) > 6 ? 6 : 3;\r\n\t\t\t\t\tbufferCount = bufferCount < 10 ? bufferCount : 10;\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tcolorCache.remove(colorCache.size()-1);\r\n\t\t\t\t\tcolorCache.add(pathColor);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t/* update the touch point list */\r\n\t\t\t\t\tp0.x = p1.x;\r\n\t\t\t\t\tp0.y = p1.y;\r\n\t\t\t\t\tp1.x = p2.x;\r\n\t\t\t\t\tp1.y = p2.y;\r\n\t\t\t\t\tp2.x = p3.x;\r\n\t\t\t\t\tp2.y = p3.y;\r\n\t\t\t\t\tp3.x = x;\r\n\t\t\t\t\tp3.y = y;\r\n\r\n\t\t\t\t\tget_buffer(p0, p1, p2, p3, bufferCount);\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * draw all interpolated points found through Hermite\r\n\t\t\t\t\t * interpolation\r\n\t\t\t\t\t */\r\n\t\t\t\t\tbufferCount = buffList.size();\r\n\t\t\t\t\tint i = 1;\r\n\t\t\t\t\tfor (i = 1; i < bufferCount - 2; i++) {\r\n\t\t\t\t\t\tx = buffList.get(i).x;\r\n\t\t\t\t\t\ty = buffList.get(i).y;\r\n\t\t\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\t\t\tdouble nextx = buffList.get(i + 1).x;\r\n\t\t\t\t\t\tdouble nexty = buffList.get(i + 1).y;\r\n\t\t\t\t\t\tdouble c = (x + nextx) / 2;\r\n\t\t\t\t\t\tdouble d = (y + nexty) / 2;\r\n\t\t\t\t\t\tcanvas_context.quadraticCurveTo(x, y, c, d);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tx = buffList.get(i).x;\r\n\t\t\t\t\ty = buffList.get(i).y;\r\n\t\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\t\t\r\n\t\t\t\t\tdouble nextx = buffList.get(i + 1).x;\r\n\t\t\t\t\tdouble nexty = buffList.get(i + 1).y;\r\n\t\t\t\t\tcache.add(new Vector2(nextx, nexty));\r\n\t\t\t\t\t\r\n\t\t\t\t\tcanvas_context.quadraticCurveTo(x, y, nextx, nexty);\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* adaptive buffering using Hermite interpolation */\r\n\t\t\t\t\tint distance = (int) Math.sqrt(Math.pow(x - p2.x, 2)\r\n\t\t\t\t\t\t\t+ Math.pow(y - p2.y, 2));\r\n\t\t\t\t\tbufferCount = ((int) distance / 10) > 6 ? 6 : 3;\r\n\t\t\t\t\tbufferCount = bufferCount < 10 ? bufferCount : 10;\r\n\t\t\t\t\t// logger.log(Level.SEVERE, \"bufferCount \"+\r\n\t\t\t\t\t// bufferCount);\r\n\t\t\t\t}\r\n\r\n\t\t\t} else if (history.getType() == \"PathHeadHistory\") {\r\n\t\t\t\t\r\n\t\t\t\tMyColor pathColor = ((PathHeadHistory) history).pathColor;\r\n\t\t\t\tstrokeSize = ((PathHeadHistory) history).strokeSize;\r\n\t\t\t\t\r\n\t\t\t\tPoint position = ((PathHeadHistory) history).position;\r\n\t\t\t\tdouble x = position.getVector2().getX();\r\n\t\t\t\tdouble y = position.getVector2().getY();\r\n\t\t\t\tstrokePointCount = 0;\r\n\r\n\t\t\t\t/* initialize the points */\r\n\t\t\t\tp1.x = x;\r\n\t\t\t\tp1.y = y;\r\n\t\t\t\tp2.x = x;\r\n\t\t\t\tp2.y = y;\r\n\t\t\t\tstrokePointCount++;\r\n\t\t\t\tstrokePointCount++;\r\n\t\t\t\tcanvas_context.stroke();\r\n\t\t\t\t\r\n\t\t\t\t/* add index to indexes list */\r\n\t\t\t\tindexes.add(cache.size());\r\n\t\t\t\tcache.add(new Vector2(x, y));\r\n\t\t\t\tstrokeSizes.add(strokeSize);\r\n\t\t\t\tcolorCache.add(pathColor);\r\n\t\t\t\t\r\n\t\t\t\t/* set stroke color, size, and shadow */\r\n\t\t\t\tcanvas_context.setStrokeStyle(pathColor.getColorCode());\r\n\t\t\t\tcanvas_context.setFillStyle(pathColor.getColorCode());\r\n\t\t\t\tcanvas_context.setLineWidth(((double) strokeSize) * 0.4);\r\n\t\t\t\tcanvas_context.beginPath();\r\n\t\t\t\tcanvas_context.arc(x, y, ((double) strokeSize) * 0.4, 0,\r\n\t\t\t\t\t\t2 * Math.PI);\r\n\t\t\t\tcanvas_context.fill();\r\n\t\t\t\t\r\n\t\t\t\tbufferCount = 3;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcanvas_context.stroke();\r\n\t\tstrokePointCount = 0;\r\n\t}", "public abstract void mo3997b(Canvas canvas);", "void draw(Canvas canvas) {\n canvas.drawBitmap(babyImg, x, y, paint);\n System.out.println(\"Drew baby\");\n }", "public void displayAllWaves(){\r\n // System.out.println(\"showing waves:\"+wave1.size());\r\n\r\n //we start by clearing anything we have drawn previously\r\n gc.clearRect(0, 0, canvas.widthProperty().intValue(), canvas.heightProperty().intValue());\r\n gc.setFill(backgroundColour);\r\n gc.fillRect(0, 0, canvas.widthProperty().intValue(), canvas.heightProperty().intValue());\r\n //then we draw the grid mentioned previously\r\n drawGrid();\r\n\r\n drawTriggerVoltage();\r\n\r\n drawCursors();\r\n\r\n if(showWave1) {\r\n //we then start drawing the first wave in red\r\n displayWave(wave1, wave1Colour);\r\n }\r\n\r\n if(showWaveMath){\r\n\r\n }\r\n\r\n }", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t}", "@Override\n\t\t\tpublic void draw(Canvas canvas) {\n\t\t\t\t\n\t\t\t\tfloat graphBrushWidth = (float)((90*width)/1080);\n\t\t\t\t\n\t\t\t\tbackgroundColor = basePad.getResources().getColor(R.color.TRANSPARENT);\n\t\t paint1.setColor(basePad.getResources().getColor(R.color.white));\n\t\t paint1.setAntiAlias(true); \n\t\t canvas.drawColor(backgroundColor);\n\t\t paint1.setStrokeWidth(graphBrushWidth);\n\n\t\t paint1.setStyle(Style.STROKE);\n//\t\t paint.setStyle(Paint.Style.FILL);\n\t\t \n\t\t paint2.setColor(basePad.getResources().getColor(R.color.total_ring2));\n\t\t paint2.setAntiAlias(true); \n\t\t paint2.setStrokeWidth(graphBrushWidth);\n\t\t paint2.setStyle(Style.STROKE);\n\t\t \n\t\t int[] graphX = new int[]{width/2, (width*5/32), (width*28/32)};\n\t\t int[] graphY = new int[]{(height*3/8), (height*11/16), (height*11/16)};\n\t\t int[] graphRadius = new int[]{(int)((width*6)/8), width/5, width/5};\n\t\t int[] graphContent = new int[]{usageAngle, daylyAngle, dayLeft};\n\t\t \n\t\t for (int count = 0; count < 3; count++){\n\t\t \tpaint1.setColor(basePad.getResources().getColor(R.color.white));\n\t\t \tpaint2.setColor(basePad.getResources().getColor(R.color.total_ring2));\n\t\t\t RectF oval = new RectF();\n\t\t\t oval.left = graphX[count] - (int)(graphRadius[count]/2);\n\t\t\t oval.top = graphY[count] - (int)(graphRadius[count]/2);\n\t\t\t oval.right = graphX[count] + (int)(graphRadius[count]/2);\n\t\t\t oval.bottom = graphY[count] + (int)(graphRadius[count]/2);\n\t\t\t if (count != 0){\n\t\t\t \tgraphBrushWidth = (float)((20*width)/1080);\n\t\t\t \tpaint1.setStrokeWidth(graphBrushWidth);\n\t\t\t \tpaint2.setStrokeWidth(graphBrushWidth);\n\t\t\t }\n\t\t\t if (graphContent[count] >= 360){\n\t\t\t \tpaint1.setColor(basePad.getResources().getColor(R.color.red));\n\t\t\t \tpaint2.setColor(basePad.getResources().getColor(R.color.red));\n\t\t\t }\n\t\t\t canvas.drawArc(oval, 270, graphContent[count] + 1, false, paint2);\n\t\t\t\t canvas.drawArc(oval, 270 + graphContent[count], 361 - graphContent[count], false, paint1);\n\t\t }\n\t\t\t\t\n//\t\t graphBrushWidth = (float)((3*width)/1080);\n//\t\t paint1.setStrokeWidth(graphBrushWidth);\n//\t\t canvas.drawLine(total_x, total_y, total_x + ((160*width)/1080), total_y, paint1);\n//\t\t canvas.drawLine(daily_x, daily_y, daily_x + ((160*width)/1080), daily_y, paint1);\n//\t\t canvas.drawLine(day_x, day_y, day_x + ((160*width)/1080), day_y, paint1);\n\t\t \n//\t\t int bannerY = (int)((175*width)/1080);\n//\t\t int bannerWidth = (int)((170*width)/1080);\n//\t\t bot = y + radius;\n\t\t \n//\t\t Paint coverPaint = new Paint();\n//\t\t coverPaint.setColor(basePad.getResources().getColor(R.color.white));\n//\t\t coverPaint.setAntiAlias(true); \n//\t\t coverPaint.setStrokeWidth((float) 5.0);\n//\t\t coverPaint.setStyle(Style.STROKE);\n//\t\t coverPaint.setStyle(Paint.Style.FILL);\n//\t\t \n//\t\t RectF coverOval = new RectF();\n//\t\t coverOval.left = x + 100;\n//\t\t coverOval.top = y + 100;\n//\t\t coverOval.right = x + 800;\n//\t\t coverOval.bottom = bot - 100;\n//\t\t canvas.drawArc(coverOval, 0, 360, true, coverPaint);\n\t\t\t}", "private void render() {\n bs = display.getCanvas().getBufferStrategy();\n /* if it is null, we define one with 3 buffers to display images of\n the game, if not null, then we display every image of the game but\n after clearing the Rectanlge, getting the graphic object from the \n buffer strategy element. \n show the graphic and dispose it to the trash system\n */\n if (bs == null) {\n display.getCanvas().createBufferStrategy(3);\n } else {\n g = bs.getDrawGraphics();\n g.drawImage(Assets.background, 0, 0, width, height, null);\n g.setColor(Color.white);\n g.drawLine(0, 500, 595, 500);\n player.render(g);\n for (int i = 0; i < aliens.size(); i++) {\n Alien al = aliens.get(i);\n al.render(g);\n }\n if (shotVisible) {\n shot.render(g);\n }\n\n if(gameOver==false)\n {\n gameOver();\n }\n for(Alien alien: aliens){\n Bomb b = alien.getBomb();\n b.render(g);\n }\n g.setColor(Color.red);\n Font small = new Font(\"Helvetica\", Font.BOLD, 20);\n g.setFont(small);\n g.drawString(\"G - Guardar\", 10, 50);\n g.drawString(\"C - Cargar\", 10, 70);\n g.drawString(\"P - Pausa\", 10, 90);\n\n if(keyManager.pause)\n {\n g.drawString(\"PAUSA\", 250, 300);\n }\n \n bs.show();\n g.dispose();\n }\n\n }", "void onDraw(ProcessingCanvas givenCanvas);", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "public void update(Canvas canvas) {\n GraphicsContext graphics = canvas.getGraphicsContext2D();\n graphics.setFill(this.color);\n graphics.fillRect(getX(), getY(), getWidth(), getHeight());\n }", "public void draw() {\n\t\tp.pushStyle();\n\t\t{\n\t\t\tp.rectMode(PConstants.CORNER);\n\t\t\tp.fill(360, 0, 70, 180);\n\t\t\tp.rect(60f, 50f, p.width - 110f, p.height * 2f * 0.33f - 50f);\n\t\t\tp.rect(60f, p.height * 2f * 0.33f + 50f, p.width - 110f, p.height * 0.33f - 130f);\n\t\t}\n\t\tp.popStyle();\n\n\t\tlineChart.draw(40f, 40f, p.width - 80f, p.height * 2f * 0.33f - 30f);\n\t\tlineChart2.draw(40f, p.height * 2f * 0.33f + 45f, p.width - 80f, p.height * 0.33f - 110f);\n\t\t//p.line(x1, y1, x2, y2);\n\n\t}", "static void draw()\n {\n for (Viewport viewport : viewports)\n viewport.draw(renderers);\n }" ]
[ "0.7089002", "0.661448", "0.66048384", "0.65501374", "0.651307", "0.6506853", "0.64831764", "0.6459638", "0.6459638", "0.64576", "0.6438966", "0.6415398", "0.6384151", "0.6334319", "0.632276", "0.6301599", "0.62640613", "0.6244325", "0.62422794", "0.6229003", "0.6221239", "0.62191695", "0.6206975", "0.62024724", "0.6201014", "0.61936736", "0.6182985", "0.6176065", "0.6175819", "0.6175769", "0.61719924", "0.61565113", "0.61503905", "0.6136949", "0.61309284", "0.61252654", "0.6119144", "0.6110906", "0.6106128", "0.61015904", "0.60970634", "0.609384", "0.6092012", "0.60764045", "0.6043784", "0.6033503", "0.60311574", "0.60239226", "0.60222006", "0.6015318", "0.6014097", "0.60075265", "0.59927905", "0.5984586", "0.5984355", "0.5981654", "0.59792715", "0.5977486", "0.59528226", "0.5951122", "0.594753", "0.59433985", "0.59422815", "0.59377927", "0.5935949", "0.593559", "0.5934693", "0.5931707", "0.5923213", "0.59216726", "0.59200954", "0.59176123", "0.59161335", "0.5912634", "0.5908777", "0.59074926", "0.590716", "0.59004086", "0.5895715", "0.58901983", "0.58776534", "0.58714575", "0.5869906", "0.58648103", "0.58614945", "0.58614373", "0.58604455", "0.5860404", "0.5856108", "0.58489645", "0.58470565", "0.584008", "0.5833582", "0.5825664", "0.5822974", "0.5815798", "0.5815686", "0.58139116", "0.5813363", "0.5805254", "0.58052087" ]
0.0
-1
Method to write objects to disk
public static void writeObjectToDisk(Object obj, String name) throws IOException { // Create file output stream FileOutputStream fileOutStr = new FileOutputStream(name); // Create object output stream and write object ObjectOutputStream objOutStr = new ObjectOutputStream(fileOutStr); objOutStr.writeObject(obj); // Close all streams objOutStr.close(); fileOutStr.close(); System.out.printf("Serialized data is saved in a file - " + name); // Printing message and file name which is // saved }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeObject ();", "public void writeObject(Object obj) throws IOException;", "void writeObject(OutputSerializer out) throws java.io.IOException;", "private void writeToFile(String filename, Object object) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(filename, MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(object);\n objectOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void writeObject(String filePath, Object obj) throws IOException {\n OutputStream file = new FileOutputStream(filePath);\n OutputStream buffer = new BufferedOutputStream(file);\n ObjectOutput output = new ObjectOutputStream(buffer);\n output.writeObject(obj);\n output.close();\n }", "public void writeObject(Object obj, String path)throws IOException{\n FileOutputStream fos = new FileOutputStream(path);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n\n oos.writeObject(obj);\n oos.close();\n }", "@Override\n\tpublic void write(Object obj, File file) throws IJunitException {\n\t\t\n\t}", "String objectWrite();", "@Override\n\tprotected void write(ObjectOutput out) throws IOException {\n\t\t\n\t}", "public void save(OutputStream os) throws IOException;", "public void SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }", "public abstract void saveToFile(PrintWriter out);", "private void saveToDir(String name, Object obj) {\n\t\tFileOutputStream fileOut = null;\n\t\ttry {\n\t\t\tfileOut = new FileOutputStream(this.dir + \"/\" + name);\n\t\t\tObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t\t\tout.writeObject(obj);\n\t\t\tout.close();\n\t\t\tfileOut.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred while saving the index file: \" + name);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}", "public void serialize() {\n FileOutputStream fileOutput = null;\n ObjectOutputStream outStream = null;\n // attempts to write the object to a file\n try {\n clearFile();\n fileOutput = new FileOutputStream(data);\n outStream = new ObjectOutputStream(fileOutput);\n outStream.writeObject(this);\n } catch (Exception e) {\n } finally {\n try {\n if (outStream != null)\n outStream.close();\n } catch (Exception e) {\n }\n }\n }", "private void writeObject(final ObjectOutputStream out) throws IOException {\n try {\n if (location == null) location = IOHelper.serializeData(object);\n IOHelper.writeData(location, new StreamOutputDestination(out));\n } catch (final IOException e) {\n throw e;\n } catch (final Exception e) {\n throw new IOException(e);\n }\n }", "public abstract void writeToFile( );", "@Override\r\npublic boolean writeEntries(CacheObject obj) {\n\t\r\n\ttry {\r\n\t\t\r\n\t\tthis.writer.append(\"[\"+obj.toString()+\"]\\r\\n\");\r\n\t\tthis.writer.flush();\r\n\t} catch (IOException e) {\r\n\t\tSystem.out.println(\"Error Occured while writing into File :\"+ e.getMessage());\r\n\t\te.printStackTrace();\r\n\t\t\r\n\t} \r\n\t\r\n\treturn false;\r\n}", "@Override\n\tpublic void saveData(Object objectsToSave, String path) {\n\t\t\n\t\ttry {\n\t\t\tString objects = (String) objectsToSave;\n\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(path);\n\t\t\tfileOutputStream.write(objects.getBytes());\n\t\t\tfileOutputStream.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void writeObject(OutputStream stream, Object object, int format) throws IOException;", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }", "public void writeObject(ZObjectOutputStream out) throws IOException {\n }", "private void writeObject(\n \t\t ObjectOutputStream aOutputStream\n\t\t ) throws IOException {\n\t\t //perform the default serialization for all non-transient, non-static fields\n \t\t aOutputStream.defaultWriteObject();\n \t}", "public void writeToFile() {\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(pathName);\n\t\t\tObjectOutputStream output = new ObjectOutputStream(file);\n\n\t\t\tMap<String, HashSet<String>> toSerialize = tagToImg;\n\t\t\toutput.writeObject(toSerialize);\n\t\t\toutput.close();\n\t\t\tfile.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void save() {\n if (mCacheFile.exists()) {\n mCacheFile.delete();\n }\n\n try (JsonWriter writer = new JsonWriter(new BufferedWriter(new FileWriter(mCacheFile)))) {\n writer.beginObject();\n writer.name(PRINTER_LIST_NAMES.get(0));\n writer.beginArray();\n for (DiscoveredPrinter printer : mSavedPrinters) {\n printer.write(writer);\n }\n writer.endArray();\n writer.endObject();\n } catch (NullPointerException | IOException e) {\n Log.w(TAG, \"Error while storing to \" + mCacheFile, e);\n }\n }", "private void writeToFile(String pathName,Object logs) {\r\n try {\r\n File save = new File(pathName);\r\n FileOutputStream fileOutputStream = new FileOutputStream(save);\r\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\r\n objectOutputStream.writeObject(logs);\r\n // System.out.println(\"write successful for\"+pathName);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void serialize(Serializable[] objects, String name) {\n try {\n File file = new File(BASE_DIRECTORY + name);\n if (new File(BASE_DIRECTORY).mkdirs()) {\n Logger.internalLog(\"SERIALIZER\", \"Created data directory.\");\n }\n\n if (file.delete()) {\n Logger.internalLog(\"SERIALIZER\", \"Overwrote previous data.\");\n } else {\n Logger.internalLog(\"SERIALIZER\", \"Writing new data.\");\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(objects);\n objectOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void writeObject(ObjectOutputStream out) throws IOException\r\n\t{\r\n\t\tthis.serialize(out);\r\n\t}", "void serialize(Object obj, OutputStream stream) throws IOException;", "private void writeObject(java.io.ObjectOutputStream s)\n throws java.lang.ClassNotFoundException,\n\t java.io.IOException\n {\n s.defaultWriteObject();\n }", "public void writeObject(RandomAccessFile arq) throws IOException{\n byte[] dados = this.getByteArray();\n arq.writeChar(' ');\n arq.writeShort(dados.length);\n arq.write(dados);\n }", "private void writeObject(ObjectOutputStream stream) throws IOException {\n/* 188 */ stream.defaultWriteObject();\n/* 189 */ stream.writeInt(this.store.size());\n/* 190 */ Set keys = this.store.keySet();\n/* 191 */ Iterator iterator = keys.iterator();\n/* 192 */ while (iterator.hasNext()) {\n/* 193 */ Comparable key = (Comparable)iterator.next();\n/* 194 */ stream.writeObject(key);\n/* 195 */ Stroke stroke = getStroke(key);\n/* 196 */ SerialUtilities.writeStroke(stroke, stream);\n/* */ } \n/* */ }", "void saveObject(DataObject sdo, XMLStreamWriter writer) throws XMLStreamException;", "public void save() throws FileNotFoundException, IOException, ClassNotFoundException ;", "public void writeObject( Container.ContainerOutputStream cos ) throws SerializationException;", "private void writeBinaryObjects(List<Integer> objectIds, String aTempDir)\n throws IOException, StorageException {\n int counter = 0;\n int skip = 0;\n log.info(\"writing XMLs for bytestreams of digital objects. count = \" + objectIds.size());\n for (Integer id : objectIds) {\n if (counter > LOADED_DATA_SIZE_BOUNDARY) { // Call GC if unused data\n // exceeds boundary\n System.gc();\n counter = 0;\n }\n DigitalObject object = em.find(DigitalObject.class, id);\n if (object.isDataExistent()) {\n counter += object.getData().getSize();\n File f = new File(aTempDir + object.getId() + \".xml\");\n DigitalObject dataFilledObject = null;\n dataFilledObject = digitalObjectManager.getCopyOfDataFilledDigitalObject(object);\n writeBinaryData(id, new ByteArrayInputStream(dataFilledObject.getData().getData()), f);\n dataFilledObject = null;\n } else {\n skip++;\n }\n object = null;\n }\n em.clear();\n System.gc();\n log.info(\"Finished writing bytestreams of digital objects. Skipped empty objects: \" + skip);\n }", "private void writeObject(java.io.ObjectOutputStream s)\n throws java.lang.ClassNotFoundException,\n java.io.IOException\n {\n s.defaultWriteObject();\n }", "public void save() throws Exception {\n // create a File object for the output file\n File outputFile = new File(MinuteUpdater.mapDir, this.fileName);\n // outputFile.mkdirs();\n outputFile.createNewFile();\n FileOutputStream fileOutputStream = new FileOutputStream(outputFile);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n\n objectOutputStream.writeObject(this);\n objectOutputStream.close();\n }", "static void writeToFiles() throws IOException {\n\n writeToFilePriceHistory();\n writeToFileEmployees();\n writeToFileInventory();\n writeToSaleItems();\n writeToOrder();\n writeToFileInventory();\n writeToRevenueLog();\n }", "protected abstract void writeFile();", "public static void save(final String filename, final Serializable object)\r\n throws IOException {\r\n FileOutputStream fos = null;\r\n ObjectOutputStream out = null;\r\n\r\n fos = new FileOutputStream(filename);\r\n out = new ObjectOutputStream(fos);\r\n out.writeObject(object);\r\n out.close();\r\n }", "private void serializeObject(String filename, Object content)\n throws IOException\n {\n synchronized(filename)\n {\n FileOutputStream fileOut = new FileOutputStream(filename);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(content);\n out.close();\n fileOut.close();\n }\n }", "ObjectOutputStream newObjectOutputStream(OutputStream out) throws Exception;", "public void writeToFile(Object obj) throws FileNotFoundException, IOException\n {\n ObjectOutputStream writeToFile = null;\n\n try\n {\n FileOutputStream fileOutStream = new FileOutputStream(FILE_NAME);\n writeToFile = new ObjectOutputStream(fileOutStream);\n\n writeToFile.writeObject(obj);\n }\n finally\n {\n if (writeToFile != null)\n {\n try\n {\n writeToFile.close();\n }\n catch (IOException e)\n {\n displayErrorMessage(\"IO File error on\", FILE_NAME);\n }\n }\n }\n }", "synchronized public void saveToFile() {\n try {\n saveObjToFile(this, saveFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n log(\"error saving resource to file\");\n }\n }", "public void writeObject(Object obj) throws IOException\n\t{\n\t\tif (obj == null) {\n\t\t\twriteMark(Ion.NULL);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof IonBinary) {\n\t\t\tfinal IonBinary iObj = (IonBinary) obj;\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\tiObj.save(this);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof IonBundled) {\n\t\t\tfinal IonBundled iObj = (IonBundled) obj;\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\t\n\t\t\tfinal IonDataBundle bundle = new IonDataBundle();\n\t\t\tiObj.save(bundle);\n\t\t\twriteBundle(bundle);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Ion.isObjectIndirectBundled(obj)) {\n\t\t\tfinal IonizerBundled<?> ionizer = Ion.getIonizerBundledForClass(obj.getClass());\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\t\n\t\t\tfinal IonDataBundle bundle = new IonDataBundle();\n\t\t\tionizer._save(obj, bundle);\n\t\t\twriteBundle(bundle);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Ion.isObjectIndirectBinary(obj)) {\n\t\t\tfinal IonizerBinary<?> ionizer = Ion.getIonizerBinaryForClass(obj.getClass());\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\t\n\t\t\tionizer._save(obj, this);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Map) {\n\t\t\twriteMark(Ion.MAP);\n\t\t\twriteMap((Map<?, ?>) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Collection) {\n\t\t\twriteMark(Ion.SEQUENCE);\n\t\t\twriteSequence((Collection<?>) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Boolean) {\n\t\t\twriteMark(Ion.BOOLEAN);\n\t\t\twriteBoolean((Boolean) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Byte) {\n\t\t\twriteMark(Ion.BYTE);\n\t\t\twriteByte((Byte) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Character) {\n\t\t\twriteMark(Ion.CHAR);\n\t\t\twriteChar((Character) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Short) {\n\t\t\twriteMark(Ion.SHORT);\n\t\t\twriteShort((Short) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Integer) {\n\t\t\twriteMark(Ion.INT);\n\t\t\twriteInt((Integer) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Long) {\n\t\t\twriteMark(Ion.LONG);\n\t\t\twriteLong((Long) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Float) {\n\t\t\twriteMark(Ion.FLOAT);\n\t\t\twriteFloat((Float) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Double) {\n\t\t\twriteMark(Ion.DOUBLE);\n\t\t\twriteDouble((Double) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof String) {\n\t\t\twriteMark(Ion.STRING);\n\t\t\twriteString((String) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof boolean[]) {\n\t\t\twriteMark(Ion.BOOLEAN_ARRAY);\n\t\t\twriteBooleans((boolean[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof byte[]) {\n\t\t\twriteMark(Ion.BYTE_ARRAY);\n\t\t\twriteBytes((byte[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof char[]) {\n\t\t\twriteMark(Ion.CHAR_ARRAY);\n\t\t\twriteChars((char[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof short[]) {\n\t\t\twriteMark(Ion.SHORT_ARRAY);\n\t\t\twriteShorts((short[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof int[]) {\n\t\t\twriteMark(Ion.INT_ARRAY);\n\t\t\twriteInts((int[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof long[]) {\n\t\t\twriteMark(Ion.LONG_ARRAY);\n\t\t\twriteLongs((long[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof float[]) {\n\t\t\twriteMark(Ion.FLOAT_ARRAY);\n\t\t\twriteFloats((float[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof double[]) {\n\t\t\twriteMark(Ion.DOUBLE_ARRAY);\n\t\t\twriteDoubles((double[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof String[]) {\n\t\t\twriteMark(Ion.STRING_ARRAY);\n\t\t\twriteStrings((String[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Object[]) {\n\t\t\twriteMark(Ion.OBJECT_ARRAY);\n\t\t\twriteObjects((Object[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthrow new IOException(\"Object \" + obj + \" could not be be written to stream.\");\n\t}", "String saveToFile(Object data, String fileName, FileFormat fileFormat) throws IOException;", "private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void writeObjects(Object[] arr) throws IOException\n\t{\n\t\twriteLength(arr.length);\n\t\tfor (final Object a : arr) {\n\t\t\twriteObject(a);\n\t\t}\n\t}", "public void save() throws IOException {\n File f = new File(\"data/pages/\" + pageName + \".class\");\n if (!f.exists()) {\n if (!f.getParentFile().exists()) {\n if (f.getParentFile().mkdirs()) {\n f.createNewFile();\n }\n }\n }\n FileOutputStream fos = new FileOutputStream(f);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(this);\n oos.flush();\n oos.close();\n }", "private void writeObject(\n ObjectOutputStream aOutputStream\n ) throws IOException {\n //perform the default serialization for all non-transient, non-static fields\n aOutputStream.defaultWriteObject();\n }", "public void writeTo(Object obj, String mimeType, OutputStream os)\n\t throws IOException;", "private void writeAll(){\n try (BufferedWriter ignored = new BufferedWriter(new FileWriter(this.fileName))) {\n Iterable<E> values=entities.values();\n values.forEach(this::writeToFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void saveToFile() {\n FileOutputStream fos = null;\n try {\n //write the object into file\n fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(travelGUI.getTravelAgent());\n oos.flush();\n oos.close();\n }\n catch (IOException ioe) {\n System.out.println(ioe.getMessage());\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n return;\n }\n finally {\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }", "@Override\n public void write() {\n\n }", "private void writeObject(ObjectOutputStream _stream)\n/* 428: */ throws IOException\n/* 429: */ {\n/* 430:503 */ _stream.defaultWriteObject();\n/* 431:504 */ writeCustomData(_stream);\n/* 432: */ }", "public static void writeObject() {\r\n ChunkedCharBuffer buf = new ChunkedCharBuffer();\r\n for (Map.Entry<String, CronJob> entry : getInstance().events.entrySet()) {\r\n CronJob event = entry.getValue();\r\n buf.append(entry.getKey());\r\n buf.append(\"|\");\r\n buf.append(String.valueOf(event.getInterval()));\r\n buf.append(\"|\");\r\n buf.append(String.valueOf(event.getStartTime().getTime()));\r\n buf.append(\"|\");\r\n buf.append(event.getCommandString());\r\n buf.append(\"|\");\r\n buf.append(event.getUser());\r\n buf.append(\"|\");\r\n buf.append(event.getUserService());\r\n buf.append(\"\\n\");\r\n }\r\n if (buf.size() > 0) {\r\n try {\r\n OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(FILE, false)));\r\n buf.writeTo(out);\r\n out.flush();\r\n out.close();\r\n } catch (Exception e) {\r\n LoggingService.getInstance().serverLog(\"Error writing statistics: \" + e);\r\n }\r\n }\r\n }", "@Override\n\tpublic void flush() {\n\t\ttry {\n\t\t\tFile f = new File(path);\n\t\t\tFileWriter fw = new FileWriter(f);\n\t\t\tfw.write(\"\");\n\t\t\tfw.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t \n\t \n\t\n\t try {\n\t\t \n\t\t\n\t\t \n\t\t\tObjectOutputStream os;\n\t\t\tFile file = new File(path);\n\t\t\tFileOutputStream fos = new FileOutputStream(file, true);\n\t\t\tif (file.length() < 1) {\n\t\t\t\tos = new ObjectOutputStream(fos);\n\t\t\t} else {\n\t\t\t\tos = new MyObjectOutputStream(fos);\n\t\t\t}\n\t\t\tos.writeObject(constantPO);\n\t\t\tos.flush();\n\t\t\tos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void writeObject(ObjectOutputStream oos) throws IOException {\n\t\toos.defaultWriteObject();\r\n\t\tGdx.app.log(\"L/S\", \"entityInfoCollector size: \" + manList.size() + \":\" + buildingsList.size() + \":\" + buildingsList.size());\r\n\t\t\r\n\t}", "public abstract <T> SerializationStream writeObject(T t);", "private void writeDigitalObjects(List<Integer> objectIds, String tempDir) throws IOException, StorageException {\n int counter = 0;\n int skip = 0;\n log.info(\"Writing bytestreams of digital objects. Size = \" + objectIds.size());\n for (Integer id : objectIds) {\n if (counter > LOADED_DATA_SIZE_BOUNDARY) { // Call GC if unused data\n // exceeds boundary\n System.gc();\n counter = 0;\n }\n DigitalObject object = em.find(DigitalObject.class, id);\n if (object.isDataExistent()) {\n counter += object.getData().getSize();\n File f = new File(tempDir + object.getId() + \".xml\");\n DigitalObject dataFilledObject = digitalObjectManager.getCopyOfDataFilledDigitalObject(object);\n FileOutputStream out = new FileOutputStream(f);\n try {\n out.write(dataFilledObject.getData().getData());\n } finally {\n out.close();\n }\n dataFilledObject = null;\n } else {\n skip++;\n }\n object = null;\n }\n em.clear();\n System.gc();\n log.info(\"Finished writing bytestreams of digital objects. Skipped empty objects: \" + skip);\n }", "public static void writeObjectToFile(Serializable object, String fileName) throws IOException {\n try (FileOutputStream fos = new FileOutputStream(fileName);\n ObjectOutputStream oos = new ObjectOutputStream(fos);) {\n oos.writeObject(object);\n }\n }", "public static void saveObject(ISavable objectToSave){\r\n for (int i=0; i<objectToSave.write().size(); i++){\r\n System.out.println(\"Saving \" +objectToSave.write().get(i) + \" To storage device\");\r\n }\r\n }", "private static void storingTheObjectToDisk1(InputStream objectContent, String key) {\n FileOutputStream fos = null;\n BufferedOutputStream bos = null;\n byte[] buff = new byte[50*1024];\n int count;\n try {\n bos = new BufferedOutputStream(new FileOutputStream(\"/home/ubuntu/\" + key));\n while( (count = objectContent.read(buff)) != -1)\n {\n bos.write(buff, 0, count);\n }\n bos.close();\n objectContent.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void writeObject(ObjectOutputStream oos) throws IOException {\n oos.defaultWriteObject();\n /*if(serializeEverything) {\n //The cast to Serializable is necessary to avoid Sonar bug issues because List does not implement Serializable but all implementations of List (such as ArrayList) in effect implements Serializable\n //oos.writeObject((Serializable)cardPower);\n oos.writeObject((Serializable)weapons);\n oos.writeInt(points);\n }\n serializeEverything = false;*/\n }", "public <T> void serialize(T obj, Class<T> type, OutputStream os) throws SerializationException;", "private void writeObject(final ObjectOutputStream out) throws IOException\n\t{\n\t\t// Read the data\n\t\tif (dfos.isInMemory())\n\t\t{\n\t\t\tcachedContent = get();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcachedContent = null;\n\t\t\tdfosFile = dfos.getFile();\n\t\t}\n\n\t\t// write out values\n\t\tout.defaultWriteObject();\n\t}", "private void writeToFile(E entity){\n try (BufferedWriter bw = new BufferedWriter(new FileWriter(this.fileName,true))) {\n bw.write(entity.toFile());\n bw.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "public void saveObject(@NonNull final FileOutputStream fos) throws IOException {\n\t\tObjectOutputStream out = null;\n\t\t\n\t\ttry {\n\t\t\tout = new ObjectOutputStream(fos);\n\t\t\tout.writeObject(this);\n\t\t} finally {\n\t\t\tif(null != out)\n\t\t\t\tout.close();\n\n\t\t\tfos.close();\n\t\t}\n\t}", "private void serialize(String file_name) {\n\t\t//Saving of object in a file\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(file_name);\n\t\t\tObjectOutputStream out = new ObjectOutputStream(file);\n\t\t\t// Method for serialization of object\n\t\t\tout.writeObject(this.GA);\n\n\t\t\tout.close();\n\t\t\tfile.close();\n\n\t\t\tSystem.out.println(\"Object has benn serialized\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException is caught,Object didnt save.\");\n\t\t}\n\t}", "private void writeObject (java.io.ObjectOutputStream out) throws IOException {\n message(AX_PROGRESS,\"Serialize activeX control\");\n if (clientSite != AX_NO_CLIENT_SITE) {\n String componentFileName = generateComponentFileName(\"x0p\");\n message(AX_PROGRESS,componentFileName); \n OleThreadRequest saveRequest = new OleThreadRequest(SAVE,\n componentFileName);\n messagesWaiting.add(saveRequest);\n \n // busy wait - there must be a better way\n while (!saveRequest.finished) {\n synchronized(saveRequest) {\n try {\n saveRequest.wait(POLL_FOR_RESULT_HEARTBEAT);\n }\n catch (InterruptedException e) {\n\n }\n }\n } \n \n componentFileName = saveRequest.name;\n out.defaultWriteObject();\n if (componentFileName.equals(\"\")) {\n message(AX_PROGRESS,\n \"Cannot serialize activeX control, continuing anyway\");\n out.writeLong(0);\n } else {\n File f = new File(componentFileName);\n FileInputStream fi = new FileInputStream(f);\n long sofar = 0;\n int num = -1;\n int filelen = (int)f.length();\n out.writeLong(filelen);\n message(AX_PROGRESS, \"Writing the size of COM storage: \" + filelen);\n byte[] buffer = new byte[1024];\n\n /* The storage file could be many Megs so work in 1K chunks */\n do {\n num = fi.read(buffer,0,1024);\n if (num >= 0) {\n out.write(buffer,0,num);\n sofar += num;\n }\n }\n while (num == 1024);\n\n message(AX_PROGRESS, \"Read \" + sofar + \" bytes from a storage file\");\n\n fi.close();\n if (! f.delete())\n message(AX_ERROR,\"Failed to delete temporary file: \" + \n componentFileName);\n }\n }\n }", "private void actuallyWriteData() {\r\n\t\t// Get rid of old data. Getting rid of trips, trip patterns, and blocks\r\n\t\t// is a bit complicated. Need to delete them in proper order because\r\n\t\t// of the foreign keys. Because appear to need to use plain SQL\r\n\t\t// to do so successfully (without reading in objects and then\r\n\t\t// deleting them, which takes too much time and memory). Therefore\r\n\t\t// deleting of this data is done here before writing the data.\r\n\t\tlogger.info(\"Deleting old blocks and associated trips from database...\");\r\n\t\tBlock.deleteFromSandboxRev(session);\r\n\r\n\t\tlogger.info(\"Deleting old trips from database...\");\r\n\t\tTrip.deleteFromSandboxRev(session);\r\n\r\n\t\tlogger.info(\"Deleting old trip patterns from database...\");\r\n\t\tTripPattern.deleteFromSandboxRev(session);\r\n\t\t\r\n\t\t// Now write the data to the database.\r\n\t\t// First write the Blocks. This will also write the Trips, TripPatterns,\r\n\t\t// Paths, and TravelTimes since those all have been configured to be\r\n\t\t// cascade=CascadeType.ALL .\r\n\t\tlogger.info(\"Saving {} blocks (plus associated trips) to database...\", \r\n\t\t\t\tgtfsData.getBlocks().size());\r\n\t\tint c = 0;\r\n\t\tfor (Block block : gtfsData.getBlocks()) {\r\n\t\t\tlogger.debug(\"Saving block #{} with blockId={} serviceId={} blockId={}\",\r\n\t\t\t\t\t++c, block.getId(), block.getServiceId(), block.getId());\r\n\t\t\twriteObject(block);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving routes to database...\");\r\n\t\tRoute.deleteFromSandboxRev(session);\r\n\t\tfor (Route route : gtfsData.getRoutes()) {\r\n\t\t\twriteObject(route);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving stops to database...\");\r\n\t\tStop.deleteFromSandboxRev(session);\r\n\t\tfor (Stop stop : gtfsData.getStops()) {\r\n\t\t\twriteObject(stop);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving agencies to database...\");\r\n\t\tAgency.deleteFromSandboxRev(session);\r\n\t\tfor (Agency agency : gtfsData.getAgencies()) {\r\n\t\t\twriteObject(agency);\r\n\t\t}\r\n\r\n\t\tlogger.info(\"Saving calendars to database...\");\r\n\t\tCalendar.deleteFromSandboxRev(session);\r\n\t\tfor (Calendar calendar : gtfsData.getCalendars()) {\r\n\t\t\twriteObject(calendar);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving calendar dates to database...\");\r\n\t\tCalendarDate.deleteFromSandboxRev(session);\r\n\t\tfor (CalendarDate calendarDate : gtfsData.getCalendarDates()) {\r\n\t\t\twriteObject(calendarDate);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving fare rules to database...\");\r\n\t\tFareRule.deleteFromSandboxRev(session);\r\n\t\tfor (FareRule fareRule : gtfsData.getFareRules()) {\r\n\t\t\twriteObject(fareRule);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving fare attributes to database...\");\r\n\t\tFareAttribute.deleteFromSandboxRev(session);\r\n\t\tfor (FareAttribute fareAttribute : gtfsData.getFareAttributes()) {\r\n\t\t\twriteObject(fareAttribute);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving frequencies to database...\");\r\n\t\tFrequency.deleteFromSandboxRev(session);\r\n\t\tfor (Frequency frequency : gtfsData.getFrequencies()) {\r\n\t\t\twriteObject(frequency);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving transfers to database...\");\r\n\t\tTransfer.deleteFromSandboxRev(session);\r\n\t\tfor (Transfer transfer : gtfsData.getTransfers()) {\r\n\t\t\twriteObject(transfer);\r\n\t\t}\r\n\t}", "void saveAs() {\n writeFile.Export();\n }", "private void writeObject(\n ObjectOutputStream aOutputStream\n ) throws IOException {\n aOutputStream.defaultWriteObject();\n }", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public static void saveObjToFile(Object obj, String filePath) throws IOException {\n // create the enclosing folders if it doesn't exist\n createDir(filePath);\n\n FileOutputStream file = new FileOutputStream(filePath);\n ObjectOutputStream out = new ObjectOutputStream(file);\n out.writeObject(obj);\n out.close();\n }", "private void setFile(Serializable object, String path) throws Exception {\t\t\n\t\t\n FileOutputStream fileOut = new FileOutputStream(path);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(object);\n objectOut.close(); \n\t\t\n\t}", "public static void writeObject(Activity activity, Object object, String filename) {\n FileOutputStream fos = null;\n ObjectOutputStream oos = null;\n try {\n fos = activity.openFileOutput(filename, Context.MODE_PRIVATE);\n oos = new ObjectOutputStream(fos);\n oos.writeObject(object);\n } catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n closeOutputStream(fos);\n closeOutputStream(oos);\n }\n }", "private void writeObject(ObjectOutputStream out) throws IOException {\n out.defaultWriteObject();\n }", "public static void guardar()\n {\n File fileUsuario,fileDocente;\n ObjectOutputStream entradaUsuario,entradaDocente;\n \n fileDocente = new File(\"docentes\"); \n fileUsuario = new File(\"usuarios\");\n \n try \n {\n \n entradaDocente = new ObjectOutputStream(new FileOutputStream(fileDocente));\n entradaUsuario = new ObjectOutputStream(new FileOutputStream(fileUsuario));\n \n entradaDocente.writeObject(docentes);\n entradaUsuario.writeObject(usuarios);\n \n entradaDocente.close();\n entradaUsuario.close();\n } \n catch (Exception e) \n {\n e.printStackTrace();\n }\n }", "static void WriteEmployeeObjectIntoFile(Employee emp,String filename)\n\t{\n\t\t\n\t try\n\t {\n\t FileOutputStream fileOut =\n\t new FileOutputStream(filename);\n\t ObjectOutputStream out = new ObjectOutputStream(fileOut);\n\t //Main write method\n\t out.writeObject(emp);\n\t out.close();\n\t fileOut.close();\n\t System.out.printf(\"Serialized data is saved in \" + filename);\n\t }catch(IOException i)\n\t {\n\t i.printStackTrace();\n\t }\n\t}", "public void saveAsSerialization() {\n try(ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(new File(\"saves/data.dat\")))){\n os.writeObject(this);\n } catch (FileNotFoundException e){\n System.out.println(\"Could not create file: \" + e.getMessage());\n } catch (IOException e){\n System.out.println(\"IO exception occurred: \" + e.getMessage());\n }\n\n }", "private final void writeObject(ObjectOutputStream out) throws java.io.IOException {\n\t\tthrow new java.io.IOException(\"Object cannot be serialized\");\n\t}", "public void save(){\n try{\n Date date = new Date();\n \n PrintWriter writer = new PrintWriter(\"data.MBM\", \"UTF-8\");\n \n writer.println(\"version:\"+MBMDriver.version);\n writer.println(\"numworlds:\" + worlds.size());\n writer.println(\"lastclosed:\" + date.toString());\n writer.println(\"outDir:\"+outputDir.toPath());\n \n for(int i = 0; i < worlds.size(); i++){\n \n writer.println(\"MBMWORLD:\"+worlds.get(i).getWorldFile().getName()+\":\"+worlds.get(i).getName()+\":\"+worlds.get(i).getWorldFile().toPath()+\":\"+worlds.get(i).getLastBackupDate());\n }\n \n writer.close();\n }catch(FileNotFoundException e){\n System.out.println(\"ERROR: Failed to Find File\");\n }catch(UnsupportedEncodingException e){\n System.out.println(\"ERROR: Unsupported Encoding Exception\");\n }\n }", "public abstract void serialize(OutputStream stream, T object) throws IOException;", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "private void writeMapToFile() {\r\n\t\ttry {\r\n\t\t\tString dm = gson.toJson(daoMap);// gson.toJson(entity);\r\n\t\t\tFileWriter fileWriter = new FileWriter(path);\r\n\t\t\t\r\n\t\t\tfileWriter.write(dm);\r\n\t\t\tfileWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "void writeCustom(Object custom);", "private static void LessonSerialization() {\n PersonDAO personDAO = new PersonDAOImpl();\n Person person = personDAO.getPersonById(1);\n\n // serialize to a text file\n try {\n FileOutputStream fileOut = new FileOutputStream(\"./newfile.txt\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(person);\n out.close();\n fileOut.close();\n System.out.println(\"Person Object serialized and written to file: newfile.txt\");\n System.out.println(\"Serialized Object: \" + person.ToString());\n } catch(IOException ioEx) {\n System.out.println(ioEx);\n }\n }", "private boolean saveObjectToFile(String filename,Object object) {\n //engine.logMessage(\"Saving new cache data to: \"+filename);\n ObjectOutputStream outputStream = null;\n try { \n File file=new File(filename);\n File directory=file.getParentFile();\n if (directory==null) throw new IOException(\"Cache directory error\");\n synchronized(this) { // synchronize this because the mkdirs will return false if the directory has been created by another Thread in the meantime\n if (!directory.exists()) {\n if (!directory.mkdirs()) throw new IOException(\"Unable to create cache directory: \"+directory.getAbsolutePath());\n }\n }\n outputStream = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file)));\n outputStream.writeObject(object);\n outputStream.close(); \n } catch (Exception e) {\n engine.logMessage(\"WARNING: Unable to store data in cache: \"+e.getMessage());\n return false;\n } finally {\n try {if (outputStream!=null) outputStream.close();} catch (Exception x) {engine.logMessage(\"SYSTEM WARNING: Unable to close ObjectOutputStream in cache: \"+x.getMessage());}\n } \n return true; \n }", "Write createWrite();", "private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\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} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}", "public static void serialize(Object obj, String fileName) throws IOException {\n\t\tFileOutputStream fos = new FileOutputStream(fileName);\n\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\toos.writeObject(obj);\n\n\t\tfos.close();\n\t}", "public void saveGame() {\r\n\t\t//separator used by system\r\n\t\tString separator = System.getProperty(\"file.separator\");\r\n\t\t//path to where files will be saved\r\n\t\tString path = System.getProperty(\"user.dir\") + separator + \"src\" + separator + \"GameFiles\" + separator;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//Save the world objects\r\n\t\t\tString world_objects_name = EnvironmentVariables.getTitle() + \"WorldObjects\";\r\n\t\t\t//create a new file with name given by user with added text for identification\r\n\t\t\tFile world_objects_file = new File(path + world_objects_name + \".txt\");\r\n\t\t\tFileOutputStream f_world_objects = new FileOutputStream(world_objects_file);\r\n\t\t\tObjectOutputStream o_world_objects = new ObjectOutputStream(f_world_objects);\r\n\r\n\t\t\t//loop through list and write each object to file\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\t\to_world_objects.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_world_objects.flush();\r\n\t\t\to_world_objects.close();\r\n\t\t\tf_world_objects.flush();\r\n\t\t\tf_world_objects.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Save terrain is done the same ass world objects but we create a new file \r\n\t\t\t//with different added text\r\n\t\t\tString terrain_name = EnvironmentVariables.getTitle() + \"Terrain\";\r\n\t\t\tFile terrain_file = new File(path + terrain_name + \".txt\");\r\n\t\t\tFileOutputStream f_terrain = new FileOutputStream(terrain_file);\r\n\t\t\tObjectOutputStream o_terrain = new ObjectOutputStream(f_terrain);\r\n\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\t\to_terrain.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_terrain.flush();\r\n\t\t\to_terrain.close();\r\n\t\t\tf_terrain.flush();\r\n\t\t\tf_terrain.close();\r\n\t\t\t\r\n\t\t\t//Save main player, given own file but just a single object\r\n\t\t\tString main_player_name = EnvironmentVariables.getTitle() + \"MainPlayer\";\r\n\t\t\tFile main_player_file = new File(path + main_player_name + \".txt\");\r\n\t\t\tFileOutputStream f_main_player = new FileOutputStream(main_player_file);\r\n\t\t\tObjectOutputStream o_main_player = new ObjectOutputStream(f_main_player);\r\n\r\n\t\t\to_main_player.writeObject(EnvironmentVariables.getMainPlayer());\r\n\r\n\t\t\to_main_player.flush();\r\n\t\t\to_main_player.close();\r\n\t\t\tf_main_player.flush();\r\n\t\t\tf_main_player.close();\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t} \r\n\t\t\r\n\t\t//saving the environment variables\r\n\t\ttry {\r\n\t\t\tString env_name = EnvironmentVariables.getTitle() + \"EnvVariables\";\r\n\t\t\tFile env_file = new File(path + env_name + \".txt\");\r\n\t\t\t\r\n\t\t\tif(!env_file.exists()) {\r\n\t\t\t\tenv_file.createNewFile();\r\n\t\t }\r\n\t\t\t \r\n\t\t\t//FileWriter fw = new FileWriter(env_file);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(env_file));\r\n\t\t\t//write each variable to a new line as a string\r\n\t\t\tbw.write(EnvironmentVariables.getTitle()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getWidth())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getHeight())); bw.newLine();\r\n\t\t\tbw.write(EnvironmentVariables.getPlanet()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMass())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getRadius())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getAirDensity())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMeter())); bw.newLine();\r\n\r\n\t\t\t\r\n\t\t\t//bw.flush();\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t}catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t}\r\n\t\t\r\n\t\tEnvironmentVariables.getTerrain().clear();\r\n\t\tEnvironmentVariables.getWorldObjects().clear();\r\n\t}", "@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}", "public void writeUsers() {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"temp/users.ser\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(users);\n out.close();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public static void writeObject(Context context, String key, Object object) throws IOException {\n FileOutputStream fos = context.openFileOutput(key, Context.MODE_PRIVATE);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(object);\n oos.close();\n fos.close();\n }" ]
[ "0.7632874", "0.74707043", "0.744586", "0.7150272", "0.71467316", "0.7013641", "0.699752", "0.6990916", "0.6922481", "0.6896661", "0.688992", "0.68448174", "0.684217", "0.6842164", "0.67994326", "0.6777755", "0.6764031", "0.6718103", "0.6688675", "0.6684205", "0.66620564", "0.6655031", "0.6603546", "0.65903556", "0.6587561", "0.6570493", "0.65551126", "0.65441734", "0.6535065", "0.65308857", "0.6527382", "0.65153474", "0.6480743", "0.6480055", "0.6478977", "0.64783525", "0.64752513", "0.64595944", "0.64353794", "0.6428942", "0.64235127", "0.64176387", "0.64125603", "0.6403883", "0.6397675", "0.63764185", "0.6375716", "0.6372419", "0.6368949", "0.6362882", "0.63322985", "0.63233167", "0.63217175", "0.63074595", "0.63064337", "0.630544", "0.63052404", "0.63024175", "0.63008034", "0.6288153", "0.6288035", "0.6284224", "0.62728643", "0.62722266", "0.62678933", "0.62483454", "0.62429005", "0.624166", "0.623785", "0.6230101", "0.6225644", "0.6223455", "0.6222857", "0.6207695", "0.6205212", "0.61974216", "0.6191182", "0.6188904", "0.6184667", "0.618394", "0.61835885", "0.6179349", "0.6179201", "0.61746114", "0.61727923", "0.6170704", "0.6168214", "0.6157101", "0.61556625", "0.6140595", "0.61390287", "0.6130001", "0.61207825", "0.61185014", "0.611816", "0.61179", "0.61132574", "0.6111739", "0.61087424", "0.61004704" ]
0.7181541
3
Method to load objects which have been written to disk
public static Object objectLoader(String filename) throws IOException, ClassNotFoundException { // Creat file input stream FileInputStream fileInStr = new FileInputStream(filename); // Create object input steam ObjectInputStream objInStr = new ObjectInputStream(fileInStr); Object obj = (Object) objInStr.readObject(); // Closing all streams objInStr.close(); fileInStr.close(); System.out.printf("Deserialized data - " + filename); // Printing message plus file name that was saved return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void load(ObjectIterator<T> objects) {\n }", "public void load() ;", "public void load();", "public void load();", "public void load() {\n }", "public void load() {\n\t}", "@Override\n\tpublic Stream<Path> loadAll() {\n\t\treturn null;\n\t}", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "void load();", "void load();", "@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}", "@Override\n\tpublic void reloadNewObjects() throws IOException\n\t{\n\n\t}", "public static void load() {\n }", "private static void load(){\n }", "private void load(Object o) {\n \n }", "public abstract void load();", "private void loadMemory() {\n try {\n File varTmpDir = new File(\"data/\" + brainLocation + \".ser\");\n if (varTmpDir.exists()) {\n FileInputStream fileIn = new FileInputStream(varTmpDir);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n longTermMemory = (HashMap<String, BoardRecord>) in.readObject();\n in.close();\n fileIn.close();\n }\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"File not found\");\n c.printStackTrace();\n return;\n }\n\n System.out.println(\"RECALLED LONG TERM MEMORIES FROM \" + brainLocation + \": \" + longTermMemory.toString());\n }", "public void DesSerializar() throws FileNotFoundException {\n try {\n FileInputStream archivo = new FileInputStream(\"SerializacionEdificios\");\n ObjectInputStream entrada = new ObjectInputStream(archivo);\n ArrayList<Edificio> edificiosDes = (ArrayList<Edificio>) entrada.readObject();\n archivo = new FileInputStream(\"SerializacionEstudiantes\");\n entrada = new ObjectInputStream(archivo);\n ArrayList<Estudiante> estudiantesDes = (ArrayList<Estudiante>) entrada.readObject();\n archivo = new FileInputStream(\"SerializacionProfesores\");\n entrada = new ObjectInputStream(archivo);\n ArrayList<Profesor> profesoresDes = (ArrayList<Profesor>) entrada.readObject();\n archivo = new FileInputStream(\"SerializacionAdministradores\");\n entrada = new ObjectInputStream(archivo);\n ArrayList<Administrador> administradoresDes = (ArrayList<Administrador>) entrada.readObject();\n edificios = edificiosDes;\n estudiantes = estudiantesDes;\n profesores = profesoresDes;\n administradores = administradoresDes;\n entrada.close();\n }\n catch (IOException e){\n e.printStackTrace();\n }\n catch (ClassNotFoundException e){\n e.printStackTrace();\n }\n\n\n }", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "Object loadObject() throws Exception;", "public void loadSavedConfigsMap() {\n\t\tfinal File folder = new File(serializePath);\n\t\tlistFilesForFolder(folder);\n\t}", "public abstract void loaded();", "@Override\r\n\tpublic void load() {\n\t}", "public void load() {\r\n\t\t\r\n\t\t//-- Clean\r\n\t\tthis.repositories.clear();\r\n\t\t\r\n\t\tloadInternal();\r\n\t\tloadExternalRepositories();\r\n\t\t\r\n\t}", "void massiveModeLoading( File dataPath );", "@Override\n public void load() {\n }", "@Override\r\n\tpublic void load() {\n\r\n\t}", "public void load() throws ClassNotFoundException, IOException;", "public void load() {\n loadDisabledWorlds();\n chunks.clear();\n for (World world : ObsidianDestroyer.getInstance().getServer().getWorlds()) {\n for (Chunk chunk : world.getLoadedChunks()) {\n loadChunk(chunk);\n }\n }\n }", "private static void loadObjectRepository() {\n\n\t\ttry {\n\n\t\t\tObjectRepositoryReader reader = new ObjectRepositoryReader(GlobalContext.getAppDir(), Constants.FILENAME_OBJECT_REPO);\n\t\t\tMap<String, ObjectRepositoryRow> objectRepository = new HashMap<>();\n\t\t\twhile (reader.hasNextRow()) {\n\n\t\t\t\tObjectRepositoryRow row = (ObjectRepositoryRow) reader.nextRow();\n\t\t\t\tobjectRepository.put(row.getName(), row);\n\t\t\t}\n\n\t\t\t//sets to global context.\n\t\t\tGlobalContext.setObjectRepository(objectRepository);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract void load() throws IOException;", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "@Override\n public void load() {\n }", "public void load() {\n handleLoad(false, false);\n }", "@Override\n public void load() throws IOException, ClassNotFoundException {\n \n }", "public Serializable readObject(){\n Serializable loadedObject = null;\n try {\n FileInputStream fileIn = new FileInputStream(name);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n loadedObject = (Serializable) in.readObject();\n in.close();\n fileIn.close();\n System.out.println(\"Data loaded from: \"+ name);\n } \n catch (IOException i) {\n System.out.println(\"File not found.\");\n } \n catch (ClassNotFoundException c) {\n System.out.println(\"Class not found\");\n }\n return loadedObject;\n }", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "private void readSavedFile() {\n\n String[] files = new String[0];\n \n // On récupère la liste des fichiers\n File file = new File(folderName);\n\n // check if the specified pathname is directory first\n if(file.isDirectory()){\n //list all files on directory\n files = file.list();\n }\n\n if (files != null) {\n for(String currentFile : files) {\n Vehicule voiture;\n try {\n FileInputStream fileIn = new FileInputStream(folderName + \"/\" + currentFile);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n voiture = (Vehicule) in.readObject();\n addVoitureToList(voiture);\n in.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"#Erreur : Impossible de récupérer l'objet \" + currentFile);\n c.printStackTrace();\n return;\n }\n }\n }\n }", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "private Object loadObject(File dir) throws FileNotFoundException, IOException, ClassNotFoundException {\r\n FileInputStream fis = new FileInputStream(dir);\r\n ObjectInputStream ois = new ObjectInputStream(fis);\r\n Object tmp = ois.readObject();\r\n ois.close();\r\n return tmp;\r\n }", "public static void load() {\n load(false);\n }", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "public abstract List<T> readObj(String path);", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "void loadData() throws SerializerException;", "public void setInMemory(boolean load);", "protected abstract void loadData();", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "public List<T> getSavedObjects() {\n // Lazily generate the object, in case it's not needed.\n if (objects == null) {\n if (dbObjects.length > 0) {\n if (dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Saved object retrieval not supported when using stream serialization\");\n }\n }\n objects = jacksonDBCollection.convertFromDbObjects(dbObjects);\n }\n return objects;\n }", "public void loadObjData() {\n this.updateGeometryAndUVs(SquareCoords, UVCoords, DrawOrder);\n SquareCoords = new float[0];\n UVCoords = new float[0];\n DrawOrder = new int[0];\n }", "public void loaded(){\n\t\tloaded=true;\n\t}", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void readObject() {}", "private void readObject() {}", "private void readObject() {}", "public void load(){\n\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open Streams\n\t\t\tFileInputStream inFile = new FileInputStream(\"user.ser\");\n\t\t\tObjectInputStream objIn = new ObjectInputStream(inFile);\n\t\t\t\n\t\t\t// Load the existing UserList at the head\n\t\t\tthis.head = (User)objIn.readObject();\n\t\t\t\n\t\t\t// Close Streams\n\t\t\tobjIn.close();\n\t\t\tinFile.close();\n\t\t}\n\n\t\tcatch(Exception d) {\n\t\t System.out.println(\"Error loading\");\n\t\t}\n\n\t}", "private void writeBinaryObjects(List<Integer> objectIds, String aTempDir)\n throws IOException, StorageException {\n int counter = 0;\n int skip = 0;\n log.info(\"writing XMLs for bytestreams of digital objects. count = \" + objectIds.size());\n for (Integer id : objectIds) {\n if (counter > LOADED_DATA_SIZE_BOUNDARY) { // Call GC if unused data\n // exceeds boundary\n System.gc();\n counter = 0;\n }\n DigitalObject object = em.find(DigitalObject.class, id);\n if (object.isDataExistent()) {\n counter += object.getData().getSize();\n File f = new File(aTempDir + object.getId() + \".xml\");\n DigitalObject dataFilledObject = null;\n dataFilledObject = digitalObjectManager.getCopyOfDataFilledDigitalObject(object);\n writeBinaryData(id, new ByteArrayInputStream(dataFilledObject.getData().getData()), f);\n dataFilledObject = null;\n } else {\n skip++;\n }\n object = null;\n }\n em.clear();\n System.gc();\n log.info(\"Finished writing bytestreams of digital objects. Skipped empty objects: \" + skip);\n }", "public abstract void loadData();", "public abstract void loadData();", "private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException\n\t{\n\t\t// read values\n\t\tin.defaultReadObject();\n\n\t\tOutputStream output = getOutputStream();\n\t\tif (cachedContent != null)\n\t\t{\n\t\t\toutput.write(cachedContent);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFileInputStream input = new FileInputStream(dfosFile);\n\t\t\tStreams.copy(input, output);\n\t\t\tFiles.remove(dfosFile);\n\t\t\tdfosFile = null;\n\t\t}\n\t\toutput.close();\n\n\t\tcachedContent = null;\n\t}", "@Override\n public D loadInBackground() {\n mData = SerializeUtils.readSerializableObject(mContext, mFilename);\n return mData;\n }", "void loadAll() {\n\t\tsynchronized (this) {\n\t\t\tif (isFullyLoaded) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (Entry<Integer, Supplier<ChunkMeta<?>>> generator : ChunkMetaFactory.getInstance()\n\t\t\t\t\t.getEmptyChunkFunctions()) {\n\t\t\t\tChunkMeta<?> chunk = generator.getValue().get();\n\t\t\t\tchunk.setChunkCoord(this);\n\t\t\t\tchunk.setPluginID(generator.getKey());\n\t\t\t\ttry {\n\t\t\t\t\tchunk.populate();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// need to catch everything here, otherwise we block the main thread forever\n\t\t\t\t\t// once it tries to read this\n\t\t\t\t\tCivModCorePlugin.getInstance().getLogger().log(Level.SEVERE, \n\t\t\t\t\t\t\t\"Failed to load chunk data\", e);\n\t\t\t\t}\n\t\t\t\taddChunkMeta(chunk);\n\t\t\t}\n\t\t\tisFullyLoaded = true;\n\t\t\tthis.notifyAll();\n\t\t}\n\t}", "@Override\n\tpublic Object load(String path, Object defaultObject) throws Exception {\n\t\tfinal Object[] object = new Object[1];\n\t\t\n\t\t// Stream\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(path);\n\t\t\tfinal ObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\t// Load an object\n\t\t\tobject[0] = ois.readObject();\n\n\t\t\t// Close stream\n\t\t\tois.close();\n\t\t} catch (FileNotFoundException fileNotFoundException){\n\t\t\t// Assign default object when the file is not found.\n\t\t\tobject[0] = defaultObject;\n\t\t}\n\t\t\n\t\t// Return object\n\t\treturn object[0];\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Student> retrieveAllStudentObjects() {\r\n\t\tList<Student> listOfStudents = new ArrayList<Student>();\r\n\r\n\t\ttry {\r\n\t\t\tlistOfStudents = readSerializedObject();\r\n\r\n\t\t\tif (listOfStudents == null) {\r\n\t\t\t\tSystem.out.println(\"Unable to read from file!\");\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn listOfStudents;\r\n\t}", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "public void testSaverLoader_save_load()\n { \n TestObj obj = new TestObj();\n File file = new File(TEST_FILENAME);\n try {\n SaverLoader.save(file, obj);\n }\n catch(IOException e) {\n Debug.println(\"Error saving file: \" + e.getMessage());\n }\n assertTrue(obj.publics_unchanged());\n assertTrue(obj.privates_unchanged());\n obj.var1 = 23;\n obj.var2 = \"changed\";\n try {\n SaverLoader.save(file, obj);\n }\n catch(IOException e) {\n Debug.println(\"Error saving file: \" + e.getMessage());\n }\n TestObj obj2 = (TestObj)SaverLoader.load(file, new TypeToken<TestObj>(){}.getType());\n assertEquals(obj2.var1, 23);\n assertEquals(obj2.var2, \"changed\");\n assertFalse(obj2.publics_unchanged());\n assertTrue(obj2.privates_unchanged());\n file.delete();\n }", "private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }", "void reloadFromDiskSafe();", "public static void loadAllAdditionalCachedObjectList() {\n\n\t\t// TODO Completar cuando sea necesario.\n\n\t}", "void loadData();", "void loadData();", "private void readFromInternalStorage() {\n ArrayList<GeofenceObjects> returnlist = new ArrayList<>();\n if (!isExternalStorageReadable()) {\n System.out.println(\"not readable\");\n } else {\n returnlist = new ArrayList<>();\n try {\n FileInputStream fis = openFileInput(\"GeoFences\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n returnlist = (ArrayList<GeofenceObjects>) ois.readObject();\n ois.close();\n System.out.println(returnlist);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n currentList = returnlist;\n }", "protected void loadData()\n {\n }", "private <T> void loadFlatFile(Class<T> clazz, String flatFileName)\n\t\t\tthrows ApplicationException {\n\n\t\tlog.info(String.format(\"Loading file %s to object type %s\",\n\t\t\t\tflatFileName, clazz.toString()));\n\t\t\n\t\tDbInserter dbi = getDbInserter();\n\t\t\n\t\tFixedFormatManager manager = new FixedFormatManagerImpl();\n\t\tBufferedReader br = null;\n\t\tint count = 0;\n\t\ttry {\n\t\t\tInputStream ins = this.getClass().getClassLoader()\n\t\t\t\t\t.getResourceAsStream(flatFileName);\n\t\t\tbr = new BufferedReader(new InputStreamReader(ins));\n\t\t\tString record;\n\n\t\t\tlog.info(\"Reading, inserting records.\");\n\t\t\twhile (null != (record = br.readLine())) {\n\t\t\t\tDomain obj = (Domain) manager.load(clazz, record);\n\t\t\t\t//log.info(String.format(\"Record %s\", obj));\n\t\t\t\t//log.info(String.format(\"%s: key %d\", obj.getRecType(), obj.getDomainId()));\n\t\t\t\t\n\t\t\t\tdbi.insert(obj);\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tlog.info(String.format(\"Read %d records from object.\", count,\n\t\t\t\t\tclazz.toString()));\n\t\t\t\n\t\t\tdbi.flushToIndex();\n\n\t\t} catch (FixedFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (null != br) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.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\t\t}\n\t}", "public void loadCache() {\n if (!directory.exists()) {\n directory.mkdirs();\n }\n File[] files = this.directory.listFiles();\n if (files == null) {\n return;\n }\n for (File file : files) {\n if (file.getName().endsWith(\".json\")) {\n cache.put(file.getName().split(\".json\")[0], new JsonDocument(file));\n }\n }\n }", "protected void loadAll() {\n\t\ttry {\n\t\t\tloadGroups(this.folder, this.cls, this.cachedOnes);\n\t\t\t/*\n\t\t\t * we have to initialize the components\n\t\t\t */\n\t\t\tfor (Object obj : this.cachedOnes.values()) {\n\t\t\t\t((Component) obj).getReady();\n\t\t\t}\n\t\t\tTracer.trace(this.cachedOnes.size() + \" \" + this + \" loaded.\");\n\t\t} catch (Exception e) {\n\t\t\tthis.cachedOnes.clear();\n\t\t\tTracer.trace(\n\t\t\t\t\te,\n\t\t\t\t\tthis\n\t\t\t\t\t\t\t+ \" pre-loading failed. No component of this type is available till we successfully pre-load them again.\");\n\t\t}\n\t}", "protected abstract void loader() throws IOException;", "public void loadMaze(){\n try {\n byte savedMazeBytes[] = null;\n InputStream in = new MyDecompressorInputStream(new FileInputStream(\"savedMaze.maze\"));\n savedMazeBytes = new byte[1000012];\n in.read(savedMazeBytes);\n in.close();\n this.maze=new Maze(savedMazeBytes);\n isMazeGenerated=true;\n setChanged();\n notifyObservers();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public Object readObject() throws ClassNotFoundException, IOException;", "public void advanceObjectsCollection() {\r\n\t\twhile (this.in.readToTag()) {\r\n\t\t\tfinal Type type = this.in.getTag().getType();\r\n\t\t\tif ((type == Type.BEGIN)\r\n\t\t\t\t\t&& this.in.getTag().getName().equals(\r\n\t\t\t\t\t\t\tPersistReader.TAG_OBJECTS)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfinal String str = \"Can't find objects collection, invalid file.\";\r\n\t\tif (this.logger.isErrorEnabled()) {\r\n\t\t\tthis.logger.error(str);\r\n\t\t}\r\n\t\tthrow new PersistError(str);\r\n\r\n\t}", "private List<DiscoveredPrinter> load() {\n List<DiscoveredPrinter> printers = new ArrayList<>();\n if (!mCacheFile.exists()) {\n return printers;\n }\n\n try (JsonReader reader = new JsonReader(new BufferedReader(new FileReader(mCacheFile)))) {\n reader.beginObject();\n while (reader.hasNext()) {\n String itemName = reader.nextName();\n if (PRINTER_LIST_NAMES.contains(itemName)) {\n reader.beginArray();\n while (reader.hasNext()) {\n printers.add(new DiscoveredPrinter(reader));\n }\n reader.endArray();\n }\n }\n reader.endObject();\n } catch (IllegalStateException | IOException ignored) {\n Log.w(TAG, \"Error while loading from \" + mCacheFile, ignored);\n }\n if (DEBUG) Log.d(TAG, \"Loaded size=\" + printers.size() + \" from \" + mCacheFile);\n return printers;\n }", "private void loadSavedCourses() {\n courseList = new CourseList(new ArrayList<>());\n try {\n courseList = reader.readCourseList();\n } catch (IOException ioe) {\n System.err.println(\"Course File Missing\");\n } catch (JSONException je) {\n System.err.println(\"Empty File - Course\");\n System.out.println(je);\n }\n }", "private void loadGameFiles(){\n\t}", "public static void load() throws IOException {\n ClassPath classPath = ClassPath.from(ClassLoader.getSystemClassLoader());\n //System.out.println(\"Length:\"+classPath.getTopLevelClasses(\"util\").size());\n for (ClassPath.ClassInfo classInfo : classPath.getTopLevelClasses(\"util\")) {\n Scene.v().addBasicClass(classInfo.getName(), SootClass.BODIES);\n sootClasses.add(classInfo.getName());\n }\n }", "public void loadPersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tif (file.length() == 0) { // no persistent data to use\n\t\t\treturn;\n\t\t}\n\t\tdeserializeFile(file);\n\t\tloadPersistentSettings();\n\t}", "private void getObjects() {\n\t\tmeteors = go.getMeteors();\n\t\texplosions = go.getExplosions();\n\t\ttargets = go.getTargets();\n\t\tcrosses = go.getCrosses();\n\t\trockets = go.getRockets();\n\t\tearth = go.getEarth();\n\t}", "private static Object deserialize(String path) {\n Object e = null;\n try {\n discAccesses++;\n FileInputStream fileIn = new FileInputStream(path);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n e = in.readObject();\n in.close();\n fileIn.close();\n } catch (IOException | ClassNotFoundException i) {\n throw new Error(\"No serialized object for path \" + path);\n }\n return e;\n }", "public void loadAllUserData(){\n\n }", "public static void load(){\n StringBuilder maleNamesString = new StringBuilder();\n try (Scanner maleNamesFile = new Scanner(mnames)){\n while (maleNamesFile.hasNext()) {\n maleNamesString.append(maleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the fnames.json file\n StringBuilder femaleNamesString = new StringBuilder();\n try (Scanner femaleNamesFile = new Scanner(fnames)){\n while (femaleNamesFile.hasNext()) {\n femaleNamesString.append(femaleNamesFile.next());\n }\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the snames.json file\n StringBuilder surNamesString = new StringBuilder();\n try (Scanner surNamesFile = new Scanner(snames)){\n while (surNamesFile.hasNext()) {\n surNamesString.append(surNamesFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n //Create a string from the locations.json file\n StringBuilder locationsString = new StringBuilder();\n try (Scanner locationsFile = new Scanner(locationsJson)){\n while (locationsFile.hasNext()) {\n locationsString.append(locationsFile.next());\n }\n\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n return;\n }\n\n maleNames = (Names)convertJsonToObject(maleNamesString.toString(), new Names());\n\n femaleNames = (Names)convertJsonToObject(femaleNamesString.toString(), new Names());\n\n surNames = (Names)convertJsonToObject(surNamesString.toString(), new Names());\n\n locations = (Locations)convertJsonToObject(locationsString.toString(), new Locations());\n }", "public List<GameSceneSerializable> getGameSceneSerializables(String fileName){\n File directory = new File(fileName);\n File[] directoryListing = directory.listFiles();\n List<GameSceneSerializable> list = new ArrayList<>();\n if (directoryListing != null){\n for (File level : directoryListing){\n String path = level.getAbsolutePath();\n if (path.contains(DS_STORE)) {continue;}\n list.add(retrieveGameSceneSerializable(path));\n }\n }\n return list;\n }", "public void loadArchive() throws IOException {\n Archive archive = jsonReader.read();\n cameraCollection = archive.cameraCollection;\n filmCollection = archive.filmCollection;\n }", "public void load() throws FileNotFoundException, IOException, ClassNotFoundException, DBAppException {\n ArrayList<Tuple> data = new ArrayList<Tuple>();\n int pageIndex = myTable.getCurPageIndex();\n for (int i = 0; i <= pageIndex; i++) {\n // Student_0.class\n\n\n String name = dataPath + tableName + \"_\" + i + \".class\";\n\n ObjectInputStream ois = new ObjectInputStream(new FileInputStream(name));\n Page page = (Page) ois.readObject();\n ois.close();\n for (Tuple t : page.getTuples()) {\n int indexKeyPos = t.getIndex(indexkey);\n int primaryKeyPos = t.getIndex(primarykey);\n Object[] values = new Object[3];\n values[0] = t.get()[indexKeyPos];\n values[1] = t.get()[primaryKeyPos];\n values[2] = i;\n\n String[] types = new String[3];\n types[0] = t.getTypes()[indexKeyPos];\n types[1] = t.getTypes()[primaryKeyPos];\n types[2] = \"java.lang.integer\";\n\n String[] colName = new String[3];\n colName[0] = t.colName[indexKeyPos];\n colName[1] = t.colName[primaryKeyPos];\n colName[2] = \"page.number\";\n\n Tuple newTuple = new Tuple(values, types, colName, 0);\n\n data.add(newTuple);\n }\n }\n\n Collections.sort(data);\n if (data.isEmpty())\n return;\n Page curPage = createPage();\n for (int i = 0; i < data.size(); i++) {\n if (curPage.isFull()) {\n curPage.savePage();\n curPage = createPage();\n }\n curPage.insert(data.get(i), true);\n }\n curPage.savePage();\n }", "private void readObject() {\n }", "private void saveObjects() {\n\t\tgo.setMeteors(meteors);\n\t\tgo.setExplosions(explosions);\n\t\tgo.setTargets(targets);\n\t\tgo.setRockets(rockets);\n\t\tgo.setCrosses(crosses);\n\t\tgo.setEarth(earth);\n\t}", "public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}", "public void loadState() throws IOException, ClassNotFoundException {\n\t\tFile f = new File(workingDirectory() + File.separator + id() + FILE_EXTENSION);\n\t\t\n\t\t// load client state from file\n\t\tObjectInputStream is = new ObjectInputStream(new FileInputStream(f));\n\t\tTrackerDaemon client = (TrackerDaemon) is.readObject();\n\t\tis.close();\n\t\t\n\t\t// copy attributes\n\t\tthis.peerRecord = client.peerRecord();\n\t\t\n\t}" ]
[ "0.69891256", "0.6743343", "0.66889435", "0.66889435", "0.6668106", "0.6654485", "0.65441763", "0.6506531", "0.6444232", "0.6444232", "0.63901126", "0.6335202", "0.6323955", "0.63227993", "0.63148403", "0.6310798", "0.62847805", "0.62815064", "0.6250605", "0.62131804", "0.6213154", "0.6201145", "0.61875695", "0.61785436", "0.6125066", "0.6124535", "0.6117829", "0.6067404", "0.6065232", "0.6049158", "0.60486573", "0.60476303", "0.60136783", "0.60052544", "0.5991717", "0.599124", "0.5963765", "0.5941653", "0.5919342", "0.58923954", "0.589149", "0.58643603", "0.58643603", "0.58643603", "0.5839398", "0.58281124", "0.5820911", "0.58069676", "0.5792124", "0.5787433", "0.5787433", "0.57853603", "0.57845175", "0.57633936", "0.5759112", "0.57528764", "0.57412374", "0.57412374", "0.57412374", "0.57171875", "0.5703342", "0.57008", "0.57008", "0.56947374", "0.5693793", "0.56877166", "0.5679386", "0.56718946", "0.5671222", "0.5670752", "0.566735", "0.56648266", "0.5659792", "0.56482613", "0.56482613", "0.56475425", "0.5645909", "0.56458426", "0.5643309", "0.56345755", "0.56343293", "0.56311166", "0.56238455", "0.5591438", "0.55784655", "0.55732054", "0.5558968", "0.55546916", "0.55543226", "0.55471146", "0.55431736", "0.5541367", "0.55407363", "0.553885", "0.5537195", "0.5537113", "0.5533016", "0.55300957", "0.5518856", "0.5518242" ]
0.56506217
73
turns words into dashed words
public String dashGuess(String s, char guess) { StringBuilder r = new StringBuilder(s); //turn s to stringbuilder to change for (int i = 0; i < s.length(); i++) { //if (s.charAt(i) != guess) { if (!guessedLetters.contains(s.charAt(i))) { r.setCharAt(i, '-'); } } String v = r.toString(); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addHyphens() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"+-----\");\n\t\tSystem.out.println(\"+\");\n\t}", "public String buildWord() {\n\t\tStringBuilder word = new StringBuilder();\n\t\t\n\t\tfor(int i = 0; i < letters.size(); i++) {\n\t\t\tLetter tempLetter = letters.get(i);\n\t\t\t\n\t\t\tif(!(letters.get(i).getLetter() >= 'A' && letters.get(i).getLetter() <= 'Z') || tempLetter.getStatus())\n\t\t\t\tif(letters.get(i).getLetter() != ' ')\n\t\t\t\t\tword.append(tempLetter.getLetter());\n\t\t\t\telse\n\t\t\t\t\tword.append(\" \");\n\t\t\telse\n\t\t\t\tif (i == letters.size()-1) word.append(\"_\");\n\t\t\t\telse word.append(\"_ \");\n\t\t}\n\t\treturn word.toString();\n\t}", "private static String toStartCase(String words) {\n String[] tokens = words.split(\"\\\\s+\");\n StringBuilder builder = new StringBuilder();\n for (String token : tokens) {\n builder.append(capitaliseSingleWord(token)).append(\" \");\n }\n return builder.toString().stripTrailing();\n }", "public static void printWords (String [] word)\r\n {\r\n int lineCounter = 0;\r\n for(String each : word)\r\n {\r\n if(lineCounter % 5 == 0) \r\n {\r\n System.out.print(\"\\n\");\r\n }\r\n\r\n if(!each.equals(\"\"))\r\n {\r\n System.out.printf(\"%12.12s\", each);\r\n lineCounter++;\r\n } \r\n }\r\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 static String preProcessWordsSpecialCharacters(String line){\n\n\t\tStringBuilder newLine = new StringBuilder();\n\t\t//System.out.println(\"Preprocess words with special characaters ...\");\n\t\tList<String> newLineList = new ArrayList<String>();\n\t\tString eachWord;\n\t\tString[] hyphenWordArray;\n\t\t//replace all forward slash in the string with whitespace\n\t\t//line = line.replaceAll(\"[/|:|?|..|adverb|noun]\", \" \");\n\t\t//System.out.println(\"Line before modification: \"+ line);\n\t\tline = line.replaceAll(\"(\\\\?)|(\\\\()|(\\\\))|(\\\\,)|(\\\\.)|(\\\\!)|(\\\\/)|(\\\\:)|(\\\\?)|(\\\\')|(\\\\])|(\\\\[)\", \" \");\n\t\t//System.out.println(\"Line after first modification: \"+ line);\n\t\tline = line.replaceAll(\"\\\\s+\", \" \");\n\n\t\tnewLineList = Arrays.asList(line.split(\"\\\\s+\"));\n\t\tIterator<String> iter = newLineList.iterator();\n\n\t\twhile(iter.hasNext()){\n\t\t\teachWord = (String)iter.next();\n\t\t\tnewLine.append(\" \").append(eachWord);\n\t\t\tif(eachWord.contains(\"-\")){ //if the word contains a hyphen\n\t\t\t\t//System.out.println(\"Word containing hyphen: \"+ eachWord);\n\t\t\t\thyphenWordArray = eachWord.split(\"\\\\-\");\n\t\t\t\t//adding aaabbccc for aaa-bb-ccc \n\t\t\t\tnewLine.append(\" \").append(eachWord.replaceAll(\"\\\\-\", \"\"));\n\t\t\t\tfor(int i = 0; i < hyphenWordArray.length; i++ )\n\t\t\t\t\t//adding aaa, bb, cc for aaa-bb-ccc \n\t\t\t\t\tnewLine.append(\" \").append(hyphenWordArray[i]);\n\t\t\t}/*else{ //if the word does not contain hyphen, add it as it is\n\t\t\t\tnewLine.append(\" \").append(eachWord);\n\t\t\t}*/\n\t\t}\n\t\t//System.out.println(\"Line after modification: \"+ newLine.toString());\n\t\treturn newLine.toString();\n\t}", "private String pairsToWord(List<Pair> pairs){\n String result=\"\";\n for(Pair pair : pairs){\n result=result+pair.getLetter();\n }\n return result;\n }", "private final static String stripDash( String s ) {\n\n StringTokenizer tokDash = new StringTokenizer(s, \"-\");\n\n if (tokDash.countTokens() > 1) {\n return tokDash.nextToken();\n } else {\n return s;\n }\n\n }", "private static void printLatinWord(String s) {\n\t\tif (s.length() < 2|| !s.matches(\"\\\\w*\")) {\n\t\t\tSystem.out.print(s+\" \");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.print(s.replaceAll(\"(\\\\w)(\\\\w*)\", \"$2$1ay \"));\n\t}", "public String formatSpaceBetweenWords(String line) {\r\n line = line.replaceAll(\"\\\\s+\", \" \"); \r\n line = line.toLowerCase();\r\n line = oneSpaceSpecial(line, \".\");\r\n line = oneSpaceSpecial(line, \",\");\r\n line = oneSpaceSpecial(line, \":\");\r\n line = oneSpaceSpecial(line, \"\\\"\");\r\n return line.trim();\r\n }", "public String alternateWordSwap() {\n\t\tString output=\"\";\r\n\t\tString arr[]=this.str.split(\" \");\r\n\t\tfor(int i=0,j=1;i<arr.length;i+=2,j+=2){\r\n\t\t\tString temp=arr[i];\r\n\t\t\tarr[i]=arr[j];\r\n\t\t\tarr[j]=temp;\r\n\t\t}\r\n\t\t\r\n\t\tfor(String s:arr){\r\n\t\t\toutput+=s+\" \";\r\n\t\t}\r\n\t\treturn output.trim();\r\n\t}", "public String generateDashedResult()\n\t{\n\t\tString result = \"\";\n\n\t\tfor( int i = 0; i < this.prefixes.size(); i++ )\n\t\t{\n\t\t\tresult = result + \"\" + this.prefixes.get(i).getAffixBrackets();\n\t\t\tif( this.prefixes.get(i).getAffixBrackets() == \"\" ) {\n\t\t\t\tprintln(\"it's null bruh\");\n\t\t\t}\n\t\t}\n\n\t\tresult = result + \"[\" + rootWord + \"]\";\n\n\t\tfor( int i = 0; i < this.suffixes.size(); i++ )\n\t\t{\n\t\t\tresult = result + \"\" + this.suffixes.get(i).getAffixBrackets();\n\t\t}\n\n\t\tthis.bracketedResult = result;\n\t\treturn result;\n\t}", "public String toString() {\n return String.join(\" \", words);\n }", "private String createDashedLine(){\n return \"- \".repeat(Math.max(0, this.columns));\n }", "void addSpaces() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"| \");\n\t\tSystem.out.println(\"|\");\n\t}", "private Set<String> transpositionHelper(String word) {\n\t\tSet<String> transpositionWords = new HashSet<String>();\n\t\tfor (int i = 0; i < word.length() - 1; i++) {\n\t\t\ttranspositionWords.add(word.substring(0, i) + word.substring(i + 1, i + 2) + word.substring(i, i + 1)\n\t\t\t\t\t+ word.substring(i + 2));\n\t\t}\n\t\treturn transpositionWords;\n\t}", "SList oddWords();", "private String[] mixedWords(String[] words)\n {\n String[] output = new String[words.length];\n for(int i = 0; i < words.length; i++){\n if(i%2==0){\n output[i] = recombine(words[i], words[i+1]);\n } else {\n output[i] = recombine(words[i], words[i-1]);\n }\n }\n return output;\n }", "private static String zzty(String string2) {\n StringBuffer stringBuffer = new StringBuffer();\n int n = 0;\n while (n < string2.length()) {\n char c = string2.charAt(n);\n if (n == 0) {\n stringBuffer.append(Character.toLowerCase(c));\n } else if (Character.isUpperCase(c)) {\n stringBuffer.append('_').append(Character.toLowerCase(c));\n } else {\n stringBuffer.append(c);\n }\n ++n;\n }\n return stringBuffer.toString();\n }", "private char[] hideTheWord(int x){\r\n char[] c = new char[x];\r\n for (int i = 0; i < x; i++){\r\n c[i]= '_';\r\n }\r\n return c;\r\n }", "private void print0(String word, int height) {\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = 0; j < (i + 1); j++) {\n\t\t\t\tta.append(word);\n\t\t\t}\n\t\t\tta.append(\"\\r\\n\");\n\t\t}\n\t}", "public String toString(){\n String r = \"\";\n for(String cs : words){\n r += cs + \" \"; \n }\n r = r.substring(0, r.length()-1);\n return r;\n }", "public static void regroupLettersByWords(Line line, final double spacing) {\n List<Word> words = new ArrayList<>();\n List<ShapeModel> letters = line.getLetters();\n Word current = new Word();\n double currentSpacing;\n for (int i = 0; i < letters.size(); i++) {\n if (i == 0) {\n current.addLetter(letters.get(i));\n words.add(current);\n } else {\n currentSpacing = getSpacingBetweenLetters(letters.get(i - 1), letters.get(i));\n if (currentSpacing <= spacing) {\n current.addLetter(letters.get(i));\n } else {\n current = new Word(letters.get(i));\n words.add(current);\n }\n }\n }\n line.setWords(words);\n }", "public String spinWords(String sentence) {\n List<String> wordList = new ArrayList<>();\n String word = \"\";\n for (String s : sentence.split(\" \")) {\n word = s.length() > 4 ? new StringBuilder(s).reverse().toString() : s;\n wordList.add(word);\n }\n return String.join(\" \", wordList);\n }", "private String fixWordStarts(final String line) {\n final String[] parts = line.split(\" \");\n\n final StringBuilder lineBuilder = new StringBuilder();\n\n for (int i = 0; i < parts.length; i++) {\n String part = parts[i];\n\n // I prefer a space between a - and the word, when the word starts with a dash\n if (part.matches(\"-[0-9a-zA-Z']+\")) {\n final String word = part.substring(1);\n part = \"- \" + word;\n }\n\n // yes this can be done in 1 if, no I'm not doing it\n if (startsWithAny(part, \"lb\", \"lc\", \"ld\", \"lf\", \"lg\", \"lh\", \"lj\", \"lk\", \"ll\", \"lm\", \"ln\", \"lp\", \"lq\", \"lr\",\n \"ls\", \"lt\", \"lv\", \"lw\", \"lx\", \"lz\")) {\n // some words are incorrectly fixed (llama for instance, and some Spanish stuff)\n if (startsWithAny(part, \"ll\") && isOnIgnoreList(part)) {\n lineBuilder.append(part);\n } else {\n // I starting a word\n part = part.replaceFirst(\"l\", \"I\");\n lineBuilder.append(part);\n }\n } else if (\"l.\".equals(part)) {\n // I at the end of a sentence.\n lineBuilder.append(\"I.\");\n } else if (\"l,\".equals(part)) {\n // I, just before a comma\n lineBuilder.append(\"I,\");\n } else if (\"l?\".equals(part)) {\n // I? Wut? Me? Moi?\n lineBuilder.append(\"I?\");\n } else if (\"l!\".equals(part)) {\n // I! 't-was me!\n lineBuilder.append(\"I!\");\n } else if (\"l..\".equals(part)) {\n // I.. think?\n lineBuilder.append(\"I..\");\n } else if (\"l...\".equals(part)) {\n // I... like dots.\n lineBuilder.append(\"I...\");\n } else if (\"i\".equals(part)) {\n // i suck at spelling.\n lineBuilder.append(\"I\");\n } else if (part.startsWith(\"i'\")) {\n // i also suck at spelling.\n part = part.replaceFirst(\"i\", \"I\");\n lineBuilder.append(part);\n } else {\n // nothing special to do\n lineBuilder.append(part);\n }\n\n // add trailing space if it is not the last part\n if (i != parts.length - 1) {\n lineBuilder.append(\" \");\n }\n }\n\n return lineBuilder.toString();\n }", "public String propergram(String word){\n // word.toLowerCase();\n String[] tempstr =word.split(\"_\");\n String tempstr2;\n\n for(int i=0;i<tempstr.length;i++){\n if((tempstr[i].charAt(0))>='A'&&(tempstr[i].charAt(0))<='Z') {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0)));\n }\n else {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0))).toUpperCase();\n }\n tempstr[i] = tempstr2.concat(tempstr[i].substring(1));\n if (i != 0) {\n word=word.concat(\" \").concat(tempstr[i]);\n } else {\n word = tempstr[i];\n }\n\n }\n return word;\n\n\n }", "public static void preProcessWordsSpecialCharacters(String line, StringBuilder newLine){\n\n\t\t//System.out.println(\"Preprocess words with special characaters ...\");\n\t\tList<String> newLineList = new ArrayList<String>();\n\t\tString eachWord;\n\t\tString[] hyphenWordArray;\n\t\t//replace all forward slash in the string with whitespace\n\t\t//line = line.replaceAll(\"[/|:|?|..|adverb|noun]\", \" \");\n\t\t//System.out.println(\"Line before modification: \"+ line);\n\t\tline = line.replaceAll(\"(\\\\?)|(\\\\()|(\\\\))|(\\\\,)|(\\\\.)|(\\\\!)|(\\\\/)|(\\\\:)|(\\\\?)|(\\\\')|(\\\\])|(\\\\[)\", \" \");\n\t\t//System.out.println(\"Line after first modification: \"+ line);\n\t\tline = line.replaceAll(\"\\\\s+\", \" \");\n\n\t\tnewLineList = Arrays.asList(line.split(\"\\\\s+\"));\n\t\tIterator<String> iter = newLineList.iterator();\n\n\t\t//replace the hyphen words like aaa-bb-ccc with aaabbccc, aaa, bb, cc\n\t\twhile(iter.hasNext()){\n\t\t\teachWord = (String)iter.next();\n\t\t\tnewLine.append(\" \").append(eachWord);\n\t\t\tif(eachWord.contains(\"-\")){ //if the word contains a hyphen\n\t\t\t\t//System.out.println(\"Word containing hyphen: \"+ eachWord);\n\t\t\t\thyphenWordArray = eachWord.split(\"\\\\-\");\n\t\t\t\t//adding aaabbccc for aaa-bb-ccc \n\t\t\t\tnewLine.append(\" \").append(eachWord.replaceAll(\"\\\\-\", \"\"));\n\t\t\t\tfor(int i = 0; i < hyphenWordArray.length; i++ )\n\t\t\t\t\t//adding aaa, bb, cc for aaa-bb-ccc \n\t\t\t\t\tnewLine.append(\" \").append(hyphenWordArray[i]);\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"Line after modification: \"+ newLine.toString());\n\t}", "private void print3(String word, int height) {\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tta.append(spece);\n\t\t\t}\n\t\t\tfor (int j = height - i; j > 0; j--) {\n\t\t\t\tta.append(word);\n\t\t\t}\n\t\t\tta.append(\"\\r\\n\");\n\t\t}\n\t}", "private void print1(String word, int height) {\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = height - i; j > 0; j--) {\n\t\t\t\tta.append(word);\n\t\t\t}\n\t\t\tta.append(\"\\r\\n\");\n\t\t}\n\t}", "private void print2(String word, int height) {\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = height - i; j > 0; j--) {\n\t\t\t\tta.append(spece);\n\t\t\t}\n\t\t\tfor (int j = 0; j < (i + 1); j++) {\n\t\t\t\tta.append(word);\n\t\t\t}\n\t\t\tta.append(\"\\r\\n\");\n\t\t}\n\t}", "public static void main(String[] args) {\n String s = \"applepenapple\";\n List<String> wordDict = new ArrayList<>();\n wordDict.add(\"apple\");\n wordDict.add(\"pen\");\n// String s = \"catsandog\";\n// List<String> wordDict = new ArrayList<>();\n// wordDict.add(\"cats\");\n// wordDict.add(\"dog\");\n// wordDict.add(\"sand\");\n// wordDict.add(\"cat\");\n\n System.out.println(wordBreak2(s, wordDict));\n }", "public static String newWord(String strw) {\n String value = \"Encyclopedia\";\n for (int i = 1; i < value.length(); i++) {\n char letter = 1;\n if (i % 2 != 0) {\n letter = value.charAt(i);\n }\n System.out.print(letter);\n }\n return value;\n }", "private String getConvertedWord(String word) {\r\n\t\tString newWord = \"\";\r\n\t\tif(word == null || word.length() == 0)\r\n\t\t\tnewWord = \"\";\r\n\t\telse if(word.length() < 3)\r\n\t\t\tnewWord = word;\r\n\t\telse \r\n\t\t\tnewWord = \"\"+word.charAt(0) + (word.length() - 2) + word.charAt(word.length() - 1);\r\n\t\t\t\r\n\t\tif(DEBUG)\r\n\t\t\tSystem.out.printf(\"Converted %s to %s\\n\", word, newWord);\r\n\t\treturn newWord;\r\n\r\n\t}", "private void generate()\n {\n for (int i = 0; i < this.syllables; i++) {\n Word word = getNextWord();\n this.text += word.getWord();\n if (i < this.syllables - 1) {\n this.text += \" \";\n }\n }\n }", "private static void printHangman() {\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tif (guessesResult[i]) {\n\t\t\t\tSystem.out.print(word.charAt(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" _ \");\n\t\t\t}\n\t\t}\n\t}", "private void print4(String word, int height) {\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = height - i; j > 0; j--) {\n\t\t\t\tta.append(spece);\n\t\t\t}\n\t\t\tfor (int j = 0; j < (i + 1) * 2 - 1; j++) {\n\t\t\t\tta.append(word);\n\t\t\t}\n\t\t\tta.append(\"\\r\\n\");\n\t\t}\n\t}", "private static String formNewLineWithSpaces(String words[], int startIndex, int endIndex, int amountOfSpaces) {\n int numWordsCurrLine = endIndex - startIndex + 1;\n StringBuilder line = new StringBuilder();\n\n for (int i = startIndex; i < endIndex; ++i) {\n line.append(words[i]);\n --numWordsCurrLine ;\n int numCurrSpace = (int) Math.ceil((double)amountOfSpaces / numWordsCurrLine);\n\n for (int j = 0; j < numCurrSpace; j++) {\n line.append(\" \");\n }\n\n amountOfSpaces -= numCurrSpace;\n }\n\n line.append(words[endIndex]);\n for (int i = 0; i < amountOfSpaces; i++) line.append(\" \");\n\n return line.toString();\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 }", "void writeWord(String word) throws IOException {\n if (word.isEmpty()) {\n if (!wordScanner.hasNext()) {\n output.append(\"\\n\");\n }\n return;\n }\n output.append(word);\n if (wordScanner.hasNext()) {\n output.append(\" \");\n } else {\n output.append(\"\\n\");\n }\n }", "private void wordBreakRecur(String word, String result) {\n\t\tint size = word.length();\n\n\t\tfor (int i = 1; i <= size; i++) {\n\t\t\tString prefix = word.substring(0, i);\n\n\t\t\tif (dictionaryContains(prefix)) {\n\t\t\t\tif (i == size) {\n\t\t\t\t\tresult += prefix;\n\t\t\t\t\tSystem.out.println(result);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\twordBreakRecur(word.substring(i), result + prefix + \" \");\n\t\t\t}\n\t\t}\n\t}", "public void showAllWords() {//out\n System.out.println(\"No\\t|English\\t|Vietnamese\");\n ArrayList<Word> fullDictionary = dictionaryManagement.getDictionary().getWords();\n for (int i = 0; i < fullDictionary.size(); i++) {\n String aWord = String.valueOf(i + 1) + \"\\t|\" + fullDictionary.get(i).getWordTarget()\n + \"\\t|\" + fullDictionary.get(i).getWordExplain();\n System.out.println(aWord);\n }\n }", "public String normalize(String word);", "public String blackText(String word) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString colorWord = sb.append(ConsoleColour.BLACK).append(word).append(ConsoleColour.RESET).toString();\n\t\treturn colorWord;\n\t}", "public String wordListToSimpleString(List<Word> words) {\n StringBuilder stringBuilder = new StringBuilder();\n for (Word w : words) {\n //do not include things that the tokenizer eats anyway\n if (!tokenisationDelimiters.contains(w.getWord()) && !tokenisationDelimitersPOSTags.contains(w.getPosTag())) {\n stringBuilder.append(w.getWord().replaceAll(\" \", \"_\").replaceAll(tokenisationDelimitersRegex, \"\"));\n stringBuilder.append(\"_\");\n stringBuilder.append(w.getPosTag());\n stringBuilder.append(\" \");\n }\n }\n return stringBuilder.toString();\n }", "public String hiddenWord() {\n int hiddenWordUnderscores = 0;\n String hiddenWord = \"\";\n StringBuilder newHiddenWord = new StringBuilder(\"\");\n \n for (int i = 0; i < this.word.length(); i++) {\n hiddenWord += \"_\";\n newHiddenWord.append(\"_\");\n }\n \n // GO THROUGH EACH CHARACTER IN THIS.WORD AND SEE IF IT MATCHES THE GUESS. \n // IF IT DOES, REPLACE THE UNDERSCORE AT THAT INDEX WITH THE GUESSED LETTER.\n for (int i = 0; i < this.word.length(); i++) {\n char currentChar = this.word.charAt(i);\n String currentLetter = \"\" + currentChar;\n \n // IF THE CURRENT LETTER IS IN THE WORD\n if (this.guessedLetters.contains(currentLetter)) {\n // GET THE CURRENT UNDERSCORE OF THE INDEX WE ARE IN, SET IT TO currentChar\n newHiddenWord.setCharAt(i, currentChar);\n }\n } \n hiddenWord = newHiddenWord.toString();\n\n return hiddenWord;\n \n }", "@Override\n\tpublic String toString() {\n\t\t// create the String to return\n\t\tString str = new String();\n\t\t// get the mask\n\t\tboolean[] mask = this.getMask();\n\t\t// the new char of the string\n\t\tchar oneChar;\n\t\t// for each character in the word\n\t\tfor (int i = 0; i < this.getLength(); i++) {\n\t\t\t// if it is masked, set the new char as \"_\"\n\t\t\tif (mask[i] == true) {\n\t\t\t\toneChar = '_';\n\t\t\t\t// if it is unmasked, set the new char as the true character\n\t\t\t}else {\n\t\t\t\toneChar = this.theWord[i];\n\t\t\t}\n\t\t\t// add the new char to the string\n\t\t\tstr += \" \" + oneChar;\n\t\t}\n\t\t// return the string\n\t\treturn str;\n\t}", "public static String formatSpaces(String s) {\n \tString temp = s;\n \tif(s.contains(\"underscores\")) temp = s.replace(\" \", \"_\");\n return temp;\n }", "static void afficherLigneSep(int taille) {\n System.out.print(\" \");\n for (int i = 0; i < taille - 1; i++) {\n System.out.print(\"---+\");\n }\n System.out.println(\"---\");\n }", "public static String formatSpaces(String s) {\n\t\t\n\t\tif(s.contains(\"underscores\")==true) {\n\t\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\t\tif(s.charAt(i)==' ') {\n\t\t\t\t\tString t1=s.substring(0, i);\n\t\t\t\t\tString t2=s.substring(i+1, s.length());\n\t\t\ts=t1+\"_\"+t2;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\treturn s;\n\t}", "public String makeOutWord(String out, String word) {\r\n String outFrontPart = out.substring(0, 2);\r\n String outRightPart = out.substring(2, 4);\r\n\r\n return outFrontPart + word + outRightPart;\r\n }", "public void printStars()\n\t{\n\t\tfor( int i = 0; i < mysteryWord.length() ; i++)\n\t\t{\n\t\t\tif (mysteryWord.charAt(i) == ' ')\n\t\t\t{\n\t\t\t\t\n\t\t\t\twordState+=' ';\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twordState+=\"*\"; \n\t\t\t}\n\t\t}\n\t\twordDashes.setText(wordState);\n\t}", "public void printWord(){\n\t\tint length = word.length;\n\t\tfor(int i = 0; i < length; i++){\n\t\t\tSystem.out.print(word[i]);\n\t\t}\n\t}", "public static String assemblePhrase(String[] words) {\n String result = \"\";\n for( String str : words )\n\t\t\tresult = result + str + \" \";\n\t\tresult = result.trim();\n\t\treturn result;\n }", "@Test\n\tpublic void revStrSentances() {\n\n\t\tString s = \"i like this program very much\";\n\t\tString[] words = s.split(\" \");\n\t\tString revStr = \"\";\n\t\tfor (int i = words.length - 1; i >= 0; i--) {\n\t\t\trevStr += words[i] + \" \";\n\n\t\t}\n\n\t\tSystem.out.println(revStr);\n\n\t}", "public void repopulateWords()\r\n {\n blankSquares();\r\n\r\n //repopulate words\r\n ArrayList al = crossword.getWords();\r\n for (int i = 0; i < al.size(); i++)\r\n {\r\n Word w = (Word) al.get(i);\r\n ArrayList letters = w.getLetters();\r\n\r\n // Lay out the squares, letter by letter, setting the appropriate properties\r\n if (w.getWordDirection() == Word.ACROSS)\r\n {\r\n for (int j = 0; j < letters.size(); j++)\r\n {\r\n Square s = findSquare(w.getY(), w.getX() + j);\r\n if (s.getLetter() == \" \" || s.getLetter() == \"*\" ||\r\n s.getLetter() == \"\")\r\n {\r\n String let = (String) letters.get(j);\r\n if (let == \"*\")\r\n {\r\n let = \" \";\r\n }\r\n s.setLetter(let);\r\n }\r\n\r\n s.setBackground(Color.WHITE);\r\n s.setBorder(BorderFactory.createLineBorder(Color.BLACK,\r\n 1));\r\n\r\n if (s.isAnyWordSelected())\r\n {\r\n s.setBackground(Color.PINK);\r\n s.setResetColour(Color.PINK);\r\n }\r\n //place the clue number\r\n if (j == 0) //ie. first square of word\r\n {\r\n s.setClueNumber(w.getClueIndex());\r\n }\r\n if (s == selectedSquare)\r\n {\r\n s.setBackground(Color.RED);\r\n s.setResetColour(Color.RED);\r\n }\r\n\r\n }\r\n }\r\n else if (w.getWordDirection() == Word.DOWN)\r\n {\r\n\r\n for (int j = 0; j < letters.size(); j++)\r\n {\r\n Square s = findSquare(w.getY() + j, w.getX());\r\n if (s.getLetter() == \" \" || s.getLetter() == \"*\" ||\r\n s.getLetter() == \"\")\r\n {\r\n String let = (String) letters.get(j);\r\n\r\n if (let == \"*\")\r\n {\r\n let = \" \";\r\n }\r\n s.setLetter(let);\r\n }\r\n s.setBackground(Color.WHITE);\r\n s.setBorder(BorderFactory.createLineBorder(Color.BLACK,\r\n 1));\r\n\r\n if (s.isAnyWordSelected())\r\n {\r\n s.setBackground(Color.PINK);\r\n s.setResetColour(Color.PINK);\r\n }\r\n\r\n //place the clue number\r\n if (j == 0) //ie. first square of word\r\n {\r\n s.setClueNumber(w.getClueIndex());\r\n }\r\n if (s == selectedSquare)\r\n {\r\n s.setBackground(Color.RED);\r\n s.setResetColour(Color.RED);\r\n }\r\n }\r\n }\r\n }\r\n //dissociate any blank squares from legacy word relationships\r\n dissociateSquares();\r\n validate();\r\n }", "public boolean compareWords(String word1, String word2) {\n for (int i = 1; i < 5; i++) {\n if (word2.indexOf(word1.charAt(i)) >= 0) {\n word2.replace(word1.charAt(i), ' ');\n } else\n return false;\n }\n\n return true;\n }", "public String words(String sentence) {\n String[] stringSentence = sentence.trim().split(\" \");\n for (int i = 0; i < stringSentence.length; i++) {\n if (stringSentence[i].length() >= LENGTH) {\n stringSentence[i] = new StringBuilder(stringSentence[i]).reverse().toString();\n }\n }\n return String.join(\" \", stringSentence);\n }", "public String titlelize(String toTitlelize) {\r\n if (toTitlelize == null) {\r\n throw new IllegalArgumentException();\r\n }\r\n StringBuilder resultString = new StringBuilder();\r\n List<String> wordList = Arrays.asList(toTitlelize.split(\"\\\\s\"));\r\n\r\n\r\n for (String word : wordList) {\r\n if (!ignoreList.contains(word)) {\r\n resultString.append(WordUtils.capitalizeFully(word));\r\n resultString.append(\" \");\r\n\r\n\r\n } else {\r\n resultString.append(word);\r\n resultString.append(\" \");\r\n }\r\n\r\n\r\n }\r\n resultString.deleteCharAt(resultString.length() - 1);\r\n return resultString.toString();\r\n }", "private String processWord(String word){\r\n\t\tString lword = word.toLowerCase();\r\n\t\tfor (int i = 0;i<word.length();++i){\r\n\t\t\tstemmer.add(lword.charAt(i));\r\n\t\t}\r\n\t\tstemmer.stem();\r\n\t\treturn stemmer.toString();\r\n\t}", "private static void displayWords(char[][] words, int size)\n {\n System.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~Words List~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n for(int i=0; i < size; i++) // As a whole this cycle repeats 'size' times\n {\n for(int j=0; j < size ; j++){ // Print out each elements in 2D arrays [0][0],[0][1],[0][2]...,[1][0],[1][1],[1][2],\n System.out.printf(\"%c \",words[i][j]);\n }//for j\n System.out.println();\n }//for i\n System.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n }", "private List<String> whitespaceSuggestions(String givenWord) {\n List<String> whitespaceWords = new ArrayList<>();\n for (int i = 1; i < givenWord.length() - 1; i++) {\n if (corpus.contains(givenWord.substring(0, i) + \" \"\n + givenWord.substring(i))) {\n whitespaceWords.add(givenWord.substring(0, i) + \" \"\n + givenWord.substring(i));\n } else if (corpus.contains(givenWord.substring(0, i))) {\n whitespaceWords.add(givenWord.substring(0, i));\n } else if (corpus.contains(givenWord.substring(i))) {\n whitespaceWords.add(givenWord.substring(i));\n }\n\n if (shortenings.contains(givenWord.substring(0, i))) {\n String fullWord = courseMappings.get(givenWord.substring(0, i));\n if (!givenWord.contains(fullWord)) {\n whitespaceWords.add(fullWord + \" \" + givenWord.substring(i));\n }\n\n }\n\n }\n\n return whitespaceWords;\n }", "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 }", "static public String straighten_weft2(String redundant) {\n String screened = re_screen(redundant);\n String rex = screened.replaceAll(\"(\\\\\\\\.|.)(\\\\\\\\.|.)\", \"$1[^$2-\\uffff]|\");\n //System.err.println(\"rex: \"+rex);\n String brief = redundant.replaceAll(\"(\" + rex + \"\\0.)|(..)\", \"$2\");\n return brief;\n }", "public static String formatSpaces(String s) {\n\t\tif(s.contains(\"underscores\"))\n\t\treturn s.replaceAll(\" \", \"_\");\n\t\t\n\t\treturn s;\n\t}", "public List<String> splitWordList(final String text) {\n\t\tList<String> result = new ArrayList<>();\n\t\tif (text == null)\n\t\t\treturn result;\n\n\t\tString t = text + \"⁋\";\n\t\tt = t.replace('\\n', '⁋');\n\t\tt = REFERENCE_PATTERN.matcher(t).replaceAll(\"\");\n\t\tt = SUPERSCRIPT_PATTERN.matcher(t).replaceAll(\"\"); //TODO: Extract sense!\n\t\tt = HTML_REMOVER.matcher(t).replaceAll(\"\");\n\t\tt = t.replace(\"&quot;\", \"\\\"\");\n\t\tt = t.replace(\",\", \"⁋,\");\n\t\tt = t.replace(\";\", \"⁋;\");\n\t\t//System.out.println(t);\n\t\t//t = BRACKETED_DELIMITER.matcher(t).replaceAll(\"$1$2$3$4$5$6\");\n\t\t//t = ESCAPE_DELIMITER1.matcher(t).replaceAll(\"$1$2\");\n\t\t//t = ESCAPE_DELIMITER2.matcher(t).replaceAll(\"$1$2\");\n\t\t//t = ESCAPE_DELIMITER3.matcher(t).replaceAll(\"$1$2\");\n\t\tt = escapeDelimiters(t);\t\t\t\n\t\t//System.out.println(t);\n\t\tt = t.replace(\"⁋;\", \"⁋\");\n\t\tt = t.replace(\"⁋,\", \"⁋\");\n\t\tt = t.replace(\"]] or [[\", \"]]⁋[[\");\n\t\tt = t.replace(\"]] and [[\", \"]]⁋[[\");\n\t\tt = t.replace(\" - \", \"⁋\");\n\t\t//t = t.replace(\" / \", \"⁋\");\n\t\tint j = t.indexOf(\" / \"); // Use ' / ' only as a delimiter if there are at least two of them!\n\t\tif (j >= 0) {\n\t\t\tj = t.indexOf(\" / \", j);\n\t\t\tif (j >= 0) {\n\t\t\t\tt = t.replace(\" / \", \"⁋\");\n\t\t\t\t//System.out.println(t);\n\t\t\t}\n\t\t}\n\t\t//System.out.println(t);\n\t\tint delim;\n\t\tdo {\n\t\t\tdelim = t.indexOf('⁋');\n\t\t\tif (delim >= 0) {\n\t\t\t\tString word = t.substring(0, delim);\n\t\t\t\tif (word.length() > 0) {\n\t\t\t\t\t// Normalize the word.\n\t\t\t\t\tword = word.trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see also\"))\n\t\t\t\t\t\tword = word.substring(8).trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see\"))\n\t\t\t\t\t\tword = word.substring(3).trim();\n\t\t\t\t\tif (word.startsWith(\":\"))\n\t\t\t\t\t\tword = word.substring(1).trim();\n\t\t\t\t\tword = deWikify(word).trim();\n\t\t\t\t\tword = removeBrackets(word).trim();\n\t\t\t\t\tword = removeTemplates(word).trim();\n\t\t\t\t\tword = removeComments(word).trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see also\"))\n\t\t\t\t\t\tword = word.substring(8).trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see\"))\n\t\t\t\t\t\tword = word.substring(3).trim();\n\t\t\t\t\tif (word.startsWith(\":\"))\n\t\t\t\t\t\tword = word.substring(1).trim();\n\t\t\t\t\tif (word.endsWith(\".\"))\n\t\t\t\t\t\tword = word.substring(0, word.length() - 1).trim();\n\t\t\t\t\tif (word.endsWith(\",\"))\n\t\t\t\t\t\tword = word.substring(0, word.length() - 1).trim();\n\t\t\t\t\t\n\t\t\t\t\t// Check for slashes.\n\t\t\t\t\tword = word.replace(\" / \", \"/\");\n\t\t\t\t\tword = word.replace(\"/ \", \"/\");\n\t\t\t\t\tint i = word.indexOf('/');\n\t\t\t\t\tif (word.length() > 0) {\n\t\t\t\t\t\tif (i >= 0 && word.indexOf(' ') < 0) {\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tresult.add(word.substring(0, i));\n\t\t\t\t\t\t\t\tword = word.substring(i + 1);\n\t\t\t\t\t\t\t\ti = word.indexOf('/');\n\t\t\t\t\t\t\t} while (i >= 0);\n\t\t\t\t\t\t\tresult.add(word);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tresult.add(word);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt = t.substring(delim + 1);\n\t\t\t}\n\t\t} while (delim >= 0);\n\t\treturn result;\n\t}", "private void printLineGap() {\r\n\t\tfor (int i = 0; i < 45; i++) {\r\n\t\t\tSystem.out.print('-');\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public String toString() {\n\t\tString s = \"\";\n\t\tif(hidden) {\t\t\t\t\t//if hidden, only show the next character\n\t\t\tif(chars<=words.get(0).toString().length()) {\n\t\t\t\ts += (words.get(0).toString()+\" \").substring(0,chars+1);\n\t\t\t}\n\t\t}\n\t\telse {\t\t\t\t\t\t\t\n\t\t\tfor(Word w: words) {\n\t\t\t\ts += w.toString() + \" \";\n\t\t\t}\t\n\t\t}\n\t\treturn s;\n\t}", "public static String spinWords(String sentence) {\n String[] all = sentence.split(\" \");\n StringBuilder sb = new StringBuilder();\n for (String s : all) {\n if (s.length() < 5) {\n sb.append(s).append(\" \");\n } else {\n sb.append(new StringBuilder(s).reverse().toString()).append(\" \");\n }\n }\n sb.deleteCharAt(sb.length() - 1);\n return sb.toString();\n }", "public static String trimer (String text){\n\t\treturn text.replaceAll(\"\\\\s+\", \" \");\n\t}", "public void print(int indent) {\n \tfor (WordList words : wordLists) {\n for (int j = 0; j < indent; j++) System.out.print(\" \");\n System.out.print(\"synon: \");\n words.print(indent);\n }\n }", "@Override\n public String toString() {\n StringJoiner sj = new StringJoiner(\", \", \"{\", \"}\\n\");\n wordMap.forEach((k, v) -> sj.add(String.format(\"%s -> %s\", k, v)));\n return sj.toString();\n }", "public static void main(String[] args) {\n String s = \"catsanddog\";\n Set<String> dict = new HashSet<>();\n dict.add(\"cat\"); dict.add(\"cats\"); dict.add(\"and\"); dict.add(\"sand\"); dict.add(\"dog\");\n WordBreak solution = new WordBreak();\n List<String> result = solution.wordBreak(s, dict);\n System.out.println(result);\n }", "@Override\n\tpublic String decorate(String d) {\n\t\tString decorated = \"\";\n\t\tfor(int i = 0; i < d.length(); i++) {\n\t\t\tif(i == 4 || i == 8 || i == 12) {\n\t\t\t\tdecorated += \" \" + d.charAt(i);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdecorated += d.charAt(i);\n\t\t\t}\n\t\t}\n\t\treturn decorated;\n\t}", "public void stringToAl(String s){\n\t\tfor(int i=0, j=0; i<s.length(); i++){\n\t\t\tif(s.charAt(i) == ' ' || i == s.length()-1){\n\t\t\t\tString temp;\n\t\t\t\tif(i == s.length() - 1){\n\t\t\t\t\ttemp =s.substring(j,i+1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp =s.substring(j,i);\n\t\t\t\t}\n\t\t\t\t//System.out.println(temp);\n\t\t\t\twords.add(temp);\n\t\t\t\tj = i + 1;\n\n\t\t\t}\n\t\t}\n\n\t}", "public void reverseWords(char[] s) {\n if (s == null || s.length <= 1) {\n return;\n }\n reverse(s, 0, s.length - 1);\n int start = 0;\n for (int i = 0; i < s.length; i++) {\n if (s[i] == ' ') {\n // revresting between publish and i +1\n reverse(s, start, i - 1);\n // setting publish = i +1 assuming there is only\n // one space between words !!!\n start = i + 1;\n } else if (i == s.length - 1) {\n reverse(s, start, i);\n }\n }//end for\n }", "private void makeLines(LayoutContext lc) {\n //String s = new String(text);\n boolean isLastLine = false;\n int tries = 0;\n int curWidth, wordWidth, lineStart, wordEnd, wordStart, newWidth, textLen, beg, maxM2, spaceW;\n curWidth = lineStart = wordEnd = beg = 0;\n char[] text = this.text;\n textLen = text.length;\n maxM2 = textLen - 2;\n spaceW = fm.charWidth(' ');\n boolean glue = false;\n\n do {\n beg = wordEnd;\n\n // find next word\n for (wordStart = beg;; wordStart++) {\n if (wordStart >= textLen) // trailing blanks?\n {\n if (tries > 0) // guich@tc114_81\n {\n lc.disjoin();\n addLine(lineStart, wordEnd, false, lc, false);\n tries = 0;\n }\n wordEnd = wordStart;\n isLastLine = true;\n break;\n }\n if (text[wordStart] != ' ') // is this the first non-space char?\n {\n wordEnd = wordStart;\n do {\n if (++wordEnd >= textLen) {\n isLastLine = true;\n break;\n }\n } while (text[wordEnd] != ' ' && text[wordEnd] != '/'); // loop until the next space/slash char\n // use slashes as word delimiters (useful for URL addresses).\n if (maxM2 > wordEnd && text[wordEnd] == '/' && text[wordEnd + 1] != '/') {\n wordEnd++;\n }\n break;\n }\n }\n if (!lc.atStart() && wordStart > 0 && text[wordStart - 1] == ' ') {\n wordStart--;\n }\n wordWidth = fm.stringWidth(text, wordStart, wordEnd - wordStart);\n if (curWidth == 0) {\n lineStart = beg = wordStart; // no spaces at start of a line\n newWidth = wordWidth;\n } else {\n newWidth = curWidth + wordWidth;\n }\n\n if (lc.x + newWidth <= lc.maxWidth) {\n curWidth = newWidth + spaceW;\n } else // split: line length now exceeds the maximum allowed\n {\n //if (text[wordStart] == ' ') {wordStart++; wordWidth -= spaceW;}\n if (curWidth > 0) {\n // At here, wordStart and wordEnd refer to the word that overflows. So, we have to stop at the previous word\n wordEnd = wordStart;\n if (text[wordEnd - 1] == ' ') {\n wordEnd--;\n }\n if (DEBUG) {\n Vm.debug(\"1. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\": \" + curWidth + \" \" + isLastLine);\n }\n addLine(lineStart, wordEnd, true, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else if (!lc.atStart()) // case of \"this is a text at the end <b>oftheline</b>\" -> oftheline will overflow the screen\n {\n if (++tries == 2) {\n break;\n }\n if (DEBUG) {\n Vm.debug(\"2 \" + isLastLine);\n }\n // Nothing was gathered in, but the current line has characters left by a previous TextSpan. This occurs only once.\n addLine(0, 0, false, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else {\n // Rare case where we both have nothing gathered in, and the physical line is empty. Had this not been made, then we\n // woud have generated an extra-line at the top of the block.\n if (DEBUG) {\n Vm.debug(\"3. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + '\"');\n }\n if (lineStart != wordEnd) {\n addLine(lineStart, wordEnd, true, lc, glue);\n }\n }\n glue = true;\n }\n } while (!isLastLine);\n\n if (wordEnd != lineStart) {\n //curWidth = fm.stringWidth(text, lineStart, wordEnd-lineStart);\n boolean split = lc.x + curWidth > lc.maxWidth && style.hasInitialValues() && style.isDisjoint;\n if (DEBUG) {\n Vm.debug(\"4. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\" \" + split);\n }\n addLine(lineStart, wordEnd, split, lc, glue);\n }\n }", "public static String prettyPrintFormatter(String target, int offset) {\n String result = \"\";\n String[] words = target.split(\" \");\n int lineLength = Ui.DASH_LINES.length();\n int usableLength = lineLength - offset;\n assert usableLength > 0 : \"Otherwise we cannot print anything.\";\n\n int currentLength = 0;\n for (String word : words) {\n // Handle the case where a word is too long to print on one line\n if (word.length() > usableLength) {\n // Find number of characters that can be printed on current line\n int remainLength = usableLength - currentLength;\n result += word.substring(0, remainLength);\n String leftover = word.substring(remainLength);\n // Separate the word into parts that can fit in a line\n while (leftover.length() > usableLength) {\n result += System.lineSeparator() + \" \".repeat(offset)\n + leftover.substring(0, usableLength);\n leftover = leftover.substring(usableLength);\n }\n // Place remainder of word into line and continue\n result += System.lineSeparator() + \" \".repeat(offset) + leftover + \" \";\n currentLength = leftover.length() + 1;\n continue;\n }\n currentLength += word.length();\n if (currentLength > usableLength) {\n // Repeat enough spaces so that text is aligned to usable area.\n result += System.lineSeparator() + \" \".repeat(offset) + word;\n currentLength = word.length();\n } else {\n result += word;\n }\n result += \" \";\n // Account for the \" \" after the word.\n ++currentLength;\n }\n return result.trim();\n }", "private void addCustomWords() {\r\n\r\n }", "public List<String> fullJustify(String[] words, int L) {\n List<String> res = new ArrayList<>();\n int index = 0;\n while (index < words.length) {\n int count = words[index].length();\n int last = index + 1;\n while (last < words.length) {\n if (words[last].length() + count + 1 > L) break;\n count += 1 + words[last].length();\n last++;\n }\n StringBuilder builder = new StringBuilder();\n builder.append(words[index]);\n int diff = last - index - 1;\n if (last == words.length || diff == 0) {\n for (int i = index + 1; i < last; i++) {\n builder.append(\" \");\n builder.append(words[i]);\n }\n for (int i = builder.length(); i < L; i++) {\n builder.append(\" \");\n }\n } else {\n int spaces = (L - count) / diff;\n int r = (L - count) % diff;\n for (int i = index + 1; i < last; i++) {\n for (int k = spaces; k > 0; k--) {\n builder.append(\" \");\n }\n if (r > 0) {\n builder.append(\" \");\n r--;\n }\n builder.append(\" \");\n builder.append(words[i]);\n }\n }\n res.add(builder.toString());\n index = last;\n }\n return res;\n }", "private String createAcronym(String phrase) {\n String[] words = phrase.split(\"\\\\W+|(?<=\\\\p{Lower})(?=\\\\p{Upper})|(?<=\\\\p{Upper})(?=\\\\p{Upper}\\\\p{Lower})\");\n StringBuffer acronym = new StringBuffer();\n for (int i = 0; i < words.length; i++) {\n acronym.append(words[i].substring(0,1).toUpperCase());\n }\n return acronym.toString();\n }", "private static void splitWord() {\n\t\tint i = 1;\r\n\t\tfor(String doc : DocsTest) {\r\n\t\t\tArrayList<String> wordAll = new ArrayList<String>();\r\n\t\t\tfor (String word : doc.split(\"[,.() ; % : / \\t -]\")) {\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\tif(word.length()>1 && !mathMethod.isNumeric(word)) {\r\n\t\t\t\t\twordAll.add(word);\r\n\t\t\t\t\tif(!wordList.contains(word)) {\r\n\t\t\t\t\t\twordList.add(word);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twordAll.removeAll(stopword);\r\n\t\t\tDoclist.put(i, wordAll);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\twordList.removeAll(stopword);\r\n\t}", "static void printSpaces()\n{ int i;\n for (i=0;i<sangria;i++)\n\t System.out.print(\" \");\n}", "java.lang.String getWord();", "private Set<String> insertionHelper(String word) {\n\t\tSet<String> insertionWords = new HashSet<String>();\n\t\tfor (char letter : LETTERS) {\n\t\t\tfor (int i = 0; i <= word.length(); i++) {\n\t\t\t\tinsertionWords.add(word.substring(0, i) + letter + word.substring(i));\n\t\t\t}\n\t\t}\n\t\treturn insertionWords;\n\t}", "private static String justifyLine(String text, int totalSpacesToInsert) {\n String[] wordArray = text.split(\"\\\\s\");\n String toAppend = \" \";\n\n while ((totalSpacesToInsert) >= (wordArray.length - 1)) {\n toAppend = toAppend + \" \";\n totalSpacesToInsert = totalSpacesToInsert - (wordArray.length - 1);\n }\n int i = 0;\n String justifiedText = \"\";\n for (String word : wordArray) {\n if (i < totalSpacesToInsert)\n justifiedText = justifiedText + word + \" \" + toAppend;\n\n else\n justifiedText = justifiedText + word + toAppend;\n\n i++;\n }\n\n return justifiedText;\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "SList evenWords();", "public String acronym(String phrase) {\n /*StringBuilder acronymFeed = new StringBuilder(\"\");\n String wordHolder = \"\";\n int spaceIndex;\n char firstLetter;\n do{\n spaceIndex = phrase.indexOf(\" \");\n wordHolder = phrase.substring(0,spaceIndex);\n acronymFeed.append(wordHolder.charAt(0));\n phrase = phrase.replaceFirst(wordHolder, \"\");\n } while (spaceIndex != -1 && wordHolder != \"\" && phrase != \"\");\n \n \n \n \n \n String acronymResult = acronymFeed.toString().toUpperCase();\n return acronymResult;\n */\n \n char[] letters = phrase.toCharArray();\n String firstLetters = \"\";\n firstLetters += String.valueOf(letters[0]);\n for (int i = 1; i < phrase.length();i++){\n if (letters[i-1] == ' '){\n firstLetters += String.valueOf(letters[i]);\n }\n }\n firstLetters = firstLetters.toUpperCase();\n return firstLetters;\n }", "void convertWordToMorse(String word) {\n StringBuilder sb = new StringBuilder();\n for (char letter: word.toCharArray()) {\n String strLetter = Character.toString(letter);\n sb.append(morseMap.get(strLetter));\n }\n String morse = sb.toString();\n if (dictionary.get(morse)==null) {\n dictionary.put(morse, new ArrayList<>());\n }\n dictionary.get(morse).add(word);\n }", "public static void Print02(){\n Scanner input = new Scanner(System.in);\n\n System.out.println(\"2. MASUKKAN KALIMAT/KATA : \");\n String inputString = input.nextLine();\n\n String[] inputArray = inputString.split( \" \");\n for(String text : inputArray)\n {\n char[] charArray = text.toCharArray();\n\n for (int i = 0; i < charArray.length; i++) {\n if(i == 0 || i == text.length() - 1 ) {\n System.out.print(charArray[i]);\n }\n else if (i == text.length() / 2) {\n System.out.print(\"***\");\n }\n else {\n System.out.print(\"\");\n }\n }\n System.out.print(\" \");\n }\n System.out.println();\n }", "private void laadSpellen() {\r\n this.spellen = this.dc.geefOpgeslagenSpellen();\r\n int index = 0;\r\n String res = String.format(\"%25s %20s\", r.getString(\"spelNaam\"), r.getString(\"moeilijkheidsGraad\"));\r\n for (String[] rij : spellen) {\r\n index++;\r\n res += String.format(\"%n%d) %20s\", index, rij[0]);\r\n switch (rij[1]) {\r\n case \"1\":\r\n res += String.format(\"%20s\", r.getString(\"makkelijk\"));\r\n break;\r\n case \"2\":\r\n res += String.format(\"%20s\", r.getString(\"gemiddeld\"));\r\n break;\r\n case \"3\":\r\n res += String.format(\"%20s\", r.getString(\"moeilijk\"));\r\n break;\r\n }\r\n \r\n }\r\n System.out.printf(res);\r\n }", "public static String formatText(String t) {\r\n if (t.length() > 0) {\r\n char chars[] = t.toCharArray();\r\n for (int index = 0; index < chars.length; index++)\r\n if (chars[index] == '_') {\r\n chars[index] = ' ';\r\n if (index + 1 < chars.length && chars[index + 1] >= 'a' && chars[index + 1] <= 'z')\r\n chars[index + 1] = (char) ((chars[index + 1] + 65) - 97);\r\n }\r\n\r\n if (chars[0] >= 'a' && chars[0] <= 'z')\r\n chars[0] = (char) ((chars[0] + 65) - 97);\r\n return new String(chars);\r\n } else {\r\n return t;\r\n }\r\n }", "public String tri4(int h){\n\t\tString S = \"\";\n\t\tint H = h;\n\t\tint HH = H;\n\t\tint Counter = 0;\n\t\tint UsingCounter = Counter;\n\n\t\twhile (H > 0){\n\t\t\tHH = H;\n\t\t\twhile (UsingCounter > 0){\n\t\t\t\tS = S + \" \";\n\t\t\t\tUsingCounter = UsingCounter - 1;}\n\t\t\twhile (HH > 0) {\n\t\t\t\tS = S + \"*\";\n\t\t\t\tHH = HH - 1;}\n\t\t\tCounter = Counter + 1;\n\t\t\tUsingCounter = Counter;\n\t\t\tS = S + \"\\n\";\n\t\t\tH = H - 1;}\n\n\t\treturn S; }", "public void biStringToAl(String s){\n\t\tint i=0, j=0, num=0;\n\t\twhile(i<s.length() - 1){ //avoid index out of range exception\t\t\t\n\t\t\twhile(i < s.length()){\n\t\t\t\ti++;\n\t\t\t\tif(s.charAt(i) == ' ' || i == s.length()-1){ //a word ends\n\t\t\t\t\tnum++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile(num >2 && i < s.length()){\n\t\t\t\tj++;\n\t\t\t\tif(s.charAt(j) == ' '){ // j is 2 words slower than i\n\t\t\t\t\tj = j + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tString temp;\n\t\t\tif(num >= 2){\n\t\t\t\tif(i == s.length() - 1){\n\t\t\t\t\ttemp =s.substring(j,i+1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp =s.substring(j,i);\n\t\t\t\t}\n\t\t\t\tbiWords.add(temp);\n\t\t\t\t//System.out.println(\"temp:\"+temp);\n\t\t\t}\n\t\t}\n\t}", "private static String convert(String word) {\n\n char[] charArray = word.toCharArray();\n\n for (int letter = 0; letter < word.length(); letter++) {\n // Finding the first letter of a word.\n if (letter == 0 && charArray[letter] != ' ' || charArray[letter] != ' ' && charArray[letter - 1] == ' ') {\n // Checking if the first letter is lower case.\n if (charArray[letter] >= 'a' && charArray[letter] <= 'z') {\n // Converting first letter to upper case\n charArray[letter] = (char)(charArray[letter] - 'a' + 'A');\n }\n }\n // Checking if the letters other than the first letter are capital\n else if (charArray[letter] >= 'A' && charArray[letter] <= 'Z')\n // Converting uppercase other letters to lower case.\n charArray[letter] = (char)(charArray[letter] + 'a' - 'A');\n }\n // Returning a Title cased String.\n return new String(charArray);\n }", "public static String getAlignedWord(String word, int length) {\n SpreedWord pivot = new SpreedWord();// to get the pivot.\n String alignWord = \"<html>\"; // get the align word.\n double align; // get number of spaces\n double count = 0; // count the number of spaces\n double leftSpace; // geting left space\n double rightSpace = 0; // get right space\n int getPivot; // get pivot number\n // this check to see if the length is even add one\n if (length % 2 == 0) {\n length = length + 1;\n }\n // this checks for commas and semicolons and periods.\n for (int i = 0; i < word.length(); i++) {\n if (word.charAt(i) == '.') {\n word = word.substring(0, word.length() - 1);\n break;\n } else if (word.charAt(i) == ';') {\n word = word.substring(0, word.length() - 1);\n break;\n } else if (word.charAt(i) == ',') {\n word = word.substring(0, word.length() - 1);\n break;\n }\n }\n // this gets the pivot\n getPivot = pivot.getPivot(word);\n // takes half the length\n align = length / 2;\n // gets the numbers space before the pivot.\n char[] letters = word.toCharArray();\n for (int i = 0; i < word.length(); i++) {\n if (!Character.isLetter(letters[i])) {\n count++;\n } else {\n break;\n }\n }\n // get left spaces\n align = align - (getPivot + count);\n\n leftSpace = align;\n\n // adding the left spaces\n for (int i = 0; i < leftSpace; i++) {\n alignWord += \"&nbsp;\";\n }\n // add the word\n alignWord += word.substring(0, getPivot);\n alignWord += \"<font color=\\\"yellow\\\">\";\n alignWord += word.charAt(getPivot);\n alignWord += \"</font>\";\n for (int i = getPivot + 1; i < word.length(); i++)\n alignWord += word.charAt(i);\n //alignWord += word.substring(getPivot + 1, word.length() - getPivot + 1);\n // adding the right space or truncate\n if (alignWord.length() > length) {\n\n } else {\n rightSpace = length - alignWord.length();\n for (int j = 0; j < rightSpace; j++) {\n alignWord += \" \";\n }\n }\n\n alignWord += \"</html>\";\n System.out.println(alignWord);\n\n return alignWord;\n }", "public static void space(int space) {\r\n\t\tfor(int i=0; i<space; i++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "public static List<String> fullJustify(String[] words, int maxWidth) {\n List<String> list = new ArrayList<>();\n int i = 0;\n while (true) {\n List<String> al = new ArrayList<>();\n int len = 0;\n while (i < words.length && len + words[i].length() <= maxWidth) {\n al.add(words[i]);\n len += words[i].length() + 1;\n i++;\n }\n len--;\n int remLen = maxWidth - len;\n if (i == words.length) {\n StringBuilder sb = new StringBuilder(al.get(0));\n int j = 1;\n while (j < al.size()) {\n sb.append(\" \");\n sb.append(al.get(j++));\n }\n while (remLen-- > 0)\n sb.append(\" \");\n list.add(sb.toString());\n break;\n } else if (al.size() == 1) {\n StringBuilder sb = new StringBuilder(al.get(0));\n while (remLen-- > 0)\n sb.append(\" \");\n list.add(sb.toString());\n } else {\n int div = remLen / (al.size() - 1), rem = remLen % (al.size() - 1);\n StringBuilder sb = new StringBuilder(al.get(0));\n int j = 1;\n while (j < al.size()) {\n sb.append(\" \");\n for (int k = 0; k < div; k++)\n sb.append(\" \");\n if (rem-- > 0)\n sb.append(\" \");\n sb.append(al.get(j++));\n }\n list.add(sb.toString());\n }\n }\n return list;\n }", "public static String cap(String w) {\n if (w.toLowerCase().equals(w)){ //if there are no capitals\n return w; // //then just return the word as is\n }\n else{\n // for (int i=0; i<w.length(); i++) {\n \n return w.substring(0,1).toUpperCase() + w.substring(1).toLowerCase(); //if there is a capital then make the first only the first letter capital and the rest lowercase\n }\n }", "private static String removeSoftHyphens(String in) {\n String result = in.replaceAll(\"\\u00AD\", \"\");\n return result.length() == 0 ? \"-\" : result;\n }", "static void staircase(int n) {\r\n \tString row = \"\";\r\n \tfor (int i = n - 1; i >= 0; i--) {\r\n \t\trow = \"\";\r\n\t\t\tfor (int j = 0; j < n; j++) {\r\n\t\t\t\tif (i <= j ) {\r\n\t\t\t\t\trow += \"#\";\r\n\t\t\t\t}else {\r\n\t\t\t\t\trow += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(row);\r\n\t\t}\r\n }" ]
[ "0.600316", "0.59535587", "0.5819227", "0.58119226", "0.57403284", "0.57136345", "0.5688623", "0.56581897", "0.5609617", "0.5607205", "0.55889916", "0.55359954", "0.55355847", "0.5508078", "0.54883605", "0.5478121", "0.54709023", "0.5465488", "0.5455435", "0.54418206", "0.5438812", "0.5434115", "0.54326415", "0.5421777", "0.5411207", "0.54062366", "0.5387519", "0.53759986", "0.5372994", "0.53589547", "0.53538144", "0.5337596", "0.5336858", "0.5336729", "0.5329361", "0.53217185", "0.5310973", "0.53082937", "0.5307726", "0.5305407", "0.5290409", "0.5278932", "0.5268448", "0.52620643", "0.5256342", "0.5252819", "0.5246786", "0.5238684", "0.52382195", "0.523222", "0.52247316", "0.52210414", "0.52130646", "0.52113587", "0.52056926", "0.5205492", "0.5196782", "0.5185263", "0.51832104", "0.5182233", "0.5177273", "0.51766485", "0.5162846", "0.5156656", "0.51460963", "0.5138313", "0.51372355", "0.51303273", "0.5117654", "0.51164806", "0.51095253", "0.5104924", "0.510424", "0.50966597", "0.50932884", "0.50659835", "0.5065949", "0.5063963", "0.5057887", "0.50538033", "0.5047371", "0.5030659", "0.50266784", "0.5023248", "0.50156045", "0.50144964", "0.5010114", "0.5007109", "0.5002749", "0.49972007", "0.4996653", "0.4990102", "0.49768895", "0.49764547", "0.49755913", "0.49695426", "0.49660322", "0.49636334", "0.49607155", "0.4954687", "0.49517286" ]
0.0
-1