conversation listlengths 2 2 |
|---|
[
{
"content": "Compare the supplied plaintext password to a hashed password.\n\n@param passwd Plaintext password.\n@param hashed scrypt hashed password.\n\n@return true if passwd matches hashed value.",
"role": "user"
},
{
"content": "public static boolean check(String passwd, String hashed) {\... |
[
{
"content": "Attempt to detect the current platform.\n\n@return The current platform.\n\n@throws UnsupportedPlatformException if the platform cannot be detected.",
"role": "user"
},
{
"content": "public static Platform detect() throws UnsupportedPlatformException {\n String osArch = getPrope... |
[
{
"content": "Gets the node meta data.\n\n@param key - the meta data key\n@return the node meta data value for this key",
"role": "user"
},
{
"content": "public <T> T getNodeMetaData(Object key) {\n if (metaDataMap == null) {\n return (T) null;\n }\n return (T) metaDa... |
[
{
"content": "Copies all node meta data from the other node to this one\n@param other - the other node",
"role": "user"
},
{
"content": "public void copyNodeMetaData(ASTNode other) {\n if (other.metaDataMap == null) {\n return;\n }\n if (metaDataMap == null) {\n ... |
[
{
"content": "Sets the node meta data.\n\n@param key - the meta data key\n@param value - the meta data value\n@throws GroovyBugError if key is null or there is already meta\ndata under that key",
"role": "user"
},
{
"content": "public void setNodeMetaData(Object key, Object value) {\n if (key... |
[
{
"content": "Sets the node meta data but allows overwriting values.\n\n@param key - the meta data key\n@param value - the meta data value\n@return the old node meta data value for this key\n@throws GroovyBugError if key is null",
"role": "user"
},
{
"content": "public Object putNodeMetaData(Objec... |
[
{
"content": "Removes a node meta data entry.\n\n@param key - the meta data key\n@throws GroovyBugError if the key is null",
"role": "user"
},
{
"content": "public void removeNodeMetaData(Object key) {\n if (key==null) throw new GroovyBugError(\"Tried to remove meta data with null key \"+this... |
[
{
"content": "A method for determining from and to information when using this IntRange to index an aggregate object of the specified size.\nNormally only used internally within Groovy but useful if adding range indexing support for your own aggregates.\n\n@param size the size of the aggregate being indexed\n@r... |
[
{
"content": "Creates a setter method with the given body.\n\n@param declaringClass the class to which we will add the setter\n@param propertyNode the field to back the setter\n@param setterName the name of the setter\n@param setterBlock the statement representing the setter block",
"role": ... |
[
{
"content": "A loop driver for applying operations to all primary ClassNodes in\nour AST. Automatically skips units that have already been processed\nthrough the current phase.",
"role": "user"
},
{
"content": "public void applyToPrimaryClassNodes(PrimaryClassNodeOperation body) throws Compilation... |
[
{
"content": "Passes the Socket's InputStream and OutputStream to the closure. The\nstreams will be closed after the closure returns, even if an exception\nis thrown.\n\n@param socket a Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws IOException if an IOException occurs.\n... |
[
{
"content": "Creates an InputObjectStream and an OutputObjectStream from a Socket, and\npasses them to the closure. The streams will be closed after the closure\nreturns, even if an exception is thrown.\n\n@param socket this Socket\n@param closure a Closure\n@return the value returned by the closure\n@throws... |
[
{
"content": "Creates an immutable copy that we can cache.",
"role": "user"
},
{
"content": "public MethodKey createCopy() {\n int size = getParameterCount();\n Class[] paramTypes = new Class[size];\n for (int i = 0; i < size; i++) {\n paramTypes[i] = getParameterType... |
[
{
"content": "Given a class node, if this class node implements a trait, then generate all the appropriate\ncode which delegates calls to the trait. It is safe to call this method on a class node which\ndoes not implement a trait.\n@param cNode a class node\n@param unit the source unit",
"role": "user"
},... |
[
{
"content": "Convenience routine to return the specified error's\nunderlying SyntaxException, or null if it isn't one.",
"role": "user"
},
{
"content": "public SyntaxException getSyntaxError(int index) {\n SyntaxException exception = null;\n\n Message message = getError(index);\n ... |
[
{
"content": "Adds the remaining tokens to the processed tokens list.\n\n@param iter An iterator over the remaining tokens",
"role": "user"
},
{
"content": "private void gobble(Iterator iter)\n {\n if (eatTheRest)\n {\n while (iter.hasNext())\n {\n ... |
[
{
"content": "Checks that arguments and parameter types match.\n@param params method parameters\n@param args type arguments\n@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is\nnot of the exact type but still match",
"role": "user"
},
{
"co... |
[
{
"content": "Checks that excess arguments match the vararg signature parameter.\n@param params\n@param args\n@return -1 if no match, 0 if all arguments matches the vararg type and >0 if one or more vararg argument is\nassignable to the vararg type, but still not an exact match",
"role": "user"
},
{
... |
[
{
"content": "Checks if the last argument matches the vararg type.\n@param params\n@param args\n@return -1 if no match, 0 if the last argument is exactly the vararg type and 1 if of an assignable type",
"role": "user"
},
{
"content": "static int lastArgMatchesVarg(Parameter[] params, ClassNode... ar... |
[
{
"content": "Given a parameter, builds a new parameter for which the known generics placeholders are resolved.\n@param genericFromReceiver resolved generics from the receiver of the message\n@param placeholdersFromContext, resolved generics from the method context\n@param methodParameter the method parameter f... |
[
{
"content": "Returns true if the class node represents a the class node for the Class class\nand if the parametrized type is a neither a placeholder or a wildcard. For example,\nthe class node Class<Foo> where Foo is a class would return true, but the class\nnode for Class<?> would return false.\n@... |
[
{
"content": "Iterates through the given InputStream line by line using the specified\nencoding, splitting each line using the given separator. The list of tokens\nfor each line is then passed to the given closure. Finally, the stream\nis closed.\n\n@param stream an InputStream\n@param regex the delimiting ... |
[
{
"content": "Transforms each character from this reader by passing it to the given\nclosure. The Closure should return each transformed character, which\nwill be passed to the Writer. The reader and writer will be both be\nclosed before this method returns.\n\n@param self a Reader object\n@param writer a... |
[
{
"content": "Allows this closeable to be used within the closure, ensuring that it\nis closed once the closure has been executed and before this method returns.\n\n@param self the Closeable\n@param action the closure taking the Closeable as parameter\n@return the value returned by the closure\n@throws IOExcept... |
[
{
"content": "Get this property from the given object.\n@param object an array\n@return the length of the array object\n@throws IllegalArgumentException if object is not an array",
"role": "user"
},
{
"content": "public Object getProperty(Object object) {\n return java.lang.reflect.Array.getL... |
[
{
"content": "Generate a call to the delegate object.",
"role": "user"
},
{
"content": "protected MethodVisitor makeDelegateCall(final String name, final String desc, final String signature, final String[] exceptions, final int accessFlags) {\n MethodVisitor mv = super.visitMethod(accessFlags... |
[
{
"content": "returns the abstract method from a SAM type, if it is a SAM type.\n@param c the SAM class\n@return null if nothing was found, the method otherwise",
"role": "user"
},
{
"content": "public static Method getSAMMethod(Class<?> c) {\n // SAM = single public abstract method\n ... |
[
{
"content": "generates a Meta Object Protocol method, that is used to call a non public\nmethod, or to make a call to super.\n\n@param mopCalls list of methods a mop call method should be generated for\n@param useThis true if \"this\" should be used for the naming",
"role": "user"
},
{
"content": ... |
[
{
"content": "Creates a ClassNode containing the wrapper of a ClassNode\nof primitive type. Any ClassNode representing a primitive\ntype should be created using the predefined types used in\nclass. The method will check the parameter for known\nreferences of ClassNode representing a primitive type. If\nReferenc... |
[
{
"content": "Returns the single abstract method of a class node, if it is a SAM type, or null otherwise.\n@param type a type for which to search for a single abstract method\n@return the method node if type is a SAM type, null otherwise",
"role": "user"
},
{
"content": "public static MethodNode fin... |
[
{
"content": "Returns the precedence of the specified operator. Non-operator's will\nreceive -1 or a GroovyBugError, depending on your preference.",
"role": "user"
},
{
"content": "public static int getPrecedence( int type, boolean throwIfInvalid ) {\n\n switch( type ) {\n\n case ... |
[
{
"content": "Allows the closure to be called for NullObject\n\n@param closure the closure to call on the object\n@return result of calling the closure",
"role": "user"
},
{
"content": "public <T> T with( Closure<T> closure ) {\n return DefaultGroovyMethods.with( null, closure ) ;\n }",
... |
[
{
"content": "Tests whether the ClassNode implements the specified method name\n\n@param classNode The ClassNode\n@param methodName The method name\n@param argTypes\n@return True if it implements the method",
"role": "user"
},
{
"content": "private static boolean implementsMethod(ClassNode classNode... |
[
{
"content": "The type descriptor for a method node is a string containing the name of the method, its return type,\nand its parameter types in a canonical form. For simplicity, I'm using the format of a Java declaration\nwithout parameter names.\n\n@return the type descriptor",
"role": "user"
},
{
... |
[
{
"content": "Provides a nicely formatted string of the method definition. For simplicity, generic types on some of the elements\nare not displayed.\n@return\nstring form of node with some generic elements suppressed",
"role": "user"
},
{
"content": "@Override\n public String getText() {\n ... |
[
{
"content": "returns a sorted array of constructors",
"role": "user"
},
{
"content": "public GroovyConstructorDoc[] constructors() {\n Collections.sort(constructors);\n return constructors.toArray(new GroovyConstructorDoc[constructors.size()]);\n }",
"role": "assistant"
}
] |
[
{
"content": "returns a sorted array of nested classes and interfaces",
"role": "user"
},
{
"content": "public GroovyClassDoc[] innerClasses() {\n Collections.sort(nested);\n return nested.toArray(new GroovyClassDoc[nested.size()]);\n }",
"role": "assistant"
}
] |
[
{
"content": "returns a sorted array of fields",
"role": "user"
},
{
"content": "public GroovyFieldDoc[] fields() {\n Collections.sort(fields);\n return fields.toArray(new GroovyFieldDoc[fields.size()]);\n }",
"role": "assistant"
}
] |
[
{
"content": "returns a sorted array of properties",
"role": "user"
},
{
"content": "public GroovyFieldDoc[] properties() {\n Collections.sort(properties);\n return properties.toArray(new GroovyFieldDoc[properties.size()]);\n }",
"role": "assistant"
}
] |
[
{
"content": "returns a sorted array of enum constants",
"role": "user"
},
{
"content": "public GroovyFieldDoc[] enumConstants() {\n Collections.sort(enumConstants);\n return enumConstants.toArray(new GroovyFieldDoc[enumConstants.size()]);\n }",
"role": "assistant"
}
] |
[
{
"content": "returns a sorted array of methods",
"role": "user"
},
{
"content": "public GroovyMethodDoc[] methods() {\n Collections.sort(methods);\n return methods.toArray(new GroovyMethodDoc[methods.size()]);\n }",
"role": "assistant"
}
] |
[
{
"content": "Adds the provided map of key-value pairs as a new row in the table represented by this DataSet.\n\n@param map the key (column-name), value pairs to add as a new row\n@throws SQLException if a database error occurs",
"role": "user"
},
{
"content": "public void add(Map<String, Object> ma... |
[
{
"content": "Calls the provided closure for a \"page\" of rows from the table represented by this DataSet.\nA page is defined as starting at a 1-based offset, and containing a maximum number of rows.\n\n@param offset the 1-based offset for the first row to be processed\n@param maxRows the maximum number of ro... |
[
{
"content": "Wrap an existing setter.",
"role": "user"
},
{
"content": "private void wrapSetterMethod(ClassNode classNode, boolean bindable, String propertyName) {\r\n String getterName = \"get\" + MetaClassHelper.capitalize(propertyName);\r\n MethodNode setter = classNode.getSetterMe... |
[
{
"content": "Calculates directory size as total size of all its files, recursively.\n\n@param self a file object\n@return directory size (length)\n@since 2.1\n\n@throws IOException if File object specified does not exist\n@throws IllegalArgumentException if the provided File object does not represent a directo... |
[
{
"content": "Iterates through this file line by line, splitting each line using\nthe given regex separator. For each line, the given closure is called with\na single parameter being the list of strings computed by splitting the line\naround matches of the given regular expression.\nFinally the resources used f... |
[
{
"content": "Write the text to the File, using the specified encoding.\n\n@param file a File\n@param text the text to write to the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"role": "user"
},
{
"content": "public static void write(File f... |
[
{
"content": "Append the text at the end of the File.\n\n@param file a File\n@param text the text to append at the end of the File\n@throws IOException if an IOException occurs.\n@since 1.0",
"role": "user"
},
{
"content": "public static void append(File file, Object text) throws IOException {\n ... |
[
{
"content": "Append the text at the end of the File, using a specified encoding.\n\n@param file a File\n@param text the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 1.0",
"role": "user"
},
{
"content": "public st... |
[
{
"content": "Append the text supplied by the Writer at the end of the File, using a specified encoding.\n\n@param file a File\n@param writer the Writer supplying the text to append at the end of the File\n@param charset the charset used\n@throws IOException if an IOException occurs.\n@since 2.3",
"role": "... |
[
{
"content": "Write a Byte Order Mark at the beginning of the file\n\n@param stream the FileOutputStream to write the BOM to\n@param bigEndian true if UTF 16 Big Endian or false if Low Endian\n@throws IOException if an IOException occurs.\n@since 1.0",
"role": "user"
},
{
"content": "private stat... |
[
{
"content": "gets a class from the class cache. This cache contains only classes loaded through\nthis class loader or an InnerLoader instance. If no class is stored for a\nspecific name, then the method should return null.\n\n@param name of the class\n@return the class stored for the given name\n@see #removeCl... |
[
{
"content": "Gets an array of of all registered ConstantMetaClassListener instances.",
"role": "user"
},
{
"content": "public MetaClassRegistryChangeEventListener[] getMetaClassRegistryChangeEventListeners() {\n synchronized (changeListenerList) {\n ArrayList<MetaClassRegistryChan... |
[
{
"content": "Singleton of MetaClassRegistry.\n\n@param includeExtension\n@return the registry",
"role": "user"
},
{
"content": "public static MetaClassRegistry getInstance(int includeExtension) {\n if (includeExtension != DONT_LOAD_DEFAULT) {\n if (instanceInclude == null) {\n ... |
[
{
"content": "Returns the specified element, or null.",
"role": "user"
},
{
"content": "public CSTNode get( int index ) \n {\n CSTNode element = null;\n\n if( index < size() ) \n {\n element = (CSTNode)elements.get( index );\n }\n\n return element;\n ... |
[
{
"content": "Sets an element in at the specified index.",
"role": "user"
},
{
"content": "public CSTNode set( int index, CSTNode element ) \n {\n \n if( elements == null ) \n {\n throw new GroovyBugError( \"attempt to set() on a EMPTY Reduction\" );\n }\n\n... |
[
{
"content": "adds a value to the list\n\n@param value the value",
"role": "user"
},
{
"content": "public void add(T value) {\n Element<T> element = new Element<T>(bundle, value);\n element.previous = tail;\n if (tail != null) tail.next = element;\n tail = element;\n ... |
[
{
"content": "Returns an array of non null elements from the source array.\n\n@param tArray the source array\n@return the array",
"role": "user"
},
{
"content": "public T[] toArray(T[] tArray) {\n List<T> array = new ArrayList<T>(100);\n for (Iterator<T> it = iterator(); it.hasNext();)... |
[
{
"content": "Get the items for the key.\n\n@param key\n@return the items for the given key",
"role": "user"
},
{
"content": "public Value get(Object key) {\n /* If the length is under and we are asking for the key, then just look for the key. Don't build the map. */\n if (map == null ... |
[
{
"content": "Returns an iterator equivalent to this iterator with all duplicated items removed\nby using the default comparator. The original iterator will become\nexhausted of elements after determining the unique values. A new iterator\nfor the unique values will be returned.\n\n@param self an Iterator\n@ret... |
[
{
"content": "Provides a method that compares two comparables using Groovy's\ndefault number aware comparator.\n\n@param self a Comparable\n@param other another Comparable\n@return a -ve number, 0 or a +ve number according to Groovy's compareTo contract\n@since 1.6.0",
"role": "user"
},
{
"content":... |
[
{
"content": "Iterates over the contents of an object or collection, and checks whether a\npredicate is valid for at least one element.\n\n@param self the object over which we iterate\n@param closure the closure predicate used for matching\n@return true if any iteration for the object matches the closure p... |
[
{
"content": "Treats the object as iterable, iterating through the values it represents and returns the first non-null result obtained from calling the closure, otherwise returns the defaultResult.\n\n@param self an Object with an iterator returning its values\n@param defaultResult an Object that should be r... |
[
{
"content": "Groups the current element according to the value\n\n@param answer the map containing the results\n@param element the element to be placed\n@param value the value according to which the element will be placed\n@since 1.5.0",
"role": "user"
},
{
"content": "protected static <K, T> vo... |
[
{
"content": "A convenience method for creating an immutable map.\n\n@param self a Map\n@return an immutable Map\n@see java.util.Collections#unmodifiableMap(java.util.Map)\n@since 1.0",
"role": "user"
},
{
"content": "public static <K,V> Map<K,V> asImmutable(Map<? extends K, ? extends V> self) {\n ... |
[
{
"content": "A convenience method for creating an immutable sorted map.\n\n@param self a SortedMap\n@return an immutable SortedMap\n@see java.util.Collections#unmodifiableSortedMap(java.util.SortedMap)\n@since 1.0",
"role": "user"
},
{
"content": "public static <K,V> SortedMap<K,V> asImmutable(Sort... |
[
{
"content": "A convenience method for creating an immutable list\n\n@param self a List\n@return an immutable List\n@see java.util.Collections#unmodifiableList(java.util.List)\n@since 1.0",
"role": "user"
},
{
"content": "public static <T> List<T> asImmutable(List<? extends T> self) {\n retur... |
[
{
"content": "A convenience method for creating an immutable list.\n\n@param self a Set\n@return an immutable Set\n@see java.util.Collections#unmodifiableSet(java.util.Set)\n@since 1.0",
"role": "user"
},
{
"content": "public static <T> Set<T> asImmutable(Set<? extends T> self) {\n return Col... |
[
{
"content": "A convenience method for creating an immutable sorted set.\n\n@param self a SortedSet\n@return an immutable SortedSet\n@see java.util.Collections#unmodifiableSortedSet(java.util.SortedSet)\n@since 1.0",
"role": "user"
},
{
"content": "public static <T> SortedSet<T> asImmutable(SortedSe... |
[
{
"content": "Sorts the given array into sorted order using the given comparator.\n\n@param self the array to be sorted\n@param comparator a Comparator used for the comparison\n@return the sorted array\n@since 1.5.5",
"role": "user"
},
{
"content": "public static <T> T[] sort(T[] self, Comparator<T>... |
[
{
"content": "Adds all items from the iterator to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed",
"role": "user"
},
{
"content": "public static <T> boolean addAll(Collection<T> self, Iterator<T> items) {\n boolean changed ... |
[
{
"content": "Adds all items from the iterable to the Collection.\n\n@param self the collection\n@param items the items to add\n@return true if the collection changed",
"role": "user"
},
{
"content": "public static <T> boolean addAll(Collection<T> self, Iterable<T> items) {\n boolean changed ... |
[
{
"content": "Create a Map composed of the entries of the first map minus the\nentries of the given map.\n\n@param self a map object\n@param removeMe the entries to remove from the map\n@return the resulting map\n@since 1.7.4",
"role": "user"
},
{
"content": "public static <K,V> Map<K,V> minus(M... |
[
{
"content": "Iterates over the elements of an iterable collection of items, starting\nfrom a specified startIndex, and returns the index of the last item that\nmatches the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from ... |
[
{
"content": "Iterates over the elements of an iterable collection of items and returns\nthe index values of the items that match the condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param closure the filter to perform a match on the collection\n@return a list o... |
[
{
"content": "Iterates over the elements of an iterable collection of items, starting from\na specified startIndex, and returns the index values of the items that match\nthe condition specified in the closure.\n\n@param self the iteration object over which to iterate\n@param startIndex start matching from... |
[
{
"content": "this method mimics EMC behavior",
"role": "user"
},
{
"content": "public Object getProperty(String property) {\n if(ExpandoMetaClass.isValidExpandoProperty(property)) {\n if(property.equals(ExpandoMetaClass.STATIC_QUALIFIER) ||\n property.equals(ExpandoM... |
[
{
"content": "Creates a new Message from the specified text.",
"role": "user"
},
{
"content": "public static Message create( String text, Object data, ProcessingUnit owner )\n {\n return new SimpleMessage( text, data, owner);\n }",
"role": "assistant"
}
] |
[
{
"content": "Intercepts calls for setting a key and value for a JSON object\n\n@param name the key name\n@param args the value associated with the key",
"role": "user"
},
{
"content": "public Object invokeMethod(String name, Object args) {\n Object val = null;\n if (args != null && Ob... |
[
{
"content": "Sets the value of the given variable\n\n@param name the name of the variable to set\n@param value the new value for the given variable",
"role": "user"
},
{
"content": "public void setVariable(String name, Object value) {\n if (variables == null)\n variables = new Li... |
[
{
"content": "Get the property of the given object.\n\n@param object which to be got\n@return the property of the given object\n@throws RuntimeException if the property could not be evaluated",
"role": "user"
},
{
"content": "public Object getProperty(Object object) {\n MetaMethod getter = ge... |
[
{
"content": "Set the property on the given object to the new value.\n\n@param object on which to set the property\n@param newValue the new value of the property\n@throws RuntimeException if the property could not be set",
"role": "user"
},
{
"content": "public void setProperty(Object object, Obje... |
[
{
"content": "Gets the visibility modifiers for the property as defined by the getter and setter methods.\n\n@return the visibility modifer of the getter, the setter, or both depending on which exist",
"role": "user"
},
{
"content": "public int getModifiers() {\n MetaMethod getter = getGetter... |
[
{
"content": "Returns true if the specified class node is a trait.\n@param cNode a class node to test\n@return true if the classnode represents a trait",
"role": "user"
},
{
"content": "public static boolean isTrait(final ClassNode cNode) {\n return cNode!=null\n && ((cNode.isI... |
[
{
"content": "Reflection API to find the method corresponding to the default implementation of a trait, given a bridge method.\n@param someMethod a method node\n@return null if it is not a method implemented in a trait. If it is, returns the method from the trait class.",
"role": "user"
},
{
"conten... |
[
{
"content": "Find and select the next searchable matching text.\n\n@param reverse look forwards or backwards\n@param pos the starting index to start finding from\n@return the location of the next selected, or -1 if not found",
"role": "user"
},
{
"content": "private static int findNext(boolean ... |
[
{
"content": "Callback for constant meta class update change",
"role": "user"
},
{
"content": "protected static void invalidateSwitchPoints() {\n if (LOG_ENABLED) {\n LOG.info(\"invalidating switch point\");\n }\n \tSwitchPoint old = switchPoint;\n ... |
[
{
"content": "bootstrap method for method calls with \"this\" as receiver\n@deprecated since Groovy 2.1.0",
"role": "user"
},
{
"content": "public static CallSite bootstrapCurrent(Lookup caller, String name, MethodType type) {\n return realBootstrap(caller, name, CALL_TYPES.METHOD.ordinal... |
[
{
"content": "backing bootstrap method with all parameters",
"role": "user"
},
{
"content": "private static CallSite realBootstrap(Lookup caller, String name, int callID, MethodType type, boolean safe, boolean thisCall, boolean spreadCall) {\n // since indy does not give us the runtime ty... |
[
{
"content": "Adds a new cell to the current grid\n@param cell the td component",
"role": "user"
},
{
"content": "public void addCell(TableLayoutCell cell) {\n GridBagConstraints constraints = cell.getConstraints();\n constraints.insets = new Insets(cellpadding, cellpadding, cellpaddin... |
[
{
"content": "Adds a class to the unit.",
"role": "user"
},
{
"content": "public void addClass(ClassNode node) {\n node = node.redirect();\n String name = node.getName();\n ClassNode stored = classes.get(name);\n if (stored != null && stored != node) {\n // we ... |
[
{
"content": "This solution is based on an absolute path",
"role": "user"
},
{
"content": "private String getSlashyPath(final String path) {\n String changedPath = path;\n if (File.separatorChar != '/')\n changedPath = changedPath.replace(File.separatorChar, '/');\n\n ... |
[
{
"content": "Write the text to the Path, using the specified encoding.\n\n@param self a Path\n@param text the text to write to the Path\n@param charset the charset used\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0",
"role": "user"
},
{
"content": "public static void wr... |
[
{
"content": "Append the text at the end of the Path.\n\n@param self a Path\n@param text the text to append at the end of the Path\n@throws java.io.IOException if an IOException occurs.\n@since 2.3.0",
"role": "user"
},
{
"content": "public static void append(Path self, Object text) throws IOExcepti... |
[
{
"content": "Count the number of occurrences of a sub CharSequence.\n\n@param self a CharSequence\n@param text a sub CharSequence\n@return the number of occurrences of the given CharSequence inside this CharSequence\n@see #count(String, String)\n@since 1.8.2",
"role": "user"
},
{
"content": "public... |
[
{
"content": "Process each regex group matched substring of the given CharSequence. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the... |
[
{
"content": "Process each regex group matched substring of the given string. If the closure\nparameter takes one argument, an array with all match groups is passed to it.\nIf the closure takes as many arguments as there are match groups, then each\nparameter will be one match group.\n\n@param self the sourc... |
[
{
"content": "Expands all tabs into spaces. Assumes the CharSequence represents a single line of text.\n\n@param self A line to expand\n@param tabStop The number of spaces a tab represents\n@return The expanded toString() of this CharSequence\n@see #expandLine(String, int)\n@since 1.8.2",
"role": "user"
}... |
[
{
"content": "Returns the result of calling a closure with the first occurrence of a regular expression found within a CharSequence.\nIf the regex doesn't match, the closure will not be called and find will return null.\n\n@param self a CharSequence\n@param regex the capturing regex CharSequence\n@param cl... |
[
{
"content": "Select a List of characters from a CharSequence using a Collection\nto identify the indices to be selected.\n\n@param self a CharSequence\n@param indices a Collection of indices\n@return a String consisting of the characters at the given indices\n@since 1.0",
"role": "user"
},
{
"co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.