signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class LegacySpy { /** * Alias for { @ link # expectBetween ( int , int , Threads , Query ) } with arguments { @ code allowedStatements } , { @ code allowedStatements } , { @ link Threads # CURRENT } , { @ code queryType }
* @ since 2.2 */
@ Deprecated public C expect ( int allowedStatements , Query query ) { }... | return expect ( SqlQueries . exactQueries ( allowedStatements ) . type ( adapter ( query ) ) ) ; |
public class SourceRenderFilter { /** * Extracts request parameters , and sets the corresponding request
* attributes if specified .
* @ param pRequest
* @ param pResponse
* @ param pChain
* @ throws IOException
* @ throws ServletException */
protected void doFilterImpl ( ServletRequest pRequest , ServletRe... | // TODO : Max size configuration , to avoid DOS attacks ? OutOfMemory
// Size parameters
int width = ServletUtil . getIntParameter ( pRequest , sizeWidthParam , - 1 ) ; int height = ServletUtil . getIntParameter ( pRequest , sizeHeightParam , - 1 ) ; if ( width > 0 || height > 0 ) { pRequest . setAttribute ( ImageServl... |
public class RadialSelectorView { /** * Initialize this selector with the state of the picker .
* @ param context Current context .
* @ param is24HourMode Whether the selector is in 24 - hour mode , which will tell us
* whether the circle ' s center is moved up slightly to make room for the AM / PM circles .
* ... | if ( mIsInitialized ) { Log . e ( TAG , "This RadialSelectorView may only be initialized once." ) ; return ; } Resources res = context . getResources ( ) ; mPaint . setAntiAlias ( true ) ; // Calculate values for the circle radius size .
mIs24HourMode = is24HourMode ; if ( is24HourMode ) { mCircleRadiusMultiplier = Flo... |
public class A_CmsVfsDocument { /** * Generates a new lucene document instance from contents of the given resource for the provided index . < p >
* @ see org . opencms . search . documents . I _ CmsDocumentFactory # createDocument ( CmsObject , CmsResource , I _ CmsSearchIndex ) */
public I_CmsSearchDocument createDo... | // extract the content from the resource
I_CmsExtractionResult content = null ; if ( index . isExtractingContent ( ) ) { // do full text content extraction only if required
// check if caching is enabled for this document type
CmsExtractionResultCache cache = getCache ( ) ; String cacheName = null ; if ( ( cache != nul... |
public class DriverFactory { /** * Build a feed using reflection
* @ param feedDesc
* @ return */
public static Feed buildFeed ( FeedDesc feedDesc ) { } } | Feed feed = null ; NitFactory nitFactory = new NitFactory ( ) ; NitDesc nitDesc = nitDescFromDynamic ( feedDesc ) ; nitDesc . setConstructorParameters ( new Class [ ] { Map . class } ) ; nitDesc . setConstructorArguments ( new Object [ ] { feedDesc . getProperties ( ) } ) ; try { feed = nitFactory . construct ( nitDesc... |
public class LiteralConditionImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setTrue ( boolean newTrue ) { } } | boolean oldTrue = true_ ; true_ = newTrue ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , XtextPackage . LITERAL_CONDITION__TRUE , oldTrue , true_ ) ) ; |
public class TermFrequencyCandidateAnswerScore { /** * 统计文本中出现的候选答案及其词频
* @ return */
private Map < String , Integer > getWordFrequency ( String title , String snippet ) { } } | List < String > titleNames = new ArrayList < > ( ) ; List < String > snippetNames = new ArrayList < > ( ) ; // 处理title
List < Word > words = WordParser . parse ( title ) ; for ( Word word : words ) { if ( word . getPartOfSpeech ( ) . getPos ( ) . startsWith ( question . getQuestionType ( ) . getPos ( ) ) ) { titleNames... |
public class SetOperation { /** * Wrap takes the SetOperation image in Memory and refers to it directly .
* There is no data copying onto the java heap .
* Only " Direct " SetOperations that have been explicitly stored as direct can be wrapped .
* @ param srcMem an image of a SetOperation where the hash of the gi... | final byte famID = srcMem . getByte ( FAMILY_BYTE ) ; final Family family = idToFamily ( famID ) ; final int serVer = srcMem . getByte ( SER_VER_BYTE ) ; if ( serVer != 3 ) { throw new SketchesArgumentException ( "SerVer must be 3: " + serVer ) ; } switch ( family ) { case UNION : { return UnionImpl . wrapInstance ( sr... |
public class RegistryService { /** * Re - creates an entry in the group .
* @ param sessionProvider the session provider
* @ throws RepositoryException */
@ Override public void recreateEntry ( final SessionProvider sessionProvider , final String groupPath , final RegistryEntry entry ) throws RepositoryException { ... | final String entryRelPath = EXO_REGISTRY + "/" + groupPath + "/" + entry . getName ( ) ; final String parentFullPath = "/" + EXO_REGISTRY + "/" + groupPath ; try { Session session = session ( sessionProvider , repositoryService . getCurrentRepository ( ) ) ; // Don ' t care about concurrency , Session should be dedicat... |
public class SDBaseOps { /** * Element - wise scalar floor modulus operation : out = floorMod ( in , value ) .
* i . e . , returns the remainder after division by ' value '
* @ param in Input variable
* @ param value Scalar value to compare
* @ return Output variable */
public SDVariable scalarFloorMod ( SDVari... | return scalarFloorMod ( null , in , value ) ; |
public class Head { /** * The parent can only take one string . If we need to , concatenate the
* strings . The argument tag should never be empty , but tail could be .
* @ param tag tag string
* @ param tail tail string
* @ return the constructed string */
private static String buildParentString ( final String... | if ( tail . isEmpty ( ) ) { return tag ; } else { return tag + " " + tail ; } |
public class SubscriptionAdminClient { /** * Removes an existing snapshot . Snapshots are used in & lt ; a
* href = " https : / / cloud . google . com / pubsub / docs / replay - overview " & gt ; Seek & lt ; / a & gt ; operations , which
* allow you to manage message acknowledgments in bulk . That is , you can set ... | DeleteSnapshotRequest request = DeleteSnapshotRequest . newBuilder ( ) . setSnapshot ( snapshot == null ? null : snapshot . toString ( ) ) . build ( ) ; deleteSnapshot ( request ) ; |
public class GoogleHadoopFSInputStream { /** * Sets the current position within the file being read .
* @ param pos The position to seek to .
* @ throws IOException if an IO error occurs or if the target position is invalid . */
@ Override public synchronized void seek ( long pos ) throws IOException { } } | long startTime = System . nanoTime ( ) ; logger . atFine ( ) . log ( "seek: %d" , pos ) ; try { channel . position ( pos ) ; } catch ( IllegalArgumentException e ) { throw new IOException ( e ) ; } long duration = System . nanoTime ( ) - startTime ; ghfs . increment ( GoogleHadoopFileSystemBase . Counter . SEEK ) ; ghf... |
public class ReidSolomonCodes { /** * Computes the syndromes for the message ( input + ecc ) . If there ' s no error then the output will be zero .
* @ param input Data portion of the message
* @ param ecc ECC portion of the message
* @ param syndromes ( Output ) results of the syndromes computations */
void comp... | syndromes . resize ( syndromeLength ( ) ) ; for ( int i = 0 ; i < syndromes . size ; i ++ ) { int val = math . power ( 2 , i ) ; syndromes . data [ i ] = ( byte ) math . polyEval ( input , val ) ; syndromes . data [ i ] = ( byte ) math . polyEvalContinue ( syndromes . data [ i ] & 0xFF , ecc , val ) ; } |
public class Application { /** * Get this standard resource .
* This is a utility method for loading and caching resources .
* The returned Resources object can be called just like a resource object with some
* extra functions .
* @ param strResourceName The class name of the resource file to load .
* @ param... | ResourceBundle resources = null ; try { Locale currentLocale = this . getLocale ( ) ; // Locale . getDefault ( ) ;
strResourceName = this . getResourcePath ( strResourceName ) ; if ( m_resources != null ) if ( strResourceName . equals ( m_resources . getClass ( ) . getName ( ) ) ) return m_resources ; resources = Class... |
public class CatalogDiffEngine { /** * Return an error message asserting that we cannot create a view
* with a given name .
* @ param viewName The name of the view we are refusing to create .
* @ param singleTableName The name of the source table if there is
* one source table . If there are multiple
* tables... | boolean singleTable = ( singleTableName != null ) ; return String . format ( "Unable to create %sview %s %sbecause the view definition uses operations that cannot always be applied if %s." , ( singleTable ? "single table " : "multi-table " ) , viewName , ( singleTable ? String . format ( "on table %s " , singleTableNam... |
public class ReentrantTransactionDispatcher { /** * Wait for exclusive permit during a timeout in milliseconds .
* @ return number of acquired permits if > 0 */
private int tryAcquireExclusiveTransaction ( @ NotNull final Thread thread , final int timeout ) { } } | long nanos = TimeUnit . MILLISECONDS . toNanos ( timeout ) ; try ( CriticalSection ignored = criticalSection . enter ( ) ) { if ( getThreadPermits ( thread ) > 0 ) { throw new ExodusException ( "Exclusive transaction can't be nested" ) ; } final Condition condition = criticalSection . newCondition ( ) ; final long curr... |
public class Messages { /** * < p > getResourceBundle . < / p >
* @ param bundleName a { @ link java . lang . String } object .
* @ param locale a { @ link java . util . Locale } object .
* @ return a { @ link java . util . ResourceBundle } object . */
public static ResourceBundle getResourceBundle ( String bundl... | ResourceBundle bundle = null ; boolean isDev = false ; if ( Ameba . getApp ( ) != null ) { isDev = Ameba . getApp ( ) . getMode ( ) . isDev ( ) ; BUNDLE_CONTROL . noCache = isDev ; } if ( ! isDev ) { bundle = RESOURCE_BUNDLES . get ( bundleName , locale ) ; } if ( bundle == null ) { try { bundle = ResourceBundle . getB... |
public class AggregateDirContextProcessor { /** * @ see org . springframework . ldap . core . DirContextProcessor # postProcess ( javax . naming . directory . DirContext ) */
public void postProcess ( DirContext ctx ) throws NamingException { } } | for ( DirContextProcessor processor : dirContextProcessors ) { processor . postProcess ( ctx ) ; } |
public class ClassLister { /** * loads the props file and interpretes it . */
public void initialize ( ) { } } | Enumeration enm ; String superclass ; String [ ] packages ; try { m_CacheNames = new HashMap < > ( ) ; m_ListNames = new HashMap < > ( ) ; m_CacheClasses = new HashMap < > ( ) ; m_ListClasses = new HashMap < > ( ) ; enm = m_Packages . propertyNames ( ) ; while ( enm . hasMoreElements ( ) ) { superclass = ( String ) enm... |
public class HystrixCollapserMetrics { /** * Get or create the { @ link HystrixCollapserMetrics } instance for a given { @ link HystrixCollapserKey } .
* This is thread - safe and ensures only 1 { @ link HystrixCollapserMetrics } per { @ link HystrixCollapserKey } .
* @ param key
* { @ link HystrixCollapserKey } ... | // attempt to retrieve from cache first
HystrixCollapserMetrics collapserMetrics = metrics . get ( key . name ( ) ) ; if ( collapserMetrics != null ) { return collapserMetrics ; } // it doesn ' t exist so we need to create it
collapserMetrics = new HystrixCollapserMetrics ( key , properties ) ; // attempt to store it (... |
public class GroupApi { /** * Create a new group variable .
* < pre > < code > GitLab Endpoint : POST / groups / : id / variables < / code > < / pre >
* @ param groupIdOrPath the group ID , path of the group , or a Group instance holding the group ID or path , required
* @ param key the key of a variable ; must h... | GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "key" , key , true ) . withParam ( "value" , value , true ) . withParam ( "protected" , isProtected ) ; Response response = post ( Response . Status . CREATED , formData , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "variables" ) ; return ( response . rea... |
public class MetadataDocumentPropertyWriter { /** * Write either a { @ code < Property > } or { @ code < NavigationProperty > } element
* for the given { @ code StructuralProperty } .
* @ param property The given structural property . It can not be { @ code null } .
* @ throws javax . xml . stream . XMLStreamExce... | LOG . debug ( "Writing property {} of type {}" , property . getName ( ) , property . getTypeName ( ) ) ; if ( property instanceof NavigationProperty ) { NavigationProperty navProperty = ( NavigationProperty ) property ; xmlWriter . writeStartElement ( NAVIGATION_PROPERTY ) ; writeCommonPropertyAttributes ( property ) ;... |
public class FieldBuilder { /** * Build the comments for the field . Do nothing if
* { @ link Configuration # nocomment } is set to true .
* @ param node the XML element that specifies which components to document
* @ param fieldDocTree the content tree to which the documentation will be added */
public void buil... | if ( ! configuration . nocomment ) { writer . addComments ( currentElement , fieldDocTree ) ; } |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link ObligationExpressionsType } { @ code > } } */
@ XmlElementDecl ( namespace = "urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" , name = "ObligationExpressions" ) public JAXBElement < ObligationExpressionsType > createOb... | return new JAXBElement < ObligationExpressionsType > ( _ObligationExpressions_QNAME , ObligationExpressionsType . class , null , value ) ; |
public class Util { /** * Determines the client ' s preferred locales from the request , and compares
* each of the locales ( in order of preference ) against the available
* locales in order to determine the best matching locale .
* @ param pageContext the page in which the resource bundle with the given
* bas... | LocalizationContext locCtxt = null ; // Determine locale from client ' s browser settings .
for ( Enumeration enum_ = Util . getRequestLocales ( ( HttpServletRequest ) pageContext . getRequest ( ) ) ; enum_ . hasMoreElements ( ) ; ) { Locale pref = ( Locale ) enum_ . nextElement ( ) ; ResourceBundle match = findMatch (... |
public class SelectionVisibility { /** * Determine if an object is selected .
* @ param object the object
* @ return object is selected */
static boolean isSelected ( IChemObject object , RendererModel model ) { } } | if ( object . getProperty ( StandardGenerator . HIGHLIGHT_COLOR ) != null ) return true ; if ( model . getSelection ( ) != null ) return model . getSelection ( ) . contains ( object ) ; return false ; |
public class ClassInfoScreen { /** * Process the command .
* < br / > Step 1 - Process the command if possible and return true if processed .
* < br / > Step 2 - If I can ' t process , pass to all children ( with me as the source ) .
* < br / > Step 3 - If children didn ' t process , pass to parent ( with me as t... | boolean bFlag = false ; if ( ( strCommand . indexOf ( "FileHdrScreen" ) != - 1 ) || ( strCommand . indexOf ( "LayoutScreen" ) != - 1 ) ) iCommandOptions = ScreenConstants . USE_NEW_WINDOW | ScreenConstants . DONT_PUSH_TO_BROWSER ; if ( ( strCommand . indexOf ( "ExportRecordsToXml" ) != - 1 ) || ( strCommand . indexOf (... |
public class JdbcCpoAdapter { /** * Update the Object in the datasource . The CpoAdapter will check to see if the object exists in the datasource . If it
* exists then the object will be updated . If it does not exist , an exception will be thrown
* < pre > Example :
* < code >
* class SomeObject so = new SomeO... | return processUpdateGroup ( obj , JdbcCpoAdapter . UPDATE_GROUP , null , null , null , null ) ; |
public class OnStableNodeFirst { /** * For each node , we fill ins to indicate the VMs
* that go on this node . We also fulfill stays and move
* TODO : stays and move seems redundant ! */
private void makeIncoming ( ) { } } | if ( stays == null && move == null ) { for ( BitSet in : ins ) { in . clear ( ) ; } stays = new BitSet ( ) ; move = new BitSet ( ) ; for ( int i = 0 ; i < hosts . length ; i ++ ) { if ( hosts [ i ] != null && hosts [ i ] . isInstantiated ( ) ) { int newPos = hosts [ i ] . getValue ( ) ; if ( oldPos [ i ] != - 1 && newP... |
public class JvmCompoundTypeReferenceImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public boolean eIsSet ( int featureID ) { } } | switch ( featureID ) { case TypesPackage . JVM_COMPOUND_TYPE_REFERENCE__TYPE : return type != null ; case TypesPackage . JVM_COMPOUND_TYPE_REFERENCE__REFERENCES : return references != null && ! references . isEmpty ( ) ; } return super . eIsSet ( featureID ) ; |
public class NodeTypeDataManagerImpl { /** * { @ inheritDoc } */
public PlainChangesLog setPrimaryType ( final NodeData nodeData , final InternalQName nodeTypeName ) throws RepositoryException { } } | final PlainChangesLog changesLog = new PlainChangesLogImpl ( ) ; final NodeTypeData ancestorDefinition = getNodeType ( nodeData . getPrimaryTypeName ( ) ) ; final NodeTypeData recipientDefinition = getNodeType ( nodeTypeName ) ; InternalQName [ ] ancestorAllNodeTypeNames = null ; if ( nodeData . getMixinTypeNames ( ) =... |
public class JFinal { /** * jfinal 3.5 更新 ( 2018-09-01 ) :
* 由于 jfinal 3.5 解决了 IDEA 下 JFinal . start ( 四个参数 ) 无法启动的问题 ,
* 此方法已被废弃 , 建议使用 JFinal . start ( 四个参数 ) 带四个参数的 start ( )
* 方法来启动项目 , IDEA 下也支持热加载 , 注意要先配置自动编译 , jfinal 是
* 通过监测被编译的 class 文件的修改来触发热加载的
* 用于在 IDEA 中 , 通过创建 main 方法的方式启动项目 , 不支持热加载
* 本方法存在... | // server = new JettyServerForIDEA ( webAppDir , port , context ) ;
// server . start ( ) ;
start ( webAppDir , port , context , 0 ) ; |
public class Matrix1NornRescaler { /** * Scaling factors for symmetric ( not singular ) matrices .
* Just the subdiagonal elements of the matrix are required .
* @ see Daniel Ruiz , " A scaling algorithm to equilibrate both rows and columns norms in matrices "
* @ see Philip A . Knight , Daniel Ruiz , Bora Ucar "... | DoubleFactory1D F1 = DoubleFactory1D . dense ; DoubleFactory2D F2 = DoubleFactory2D . sparse ; int dim = A . columns ( ) ; DoubleMatrix1D D1 = F1 . make ( dim , 1 ) ; DoubleMatrix2D AK = A . copy ( ) ; DoubleMatrix2D DR = F2 . identity ( dim ) ; DoubleMatrix1D DRInv = F1 . make ( dim ) ; int maxIteration = 50 ; for ( i... |
public class Sort { /** * Check if the byte array is reverse sorted . It loops through the entire byte
* array once , checking that the elements are reverse sorted .
* < br >
* < br >
* < i > Runtime : < / i > O ( n )
* @ param byteArray the byte array to check
* @ return < i > true < / i > if the byte arra... | for ( int i = 0 ; i < byteArray . length - 1 ; i ++ ) { if ( byteArray [ i ] < byteArray [ i + 1 ] ) { return false ; } } return true ; |
public class PGPMessageSigner { /** * @ see MessageSigner # signMessage ( InputStream , String , String , InputStream , OutputStream )
* @ param privateKeyOfSender
* the private key of the sender
* @ param userIdForPrivateKey
* the user id of the sender
* @ param passwordOfPrivateKey
* the password for the ... | LOGGER . trace ( "signMessage(InputStream, String, String, InputStream, OutputStream)" ) ; LOGGER . trace ( "Private Key: {}, User ID: {}, Password: {}, Data: {}, Signature: {}" , privateKeyOfSender == null ? "not set" : "set" , userIdForPrivateKey , passwordOfPrivateKey == null ? "not set" : "********" , message == nu... |
public class Filter { /** * Adds an attribute to the dashboard filter .
* @ param attribute The attribute to add to the dashboard filter */
public void addAttribute ( String attribute ) { } } | if ( this . attributes == null ) this . attributes = new ArrayList < String > ( ) ; this . attributes . add ( attribute ) ; |
public class ADTLearner { /** * Verify the proposed ADT replacement by checking the actual behavior of the system under learning . During the
* verification process , the system under learning may behave differently from what the ADT replacement suggests :
* This means a counterexample is witnessed and it is added ... | final Map < ADTState < I , O > , Pair < Word < I > , Word < O > > > traces = new LinkedHashMap < > ( ) ; ADTUtil . collectLeaves ( replacement ) . forEach ( x -> traces . put ( x . getHypothesisState ( ) , ADTUtil . buildTraceForNode ( x ) ) ) ; final Pair < Word < I > , Word < O > > parentTrace = ADTUtil . buildTraceF... |
public class MessageControllerManager { /** * without jdk8 , @ Repeatable doesn ' t work , so we use @ JsTopicControls annotation and parse it
* @ param topic
* @ param controllers
* @ return */
JsTopicMessageController getJsTopicMessageControllerFromIterable ( String topic , Iterable < JsTopicMessageController <... | if ( null == controllers || null == topic ) { return null ; } for ( JsTopicMessageController < ? > jsTopicMessageController : controllers ) { JsTopicControls jsTopicControls = jsTopicControlsTools . getJsTopicControlsFromProxyClass ( jsTopicMessageController . getClass ( ) ) ; if ( null != jsTopicControls ) { JsTopicCo... |
public class ServerFilter { /** * Method allow to restrict status of target servers
* @ param statuses is a list target server statuses
* @ return { @ link GroupFilter } */
public ServerFilter status ( String ... statuses ) { } } | allItemsNotNull ( statuses , "Statuses" ) ; predicate = predicate . and ( combine ( ServerMetadata :: getStatus , in ( statuses ) ) ) ; return this ; |
public class QrCodeActivity { /** * This function is invoked in its own thread and can take as long as you want . */
@ Override protected void processImage ( ImageBase image ) { } } | // Detect the QR Code
// GrayU8 image was specified in onCreate ( )
long time0 = System . nanoTime ( ) ; detector . process ( ( GrayU8 ) image ) ; long time1 = System . nanoTime ( ) ; timeDetection . update ( ( time1 - time0 ) * 1e-6 ) ; // Create a copy of what we will visualize here . In general you want a copy becau... |
public class SSOCookieHelperImpl { /** * Returns the SSO domain based . Expected return values are derived from the domain name
* of the host name in the request which may be matched with the WebAppConfig domain name
* list . If there is no match with the ssoDomainList and useURLDomain = true , returns the
* host... | try { final String host = getHostNameFromRequestURL ( req ) ; String ipAddr = AccessController . doPrivileged ( new PrivilegedAction < String > ( ) { @ Override public String run ( ) { return getHostIPAddr ( host ) ; } } ) ; if ( host . equals ( ipAddr ) || host . indexOf ( "." ) == - 1 ) { if ( TraceComponent . isAnyT... |
public class QueryImpl { /** * ( non - Javadoc )
* @ see javax . persistence . Query # getSingleResult ( ) */
@ Override public Object getSingleResult ( ) { } } | // to fetch a single result form database .
isSingleResult = true ; List results = getResultList ( ) ; isSingleResult = false ; return onReturnResults ( results ) ; |
public class NameSpaceAddressManager { /** * The purpose of this method is to update in memory references to primary
* and standby . Please override this method and do the zookeeper specific
* logic in the method and call this method on successful zookeeper write . */
public void setPrimary ( InstanceId ofPrimary )... | if ( ofPrimary == null ) { // failover in progress
primaryNode = null ; standbyNode = null ; return ; } switch ( ofPrimary ) { case NODEZERO : primaryNode = getNodeZero ( ) ; standbyNode = getNodeOne ( ) ; case NODEONE : primaryNode = getNodeOne ( ) ; standbyNode = getNodeZero ( ) ; } |
public class SlideShowView { /** * Once the previous slide has disappeared , we remove its view from our hierarchy and add it to
* the views that can be re - used .
* @ param position The position of the slide to recycle
* @ param view The view to recycle */
private void recyclePreviousSlideView ( int position , ... | // Remove view from our hierarchy
removeView ( view ) ; // Add to recycled views
int viewType = adapter . getItemViewType ( position ) ; recycledViews . put ( viewType , view ) ; view . destroyDrawingCache ( ) ; if ( view instanceof ImageView ) { ( ( ImageView ) view ) . setImageDrawable ( null ) ; } Log . d ( "SlideSh... |
public class DetectCircleRegularGrid { /** * Puts the grid into a canonical orientation */
@ Override protected void putGridIntoCanonical ( Grid g ) { } } | // first put it into a plausible solution
if ( g . columns != numCols ) { rotateGridCCW ( g ) ; } if ( isClockWise ( g ) ) { flipHorizontal ( g ) ; } // pick the solutin which puts ( 0,0 ) coordinate the closest to the top left corner to resolve ambiguity
if ( g . columns == g . rows ) { closestCorner [ 0 ] = g . get (... |
public class JavaTypeUtil { /** * 判断指定数组是否是java八大基本类型 ( int [ ] 、 short [ ] 等 , 不包含对应的封装类型 )
* @ param name 指定数组名称
* @ return 如果是基本类型则返回 < code > true < / code > */
public static boolean isGeneralArrayType ( String name ) { } } | return "byte[]" . equals ( name ) || "short[]" . equals ( name ) || "int[]" . equals ( name ) || "long[]" . equals ( name ) || "double[]" . equals ( name ) || "float[]" . equals ( name ) || "boolean[]" . equals ( name ) || "char[]" . equals ( name ) ; |
public class CSSExpression { /** * Shortcut method to add a simple text value .
* @ param sValue
* The value to be added . May neither be < code > null < / code > nor empty .
* @ return this */
@ Nonnull public CSSExpression addTermSimple ( @ Nonnull @ Nonempty final String sValue ) { } } | return addMember ( new CSSExpressionMemberTermSimple ( sValue ) ) ; |
public class EJSWrapper { /** * p116276 - add code to push / pop java namespace onto ThreadContext . */
@ Override public Handle getHandle ( ) throws RemoteException { } } | ComponentMetaDataAccessorImpl cmdAccessor = null ; // p125735
try { cmdAccessor = ComponentMetaDataAccessorImpl . getComponentMetaDataAccessor ( ) ; // p125735
cmdAccessor . beginContext ( bmd ) ; // p125735
return beanId . getHome ( ) . createHandle ( beanId ) ; } finally { if ( cmdAccessor != null ) cmdAccessor . end... |
public class YamlDataSet { /** * Applies the case - insensitive strategy ( orthography ) to the given < code > name < / code > , if
* { @ link # isCaseSensitiveTableNames ( ) } is < code > false < / code > .
* @ param name The identifier name
* @ return The adjusted identifier name
* @ see Orthography */
String... | return ( name != null ) ? isCaseSensitiveTableNames ( ) ? name : isCaseInsensitiveStrategyLowerCase ( ) ? name . toLowerCase ( Locale . ENGLISH ) : name . toUpperCase ( Locale . ENGLISH ) : null ; |
public class FormatterResolver { /** * パターンを指定して新たに書式を作成する 。
* @ param formatPattern 書式パターン 。
* @ return パースしたフォーマッタ 。 */
public CellFormatter createFormatter ( final String formatPattern ) { } } | final CellFormatter formatter = customFormatterFactory . create ( formatPattern ) ; return formatter ; |
public class UserPreferences { /** * Gets the int .
* @ param key the key
* @ param def the def
* @ return the int
* @ see java . util . prefs . Preferences # getInt ( java . lang . String , int ) */
public static int getInt ( final String key , final int def ) { } } | try { return systemRoot . getInt ( fixKey ( key ) , def ) ; } catch ( final Exception e ) { // just eat the exception to avoid any system crash on system issues
return def ; } |
public class MapUtil { /** * 创建Map包装类MapWrapper < br >
* { @ link MapWrapper } 对Map做一次包装
* @ param map 被代理的Map
* @ return { @ link MapWrapper }
* @ since 4.5.4 */
public static < K , V > MapWrapper < K , V > wrap ( Map < K , V > map ) { } } | return new MapWrapper < K , V > ( map ) ; |
public class S2SBaseFormGenerator { /** * This method will get the childAnswer for sub question */
protected String getAnswers ( Integer questionSeqId , List < ? extends AnswerHeaderContract > answerHeaders ) { } } | String answer = null ; String childAnswer = null ; StringBuilder stringBuilder = new StringBuilder ( ) ; if ( answerHeaders != null && ! answerHeaders . isEmpty ( ) ) { for ( AnswerHeaderContract answerHeader : answerHeaders ) { List < ? extends AnswerContract > answerDetails = answerHeader . getAnswers ( ) ; for ( Ans... |
public class WicketImage { /** * { @ inheritDoc } */
@ Override protected void onComponentTag ( final ComponentTag tag ) { } } | checkComponentTag ( tag , "img" ) ; super . onComponentTag ( tag ) ; final String modelObjectAsString = getDefaultModelObjectAsString ( ) ; final String contextPath = ApplicationExtensions . getContextPath ( ( WebApplication ) getApplication ( ) ) ; final String imagePath = contextPath + modelObjectAsString ; tag . put... |
public class ManagedInstanceVulnerabilityAssessmentsInner { /** * Gets the managed instance ' s vulnerability assessment policies .
* @ param nextPageLink The NextLink from the previous successful call to List operation .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the ... | return listByInstanceNextSinglePageAsync ( nextPageLink ) . concatMap ( new Func1 < ServiceResponse < Page < ManagedInstanceVulnerabilityAssessmentInner > > , Observable < ServiceResponse < Page < ManagedInstanceVulnerabilityAssessmentInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < ManagedIn... |
public class VariantMerger { /** * Calls { @ link # merge ( Variant , Collection ) }
* @ param current { @ link Variant } to update .
* @ param load { @ link Variant } to be merged .
* @ return Merged Variant object . */
public Variant merge ( Variant current , Variant load ) { } } | return merge ( current , Collections . singleton ( load ) ) ; |
public class ge_scalarmult_base { /** * CONVERT # include " crypto _ uint32 . h " */
static int equal ( byte b , byte c ) { } } | int ub = b ; int uc = c ; int x = ub ^ uc ; /* 0 : yes ; 1 . . 255 : no */
int y = x ; /* 0 : yes ; 1 . . 255 : no */
y -= 1 ; /* 4294967295 : yes ; 0 . . 254 : no */
y >>>= 31 ; /* 1 : yes ; 0 : no */
return y ; |
public class ExtensionFeedItem { /** * Gets the campaignTargeting value for this ExtensionFeedItem .
* @ return campaignTargeting * Campaign targeting specifying what campaign this extension
* can serve with .
* On update , if the field is left unspecified , the previous
* campaign targeting state
* will not ... | return campaignTargeting ; |
public class RaftNodeImpl { /** * Updates Raft group members .
* @ see RaftState # updateGroupMembers ( long , Collection ) */
public void updateGroupMembers ( long logIndex , Collection < Endpoint > members ) { } } | state . updateGroupMembers ( logIndex , members ) ; printMemberState ( ) ; |
public class Unchecked { /** * Wrap a { @ link CheckedDoubleFunction } in a { @ link DoubleFunction } .
* Example :
* < code > < pre >
* DoubleStream . of ( 1.0 , 2.0 , 3.0 ) . mapToObj ( Unchecked . doubleFunction ( d - > {
* if ( d & lt ; 0.0)
* throw new Exception ( " Only positive numbers allowed " ) ;
... | return doubleFunction ( function , THROWABLE_TO_RUNTIME_EXCEPTION ) ; |
public class ValueAnimator { /** * Constructs and returns a ValueAnimator that animates between int values . A single
* value implies that that value is the one being animated to . However , this is not typically
* useful in a ValueAnimator object because there is no way for the object to determine the
* starting... | ValueAnimator anim = new ValueAnimator ( ) ; anim . setIntValues ( values ) ; return anim ; |
public class JavaScriptEscape { /** * Perform a JavaScript < strong > unescape < / strong > operation on a < tt > String < / tt > input ,
* writing results to a < tt > Writer < / tt > .
* No additional configuration arguments are required . Unescape operations
* will always perform < em > complete < / em > JavaSc... | if ( writer == null ) { throw new IllegalArgumentException ( "Argument 'writer' cannot be null" ) ; } if ( text == null ) { return ; } if ( text . indexOf ( '\\' ) < 0 ) { // Fail fast , avoid more complex ( and less JIT - table ) method to execute if not needed
writer . write ( text ) ; return ; } JavaScriptEscapeUtil... |
public class DeleteDeploymentConfigRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DeleteDeploymentConfigRequest deleteDeploymentConfigRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( deleteDeploymentConfigRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteDeploymentConfigRequest . getDeploymentConfigName ( ) , DEPLOYMENTCONFIGNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Un... |
public class AsianPersonRecognition { /** * 人名识别
* @ param term
* @ param offe
* @ param freq */
private Term nameFind ( int offe , int beginFreq , int size ) { } } | StringBuilder sb = new StringBuilder ( ) ; int undefinite = 0 ; skip = false ; PersonNatureAttr pna = null ; int index = 0 ; int freq = 0 ; double allFreq = 0 ; Term term = null ; int i = offe ; for ( ; i < terms . length ; i ++ ) { // 走到结尾处识别出来一个名字 .
if ( terms [ i ] == null ) { continue ; } term = terms [ i ] ; pna =... |
public class BulkEmailDestination { /** * A list of tags , in the form of name / value pairs , to apply to an email that you send using
* < code > SendBulkTemplatedEmail < / code > . Tags correspond to characteristics of the email that you define , so that you
* can publish email sending events .
* @ param replac... | if ( replacementTags == null ) { this . replacementTags = null ; return ; } this . replacementTags = new com . amazonaws . internal . SdkInternalList < MessageTag > ( replacementTags ) ; |
public class HBaseSchemaManager { /** * create method creates schema and table for the list of tableInfos .
* @ param tableInfos
* list of TableInfos . */
protected void create ( List < TableInfo > tableInfos ) { } } | try { if ( admin . isTableAvailable ( databaseName ) ) { addColumnFamilies ( tableInfos , admin . getTableDescriptor ( databaseName . getBytes ( ) ) , false ) ; } else { createTable ( tableInfos ) ; } if ( admin . isTableDisabled ( databaseName ) ) { admin . enableTable ( databaseName ) ; } } catch ( TableNotFoundExcep... |
public class UnicodeSetStringSpan { /** * Algorithm for spanNot ( ) = = span ( SpanCondition . NOT _ CONTAINED )
* Theoretical algorithm :
* - Iterate through the string , and at each code point boundary :
* + If the code point there is in the set , then return with the current position .
* + If a set string ma... | int length = s . length ( ) ; int pos = start , rest = length - start ; int stringsLength = strings . size ( ) ; int count = 0 ; do { // Span until we find a code point from the set ,
// or a code point that starts or ends some string .
int spanLimit ; if ( outCount == null ) { spanLimit = spanNotSet . span ( s , pos ,... |
public class StringHelper { /** * Get a string that is filled at the beginning with the passed character until
* the minimum length is reached . If the input string is empty , the result is a
* string with the provided len only consisting of the passed characters . If the
* input String is longer than the provide... | return _getWithLeadingOrTrailing ( sSrc , nMinLen , cFront , true ) ; |
public class ComponentHandler { /** * Method handles UIComponent tree creation in accordance with the JSF 1.2 spec .
* < ol >
* < li > First determines this UIComponent ' s id by calling { @ link # getId ( FaceletContext ) getId ( FaceletContext ) } . < / li >
* < li > Search the parent for an existing UIComponen... | // make sure our parent is not null
if ( parent == null ) { throw new TagException ( this . tag , "Parent UIComponent was null" ) ; } // possible facet scoped
String facetName = this . getFacetName ( ctx , parent ) ; // our id
String id = ctx . generateUniqueId ( this . tagId ) ; // grab our component
UIComponent c = C... |
public class Algorithms { /** * Generates an unused algorithm id .
* @ return an algorithm id < code > String < / code > . */
String getNextAlgorithmObjectId ( ) { } } | if ( idsToAlgorithms . size ( ) == Integer . MAX_VALUE ) { throw new IllegalArgumentException ( "Maximum number of algorithm objects reached" ) ; } while ( true ) { String candidate = "ALGORITHM_" + currentAlgorithmId ++ ; if ( isUniqueAlgorithmObjectId ( candidate ) ) { return candidate ; } } |
public class CmsTextBox { /** * Enables or disables read - only mode . < p >
* @ param readOnly if true , enables read - only mode , else disables it */
public void setReadOnly ( boolean readOnly ) { } } | m_textbox . setReadOnly ( readOnly ) ; if ( readOnly ) { addStyleName ( CSS . textBoxReadOnly ( ) ) ; } else { removeStyleName ( CSS . textBoxReadOnly ( ) ) ; } |
public class UberData { /** * Take a list of { @ link Affordance } - based { @ link Link } s , and overlay them with intersecting , declared { @ link Link } s .
* @ param affordanceBasedLinks
* @ param links
* @ return */
private static List < UberData > mergeDeclaredLinksIntoAffordanceLinks ( List < UberData > a... | return affordanceBasedLinks . stream ( ) . flatMap ( affordance -> links . stream ( ) . filter ( link -> link . getUrl ( ) . equals ( affordance . getUrl ( ) ) ) . map ( link -> { if ( link . getAction ( ) == affordance . getAction ( ) ) { List < LinkRelation > rels = new ArrayList < > ( link . getRel ( ) ) ; rels . ad... |
public class DefaultFileSet { /** * Creates a new builder with the specified base folder and manifest .
* @ param baseFolder the base folder
* @ param manifest the manifest
* @ param manifestPath the path to the manifest within the file set
* @ return returns a new builder
* @ throws IllegalArgumentException ... | return new Builder ( baseFolder , manifest , manifestPath ) ; |
public class PropsUtils { /** * Convert props to json string
* @ param props props
* @ param localOnly include local prop sets only or not
* @ return json string format of props */
public static String toJSONString ( final Props props , final boolean localOnly ) { } } | final Map < String , String > map = toStringMap ( props , localOnly ) ; return JSONUtils . toJSON ( map ) ; |
public class StateHelper { /** * < p > Returns the Clock implementation using commons discovery . < / p >
* @ return the Clock implementation using commons discovery . */
public static Clock getClockImpl ( ) { } } | Clock c = null ; try { DiscoverClass dc = new DiscoverClass ( ) ; c = ( Clock ) dc . newInstance ( Clock . class , Clock . DEFAULT_CLOCK_IMPL ) ; } catch ( Exception ex ) { // ignore as default implementation will be used .
} return c ; |
public class HtmlBaseTag { /** * Sets the onKeyPress javascript event .
* @ param onkeypress the onKeyPress event .
* @ jsptagref . attributedescription The onKeyPress JavaScript event .
* @ jsptagref . databindable false
* @ jsptagref . attributesyntaxvalue < i > string _ onKeyPress < / i >
* @ netui : attri... | AbstractHtmlState tsh = getState ( ) ; tsh . registerAttribute ( AbstractHtmlState . ATTR_JAVASCRIPT , ONKEYPRESS , onkeypress ) ; |
public class CernunnosDataImporter { /** * / * ( non - Javadoc )
* @ see org . apereo . portal . io . xml . crn . AbstractDom4jImporter # importDataNode ( org . apereo . portal . utils . Tuple ) */
@ Override protected void importDataElement ( Tuple < String , Element > data ) { } } | final RuntimeRequestResponse request = new RuntimeRequestResponse ( ) ; request . setAttribute ( Attributes . NODE , data . second ) ; request . setAttribute ( Attributes . LOCATION , StringUtils . trimToEmpty ( data . first ) ) ; final ReturnValueImpl result = new ReturnValueImpl ( ) ; final TaskResponse response = ne... |
public class CollectionPrinter { /** * List to json string string .
* @ param list the list
* @ return the string */
static public String listToJSONString ( List < ? > list ) { } } | if ( list == null || list . size ( ) == 0 ) { return "[]" ; } StringBuilder sb = new StringBuilder ( "[" ) ; for ( Object o : list ) { buildAppendString ( sb , o ) . append ( ',' ) . append ( ' ' ) ; } return sb . delete ( sb . length ( ) - 2 , sb . length ( ) ) . append ( ']' ) . toString ( ) ; |
public class Node { /** * Remove a named attribute . < br / >
* @ param name
* The attribute name
* @ return The attribute value that was removed , or null if the attribute with the given name was not found .
* @ throws IllegalArgumentException
* If the name is not specified */
public String removeAttribute (... | // Precondition check
if ( name == null || name . length ( ) == 0 ) { throw new IllegalArgumentException ( "name must be specified" ) ; } final String remove = this . attributes . remove ( name ) ; return remove ; |
public class Configuration { /** * Adds metadata that will be displayed at the main page of the report . It is useful when there is a few reports are
* generated at the same time but with different parameters / configurations .
* @ param name name of the property
* @ param value value of the property */
public vo... | classifications . add ( new AbstractMap . SimpleEntry < > ( name , value ) ) ; |
public class SpatialReferenceSystemDao { /** * { @ inheritDoc } */
@ Override public List < SpatialReferenceSystem > queryForEq ( String fieldName , Object value ) throws SQLException { } } | List < SpatialReferenceSystem > srsList = super . queryForEq ( fieldName , value ) ; setDefinition_12_063 ( srsList ) ; return srsList ; |
public class TrmMeLinkRequestImpl { /** * Set the requesting ME UUID in the message .
* Javadoc description supplied by TrmMeLinkRequest interface . */
public void setRequestingMeUuid ( SIBUuid8 value ) { } } | if ( value != null ) jmo . setField ( TrmFirstContactAccess . BODY_MELINKREQUEST_REQUESTINGMEUUID , value . toByteArray ( ) ) ; else jmo . setField ( TrmFirstContactAccess . BODY_MELINKREQUEST_REQUESTINGMEUUID , null ) ; |
public class MongoNativeExtractor { /** * Gets split data collection shard enviroment .
* @ param shards the shards
* @ param dbName the db name
* @ param collectionName the collection name
* @ return the split data collection shard enviroment */
private Pair < BasicDBList , List < ServerAddress > > getSplitDat... | MongoClient mongoClient = null ; try { Set < String > keys = shards . keySet ( ) ; for ( String key : keys ) { List < ServerAddress > addressList = getServerAddressList ( Arrays . asList ( shards . get ( key ) ) ) ; mongoClient = new MongoClient ( addressList ) ; BasicDBList dbList = getSplitData ( mongoClient . getDB ... |
public class Component { /** * Filename of the form " < ksname > / < cfname > - [ tmp - ] [ < version > - ] < gen > - < component > " ,
* @ return A Descriptor for the SSTable , and a Component for this particular file .
* TODO move descriptor into Component field */
public static Pair < Descriptor , Component > fr... | Pair < Descriptor , String > path = Descriptor . fromFilename ( directory , name ) ; // parse the component suffix
Type type = Type . fromRepresentation ( path . right ) ; // build ( or retrieve singleton for ) the component object
Component component ; switch ( type ) { case DATA : component = Component . DATA ; break... |
public class MorphingClockSkin { /** * * * * * * Resizing * * * * * */
@ Override protected void resize ( ) { } } | width = clock . getWidth ( ) - clock . getInsets ( ) . getLeft ( ) - clock . getInsets ( ) . getRight ( ) ; height = clock . getHeight ( ) - clock . getInsets ( ) . getTop ( ) - clock . getInsets ( ) . getBottom ( ) ; if ( aspectRatio * width > height ) { width = 1 / ( aspectRatio / height ) ; } else if ( 1 / ( aspectR... |
public class QuadraticWeight { /** * Evaluate quadratic weight . stddev is ignored . */
@ Override public double getWeight ( double distance , double max , double stddev ) { } } | if ( max <= 0 ) { return 1.0 ; } double relativedistance = distance / max ; return 1.0 - 0.9 * relativedistance * relativedistance ; |
public class JobWorkspaceRestore { /** * Will be restored the workspace .
* @ throws Throwable
* will be generated the Throwable */
protected void restoreWorkspace ( ) throws Throwable { } } | boolean restored = true ; RepositoryImpl repository = ( RepositoryImpl ) repositoryService . getRepository ( repositoryName ) ; try { RepositoryEntry reEntry = repository . getConfiguration ( ) ; backupManager . restore ( new BackupChainLog ( backupChainLogFile ) , reEntry . getName ( ) , wEntry , false ) ; } catch ( I... |
public class UrlFactory { /** * Finds a link to object if one exists .
* @ param o
* Object that might have a page that can be linked .
* @ return Link to objects page or the toString ( ) text if no link could not
* be created . */
public static String getUrl ( Object o ) { } } | if ( o instanceof VerifierRule ) { VerifierRule rule = ( VerifierRule ) o ; return getRuleUrl ( UrlFactory . RULE_FOLDER , rule . getPath ( ) , rule . getName ( ) ) ; } return o . toString ( ) ; |
public class RdmaServerEndpoint { /** * Extract the first connection request on the queue of pending connections .
* @ throws Exception on failure . */
public C accept ( ) throws IOException { } } | try { synchronized ( this ) { if ( connState != CONN_STATE_READY_FOR_ACCEPT ) { throw new IOException ( "bind needs to be called before accept (1), current state =" + connState ) ; } logger . info ( "starting accept" ) ; if ( requested . peek ( ) == null ) { wait ( ) ; } } C endpoint = requested . poll ( ) ; logger . i... |
public class Ssh2Channel { /** * Closes the channel . No data may be sent or receieved after this method
* completes . */
public void close ( ) { } } | boolean performClose = false ; ; synchronized ( this ) { if ( ! closing && state == CHANNEL_OPEN ) { performClose = closing = true ; } } if ( performClose ) { synchronized ( listeners ) { for ( Enumeration < ChannelEventListener > e = listeners . elements ( ) ; e . hasMoreElements ( ) ; ) { ( e . nextElement ( ) ) . ch... |
public class ExecutionStats { /** * Add statistics about sent emails .
* @ param recipients The list of recipients .
* @ param storageUsed If a remote storage was used . */
public void addEmailStats ( final InternetAddress [ ] recipients , final boolean storageUsed ) { } } | this . storageUsed = storageUsed ; for ( InternetAddress recipient : recipients ) { emailDests . add ( recipient . getAddress ( ) ) ; } |
public class ElementMatchers { /** * Only matches method descriptions that yield the provided signature token .
* @ param token The signature token to match against .
* @ param < T > The type of the matched object .
* @ return A matcher for a method with the provided signature token . */
public static < T extends... | return new SignatureTokenMatcher < T > ( is ( token ) ) ; |
public class ThreadPoolController { /** * report variable values that may be set by system property */
private void reportSystemProperties ( ) { } } | StringBuilder sb = new StringBuilder ( ) ; sb . append ( "\n interval: " ) . append ( String . format ( "%6d" , Long . valueOf ( interval ) ) ) ; sb . append ( " hangInterval: " ) . append ( String . format ( "%6d" , Long . valueOf ( hangInterval ) ) ) ; sb . append ( " compareRange: " ) . append ( String . format ( "%... |
public class Action { /** * Sets content type to the response */
public static Action contentType ( final String contentType ) { } } | return new Action ( r -> { r . setContentType ( contentType ) ; return r ; } ) ; |
public class IfcMaterialListImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) public EList < IfcMaterial > getMaterials ( ) { } } | return ( EList < IfcMaterial > ) eGet ( Ifc2x3tc1Package . Literals . IFC_MATERIAL_LIST__MATERIALS , true ) ; |
public class Sets { /** * Creates a { @ code SortedSet } instance containing the given elements .
* @ param elements the elements that the set should contain
* @ return a newly - created { @ code SortedSet } containing those elements ( minus
* duplicates ) */
public static < E > SortedSet < E > newSortedSet ( E .... | SortedSet < E > set = new TreeSet < E > ( ) ; Collections . addAll ( set , elements ) ; return set ; |
public class BitVector { /** * NOTE : preserved for performance testing */
int firstOneInRange ( int from , int to ) { } } | if ( from < 0 ) throw new IllegalArgumentException ( ) ; if ( to < from ) throw new IllegalArgumentException ( ) ; from += start ; to += start ; if ( to > finish ) throw new IllegalArgumentException ( ) ; return firstOneInRangeAdj ( from , to ) - start ; |
public class GoogleWebmasterDataFetcherImpl { /** * This doesn ' t cover all cases but more than 99.9 % captured .
* According to the standard ( RFC - 3986 ) , here are possible characters :
* unreserved = ALPHA / DIGIT / " - " / " . " / " _ " / " ~ "
* reserved = gen - delims / sub - delims
* gen - delims = " ... | ArrayList < String > expanded = new ArrayList < > ( ) ; // The page prefix is case insensitive , A - Z is not necessary .
for ( char c = 'a' ; c <= 'z' ; ++ c ) { expanded . add ( prefix + c ) ; } for ( int num = 0 ; num <= 9 ; ++ num ) { expanded . add ( prefix + num ) ; } expanded . add ( prefix + "-" ) ; expanded . ... |
public class ProgressMonitoringBeanFactoryPostProcessor { /** * Notifies this instance ' s associated progress monitor of progress made
* while processing the given bean factory .
* @ param beanFactory the bean factory that is to be processed . */
public void postProcessBeanFactory ( final ConfigurableListableBeanF... | if ( beanFactory == null ) { return ; } String [ ] beanNames = beanFactory . getBeanDefinitionNames ( ) ; int singletonBeanCount = 0 ; for ( int i = 0 ; i < beanNames . length ; i ++ ) { // using beanDefinition to check singleton property because when
// accessing through
// context ( applicationContext . isSingleton (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.