signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class DisassociateNodeRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DisassociateNodeRequest disassociateNodeRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( disassociateNodeRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( disassociateNodeRequest . getServerName ( ) , SERVERNAME_BINDING ) ; protocolMarshaller . marshall ( disassociateNodeRequest . getNodeName ( ) , NODENAME_BINDING...
public class TextToSpeech { /** * List custom models . * Lists metadata such as the name and description for all custom voice models that are owned by an instance of the * service . Specify a language to list the voice models for that language only . To see the words in addition to the * metadata for a specific v...
String [ ] pathSegments = { "v1/customizations" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "text_to_speech" , "v1" , "listVoiceModels" ) ; for ( Entry < String , String > he...
public class JobSchedulesImpl { /** * Adds a job schedule to the specified account . * @ param cloudJobSchedule The job schedule to be added . * @ param jobScheduleAddOptions Additional parameters for the operation * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws BatchErro...
addWithServiceResponseAsync ( cloudJobSchedule , jobScheduleAddOptions ) . toBlocking ( ) . single ( ) . body ( ) ;
public class Files { /** * Reads a { @ link File } and returns the data as a byte array */ public static byte [ ] readBytes ( File file ) throws IOException { } }
FileInputStream fis = null ; ByteArrayOutputStream bos = null ; if ( file == null ) { throw new FileNotFoundException ( "No file specified" ) ; } try { fis = new FileInputStream ( file ) ; bos = new ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ BUFFER_SIZE ] ; int remaining ; while ( ( remaining = fis . read...
public class AbstractCollectionView { /** * ( non - Javadoc ) * @ see com . ibm . ws . objectManager . Collection # contains ( com . ibm . ws . objectManager . Token , com . ibm . ws . objectManager . Transaction ) */ public boolean contains ( Token token , Transaction transaction ) throws ObjectManagerException { } ...
try { for ( Iterator iterator = iterator ( ) ; iterator . next ( transaction ) != token ; ) ; return true ; } catch ( java . util . NoSuchElementException exception ) { // No FFDC code needed . return false ; } // try .
public class GuiStandardUtils { /** * If aLabel has text which is longer than MAX _ LABEL _ LENGTH , then truncate * the label text and place an ellipsis at the end ; the original text is * placed in a tooltip . * This is particularly useful for displaying file names , whose length can * vary widely between dep...
String originalText = label . getText ( ) ; if ( originalText . length ( ) > UIConstants . MAX_LABEL_LENGTH ) { label . setToolTipText ( originalText ) ; String truncatedText = originalText . substring ( 0 , UIConstants . MAX_LABEL_LENGTH ) + "..." ; label . setText ( truncatedText ) ; }
public class NotificationManager { /** * Search for notifications of interaction type that match the given class name . * @ param interaction * the class that defines the interaction type of desired notifications . * @ return * a List with the notifications founded that match the given class name . */ public Li...
List < Notification > found = new ArrayList < Notification > ( ) ; for ( Notification n : NotificationManager . notifications ) if ( ( ( InteractionNotification ) n ) . getInteraction ( ) . equals ( interaction ) ) { logger . fine ( "...found a match for getByInteraction query. With interaction: " + interaction ) ; fou...
public class ModelsImpl { /** * Create an entity role for an entity in the application . * @ param appId The application ID . * @ param versionId The version ID . * @ param cEntityId The composite entity extractor ID . * @ param createCompositeEntityRoleOptionalParameter the object representing the optional par...
return createCompositeEntityRoleWithServiceResponseAsync ( appId , versionId , cEntityId , createCompositeEntityRoleOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CmsJspResourceWrapper { /** * Reads a resource , suppressing possible exceptions . < p > * @ param sitePath the site path of the resource to read . * @ return the resource of < code > null < / code > on case an exception occurred while reading */ private CmsJspResourceWrapper readResource ( String site...
CmsJspResourceWrapper result = null ; try { result = new CmsJspResourceWrapper ( m_cms , m_cms . readResource ( sitePath ) ) ; } catch ( CmsException e ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( e . getMessage ( ) , e ) ; } } return result ;
public class FrameUtils { /** * Parse given set of URIs and produce a frame ' s key representing output . * @ param okey key for ouput frame . Can be null * @ param uris array of URI ( file : / / , hdfs : / / , s3n : / / , s3a : / / , s3 : / / , http : / / , https : / / . . . ) to parse * @ return a frame which i...
return parseFrame ( okey , null , uris ) ;
public class HelpDoclet { /** * Handles javadoc command line options . The first entry in the { @ code options } array is the * option name . Subsequent entries contain the option ' s arguments , the number of which is * determined by the value returned from { @ link # optionLength ( String ) } for that option . ...
boolean hasParsedOption = false ; if ( options [ 0 ] . equals ( SETTINGS_DIR_OPTION ) ) { settingsDir = new File ( options [ 1 ] ) ; isSettingsDirSet = true ; hasParsedOption = true ; } else if ( options [ 0 ] . equals ( DESTINATION_DIR_OPTION ) ) { destinationDir = new File ( options [ 1 ] ) ; hasParsedOption = true ;...
public class ResourceRequestInfo { /** * This method writes the ResourceRequestInfo instance to disk * @ param jsonGenerator The JsonGenerator instance being used to write the * JSON to disk * @ throws IOException */ public void write ( JsonGenerator jsonGenerator ) throws IOException { } }
// We neither need the list of RequestedNodes , nodes , nor excludedHosts , // because we can reconstruct them from the request object jsonGenerator . writeStartObject ( ) ; jsonGenerator . writeObjectField ( "request" , request ) ; jsonGenerator . writeEndObject ( ) ;
public class PhoneNumberUtil { /** * format phone number in E123 national format . * @ param pphoneNumber phone number to format * @ param pcountryCode iso code of country * @ return formated phone number as String */ public final String formatE123National ( final String pphoneNumber , final String pcountryCode )...
return this . formatE123National ( this . parsePhoneNumber ( pphoneNumber , pcountryCode ) ) ;
public class AdHocCommandManager { /** * Responds an error with an specific condition . * @ param response the response to send . * @ param condition the condition of the error . * @ throws NotConnectedException */ private static IQ respondError ( AdHocCommandData response , StanzaError . Condition condition ) { ...
return respondError ( response , StanzaError . getBuilder ( condition ) ) ;
public class CqlDataReaderDAO { /** * Converts a TimeUUID set of endpoints into a { @ link Range } . of { @ link RangeTimeUUID } s . Both end points * are considered closed ; that is , they are included in the range . */ private Range < RangeTimeUUID > toRange ( @ Nullable UUID start , @ Nullable UUID end , boolean r...
// If the range is reversed then start and end will also be reversed and must therefore be swapped . if ( reversed ) { UUID tmp = start ; start = end ; end = tmp ; } if ( start == null ) { if ( end == null ) { return Range . all ( ) ; } else { return Range . atMost ( new RangeTimeUUID ( end ) ) ; } } else if ( end == n...
public class FitLinesToContour { /** * All the corners should be in increasing order from the first anchor . */ boolean sanityCheckCornerOrder ( int numLines , GrowQueue_I32 corners ) { } }
int contourAnchor0 = corners . get ( anchor0 ) ; int previous = 0 ; for ( int i = 1 ; i < numLines ; i ++ ) { int contourIndex = corners . get ( CircularIndex . addOffset ( anchor0 , i , corners . size ( ) ) ) ; int pixelsFromAnchor0 = CircularIndex . distanceP ( contourAnchor0 , contourIndex , contour . size ( ) ) ; i...
public class AbucoinsAccountServiceRaw { /** * Corresponds to < code > GET / payment - methods < / code > * @ return * @ throws IOException */ public AbucoinsPaymentMethod [ ] getPaymentMethods ( ) throws IOException { } }
AbucoinsPaymentMethods paymentMethods = abucoinsAuthenticated . getPaymentMethods ( exchange . getExchangeSpecification ( ) . getApiKey ( ) , signatureCreator , exchange . getExchangeSpecification ( ) . getPassword ( ) , timestamp ( ) ) ; if ( paymentMethods . getPaymentMethods ( ) . length == 1 && paymentMethods . get...
public class ETAPrinter { /** * Initializes a progress bar . * @ param totalElementsToProcess the total number of items that are going to be processed . * @ param stream the { @ link java . io . OutputStream } where the progress bar will be printed * @ param closeStream true if the stream has to be closed at the ...
return init ( null , totalElementsToProcess , stream , closeStream ) ;
public class ClassLoaderUtils { /** * Finds files within a given directory and its subdirectories * @ param classLoader * @ param rootPath the root directory , for example org / sonar / sqale * @ return a list of relative paths , for example { " org / sonar / sqale / foo / bar . txt } . Never null . */ public sta...
return listResources ( classLoader , rootPath , path -> ! StringUtils . endsWith ( path , "/" ) ) ;
public class DurableInputHandler { /** * Attempt to create a durable subscription on a remote ME . * @ param MP The MessageProcessor . * @ param subState State describing the subscription to create . * @ param remoteME The ME where the subscription should be created . */ public static void createRemoteDurableSubs...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createRemoteDurableSubscription" , new Object [ ] { MP , subState , remoteMEUuid , destinationID } ) ; // Issue the request via the DurableInputHandler int status = issueCreateDurableRequest ( MP , subState , remoteMEUuid ,...
public class ElementMatchers { /** * Matches { @ link MethodDescription } s that match a matched method ' s return type . * @ param matcher A matcher to apply onto a matched method ' s return type . * @ param < T > The type of the matched object . * @ return An element matcher that matches a given return type aga...
return new MethodReturnTypeMatcher < T > ( matcher ) ;
public class NamespaceMap { /** * Add a replica ' s meta information into the map * @ param replicaInfo * a replica ' s meta information * @ return previous meta information of the replica * @ throws IllegalArgumentException * if the input parameter is null */ DatanodeBlockInfo addBlockInfo ( Block block , Da...
return getBlockBucket ( block ) . addBlockInfo ( block , replicaInfo ) ;
public class CPDefinitionLocalizationUtil { /** * Returns the last cp definition localization in the ordered set where CPDefinitionId = & # 63 ; . * @ param CPDefinitionId the cp definition ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the las...
return getPersistence ( ) . fetchByCPDefinitionId_Last ( CPDefinitionId , orderByComparator ) ;
public class DependencyTable { /** * SKS - O */ public boolean removeEntry ( Object dependency , Object entry ) { } }
// SKS - O boolean found = false ; ValueSet valueSet = ( ValueSet ) dependencyToEntryTable . get ( dependency ) ; if ( valueSet == null ) { return found ; } found = valueSet . remove ( entry ) ; if ( valueSet . size ( ) == 0 ) removeDependency ( dependency ) ; return found ;
public class Roster { /** * Fires roster presence changed event to roster listeners . * @ param presence the presence change . */ private void fireRosterPresenceEvent ( final Presence presence ) { } }
synchronized ( rosterListenersAndEntriesLock ) { for ( RosterListener listener : rosterListeners ) { listener . presenceChanged ( presence ) ; } }
public class RolesInner { /** * Lists all the roles configured in a data box edge / gateway device . * @ param deviceName The device name . * @ param resourceGroupName The resource group name . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedLis...
return listByDataBoxEdgeDeviceWithServiceResponseAsync ( deviceName , resourceGroupName ) . map ( new Func1 < ServiceResponse < Page < RoleInner > > , Page < RoleInner > > ( ) { @ Override public Page < RoleInner > call ( ServiceResponse < Page < RoleInner > > response ) { return response . body ( ) ; } } ) ;
public class InternalEventBusSkill { /** * This function runs the initialization of the agent . * @ param event the { @ link Initialize } occurrence . */ private void runInitializationStage ( Event event ) { } }
// Immediate synchronous dispatching of Initialize event try { setOwnerState ( OwnerState . INITIALIZING ) ; try { this . eventDispatcher . immediateDispatch ( event ) ; } finally { setOwnerState ( OwnerState . ALIVE ) ; } this . agentAsEventListener . fireEnqueuedEvents ( this ) ; if ( this . agentAsEventListener . is...
public class ExpressionParser { /** * Parses the { @ literal < semver - expr > } non - terminal . * < pre > * { @ literal * < semver - expr > : : = " ( " < semver - expr > " ) " * | " ! " " ( " < semver - expr > " ) " * | < semver - expr > < boolean - expr > * | < expr > * < / pre > * @ return the expre...
Expression expr ; if ( tokens . positiveLookahead ( NOT ) ) { tokens . consume ( ) ; consumeNextToken ( LEFT_PAREN ) ; expr = new Not ( parseSemVerExpression ( ) ) ; consumeNextToken ( RIGHT_PAREN ) ; } else if ( tokens . positiveLookahead ( LEFT_PAREN ) ) { consumeNextToken ( LEFT_PAREN ) ; expr = parseSemVerExpressio...
public class IntegerExtensions { /** * The binary < code > signed left shift < / code > operator . This is the equivalent to the java < code > & lt ; & lt ; < / code > operator . * Fills in a zero as the least significant bit . * @ param a * an integer . * @ param distance * the number of times to shift . *...
return a << distance ;
public class HtmlDoctype { /** * < p > Set the value of the < code > public < / code > property . < / p > */ public void setPublic ( java . lang . String _public ) { } }
getStateHelper ( ) . put ( PropertyKeys . publicVal , _public ) ; handleAttribute ( "public" , _public ) ;
public class WFieldLayout { /** * Sets the label width . * @ param labelWidth the percentage width , or & lt ; = 0 to use the default field width . */ public void setLabelWidth ( final int labelWidth ) { } }
if ( labelWidth > 100 ) { throw new IllegalArgumentException ( "labelWidth (" + labelWidth + ") cannot be greater than 100 percent." ) ; } getOrCreateComponentModel ( ) . labelWidth = Math . max ( 0 , labelWidth ) ;
public class RecoveryInterceptor { /** * Resolves a fallback for the given execution context and exception . * @ param context The context * @ param exception The exception * @ return Returns the fallback value or throws the original exception */ protected Object resolveFallback ( MethodInvocationContext < Object...
if ( exception instanceof NoAvailableServiceException ) { NoAvailableServiceException nase = ( NoAvailableServiceException ) exception ; if ( LOG . isErrorEnabled ( ) ) { LOG . debug ( nase . getMessage ( ) , nase ) ; LOG . error ( "Type [{}] attempting to resolve fallback for unavailable service [{}]" , context . getT...
public class AbstractUserSession { /** * Naive implementation , to be overridden if needed */ protected List < ComponentDto > doKeepAuthorizedComponents ( String permission , Collection < ComponentDto > components ) { } }
boolean allowPublicComponent = PUBLIC_PERMISSIONS . contains ( permission ) ; return components . stream ( ) . filter ( c -> ( allowPublicComponent && ! c . isPrivate ( ) ) || hasComponentPermission ( permission , c ) ) . collect ( MoreCollectors . toList ( ) ) ;
public class Misc { /** * Check that a string parameter is not null or empty and throw IllegalArgumentException with a * message of errorMessagePrefix + " must not be empty . " if it is empty , defaulting to * " Parameter must not be empty " . * @ param param the string to check * @ param errorMessagePrefix the...
checkNotNull ( param , errorMessagePrefix ) ; checkArgument ( ! param . isEmpty ( ) , ( errorMessagePrefix != null ? errorMessagePrefix : "Parameter" ) + " must not be empty." ) ;
public class Scope { /** * Return the broadcast scope for a given name * @ param name * name * @ return broadcast scope or null if not found */ public IBroadcastScope getBroadcastScope ( String name ) { } }
return ( IBroadcastScope ) children . getBasicScope ( ScopeType . BROADCAST , name ) ;
public class MultisetUtils { /** * Returns the partial { @ link Ordering } over { @ link Multiset . Entry } s resulting from applying * the supplied { @ code comparator } to the multiset elements . */ public static < ElementType > Ordering < Multiset . Entry < ElementType > > byElementOrdering ( Comparator < ? super ...
return Ordering . from ( comparator ) . onResultOf ( MultisetUtils . < ElementType > elementOnly ( ) ) ;
public class ChangeSetAdapter { /** * Handle the change of a node . * @ param workspaceName the workspace in which the node information should be available ; may not be null * @ param key the unique key for the node ; may not be null * @ param path the path of the node ; may not be null * @ param primaryType th...
public class TimestampFilterUtil { /** * Converts a [ startMs , endMs ) timestamps to a Cloud Bigtable [ startMicros , endMicros ) filter . * @ param hbaseStartTimestamp a long value . * @ param hbaseEndTimestamp a long value . * @ return a { @ link Filter } object . */ public static Filter hbaseToTimestampRangeF...
return toTimestampRangeFilter ( TimestampConverter . hbase2bigtable ( hbaseStartTimestamp ) , TimestampConverter . hbase2bigtable ( hbaseEndTimestamp ) ) ;
public class SeaGlassIcon { /** * Scale a size based on the " JComponent . sizeVariant " client property of the * component that is using this icon * @ param context The synthContext to get the component from * @ param size The size to scale * @ return The scaled size or original if " JComponent . sizeVariant "...
if ( context == null || context . getComponent ( ) == null ) { return size ; } // The key " JComponent . sizeVariant " is used to match Apple ' s LAF String scaleKey = SeaGlassStyle . getSizeVariant ( context . getComponent ( ) ) ; if ( scaleKey != null ) { if ( SeaGlassStyle . LARGE_KEY . equals ( scaleKey ) ) { size ...
public class VarTupleSet { /** * Returns input tuples already used in a test case that bind the given variable , considering * only tuples that are ( not ) once - only */ public Iterator < Tuple > getUsed ( VarDef var , final boolean onceOnly ) { } }
return getBinds ( IteratorUtils . filteredIterator ( getUsed ( ) , tuple -> tuple . isOnce ( ) == onceOnly ) , var ) ;
public class ListUsersInGroupResult { /** * The users returned in the request to list users . * @ param users * The users returned in the request to list users . */ public void setUsers ( java . util . Collection < UserType > users ) { } }
if ( users == null ) { this . users = null ; return ; } this . users = new java . util . ArrayList < UserType > ( users ) ;
public class AWSSimpleSystemsManagementClient { /** * Retrieve parameters in a specific hierarchy . For more information , see < a * href = " http : / / docs . aws . amazon . com / systems - manager / latest / userguide / sysman - paramstore - working . html " > Working with * Systems Manager Parameters < / a > in ...
request = beforeClientExecution ( request ) ; return executeGetParametersByPath ( request ) ;
public class SoapServlet { /** * Allow version specific factory passed in TODO : allow specifying response * headers */ protected String createSoapResponse ( String soapVersion , String xml ) throws SOAPException { } }
try { SOAPMessage soapMessage = getSoapMessageFactory ( soapVersion ) . createMessage ( ) ; SOAPBody soapBody = soapMessage . getSOAPBody ( ) ; soapBody . addDocument ( DomHelper . toDomDocument ( xml ) ) ; return DomHelper . toXml ( soapMessage . getSOAPPart ( ) . getDocumentElement ( ) ) ; } catch ( Exception ex ) { ...
public class UriTemplate { /** * Append a uri fragment to the template . * @ param uriTemplate to append to . * @ param fragment to append . * @ return a new UriTemplate with the fragment appended . */ public static UriTemplate append ( UriTemplate uriTemplate , String fragment ) { } }
return new UriTemplate ( uriTemplate . toString ( ) + fragment , uriTemplate . encodeSlash ( ) , uriTemplate . getCharset ( ) ) ;
public class ForkJoinTask { /** * Returns an estimate of the number of tasks that have been forked by the current worker thread * but not yet executed . This value may be useful for heuristic decisions about whether to fork * other tasks . * @ return the number of tasks */ public static int getQueuedTaskCount ( )...
Thread t ; ForkJoinPool . WorkQueue q ; if ( ( t = Thread . currentThread ( ) ) instanceof ForkJoinWorkerThread ) q = ( ( ForkJoinWorkerThread ) t ) . workQueue ; else q = ForkJoinPool . commonSubmitterQueue ( ) ; return ( q == null ) ? 0 : q . queueSize ( ) ;
public class Convert { /** * 十六进制转换字符串 * @ param hexStr Byte字符串 ( Byte之间无分隔符 如 : [ 616C6B ] ) * @ param charset 编码 { @ link Charset } * @ return 对应的字符串 * @ see HexUtil # decodeHexStr ( String , Charset ) * @ deprecated 请使用 { @ link # hexToStr ( String , Charset ) } */ @ Deprecated public static String hexStrT...
return hexToStr ( hexStr , charset ) ;
public class SequenceQuality { /** * Factory method for the SequenceQualityPhred object . It performs all necessary range checks if required . * @ param format format of encoded quality values * @ param data byte with encoded quality values * @ param check determines whether range check is required * @ return q...
return create ( format , data , 0 , data . length , check ) ;
public class DomainsInner { /** * Get all domains in a subscription . * Get all domains in a subscription . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; DomainInner & gt ; object */ public Observable < Page < DomainInner > > listAsy...
return listWithServiceResponseAsync ( ) . map ( new Func1 < ServiceResponse < Page < DomainInner > > , Page < DomainInner > > ( ) { @ Override public Page < DomainInner > call ( ServiceResponse < Page < DomainInner > > response ) { return response . body ( ) ; } } ) ;
public class VoltTable { /** * Return a " pretty print " representation of this table with or without column names . * Output will be formatted in a tabular textual format suitable for display . * @ param includeColumnNames Flag to control if column names should be included or not . * @ return A string containing...
final int MAX_PRINTABLE_CHARS = 30 ; // chose print width for geography column such that it can print polygon in // aligned manner with geography column for a polygon up to : // a polygon composed of 4 vertices + 1 repeat vertex , // one ring , each coordinate of vertex having 5 digits space including the sign of lng /...
public class AbstractResourceBundleHandler { /** * Initialize the temporary directories * @ param tempDirRoot * the temporary directory root * @ param createTempSubDir * the flag indicating if we should create the temporary * directory . */ private void initTempDirectory ( String tempDirRoot , boolean createT...
tempDirPath = tempDirRoot ; // In windows , pathnames with spaces are returned as % 20 if ( tempDirPath . contains ( "%20" ) ) tempDirPath = tempDirPath . replaceAll ( "%20" , " " ) ; this . textDirPath = tempDirPath + File . separator + TEMP_TEXT_SUBDIR ; this . gzipDirPath = tempDirPath + File . separator + TEMP_GZIP...
public class SessionContext { /** * puts the key , value into the map . a null value will remove the key from the map * @ param key * @ param value */ public void set ( String key , Object value ) { } }
if ( value != null ) put ( key , value ) ; else remove ( key ) ;
public class SpringMVCAttribute { /** * TODO : fix the isInFk for pureMany2Many */ public String getTagName ( ) { } }
if ( attribute . isHidden ( ) && ! attribute . isFile ( ) ) { return "hidden" ; } else if ( attribute . isInFk ( ) && attribute . hasXToOneRelation ( ) ) { return "select" ; } else if ( attribute . isFile ( ) ) { return "file" ; } else if ( attribute . isPassword ( ) ) { return "password" ; } else if ( attribute . isSt...
public class GeometricSearchPanel { public void geometryUpdate ( Geometry oldGeometry , Geometry newGeometry ) { } }
if ( oldGeometry != null ) { geometries . remove ( oldGeometry ) ; } if ( newGeometry != null ) { geometries . add ( newGeometry ) ; } if ( geometries . size ( ) == 0 ) { searchGeometry = null ; updateGeometryOnMap ( ) ; } else if ( geometries . size ( ) == 1 ) { searchGeometry = geometries . get ( 0 ) ; updateGeometry...
public class HCCSSNodeDetector { /** * Check if the passed node is a CSS node after unwrapping . * @ param aNode * The node to be checked - may be < code > null < / code > . * @ return < code > true < / code > if the node implements { @ link HCStyle } or * { @ link HCLink } ( and not a special case ) . */ publi...
final IHCNode aUnwrappedNode = HCHelper . getUnwrappedNode ( aNode ) ; return isDirectCSSNode ( aUnwrappedNode ) ;
public class UnionFlattenerImpl { /** * TODO : why a fix point ? */ @ Override public IQ optimize ( IQ query ) { } }
TreeTransformer treeTransformer = new TreeTransformer ( query . getVariableGenerator ( ) ) ; IQ prev ; do { prev = query ; query = iqFactory . createIQ ( query . getProjectionAtom ( ) , query . getTree ( ) . acceptTransformer ( treeTransformer ) ) ; } while ( ! prev . equals ( query ) ) ; return query ;
public class nssavedconfig { /** * Use this API to fetch all the nssavedconfig resources that are configured on netscaler . */ public static nssavedconfig get ( nitro_service service ) throws Exception { } }
nssavedconfig obj = new nssavedconfig ( ) ; nssavedconfig [ ] response = ( nssavedconfig [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ;
public class WriteExcelUtils { /** * 向某一WorkBook中写入多个Bean * @ param workbook 指定工作簿 * @ param _ titleRow 指定写入的标题在第几行 , 0 - based * @ param count 指定每个Sheet写入几个bean * @ param beans 指定写入的Beans ( 或者泛型为Map ) * @ param properties 指定写入的bean的属性 * @ param titles 指定写入的标题 * @ param dateFormat 日期格式 * @ return 返回传入的W...
int sheetNum = beans . size ( ) % count == 0 ? beans . size ( ) / count : ( beans . size ( ) / count + 1 ) ; for ( int i = 0 ; i < sheetNum ; i ++ ) { WriteExcelUtils . writePerSheet ( workbook . createSheet ( ) , _titleRow , i * count , i * count + count , beans , properties , titles , dateFormat ) ; } return workbook...
public class AsyncAssembly { /** * Runs intermediate check on the Assembly status until it is finished executing , * then returns it as a response . * @ return { @ link AssemblyResponse } * @ throws LocalOperationException if something goes wrong while running non - http operations . * @ throws RequestException...
AssemblyResponse response ; do { response = getClient ( ) . getAssemblyByUrl ( url ) ; try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException e ) { throw new LocalOperationException ( e ) ; } } while ( ! response . isFinished ( ) ) ; setState ( State . FINISHED ) ; return response ;
public class AJP13InputStream { public long skip ( long n ) throws IOException { } }
if ( _closed ) return - 1 ; for ( int i = 0 ; i < n ; i ++ ) if ( read ( ) < 0 ) return i == 0 ? - 1 : i ; return n ;
public class HammingCode { /** * Is prefix free code boolean . * @ param keySet the key set * @ return the boolean */ public static boolean isPrefixFreeCode ( final Set < Bits > keySet ) { } }
final TreeSet < Bits > check = new TreeSet < Bits > ( ) ; for ( final Bits code : keySet ) { final Bits ceiling = check . ceiling ( code ) ; if ( null != ceiling && ( ceiling . startsWith ( code ) || code . startsWith ( ceiling ) ) ) { return false ; } final Bits floor = check . floor ( code ) ; if ( null != floor && (...
public class AppServiceEnvironmentsInner { /** * Get properties of a multi - role pool . * Get properties of a multi - role pool . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the App Service Environment . * @ throws IllegalArgumentException throw...
return getMultiRolePoolWithServiceResponseAsync ( resourceGroupName , name ) . map ( new Func1 < ServiceResponse < WorkerPoolResourceInner > , WorkerPoolResourceInner > ( ) { @ Override public WorkerPoolResourceInner call ( ServiceResponse < WorkerPoolResourceInner > response ) { return response . body ( ) ; } } ) ;
public class FreePool { /** * Return a mcWrapper . Create one if the * maximum connection limit has not been reached . If the maximum had been reached , * queue the request . * @ throws ResourceAllocationException */ protected MCWrapper createManagedConnectionWithMCWrapper ( ManagedConnectionFactory managedConnec...
// This method is called within a synchronize block if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "createManagedConnectionWithMCWrapper" ) ; } ManagedConnection mc = null ; MCWrapper mcWrapper = null ; try { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . is...
public class Jar { /** * Returns an attribute ' s list value from a non - main section of this JAR ' s manifest . * The attributes string value will be split on whitespace into the returned list . * The returned list may be safely modified . * @ param section the manifest ' s section * @ param name the attribut...
return split ( getAttribute ( section , name ) ) ;
public class DirectionsPane { /** * Adds a handler for a state type event on the map . * We could allow this to handle any state event by adding a parameter * JavascriptObject obj , but we would then need to loosen up the event type * and either accept a String value , or fill an enum with all potential * state...
String key = registerEventHandler ( h ) ; String mcall = "google.maps.event.addListener(" + getVariableName ( ) + ", '" + type . name ( ) + "', " + "function() {document.jsHandlers.handleStateEvent('" + key + "');});" ; // System . out . println ( " addStateEventHandler mcall : " + mcall ) ; runtime . execute ( mcall )...
public class Order { /** * Add values for PaymentExecutionDetail , return this . * @ param paymentExecutionDetail * New values to add . * @ return This instance . */ public Order withPaymentExecutionDetail ( PaymentExecutionDetailItem ... values ) { } }
List < PaymentExecutionDetailItem > list = getPaymentExecutionDetail ( ) ; for ( PaymentExecutionDetailItem value : values ) { list . add ( value ) ; } return this ;
public class RelationalOperations { /** * Returns true if polygon _ a touches envelope _ b . */ private static boolean polygonTouchesEnvelope_ ( Polygon polygon_a , Envelope envelope_b , double tolerance , ProgressTracker progress_tracker ) { } }
// Quick rasterize test to see whether the the geometries are disjoint , // or if one is contained in the other . int relation = tryRasterizedContainsOrDisjoint_ ( polygon_a , envelope_b , tolerance , false ) ; if ( relation == Relation . disjoint || relation == Relation . contains || relation == Relation . within ) re...
public class LinkedList { /** * Returns the first element which contains ' object ' starting from the head . * @ param object Object which is being searched for * @ return First element which contains object or null if none can be found */ public Element < T > find ( T object ) { } }
Element < T > e = first ; while ( e != null ) { if ( e . object == object ) { return e ; } e = e . next ; } return null ;
public class EndpointDelegate { /** * { @ inheritDoc } */ @ Override public void onClose ( Session session , CloseReason closeReason ) { } }
meta . onClose ( session , closeReason ) ;
public class MPGroup { /** * Returns true if the passed principal is a member of the group . * This method does a recursive search , so if a principal belongs to a * group which is a member of this group , true is returned . * @ param member the principal whose membership is to be checked . * @ return true if t...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isMember" , "is: " + member + ", a member of: " + this ) ; boolean result = false ; if ( member instanceof MPPrincipal ) { List theGroups = ( ( MPPrincipal ) member ) . getGroups ( ) ; if ( theGroups != null ) result = theG...
public class OneForOneStreamManager { /** * Registers a stream of ManagedBuffers which are served as individual chunks one at a time to * callers . Each ManagedBuffer will be release ( ) ' d after it is transferred on the wire . If a * client connection is closed before the iterator is fully drained , then the rema...
long myStreamId = nextStreamId . getAndIncrement ( ) ; streams . put ( myStreamId , new StreamState ( appId , buffers , channel ) ) ; return myStreamId ;
public class ComputerVisionImpl { /** * This operation generates a description of an image in human readable language with complete sentences . The description is based on a collection of content tags , which are also returned by the operation . More than one description can be generated for each image . Descriptions a...
return describeImageInStreamWithServiceResponseAsync ( image , describeImageInStreamOptionalParameter ) . map ( new Func1 < ServiceResponse < ImageDescription > , ImageDescription > ( ) { @ Override public ImageDescription call ( ServiceResponse < ImageDescription > response ) { return response . body ( ) ; } } ) ;
public class SqlPkStatement { /** * Generate a where clause for a prepared Statement . * Only primary key and locking fields are used in this where clause * @ param cld the ClassDescriptor * @ param useLocking true if locking fields should be included * @ param stmt the StatementBuffer */ protected void appendW...
FieldDescriptor [ ] pkFields = cld . getPkFields ( ) ; FieldDescriptor [ ] fields ; fields = pkFields ; if ( useLocking ) { FieldDescriptor [ ] lockingFields = cld . getLockingFields ( ) ; if ( lockingFields . length > 0 ) { fields = new FieldDescriptor [ pkFields . length + lockingFields . length ] ; System . arraycop...
public class WyilFile { /** * Create a simple binding function from two tuples representing the key set and * value set respectively . * @ param variables * @ param arguments * @ return */ public static < T extends SyntacticItem > java . util . function . Function < Identifier , SyntacticItem > bindingFunction ...
return ( Identifier var ) -> { for ( int i = 0 ; i != variables . size ( ) ; ++ i ) { if ( var . equals ( variables . get ( i ) . getName ( ) ) ) { return arguments . get ( i ) ; } } return null ; } ;
public class ValueConstraintsMatcher { /** * Check given value on compatibility with a given type . * @ param value ValueData * @ param type int , property type * @ return boolean true if the value matches the type , false otherwise * @ throws RepositoryException if gathering of match conditions meets errors ( ...
if ( constraints == null || constraints . length <= 0 ) { return true ; } boolean invalid = true ; // do not use getString because of string consuming ValueData valueData = value ; if ( type == PropertyType . STRING ) { String strVal = ValueDataUtil . getString ( valueData ) ; for ( int i = 0 ; invalid && i < constrain...
public class TypeSerializerSerializationUtil { /** * Reads from a data input view a { @ link TypeSerializer } that was previously * written using { @ link # writeSerializer ( DataOutputView , TypeSerializer ) } . * < p > If deserialization fails for any reason ( corrupted serializer bytes , serializer class * no ...
return tryReadSerializer ( in , userCodeClassLoader , false ) ;
public class SimpleDocumentDbRepository { /** * delete one document per id without configuring partition key value * @ param id */ @ Override public void deleteById ( ID id ) { } }
Assert . notNull ( id , "id to be deleted should not be null" ) ; operation . deleteById ( information . getCollectionName ( ) , id , null ) ;
public class EmbedVaadinServerBuilder { /** * Loads a configuration file from the specified location . Fails if the * specified < tt > path < / tt > does not exist . * @ param path the location of a properties file in the classpath * @ return this * @ throws IllegalStateException if no such properties file is f...
assertNotNull ( path , "path could not be null." ) ; withConfigProperties ( EmbedVaadinConfig . loadProperties ( path ) ) ; return self ( ) ;
public class Permute { /** * This will permute the list once */ public boolean next ( ) { } }
if ( indexes . length <= 1 || permutation >= total - 1 ) return false ; int N = indexes . length - 2 ; int k = N ; swap ( k , counters [ k ] ++ ) ; while ( counters [ k ] == indexes . length ) { k -= 1 ; swap ( k , counters [ k ] ++ ) ; } swap ( counters [ k ] , k ) ; // before while ( k < indexes . length - 1 ) { k ++...
public class EntitiesDetectionJobPropertiesMarshaller { /** * Marshall the given parameter object . */ public void marshall ( EntitiesDetectionJobProperties entitiesDetectionJobProperties , ProtocolMarshaller protocolMarshaller ) { } }
if ( entitiesDetectionJobProperties == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( entitiesDetectionJobProperties . getJobId ( ) , JOBID_BINDING ) ; protocolMarshaller . marshall ( entitiesDetectionJobProperties . getJobName ( ) , JOBNAM...
public class HtmlForm { /** * < p > Return the value of the < code > onsubmit < / code > property . < / p > * < p > Contents : Javascript code executed when this form is submitted . */ public java . lang . String getOnsubmit ( ) { } }
return ( java . lang . String ) getStateHelper ( ) . eval ( PropertyKeys . onsubmit ) ;
public class Task { /** * / * - - - - - [ drainInputs ] - - - - - */ protected boolean drainInput ( boolean close ) throws IOException { } }
if ( buffer == null ) buffer = allocator . allocate ( ) ; try { while ( true ) { int read ; if ( in instanceof BufferInput ) { ( ( BufferInput ) in ) . drainBuffer ( ) ; read = - 1 ; } else read = in . read ( buffer ) ; if ( read == 0 ) { in . addReadInterest ( ) ; return false ; } else if ( read == - 1 ) { if ( close ...
public class LinearClassifierFactory { /** * Given the path to a file representing the text based serialization of a * Linear Classifier , reconstitutes and returns that LinearClassifier . * TODO : Leverage Index */ public Classifier < String , String > loadFromFilename ( String file ) { } }
try { File tgtFile = new File ( file ) ; BufferedReader in = new BufferedReader ( new FileReader ( tgtFile ) ) ; // Format : read indicies first , weights , then thresholds Index < String > labelIndex = HashIndex . loadFromReader ( in ) ; Index < String > featureIndex = HashIndex . loadFromReader ( in ) ; double [ ] [ ...
public class MtasDataDoubleOperations { /** * ( non - Javadoc ) * @ see * mtas . codec . util . DataCollector . MtasDataOperations # exp2 ( java . lang . Number ) */ @ Override public Double exp2 ( Double arg1 ) { } }
if ( arg1 == null ) { return Double . NaN ; } else { return Math . exp ( arg1 ) ; }
public class GrammarAccessFragment2 { /** * Returns all grammars from the hierarchy that are used from rules of this grammar . */ protected List < Grammar > getEffectivelyUsedGrammars ( final Grammar grammar ) { } }
final Function1 < AbstractRule , Grammar > _function = ( AbstractRule it ) -> { return GrammarUtil . getGrammar ( it ) ; } ; final Function1 < Grammar , Boolean > _function_1 = ( Grammar it ) -> { return Boolean . valueOf ( ( it != grammar ) ) ; } ; return IterableExtensions . < Grammar > toList ( IterableExtensions . ...
public class LocationListEntryMarshaller { /** * Marshall the given parameter object . */ public void marshall ( LocationListEntry locationListEntry , ProtocolMarshaller protocolMarshaller ) { } }
if ( locationListEntry == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( locationListEntry . getLocationArn ( ) , LOCATIONARN_BINDING ) ; protocolMarshaller . marshall ( locationListEntry . getLocationUri ( ) , LOCATIONURI_BINDING ) ; } cat...
public class DatabaseTableConfig { /** * Extract and return the table name for a class . */ public static < T > String extractTableName ( DatabaseType databaseType , Class < T > clazz ) { } }
DatabaseTable databaseTable = clazz . getAnnotation ( DatabaseTable . class ) ; String name = null ; if ( databaseTable != null && databaseTable . tableName ( ) != null && databaseTable . tableName ( ) . length ( ) > 0 ) { name = databaseTable . tableName ( ) ; } if ( name == null && javaxPersistenceConfigurer != null ...
public class SerialArrayList { /** * Set . * @ param i the * @ param value the value */ public void set ( int i , U value ) { } }
ensureCapacity ( ( i + 1 ) * unitSize ) ; ByteBuffer view = getView ( i ) ; try { factory . write ( view , value ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; }
public class AbstractFaxClientSpi { /** * This function will suspend an existing fax job . * @ param faxJob * The fax job object containing the needed information */ public void suspendFaxJob ( FaxJob faxJob ) { } }
// validate fax job ID this . invokeFaxJobIDValidation ( faxJob ) ; // invoke action this . suspendFaxJobImpl ( faxJob ) ; // fire event this . fireFaxEvent ( FaxClientActionEventID . SUSPEND_FAX_JOB , faxJob ) ;
public class BOGD { /** * Guesses the distribution to use for the Regularization parameter * @ param d the dataset to get the guess for * @ return the guess for the Regularization parameter * @ see # setRegularization ( double ) */ public static Distribution guessRegularization ( DataSet d ) { } }
double T2 = d . size ( ) ; T2 *= T2 ; return new LogUniform ( Math . pow ( 2 , - 3 ) / T2 , Math . pow ( 2 , 3 ) / T2 ) ;
public class NfsFileBase { /** * ( non - Javadoc ) * @ see com . emc . ecs . nfsclient . nfs . NfsFile # readdir ( long , long , int ) */ public NfsReaddirResponse readdir ( long cookie , long cookieverf , int count ) throws IOException { } }
return getNfs ( ) . wrapped_getReaddir ( makeReaddirRequest ( cookie , cookieverf , count ) ) ;
public class JoiningSequenceReader { /** * Iterator implementation which attempts to move through the 2D structure * attempting to skip onto the next sequence as & when it is asked to */ @ Override public Iterator < C > iterator ( ) { } }
final List < Sequence < C > > localSequences = sequences ; return new Iterator < C > ( ) { private Iterator < C > currentSequenceIterator = null ; private int currentPosition = 0 ; @ Override public boolean hasNext ( ) { // If the current iterator is null then see if the Sequences object has anything if ( currentSequen...
public class UndertowReactiveWebServerFactory { /** * Add { @ link UndertowBuilderCustomizer } s that should be used to customize the * Undertow { @ link io . undertow . Undertow . Builder Builder } . * @ param customizers the customizers to add */ @ Override public void addBuilderCustomizers ( UndertowBuilderCusto...
Assert . notNull ( customizers , "Customizers must not be null" ) ; this . builderCustomizers . addAll ( Arrays . asList ( customizers ) ) ;
public class Groups { /** * 创建分组 * @ param name 分组名 * @ return */ public Group create ( String name ) { } }
String url = WxEndpoint . get ( "url.group.create" ) ; String json = String . format ( "{\"group\":{\"name\":\"%s\"}}" , name ) ; logger . debug ( "create group: {}" , json ) ; String response = wxClient . post ( url , json ) ; return JsonMapper . defaultUnwrapRootMapper ( ) . fromJson ( response , Group . class ) ;
public class MergedContextSource { /** * Creates a unified context source for all those passed in . An Exception * may be thrown if the call to a source ' s getContextType ( ) method throws * an exception . */ public void init ( ClassLoader loader , ContextSource [ ] contextSources , String [ ] prefixes , boolean p...
mSources = contextSources ; int len = contextSources . length ; ArrayList < Class < ? > > contextList = new ArrayList < Class < ? > > ( len ) ; ArrayList < ClassLoader > delegateList = new ArrayList < ClassLoader > ( len ) ; for ( int j = 0 ; j < contextSources . length ; j ++ ) { Class < ? > type = contextSources [ j ...
public class MessageItem { /** * Returns an estimated in memory size for the Message that we have . */ @ Override public int getInMemoryDataSize ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getInMemoryDataSize" ) ; JsMessage localMsg = getJSMessage ( true ) ; int msgSize = localMsg . getInMemorySize ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc...
public class FSNamesystem { /** * Returned information is a JSON representation of map with host name as the * key and value is a map of live node attribute keys to its values */ @ Override // NameNodeMXBean public String getLiveNodes ( ) { } }
final Map < String , Map < String , Object > > info = new HashMap < String , Map < String , Object > > ( ) ; try { final ArrayList < DatanodeDescriptor > liveNodeList = new ArrayList < DatanodeDescriptor > ( ) ; final ArrayList < DatanodeDescriptor > deadNodeList = new ArrayList < DatanodeDescriptor > ( ) ; DFSNodesSta...
public class GoogleDrive { /** * Create a folder without creating any higher level intermediate folders , and returned id of created folder . * @ param path * @ param parentId * @ return id of created folder */ private String rawCreateFolder ( CPath path , String parentId ) { } }
JSONObject body = new JSONObject ( ) ; body . put ( "title" , path . getBaseName ( ) ) ; body . put ( "mimeType" , MIME_TYPE_DIRECTORY ) ; JSONArray ids = new JSONArray ( ) ; JSONObject idObj = new JSONObject ( ) ; idObj . put ( "id" , parentId ) ; ids . put ( idObj ) ; body . put ( "parents" , ids ) ; HttpPost request...
public class ScribeIndex { /** * Gets the appropriate property scribe for a given property instance . * @ param property the property instance * @ return the property scribe or null if not found */ public ICalPropertyScribe < ? extends ICalProperty > getPropertyScribe ( ICalProperty property ) { } }
if ( property instanceof RawProperty ) { RawProperty raw = ( RawProperty ) property ; return new RawPropertyScribe ( raw . getName ( ) ) ; } return getPropertyScribe ( property . getClass ( ) ) ;
public class EventIDFilter { /** * Informs the filter that a receivable service is now inactive . * For the events related with the service , if there are no other * services bound , then events of such event type should be filtered * @ param receivableService */ public void serviceInactive ( ReceivableService re...
for ( ReceivableEvent receivableEvent : receivableService . getReceivableEvents ( ) ) { Set < ServiceID > servicesReceivingEvent = eventID2serviceIDs . get ( receivableEvent . getEventType ( ) ) ; if ( servicesReceivingEvent != null ) { synchronized ( servicesReceivingEvent ) { servicesReceivingEvent . remove ( receiva...
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public IfcLogicalOperatorEnum createIfcLogicalOperatorEnumFromString ( EDataType eDataType , String initialValue ) { } }
IfcLogicalOperatorEnum result = IfcLogicalOperatorEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;