signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class AIStream { /** * Turn a Q / G to V / U . Associate with the V / U tick the in - memory reference to the message and whether the message
* was delivered .
* @ return The Q / G tick , from which the consumer key and time issued can be obtained */
public AIRequestedTick updateRequestToValue ( long tick , ... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "updateRequestToValue" , new Object [ ] { Long . valueOf ( tick ) , msgItem , Boolean . valueOf ( valueDelivered ) } ) ; AIRequestedTick rt = null ; _targetStream . setCursor ( tick ) ; TickRange tickRange = _targetStream . ... |
public class ListDeliveryStreamsResult { /** * The names of the delivery streams .
* @ param deliveryStreamNames
* The names of the delivery streams . */
public void setDeliveryStreamNames ( java . util . Collection < String > deliveryStreamNames ) { } } | if ( deliveryStreamNames == null ) { this . deliveryStreamNames = null ; return ; } this . deliveryStreamNames = new java . util . ArrayList < String > ( deliveryStreamNames ) ; |
public class CommentsForComparedCommitMarshaller { /** * Marshall the given parameter object . */
public void marshall ( CommentsForComparedCommit commentsForComparedCommit , ProtocolMarshaller protocolMarshaller ) { } } | if ( commentsForComparedCommit == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( commentsForComparedCommit . getRepositoryName ( ) , REPOSITORYNAME_BINDING ) ; protocolMarshaller . marshall ( commentsForComparedCommit . getBeforeCommitId ( ... |
public class DefaultGroovyMethods { /** * Support the subscript operator with a range for a double array
* @ param array a double array
* @ param range a range indicating the indices for the items to retrieve
* @ return list of the retrieved doubles
* @ since 1.0 */
@ SuppressWarnings ( "unchecked" ) public sta... | return primitiveArrayGet ( array , range ) ; |
public class UUIDConverter { /** * { @ inheritDoc } */
public Object convert ( String value , TypeLiteral < ? > toType ) { } } | try { return UUID . fromString ( value ) ; } catch ( Throwable t ) { throw new ProvisionException ( "String value '" + value + "' is not a valid UUID" , t ) ; } |
public class QueueContainer { /** * Commits the effects of the { @ link # txnPollReserve ( long , String ) } } . Also deletes the item data from the queue
* data store if it is configured and enabled .
* @ param itemId the ID of the item which was polled inside a transaction
* @ return the data of the polled item... | TxQueueItem item = txMap . remove ( itemId ) ; if ( item == null ) { logger . warning ( "txnCommitPoll operation-> No txn item for itemId: " + itemId ) ; return null ; } if ( store . isEnabled ( ) ) { try { store . delete ( item . getItemId ( ) ) ; } catch ( Exception e ) { logger . severe ( "Error during store delete:... |
public class SecretDetector { /** * Masks given text between begin position and end position .
* @ param text text to mask
* @ param begPos begin position ( inclusive )
* @ param endPos end position ( exclusive )
* @ return masked text */
private static String maskText ( String text , int begPos , int endPos ) ... | // Convert the SQL statement to a char array to obe able to modify it .
char [ ] chars = text . toCharArray ( ) ; // Mask the value in the SQL statement using * .
for ( int curPos = begPos ; curPos < endPos ; curPos ++ ) { chars [ curPos ] = '☺' ; } // Convert it back to a string
return String . valueOf ( chars ) ; |
public class JmsMsgConsumerImpl { /** * This method is used to remove an existing asynchronous consumer
* from the core consumer object , and reset the JMS consumer back to
* sychronous receipt mode .
* 13/01/04 Modified so that it can be called repeatedly , and restores
* the started state of the core consumer... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeAsyncListener" ) ; // if the consumer is null , there is nothing to do
if ( consumer != null ) { try { // stop the coreConsumerSession
coreConsumerSession . stop ( ) ; // remove the callback
coreConsumerSession... |
public class GHUtility { /** * Creates unique positive number for specified edgeId taking into account the direction defined
* by nodeA , nodeB and reverse . */
public static int createEdgeKey ( int nodeA , int nodeB , int edgeId , boolean reverse ) { } } | edgeId = edgeId << 1 ; if ( reverse ) return ( nodeA > nodeB ) ? edgeId : edgeId + 1 ; return ( nodeA > nodeB ) ? edgeId + 1 : edgeId ; |
public class BeanMappingConfigHelper { /** * 单例方法 */
public static BeanMappingConfigHelper getInstance ( ) { } } | if ( singleton == null ) { synchronized ( BeanMappingConfigHelper . class ) { if ( singleton == null ) { // double check
singleton = new BeanMappingConfigHelper ( ) ; } } } return singleton ; |
public class PageSectionStyle { /** * Append a footer / header to styles . xml / automatic - styles
* @ param util an util
* @ param appendable the destination
* @ param pageSectionType the type if pageSectionStyle is null .
* @ throws IOException if an I / O error occurs */
public void appendFooterHeaderStyleX... | appendable . append ( "<style:" ) . append ( pageSectionType . getTypeName ( ) ) . append ( "-style>" ) ; appendable . append ( "<style:header-footer-properties" ) ; util . appendAttribute ( appendable , "fo:min-height" , this . minHeight . toString ( ) ) ; this . margins . appendXMLContent ( util , appendable ) ; appe... |
public class DynamicDomainObjectMerger { /** * Merges the given target object into the source one .
* @ param from can be { @ literal null } .
* @ param target can be { @ literal null } .
* @ param nullPolicy how to handle { @ literal null } values in the source object . */
@ Override public void merge ( final Ob... | if ( from == null || target == null ) { return ; } final BeanWrapper fromWrapper = beanWrapper ( from ) ; final BeanWrapper targetWrapper = beanWrapper ( target ) ; final DomainTypeAdministrationConfiguration domainTypeAdministrationConfiguration = configuration . forManagedDomainType ( target . getClass ( ) ) ; final ... |
public class PaperSize { /** * Sees if the specified work matches any of the units full name or short name . */
public static PaperSize lookup ( String word ) { } } | for ( PaperSize paper : values ) { if ( paper . name . compareToIgnoreCase ( word ) == 0 ) { return paper ; } } return null ; |
public class AlwaysAllowReadPermissionEvaluator { /** * Grants READ permission on the user object of the currently logged in
* user . Uses default implementation otherwise . */
@ Override public boolean hasPermission ( User user , E entity , Permission permission ) { } } | // always grant READ access ( " unsecured " object )
if ( permission . equals ( Permission . READ ) ) { LOG . trace ( "Granting READ access on " + entity . getClass ( ) . getSimpleName ( ) + " with ID " + entity . getId ( ) ) ; return true ; } // call parent implementation
return super . hasPermission ( user , entity ,... |
public class S3TaskClientImpl { /** * { @ inheritDoc } */
@ Override public EnableStreamingTaskResult enableStreaming ( String spaceId , boolean secure ) throws ContentStoreException { } } | EnableStreamingTaskParameters taskParams = new EnableStreamingTaskParameters ( ) ; taskParams . setSpaceId ( spaceId ) ; taskParams . setSecure ( secure ) ; return EnableStreamingTaskResult . deserialize ( contentStore . performTask ( StorageTaskConstants . ENABLE_STREAMING_TASK_NAME , taskParams . serialize ( ) ) ) ; |
public class VnSyllParser { /** * Parses the secondary vowel . */
private void parseSecondaryVowel ( ) { } } | if ( ! validViSyll ) return ; // get the current and next character in the syllable string
char curChar , nextChar ; if ( iCurPos > strSyllable . length ( ) - 1 ) { validViSyll = false ; return ; } curChar = strSyllable . charAt ( iCurPos ) ; if ( iCurPos == strSyllable . length ( ) - 1 ) nextChar = '$' ; else nextChar... |
public class ResultSetIterator { /** * Check for a subsequent item in the ResultSet .
* @ return < code > true < / code > if there is another element ; < code > false < / code > otherwise
* @ throws IllegalStateException when a { @ link SQLException } occurs advancing the ResultSet */
public boolean hasNext ( ) { }... | if ( _rs == null ) return false ; if ( _primed ) return true ; try { _primed = _rs . next ( ) ; return _primed ; } catch ( SQLException sql ) { String msg = "An exception occurred reading from the Iterator. Cause: " + sql ; LOGGER . error ( msg , sql ) ; throw new IllegalStateException ( msg , sql ) ; } |
public class RealWebSocket { /** * For testing : receive a single frame and return true if there are more frames to read . Invoked
* only by the reader thread . */
boolean processNextFrame ( ) throws IOException { } } | try { reader . processNextFrame ( ) ; return receivedCloseCode == - 1 ; } catch ( Exception e ) { failWebSocket ( e , null ) ; return false ; } |
public class Maybe { /** * Calls the shared consumer with the success value sent via onSuccess for each
* MaybeObserver that subscribes to the current Maybe .
* < img width = " 640 " height = " 358 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / doOnSuccess . m . png... | return RxJavaPlugins . onAssembly ( new MaybePeek < T > ( this , Functions . emptyConsumer ( ) , // onSubscribe
ObjectHelper . requireNonNull ( onSuccess , "onSubscribe is null" ) , Functions . emptyConsumer ( ) , // onError
Functions . EMPTY_ACTION , // onComplete
Functions . EMPTY_ACTION , // ( onSuccess | onError | ... |
public class VodClient { /** * Transcode the media again . Only status is FAILED or PUBLISHED media can use .
* @ param request The request object containing mediaid
* @ return */
public GetMediaSourceDownloadResponse getMediaSourceDownload ( GetMediaSourceDownloadRequest request ) { } } | checkStringNotEmpty ( request . getMediaId ( ) , "Media ID should not be null or empty!" ) ; InternalRequest internalRequest = createRequest ( HttpMethodName . GET , request , PATH_MEDIA , request . getMediaId ( ) ) ; internalRequest . addParameter ( PARA_DOWNLOAD , null ) ; internalRequest . addParameter ( PARA_EXPIRE... |
public class RestExceptionMapper { /** * Gets the full stack trace for the given exception and returns it as a
* string .
* @ param data */
private String getStackTrace ( AbstractRestException data ) { } } | StringBuilderWriter writer = new StringBuilderWriter ( ) ; try { data . printStackTrace ( new PrintWriter ( writer ) ) ; return writer . getBuilder ( ) . toString ( ) ; } finally { writer . close ( ) ; } |
public class MarkdownParser { /** * Extract all the referencable objects from the given content .
* @ param text the content to parse .
* @ return the referencables objects */
@ SuppressWarnings ( "static-method" ) protected ReferenceContext extractReferencableElements ( String text ) { } } | final ReferenceContext context = new ReferenceContext ( ) ; // Visit the links and record the transformations
final MutableDataSet options = new MutableDataSet ( ) ; final Parser parser = Parser . builder ( options ) . build ( ) ; final Node document = parser . parse ( text ) ; final Pattern pattern = Pattern . compile... |
public class MsWordUtils { /** * 获取一个新的XWPFRun对象
* @ param alignment 对齐方式
* @ return { @ link XWPFRun } */
public static XWPFRun getNewRun ( ParagraphAlignment alignment ) { } } | createXwpfDocumentIfNull ( ) ; XWPFParagraph paragraph = xwpfDocument . createParagraph ( ) ; paragraph . setAlignment ( alignment ) ; return paragraph . createRun ( ) ; |
public class MetadataUtils { /** * Provides a substring with collection name .
* @ param id
* string consisting of concatenation of collection name , / , & _ key .
* @ return collection name ( or null if no key delimiter is present ) */
public static String determineCollectionFromId ( final String id ) { } } | final int delimiter = id . indexOf ( KEY_DELIMITER ) ; return delimiter == - 1 ? null : id . substring ( 0 , delimiter ) ; |
public class MaskedCardAdapter { /** * Sets the selected source to the one whose ID is identical to the input string , if such
* a value is found .
* @ param sourceId a stripe ID to search for among the list of { @ link CustomerSource } objects
* @ return { @ code true } if the value was found , { @ code false } ... | for ( int i = 0 ; i < mCustomerSourceList . size ( ) ; i ++ ) { if ( sourceId . equals ( mCustomerSourceList . get ( i ) . getId ( ) ) ) { updateSelectedIndex ( i ) ; return true ; } } return false ; |
public class Mode { /** * Adds a set of attribute actions to be performed in this mode
* for attributes in a specified namespace .
* @ param ns The namespace pattern .
* @ param wildcard The wildcard character .
* @ param actions The set of attribute actions .
* @ return true if successfully added , that is t... | NamespaceSpecification nss = new NamespaceSpecification ( ns , wildcard ) ; if ( nssAttributeMap . get ( nss ) != null ) return false ; for ( Enumeration e = nssAttributeMap . keys ( ) ; e . hasMoreElements ( ) ; ) { NamespaceSpecification nssI = ( NamespaceSpecification ) e . nextElement ( ) ; if ( nss . compete ( nss... |
public class Vector4d { /** * / * ( non - Javadoc )
* @ see org . joml . Vector4dc # add ( double , double , double , double , org . joml . Vector4d ) */
public Vector4d add ( double x , double y , double z , double w , Vector4d dest ) { } } | dest . x = this . x + x ; dest . y = this . y + y ; dest . z = this . z + z ; dest . w = this . w + w ; return dest ; |
public class SubFileFilter { /** * Get the foreign field that references this record .
* There can be more than one , so supply an index until you get a null .
* @ param iCount The index of the reference to retrieve
* @ return The referenced field */
public BaseField getReferencedField ( int iIndex ) { } } | if ( m_recordMain != null ) return m_recordMain . getKeyArea ( ) . getField ( iIndex ) ; if ( iIndex == 0 ) return m_fldMainFile ; if ( iIndex == 1 ) return m_fldMainFile2 ; if ( iIndex == 2 ) return m_fldMainFile3 ; return null ; |
public class FileCopier { /** * 拷贝文件 , 只用于内部 , 不做任何安全检查 < br >
* 情况如下 :
* < pre >
* 1 、 如果目标是一个不存在的路径 , 则目标以文件对待 ( 自动创建父级目录 ) 比如 : / dest / aaa , 如果aaa不存在 , 则aaa被当作文件名
* 2 、 如果目标是一个已存在的目录 , 则文件拷贝到此目录下 , 文件名与原文件名一致
* < / pre >
* @ param src 源文件 , 必须为文件
* @ param dest 目标文件 , 如果非覆盖模式必须为目录
* @ throws IORunt... | if ( null != copyFilter && false == copyFilter . accept ( src ) ) { // 被过滤的文件跳过
return ; } // 如果已经存在目标文件 , 切为不覆盖模式 , 跳过之
if ( dest . exists ( ) ) { if ( dest . isDirectory ( ) ) { // 目标为目录 , 目录下创建同名文件
dest = new File ( dest , src . getName ( ) ) ; } if ( dest . exists ( ) && false == isOverride ) { // 非覆盖模式跳过
return ; ... |
public class SwaggerBuilder { /** * Returns the appropriate Swagger Property instance for a given object class .
* @ param swagger
* @ param objectClass
* @ return a SwaggerProperty instance */
protected Property getSwaggerProperty ( Swagger swagger , Class < ? > objectClass ) { } } | Property swaggerProperty = null ; if ( byte . class == objectClass || Byte . class == objectClass ) { // STRING
swaggerProperty = new StringProperty ( "byte" ) ; } else if ( char . class == objectClass || Character . class == objectClass ) { // CHAR is STRING LEN 1
StringProperty property = new StringProperty ( ) ; pro... |
public class XSLTComponent { /** * / * ( non - Javadoc )
* @ see org . apereo . portal . rendering . StAXPipelineComponent # getXmlStreamReader ( java . lang . Object , java . lang . Object ) */
@ Override public PipelineEventReader < XMLEventReader , XMLEvent > getEventReader ( HttpServletRequest request , HttpServl... | final PipelineEventReader < XMLEventReader , XMLEvent > pipelineEventReader = this . wrappedComponent . getEventReader ( request , response ) ; final Transformer transformer = this . transformerSource . getTransformer ( request , response ) ; // Setup a URIResolver based on the current resource loader
transformer . set... |
public class Resource { /** * Builds and returns a valid { @ link HttpUrl } pointing to the given { @ link Endpoint } ' s host
* and with all the supplied segments concatenated .
* @ param endpoint The Omise API { @ link Endpoint } to point to .
* @ param path The base API path .
* @ param segments Additional U... | Preconditions . checkNotNull ( endpoint ) ; Preconditions . checkNotNull ( path ) ; HttpUrl . Builder builder = endpoint . buildUrl ( ) . addPathSegment ( path ) ; for ( String segment : segments ) { if ( segment == null || segment . isEmpty ( ) ) { continue ; } builder = builder . addPathSegment ( segment ) ; } return... |
public class SystemInputJson { /** * Returns the Not ( ContainsAny ) condition represented by the given JSON object or an empty
* value if no such condition is found . */
private static Optional < ICondition > asContainsNone ( JsonObject json ) { } } | return json . containsKey ( HAS_NONE_KEY ) ? Optional . of ( new Not ( new ContainsAny ( toIdentifiers ( json . getJsonArray ( HAS_NONE_KEY ) ) ) ) ) : Optional . empty ( ) ; |
public class DateUtils { /** * Warning : may rely on default timezone !
* @ return the datetime , { @ code null } if stringDate is null
* @ throws IllegalArgumentException if stringDate is not a correctly formed date or datetime
* @ since 6.1 */
@ CheckForNull public static Date parseDateOrDateTime ( @ Nullable S... | if ( stringDate == null ) { return null ; } OffsetDateTime odt = parseOffsetDateTimeQuietly ( stringDate ) ; if ( odt != null ) { return Date . from ( odt . toInstant ( ) ) ; } LocalDate ld = parseLocalDateQuietly ( stringDate ) ; checkArgument ( ld != null , "Date '%s' cannot be parsed as either a date or date+time" ,... |
public class Matrix3x2d { /** * Apply a rotation transformation to this matrix by rotating the given amount of radians and store the result in < code > dest < / code > .
* If < code > M < / code > is < code > this < / code > matrix and < code > R < / code > the rotation matrix ,
* then the new matrix will be < code... | double cos = Math . cos ( ang ) ; double sin = Math . sin ( ang ) ; double rm00 = cos ; double rm01 = sin ; double rm10 = - sin ; double rm11 = cos ; double nm00 = m00 * rm00 + m10 * rm01 ; double nm01 = m01 * rm00 + m11 * rm01 ; dest . m10 = m00 * rm10 + m10 * rm11 ; dest . m11 = m01 * rm10 + m11 * rm11 ; dest . m00 =... |
public class TmdbTV { /** * Get the content ratings for a specific TV show id .
* @ param tvID
* @ return
* @ throws com . omertron . themoviedbapi . MovieDbException */
public ResultList < ContentRating > getTVContentRatings ( int tvID ) throws MovieDbException { } } | TmdbParameters parameters = new TmdbParameters ( ) ; parameters . add ( Param . ID , tvID ) ; URL url = new ApiUrl ( apiKey , MethodBase . TV ) . subMethod ( MethodSub . CONTENT_RATINGS ) . buildUrl ( parameters ) ; WrapperGenericList < ContentRating > wrapper = processWrapper ( getTypeReference ( ContentRating . class... |
public class ProductScan { /** * Moves the scan to the next record . The method moves to the next RHS
* record , if possible . Otherwise , it moves to the next LHS record and the
* first RHS record . If there are no more LHS records , the method returns
* false .
* @ see Scan # next ( ) */
@ Override public boo... | if ( isLhsEmpty ) return false ; if ( s2 . next ( ) ) return true ; else if ( ! ( isLhsEmpty = ! s1 . next ( ) ) ) { s2 . beforeFirst ( ) ; return s2 . next ( ) ; } else { return false ; } |
public class DBRef { /** * Convert the DBRef object to a DBREF record as it is used in PDB files
* @ return a PDB - DBREF formatted line */
@ Override public String toPDB ( ) { } } | StringBuffer buf = new StringBuffer ( ) ; toPDB ( buf ) ; return buf . toString ( ) ; |
public class PreferenceActivity { /** * Obtains , whether the split screen layout should be used on tablets , from the activities
* theme . */
private void obtainUseSplitScreen ( ) { } } | boolean useSplitScreen = ThemeUtil . getBoolean ( this , R . attr . useSplitScreen , true ) ; useSplitScreen ( useSplitScreen ) ; |
public class EventExtractor { /** * Splits events of a row if they contain a gap . Gaps are found using the
* token index ( provided as ANNIS specific { @ link SFeature } . Inserted events
* have a special style to mark them as gaps .
* @ param row
* @ param graph
* @ param startTokenIndex token index of the ... | ListIterator < GridEvent > itEvents = row . getEvents ( ) . listIterator ( ) ; while ( itEvents . hasNext ( ) ) { GridEvent event = itEvents . next ( ) ; int lastTokenIndex = - 1 ; // sort the coveredIDs
LinkedList < String > sortedCoveredToken = new LinkedList < > ( event . getCoveredIDs ( ) ) ; Collections . sort ( s... |
public class MSExcelParser { /** * Check if document matches the metadata filters for HSSF documents
* @ return true , if it matches , false if not */
private boolean checkFilteredHSSF ( ) { } } | HSSFWorkbook currentHSSFWorkbook = ( HSSFWorkbook ) this . currentWorkbook ; SummaryInformation summaryInfo = currentHSSFWorkbook . getSummaryInformation ( ) ; boolean matchAll = true ; boolean matchFull = true ; boolean matchOnce = false ; if ( this . hocr . getMetaDataFilter ( ) . get ( MATCH_ALL ) != null ) { if ( "... |
public class SystemPropertiesUtil { /** * 读取Double类型的系统变量 , 为空时返回null . */
public static Double getDouble ( String propertyName ) { } } | return NumberUtil . toDoubleObject ( System . getProperty ( propertyName ) , null ) ; |
public class AutoJsonRpcClientProxyCreator { /** * Registers a new proxy bean with the bean factory . */
private void registerJsonProxyBean ( DefaultListableBeanFactory defaultListableBeanFactory , String className , String path ) { } } | BeanDefinitionBuilder beanDefinitionBuilder = BeanDefinitionBuilder . rootBeanDefinition ( JsonProxyFactoryBean . class ) . addPropertyValue ( "serviceUrl" , appendBasePath ( path ) ) . addPropertyValue ( "serviceInterface" , className ) ; if ( objectMapper != null ) { beanDefinitionBuilder . addPropertyValue ( "object... |
public class KeyJpaFinderIT { /** * Request all the keys marked as approximate . */
@ Test public void get_approx_default_translation ( ) { } } | KeySearchCriteria criteria = new KeySearchCriteria ( null , true , null , null ) ; PaginatedView < KeyRepresentation > keyRepresentations = keyFinder . findKeysWithTheirDefaultTranslation ( FIRST_RANGE , criteria ) ; assertThat ( keyRepresentations . getPageSize ( ) ) . isEqualTo ( 1 ) ; KeyRepresentation representatio... |
public class AlexaInput { /** * Checks if a slot is contained in the intent request and has a value which is a
* phonetic sibling of the string given to this method . This method picks the correct
* algorithm depending on the locale coming in with the speechlet request . For example the
* German locale compares t... | return getLocale ( ) . equals ( "de-DE" ) ? hasSlotIsCologneEqual ( slotName , value ) : hasSlotIsDoubleMetaphoneEqual ( slotName , value ) ; |
public class BsfUtils { /** * Selects the Date Pattern to use based on the given Locale if the input
* format is null
* @ param locale
* Locale ( may be the result of a call to selectLocale )
* @ param format
* optional Input format String , given as Moment . js date format
* @ return Moment . js Date Patte... | String selFormat ; if ( format == null ) { selFormat = ( ( SimpleDateFormat ) DateFormat . getDateInstance ( DateFormat . SHORT , locale ) ) . toPattern ( ) ; // Since DateFormat . SHORT is silly , return a smart format
if ( selFormat . equals ( "M/d/yy" ) ) { return "MM/DD/YYYY" ; } if ( selFormat . equals ( "d/M/yy" ... |
public class XResourceBundle { /** * Return the resource file suffic for the indicated locale
* For most locales , this will be based the language code . However
* for Chinese , we do distinguish between Taiwan and PRC
* @ param locale the locale
* @ return an String suffix which canbe appended to a resource na... | String lang = locale . getLanguage ( ) ; String country = locale . getCountry ( ) ; String variant = locale . getVariant ( ) ; String suffix = "_" + locale . getLanguage ( ) ; if ( lang . equals ( "zh" ) ) suffix += "_" + country ; if ( country . equals ( "JP" ) ) suffix += "_" + country + "_" + variant ; return suffix... |
public class Constraints { /** * Returns a ConditionalPropertyConstraint : one property will trigger the
* validation of another .
* @ see ConditionalPropertyConstraint */
public PropertyConstraint ifTrue ( PropertyConstraint ifConstraint , PropertyConstraint [ ] thenConstraints , PropertyConstraint [ ] elseConstra... | return new ConditionalPropertyConstraint ( ifConstraint , new CompoundPropertyConstraint ( new And ( thenConstraints ) ) , new CompoundPropertyConstraint ( new And ( elseConstraints ) ) ) ; |
public class BeanInfoUtil { /** * Builds a method descriptor that is exposed for scripting everywhere . */
public static MethodDescriptor buildScriptableMethodDescriptor ( Class actionClass , String methodName , String [ ] parameterNames , Class [ ] parameterTypes ) { } } | MethodDescriptor md = _buildMethodDescriptor ( actionClass , methodName , parameterNames , parameterTypes , parameterTypes ) ; makeScriptable ( md ) ; return md ; |
public class AbstractDecompiler { /** * Decompiles all . class files and nested archives in the given archive .
* Nested archives will be decompiled into directories matching the name of the archive , e . g .
* < code > foo . ear / bar . jar / src / com / foo / bar / Baz . java < / code > .
* Required directories... | return decompileArchive ( archive , outputDir , null , listener ) ; |
public class EnumPreference { /** * Set the value for the preference */
@ Override public void set ( E value ) { } } | if ( value == null ) throw new NullPointerException ( "value" ) ; this . set ( value . ordinal ( ) ) ; |
public class Component { /** * Create a ( deep ) copy of this component .
* @ return the component copy
* @ throws IOException where an error occurs reading the component data
* @ throws ParseException where parsing component data fails
* @ throws URISyntaxException where component data contains an invalid URI ... | // Deep copy properties . .
final PropertyList < Property > newprops = new PropertyList < Property > ( getProperties ( ) ) ; return new ComponentFactoryImpl ( ) . createComponent ( getName ( ) , newprops ) ; |
public class WCheckBoxSelectExample { /** * When a WCheckBoxSelect is added to a WFieldLayout the legend is moved . The first CheckBoxSelect has a frame , the
* second doesn ' t */
private void addInsideAFieldLayoutExamples ( ) { } } | add ( new WHeading ( HeadingLevel . H3 , "WCheckBoxSelect inside a WFieldLayout" ) ) ; add ( new ExplanatoryText ( "When a WCheckBoxSelect is inside a WField its label is exposed in a way which appears and behaves like a regular " + "HTML label. This allows WCheckBoxSelects to be used in a layout with simple form contr... |
public class CronOutputSchedule { /** * ( non - Javadoc )
* @ see com . nokia . dempsy . output . OutputExecuter # stop ( ) */
@ Override public void stop ( ) { } } | try { // gracefully shutting down
scheduler . shutdown ( false ) ; } catch ( final SchedulerException se ) { LOGGER . error ( "Error occurred while stopping the cron scheduler : " + se . getMessage ( ) , se ) ; } |
public class Cursor { /** * Set a { @ link CursorTheme } for this cursor . Use the { @ link CursorManager # getCursorThemes ( ) }
* call to know all the available cursor themes .
* Make sure that the theme cursor type matches this { @ link Cursor } else this call will return
* an { @ link IllegalArgumentException... | if ( theme == mCursorTheme || theme == null ) { // nothing to do , return
return ; } if ( theme . getCursorType ( ) != mCursorType ) { throw new IllegalArgumentException ( "Cursor Theme does not match the cursor type" ) ; } if ( mCursorAsset != null ) { mCursorAsset . reset ( this ) ; } if ( mCursorTheme != null ) { mC... |
public class CmsObjectWrapper { /** * Writes a resource to the OpenCms VFS , including it ' s content . < p >
* Iterates through all configured resource wrappers till the first returns not < code > null < / code > . < p >
* @ see I _ CmsResourceWrapper # writeFile ( CmsObject , CmsFile )
* @ see CmsObject # write... | CmsFile res = null ; // remove the added UTF - 8 marker
if ( needUtf8Marker ( resource ) ) { resource . setContents ( CmsResourceWrapperUtils . removeUtf8Marker ( resource . getContents ( ) ) ) ; } String resourcename = m_cms . getSitePath ( resource ) ; if ( ! m_cms . existsResource ( resourcename ) ) { // iterate thr... |
public class HttpUtil { /** * Checks if request and request method are not null
* @ param request { @ link HttpServletRequest } to check
* @ return true if sane , false otherwise */
public static boolean isSaneRequest ( HttpServletRequest request ) { } } | if ( request != null && request . getMethod ( ) != null ) { return true ; } return false ; |
public class Cartographer { /** * Print the json representation of an array to the given writer . Primitive arrays cannot be cast
* to Object [ ] , to this method accepts the raw object and uses { @ link Array # getLength ( Object ) } and
* { @ link Array # get ( Object , int ) } to read the array . */
private stat... | writer . beginArray ( ) ; for ( int i = 0 , size = Array . getLength ( array ) ; i < size ; i ++ ) { writeValue ( Array . get ( array , i ) , writer ) ; } writer . endArray ( ) ; |
public class IntList { /** * Checks if the specified element is found in the list .
* @ param e element to be found
* @ return result of check */
public final boolean contains ( final int e ) { } } | for ( int i = 0 ; i < size ; ++ i ) if ( list [ i ] == e ) return true ; return false ; |
public class DatabaseMetaData { /** * { @ inheritDoc } */
public ResultSet getPrimaryKeys ( final String catalog , final String schema , final String table ) throws SQLException { } } | return RowLists . rowList6 ( String . class , String . class , String . class , String . class , Short . class , String . class ) . withLabel ( 1 , "TABLE_CAT" ) . withLabel ( 2 , "TABLE_SCHEM" ) . withLabel ( 3 , "TABLE_NAME" ) . withLabel ( 4 , "COLUMN_NAME" ) . withLabel ( 5 , "KEY_SEQ" ) . withLabel ( 6 , "PK_NAME"... |
public class ValidateUtils { /** * Number Validation
* @ param context
* @ param input
* @ param minValue
* @ param maxValue
* @ param allowNull
* @ return */
public static Double validateNumber ( final String context , final String input , final long minValue , final long maxValue , final boolean allowNull... | return validator . getValidNumber ( context , input , minValue , maxValue , allowNull ) ; |
public class ActiveMqQueue { /** * Init method .
* @ return
* @ throws Exception */
public ActiveMqQueue < ID , DATA > init ( ) throws Exception { } } | if ( connectionFactory == null ) { setConnectionFactory ( buildConnectionFactory ( ) , true ) ; } super . init ( ) ; if ( connectionFactory == null ) { throw new IllegalStateException ( "ActiveMQ Connection factory is null." ) ; } return this ; |
public class ChemModelRenderer { /** * Setup the transformations necessary to draw this Chem Model .
* @ param chemModel
* @ param screen */
@ Override public void setup ( IChemModel chemModel , Rectangle screen ) { } } | this . setScale ( chemModel ) ; Rectangle2D bounds = BoundsCalculator . calculateBounds ( chemModel ) ; if ( bounds != null ) this . modelCenter = new Point2d ( bounds . getCenterX ( ) , bounds . getCenterY ( ) ) ; this . drawCenter = new Point2d ( screen . getCenterX ( ) , screen . getCenterY ( ) ) ; this . setup ( ) ... |
public class Properties { /** * Returns the comment for the specified key , or null if there is none .
* Any embedded newline sequences will be replaced by \ n characters .
* @ param key
* @ return */
public String getComment ( String key ) { } } | String raw = getRawComment ( key ) ; return cookComment ( raw ) ; |
public class ItemUtils { /** * Checks whether two { @ link ItemStack itemStacks } can be stacked together
* @ param stack1 first itemStack
* @ param stack2 second itemStack
* @ return true , if the itemStack can be stacked , false otherwise */
public static boolean areItemStacksStackable ( ItemStack stack1 , Item... | return ! ( stack1 . isEmpty ( ) || stack2 . isEmpty ( ) ) && stack1 . isStackable ( ) && stack1 . getItem ( ) == stack2 . getItem ( ) && ( ! stack2 . getHasSubtypes ( ) || stack2 . getMetadata ( ) == stack1 . getMetadata ( ) ) && ItemStack . areItemStackTagsEqual ( stack2 , stack1 ) ; |
public class PropertyNameResolver { /** * Remove the last property expresson from the current expression .
* @ param expression The property expression
* @ return The new expression value , with first property
* expression removed - null if there are no more expressions */
public String remove ( String expression... | if ( expression == null || expression . length ( ) == 0 ) { return null ; } String property = next ( expression ) ; if ( expression . length ( ) == property . length ( ) ) { return null ; } int start = property . length ( ) ; if ( expression . charAt ( start ) == Nested ) start ++ ; return expression . substring ( star... |
public class TimeZoneFormat { /** * Sets the decimal digit characters used for localized GMT format .
* @ param digits a string contains the decimal digit characters from 0 to 9 n the ascending order .
* @ return this object .
* @ throws IllegalArgumentException when the string did not contain ten characters .
... | if ( isFrozen ( ) ) { throw new UnsupportedOperationException ( "Attempt to modify frozen object" ) ; } if ( digits == null ) { throw new NullPointerException ( "Null GMT offset digits" ) ; } String [ ] digitArray = toCodePoints ( digits ) ; if ( digitArray . length != 10 ) { throw new IllegalArgumentException ( "Lengt... |
public class ClassLoaderUtil { /** * 获取 { @ link ClassLoader } < br >
* 获取顺序如下 : < br >
* < pre >
* 1 、 获取当前线程的ContextClassLoader
* 2 、 获取 { @ link ClassLoaderUtil } 类对应的ClassLoader
* 3 、 获取系统ClassLoader ( { @ link ClassLoader # getSystemClassLoader ( ) } )
* < / pre >
* @ return 类加载器 */
public static Cla... | ClassLoader classLoader = getContextClassLoader ( ) ; if ( classLoader == null ) { classLoader = ClassLoaderUtil . class . getClassLoader ( ) ; if ( null == classLoader ) { classLoader = ClassLoader . getSystemClassLoader ( ) ; } } return classLoader ; |
public class DistributedSocketFactory { /** * Returns an index which is positive , but may be out of the factory list
* bounds . */
protected int selectFactoryIndex ( Object session ) throws ConnectException { } } | Random rnd ; if ( session != null ) { return session . hashCode ( ) & 0x7fffffff ; } else if ( ( rnd = mRnd ) != null ) { return rnd . nextInt ( ) >>> 1 ; } else { synchronized ( mFactories ) { return mFactoryIndex ++ & 0x7fffffff ; } } |
public class RenditionMetadata { /** * Checks if this rendition matches the given width / height / ration restrictions .
* @ param minWidth Min . width
* @ param minHeight Min . height
* @ param maxWidth Max . width
* @ param maxHeight Max . height
* @ param ratio Ratio
* @ return true if matches */
public ... | if ( minWidth > 0 && getWidth ( ) < minWidth ) { return false ; } if ( minHeight > 0 && getHeight ( ) < minHeight ) { return false ; } if ( maxWidth > 0 && getWidth ( ) > maxWidth ) { return false ; } if ( maxHeight > 0 && getHeight ( ) > maxHeight ) { return false ; } if ( ratio > 0 ) { double renditionRatio = ( doubl... |
public class ParaObjectUtils { /** * Constructs a new instance of a core object .
* @ param < P > the object type
* @ param type the simple name of a class
* @ return a new instance of a core class . Defaults to { @ link com . erudika . para . core . Sysprop } .
* @ see # toClass ( java . lang . String ) */
pub... | try { return ( P ) toClass ( type ) . getConstructor ( ) . newInstance ( ) ; } catch ( Exception ex ) { logger . error ( null , ex ) ; return null ; } |
public class ServerLogReaderTransactional { /** * Setup the input stream to be consumed by the reader , with retries on
* failures . */
private void setupIngestStreamWithRetries ( long txid ) throws IOException { } } | for ( int i = 0 ; i < inputStreamRetries ; i ++ ) { try { setupCurrentEditStream ( txid ) ; return ; } catch ( IOException e ) { if ( i == inputStreamRetries - 1 ) { throw new IOException ( "Cannot obtain stream for txid: " + txid , e ) ; } LOG . info ( "Error :" , e ) ; } sleep ( 1000 ) ; LOG . info ( "Retrying to get... |
public class MismatchedBasePairParameters { /** * This is an implementation for finding non - canonical base pairs when there may be missing or overhanging bases .
* @ param chains The list of chains already found to be nucleic acids .
* @ return The list of the atom groups ( residues ) that are pairs , as a Pair o... | List < Pair < Group > > result = new ArrayList < > ( ) ; boolean lastFoundPair = false ; for ( int i = 0 ; i < chains . size ( ) ; i ++ ) { Chain c = chains . get ( i ) ; String sequence = c . getAtomSequence ( ) ; for ( int m = 0 ; m < sequence . length ( ) ; m ++ ) { boolean foundPair = false ; Integer type1 , type2 ... |
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EEnum getResourceObjectIncludeObjType ( ) { } } | if ( resourceObjectIncludeObjTypeEEnum == null ) { resourceObjectIncludeObjTypeEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 189 ) ; } return resourceObjectIncludeObjTypeEEnum ; |
public class AutoPrefixerPostProcessor { /** * Initialize the postprocessor */
private void initialize ( JawrConfig config ) { } } | StopWatch stopWatch = new StopWatch ( "Initializing JS engine for Autoprefixer" ) ; stopWatch . start ( ) ; // Load JavaScript Script Engine
String script = config . getProperty ( AUTOPREFIXER_SCRIPT_LOCATION , AUTOPREFIXER_SCRIPT_DEFAULT_LOCATION ) ; String jsEngineName = config . getJavascriptEngineName ( AUTOPREFIXE... |
public class FontSize { /** * Returns the font size expressed in pixels .
* @ return Pixels . */
public final int toPixel ( ) { } } | if ( unit == FontSizeUnit . PIXEL ) { return Math . round ( size ) ; } if ( unit == FontSizeUnit . EM ) { return Math . round ( 16 * size ) ; } if ( unit == FontSizeUnit . PERCENT ) { return Math . round ( size / 100 * 16 ) ; } if ( unit == FontSizeUnit . POINT ) { return Math . round ( size / 3 * 4 ) ; } throw new Ill... |
public class SpeexPacketFactory { /** * Creates the appropriate { @ link SpeexPacket }
* instance based on the type . */
public static SpeexPacket create ( OggPacket packet ) { } } | // Special header types detection
if ( isSpeexSpecial ( packet ) ) { return new SpeexInfo ( packet ) ; } if ( packet . getSequenceNumber ( ) == 1 && packet . getGranulePosition ( ) == 0 ) { return new SpeexTags ( packet ) ; } return new SpeexAudioData ( packet ) ; |
public class FastMath { /** * Internal helper method for expm1
* @ param x number to compute shifted exponential
* @ param hiPrecOut receive high precision result for - 1.0 < x < 1.0
* @ return exp ( x ) - 1 */
private static double expm1 ( double x , double hiPrecOut [ ] ) { } } | if ( x != x || x == 0.0 ) { // NaN or zero
return x ; } if ( x <= - 1.0 || x >= 1.0 ) { // If not between + / - 1.0
// return exp ( x ) - 1.0;
double hiPrec [ ] = new double [ 2 ] ; exp ( x , 0.0 , hiPrec ) ; if ( x > 0.0 ) { return - 1.0 + hiPrec [ 0 ] + hiPrec [ 1 ] ; } else { final double ra = - 1.0 + hiPrec [ 0 ] ;... |
public class PrefsTransformer { /** * Gets the net transform .
* @ param typeName the type name
* @ return the net transform */
static PrefsTransform getNetTransform ( TypeName typeName ) { } } | if ( URL . class . getName ( ) . equals ( typeName . toString ( ) ) ) { return new UrlPrefsTransform ( ) ; } return null ; |
public class PackedDecimal { /** * Verschiebt den Dezimalpunkt um n Stellen nach links .
* @ param n Anzahl Stellen
* @ return eine neue { @ link PackedDecimal } */
public PackedDecimal movePointLeft ( int n ) { } } | BigDecimal result = toBigDecimal ( ) . movePointLeft ( n ) ; return PackedDecimal . valueOf ( result ) ; |
public class MicrochipPotentiometerDeviceController { /** * Sets the wiper ' s value in the device .
* @ param channel Which wiper
* @ param value The wiper ' s value
* @ param nonVolatile volatile or non - volatile value
* @ throws IOException Thrown if communication fails or device returned a malformed result... | if ( channel == null ) { throw new RuntimeException ( "null-channel is not allowed. For devices " + "knowing just one wiper Channel.A is mandatory for " + "parameter 'channel'" ) ; } if ( value < 0 ) { throw new RuntimeException ( "only positive values are allowed! Got value '" + value + "' for writing to channel '" + ... |
public class MediaType { /** * Return a replica of this instance with its quality value removed .
* @ return the same instance if the media type doesn ' t contain a quality value , or a new one otherwise */
public MediaType removeQualityValue ( ) { } } | if ( ! this . parameters . containsKey ( PARAM_QUALITY_FACTOR ) ) { return this ; } Map < String , String > params = new LinkedHashMap < String , String > ( this . parameters ) ; params . remove ( PARAM_QUALITY_FACTOR ) ; return new MediaType ( this , params ) ; |
public class ElasticsearchClusterRunner { /** * Return a master node .
* @ return master node */
public synchronized Node masterNode ( ) { } } | final ClusterState state = client ( ) . admin ( ) . cluster ( ) . prepareState ( ) . execute ( ) . actionGet ( ) . getState ( ) ; final String name = state . nodes ( ) . getMasterNode ( ) . getName ( ) ; return getNode ( name ) ; |
public class RomanticTransaction { @ Override public void begin ( ) throws NotSupportedException , SystemException { } } | if ( ThreadCacheContext . exists ( ) ) { // in action or task
requestPath = ThreadCacheContext . findRequestPath ( ) ; entryMethod = ThreadCacheContext . findEntryMethod ( ) ; userBean = ThreadCacheContext . findUserBean ( ) ; } transactionBeginMillis = System . currentTimeMillis ( ) ; super . begin ( ) ; // actually b... |
public class AppointmentGridScreen { /** * SetupSFields Method . */
public void setupSFields ( ) { } } | this . getRecord ( Appointment . APPOINTMENT_FILE ) . getField ( Appointment . START_DATE_TIME ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Appointment . APPOINTMENT_FILE ) . getField... |
public class AAFClient { /** * Returns a Post Object . . . same as " create "
* @ param cls
* @ return
* @ throws APIException */
public < T > Post < T > post ( Class < T > cls ) throws APIException { } } | return new Post < T > ( this , getDF ( cls ) ) ; |
public class GBlurImageOps { /** * Applies a median filter .
* @ param input Input image . Not modified .
* @ param output ( Optional ) Storage for output image , Can be null . Modified .
* @ param radius Radius of the median blur function .
* @ param < T > Input image type .
* @ return Output blurred image .... | if ( input instanceof GrayU8 ) { return ( T ) BlurImageOps . median ( ( GrayU8 ) input , ( GrayU8 ) output , radius , ( IWorkArrays ) work ) ; } else if ( input instanceof GrayF32 ) { return ( T ) BlurImageOps . median ( ( GrayF32 ) input , ( GrayF32 ) output , radius ) ; } else if ( input instanceof Planar ) { return ... |
public class CollectorUtils { /** * Find the item for which the supplied projection returns the minimum value ( variant for non - naturally - comparable
* projected values ) .
* @ param projection The projection to apply to each item .
* @ param comparator The comparator to use to compare the projected values .
... | return Collectors . minBy ( ( a , b ) -> { Y element1 = projection . apply ( a ) ; Y element2 = projection . apply ( b ) ; return comparator . compare ( element1 , element2 ) ; } ) ; |
public class GrpcTrailersUtil { /** * Converts the given gRPC status code , and optionally an error message , to headers . The headers will be
* either trailers - only or normal trailers based on { @ code headersSent } , whether leading headers have
* already been sent to the client . */
public static HttpHeaders s... | final HttpHeaders trailers ; if ( headersSent ) { // Normal trailers .
trailers = new DefaultHttpHeaders ( ) ; } else { // Trailers only response
trailers = new DefaultHttpHeaders ( true , 3 , true ) . status ( HttpStatus . OK ) . set ( HttpHeaderNames . CONTENT_TYPE , "application/grpc+proto" ) ; } trailers . add ( Gr... |
public class AWSUtil { /** * If the provider is ASSUME _ ROLE , then the credentials for assuming this role are determined
* recursively .
* @ param configProps the configuration properties
* @ param configPrefix the prefix of the config properties for this credentials provider ,
* e . g . aws . credentials . p... | CredentialProvider credentialProviderType ; if ( ! configProps . containsKey ( configPrefix ) ) { if ( configProps . containsKey ( AWSConfigConstants . accessKeyId ( configPrefix ) ) && configProps . containsKey ( AWSConfigConstants . secretKey ( configPrefix ) ) ) { // if the credential provider type is not specified ... |
public class OptionsApi { /** * Replace old options with new .
* The POST operation will replace CloudCluster / Options with new values
* @ param body Body Data ( required )
* @ return ApiResponse & lt ; OptionsPostResponseStatusSuccess & gt ;
* @ throws ApiException If fail to call the API , e . g . server err... | com . squareup . okhttp . Call call = optionsPostValidateBeforeCall ( body , null , null ) ; Type localVarReturnType = new TypeToken < OptionsPostResponseStatusSuccess > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class PrcRevealTaxCat { /** * < p > Process entity request . < / p >
* @ param pAddParam additional param
* @ param pRequestData Request Data
* @ throws Exception - an exception */
@ Override public final void process ( final Map < String , Object > pAddParam , final IRequestData pRequestData ) throws Exce... | String taxDestIdStr = pRequestData . getParameter ( "taxDestId" ) ; Long taxDestId = Long . parseLong ( taxDestIdStr ) ; String itemIdStr = pRequestData . getParameter ( "itemId" ) ; Long itemId = Long . parseLong ( itemIdStr ) ; String nmEnt = pRequestData . getParameter ( "nmEnt" ) ; String destTaxItemLnNm ; String i... |
public class FileUtil { /** * Copies source file to target .
* @ param source source file to copy .
* @ param target destination to copy to .
* @ return target as File .
* @ throws IOException when unable to copy . */
public static File copyFile ( String source , String target ) throws IOException { } } | FileChannel inputChannel = null ; FileChannel outputChannel = null ; try { inputChannel = new FileInputStream ( source ) . getChannel ( ) ; outputChannel = new FileOutputStream ( target ) . getChannel ( ) ; outputChannel . transferFrom ( inputChannel , 0 , inputChannel . size ( ) ) ; } finally { if ( inputChannel != nu... |
public class Indexers { /** * Creates a function that maps multidimensional indices to 1D indices .
* The function will create consecutive 1D indices for indices that
* are given in colexicographical order .
* @ param size The size of the array to index
* @ return The indexer function
* @ throws NullPointerEx... | Objects . requireNonNull ( size , "The size is null" ) ; IntTuple sizeProducts = IntTupleFunctions . exclusiveScan ( size , 1 , ( a , b ) -> a * b , null ) ; return indices -> IntTuples . dot ( indices , sizeProducts ) ; |
public class KmeansCalculator { /** * 配列の平均値を算出する 。
* @ param base ベース配列
* @ param target 平均算出対象配列
* @ return 平均値配列 */
protected static double [ ] average ( double [ ] base , double [ ] target ) { } } | int dataNum = base . length ; double [ ] average = new double [ dataNum ] ; for ( int index = 0 ; index < dataNum ; index ++ ) { average [ index ] = ( base [ index ] + target [ index ] ) / 2.0 ; } return average ; |
public class ResponseValidator { /** * validate a given response content object with media content type " application / json "
* uri , httpMethod , statusCode , DEFAULT _ MEDIA _ TYPE is to locate the schema to validate
* @ param responseContent response content needs to be validated
* @ param uri original uri of... | return validateResponseContent ( responseContent , uri , httpMethod , statusCode , JSON_MEDIA_TYPE ) ; |
public class OPSHandler { /** * condition2 is false . */
protected void checkDependentCondition ( MessageId id , boolean condition1 , boolean condition2 , EPUBLocation location ) { } } | if ( condition1 && ! condition2 ) { report . message ( id , location ) ; } |
public class StringUtils { /** * Convert evaluated attribute value into a String . */
String convertToString ( Object value ) { } } | if ( value == null ) { return null ; } else if ( value instanceof String ) { return ( String ) value ; } else if ( value instanceof List ) { List < ? > list = ( ( List < ? > ) value ) ; if ( list . size ( ) == 0 ) { return EvaluationContext . EMPTY_STRING ; } else if ( list . size ( ) == 1 ) { String strValue = String ... |
public class GuildController { /** * Modifies the complete { @ link net . dv8tion . jda . core . entities . Role Role } set of the specified { @ link net . dv8tion . jda . core . entities . Member Member }
* < br > The provided roles will replace all current Roles of the specified Member .
* < p > < u > The new rol... | Checks . notNull ( member , "Member" ) ; Checks . notNull ( roles , "Roles" ) ; checkGuild ( member . getGuild ( ) , "Member" ) ; roles . forEach ( role -> { Checks . notNull ( role , "Role in collection" ) ; checkGuild ( role . getGuild ( ) , "Role: " + role . toString ( ) ) ; checkPosition ( role ) ; } ) ; Checks . c... |
public class BufferByteInput { /** * { @ inheritDoc }
* @ param source { @ inheritDoc }
* @ return { @ inheritDoc } */
@ Override public BufferByteInput < T > source ( final T source ) { } } | return ( BufferByteInput < T > ) super . source ( source ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.