signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class LoadAndDisplayImageTask { /** * Decodes image file into Bitmap , resize it and save it back */
private boolean resizeAndSaveImage ( int maxWidth , int maxHeight ) throws IOException { } } | // Decode image file , compress and re - save it
boolean saved = false ; File targetFile = configuration . diskCache . get ( uri ) ; if ( targetFile != null && targetFile . exists ( ) ) { ImageSize targetImageSize = new ImageSize ( maxWidth , maxHeight ) ; DisplayImageOptions specialOptions = new DisplayImageOptions . ... |
public class HttpSocketClient { /** * Asynchronously connects . */
public void connect ( final String endpoint , final Callback < ? super HttpSocket > onConnect , final Callback < ? super Exception > onError ) { } } | executors . getUnbounded ( ) . submit ( new Runnable ( ) { @ Override public void run ( ) { try { // Build request bytes
AoByteArrayOutputStream bout = new AoByteArrayOutputStream ( ) ; try { try ( DataOutputStream out = new DataOutputStream ( bout ) ) { out . writeBytes ( "action=connect" ) ; } } finally { bout . clos... |
public class GetTypedLinkFacetInformationRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetTypedLinkFacetInformationRequest getTypedLinkFacetInformationRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getTypedLinkFacetInformationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getTypedLinkFacetInformationRequest . getSchemaArn ( ) , SCHEMAARN_BINDING ) ; protocolMarshaller . marshall ( getTypedLinkFacetInformationRequest . ... |
public class LRUMap { /** * Creates a new LRU Map .
* @ param < K > the key type
* @ param < V > the value type
* @ return the map */
public static < K , V > LRUMap < K , V > create ( int maxSize ) { } } | Preconditions . checkArgument ( maxSize > 0 , "Max size must be greater than zero." ) ; return new LRUMap < > ( maxSize ) ; |
public class AccessControlList { /** * Gives all the permission entries
* @ return a safe copy of all the permission entries */
public List < AccessControlEntry > getPermissionEntries ( ) { } } | List < AccessControlEntry > list = new ArrayList < AccessControlEntry > ( ) ; for ( int i = 0 , length = accessList . size ( ) ; i < length ; i ++ ) { AccessControlEntry entry = accessList . get ( i ) ; list . add ( new AccessControlEntry ( entry . getIdentity ( ) , entry . getPermission ( ) ) ) ; } return list ; |
public class ControlCurve { /** * add a control point , return index of new control point */
public double addPoint ( double x , double y ) { } } | pts . add ( new Coordinate ( x , y ) ) ; return selection = pts . size ( ) - 1 ; |
public class StatementBuilder { /** * Build and return a string version of the query . If you change the where or make other calls you will need to
* re - call this method to re - prepare the query for execution . */
public String prepareStatementString ( ) throws SQLException { } } | List < ArgumentHolder > argList = new ArrayList < ArgumentHolder > ( ) ; return buildStatementString ( argList ) ; |
public class XInstanceOfExpressionImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eSet ( int featureID , Object newValue ) { } } | switch ( featureID ) { case XbasePackage . XINSTANCE_OF_EXPRESSION__TYPE : setType ( ( JvmTypeReference ) newValue ) ; return ; case XbasePackage . XINSTANCE_OF_EXPRESSION__EXPRESSION : setExpression ( ( XExpression ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ; |
public class RBBIRuleScanner { void nextChar ( RBBIRuleChar c ) { } } | // Unicode Character constants needed for the processing done by nextChar ( ) ,
// in hex because literals wont work on EBCDIC machines .
fScanIndex = fNextIndex ; c . fChar = nextCharLL ( ) ; c . fEscaped = false ; // check for ' ' sequence .
// These are recognized in all contexts , whether in quoted text or not .
if... |
public class AppServicePlansInner { /** * Get all Virtual Networks associated with an App Service plan .
* Get all Virtual Networks associated with an App Service plan .
* @ param resourceGroupName Name of the resource group to which the resource belongs .
* @ param name Name of the App Service plan .
* @ throw... | return listVnetsWithServiceResponseAsync ( resourceGroupName , name ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class SourceLineAnnotation { /** * Factory method for creating a source line annotation describing the
* source line numbers for a range of instructions in the method being
* visited by the given visitor .
* @ param classContext
* the ClassContext
* @ param visitor
* a BetterVisitor which is visiting... | if ( startPC > endPC ) { throw new IllegalArgumentException ( "Start pc " + startPC + " greater than end pc " + endPC ) ; } LineNumberTable lineNumberTable = getLineNumberTable ( visitor ) ; String className = visitor . getDottedClassName ( ) ; String sourceFile = visitor . getSourceFile ( ) ; if ( lineNumberTable == n... |
public class GroupReader { /** * Entry point for processing group definitions .
* @ param file project file
* @ param fixedData group fixed data
* @ param varData group var data
* @ param fontBases map of font bases */
public void process ( ProjectFile file , FixedData fixedData , Var2Data varData , Map < Integ... | int groupCount = fixedData . getItemCount ( ) ; for ( int groupLoop = 0 ; groupLoop < groupCount ; groupLoop ++ ) { byte [ ] groupFixedData = fixedData . getByteArrayValue ( groupLoop ) ; if ( groupFixedData == null || groupFixedData . length < 4 ) { continue ; } Integer groupID = Integer . valueOf ( MPPUtility . getIn... |
public class TimeParametersImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setSetUpTime ( Parameter newSetUpTime ) { } } | if ( newSetUpTime != setUpTime ) { NotificationChain msgs = null ; if ( setUpTime != null ) msgs = ( ( InternalEObject ) setUpTime ) . eInverseRemove ( this , EOPPOSITE_FEATURE_BASE - BpsimPackage . TIME_PARAMETERS__SET_UP_TIME , null , msgs ) ; if ( newSetUpTime != null ) msgs = ( ( InternalEObject ) newSetUpTime ) . ... |
public class MetricAdjustmentImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setHBaselineIncrement ( Integer newHBaselineIncrement ) { } } | Integer oldHBaselineIncrement = hBaselineIncrement ; hBaselineIncrement = newHBaselineIncrement ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . METRIC_ADJUSTMENT__HBASELINE_INCREMENT , oldHBaselineIncrement , hBaselineIncrement ) ) ; |
public class appflowglobal_appflowpolicy_binding { /** * Use this API to fetch filtered set of appflowglobal _ appflowpolicy _ binding resources .
* filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */
public static appflowglobal_appflowpolicy_binding [ ] get_filtered ( nitro_service ... | appflowglobal_appflowpolicy_binding obj = new appflowglobal_appflowpolicy_binding ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; appflowglobal_appflowpolicy_binding [ ] response = ( appflowglobal_appflowpolicy_binding [ ] ) obj . getfiltered ( service , option ) ; return response ; |
public class GetPresetRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetPresetRequest getPresetRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getPresetRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getPresetRequest . getName ( ) , NAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) ,... |
public class PushbackReader { /** * Reads characters into a portion of an array .
* @ param cbuf Destination buffer
* @ param off Offset at which to start writing characters
* @ param len Maximum number of characters to read
* @ return The number of characters read , or - 1 if the end of the
* stream has been... | synchronized ( lock ) { ensureOpen ( ) ; try { if ( len <= 0 ) { if ( len < 0 ) { throw new IndexOutOfBoundsException ( ) ; } else if ( ( off < 0 ) || ( off > cbuf . length ) ) { throw new IndexOutOfBoundsException ( ) ; } return 0 ; } int avail = buf . length - pos ; if ( avail > 0 ) { if ( len < avail ) avail = len ;... |
public class CmsFieldsList { /** * Returns the configured fields of the current field configuration .
* @ return the configured fields of the current field configuration */
private List < CmsSearchField > getFields ( ) { } } | CmsSearchManager manager = OpenCms . getSearchManager ( ) ; I_CmsSearchFieldConfiguration fieldConfig = manager . getFieldConfiguration ( getParamFieldconfiguration ( ) ) ; List < CmsSearchField > result ; if ( fieldConfig != null ) { result = fieldConfig . getFields ( ) ; } else { result = Collections . emptyList ( ) ... |
public class diff_match_patch { /** * Compute the Levenshtein distance ; the number of inserted , deleted or
* substituted characters .
* @ param diffs
* LinkedList of Diff objects .
* @ return Number of changes . */
public int diff_levenshtein ( LinkedList < Diff > diffs ) { } } | int levenshtein = 0 ; int insertions = 0 ; int deletions = 0 ; for ( Diff aDiff : diffs ) { switch ( aDiff . operation ) { case INSERT : insertions += aDiff . text . length ( ) ; break ; case DELETE : deletions += aDiff . text . length ( ) ; break ; case EQUAL : // A deletion and an insertion is one substitution .
leve... |
public class DescribeTimeToLiveRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeTimeToLiveRequest describeTimeToLiveRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( describeTimeToLiveRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeTimeToLiveRequest . getTableName ( ) , TABLENAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JS... |
public class Project { /** * Helper to print comma , semi colon , double slash etc . inside velocity foreach loop . < br >
* Example : < code > $ { enumValue . name } ( " $ enumValue . value " ) $ project . print ( $ velocityHasNext , " , / / " , " ; " ) < / code >
* @ param velocityHasNext special velocity var ava... | return velocityHasNext ? whenTrue : whenFalse ; |
public class SoyTypeRegistry { /** * Factory function which creates a union type , given the member types . This folds identical union
* types together .
* @ param members The members of the union .
* @ return The union type . */
public SoyType getOrCreateUnionType ( Collection < SoyType > members ) { } } | SoyType type = UnionType . of ( members ) ; if ( type . getKind ( ) == SoyType . Kind . UNION ) { type = unionTypes . intern ( ( UnionType ) type ) ; } return type ; |
public class RunScriptProcess { /** * Lookup this record for this recordowner .
* @ param The record ' s name .
* @ return The record with this name ( or null if not found ) . */
public Record getRecord ( String strFileName ) { } } | Record record = super . getRecord ( strFileName ) ; if ( record == null ) if ( Script . SCRIPT_FILE . equalsIgnoreCase ( strFileName ) ) record = new Script ( this ) ; return record ; |
public class EJBInjectionBinding { /** * d432816 */
private Class < ? > loadClass ( String className , boolean required ) throws InjectionConfigurationException { } } | if ( className == null || className . equals ( "" ) || ivClassLoader == null ) // F743-32443
{ return null ; } final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "loadClass : " + className ) ; Class < ? > loadedClass = null ; try { loadedCl... |
public class BpmnExportHelper { /** * This deals with creating and drawing subprocess elements like exception
* handler
* @ param process
* @ param processVO
* @ throws XmlException */
private void addSubprocesses ( TBaseElement process , Process processVO ) { } } | List < Process > subprocs = processVO . getSubprocesses ( ) ; if ( subprocs != null ) { for ( Process subproc : subprocs ) { // Add for subprocesses
XmlObject flow = getProcessFlowElement ( process ) ; if ( flow != null ) { // Convert for substitutes
flow = substitute ( flow , SubProcessDocument . type . getDocumentEle... |
public class AnalyticsContext { /** * Fill this instance with device info from the provided { @ link Context } . */
void putDevice ( Context context , boolean collectDeviceID ) { } } | Device device = new Device ( ) ; String identifier = collectDeviceID ? getDeviceId ( context ) : traits ( ) . anonymousId ( ) ; device . put ( Device . DEVICE_ID_KEY , identifier ) ; device . put ( Device . DEVICE_MANUFACTURER_KEY , Build . MANUFACTURER ) ; device . put ( Device . DEVICE_MODEL_KEY , Build . MODEL ) ; d... |
public class N { /** * The present order is kept in the result list .
* @ param a
* @ param fromIndex
* @ param toIndex
* @ param n
* @ param cmp
* @ return */
@ SuppressWarnings ( "rawtypes" ) public static < T > List < T > topp ( final T [ ] a , final int fromIndex , final int toIndex , final int n , fina... | N . checkArgNotNegative ( n , "n" ) ; if ( n == 0 ) { return new ArrayList < > ( ) ; } else if ( n >= toIndex - fromIndex ) { return N . toList ( a , fromIndex , toIndex ) ; } final Comparator < Indexed < T > > comparator = cmp == null ? ( Comparator ) new Comparator < Indexed < Comparable > > ( ) { @ Override public i... |
public class Matrix { /** * Converts Euler angles to a rotation matrix
* @ param rm returns the result
* @ param rmOffset index into rm where the result matrix starts
* @ param x angle of rotation , in degrees
* @ param y angle of rotation , in degrees
* @ param z angle of rotation , in degrees */
public stat... | x *= ( float ) ( Math . PI / 180.0f ) ; y *= ( float ) ( Math . PI / 180.0f ) ; z *= ( float ) ( Math . PI / 180.0f ) ; float cx = ( float ) Math . cos ( x ) ; float sx = ( float ) Math . sin ( x ) ; float cy = ( float ) Math . cos ( y ) ; float sy = ( float ) Math . sin ( y ) ; float cz = ( float ) Math . cos ( z ) ; ... |
public class DOReaderCache { /** * remove expired entries from the cache */
public final void removeExpired ( ) { } } | mapLock . lock ( ) ; Iterator < Entry < String , TimestampedCacheEntry < DOReader > > > entries = cacheMap . entrySet ( ) . iterator ( ) ; if ( entries . hasNext ( ) ) { long now = System . currentTimeMillis ( ) ; while ( entries . hasNext ( ) ) { Entry < String , TimestampedCacheEntry < DOReader > > entry = entries . ... |
public class HtmlQuoting { /** * Quote the given item to make it html - safe .
* @ param item the string to quote
* @ return the quoted string */
public static String quoteHtmlChars ( String item ) { } } | if ( item == null ) { return null ; } byte [ ] bytes = item . getBytes ( ) ; if ( needsQuoting ( bytes , 0 , bytes . length ) ) { ByteArrayOutputStream buffer = new ByteArrayOutputStream ( ) ; try { quoteHtmlChars ( buffer , bytes , 0 , bytes . length ) ; } catch ( IOException ioe ) { // Won ' t happen , since it is a ... |
public class AbstractPlugin { /** * Plugs with the specified data model and the args from request .
* @ param dataModel dataModel
* @ param context context */
public void plug ( final Map < String , Object > dataModel , final RequestContext context ) { } } | String content = ( String ) dataModel . get ( Plugin . PLUGINS ) ; if ( null == content ) { dataModel . put ( Plugin . PLUGINS , "" ) ; } handleLangs ( dataModel ) ; fillDefault ( dataModel ) ; postPlug ( dataModel , context ) ; content = ( String ) dataModel . get ( Plugin . PLUGINS ) ; final StringBuilder contentBuil... |
public class StackTracePrinter { /** * Method prints the stack trace of the calling thread in a human readable way .
* @ param message the reason for printing the stack trace .
* @ param logger the logger used for printing .
* @ param logLevel the log level used for logging the stack trace . */
public static void... | StackTraceElement [ ] stackTrace = Thread . currentThread ( ) . getStackTrace ( ) ; printStackTrace ( message , Arrays . copyOfRange ( stackTrace , 2 , stackTrace . length ) , logger , logLevel ) ; |
public class PreviewImageView { /** * Check image bounday against imageView */
private void checkMatrixBounds ( ) { } } | RectF rect = getMatrixRectF ( ) ; float deltaX = 0 , deltaY = 0 ; final float viewWidth = getWidth ( ) ; final float viewHeight = getHeight ( ) ; // Check if image boundary exceeds imageView boundary
if ( rect . top > 0 && isCheckTopAndBottom ) { deltaY = - rect . top ; } if ( rect . bottom < viewHeight && isCheckTopAn... |
public class DecisionTableImpl { /** * No hits matched for the DT , so calculate result based on default outputs */
private Object defaultToOutput ( EvaluationContext ctx , FEEL feel ) { } } | Map < String , Object > values = ctx . getAllValues ( ) ; if ( outputs . size ( ) == 1 ) { Object value = feel . evaluate ( outputs . get ( 0 ) . getDefaultValue ( ) , values ) ; return value ; } else { // zip outputEntries with its name :
return IntStream . range ( 0 , outputs . size ( ) ) . boxed ( ) . collect ( toMa... |
public class ApplicationSecurityGroupsInner { /** * Creates or updates an application security group .
* @ param resourceGroupName The name of the resource group .
* @ param applicationSecurityGroupName The name of the application security group .
* @ param parameters Parameters supplied to the create or update A... | return ServiceFuture . fromResponse ( beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , applicationSecurityGroupName , parameters ) , serviceCallback ) ; |
public class ParametersSupport { /** * Internal helper method that will consume all raw parameters until we find the specified name
* or if the name is null , then that will be the same as " consume all " .
* @ param name
* @ return */
private Buffer consumeUntil ( final Buffer name ) { } } | try { while ( this . params . hasReadableBytes ( ) ) { SipParser . consumeSEMI ( this . params ) ; final Buffer [ ] keyValue = SipParser . consumeGenericParam ( this . params ) ; ensureParamsMap ( ) ; final Buffer value = keyValue [ 1 ] == null ? Buffers . EMPTY_BUFFER : keyValue [ 1 ] ; this . paramMap . put ( keyValu... |
public class PhoneNumberProvisioningManagerProvider { /** * Tries to retrieve the manager from the Servlet context . If it ' s not there it creates is , stores it
* in the context and also returns it .
* @ param context
* @ return */
public PhoneNumberProvisioningManager get ( ) { } } | PhoneNumberProvisioningManager manager = ( PhoneNumberProvisioningManager ) context . getAttribute ( "PhoneNumberProvisioningManager" ) ; if ( manager != null ) // ok , it ' s already in the context . Return it
return manager ; manager = create ( ) ; // put it into the context for next time that is requested
context . ... |
public class MediaFidelityImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case AfplibPackage . MEDIA_FIDELITY__STP_MED_EX : return getStpMedEx ( ) ; case AfplibPackage . MEDIA_FIDELITY__RESERVED : return getReserved ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; |
public class Processor { /** * Transforms an input file into HTML using the given Configuration .
* @ param file
* The File to process .
* @ param configuration
* the Configuration
* @ return The processed String .
* @ throws IOException
* if an IO error occurs
* @ since 0.7
* @ see Configuration */
p... | final FileInputStream input = new FileInputStream ( file ) ; final String ret = process ( input , configuration ) ; input . close ( ) ; return ret ; |
public class AbstractDateProcessorBuilder { /** * 日時のフォーマッタを作成する 。
* < p > アノテーション { @ link CsvDateTimeFormat } が付与されていない場合は 、 各種タイプごとの標準の書式で作成する 。 < / p >
* @ param field プロパティ情報
* @ param config システム設定
* @ return { @ link DateFormatWrapper } のインスタンス 。 */
@ SuppressWarnings ( "unchecked" ) protected Date... | final Optional < CsvDateTimeFormat > formatAnno = field . getAnnotation ( CsvDateTimeFormat . class ) ; if ( ! formatAnno . isPresent ( ) ) { return new DateFormatWrapper < > ( new SimpleDateFormat ( getDefaultPattern ( ) ) , ( Class < T > ) field . getType ( ) ) ; } String pattern = formatAnno . get ( ) . pattern ( ) ... |
public class DefaultZoomableController { /** * Maps array of 2D points from view - absolute to image - relative coordinates .
* This does NOT take into account the zoomable transformation .
* Points are represented by a float array of [ x0 , y0 , x1 , y1 , . . . ] .
* @ param destPoints destination array ( may be... | for ( int i = 0 ; i < numPoints ; i ++ ) { destPoints [ i * 2 + 0 ] = ( srcPoints [ i * 2 + 0 ] - mImageBounds . left ) / mImageBounds . width ( ) ; destPoints [ i * 2 + 1 ] = ( srcPoints [ i * 2 + 1 ] - mImageBounds . top ) / mImageBounds . height ( ) ; } |
public class TemplateAstMatcher { /** * Returns whether the template matches an AST structure node starting with
* node , taking into account the template parameters that were provided to
* this matcher .
* Here only the template shape is checked , template local declarations and
* parameters are checked later ... | while ( template != null ) { if ( ast == null || ! matchesNodeShape ( template , ast ) ) { return false ; } template = template . getNext ( ) ; ast = ast . getNext ( ) ; } return true ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link String } { @ code > } */
@ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "typeId" , scope = GetObjectRelationships . class ) public JAXBElement < String > createGetObjectR... | return new JAXBElement < String > ( _GetTypeChildrenTypeId_QNAME , String . class , GetObjectRelationships . class , value ) ; |
public class DelegatingMetaTagHandler { /** * < p class = " changed _ added _ 2_0 _ rev _ a " > Invoke the < code > apply ( ) < / code >
* method on this instance ' s { @ link TagHandler # nextHandler } . < / p >
* @ param ctx the < code > FaceletContext < / code > for this view execution
* @ param c the < code >... | // first allow c to get populated
this . nextHandler . apply ( ctx , c ) ; |
public class ReviewResultDetailMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ReviewResultDetail reviewResultDetail , ProtocolMarshaller protocolMarshaller ) { } } | if ( reviewResultDetail == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( reviewResultDetail . getActionId ( ) , ACTIONID_BINDING ) ; protocolMarshaller . marshall ( reviewResultDetail . getSubjectId ( ) , SUBJECTID_BINDING ) ; protocolMars... |
public class TextUtility { /** * 是否全为英文
* @ param text
* @ return */
public static boolean isAllLetter ( String text ) { } } | for ( int i = 0 ; i < text . length ( ) ; ++ i ) { char c = text . charAt ( i ) ; if ( ( ( ( c < 'a' || c > 'z' ) ) && ( ( c < 'A' || c > 'Z' ) ) ) ) { return false ; } } return true ; |
public class CompilingLoader { /** * Returns the classes which need compilation . */
private void findAllModifiedClasses ( String name , PathImpl sourceDir , PathImpl classDir , String sourcePath , ArrayList < String > sources ) throws IOException , ClassNotFoundException { } } | String [ ] list ; try { list = sourceDir . list ( ) ; } catch ( IOException e ) { return ; } for ( int i = 0 ; list != null && i < list . length ; i ++ ) { if ( list [ i ] . startsWith ( "." ) ) continue ; if ( _excludedDirectories . contains ( list [ i ] ) ) continue ; PathImpl subSource = sourceDir . lookup ( list [ ... |
public class Queue { /** * Returns the next item on the queue or null if the queue is
* empty . This method will not block waiting for an item to be added
* to the queue . */
public synchronized T getNonBlocking ( ) { } } | if ( _count == 0 ) { return null ; } // pull the object off , and clear our reference to it
T retval = _items [ _start ] ; _items [ _start ] = null ; _start = ( _start + 1 ) % _size ; _count -- ; return retval ; |
public class BoxApiFile { /** * Gets a request that gets the collaborations of a file
* @ param id id of file to request collaborations of
* @ return request to get collaborations */
public BoxRequestsFile . GetCollaborations getCollaborationsRequest ( String id ) { } } | BoxRequestsFile . GetCollaborations request = new BoxRequestsFile . GetCollaborations ( id , getFileCollaborationsUrl ( id ) , mSession ) ; return request ; |
public class MoreTables { /** * Gets the value of { @ code rowKey } and { @ code columnKey } from { @ code table } , or computes
* the value using { @ code valueFunction } and inserts it into the table .
* @ param table the table
* @ param rowKey the row key
* @ param columnKey the column key
* @ param valueF... | /* @ Nullable */
V value = table . get ( rowKey , columnKey ) ; if ( value == null ) { value = valueFunction . apply ( rowKey , columnKey ) ; table . put ( rowKey , columnKey , value ) ; } return value ; |
public class TextureFutureHelper { /** * Gets an immutable { @ linkplain GVRBitmapTexture texture } with the specified color ,
* returning a cached instance if possible .
* @ param color An Android { @ link Color } .
* @ return And immutable instance of { @ link GVRBitmapTexture } . */
public GVRBitmapTexture get... | GVRBitmapTexture texture ; synchronized ( mColorTextureCache ) { texture = mColorTextureCache . get ( color ) ; Log . d ( TAG , "getSolidColorTexture(): have cached texture for 0x%08X: %b" , color , texture != null ) ; if ( texture == null ) { texture = new ImmutableBitmapTexture ( mContext , makeSolidColorBitmap ( col... |
public class OHLCChart { private void sanityCheck ( String seriesName , double [ ] openData , double [ ] highData , double [ ] lowData , double [ ] closeData ) { } } | checkData ( seriesName , "Open" , openData ) ; checkData ( seriesName , "High" , highData ) ; checkData ( seriesName , "Low" , lowData ) ; checkData ( seriesName , "Close" , closeData ) ; checkDataLengths ( seriesName , "Open" , "Close" , openData , closeData ) ; checkDataLengths ( seriesName , "High" , "Close" , highD... |
public class ProcessSection { /** * reflectively runs the relevant method */
protected Integer invokeSection ( ) { } } | try { // run object is a JavaProcessRunner
S runner = getRunner ( getRunObject ( ) ) ; if ( run_method_str == null ) return null ; createRunMethod ( param_types , runner ) ; Object [ ] local_params = ( Object [ ] ) params . clone ( ) ; Integer result_code = ( Integer ) run_method . invoke ( runner , local_params ) ; re... |
public class ScreenVideo { /** * { @ inheritDoc } */
@ Override public boolean addData ( IoBuffer data ) { } } | if ( ! this . canHandleData ( data ) ) { return false ; } data . get ( ) ; this . updateSize ( data ) ; int idx = 0 ; int pos = 0 ; byte [ ] tmpData = new byte [ this . blockDataSize ] ; int countBlocks = this . blockCount ; while ( data . remaining ( ) > 0 && countBlocks > 0 ) { short size = data . getShort ( ) ; coun... |
public class HttpOutputStream { public Writer getWriter ( String encoding ) throws IOException { } } | if ( encoding == null || StringUtil . __ISO_8859_1 . equalsIgnoreCase ( encoding ) || "ISO8859_1" . equalsIgnoreCase ( encoding ) ) return getISO8859Writer ( ) ; if ( "UTF-8" . equalsIgnoreCase ( encoding ) || "UTF8" . equalsIgnoreCase ( encoding ) ) return getUTF8Writer ( ) ; if ( "US-ASCII" . equalsIgnoreCase ( encod... |
public class AbstractChemistryManipulator { /** * recycles and set stereo information on firstContaner
* @ param firstContainer a first molecule instance of { @ link AbstractMolecule }
* @ param firstRgroup atom to remove , instance of { @ link IAtomBase }
* @ param secondContainer a second molecule , instance of... | IStereoElementBase stereo = null ; boolean result = false ; if ( firstContainer . isSingleStereo ( firstRgroup ) ) { stereo = getStereoInformation ( firstContainer , firstRgroup , atom2 , atom1 ) ; } if ( secondContainer . isSingleStereo ( secondRgroup ) ) { stereo = getStereoInformation ( secondContainer , secondRgrou... |
public class STOImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case AfplibPackage . STO__IORNTION : return getIORNTION ( ) ; case AfplibPackage . STO__BORNTION : return getBORNTION ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; |
public class LeapSeconds { /** * / * [ deutsch ]
* < p > Ermittelt das zum angegebenen UTC - Zeitstempel n & auml ; chste
* Schaltsekundenereignis . < / p >
* @ param utc elapsed SI - seconds relative to UTC epoch
* [ 1972-01-01T00:00:00Z ] including leap seconds
* @ return following leap second event or { @ ... | ExtendedLSE [ ] events = this . getEventsInDescendingOrder ( ) ; LeapSecondEvent result = null ; for ( int i = 0 ; i < events . length ; i ++ ) { ExtendedLSE lse = events [ i ] ; if ( utc >= lse . utc ( ) ) { break ; } else { result = lse ; } } return result ; |
public class AwsSecurityFindingFilters { /** * The name of the image related to a finding .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setResourceContainerImageName ( java . util . Collection ) } or
* { @ link # withResourceContainerImageName ( java . ... | if ( this . resourceContainerImageName == null ) { setResourceContainerImageName ( new java . util . ArrayList < StringFilter > ( resourceContainerImageName . length ) ) ; } for ( StringFilter ele : resourceContainerImageName ) { this . resourceContainerImageName . add ( ele ) ; } return this ; |
public class RequestConnection { /** * the headless inTrace client aims to allow the user to have method - level granularity ,
* when deciding what events they want to see .
* This makes things complicated , because the InTrace server agent only supports class granularity .
* This method makes it easy for the con... | if ( getTraceWriter ( ) . getTraceFilterExt ( ) instanceof IncludeAnyOfTheseEventsFilterExt ) { IncludeAnyOfTheseEventsFilterExt myFilter = ( IncludeAnyOfTheseEventsFilterExt ) getTraceWriter ( ) . getTraceFilterExt ( ) ; ClassInstrumentationCommand cic = new ClassInstrumentationCommand ( ) ; cic . setIncludeClassRegEx... |
public class ObjenesisHelper { /** * Will create an object just like it ' s done by ObjectInputStream . readObject ( the default
* constructor of the first non serializable class will be called )
* @ param < T > Type instantiated
* @ param clazz Class to instantiate
* @ return New instance of clazz */
public st... | return OBJENESIS_SERIALIZER . newInstance ( clazz ) ; |
public class AbstractCache { /** * This method adds specified SequenceElement to vocabulary
* @ param element the word to add */
@ Override public boolean addToken ( T element ) { } } | boolean ret = false ; T oldElement = vocabulary . putIfAbsent ( element . getStorageId ( ) , element ) ; if ( oldElement == null ) { // putIfAbsent added our element
if ( element . getLabel ( ) != null ) { extendedVocabulary . put ( element . getLabel ( ) , element ) ; } oldElement = element ; ret = true ; } else { old... |
public class WsEchoServer { /** * Handle upgrade confirmation .
* @ param event the event
* @ param channel the channel */
@ Handler public void onUpgraded ( Upgraded event , IOSubchannel channel ) { } } | if ( ! openChannels . contains ( channel ) ) { return ; } channel . respond ( Output . from ( "/Greetings!" , true ) ) ; |
public class RegistriesInner { /** * Gets the properties of the specified container registry .
* @ param resourceGroupName The name of the resource group to which the container registry belongs .
* @ param registryName The name of the container registry .
* @ throws IllegalArgumentException thrown if parameters f... | return getByResourceGroupWithServiceResponseAsync ( resourceGroupName , registryName ) . map ( new Func1 < ServiceResponse < RegistryInner > , RegistryInner > ( ) { @ Override public RegistryInner call ( ServiceResponse < RegistryInner > response ) { return response . body ( ) ; } } ) ; |
public class FsPermission { /** * Write { @ link FsPermission } to { @ link DataInput } */
public static void write ( DataOutput out , FsPermission masked ) throws IOException { } } | FsPermission perm = new FsPermission ( masked ) ; perm . write ( out ) ; |
public class SimpleMisoSceneModel { /** * Get the index into the baseTileIds [ ] for the specified
* x and y coordinates , or return - 1 if the specified coordinates
* are outside of the viewable area .
* Assumption : The viewable area is centered and aligned as far
* to the top of the isometric scene as possib... | // check to see if the index lies in one of the " fat " rows
if ( ( ( x + y ) & 1 ) == ( vwidth & 1 ) ) { int col = ( vwidth + x - y ) >> 1 ; int row = x - col ; if ( ( col < 0 ) || ( col > vwidth ) || ( row < 0 ) || ( row >= vheight ) ) { return - 1 ; // out of view
} return ( vwidth + 1 ) * row + col ; } else { // th... |
public class WebSocketExtensionFactory { /** * Creates a new instance of WebSocketExtensionFactory . It uses the specified { @ link ClassLoader } to load
* { @ link WebSocketExtensionFactorySpi } objects that are registered using META - INF / services .
* @ return WebSocketExtensionFactory */
public static WebSocke... | ServiceLoader < WebSocketExtensionFactorySpi > services = load ( WebSocketExtensionFactorySpi . class , cl ) ; return newInstance ( services ) ; |
public class ResourceName { /** * Creates a new resource name from a template and a value assignment for variables .
* @ throws ValidationException if not all variables in the template are bound . */
public static ResourceName create ( PathTemplate template , Map < String , String > values ) { } } | if ( ! values . keySet ( ) . containsAll ( template . vars ( ) ) ) { Set < String > unbound = Sets . newLinkedHashSet ( template . vars ( ) ) ; unbound . removeAll ( values . keySet ( ) ) ; throw new ValidationException ( "unbound variables: %s" , unbound ) ; } return new ResourceName ( template , values , null ) ; |
public class GroovyRowResult { /** * Retrieve the value of the property by its index .
* A negative index will count backwards from the last column .
* @ param index is the number of the column to look at
* @ return the value of the property */
public Object getAt ( int index ) { } } | try { // a negative index will count backwards from the last column .
if ( index < 0 ) index += result . size ( ) ; Iterator it = result . values ( ) . iterator ( ) ; int i = 0 ; Object obj = null ; while ( ( obj == null ) && ( it . hasNext ( ) ) ) { if ( i == index ) obj = it . next ( ) ; else it . next ( ) ; i ++ ; }... |
public class NullAway { /** * does the constructor invoke another constructor in the same class via this ( . . . ) ? */
private boolean constructorInvokesAnother ( MethodTree constructor , VisitorState state ) { } } | BlockTree body = constructor . getBody ( ) ; List < ? extends StatementTree > statements = body . getStatements ( ) ; if ( statements . size ( ) > 0 ) { StatementTree statementTree = statements . get ( 0 ) ; if ( isThisCall ( statementTree , state ) ) { return true ; } } return false ; |
public class ParameterizedTypeReference { /** * Here we already know that we don ' t have type arguments */
private boolean isRawType ( JvmTypeParameter current , RecursionGuard < JvmTypeParameter > guard ) { } } | if ( guard . tryNext ( current ) ) { List < JvmTypeConstraint > constraints = current . getConstraints ( ) ; for ( int i = 0 , size = constraints . size ( ) ; i < size ; i ++ ) { JvmTypeConstraint constraint = constraints . get ( i ) ; if ( constraint . eClass ( ) == TypesPackage . Literals . JVM_UPPER_BOUND && constra... |
public class Incremental { /** * { @ inheritDoc } */
@ Override public DataBucket combineBuckets ( final DataBucket [ ] pBuckets ) { } } | checkArgument ( pBuckets . length > 0 , "At least one DataBucket must be provided" ) ; // create entire bucket . .
final DataBucket returnVal = new DataBucket ( pBuckets [ 0 ] . getBucketKey ( ) , pBuckets [ 0 ] . getLastBucketPointer ( ) ) ; // . . . iterate through the datas and check if it is stored . .
for ( int i ... |
public class ApiOvhMe { /** * Retrieve payment method ID list
* REST : GET / me / payment / method
* @ param status [ required ] Status
* @ param paymentType [ required ] Payment method type
* API beta */
public ArrayList < Long > payment_thod_GET ( String paymentType , OvhStatus status ) throws IOException { }... | String qPath = "/me/payment/method" ; StringBuilder sb = path ( qPath ) ; query ( sb , "paymentType" , paymentType ) ; query ( sb , "status" , status ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t2 ) ; |
public class SimpleQuery { /** * Sets the fields that this query will return .
* @ param fields The fields that this query will return . */
void setFields ( Field [ ] fields ) { } } | this . fields = fields ; this . resultSetColumnNameIndexMap = null ; this . cachedMaxResultRowSize = null ; this . needUpdateFieldFormats = fields != null ; this . hasBinaryFields = false ; // just in case |
public class ProposalLineItemConstraints { /** * Gets the builtInCreativeRotationType value for this ProposalLineItemConstraints .
* @ return builtInCreativeRotationType * The built - in creative rotation type for the created { @ link
* ProposalLineItem } .
* < p > This attribute is read - only . */
public com . ... | return builtInCreativeRotationType ; |
public class MethodAnnotation { /** * Create a MethodAnnotation from an XMethod .
* @ param xmethod
* the XMethod
* @ return the MethodAnnotation */
public static MethodAnnotation fromXMethod ( XMethod xmethod ) { } } | return fromForeignMethod ( xmethod . getClassName ( ) , xmethod . getName ( ) , xmethod . getSignature ( ) , xmethod . isStatic ( ) ) ; |
public class OracleDdlParser { /** * Utility method to parse a generic statement given a start phrase and statement mixin type .
* @ param tokens the tokenized { @ link DdlTokenStream } of the DDL input content ; may not be null
* @ param stmt _ start _ phrase the string array statement start phrase
* @ param par... | assert tokens != null ; assert stmt_start_phrase != null && stmt_start_phrase . length > 0 ; assert parentNode != null ; markStartOfStatement ( tokens ) ; tokens . consume ( stmt_start_phrase ) ; AstNode result = nodeFactory ( ) . node ( getStatementTypeName ( stmt_start_phrase ) , parentNode , mixinType ) ; parseUntil... |
public class Intersection { /** * modifies by intersecting with another intersection
* @ param arg another intersection */
public void intersectWith ( Intersection < T > arg ) { } } | // if the argument is top then leave all as is
if ( arg . elements != null ) { // if arg is empty , the result is empty
if ( arg . elements . isEmpty ( ) ) elements = Collections . emptySet ( ) ; else { if ( elements == null ) // we have top , the intersection is sub
elements = new HashSet < > ( arg . elements ) ; // c... |
public class DistributedReentrantLockProcess { /** * 解锁
* @ param cacheConfigBean
* @ param key
* @ param valueObj
* @ return
* @ throws Exception */
public static long unLock ( CacheConfigBean cacheConfigBean , String key , Object valueObj ) throws Exception { } } | final LockData lockData = LOCK_THREAD_DATA . get ( ) ; if ( lockData == null ) throw new IllegalMonitorStateException ( "You do not own the lock: " + key ) ; long startNano = System . nanoTime ( ) ; final int newLockCount = lockData . getLockCount ( ) . decrementAndGet ( ) ; if ( newLockCount > 0 ) { return 1 ; } else ... |
public class AABBd { /** * Set < code > this < / code > to the union of < code > this < / code > and the given point < code > p < / code > .
* @ param p
* the point
* @ return this */
public AABBd union ( Vector3dc p ) { } } | return union ( p . x ( ) , p . y ( ) , p . z ( ) , this ) ; |
public class TagsUtils { /** * Configured tags will be validated against the instance tags .
* If one or more tags are missing on the instance , an exception will be thrown .
* @ throws IllegalStateException */
public TagsUtils validateTags ( ) { } } | final List < String > instanceTags = getInstanceTags ( ) . stream ( ) . map ( Tag :: getKey ) . collect ( Collectors . toList ( ) ) ; final List < String > missingTags = getAwsTagNames ( ) . map ( List :: stream ) . orElse ( Stream . empty ( ) ) . filter ( configuredTag -> ! instanceTags . contains ( configuredTag ) ) ... |
public class HttpDownloadHandler { /** * { @ inheritDoc } */
@ Override public DownloadFile download ( URL url ) throws IOException { } } | if ( url == null ) { throw new InvalidArgument ( "url" , url ) ; } final HttpURLConnection huc = ( HttpURLConnection ) url . openConnection ( ) ; FileOutputStream fos = null ; try { huc . setConnectTimeout ( CONNECTION_TIMEOUT ) ; huc . setInstanceFollowRedirects ( true ) ; final int code = huc . getResponseCode ( ) ; ... |
public class ImgUtil { /** * 写出图像为目标文件扩展名对应的格式
* @ param image { @ link Image }
* @ param targetFile 目标文件
* @ throws IORuntimeException IO异常
* @ since 3.1.0 */
public static void write ( Image image , File targetFile ) throws IORuntimeException { } } | ImageOutputStream out = null ; try { out = getImageOutputStream ( targetFile ) ; write ( image , FileUtil . extName ( targetFile ) , out ) ; } finally { IoUtil . close ( out ) ; } |
public class BaseBot { /** * Search for a method whose { @ link Controller # pattern ( ) } match with the { @ code Event } text or payload
* received from Slack / Facebook and also filter out the methods in { @ code methodWrappers } whose
* { @ link Controller # pattern ( ) } do not match .
* @ param text is the ... | if ( methodWrappers != null ) { Iterator < MethodWrapper > listIterator = methodWrappers . listIterator ( ) ; while ( listIterator . hasNext ( ) ) { MethodWrapper methodWrapper = listIterator . next ( ) ; String pattern = methodWrapper . getPattern ( ) ; int patternFlags = methodWrapper . getPatternFlags ( ) ; if ( ! S... |
public class Interval { /** * Gets the gap between this interval and another interval .
* The other interval can be either before or after this interval .
* Intervals are inclusive of the start instant and exclusive of the end .
* An interval has a gap to another interval if there is a non - zero
* duration bet... | interval = DateTimeUtils . getReadableInterval ( interval ) ; long otherStart = interval . getStartMillis ( ) ; long otherEnd = interval . getEndMillis ( ) ; long thisStart = getStartMillis ( ) ; long thisEnd = getEndMillis ( ) ; if ( thisStart > otherEnd ) { return new Interval ( otherEnd , thisStart , getChronology (... |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EEnum getIfcGlobalOrLocalEnum ( ) { } } | if ( ifcGlobalOrLocalEnumEEnum == null ) { ifcGlobalOrLocalEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 845 ) ; } return ifcGlobalOrLocalEnumEEnum ; |
public class CrawlerPack { /** * Creates a cookie with the given name , value , domain attribute ,
* path attribute , expiration attribute , and secure attribute
* @ param name the cookie name
* @ param value the cookie value
* @ param domain the domain this cookie can be sent to
* @ param path the path prefi... | if ( null == name ) { log . warn ( "addCookie: Cookie name null." ) ; return this ; } cookies . add ( new Cookie ( domain , name , value , path , expires , secure ) ) ; return this ; |
public class Java8 { /** * Programmatic emulation of INVOKEDYNAMIC so initialize the callsite via use of the bootstrap method then invoke
* the result .
* @ param executorClass the executor that will contain the lambda function , null if not yet reloaded
* @ param handle bootstrap method handle
* @ param bsmArg... | try { CallSite callsite = callLambdaMetaFactory ( rtype , bsmArgs , lookup , indyNameAndDescriptor , executorClass ) ; return callsite . dynamicInvoker ( ) . invokeWithArguments ( indyParams ) ; } catch ( Throwable t ) { throw new RuntimeException ( t ) ; } |
public class EventPointImpl { /** * / * ( non - Javadoc )
* @ see org . jboss . arquillian . api . InjectionPoint # set ( org . jboss . arquillian . api . Instance ) */
@ Override public void set ( Event < ? > value ) throws InvocationException { } } | try { if ( ! field . isAccessible ( ) ) { field . setAccessible ( true ) ; } field . set ( target , value ) ; } catch ( Exception e ) { throw new InvocationException ( e ) ; } |
public class CommercePriceEntryLocalServiceUtil { /** * Returns the commerce price entry matching the UUID and group .
* @ param uuid the commerce price entry ' s UUID
* @ param groupId the primary key of the group
* @ return the matching commerce price entry
* @ throws PortalException if a matching commerce pr... | return getService ( ) . getCommercePriceEntryByUuidAndGroupId ( uuid , groupId ) ; |
public class FileMgr { /** * Returns the number of blocks in the specified file .
* @ param fileName
* the name of the file
* @ return the number of blocks in the file */
public long size ( String fileName ) { } } | try { IoChannel fileChannel = getFileChannel ( fileName ) ; return fileChannel . size ( ) / BLOCK_SIZE ; } catch ( IOException e ) { throw new RuntimeException ( "cannot access " + fileName ) ; } |
public class OmsRasterReader { /** * Utility method to quickly read a grid in default mode .
* @ param path the path to the file .
* @ return the read coverage .
* @ throws Exception */
public static GridCoverage2D readRaster ( String path ) throws Exception { } } | OmsRasterReader reader = new OmsRasterReader ( ) ; reader . file = path ; reader . process ( ) ; GridCoverage2D geodata = reader . outRaster ; return geodata ; |
public class Sources { /** * Returns the given source as a { @ link Properties }
* @ param contextClass
* @ param resourceName
* @ return
* @ throws IOException */
public static Properties asProperties ( Class < ? > contextClass , String resourceName ) throws IOException { } } | Closer closer = Closer . create ( ) ; try { Properties p = new Properties ( ) ; p . load ( closer . register ( asCharSource ( contextClass , resourceName ) . openStream ( ) ) ) ; return p ; } catch ( Throwable e ) { throw closer . rethrow ( e ) ; } finally { closer . close ( ) ; } |
public class CmsCmisRelationHelper { /** * Fills in an ObjectData record . < p >
* @ param context the call context
* @ param cms the CMS context
* @ param resource the resource for which we want the ObjectData
* @ param relation the relation object
* @ param filter the property filter string
* @ param incl... | ObjectDataImpl result = new ObjectDataImpl ( ) ; ObjectInfoImpl objectInfo = new ObjectInfoImpl ( ) ; result . setProperties ( collectProperties ( cms , resource , relation , filter , objectInfo ) ) ; if ( includeAllowableActions ) { result . setAllowableActions ( collectAllowableActions ( cms , resource , relation ) )... |
public class DynamicReportBuilder { /** * Because the groups are not created until we call the " build ( ) " method ,
* all the subreports that must go inside a group are handled here . */
protected void addSubreportsToGroups ( ) { } } | for ( Integer groupNum : groupFooterSubreports . keySet ( ) ) { List < Subreport > list = groupFooterSubreports . get ( groupNum ) ; DJGroup group = report . getColumnsGroups ( ) . get ( groupNum - 1 ) ; group . getFooterSubreports ( ) . addAll ( list ) ; } for ( Integer groupNum : groupHeaderSubreports . keySet ( ) ) ... |
public class LogSignAlgebra { /** * Gets the compacted version from the sign and natural log . */
public static final double compact ( long sign , double natlog ) { } } | return Double . longBitsToDouble ( sign | ( FLOAT_MASK & Double . doubleToRawLongBits ( natlog ) ) ) ; |
public class QYMenuAPI { /** * 创建自定义菜单 。
* @ param menu 自定义菜单
* @ param agentId 需要生成菜单的应用ID
* @ return 操作结果 */
public QYResultType create ( QYMenu menu , String agentId ) { } } | BeanUtil . requireNonNull ( menu , "菜单不能为空!" ) ; String url = BASE_API_URL + "cgi-bin/menu/create?access_token=#&agentid=" + agentId ; BaseResponse response = executePost ( url , JSONUtil . toJson ( menu ) ) ; return QYResultType . get ( response . getErrcode ( ) ) ; |
public class NodeEntryImpl { /** * Extract a username from a " username @ hostname " pattern .
* @ param hostname value
* @ return username extracted , or null */
public static String extractUserName ( final String hostname ) { } } | if ( containsUserName ( hostname ) ) { return hostname . substring ( 0 , hostname . indexOf ( "@" ) ) ; } else { return null ; } |
public class DCacheBase { /** * enableListener - enable or disable the invalidation , change and preInvalidation listener support . You must call
* enableListener ( true ) before calling addInvalidationListner ( ) , addChangeListener ( ) or
* addPreInvalidationListener ( ) .
* @ param enable
* - true to enable ... | boolean success = true ; if ( enable && eventSource == null ) { success = initEventSource ( ) ; } bEnableListener = enable ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "enableListener() cacheName=" + this . cacheName + " enable=" + enable + " success=" + success + " ignoreValueInInvalidationEvent=" + this . ign... |
public class SegmentsResponse { /** * The list of segments .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setItem ( java . util . Collection ) } or { @ link # withItem ( java . util . Collection ) } if you want to override the
* existing values .
* @ p... | if ( this . item == null ) { setItem ( new java . util . ArrayList < SegmentResponse > ( item . length ) ) ; } for ( SegmentResponse ele : item ) { this . item . add ( ele ) ; } return this ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.