language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
protected void subHealthToRetry(ProviderInfo providerInfo, ClientTransport transport) { providerLock.lock(); try { if (subHealthConnections.remove(providerInfo) != null) { retryConnections.put(providerInfo, transport); } } finally { providerLoc...
java
public static BitSet valueOf(long[] longs) { int n; for (n = longs.length; n > 0 && longs[n - 1] == 0; n--) ; return new BitSet(Arrays.copyOf(longs, n)); }
python
def hamming(s, t): """ Calculate the Hamming distance between two strings. From Wikipedia article: Iterative with two matrix rows. :param s: string 1 :type s: str :param t: string 2 :type s: str :return: Hamming distance :rtype: float """ if len(s) != len(t): raise Value...
python
def rise_per_residue(self): """The rise per residue at each point on the Primitive. Notes ----- Each element of the returned list is the rise per residue, at a point on the Primitive. Element i is the distance between primitive[i] and primitive[i + 1]. The final value ...
python
def _convert_conv_param(param): """ Convert convolution layer parameter from Caffe to MXNet """ param_string = "num_filter=%d" % param.num_output pad_w = 0 pad_h = 0 if isinstance(param.pad, int): pad = param.pad param_string += ", pad=(%d, %d)" % (pad, pad) else: ...
python
def get_active(slug=DEFAULT_TERMS_SLUG): """Finds the latest of a particular terms and conditions""" active_terms = cache.get('tandc.active_terms_' + slug) if active_terms is None: try: active_terms = TermsAndConditions.objects.filter( date_active...
java
public static DMatrixRMaj createFundamental(DMatrixRMaj E, DMatrixRMaj K) { DMatrixRMaj K_inv = new DMatrixRMaj(3,3); CommonOps_DDRM.invert(K,K_inv); DMatrixRMaj F = new DMatrixRMaj(3,3); PerspectiveOps.multTranA(K_inv,E,K_inv,F); return F; }
python
def stopObserver(self): """ Stops this region's observer loop. If this is running in a subprocess, the subprocess will end automatically. """ self._observer.isStopped = True self._observer.isRunning = False
python
def has_bitshifts(self): """ Detects if there is any bitwise operation in the function. :return: Tags. """ def _has_bitshifts(expr): if isinstance(expr, pyvex.IRExpr.Binop): return expr.op.startswith("Iop_Shl") or expr.op.startswith("Iop_Shr") \ ...
python
def set_image(self, image, filename=None, resize=False): """ Set the poster or thumbnail of a this Vidoe. """ if self.id: data = self.connection.post('add_image', filename, video_id=self.id, image=image.to_dict(), resize=resize) if data: ...
java
@Override public boolean isFinished() { //Return -1 here because if we are closed or finished, we're at the end of the stream if(isClosed){ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "Stream is closed so it is finished"); ...
python
def napalm_get( task: Task, getters: List[str], getters_options: GetterOptionsDict = None, **kwargs: Any ) -> Result: """ Gather information from network devices using napalm Arguments: getters: getters to use getters_options (dict of dicts): When passing multiple getters yo...
python
def icon(cls, size): """Returns an icon to use for the game.""" tile = pygame.Surface((size, size)) tile.fill((237, 194, 46)) label = load_font(cls.BOLD_NAME, int(size / 3.2)).render(cls.NAME, True, (249, 246, 242)) width, height = label.get_size() tile.blit(label, ((size...
java
public static ElementDescriptor<?> get(QualifiedName qname, XmlContext context) { if (context == null) { context = DEFAULT_CONTEXT; } synchronized (context) { final Map<QualifiedName, ElementDescriptor<?>> contextMap = context.DESCRIPTOR_MAP; ElementDescriptor<?> result = contextMap.get(qname); ...
java
public static String getMessage(String key, Object... args) { if (messages == null) { if (locale == null) locale = Locale.getDefault(); messages = ResourceBundle.getBundle("com.ibm.ws.install.internal.resources.Repository", locale); } String message = mess...
python
def format_original_error(self): """Return the typical "TypeError: blah blah" for the original wrapped error. """ # TODO eventually we'll have sass-specific errors that will want nicer # "names" in browser display and stderr return "".join(( type(self.exc).__n...
java
public RegisterTaskDefinitionRequest withRequiresCompatibilities(String... requiresCompatibilities) { if (this.requiresCompatibilities == null) { setRequiresCompatibilities(new com.amazonaws.internal.SdkInternalList<String>(requiresCompatibilities.length)); } for (String ele : requir...
python
def do_health_checks(self, list_of_ips): """ Perform a health check on a list of IP addresses, using ICMPecho. Return tuple with list of failed IPs and questionable IPs. """ # Calculate a decent overall timeout time for a ping attempt: 3/4th of # the monitoring interval...
java
protected void resetDeleteSubscriptionMessage() { if (tc.isEntryEnabled()) SibTr.entry(tc, "resetDeleteSubscriptionMessage"); // Reset the state reset(); // Indicate that this is a create message iSubscriptionMessage.setSubscriptionMessageType( SubscriptionMessageType.DELETE); ...
java
public EventHandlerGroup<T> and(final EventHandlerGroup<T> otherHandlerGroup) { final Sequence[] combinedSequences = new Sequence[this.sequences.length + otherHandlerGroup.sequences.length]; System.arraycopy(this.sequences, 0, combinedSequences, 0, this.sequences.length); System.arraycopy( ...
python
def fmt_type(data_type, inside_namespace=None): """ Returns a TypeScript type annotation for a data type. May contain a union of enumerated subtypes. inside_namespace should be set to the namespace that the type reference occurs in, or None if this parameter is not relevant. """ if is_struct...
java
@Override protected boolean isAllowed(HttpServletRequest request) { HttpSession session = getRequest().getSession(false); if (session == null) return false; String sessionToken = (String) session.getAttribute(SESSION_ATTR_CSRF_TOKEN); String requestToken = request.getHeader(CSRF_HEADER); return ...
java
public alluxio.grpc.WritePType getWriteType() { alluxio.grpc.WritePType result = alluxio.grpc.WritePType.valueOf(writeType_); return result == null ? alluxio.grpc.WritePType.MUST_CACHE : result; }
python
def get_context_template(): """ Features which require configuration parameters in the product context need to refine this method and update the context with their own data. """ import random return { 'SITE_ID': 1, 'SECRET_KEY': ''.join( [random.SystemRandom().choice(...
python
def new(cls, store_type, store_entries): """ Helper function to create a new KeyStore. :param string store_type: What kind of keystore the store should be. Valid options are jks or jceks. :param list store_entries: Existing entries that should be added to the keystor...
java
public void marshall(CreateGrantRequest createGrantRequest, ProtocolMarshaller protocolMarshaller) { if (createGrantRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createGrantRequest.getKey...
python
def _controller_name(self, objtype): """Determines the controller name for the object's type Args: objtype (str): The object type Returns: A string with the controller name """ # would be better to use inflect.pluralize here, but would add a dependency ...
python
def convert_type(d, intype, outtype, convert_list=True, in_place=True): """ convert all values of one type to another Parameters ---------- d : dict intype : type_class outtype : type_class convert_list : bool whether to convert instances inside lists and tuples in_place : bool ...
java
public boolean isActive() throws BuildException, IllegalStateException { final Project project = getProject(); if (!CUtil.isActive(project, this.ifProp, this.unlessProp)) { return false; } if (isReference() && !((ProcessorDef) getCheckedRef(ProcessorDef.class, "ProcessorDef")).isActive()) { ...
python
def _misalign_split(self,alns): """Requires alignment strings have been set so for each exon we have query, target and query_quality _has_quality will specify whether or not the quality is meaningful """ total = [] z = 0 for x in alns: z += 1 exon_num = z if self._ali...
java
private void setLocale(Locale l, boolean select) { Locale oldLocale = locale; locale = l; int n = 0; if (select) { for (int i = 0; i < localeCount; i++) { if (locales[i].getCountry().length() > 0) { if (locales[i].equals(locale)) setSelectedIndex(n); n += 1; } } } firePropert...
python
def heightmap_new(w: int, h: int, order: str = "C") -> np.ndarray: """Return a new numpy.ndarray formatted for use with heightmap functions. `w` and `h` are the width and height of the array. `order` is given to the new NumPy array, it can be 'C' or 'F'. You can pass a NumPy array to any heightmap fu...
python
def run(self): """ Banana banana """ res = 0 self.project.setup() self.__retrieve_all_projects(self.project) self.link_resolver.get_link_signal.connect_after(self.__get_link_cb) self.project.format(self.link_resolver, self.output) self.project.wr...
python
def generate(env): """Add Builders and construction variables for gnulink to an Environment.""" link.generate(env) if env['PLATFORM'] == 'hpux': env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared -fPIC') # __RPATH is set to $_RPATH in the platform specification if that # platform su...
python
def draw_variables(self): """ Draw parameters from the approximating distributions """ z = self.q[0].draw_variable_local(self.sims) for i in range(1,len(self.q)): z = np.vstack((z,self.q[i].draw_variable_local(self.sims))) return z
java
public com.google.api.ads.admanager.axis.v201902.Date getStartDate() { return startDate; }
python
def phreg(self, data: ['SASdata', str] = None, assess: str = None, bayes: str = None, by: str = None, cls: [str, list] = None, contrast: str = None, effect: str = None, estimate: str = None, freq: str = None,...
python
def get_or_add_image_part(self, image_file): """ Return an ``(image_part, rId)`` 2-tuple corresponding to an |ImagePart| object containing the image in *image_file*, and related to this slide with the key *rId*. If either the image part or relationship already exists, they are re...
java
public static AnnotationValue getAnnotationValue(TypeElement typeElement, Class<?> annotationClass, String annotationParameter) { AnnotationMirror annotationMirror = getAnnotationMirror(typeElement, annotationClass); return (annotationMirror != null) ? getAnnotationValue(annotationMirror, an...
python
def get_state(self): """ Return the sampler and step methods current state in order to restart sampling at a later time. """ self.step_methods = set() for s in self.stochastics: self.step_methods |= set(self.step_method_dict[s]) state = Sampler.get_s...
java
public static boolean intersectRaySphere(Vector3fc origin, Vector3fc dir, Vector3fc center, float radiusSquared, Vector2f result) { return intersectRaySphere(origin.x(), origin.y(), origin.z(), dir.x(), dir.y(), dir.z(), center.x(), center.y(), center.z(), radiusSquared, result); }
python
def date_suggestions(): """ Returns a list of relative date that is presented to the user as auto complete suggestions. """ # don't use strftime, prevent locales to kick in days_of_week = { 0: "Monday", 1: "Tuesday", 2: "Wednesday", 3: "Thursday", 4: "Frid...
python
def stop(self): """ Stops the `git push` thread and commits all streamed files (Git.store_file and Git.stream_file), followed by a final git push. You can not start the process again. """ self.active_thread = False if self.thread_push_instance and self.t...
java
public void endPrefixMapping(String prefix) throws SAXException { if (DEBUG) System.out.println("TransformerHandlerImpl#endPrefixMapping: " + prefix); if (m_contentHandler != null) { m_contentHandler.endPrefixMapping(prefix); } }
python
def _frames_and_index_map(self, skip_registration=False): """Retrieve a new frame from the Kinect and return a ColorImage, DepthImage, IrImage, and a map from depth pixels to color pixel indices. Parameters ---------- skip_registration : bool If True, the registratio...
java
public static Sql getPreperSQL(String query, Map<String, Object> parameters) { SqlBuilder builder = new SqlBuilder(); return builder.getPreperSQLWithParameters(query, parameters); }
python
def get(url, last_modified=None): """Performs a get request to a given url. Returns an empty str on error. """ try: with closing(urllib2.urlopen(url)) as page: if last_modified is not None: last_mod = dateutil.parser.parse(dict(page.info())['last-modified']) ...
python
def _set_priority(self, v, load=False): """ Setter method for priority, mapped from YANG variable /qos_mpls/map/traffic_class_exp/priority (list) If this variable is read-only (config: false) in the source YANG file, then _set_priority is considered as a private method. Backends looking to populate ...
python
def on_remove_row(self, event, row_num=-1): """ Remove specified grid row. If no row number is given, remove the last row. """ if row_num == -1: default = (255, 255, 255, 255) # unhighlight any selected rows: for row in self.selected_rows: ...
java
private long getTotalTime(ProjectCalendarDateRanges exception) { long total = 0; for (DateRange range : exception) { total += getTime(range.getStart(), range.getEnd()); } return (total); }
python
def setModelData(self, editor, model, index): """ Gets data from the editor widget and stores it in the specified model at the item index. Does this by calling getEditorValue of the config tree item at the index. :type editor: QWidget :type model: ConfigTreeModel ...
java
protected TemplateModel get(Object name) { try { return FreeMarkerTL.getEnvironment().getVariable(name.toString()); } catch (Exception e) { throw new ViewException(e); } }
python
def requests_get(url): """ Run :func:`requests.get` in a ``cached()`` wrapper. The cache wrapper uses the default timeout (environment variable ``PYTHON_FTR_CACHE_TIMEOUT``, 3 days by default). It is used in :func:`ftr_process`. """ LOGGER.info(u'Fetching %s…', url) return requests.get(ur...
python
def AgregarCalidad(self, analisis_muestra=None, nro_boletin=None, cod_grado=None, valor_grado=None, valor_contenido_proteico=None, valor_factor=None, **kwargs): "Agrega la información sobre la calidad, al autorizar o poster...
python
def create_mbed_detector(**kwargs): """! Factory used to create host OS specific mbed-lstools object :param kwargs: keyword arguments to pass along to the constructors @return Returns MbedLsTools object or None if host OS is not supported """ host_os = platform.system() if host_os == "Windows"...
python
def add_where_when(voevent, coords, obs_time, observatory_location, allow_tz_naive_datetime=False): """ Add details of an observation to the WhereWhen section. We Args: voevent(:class:`Voevent`): Root node of a VOEvent etree. coords(:class:`.Position2D`): Sky co-ordi...
java
private SAXBuilder getSAXBuilder() { final LineNumberSAXBuilder builder = new LineNumberSAXBuilder(); // this parser configuration will use an xsd schema for validation // if one is specified in the xml itself and if that xsd can be found builder.setFeature("http://apache.org/xml/features/validation/sc...
java
protected void parse(String icalString, IcalSchema schema) throws ParseException { String paramText; String content; { String unfolded = IcalParseUtil.unfoldIcal(icalString); Matcher m = CONTENT_LINE_RE.matcher(unfolded); if (!m.matches()) { ...
python
def execute_command(self): """ The genconfig command depends on predefined `Jinja2 <http://jinja.pocoo.org/>`_ \ templates for the skeleton configuration files. Taking the --type argument from the \ CLI input, the corresponding template file is used. Settings for the configurat...
python
def schedule_saved(sender, instance, **kwargs): """ Fires off the celery task to ensure that this schedule is in the scheduler Arguments: sender {class} -- The model class, always Schedule instance {Schedule} -- The instance of the Schedule that we want to sync """ from ...
java
public static double getLongitudeDistance(BoundingBox boundingBox) { return getLongitudeDistance(boundingBox.getMinLongitude(), boundingBox.getMaxLongitude(), (boundingBox.getMinLatitude() + boundingBox.getMaxLatitude()) / 2.0); }
java
public static MediaDescriptionField buildMediaDescription(MediaChannel channel, boolean offer) { MediaDescriptionField md = new MediaDescriptionField(); md.setMedia(channel.getMediaType()); md.setPort(channel.getRtpPort()); MediaProfile profile = channel.isDtlsEnabled() ? MediaProfile.RTP_SAVPF : MediaProfil...
java
private boolean generatedPositionAfter(Mapping mappingA, Mapping mappingB) { // Optimized for most common case int lineA = mappingA.generated.line; int lineB = mappingB.generated.line; int columnA = mappingA.generated.column; int columnB = mappingB.generated.column; retur...
java
public void genPyFiles( SoyFileSetNode soyTree, SoyPySrcOptions pySrcOptions, String outputPathFormat, ErrorReporter errorReporter) throws IOException { ImmutableList<SoyFileNode> srcsToCompile = ImmutableList.copyOf(soyTree.getChildren()); // Determine the output paths. List...
python
def delete(self): """Users with push access to the repository can delete a release. :returns: True if successful; False if not successful """ url = self._api return self._boolean( self._delete(url, headers=Release.CUSTOM_HEADERS), 204, 404 ...
python
def to_utf8(obj): """Walks a simple data structure, converting unicode to byte string. Supports lists, tuples, and dictionaries. """ if isinstance(obj, unicode_type): return _utf8(obj) elif isinstance(obj, dict): return dict((to_utf8(k), to_utf8(v)) for (k, v) in obj.items()) el...
python
def star_stats_table(self): """ Take the parsed stats from the STAR report and add them to the basic stats table at the top of the report """ headers = OrderedDict() headers['uniquely_mapped_percent'] = { 'title': '% Aligned', 'description': '% Uniquely mapped re...
python
def _parse_deadline(deadline): """Translate deadline date from human-acceptable format to the machine-acceptable""" if '-' in deadline and len(deadline) == 10: return deadline if '.' in deadline and len(deadline) == 10: # russian format dd.mm.yyyy to yyyy-mm-dd dmy = de...
python
def enable_host_freshness_check(self, host): """Enable freshness check for a host Format of the line that triggers function call:: ENABLE_HOST_FRESHNESS_CHECK;<host_name> :param host: host to edit :type host: alignak.objects.host.Host :return: None """ i...
java
public <F> ConnectedIterativeStreams<T, F> withFeedbackType(TypeInformation<F> feedbackType) { return new ConnectedIterativeStreams<>(originalInput, feedbackType, maxWaitTime); }
java
public Iterable<DConnection> queryByExpireTime(java.util.Date expireTime) { return queryByField(null, DConnectionMapper.Field.EXPIRETIME.getFieldName(), expireTime); }
python
def proxy_model(self): """ Retrieve the proxy model of this proxied `Part` as a `Part`. Allows you to retrieve the model of a proxy. But trying to get the catalog model of a part that has no proxy, will raise an :exc:`NotFoundError`. Only models can have a proxy. :return: :clas...
python
def main(name, output, font): """ Easily bootstrap an OS project to fool HR departments and pad your resume. """ # The path of the directory where the final files will end up in bootstrapped_directory = os.getcwd() + os.sep + name.lower().replace(' ', '-') + os.sep # Copy the template files to the ta...
java
private Date toDate(final String pStringDate) { // weird manipulation to parse the date... remove ':' from the timezone // before: 2011-07-12T22:42:40.000+02:00 // after: 2011-07-12T22:42:40.000+0200 final StringBuilder _date = new StringBuilder(); _date.append(pStringDate.subst...
python
def show_frames(self, wait=0): """ Show current frames from cameras. ``wait`` is the wait interval in milliseconds before the window closes. """ for window, frame in zip(self.windows, self.get_frames()): cv2.imshow(window, frame) cv2.waitKey(wait)
java
private static long getDateForHour(long dt, TimeZone tz, int hour, int dayoffset) { Calendar c = getCalendar(tz); c.setTimeInMillis(dt); int dd = c.get(Calendar.DAY_OF_MONTH); int mm = c.get(Calendar.MONTH); int yy = c.get(Calendar.YEAR); c.set(yy, mm, dd, hour, 0, 0)...
python
def search_env_paths(fname, key_list=None, verbose=None): r""" Searches your PATH to see if fname exists Args: fname (str): file name to search for (can be glob pattern) CommandLine: python -m utool search_env_paths --fname msvcr*.dll python -m utool search_env_paths --fname '*...
java
static public boolean isValidEmail(String email) { return email != null && email.trim().length() > 0 && email.indexOf("@") > 0; }
java
public static Response call(String server, String service, boolean suppress, DataObject data, String... params) { List<String> list = new ArrayList<String>(Arrays.asList(params)); for (Field field: data.getClass().getFields()) { if (Modifier.isStatic(field.getModifiers())) continue; ...
java
private void getWeeklyDates(Calendar calendar, int frequency, List<Date> dates) { int currentDay = calendar.get(Calendar.DAY_OF_WEEK); while (moreDates(calendar, dates)) { int offset = 0; for (int dayIndex = 0; dayIndex < 7; dayIndex++) { if (getWeeklyDay(Day...
java
private List<Resolvable> resolve(List<Resolvable> images) { List<Resolvable> resolved = new ArrayList<>(); // First pass: Pick all data images and all without dependencies for (Resolvable config : images) { List<String> volumesOrLinks = extractDependentImagesFor(config); ...
java
public PushedPageFlow pop( HttpServletRequest request ) { PushedPageFlow ppf = ( PushedPageFlow ) _stack.pop(); PageFlowController pfc = ppf.getPageFlow(); pfc.setIsOnNestingStack( false ); if ( request != null ) // may be null if we're called from valueUnbound() { ...
python
def _set_virtual_link(self, v, load=False): """ Setter method for virtual_link, mapped from YANG variable /rbridge_id/router/ospf/area/virtual_link (list) If this variable is read-only (config: false) in the source YANG file, then _set_virtual_link is considered as a private method. Backends looking...
java
public BeanBox injectValue(String fieldName, Object constValue) { checkOrCreateFieldInjects(); Field f = ReflectionUtils.findField(beanClass, fieldName); BeanBox inject = new BeanBox(); inject.setTarget(constValue); inject.setType(f.getType()); inject.setPureValue(true); ReflectionUtils.makeAccessible(f);...
java
public static MozuUrl getProductsUrl(String cursorMark, String defaultSort, String filter, Integer pageSize, String responseFields, String responseOptions, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/products/?filter={filter}&startIndex={startInd...
java
@DELETE @Path("/{gavc}") public Response delete(@Auth final DbCredential credential, @PathParam("gavc") final String gavc){ if(!credential.getRoles().contains(AvailableRoles.DATA_DELETER)){ throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build()); } ...
python
def _get_source(self): " Get source from CVS or filepath. " source_dir = op.join(self.deploy_dir, 'source') for tp, cmd in settings.SRC_CLONE: if self.src.startswith(tp + '+'): program = which(tp) assert program, '%s not found.' % tp cm...
java
private ArrayTypeReference doTryConvertToArray(ParameterizedTypeReference typeReference) { LightweightTypeReference parameterizedIterable = typeReference.getSuperType(Iterable.class); if (parameterizedIterable != null) { ITypeReferenceOwner owner = typeReference.getOwner(); if (parameterizedIterable.isRawType...
java
public HttpResponse head(String path) throws APIException { final HttpHead request = new HttpHead(getUrl(path)); return executeHead(request); }
java
public History getHistoryForID(int id) { History history = null; PreparedStatement query = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { query = sqlConnection.prepareStatement("SELECT * FROM " + Constants.DB_TABLE_HISTORY + ...
java
public String createEphemeralSequential(final String path, final Object data) throws ZkInterruptedException, IllegalArgumentException, ZkException, RuntimeExc...
java
protected ElemVariable addVarDeclToElem( ElemTemplateElement psuedoVarRecipient, LocPathIterator lpi, ElemVariable psuedoVar) throws org.w3c.dom.DOMException { // Create psuedo variable element ElemTemplateElement ete = psuedoVarRecipient.getFirstChildElem(); lpi.callVisitors(null, m_varN...
java
public void marshall(RenewCertificateRequest renewCertificateRequest, ProtocolMarshaller protocolMarshaller) { if (renewCertificateRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(renewCerti...
python
def _update_triangles(self, triangles_list): """ From a set of variables forming a triangle in the model, we form the corresponding Clusters. These clusters are then appended to the code. Parameters ---------- triangle_list : list The list of vari...
java
public static I_CmsFormatterBean getFormatterForContainer( CmsObject cms, CmsContainerElementBean element, CmsContainer container, CmsADEConfigData config, CmsADESessionCache cache) { I_CmsFormatterBean formatter = null; CmsFormatterConfiguration formatterSet = c...
java
@Override public void transcodeWebpToPng( InputStream inputStream, OutputStream outputStream) throws IOException { StaticWebpNativeLoader.ensure(); nativeTranscodeWebpToPng( Preconditions.checkNotNull(inputStream), Preconditions.checkNotNull(outputStream)); }
java
@CanIgnoreReturnValue private Node<K, V> addNode(@Nullable K key, @Nullable V value, @Nullable Node<K, V> nextSibling) { Node<K, V> node = new Node<K, V>(key, value); if (head == null) { // empty list head = tail = node; keyToKeyList.put(key, new KeyList<K, V>(node)); modCount++; } else ...
java
@Override public boolean printNative(Appendable app, int indentLevel, FilterValues<S> values) throws IOException { return mExecutor.printNative(app, indentLevel, values); }
java
@Override protected R parseValueFromString(String value) { value = value.replaceAll("-", "_"); value = value.replaceAll("^\\s+",""); value = value.replaceAll("\\s+$",""); return (R)Enum.valueOf(this.getRange(), value); }
java
private boolean applyArgValidate() throws CLIToolOptionsException { if(argValidate) { Validation validation = validatePolicies(); if(argVerbose && !validation.isValid()) { reportValidation(validation); } if(!validation.isValid()){ l...