signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class SqlProcedureStatement { /** * Get the syntax that is required to invoke the procedure that is defined * by the < code > ProcedureDescriptor < / code > that was passed to the * constructor of this class . * @ see SqlStatement # getStatement ( ) */ public String getStatement ( ) { } }
StringBuffer sb = new StringBuffer ( 512 ) ; int argumentCount = this . procedureDescriptor . getArgumentCount ( ) ; if ( this . procedureDescriptor . hasReturnValue ( ) ) { sb . append ( "{ ?= call " ) ; } else { sb . append ( "{ call " ) ; } sb . append ( this . procedureDescriptor . getName ( ) ) ; sb . append ( "("...
public class BlobW { /** * Write blob data . * @ param v byte to be written at current position . */ public void write ( int v ) throws IOException { } }
byte b [ ] = new byte [ 1 ] ; b [ 0 ] = ( byte ) v ; pos += blob . write ( b , 0 , pos , 1 ) ;
public class LocationReferenceCheck { /** * Setter . * @ param pVariableNames list of variable names to cover */ public void setVariableNames ( final String ... pVariableNames ) { } }
final Set < String > newVariableNames = new HashSet < > ( ) ; Collections . addAll ( newVariableNames , pVariableNames ) ; variableNames = Collections . unmodifiableSet ( newVariableNames ) ;
public class RedisCounterFactory { /** * { @ inheritDoc } */ @ Override public void destroy ( ) { } }
try { super . destroy ( ) ; } catch ( Exception e ) { LOGGER . warn ( e . getMessage ( ) , e ) ; } if ( jedisPool != null && myOwnJedisPool ) { try { jedisPool . destroy ( ) ; } catch ( Exception e ) { LOGGER . warn ( e . getMessage ( ) , e ) ; } finally { jedisPool = null ; } }
public class Invalidator { /** * Invalidates all keys from Near Caches of supplied data structure name . * @ param dataStructureName name of the data structure to be cleared */ public final void invalidateAllKeys ( String dataStructureName , String sourceUuid ) { } }
checkNotNull ( sourceUuid , "sourceUuid cannot be null" ) ; int orderKey = getPartitionId ( dataStructureName ) ; Invalidation invalidation = newClearInvalidation ( dataStructureName , sourceUuid ) ; sendImmediately ( invalidation , orderKey ) ;
public class Partial { /** * Gets a string version of the partial that lists all the fields . * This method exists to provide a better debugging toString than * the standard toString . This method lists all the fields and their * values in a style similar to the collections framework . * @ return a toString for...
int size = size ( ) ; StringBuilder buf = new StringBuilder ( 20 * size ) ; buf . append ( '[' ) ; for ( int i = 0 ; i < size ; i ++ ) { if ( i > 0 ) { buf . append ( ',' ) . append ( ' ' ) ; } buf . append ( iTypes [ i ] . getName ( ) ) ; buf . append ( '=' ) ; buf . append ( iValues [ i ] ) ; } buf . append ( ']' ) ;...
public class ClassUtils { /** * Searches for a file system class by its name and attempts to load it . * @ param className * the name of the file system class * @ return an instance of the file system class * @ throws ClassNotFoundException * thrown if no class with such a name can be found */ public static C...
return Class . forName ( className , true , getClassLoader ( ) ) . asSubclass ( FileSystem . class ) ;
public class JxnetAutoConfiguration { /** * A handle link type . * @ param context application context . * @ return returns { @ link com . ardikars . jxpacket . common . layer . DataLinkLayer } . */ @ ConditionalOnClass ( { } }
Context . class , DataLinkType . class } ) // @ ConditionalOnBean ( Context . class ) @ Bean ( DATALINK_TYPE_BEAN_NAME ) public DataLinkType dataLinkType ( @ Qualifier ( CONTEXT_BEAN_NAME ) Context context ) { DataLinkType dataLinkType = context . pcapDataLink ( ) ; if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug (...
public class ServerStateMachine { /** * Executes a state machine command . */ private void executeCommand ( long index , long sequence , long timestamp , ServerCommit commit , ServerSessionContext session , CompletableFuture < Result > future , ThreadContext context ) { } }
if ( ! log . isOpen ( ) ) { context . executor ( ) . execute ( ( ) -> future . completeExceptionally ( new IllegalStateException ( "log closed" ) ) ) ; return ; } // If the session is already in an inactive state , complete the future exceptionally . if ( ! session . state ( ) . active ( ) ) { context . executor ( ) . ...
public class DefaultGroovyMethods { /** * Create a suffix of the given Map by dropping as many entries as possible from the * front of the original Map such that calling the given closure condition evaluates to * true when passed each of the dropped entries ( or key / value pairs ) . * < pre class = " groovyTestC...
if ( self . isEmpty ( ) ) { return createSimilarMap ( self ) ; } Map < K , V > ret = createSimilarMap ( self ) ; boolean dropping = true ; BooleanClosureWrapper bcw = new BooleanClosureWrapper ( condition ) ; for ( Map . Entry < K , V > entry : self . entrySet ( ) ) { if ( dropping && ! bcw . callForMap ( entry ) ) dro...
public class BaseTileBasedDataProcessor { /** * Prepare relations which aren ' t written as relation and only exist as geo - inheritance . * Root and part elements will be assigned to a tile ( not to be confused with later tile processing ) . * This facilitates to find matching parts and accelerates the process . ...
if ( tdWay . isCoastline ( ) ) { // find matching tiles on zoom level 12 Set < TileCoordinate > coastLineTiles = GeoUtils . mapWayToTiles ( tdWay , TileInfo . TILE_INFO_ZOOMLEVEL , 0 ) ; for ( TileCoordinate tileCoordinate : coastLineTiles ) { TLongHashSet coastlines = this . tilesToCoastlines . get ( tileCoordinate ) ...
public class QWhereSection { /** * { @ inheritDoc } */ @ Override public QWhereSection prepare ( final AbstractObjectQuery < ? > _query ) throws EFapsException { } }
this . part . prepare ( _query , null ) ; return this ;
public class ConvolveImage { /** * Performs a horizontal 1D convolution across the image . * @ param input The original image . Not modified . * @ param output Where the resulting image is written to . Modified . * @ param kernel The kernel that is being convolved . Not modified . * @ param border How the image...
InputSanityCheck . checkSameShape ( input , output ) ; boolean processed = BOverrideConvolveImage . invokeNativeHorizontal ( kernel , input , output , border ) ; if ( ! processed ) { border . setImage ( input ) ; ConvolveImageNoBorder . horizontal ( kernel , input , output ) ; ConvolveJustBorder_General_SB . horizontal...
public class LongToInteger { /** * { @ inheritDoc } */ @ Override protected Object primTransform ( Object anObject ) throws Exception { } }
return Integer . valueOf ( ( ( Long ) anObject ) . toString ( ) ) ;
public class IntegerConstant { /** * Writes the contents of the pool entry . */ void write ( ByteCodeWriter out ) throws IOException { } }
out . write ( ConstantPool . CP_INTEGER ) ; out . writeInt ( _value ) ;
public class MapRealMatrix { /** * { @ inheritDoc } */ @ Override public RealMatrix copy ( ) { } }
MapRealMatrix copy = new MapRealMatrix ( rowDimension , columnDimension ) ; copy . entries . putAll ( entries ) ; return copy ;
public class HttpDispatcherFactory { /** * @ see com . ibm . wsspi . channelfw . ChannelFactory # updateProperties ( java . util . Map ) */ public synchronized void updateProperties ( Map < Object , Object > properties ) { } }
this . commonProperties = properties ; this . globalBufferSize = properties . get ( PROP_BUFFERSIZE ) ;
public class RelationMention { /** * setter for arguments - sets * @ generated * @ param v value to set into the feature */ public void setArguments ( FSArray v ) { } }
if ( RelationMention_Type . featOkTst && ( ( RelationMention_Type ) jcasType ) . casFeat_arguments == null ) jcasType . jcas . throwFeatMissing ( "arguments" , "de.julielab.jules.types.RelationMention" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( RelationMention_Type ) jcasType ) . casFeatCode_arguments , jcasTy...
public class DB { /** * Log query result . * @ param callInfo Call info . * @ param data Data set . */ void logQuery ( CallInfo callInfo , DataSet data ) { } }
if ( isEnabled ( Option . LOG_QUERIES ) ) { log . write ( callInfo , data ) ; }
public class ComponentTagDeclarationLibrary { /** * ( non - Javadoc ) * @ see org . apache . myfaces . view . facelets . tag . TagLibrary # containsTagHandler ( java . lang . String , java . lang . String ) */ public boolean containsTagHandler ( String ns , String localName ) { } }
if ( containsNamespace ( ns ) ) { Map < String , TagHandlerFactory > map = _factories . get ( ns ) ; if ( map == null ) { return false ; } return map . containsKey ( localName ) ; } else { return false ; }
public class BeanUtils { /** * An helper method to build and throw a SQL Exception when a property cannot be set . * @ param cause the cause * @ param theType the type of the property * @ param value the value of the property * @ throws SQLException the SQL Exception */ public static void throwSQLException ( Ex...
throw new SQLException ( "Invalid " + theType + " value: " + value , cause ) ;
public class XLog { /** * Initialize log system , should be called only once . * @ param logLevel the log level , logs with a lower level than which would not be printed * @ param logConfiguration the log configuration * @ param printers the printers , each log would be printed by all of the printers * @ deprec...
init ( new LogConfiguration . Builder ( logConfiguration ) . logLevel ( logLevel ) . build ( ) , printers ) ;
public class EnumValue { /** * < p > Normalizes a string to be uppercase and use and underscore in place of whitespace . < / p > * @ param name the name to be normalized * @ return the normalized version of the name * @ throws NullPointerException if the name is null */ static String normalize ( @ NonNull String ...
StringBuilder toReturn = new StringBuilder ( ) ; boolean previousSpace = false ; for ( char c : name . toCharArray ( ) ) { if ( Character . isWhitespace ( c ) ) { if ( ! previousSpace ) { toReturn . append ( '_' ) ; } previousSpace = true ; } else { previousSpace = false ; toReturn . append ( Character . toUpperCase ( ...
public class AbstractGenericRowMapper { /** * Generate SELECT statement to select a BO . * The generated SQL will look like this * { @ code SELECT all - columns FROM table WHERE pk - 1 = ? AND pk - 2 = ? . . . } * @ param tableName * @ return * @ since 0.8.5 */ public String generateSqlSelect ( String tableNa...
try { return cacheSQLs . get ( "SELECT:" + tableName , ( ) -> { return MessageFormat . format ( "SELECT {2} FROM {0} WHERE {1}" , tableName , strWherePkClause , strAllColumns ) ; } ) ; } catch ( ExecutionException e ) { throw new DaoException ( e ) ; }
public class dnssuffix { /** * Use this API to fetch dnssuffix resources of given names . */ public static dnssuffix [ ] get ( nitro_service service , String Dnssuffix [ ] ) throws Exception { } }
if ( Dnssuffix != null && Dnssuffix . length > 0 ) { dnssuffix response [ ] = new dnssuffix [ Dnssuffix . length ] ; dnssuffix obj [ ] = new dnssuffix [ Dnssuffix . length ] ; for ( int i = 0 ; i < Dnssuffix . length ; i ++ ) { obj [ i ] = new dnssuffix ( ) ; obj [ i ] . set_Dnssuffix ( Dnssuffix [ i ] ) ; response [ i...
public class Op { /** * Creates an < i > operation expression < / i > on the specified target object . * @ param target the target object on which the expression will execute * @ return an operator , ready for chaining */ public static < T > Level0GenericUniqOperator < T , T > on ( final T target ) { } }
return new Level0GenericUniqOperator < T , T > ( ExecutionTarget . forOp ( target , Normalisation . NONE ) ) ;
public class PropertyValues { /** * Sets a dynamic property value on an object . */ void setObjectDynamicProperty ( Object object , String propertyName , Object value ) { } }
DynamicPropertyBag bag = propertyBagAccess . getObjectDynamicPropertyBag ( object ) ; if ( bag == null ) { bag = new DynamicPropertyBag ( ) ; propertyBagAccess . setObjectDynamicPropertyBag ( object , bag ) ; } bag . set ( propertyName , value ) ; Properties . notify ( object , propertyName ) ;
public class lbsipparameters { /** * Use this API to unset the properties of lbsipparameters resource . * Properties that need to be unset are specified in args array . */ public static base_response unset ( nitro_service client , lbsipparameters resource , String [ ] args ) throws Exception { } }
lbsipparameters unsetresource = new lbsipparameters ( ) ; return unsetresource . unset_resource ( client , args ) ;
public class PersistentExecutorImpl { /** * Returns status for the persistent task with the specified id . * @ param taskId unique identifier for the task . * @ return status for the persistent task with the specified id . * If the task is not found , < code > null < / code > is returned . */ @ Override public < ...
String owner = getOwner ( ) ; if ( owner == null ) return null ; TransactionController tranController = new TransactionController ( ) ; TaskRecord taskRecord = null ; try { tranController . preInvoke ( ) ; taskRecord = taskStore . findById ( taskId , owner , false ) ; } catch ( Throwable x ) { tranController . setFailu...
public class CmsImportVersion2 { /** * Merges a single page . < p > * @ param resourcename the resource name of the page * @ throws CmsImportExportException if something goes wrong * @ throws CmsXmlException if the page file could not be unmarshalled */ private void mergePageFile ( String resourcename ) throws Cm...
try { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_IMPORTEXPORT_START_MERGING_1 , resourcename ) ) ; } // in OpenCms versions < 5 node names have not been case sensitive . thus , nodes are read both in upper // and lower case letters , or have to be tested fo...
public class AWSFMSClient { /** * Returns an array of < code > PolicyComplianceStatus < / code > objects in the response . Use * < code > PolicyComplianceStatus < / code > to get a summary of which member accounts are protected by the specified * policy . * @ param listComplianceStatusRequest * @ return Result ...
request = beforeClientExecution ( request ) ; return executeListComplianceStatus ( request ) ;
public class TaskManagerService { /** * Return true if we are currently executing the given task . */ private boolean isOurActiveTask ( Tenant tenant , String taskID ) { } }
synchronized ( m_activeTasks ) { return m_activeTasks . containsKey ( createMapKey ( tenant , taskID ) ) ; }
public class authenticationlocalpolicy_authenticationvserver_binding { /** * Use this API to fetch authenticationlocalpolicy _ authenticationvserver _ binding resources of given name . */ public static authenticationlocalpolicy_authenticationvserver_binding [ ] get ( nitro_service service , String name ) throws Excepti...
authenticationlocalpolicy_authenticationvserver_binding obj = new authenticationlocalpolicy_authenticationvserver_binding ( ) ; obj . set_name ( name ) ; authenticationlocalpolicy_authenticationvserver_binding response [ ] = ( authenticationlocalpolicy_authenticationvserver_binding [ ] ) obj . get_resources ( service )...
public class Jdk14Logger { /** * Log a message and exception with error log level . */ public void error ( Object message , Throwable exception ) { } }
log ( Level . SEVERE , String . valueOf ( message ) , exception ) ;
public class IntegrationAccountBatchConfigurationsInner { /** * List the batch configurations for an integration account . * @ param resourceGroupName The resource group name . * @ param integrationAccountName The integration account name . * @ param serviceCallback the async ServiceCallback to handle successful ...
return ServiceFuture . fromResponse ( listWithServiceResponseAsync ( resourceGroupName , integrationAccountName ) , serviceCallback ) ;
public class ConstantPool { /** * Adds a name - and - type constant . */ public NameAndTypeConstant addNameAndType ( String name , String type ) { } }
NameAndTypeConstant entry = getNameAndType ( name , type ) ; if ( entry != null ) return entry ; Utf8Constant nameEntry = addUTF8 ( name ) ; Utf8Constant typeEntry = addUTF8 ( type ) ; entry = new NameAndTypeConstant ( this , _entries . size ( ) , nameEntry . getIndex ( ) , typeEntry . getIndex ( ) ) ; addConstant ( en...
public class DataIO { /** * Writes UTF - 8 encoded characters to the given stream , but does not write * the length . */ public static final void writeUTF ( OutputStream out , char [ ] chars , int offset , int length ) throws IOException { } }
for ( int i = 0 ; i < length ; i ++ ) { int c = chars [ i + offset ] ; if ( ( c >= 0x0001 ) && ( c <= 0x007F ) ) { out . write ( c ) ; } else if ( c > 0x07FF ) { out . write ( 0xe0 | ( ( c >> 12 ) & 0x0f ) ) ; out . write ( 0x80 | ( ( c >> 6 ) & 0x3f ) ) ; out . write ( 0x80 | ( c & 0x3f ) ) ; } else { out . write ( 0x...
public class BaseConnection { /** * Closes connection */ public void close ( ) { } }
if ( closed ) { log . debug ( "Already closed, nothing to do" ) ; return ; } closed = true ; if ( scope != null ) { log . debug ( "Close, disconnect from scope, and children" ) ; try { // unregister all child scopes first for ( IBasicScope basicScope : basicScopes ) { unregisterBasicScope ( basicScope ) ; } } catch ( E...
public class CmsStringUtil { /** * Returns a string representation for the given collection using the given separator . < p > * @ param collection the collection to print * @ param separator the item separator * @ return the string representation for the given collection */ public static String collectionAsString...
StringBuffer string = new StringBuffer ( 128 ) ; Iterator < ? > it = collection . iterator ( ) ; while ( it . hasNext ( ) ) { string . append ( it . next ( ) ) ; if ( it . hasNext ( ) ) { string . append ( separator ) ; } } return string . toString ( ) ;
public class SslUtils { /** * Add elements from { @ code names } into { @ code enabled } if they are in { @ code supported } . */ static void addIfSupported ( Set < String > supported , List < String > enabled , String ... names ) { } }
for ( String n : names ) { if ( supported . contains ( n ) ) { enabled . add ( n ) ; } }
public class SyntaxReader { /** * Reads a comment and returns its body . */ private String readComment ( ) { } }
if ( pos == data . length || data [ pos ] != '/' ) throw new AssertionError ( ) ; pos ++ ; int commentType = pos < data . length ? data [ pos ++ ] : - 1 ; if ( commentType == '*' ) { StringBuilder result = new StringBuilder ( ) ; boolean startOfLine = true ; for ( ; pos + 1 < data . length ; pos ++ ) { char c = data [ ...
public class TransactionOptions { /** * Create a default set of options with a custom executor . * @ param executor The executor to run the user callback code on . * @ return The TransactionOptions object . */ @ Nonnull public static TransactionOptions create ( @ Nonnull Executor executor ) { } }
return new TransactionOptions ( DEFAULT_NUM_ATTEMPTS , executor , null ) ;
public class StaticRunnerSupport { /** * Creates a pending test suite . * < p > Test suites can contain : * < ul > * < li > specs ( defined by using { @ code it ( ) } < / li > * < li > other suites ( defined by nesting { @ code describe ( ) } calls ) < / li > * < li > { @ code beforeEach ( ) } and { @ code af...
failIfNoSuiteBuilderAvailable ( "xdescribe" ) ; suiteBuilder . xdescribe ( text , block ) ;
public class Database { public void putDevicePipeProperty ( String deviceName , ArrayList < DbPipe > dbPipes ) throws DevFailed { } }
for ( DbPipe dbPipe : dbPipes ) databaseDAO . putDevicePipeProperty ( this , deviceName , dbPipe ) ;
public class TextMessageBodyWriter { /** * { @ inheritDoc } */ @ Override public void writeTo ( final Object entity , final Class < ? > type , final Type genericType , final Annotation [ ] annotations , final MediaType mediaType , final MultivaluedMap < String , Object > httpHeaders , final OutputStream entityStream ) ...
if ( entity != null ) { Writer osw = new OutputStreamWriter ( entityStream , getCharset ( mediaType ) ) ; String s = entity . toString ( ) ; osw . write ( s , 0 , s . length ( ) ) ; osw . flush ( ) ; }
public class RedisNumber { /** * 指定key的值加操作 * @ param integer * @ return */ public long increase ( long integer ) { } }
try { return getJedisCommands ( groupName ) . incrBy ( key , integer ) ; } finally { getJedisProvider ( groupName ) . release ( ) ; }
public class XpidlCompiler { /** * Compiles an . idl file into the corresponding . h and . xpt files . * @ param task * current cc task * @ param outputDir * output directory * @ param sourceFiles * source files * @ param args * command line arguments that appear before input files * @ param endArgs ...
BuildException exc = null ; final String [ ] thisSource = new String [ 1 ] ; final String [ ] tlbCommand = new String [ args . length + endArgs . length + 6 ] ; tlbCommand [ 0 ] = "xpidl" ; tlbCommand [ 1 ] = "-m" ; tlbCommand [ 2 ] = "typelib" ; final String [ ] headerCommand = new String [ args . length + endArgs . l...
public class ZipEntryUtil { /** * Copies a given ZIP entry to a ZIP file . If this . preserveTimestamps is true , original timestamp * is carried over , otherwise uses current time . * @ param originalEntry * a ZIP entry from existing ZIP file . * @ param in * contents of the ZIP entry . * @ param out * t...
ZipEntry copy = copy ( originalEntry ) ; if ( preserveTimestamps ) { TimestampStrategyFactory . getInstance ( ) . setTime ( copy , originalEntry ) ; } else { copy . setTime ( System . currentTimeMillis ( ) ) ; } addEntry ( copy , new BufferedInputStream ( in ) , out ) ;
public class AbstractExtensionProvider { /** * Register custom property for specified node type . */ public final < T > void registerProperty ( Class < T > object , String property , Function < T , Object > function ) { } }
PropertyProvider extender = extenderMap . computeIfAbsent ( object , aClass -> new PropertyProviderImpl ( ) ) ; extender . register ( property , function ) ;
public class ServerImpl { /** * Check if the client is in a valid state . * @ param client The client to test . * @ param from The client id . * @ param expected The expected client state . * @ return < code > true < / code > if valid , < code > false < / code > else . */ private static boolean checkValidity ( ...
return from >= 0 && client . getState ( ) == expected ;
public class SpreadsheetCompiler { /** * Generates DRL from the input stream containing the spreadsheet . * @ param showPackage * tells it to print or not print any package statements in the spreadsheet . * @ param xlsStream * The stream to the spreadsheet . Uses the first worksheet found * for the decision t...
return compile ( xlsStream , type , new DefaultRuleSheetListener ( showPackage , trimCell ) ) ;
public class DeferredFileOutputStream { /** * Switches the underlying output stream from a memory based stream to one * that is backed by disk . This is the point at which we realise that too much * data is being written to keep in memory , so we elect to switch to * disk - based storage . * @ exception IOExcep...
FileOutputStream aFOS = null ; try { aFOS = new FileOutputStream ( m_aOutputFile ) ; m_aMemoryOS . writeTo ( aFOS ) ; m_aCurrentOS = aFOS ; // Explicitly close the stream ( even though this is a no - op ) StreamHelper . close ( m_aMemoryOS ) ; m_aMemoryOS = null ; } catch ( final IOException ex ) { StreamHelper . close...
public class BaseMessageRecordDesc { /** * Convenience method - Put the value for this param in the map . * If it is not the correct object type , convert it first . */ public void put ( String strKey , Object objValue ) { } }
if ( this . getMessageFieldDesc ( strKey ) != null ) this . getMessageFieldDesc ( strKey ) . put ( objValue ) ; else if ( this . getMessage ( ) != null ) this . getMessage ( ) . putNative ( this . getFullKey ( strKey ) , objValue ) ;
public class ProviderConfig { /** * Gets proxy class . * @ return the proxyClass */ @ Override public Class < ? > getProxyClass ( ) { } }
if ( proxyClass != null ) { return proxyClass ; } try { if ( StringUtils . isNotBlank ( interfaceId ) ) { this . proxyClass = ClassUtils . forName ( interfaceId ) ; if ( ! proxyClass . isInterface ( ) ) { throw ExceptionUtils . buildRuntime ( "service.interfaceId" , interfaceId , "interfaceId must set interface class, ...
public class CommerceDiscountRelLocalServiceUtil { /** * Updates the commerce discount rel in the database or adds it if it does not yet exist . Also notifies the appropriate model listeners . * @ param commerceDiscountRel the commerce discount rel * @ return the commerce discount rel that was updated */ public sta...
return getService ( ) . updateCommerceDiscountRel ( commerceDiscountRel ) ;
public class Functions { /** * Fluent limit operation using primitive types * e . g . * < pre > * { @ code * import static cyclops . ReactiveSeq . limitDoubles ; * ReactiveSeq . ofDoubles ( 1d , 2d , 3d ) * . to ( limitDoubles ( 1 ) ) ; * < / pre > */ public static Function < ? super ReactiveSeq < Double ...
return a -> a . doubles ( i -> i , s -> s . limit ( maxSize ) ) ;
public class UIManager { /** * Retrieves a renderer which can renderer templates for the given context . * @ param context the render context . * @ return an appropriate renderer for the component and context , or null if a suitable renderer could not be found . * @ deprecated Use { @ link WTemplate } instead . *...
String packageName = context . getRenderPackage ( ) ; Renderer renderer = INSTANCE . templateRenderers . get ( packageName ) ; if ( renderer == null ) { renderer = INSTANCE . findTemplateRenderer ( packageName ) ; } else if ( renderer == NULL_RENDERER ) { return null ; } return renderer ;
public class SystemProperties { /** * Returns { @ link Boolean # TRUE } if the named system property exists and is equal to the string { @ code " true } * ( ignoring case ) , returns { @ link Boolean # FALSE } if the system property exists and doesn ' t equal { @ code " true } * otherwise returns { @ code null } if...
String v = getString ( name ) ; return v == null ? null : Boolean . parseBoolean ( v ) ;
public class LineString { /** * Create a new instance of this class by defining a list of { @ link Point } s which follow the * correct specifications described in the Point documentation . Note that there should not be any * duplicate points inside the list and the points combined should create a LineString with a...
return new LineString ( TYPE , null , points ) ;
public class SecureUtil { /** * 生成公钥 , 仅用于非对称加密 < br > * 算法见 : https : / / docs . oracle . com / javase / 7 / docs / technotes / guides / security / StandardNames . html # KeyFactory * @ param algorithm 算法 * @ param keySpec { @ link KeySpec } * @ return 公钥 { @ link PublicKey } * @ since 3.1.1 */ public static...
return KeyUtil . generatePublicKey ( algorithm , keySpec ) ;
public class WorkManagerImpl { /** * Do first checks for work starting methods * @ param work to check * @ param startTimeout to check * @ param execContext to check * @ throws WorkException in case of check don ' t pass */ public void doFirstChecks ( Work work , long startTimeout , ExecutionContext execContext...
if ( isShutdown ( ) ) throw new WorkRejectedException ( bundle . workmanagerShutdown ( ) ) ; if ( work == null ) throw new WorkRejectedException ( bundle . workIsNull ( ) ) ; if ( startTimeout < 0 ) throw new WorkRejectedException ( bundle . startTimeoutIsNegative ( startTimeout ) ) ; checkAndVerifyWork ( work , execCo...
public class QrHelperFunctions_ZDRM { /** * Performs the following operation : < br > * u [ ( startU + j ) : ( startU + numRows ) ] / = A < br > * were u and A are a complex */ public static void divideElements ( final int j , final int numRows , final double [ ] u , final int startU , final double realA , final do...
double mag2 = realA * realA + imagA * imagA ; int index = ( startU + j ) * 2 ; for ( int i = j ; i < numRows ; i ++ ) { double realU = u [ index ] ; double imagU = u [ index + 1 ] ; // u [ i + startU ] / = u _ 0; u [ index ++ ] = ( realU * realA + imagU * imagA ) / mag2 ; u [ index ++ ] = ( imagU * realA - realU * imag...
public class FileHeader { /** * Updates the gutter . */ public void update ( ) { } }
FileTextArea textArea = fileWindow . textArea ; Font font = textArea . getFont ( ) ; setFont ( font ) ; FontMetrics metrics = getFontMetrics ( font ) ; int h = metrics . getHeight ( ) ; int lineCount = textArea . getLineCount ( ) + 1 ; String dummy = Integer . toString ( lineCount ) ; if ( dummy . length ( ) < 2 ) { du...
public class OAuth { /** * Returns the client _ id to use in OAuth requests . * @ param params the request parameters . * @ param options the request options . * @ return the client _ id . */ private static String getClientId ( Map < String , Object > params , RequestOptions options ) throws AuthenticationExcepti...
String clientId = Stripe . clientId ; if ( ( options != null ) && ( options . getClientId ( ) != null ) ) { clientId = options . getClientId ( ) ; } if ( ( params != null ) && ( params . get ( "client_id" ) != null ) ) { clientId = ( String ) params . get ( "client_id" ) ; } if ( clientId == null ) { throw new Authenti...
public class BeanUtils { /** * private methods - - - - - */ private static BeanInfo getBeanInfo ( Object bean ) { } }
try { return Introspector . getBeanInfo ( bean . getClass ( ) ) ; } catch ( IntrospectionException exception ) { // TODO : handle exception better ? throw new RuntimeException ( "Error introspecting bean: " + bean , exception ) ; }
public class CouchbaseAsyncBucket { /** * Helper method to stop tracing for the parent span given . */ private Action0 stopTracing ( final Span parent ) { } }
return new Action0 ( ) { @ Override public void call ( ) { if ( parent != null ) { environment . tracer ( ) . scopeManager ( ) . activate ( parent , true ) . close ( ) ; } } } ;
public class ProductSearchClient { /** * Gets information associated with a ProductSet . * < p > Possible errors : * < p > & # 42 ; Returns NOT _ FOUND if the ProductSet does not exist . * < p > Sample code : * < pre > < code > * try ( ProductSearchClient productSearchClient = ProductSearchClient . create ( )...
GetProductSetRequest request = GetProductSetRequest . newBuilder ( ) . setName ( name ) . build ( ) ; return getProductSet ( request ) ;
public class DefaultNotificationManager { /** * { @ inheritDoc } */ @ Override public Multimap < String , NotificationChannel > findSubscribedRecipientsForDispatcher ( NotificationDispatcher dispatcher , String projectKey , SubscriberPermissionsOnProject subscriberPermissionsOnProject ) { } }
verifyProjectKey ( projectKey ) ; String dispatcherKey = dispatcher . getKey ( ) ; Set < SubscriberAndChannel > subscriberAndChannels = Arrays . stream ( notificationChannels ) . flatMap ( notificationChannel -> toSubscriberAndChannels ( dispatcherKey , projectKey , notificationChannel ) ) . collect ( Collectors . toSe...
public class SQSObjectMessage { /** * Serialize the < code > Serializable < / code > object to < code > String < / code > . */ protected static String serialize ( Serializable serializable ) throws JMSException { } }
if ( serializable == null ) { return null ; } String serializedString ; ObjectOutputStream objectOutputStream = null ; try { ByteArrayOutputStream bytesOut = new ByteArrayOutputStream ( ) ; objectOutputStream = new ObjectOutputStream ( bytesOut ) ; objectOutputStream . writeObject ( serializable ) ; objectOutputStream ...
public class Allure1Utils { /** * Generate title using name pattern . First step all " { method } " substrings will be replaced * with given method name . Then replace all " { i } " substrings with i - th parameter . */ public static String getTitle ( final String namePattern , final String methodName , final Object ...
final String finalPattern = namePattern . replaceAll ( "\\{method}" , methodName ) . replaceAll ( "\\{this}" , String . valueOf ( instance ) ) ; final int paramsCount = parameters == null ? 0 : parameters . length ; final Object [ ] results = new Object [ paramsCount ] ; for ( int i = 0 ; i < paramsCount ; i ++ ) { res...
public class StringIterate { /** * Transform the int code point elements to a new string using the specified function { @ code function } . * @ deprecated since 7.0 . Use { @ link # collectCodePoint ( String , CodePointFunction ) } instead . */ @ Deprecated public static String collect ( String string , CodePointFunc...
return StringIterate . collectCodePoint ( string , function ) ;
public class MinMax { /** * Combine two { @ code MinMax } objects . * @ param other the other { @ code MinMax } object to combine * @ return { @ code this } * @ throws java . lang . NullPointerException if the { @ code other } object is * { @ code null } . */ public MinMax < C > combine ( final MinMax < C > oth...
_min = min ( _comparator , _min , other . _min ) ; _max = max ( _comparator , _max , other . _max ) ; _count += other . _count ; return this ;
public class MessageBuilder { /** * Retrieved the message mapped with the given key . * Perform the search by iterating over all resource bundles available in reverse order . * @ param messageKey the key of the message to translate * @ return the translated message or null */ private String findMessage ( final St...
String message = null ; try { if ( ! this . resourceBundles . isEmpty ( ) ) { for ( int i = this . resourceBundles . size ( ) - 1 ; i >= 0 && message == null ; i -- ) { if ( this . resourceBundles . get ( i ) . containsKey ( messageKey ) ) { message = this . resourceBundles . get ( i ) . getString ( messageKey ) ; } } ...
public class UniverseApi { /** * Get system jumps Get the number of jumps in solar systems within the last * hour ending at the timestamp of the Last - Modified header , excluding * wormhole space . Only systems with jumps will be listed - - - This route is * cached for up to 3600 seconds * @ param datasource ...
ApiResponse < List < SystemJumpsResponse > > resp = getUniverseSystemJumpsWithHttpInfo ( datasource , ifNoneMatch ) ; return resp . getData ( ) ;
public class DatabaseDAODefaultImpl { public String [ ] get_attribute_alias_list ( Database database , String wildcard ) throws DevFailed { } }
DeviceData argIn = new DeviceData ( ) ; argIn . insert ( wildcard ) ; DeviceData argOut = command_inout ( database , "DbGetAttributeAliasList" , argIn ) ; return argOut . extractStringArray ( ) ;
public class BasicNlsMessage { /** * This method gets the { @ link NlsTemplate } of this message . * @ param resolver is the { @ link NlsTemplateResolver } used to { @ link NlsTemplateResolver # resolveTemplate ( String ) * resolve } the { @ link NlsTemplate } if NOT yet available . * @ return the text the { @ li...
if ( this . template == null ) { synchronized ( this ) { if ( this . template == null ) { NlsTemplateResolver templateResolver ; if ( resolver == null ) { templateResolver = NlsAccess . getTemplateResolver ( ) ; } else { templateResolver = resolver ; } this . template = templateResolver . resolveTemplate ( this . messa...
public class LicenseKeyPair { /** * Get the byte representation of the private key as it is returned by the underlying security library . This is * NOT the byte array that contains the algorithm at the start . This is the key in raw format . * @ return the key as bytes */ public byte [ ] getPrivate ( ) { } }
keyNotNull ( pair . getPrivate ( ) ) ; Key key = pair . getPrivate ( ) ; return getKeyBytes ( key ) ;
public class DssatXFileOutput { /** * DSSAT Experiment Data Output method * @ param arg0 file output path * @ param result data holder object */ @ Override public void writeFile ( String arg0 , Map result ) { } }
// Initial variables HashMap expData = ( HashMap ) result ; ArrayList < HashMap > soilArr = readSWData ( expData , "soil" ) ; ArrayList < HashMap > wthArr = readSWData ( expData , "weather" ) ; HashMap soilData ; HashMap wthData ; BufferedWriter bwX ; // output object StringBuilder sbGenData = new StringBuilder ( ) ; /...
public class CommerceAddressPersistenceImpl { /** * Returns the commerce addresses before and after the current commerce address in the ordered set where groupId = & # 63 ; and classNameId = & # 63 ; and classPK = & # 63 ; . * @ param commerceAddressId the primary key of the current commerce address * @ param group...
CommerceAddress commerceAddress = findByPrimaryKey ( commerceAddressId ) ; Session session = null ; try { session = openSession ( ) ; CommerceAddress [ ] array = new CommerceAddressImpl [ 3 ] ; array [ 0 ] = getByG_C_C_PrevAndNext ( session , commerceAddress , groupId , classNameId , classPK , orderByComparator , true ...
public class JSPUtil { /** * Method used to generate the txt based Job table for Job pages . * @ param jobs vector of jobs to be displayed in table . * @ param colSeparator the char used to separate columns * @ param rowSeparator the char used to separate records * @ return a String contains the table * @ thr...
char colSeparator = '\t' ; char rowSeparator = '\n' ; StringBuffer sb = new StringBuffer ( ) ; sb . append ( "01.JOBID" + colSeparator + "02.START" + colSeparator + "03.FINISH" + colSeparator + "04.USER" + colSeparator + "05.NAME" + colSeparator + "06.BLACK_TT" + colSeparator + "07.PRIORITY" + colSeparator + "08.MAP_TO...
public class SignatureRequest { /** * Utility method that allows you to search for a Signature object on this * request by email and name . It requires both because neither alone is * enough to guarantee uniqueness ( some requests can have multiple signers * using the same email address or name ) . * @ param em...
if ( email == null || name == null ) { return null ; } for ( Signature s : getSignatures ( ) ) { if ( name . equalsIgnoreCase ( s . getName ( ) ) && email . equalsIgnoreCase ( s . getEmail ( ) ) ) { return s ; } } return null ;
public class AbstractStream { @ Override public < R > Stream < R > flattMap ( final Function < ? super T , ? extends Collection < ? extends R > > mapper ) { } }
return flatMap ( new Function < T , Stream < ? extends R > > ( ) { @ Override public Stream < ? extends R > apply ( T t ) { return Stream . of ( mapper . apply ( t ) ) ; } } ) ;
public class CommerceTierPriceEntryUtil { /** * Returns the first commerce tier price entry in the ordered set where companyId = & # 63 ; . * @ param companyId the company ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching commer...
return getPersistence ( ) . fetchByCompanyId_First ( companyId , orderByComparator ) ;
public class SessionAffinityManagerImpl { /** * Method used to get at the SSL Id rather than the displayed Id */ public String getActualSSLSessionId ( ServletRequest request ) { } }
String sessionID = null ; byte [ ] sslBytes = ( ( IExtendedRequest ) request ) . getSSLId ( ) ; if ( sslBytes != null ) { sessionID = SessionIDGeneratorImpl . convertSessionIdBytesToSessionId ( sslBytes , SessionManagerConfig . getSessionIDLength ( ) ) ; } return sessionID ;
public class ArrayLabelSetterFactory { /** * フィールドによるラベル情報を格納する場合 。 * < p > { @ code < フィールド名 > + Label } のメソッド名 < / p > * @ param beanClass フィールドが定義してあるクラスのインスタンス * @ param fieldName フィールド名 * @ return ラベル情報の設定用クラス */ private Optional < ArrayLabelSetter > createField ( final Class < ? > beanClass , fina...
final String labelFieldName = fieldName + "Label" ; final Field labelField ; try { labelField = beanClass . getDeclaredField ( labelFieldName ) ; labelField . setAccessible ( true ) ; } catch ( NoSuchFieldException | SecurityException e ) { return Optional . empty ( ) ; } if ( ! List . class . isAssignableFrom ( labelF...
public class GetFederationTokenRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetFederationTokenRequest getFederationTokenRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getFederationTokenRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getFederationTokenRequest . getInstanceId ( ) , INSTANCEID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to ...
public class StepMacro { /** * capturing group from the macroMatcher */ private String replaceGroupsInMacroStep ( Matcher macroMatcher , String action ) { } }
Matcher groupMatcher = groupPattern . matcher ( action ) ; while ( groupMatcher . find ( ) ) { String match = groupMatcher . group ( ) ; String groupString = match . substring ( 2 , match . length ( ) - 1 ) ; int groupId = Integer . parseInt ( groupString ) ; if ( groupId > macroMatcher . groupCount ( ) ) { throw new C...
public class Ci_HelpTable { /** * Processes general help with no specific command requested . * @ param at table to add help information to */ protected void generalHelp ( AsciiTable at ) { } }
// collect all commands belonging to a particular category String defKey = "__standard" ; Map < String , TreeMap < String , SkbShellCommand > > cat2Cmd = new TreeMap < > ( ) ; for ( CommandInterpreter ci : this . skbShell . getCommandMap ( ) . values ( ) ) { for ( SkbShellCommand ssc : ci . getCommands ( ) . values ( )...
public class ProjectEnvironment { /** * A set of environment variables to make available to builds for this build project . * @ param environmentVariables * A set of environment variables to make available to builds for this build project . */ public void setEnvironmentVariables ( java . util . Collection < Environ...
if ( environmentVariables == null ) { this . environmentVariables = null ; return ; } this . environmentVariables = new java . util . ArrayList < EnvironmentVariable > ( environmentVariables ) ;
public class ObjectValidator { /** * The object must have a datastream to match each dsTypeModel in the * content model . Matching a dsTypeModel means equal IDs and an acceptable * form . */ private void confirmMatchForDsTypeModel ( ValidationResult result , DsTypeModel typeModel , String contentModelPid , ObjectIn...
String id = typeModel . getId ( ) ; DatastreamInfo dsInfo = object . getDatastreamInfo ( id ) ; if ( dsInfo == null ) { // If there is no datastream by that name , nothing to check . result . addNote ( ValidationResultNotation . noMatchingDatastreamId ( contentModelPid , id ) ) ; return ; } Collection < Form > forms = ...
public class AbstractElementVisitor6 { /** * { @ inheritDoc } * @ implSpec Visits a { @ code ModuleElement } by calling { @ code * visitUnknown } . * @ param e { @ inheritDoc } * @ param p { @ inheritDoc } * @ return the result of { @ code visitUnknown } * @ since 9 * @ spec JPMS */ @ Override public R vi...
// Use implementation from interface default method return ElementVisitor . super . visitModule ( e , p ) ;
public class DataEditorApplicationConfig { /** * views */ @ Bean public WidgetViewDescriptor itemView ( ) { } }
return new WidgetViewDescriptor ( "itemView" , new WidgetProvider < Widget > ( ) { @ Override public Widget getWidget ( ) { return itemDataEditor ( ) ; } } ) ;
public class WatirUtils { /** * Sanitize the given filename / path , so that ( 1 ) it is not surrounded with quotation marks " " , ( 2) * all occurences of " \ \ " are changed to a " / " , and ( 3 ) all occurences of " \ " are changed to a * @ param input the input path * @ return a StringBuffer containing the sa...
StringBuffer buf = new StringBuffer ( ) ; // Strip any surrounding quotation marks , that might have came with the file name from // any external source like the Windows environment variable . if ( input . matches ( "^\".+\"$" ) ) { input = input . substring ( 1 , input . length ( ) - 1 ) ; } // Make sure we use " / " ...
public class RunScheduledInstancesResult { /** * The IDs of the newly launched instances . * @ return The IDs of the newly launched instances . */ public java . util . List < String > getInstanceIdSet ( ) { } }
if ( instanceIdSet == null ) { instanceIdSet = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return instanceIdSet ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } * { @ link EnumIncludeRelationships } { @ code > } */ @ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "includeRelationships" , scope = GetObjectParents . class ) public JAXBEleme...
return new JAXBElement < EnumIncludeRelationships > ( _GetObjectOfLatestVersionIncludeRelationships_QNAME , EnumIncludeRelationships . class , GetObjectParents . class , value ) ;
public class DynamicByteBufferHelper { /** * Insert double into . * @ param array the array * @ param index the index * @ param value the value * @ return the byte [ ] */ public static byte [ ] insertDoubleInto ( byte [ ] array , int index , double value ) { } }
byte [ ] holder = new byte [ 4 ] ; doubleTo ( holder , 0 , value ) ; return insert ( array , index , holder ) ;
public class FedoraResourceImpl { /** * Check the SPARQLUpdate statements for the invalid interaction model changes . * @ param request the UpdateRequest * @ throws InteractionModelViolationException when attempting to change the interaction model */ private void checkInteractionModel ( final UpdateRequest request ...
final List < Quad > deleteQuads = new ArrayList < > ( ) ; final List < Quad > updateQuads = new ArrayList < > ( ) ; for ( final Update operation : request . getOperations ( ) ) { if ( operation instanceof UpdateModify ) { final UpdateModify op = ( UpdateModify ) operation ; deleteQuads . addAll ( op . getDeleteQuads ( ...
public class DescribeClientVpnEndpointsResult { /** * Information about the Client VPN endpoints . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setClientVpnEndpoints ( java . util . Collection ) } or { @ link # withClientVpnEndpoints ( java . util . Collec...
if ( this . clientVpnEndpoints == null ) { setClientVpnEndpoints ( new com . amazonaws . internal . SdkInternalList < ClientVpnEndpoint > ( clientVpnEndpoints . length ) ) ; } for ( ClientVpnEndpoint ele : clientVpnEndpoints ) { this . clientVpnEndpoints . add ( ele ) ; } return this ;
public class ClassFileWriter { /** * Generate code to load the given integer on stack . * @ param k the constant */ public void addPush ( int k ) { } }
if ( ( byte ) k == k ) { if ( k == - 1 ) { add ( ByteCode . ICONST_M1 ) ; } else if ( 0 <= k && k <= 5 ) { add ( ( byte ) ( ByteCode . ICONST_0 + k ) ) ; } else { add ( ByteCode . BIPUSH , ( byte ) k ) ; } } else if ( ( short ) k == k ) { add ( ByteCode . SIPUSH , ( short ) k ) ; } else { addLoadConstant ( k ) ; }
public class AWSSupportClient { /** * Returns communications ( and attachments ) for one or more support cases . You can use the < code > afterTime < / code > * and < code > beforeTime < / code > parameters to filter by date . You can use the < code > caseId < / code > parameter to * restrict the results to a parti...
request = beforeClientExecution ( request ) ; return executeDescribeCommunications ( request ) ;