signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class I18nSpecificsOfItemGroup { /** * < p > Setter for itsId . < / p > * @ param pItsId reference */ @ Override public final void setItsId ( final IdI18nSpecificsOfItemGroup pItsId ) { } }
this . itsId = pItsId ; if ( this . itsId == null ) { this . lang = null ; this . hasName = null ; } else { this . lang = this . itsId . getLang ( ) ; this . hasName = this . itsId . getHasName ( ) ; }
public class DataBinder { /** * Loads parameters from a Properties object . */ public DataBinder load ( Properties props ) { } }
Enumeration < ? > enumeration = props . propertyNames ( ) ; while ( enumeration . hasMoreElements ( ) ) { String key = ( String ) enumeration . nextElement ( ) ; put ( key , props . getProperty ( key ) ) ; } return this ;
public class ByteCodeUtils { /** * 获取Class类型的byte code标识 , 例如int对应的是I , String对应的是Ljava / lang / String , 注意 : 只要不是原生类型肯定是以 ' L ' 开头 * 或者N个 ' [ ' 后跟一个 ' L ' , ' [ ' 标识数组 * @ param clazz Class对象 * @ return 对应的byte code类型 , 结尾如果是对象会以 ' ; ' 结尾 , 如果是放在返回值时需要删除 */ public static String getByteCodeType ( Class < ? > cla...
Assert . notNull ( clazz ) ; if ( byte . class == clazz ) { return "B" ; } else if ( short . class == clazz ) { return "S" ; } else if ( int . class == clazz ) { return "I" ; } else if ( long . class == clazz ) { return "J" ; } else if ( double . class == clazz ) { return "D" ; } else if ( float . class == clazz ) { re...
public class Validators { /** * Creates and returns a validator , which allows to validate texts to ensure , that they * represent valid IPv6 addresses . Empty texts are also accepted . * @ param context * The context , which should be used to retrieve the error message , as an instance of * the class { @ link ...
return new IPv6AddressValidator ( context , resourceId ) ;
public class Optional { /** * Returns an { @ code Optional } describing the specified value , if non - null , * otherwise returns an empty { @ code Optional } . * @ param < T > the class of the value * @ param value the possibly - null value to describe * @ return an { @ code Optional } with a present value if ...
return value == null ? empty ( ) : of ( value ) ;
public class EntitlementMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Entitlement entitlement , ProtocolMarshaller protocolMarshaller ) { } }
if ( entitlement == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( entitlement . getDescription ( ) , DESCRIPTION_BINDING ) ; protocolMarshaller . marshall ( entitlement . getEncryption ( ) , ENCRYPTION_BINDING ) ; protocolMarshaller . mars...
public class ServerConfigDocument { /** * Get the file from configDrectory if it exists ; * otherwise return def only if it exists , or null if not */ private File getFileFromConfigDirectory ( String file , File def ) { } }
File f = new File ( configDirectory , file ) ; if ( configDirectory != null && f . exists ( ) ) { return f ; } if ( def != null && def . exists ( ) ) { return def ; } return null ;
public class JMElasticsearchSearchAndCount { /** * Gets search request builder . * @ param isSetExplain the is set explain * @ param indices the indices * @ param types the types * @ param queryBuilder the query builder * @ param aggregationBuilders the aggregation builders * @ return the search request bui...
SearchRequestBuilder searchRequestBuilder = getSearchRequestBuilder ( esClient . prepareSearch ( indices ) . setSearchType ( SearchType . DFS_QUERY_THEN_FETCH ) . setSize ( defaultHitsCount ) . setExplain ( isSetExplain ) , aggregationBuilders ) ; ifNotNull ( types , searchRequestBuilder :: setTypes ) ; ifNotNull ( que...
public class JobControl { /** * Add a new job . * @ param aJob the new job */ synchronized public String addJob ( Job aJob ) { } }
String id = this . getNextJobID ( ) ; aJob . setJobID ( id ) ; aJob . setState ( Job . WAITING ) ; this . addToQueue ( aJob ) ; return id ;
public class AppServiceEnvironmentsInner { /** * Delete an App Service Environment . * Delete an App Service Environment . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the App Service Environment . * @ param forceDelete Specify & lt ; code & gt ; ...
deleteWithServiceResponseAsync ( resourceGroupName , name , forceDelete ) . toBlocking ( ) . last ( ) . body ( ) ;
public class SqlQuery { /** * Constructs a query with named arguments , using given map for resolving the values of arguments . * @ see # namedQuery ( String , VariableResolver ) * @ see VariableResolver # forMap ( Map ) */ public static @ NotNull SqlQuery namedQuery ( @ NotNull @ SQL String sql , @ NotNull Map < S...
return namedQuery ( sql , VariableResolver . forMap ( valueMap ) ) ;
public class CircleProgressBar { /** * Update the background color of the mBgCircle image view . */ public void setBackgroundColor ( int colorRes ) { } }
if ( getBackground ( ) instanceof ShapeDrawable ) { final Resources res = getResources ( ) ; ( ( ShapeDrawable ) getBackground ( ) ) . getPaint ( ) . setColor ( res . getColor ( colorRes ) ) ; }
public class A_CmsSearchIndex { /** * Checks if the provided resource should be excluded from this search index . < p > * @ param cms the OpenCms context used for building the search index * @ param resource the resource to index * @ return true if the resource should be excluded , false if it should be included ...
// check if this resource should be excluded from the index , if so skip it boolean excludeFromIndex = false ; if ( resource . isInternal ( ) || resource . isFolder ( ) || resource . isTemporaryFile ( ) || ( resource . getDateExpired ( ) <= System . currentTimeMillis ( ) ) ) { // don ' t index internal resources , fold...
public class Http4K { /** * creates or gets an undertow web server instance mapped by port . * hostname must be given in case a new server instance has to be instantiated * @ param port * @ param hostName * @ return */ public synchronized Pair < PathHandler , Undertow > getServer ( int port , String hostName ) ...
return getServer ( port , hostName , null ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link DerivationUnitTermType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link DerivationUnitTermType } ...
return new JAXBElement < DerivationUnitTermType > ( _DerivationUnitTerm_QNAME , DerivationUnitTermType . class , null , value ) ;
public class InternalPureXbaseLexer { /** * $ ANTLR start " T _ _ 72" */ public final void mT__72 ( ) throws RecognitionException { } }
try { int _type = T__72 ; int _channel = DEFAULT_TOKEN_CHANNEL ; // InternalPureXbase . g : 70:7 : ( ' throw ' ) // InternalPureXbase . g : 70:9 : ' throw ' { match ( "throw" ) ; } state . type = _type ; state . channel = _channel ; } finally { }
public class JSONObject { /** * Add a { @ link JSONBoolean } representing the supplied { @ code boolean } to the * { @ code JSONObject } . * @ param key the key to use when storing the value * @ param value the value * @ return { @ code this } ( for chaining ) * @ throws NullPointerException if key is { @ cod...
put ( key , JSONBoolean . valueOf ( value ) ) ; return this ;
public class VelocityTemplate { /** * 加载可用的Velocity中预定义的编码 */ private void loadEncoding ( ) { } }
final String charset = ( String ) Velocity . getProperty ( Velocity . INPUT_ENCODING ) ; this . charset = StrUtil . isEmpty ( charset ) ? CharsetUtil . UTF_8 : charset ;
public class Decompiler { /** * Decompile the source information associated with this js * function / script back into a string . For the most part , this * just means translating tokens back to their string * representations ; there ' s a little bit of lookahead logic to * decide the proper spacing / indentati...
int length = source . length ( ) ; if ( length == 0 ) { return "" ; } int indent = properties . getInt ( INITIAL_INDENT_PROP , 0 ) ; if ( indent < 0 ) throw new IllegalArgumentException ( ) ; int indentGap = properties . getInt ( INDENT_GAP_PROP , 4 ) ; if ( indentGap < 0 ) throw new IllegalArgumentException ( ) ; int ...
public class CodedConstant { /** * get required field check java expression . * @ param order field order * @ param field java field * @ return full java expression */ public static String getRequiredCheck ( int order , Field field ) { } }
String fieldName = getFieldName ( order ) ; String code = "if (" + fieldName + "== null) {\n" ; code += "throw new UninitializedMessageException(CodedConstant.asList(\"" + field . getName ( ) + "\"))" + ClassCode . JAVA_LINE_BREAK ; code += "}\n" ; return code ;
public class HttpOutboundServiceContextImpl { /** * @ see com . ibm . ws . http . channel . internal . HttpServiceContextImpl # getBuffList ( ) */ @ Override protected WsByteBuffer [ ] getBuffList ( ) { } }
if ( ! getLink ( ) . isReconnectAllowed ( ) ) { // reconnects not allowed , skip the special logic below return super . getBuffList ( ) ; } int stop = getPendingStop ( ) ; int start = getPendingStart ( ) ; int size = stop - start ; if ( 0 == size ) { return null ; } WsByteBuffer [ ] buffs = getPendingBuffers ( ) ; WsBy...
public class UcsApi { /** * Set the call as being completed * @ param id id of the Interaction ( required ) * @ param callCompletedData ( required ) * @ return ApiResponse & lt ; ApiSuccessResponse & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response b...
com . squareup . okhttp . Call call = setCallCompletedValidateBeforeCall ( id , callCompletedData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getExtensionFont ( ) { } }
if ( extensionFontEClass == null ) { extensionFontEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 522 ) ; } return extensionFontEClass ;
public class TrifocalExtractGeometries { /** * Extract the camera matrices up to a common projective transform . * < p > P2 = [ [ T1 . T2 . T3 ] e3 | e2 ] and P3 = [ ( e3 * e2 < sup > T < / sup > - I ) [ T1 ' , T2 ' , T3 ' | e2 | e3 ] < / p > * NOTE : The camera matrix for the first view is assumed to be P1 = [ I |...
// temp1 = [ e3 * e3 ^ T - I ] for ( int i = 0 ; i < 3 ; i ++ ) { for ( int j = 0 ; j < 3 ; j ++ ) { temp1 . set ( i , j , e3 . getIdx ( i ) * e3 . getIdx ( j ) ) ; } temp1 . set ( i , i , temp1 . get ( i , i ) - 1 ) ; } // compute the camera matrices one column at a time for ( int i = 0 ; i < 3 ; i ++ ) { DMatrixRMaj ...
public class VirtualMachineScaleSetsInner { /** * Reimages ( upgrade the operating system ) one or more virtual machines in a VM scale set . * @ param resourceGroupName The name of the resource group . * @ param vmScaleSetName The name of the VM scale set . * @ param serviceCallback the async ServiceCallback to h...
return ServiceFuture . fromResponse ( reimageWithServiceResponseAsync ( resourceGroupName , vmScaleSetName ) , serviceCallback ) ;
public class FSM2MealyParserAlternating { /** * Converts all the transitions from the FSM to transitions in a { @ link MealyMachine } . * This method will for each new state make transitions . * This is done by switching behavior between input , and output transitions in the FSM source . * This is a recursive DFS...
// indicate we have seen currentState newStates . remove ( currentState ) ; // collect all outgoing transitions from currentState final Collection < Pair < String , Integer > > targets = transitionsFSM . get ( currentState ) ; // check if we need to compute an undefined output . if ( inputTrans != null && targets . isE...
public class ResourceXMLGenerator { /** * Add Node object * @ param node node */ public void addNode ( final INodeEntry node ) { } }
// convert to entity final ResourceXMLParser . Entity entity = createEntity ( node ) ; addEntity ( entity ) ;
public class JerseyEnvironment { /** * Gets the given Jersey property . * @ param name the name of the Jersey property * @ see org . glassfish . jersey . server . ResourceConfig */ @ SuppressWarnings ( { } }
"unchecked" , "TypeParameterUnusedInFormals" } ) @ Nullable public < T > T getProperty ( String name ) { return ( T ) config . getProperties ( ) . get ( name ) ;
public class RTMPConnection { /** * Return stream by given channel id . * @ param channelId * Channel id * @ return Stream that channel belongs to */ public IClientStream getStreamByChannelId ( int channelId ) { } }
// channels 2 and 3 are " special " and don ' t have an IClientStream associated if ( channelId < 4 ) { return null ; } Number streamId = getStreamIdForChannelId ( channelId ) ; if ( log . isTraceEnabled ( ) ) { log . trace ( "Stream requested for channel id: {} stream id: {} streams: {}" , channelId , streamId , strea...
public class CelebrityDetail { /** * An array of URLs pointing to additional celebrity information . * @ param urls * An array of URLs pointing to additional celebrity information . */ public void setUrls ( java . util . Collection < String > urls ) { } }
if ( urls == null ) { this . urls = null ; return ; } this . urls = new java . util . ArrayList < String > ( urls ) ;
public class BpmnModelValidator { /** * Returns ' true ' if at least one process definition in the { @ link BpmnModel } is executable . */ protected boolean validateAtLeastOneExecutable ( BpmnModel bpmnModel , List < ValidationError > errors ) { } }
int nrOfExecutableDefinitions = 0 ; for ( Process process : bpmnModel . getProcesses ( ) ) { if ( process . isExecutable ( ) ) { nrOfExecutableDefinitions ++ ; } } if ( nrOfExecutableDefinitions == 0 ) { addError ( errors , Problems . ALL_PROCESS_DEFINITIONS_NOT_EXECUTABLE , "All process definition are set to be non-ex...
public class SchemaFactory { /** * Specifies whether to perform checking of ID / IDREF / IDREFS attributes in accordance with * RELAX NG DTD Compatibility . * @ param checkIdIdref < code > true < / code > if ID / IDREF / IDREFS checking should be performed ; * < code > false < / code > otherwise * @ see # getCh...
properties . put ( RngProperty . CHECK_ID_IDREF , checkIdIdref ? Flag . PRESENT : null ) ;
public class ListThingRegistrationTaskReportsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListThingRegistrationTaskReportsRequest listThingRegistrationTaskReportsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listThingRegistrationTaskReportsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listThingRegistrationTaskReportsRequest . getTaskId ( ) , TASKID_BINDING ) ; protocolMarshaller . marshall ( listThingRegistrationTaskReportsRequ...
public class CPTaxCategoryPersistenceImpl { /** * Returns a range of all the cp tax categories where groupId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in...
return findByGroupId ( groupId , start , end , null ) ;
public class TableCellCheckboxEditor { /** * { @ inheritDoc } */ @ Override public Object getCellEditorValue ( ) { } }
if ( isClicked ( ) ) { JOptionPane . showMessageDialog ( button , "You clicked the button with the value " + this . value + " in row index " + row + " and in colunm index " + column + "." ) ; } setClicked ( false ) ; String text = "" ; if ( getValue ( ) != null ) { text = getValue ( ) . toString ( ) ; } return text ;
public class MetricRegistry { /** * Return the { @ link Gauge } registered under this name ; or create and register * a new { @ link Gauge } using the provided MetricSupplier if none is registered . * @ param name the name of the metric * @ param supplier a MetricSupplier that can be used to manufacture a Gauge ...
return getOrAdd ( name , new MetricBuilder < Gauge > ( ) { @ Override public Gauge newMetric ( ) { return supplier . newMetric ( ) ; } @ Override public boolean isInstance ( Metric metric ) { return Gauge . class . isInstance ( metric ) ; } } ) ;
public class ServerSidePreparedStatement { /** * < p > Releases this < code > Statement < / code > object ' s database and JDBC resources immediately * instead of waiting for this to happen when it is automatically closed . It is generally good * practice to release resources as soon as you are finished with them t...
lock . lock ( ) ; try { closed = true ; if ( results != null ) { if ( results . getFetchSize ( ) != 0 ) { skipMoreResults ( ) ; } results . close ( ) ; } // No possible future use for the cached results , so these can be cleared // This makes the cache eligible for garbage collection earlier if the statement is not // ...
public class CleverTapAPI { /** * Use this method to enable device network - related information tracking , including IP address . * This reporting is disabled by default . To re - disable tracking call this method with enabled set to false . * @ param value boolean Whether device network info reporting should be e...
"unused" , "WeakerAccess" } ) public void enableDeviceNetworkInfoReporting ( boolean value ) { enableNetworkInfoReporting = value ; StorageHelper . putBoolean ( context , storageKeyWithSuffix ( Constants . NETWORK_INFO ) , enableNetworkInfoReporting ) ; getConfigLogger ( ) . verbose ( getAccountId ( ) , "Device Network...
public class BandLU { /** * Creates an LU decomposition of the given matrix * @ param A * Matrix to decompose . If the decomposition is in - place , its * number of superdiagonals must equal < code > kl + ku < / code > * @ param inplace * Wheter or not the decomposition should overwrite the passed * matrix ...
if ( inplace ) return factor ( A ) ; else return factor ( new BandMatrix ( A , kl , kl + ku ) ) ;
public class AlertPolicyFilter { /** * Method allow to filter policies by its references . * @ param policies is not null list of policy references * @ return { @ link AlertPolicyFilter } */ public AlertPolicyFilter policies ( AlertPolicy ... policies ) { } }
allItemsNotNull ( policies , "Anti-affinity Policies" ) ; evaluation = new AndEvaluation < > ( evaluation , Filter . or ( Streams . map ( policies , AlertPolicy :: asFilter ) ) , AlertPolicyMetadata :: getId ) ; return this ;
public class TimerMethodData { /** * Adds an automatic timer to this metadata . * @ param timer the automatic timer */ void addAutomaticTimer ( AutomaticTimer timer ) { } }
timer . ivMethod = this ; ivAutomaticTimers . add ( timer ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "added automatic timer: " + timer ) ;
public class AnalysisLog { /** * Log that this record has been added . * Call this from the end of record . init * @ param record the record that is being added . */ public void logAddRecord ( Rec record , int iSystemID ) { } }
try { this . getTable ( ) . setProperty ( DBParams . SUPRESSREMOTEDBMESSAGES , DBConstants . TRUE ) ; this . getTable ( ) . getDatabase ( ) . setProperty ( DBParams . MESSAGES_TO_REMOTE , DBConstants . FALSE ) ; this . addNew ( ) ; this . getField ( AnalysisLog . SYSTEM_ID ) . setValue ( iSystemID ) ; this . getField (...
public class ResourceDescriptionsProvider { /** * / * @ NonNull */ @ Override public IResourceDescriptions getResourceDescriptions ( /* @ NonNull */ ResourceSet resourceSet ) { } }
String flag = getFlagFromLoadOptions ( resourceSet ) ; IResourceDescriptions result ; if ( NAMED_BUILDER_SCOPE . equals ( flag ) ) { result = createBuilderScopeResourceDescriptions ( ) ; } else if ( LIVE_SCOPE . equals ( flag ) ) { result = createLiveScopeResourceDescriptions ( ) ; } else if ( PERSISTED_DESCRIPTIONS . ...
public class CreateWSDL11 { /** * AddSchema Method . */ public void addSchema ( String version , TTypes types , MessageInfo recMessageInfo ) { } }
String name = this . fixName ( recMessageInfo . getField ( MessageInfo . DESCRIPTION ) . toString ( ) ) ; Import importel = schemaFactory . createImport ( ) ; org . w3 . _2001 . xmlschema . Schema schema = ( org . w3 . _2001 . xmlschema . Schema ) types . getAny ( ) . get ( 0 ) ; // LAME schema . getIncludeOrImportOrRe...
public class StandardResourceDescriptionResolver { /** * { @ inheritDoc } */ @ Override public String getOperationDeprecatedDescription ( String operationName , Locale locale , ResourceBundle bundle ) { } }
return bundle . getString ( getBundleKey ( operationName , DEPRECATED ) ) ;
public class AbstractModule { /** * Registers an object / data structure to the module . Objects registered by * this method are accessible by services and controllers via { @ link Inject } * annotation within the same module , or to a module during configuration . * For example , * < pre > * MyModule module ...
ngo . constant ( name , value ) ; return this ;
public class systemuser { /** * Use this API to delete systemuser of given name . */ public static base_response delete ( nitro_service client , String username ) throws Exception { } }
systemuser deleteresource = new systemuser ( ) ; deleteresource . username = username ; return deleteresource . delete_resource ( client ) ;
public class RelationalOperator { /** * Gets the RelationalOperator performing less than comparisons to determine whether all provided values are less than * the given upper bound value . * @ param lowerBound the Comparable upper bounded value . * @ param < T > the expected Class type for the object used in the l...
return new LessThanOperator < > ( lowerBound ) ;
public class RedoLog { /** * Reads the log file and calls back { @ link RedoLog . ActionCollector } . * @ param collector called back for each { @ link MultiIndex . Action } read . * @ throws IOException if an error occurs while reading from the * log file . */ private void read ( final ActionCollector collector ...
if ( ! dir . fileExists ( REDO_LOG ) ) { return ; } InputStream in = new IndexInputStream ( dir . openInput ( REDO_LOG ) ) ; BufferedReader reader = null ; try { reader = new BufferedReader ( new InputStreamReader ( in ) ) ; String line ; while ( ( line = reader . readLine ( ) ) != null ) { try { collector . collect ( ...
public class CPDefinitionPersistenceImpl { /** * Removes all the cp definitions where uuid = & # 63 ; from the database . * @ param uuid the uuid */ @ Override public void removeByUuid ( String uuid ) { } }
for ( CPDefinition cpDefinition : findByUuid ( uuid , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( cpDefinition ) ; }
public class ExecutorBoss { /** * The start the work threads * @ param queue the queue * @ param background determine to while for futures to complete * @ return the collection of futures */ public Collection < Future < ? > > startWorking ( WorkQueue queue , boolean background ) { } }
ArrayList < Future < ? > > futures = new ArrayList < Future < ? > > ( queue . size ( ) ) ; while ( queue . hasMoreTasks ( ) ) { futures . add ( executor . submit ( queue . nextTask ( ) ) ) ; } if ( background ) return futures ; try { for ( Future < ? > future : futures ) { future . get ( ) ; // join submitted thread } ...
public class Logger { /** * Logs an important information message * @ param correlationId ( optional ) transaction id to trace execution through * call chain . * @ param message a human - readable message to log . * @ param args arguments to parameterize the message . */ public void info ( String correlationId ...
formatAndWrite ( LogLevel . Info , correlationId , null , message , args ) ;
public class ParserUtils { /** * Converts a String to the given timezone . * @ param date Date to format * @ param zoneId Zone id to convert from sherdog ' s time * @ param formatter Formatter for exotic date format * @ return the converted zonedatetime */ static ZonedDateTime getDateFromStringToZoneId ( String...
try { // noticed that date not parsed with non - US locale . For me this fix is helpful LocalDate localDate = LocalDate . parse ( date , formatter ) ; ZonedDateTime usDate = localDate . atStartOfDay ( zoneId ) ; return usDate . withZoneSameInstant ( zoneId ) ; } catch ( Exception e ) { // In case the parsing fail , we ...
public class RemoteService { /** * Calls a remote service with non - static member values in the given DataObject as arguments . */ public static Response call ( String server , String service , DataObject data , String ... params ) { } }
return call ( server , service , false , data , params ) ;
public class DualInputOperator { /** * Add to the first input the union of the given operators . * @ param input The operator ( s ) to be unioned with the first input . * @ deprecated This method will be removed in future versions . Use the { @ link Union } operator instead . */ @ Deprecated public void addFirstInp...
this . input1 = Operator . createUnionCascade ( this . input1 , input ) ;
public class WebhookCluster { /** * Sends the provided { @ link java . io . File File } * to all registered { @ link net . dv8tion . jda . webhook . WebhookClient WebhookClients } . * < br > Use { @ link WebhookMessage # files ( String , Object , Object . . . ) } to send up to 10 files ! * < p > < b > The provide...
Checks . notNull ( file , "File" ) ; return broadcast ( file , file . getName ( ) ) ;
public class LoopFrameSkipping { /** * Check if screen has sync locked . * @ param screen The screen reference . * @ return < code > true < / code > if sync enabled , < code > false < / code > else . */ private static boolean hasSync ( Screen screen ) { } }
final Config config = screen . getConfig ( ) ; final Resolution output = config . getOutput ( ) ; return config . isWindowed ( ) && output . getRate ( ) > 0 ;
public class InboundNatRulesInner { /** * Creates or updates a load balancer inbound nat rule . * @ param resourceGroupName The name of the resource group . * @ param loadBalancerName The name of the load balancer . * @ param inboundNatRuleName The name of the inbound nat rule . * @ param inboundNatRuleParamete...
return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , loadBalancerName , inboundNatRuleName , inboundNatRuleParameters ) , serviceCallback ) ;
public class AsciiSet { /** * Returns a new set that will match characters iff they are included this set and in the * set that is provided . */ public AsciiSet intersection ( AsciiSet set ) { } }
final boolean [ ] intersectionMembers = new boolean [ 128 ] ; for ( int i = 0 ; i < intersectionMembers . length ; ++ i ) { intersectionMembers [ i ] = members [ i ] && set . members [ i ] ; } return new AsciiSet ( intersectionMembers ) ;
public class ClasspathFolder { /** * @ see # navigate ( String ) * @ param path the { @ link ResourcePathNode } . * @ param create - { @ code true } if non existing ressources should be created as fake resources , * { @ code false } oterhwise . * @ return the { @ link AbstractBrowsableClasspathResource } . May ...
ClasspathFolder folder = this ; List < ResourcePathNode < Void > > pathList = path . asList ( ) ; for ( ResourcePathNode < Void > node : pathList ) { String nodeName = node . getName ( ) ; if ( node . isRoot ( ) ) { if ( node . isAbsolute ( ) ) { if ( node == ResourcePathNode . ROOT_ABSOLUTE ) { folder = getRoot ( ) ; ...
public class SemanticProperties { /** * Adds , to the existing information , field ( s ) that are written in * the destination record ( s ) . * @ param writtenFields the position ( s ) in the destination record ( s ) */ public void addWrittenFields ( FieldSet writtenFields ) { } }
if ( this . writtenFields == null ) { this . writtenFields = new FieldSet ( writtenFields ) ; } else { this . writtenFields . addAll ( writtenFields ) ; }
public class PySrcMain { /** * Generate the manifest file by finding the output file paths and converting them into a Python * import format . */ private static ImmutableMap < String , String > generateManifest ( List < String > soyNamespaces , Multimap < String , Integer > outputs ) { } }
ImmutableMap . Builder < String , String > manifest = new ImmutableMap . Builder < > ( ) ; for ( String outputFilePath : outputs . keySet ( ) ) { for ( int inputFileIndex : outputs . get ( outputFilePath ) ) { String pythonPath = outputFilePath . replace ( ".py" , "" ) . replace ( '/' , '.' ) ; manifest . put ( soyName...
public class TrackerClient { /** * Fire the announce response event to all listeners . * @ param complete The number of seeders on this torrent . * @ param incomplete The number of leechers on this torrent . * @ param interval The announce interval requested by the tracker . */ protected void fireAnnounceResponse...
for ( AnnounceResponseListener listener : this . listeners ) { listener . handleAnnounceResponse ( interval , complete , incomplete , hexInfoHash ) ; }
public class GGradientToEdgeFeatures { /** * Sets edge intensities to zero if the pixel has an intensity which is less than any of * the two adjacent pixels . Pixel adjacency is determined based upon the sign of the image gradient . Less precise * than other methods , but faster . * @ param intensity Edge intensi...
if ( derivX instanceof GrayF32 ) { GradientToEdgeFeatures . nonMaxSuppressionCrude4 ( intensity , ( GrayF32 ) derivX , ( GrayF32 ) derivY , output ) ; } else if ( derivX instanceof GrayS16 ) { GradientToEdgeFeatures . nonMaxSuppressionCrude4 ( intensity , ( GrayS16 ) derivX , ( GrayS16 ) derivY , output ) ; } else if (...
public class ConfigFactory { /** * Like { @ link # load ( Config ) } but allows you to specify * { @ link ConfigResolveOptions } . * @ param config * the application ' s portion of the configuration * @ param resolveOptions * options for resolving the assembled typesafe stack * @ return resolved configurati...
return load ( Thread . currentThread ( ) . getContextClassLoader ( ) , config , resolveOptions ) ;
public class Params { /** * Bridging method between flags and params , provided for efficient checks . */ public long toFlagsBitSet ( ) { } }
PersistenceMode persistenceMode = ( PersistenceMode ) params [ PersistenceMode . ID ] . get ( ) ; LockingMode lockingMode = ( LockingMode ) params [ LockingMode . ID ] . get ( ) ; ExecutionMode executionMode = ( ExecutionMode ) params [ ExecutionMode . ID ] . get ( ) ; StatisticsMode statisticsMode = ( StatisticsMode )...
public class BingSpellCheckOperationsImpl { /** * The Bing Spell Check API lets you perform contextual grammar and spell checking . Bing has developed a web - based spell - checker that leverages machine learning and statistical machine translation to dynamically train a constantly evolving and highly contextual algori...
return spellCheckerWithServiceResponseAsync ( text , spellCheckerOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class PemPrivateKey { /** * Creates a { @ link PemEncoded } value from the { @ link PrivateKey } . */ static PemEncoded toPEM ( ByteBufAllocator allocator , boolean useDirect , PrivateKey key ) { } }
// We can take a shortcut if the private key happens to be already // PEM / PKCS # 8 encoded . This is the ideal case and reason why all // this exists . It allows the user to pass pre - encoded bytes straight // into OpenSSL without having to do any of the extra work . if ( key instanceof PemEncoded ) { return ( ( Pem...
public class EmbeddedJavaProcessExecutor { /** * Resolves the Java { @ link Class } containing the { @ literal main } method to the Java program to execute * from the given array of { @ link String arguments } . * @ param < T > { @ link Class } type of the main Java program . * @ param args array of { @ link Stri...
return Arrays . stream ( nullSafeArray ( args , String . class ) ) . filter ( ObjectUtils :: isPresent ) . findFirst ( ) . < Class < T > > map ( ObjectUtils :: loadClass ) . orElse ( null ) ;
public class Organizer { /** * Get element by index * @ param < T > the input type * @ param i the index * @ param args the input argument * @ return the object at the index */ public static < T > T at ( int i , T [ ] args ) { } }
if ( args == null || i < 0 ) return null ; if ( i >= args . length ) return null ; return args [ i ] ;
public class Utils { /** * Load dependencies from a resource . * @ param clasz * Class to use for loading the resource - Cannot be < code > null < / code > . * @ param resourcePathAndName * Name and path of the XML file ( in the class path ) - Cannot be < code > null < / code > . * @ return New dependencies i...
Utils4J . checkNotNull ( "clasz" , clasz ) ; Utils4J . checkNotNull ( "resourcePathAndName" , resourcePathAndName ) ; try { final URL url = clasz . getResource ( resourcePathAndName ) ; if ( url == null ) { throw new RuntimeException ( "Resource '" + resourcePathAndName + "' not found!" ) ; } final InputStream in = url...
public class VirtualMachineScaleSetsInner { /** * Deletes a VM scale set . * @ param resourceGroupName The name of the resource group . * @ param vmScaleSetName The name of the VM scale set . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable for the request *...
return deleteWithServiceResponseAsync ( resourceGroupName , vmScaleSetName ) . map ( new Func1 < ServiceResponse < OperationStatusResponseInner > , OperationStatusResponseInner > ( ) { @ Override public OperationStatusResponseInner call ( ServiceResponse < OperationStatusResponseInner > response ) { return response . b...
public class ZipFileIndex { private byte [ ] getHeader ( Entry entry ) throws IOException { } }
zipRandomFile . seek ( entry . offset ) ; byte [ ] header = new byte [ 30 ] ; zipRandomFile . readFully ( header ) ; if ( get4ByteLittleEndian ( header , 0 ) != 0x04034b50 ) throw new ZipException ( "corrupted zip file" ) ; if ( ( get2ByteLittleEndian ( header , 6 ) & 1 ) != 0 ) throw new ZipException ( "encrypted zip ...
public class JCudaDriver { /** * Returns information about the device . * < pre > * CUresult cuDeviceGetAttribute ( * int * pi , * CUdevice _ attribute attrib , * CUdevice dev ) * < / pre > * < div > * < p > Returns information about the device . * Returns in < tt > * pi < / tt > the integer value of ...
return checkResult ( cuDeviceGetAttributeNative ( pi , attrib , dev ) ) ;
public class JDBCStoreResource { /** * Sets the current transaction timeout value for this XAResource instance . * @ param _ seconds number of seconds * @ return always < i > true < / i > */ @ Override public boolean setTransactionTimeout ( final int _seconds ) { } }
if ( JDBCStoreResource . LOG . isDebugEnabled ( ) ) { JDBCStoreResource . LOG . debug ( "setTransactionTimeout (seconds = " + _seconds + ")" ) ; } return true ;
public class PresentsDObjectMgr { /** * Performs the processing associated with a compound event , notifying listeners and the like . */ protected void processCompoundEvent ( CompoundEvent event ) { } }
List < DEvent > events = event . getEvents ( ) ; int ecount = events . size ( ) ; // look up the target object DObject target = _objects . get ( event . getTargetOid ( ) ) ; if ( target == null ) { log . debug ( "Compound event target no longer exists" , "event" , event ) ; return ; } // check the permissions on all of...
public class ApiOvhDomain { /** * Delete a whois obfuscator * REST : DELETE / domain / { serviceName } / owo / { field } * @ param serviceName [ required ] The internal name of your domain * @ param field [ required ] Obfuscated field */ public void serviceName_owo_field_DELETE ( String serviceName , net . minide...
String qPath = "/domain/{serviceName}/owo/{field}" ; StringBuilder sb = path ( qPath , serviceName , field ) ; exec ( qPath , "DELETE" , sb . toString ( ) , null ) ;
public class EventFeedbackTypeMarshaller { /** * Marshall the given parameter object . */ public void marshall ( EventFeedbackType eventFeedbackType , ProtocolMarshaller protocolMarshaller ) { } }
if ( eventFeedbackType == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( eventFeedbackType . getFeedbackValue ( ) , FEEDBACKVALUE_BINDING ) ; protocolMarshaller . marshall ( eventFeedbackType . getProvider ( ) , PROVIDER_BINDING ) ; protoco...
public class PropertiesManager { /** * Determine whether or not one property holds references to another property . * @ param property1 * the property to check for references * @ param property2 * the target referenced property * @ return < code > true < / code > if the first property references the second ; ...
return getEvaluator ( ) . isReferencing ( getRawProperty ( property1 ) , getTranslator ( ) . getPropertyName ( property2 ) , getRetriever ( ) ) ;
public class GreenPepperXmlRpcClient { /** * { @ inheritDoc } */ @ SuppressWarnings ( "unchecked" ) public Reference getReference ( Reference reference , String identifier ) throws GreenPepperServerException { } }
Vector params = CollectionUtil . toVector ( reference . marshallize ( ) ) ; log . debug ( "Retrieving Reference: " + reference . getRequirement ( ) . getName ( ) + "," + reference . getSpecification ( ) . getName ( ) ) ; Vector < Object > referenceParams = ( Vector < Object > ) execute ( XmlRpcMethodName . getReference...
public class ListenerFactory { /** * Creates a list of adapters for the given object , based on the legacy * listener interfaces it implements . * @ param provider * An object that implements zero or more legacy listener interfaces . * @ return * The list of listeners represented by the given provider class ....
final List < Listener > listeners = new ArrayList < Listener > ( ) ; if ( provider instanceof AuthenticationSuccessListener ) { listeners . add ( new AuthenticationSuccessListenerAdapter ( ( AuthenticationSuccessListener ) provider ) ) ; } if ( provider instanceof AuthenticationFailureListener ) { listeners . add ( new...
public class MailRequest { /** * Creates a MimeMessage containing given Multipart . * Subject , sender and content and session will be set . * @ param session current mail session * @ return MimeMessage without recipients * @ throws MessagingException */ public MimeMessage createMimeMessage ( Session session ) ...
if ( isEmpty ( htmlPart ) && isEmpty ( textPart ) ) { throw new IllegalArgumentException ( "Missing email content" ) ; } final MimeMessage msg = new MimeMessage ( session ) ; msg . setSubject ( subject ) ; msg . setFrom ( new InternetAddress ( from ) ) ; msg . setContent ( createMultiPart ( ) ) ; msg . setRecipients ( ...
public class AWSACMPCAClient { /** * Adds one or more tags to your private CA . Tags are labels that you can use to identify and organize your AWS * resources . Each tag consists of a key and an optional value . You specify the private CA on input by its Amazon * Resource Name ( ARN ) . You specify the tag by using...
request = beforeClientExecution ( request ) ; return executeTagCertificateAuthority ( request ) ;
public class ThriftFunction { /** * Sets the success field of the specified { @ code result } to the specified { @ code value } . */ public void setSuccess ( TBase < ? , ? > result , Object value ) { } }
if ( successField != null ) { ThriftFieldAccess . set ( result , successField , value ) ; }
public class SyntaxCtr { public static String getName ( String x ) { } }
String ret = null ; if ( x . equals ( "280" ) ) { ret = "DE" ; } else if ( x . equals ( "040" ) ) { ret = "AT" ; } else if ( x . equals ( "250" ) ) { ret = "FR" ; } else if ( x . equals ( "056" ) ) { ret = "BE" ; } else if ( x . equals ( "100" ) ) { ret = "BG" ; } else if ( x . equals ( "208" ) ) { ret = "DK" ; } else ...
public class DataSiftApiClient { /** * To support futures being passed as parameters , this method adds a listener to the unprocessed future that has * been passed as a parameter . Once that listener is invoked , the response of the unprocessed future is examined * to see if the response was successful , if it was ...
futureToUnwrap . onData ( new FutureResponse < T > ( ) { public void apply ( T stream ) { if ( stream . isSuccessful ( ) ) { responseToExecuteOnSuccess . apply ( stream ) ; } else { expectedInstance . setResponse ( stream . getResponse ( ) ) ; futureReturnedToUser . received ( expectedInstance ) ; } } } ) ;
public class WaveformDetailComponent { /** * Set the zoom scale of the view . a value of 1 ( the smallest allowed ) draws the waveform at full scale . * Larger values combine more and more segments into a single column of pixels , zooming out to see more at once . * @ param scale the number of waveform segments tha...
if ( ( scale < 1 ) || ( scale > 256 ) ) { throw new IllegalArgumentException ( "Scale must be between 1 and 256" ) ; } int oldScale = this . scale . getAndSet ( scale ) ; if ( oldScale != scale ) { repaint ( ) ; if ( ! autoScroll . get ( ) ) { setSize ( getPreferredSize ( ) ) ; } }
public class BlockDataHandler { /** * Removes the custom data stored at the { @ link BlockPos } for the specified identifier . * @ param < T > the generic type * @ param identifier the identifier * @ param world the world * @ param pos the pos */ public static < T > void removeData ( String identifier , IBlockA...
removeData ( identifier , world , pos , false ) ;
public class MethodUtil { /** * Bounce through the trampoline . */ public static Object invoke ( Method m , Object obj , Object [ ] params ) throws InvocationTargetException , IllegalAccessException { } }
try { return bounce . invoke ( null , new Object [ ] { m , obj , params } ) ; } catch ( InvocationTargetException ie ) { Throwable t = ie . getCause ( ) ; if ( t instanceof InvocationTargetException ) { throw ( InvocationTargetException ) t ; } else if ( t instanceof IllegalAccessException ) { throw ( IllegalAccessExce...
public class KnownDurableSubscription { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . SIMPKnownDurableSubscriptionControllable # getDurableHome ( ) */ public String getDurableHome ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDurableHome" ) ; String home = subscriptionControl . getDurableHome ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getDurableHome" , home ) ; return home ;
public class UrlBuilder { /** * Set the host that will be used to build the final URL . * @ param host The host that will be used to build the final URL . * @ return This UrlBuilder so that multiple setters can be chained together . */ public UrlBuilder withHost ( String host ) { } }
if ( host == null || host . isEmpty ( ) ) { this . host = null ; } else { with ( host , UrlTokenizerState . SCHEME_OR_HOST ) ; } return this ;
public class InfinispanEmbeddedStoredProceduresManager { /** * Returns the result of a stored procedure executed on the backend . * @ param embeddedCacheManager embedded cache manager * @ param storedProcedureName name of stored procedure * @ param queryParameters parameters passed for this query * @ param clas...
validate ( queryParameters ) ; Cache < String , String > cache = embeddedCacheManager . getCache ( STORED_PROCEDURES_CACHE_NAME , true ) ; String className = cache . getOrDefault ( storedProcedureName , storedProcedureName ) ; Callable < ? > callable = instantiate ( storedProcedureName , className , classLoaderService ...
public class BaseHttpServletAwareSamlObjectEncoder { /** * Build encoder message context . * @ param request the authn request * @ param samlObject the saml response * @ param relayState the relay state * @ return the message context */ protected MessageContext getEncoderMessageContext ( final RequestAbstractTy...
val ctx = new MessageContext < SAMLObject > ( ) ; ctx . setMessage ( samlObject ) ; SAMLBindingSupport . setRelayState ( ctx , relayState ) ; SamlIdPUtils . preparePeerEntitySamlEndpointContext ( request , ctx , adaptor , getBinding ( ) ) ; val self = ctx . getSubcontext ( SAMLSelfEntityContext . class , true ) ; self ...
public class MD5FileUtils { /** * Verify that the previously saved md5 for the given file matches * expectedMd5. * @ throws IOException */ public static void verifySavedMD5 ( File dataFile , MD5Hash expectedMD5 ) throws IOException { } }
MD5Hash storedHash = readStoredMd5ForFile ( dataFile ) ; // Check the hash itself if ( ! expectedMD5 . equals ( storedHash ) ) { throw new IOException ( "File " + dataFile + " did not match stored MD5 checksum " + " (stored: " + storedHash + ", computed: " + expectedMD5 ) ; }
public class Language { /** * Get a list of rules that require a { @ link Word2VecModel } . Returns an empty list for * languages that don ' t have such rules . * @ since 4.0 */ public List < Rule > getRelevantWord2VecModelRules ( ResourceBundle messages , Word2VecModel word2vecModel ) throws IOException { } }
return Collections . emptyList ( ) ;
public class CommerceNotificationTemplatePersistenceImpl { /** * Returns the first commerce notification template in the ordered set where groupId = & # 63 ; and type = & # 63 ; and enabled = & # 63 ; . * @ param groupId the group ID * @ param type the type * @ param enabled the enabled * @ param orderByCompara...
List < CommerceNotificationTemplate > list = findByG_T_E ( groupId , type , enabled , 0 , 1 , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ;
public class LZ4CompressorWithLength { /** * Compresses < code > src < / code > into < code > dest < / code > . Calling this method * will update the positions of both { @ link ByteBuffer } s . * @ param src the source data * @ param dest the destination buffer * @ throws LZ4Exception if dest is too small */ pu...
final int compressedLength = compress ( src , src . position ( ) , src . remaining ( ) , dest , dest . position ( ) , dest . remaining ( ) ) ; src . position ( src . limit ( ) ) ; dest . position ( dest . position ( ) + compressedLength ) ;
public class UploadWorkerThread { /** * " waiting for upload " * Assigns attachmentName , originalName , submitter , uploadId , * " original " structure and " data " structure . * Upload id document is deleted from document database . * - > " submitted " when upload id is found . * " submitted " * Assigns v...
logger . info ( "Upload worker processing: " + work ) ; String state = work . getState ( ) ; if ( UploadConstants . UPLOAD_STATUS_WAITING_FOR_UPLOAD . equals ( state ) ) { performWaitingForUploadWork ( work ) ; } else if ( UploadConstants . UPLOAD_STATUS_SUBMITTED . equals ( state ) ) { performSubmittedWork ( work ) ; ...
public class RuleCharacterIterator { /** * Returns the current 32 - bit code point without parsing escapes , parsing * variables , or skipping whitespace . * @ return the current 32 - bit code point */ private int _current ( ) { } }
if ( buf != null ) { return UTF16 . charAt ( buf , 0 , buf . length , bufPos ) ; } else { int i = pos . getIndex ( ) ; return ( i < text . length ( ) ) ? UTF16 . charAt ( text , i ) : DONE ; }
public class TriangularSolver_ZDRM { /** * This is a forward substitution solver for non - singular upper triangular matrices . * < br > * b = U < sup > - 1 < / sup > b < br > * < br > * where b is a vector , U is an n by n matrix . < br > * @ param U An n by n non - singular upper triangular matrix . Not mod...
// for ( int i = n - 1 ; i > = 0 ; i - - ) { // double sum = b [ i ] ; // for ( int j = i + 1 ; j < n ; j + + ) { // sum - = U [ i * n + j ] * b [ j ] ; // b [ i ] = sum / U [ i * n + i ] ; int stride = n * 2 ; for ( int i = n - 1 ; i >= 0 ; i -- ) { double sumReal = b [ i * 2 ] ; double sumImg = b [ i * 2 + 1 ] ; int ...