signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class ReflectionInstantiatorDefinitionFactory { /** * IFJAVA8 _ END */
private static Parameter [ ] getParameters ( Constructor < ? > constructor , Type target ) { } } | return buildParameters ( target , constructor . getParameterTypes ( ) , constructor . getGenericParameterTypes ( ) , TypeHelper . toClass ( target ) . getTypeParameters ( ) ) ; |
public class Similarity { /** * Computes the lin similarity measure , which is motivated by information
* theory priniciples . This works best if both vectors have already been
* weighted using point - wise mutual information . This similarity measure is
* described in more detail in the following paper :
* < l... | check ( a , b ) ; // The total amount of information contained in a .
double aInformation = 0 ; // The total amount of information contained in b .
double bInformation = 0 ; // The total amount of information contained in both vectors .
double combinedInformation = 0 ; // Compute the information between the two vectors... |
public class App { /** * Select the main window . Used for returning to the main content after
* selecting a frame . If there are nested frames , the main content will be
* selected , not the next frame in the parent child relationship */
public void selectMainWindow ( ) { } } | String action = "Switching to main window" ; String expected = "Main window is selected" ; try { driver . switchTo ( ) . defaultContent ( ) ; } catch ( Exception e ) { reporter . fail ( action , expected , "Main window was not selected. " + e . getMessage ( ) ) ; log . warn ( e ) ; return ; } reporter . pass ( action ,... |
public class CliPrinter { /** * Print a command ( it ' s name , description and parameters ) .
* @ param command Command to describe . */
public void printCommand ( CliCommand command ) { } } | final PrintContext context = new PrintContext ( ) ; // Print command name : description
printIdentifiable ( context , command ) ; // Print each param name : description
printIdentifiables ( context , command . getParams ( ) ) ; |
public class WebAppHttpContext { /** * Find the mime type in the mime mappings . If not found delegate to wrapped
* http context .
* @ see org . osgi . service . http . HttpContext # getMimeType ( String ) */
public String getMimeType ( final String name ) { } } | String mimeType = null ; if ( name != null && name . length ( ) > 0 && name . contains ( "." ) ) { final String [ ] segments = name . split ( "\\." ) ; mimeType = mimeMappings . get ( segments [ segments . length - 1 ] ) ; } if ( mimeType == null ) { mimeType = httpContext . getMimeType ( name ) ; } return mimeType ; |
public class FctBnAccEntitiesProcessors { /** * < p > Get PrcInvoiceGfe ( create and put into map ) . < / p >
* @ param pAddParam additional param
* @ return requested PrcInvoiceGfe
* @ throws Exception - an exception */
protected final PrcInvoiceGfe < IInvoice > lazyGetPrcInvoiceGfe ( final Map < String , Object... | @ SuppressWarnings ( "unchecked" ) PrcInvoiceGfe < IInvoice > proc = ( PrcInvoiceGfe < IInvoice > ) this . processorsMap . get ( PrcInvoiceGfe . class . getSimpleName ( ) ) ; if ( proc == null ) { proc = new PrcInvoiceGfe < IInvoice > ( ) ; @ SuppressWarnings ( "unchecked" ) PrcEntityPbEditDelete < RS , IInvoice > proc... |
public class RelationalOperationsMatrix { /** * Line / Point , and Point / Point relations */
private void computeMatrixTopoGraphClusters_ ( int geometry_a , int geometry_b ) { } } | boolean bRelationKnown = false ; int id_a = m_topo_graph . getGeometryID ( geometry_a ) ; int id_b = m_topo_graph . getGeometryID ( geometry_b ) ; for ( int cluster = m_topo_graph . getFirstCluster ( ) ; cluster != - 1 ; cluster = m_topo_graph . getNextCluster ( cluster ) ) { // Invoke relational predicates
switch ( m_... |
public class TeamController { /** * REST endpoint for retrieving all features for a given sprint and team
* ( the sprint is derived )
* @ return A data response list of type Feature containing all features for
* the given team and current sprint */
@ RequestMapping ( value = "/team" , method = GET , produces = AP... | return Lists . newArrayList ( this . teamService . getAllTeams ( ) ) ; |
public class AWSIotClient { /** * Describes a registered CA certificate .
* @ param describeCACertificateRequest
* The input for the DescribeCACertificate operation .
* @ return Result of the DescribeCACertificate operation returned by the service .
* @ throws InvalidRequestException
* The request is not vali... | request = beforeClientExecution ( request ) ; return executeDescribeCACertificate ( request ) ; |
public class GanttBarStyleFactory14 { /** * { @ inheritDoc } */
@ Override public GanttBarStyle [ ] processDefaultStyles ( Props props ) { } } | GanttBarStyle [ ] barStyles = null ; byte [ ] barStyleData = props . getByteArray ( DEFAULT_PROPERTIES ) ; if ( barStyleData != null && barStyleData . length > 2240 ) { int barStyleCount = MPPUtility . getByte ( barStyleData , 2243 ) ; if ( barStyleCount > 0 && barStyleCount < 65535 ) { barStyles = new GanttBarStyle [ ... |
public class DoubleStream { /** * Lazy evaluation .
* @ param supplier
* @ return */
public static DoubleStream of ( final Supplier < DoubleList > supplier ) { } } | final DoubleIterator iter = new DoubleIteratorEx ( ) { private DoubleIterator iterator = null ; @ Override public boolean hasNext ( ) { if ( iterator == null ) { init ( ) ; } return iterator . hasNext ( ) ; } @ Override public double nextDouble ( ) { if ( iterator == null ) { init ( ) ; } return iterator . nextDouble (... |
public class HttpChannelConfig { /** * Check the input configuration for the timeout to use in between
* persistent requests .
* @ param props */
private void parsePersistTimeout ( Map < Object , Object > props ) { } } | Object value = props . get ( HttpConfigConstants . PROPNAME_PERSIST_TIMEOUT ) ; if ( null != value ) { try { this . persistTimeout = TIMEOUT_MODIFIER * minLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_TIMEOUT ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc... |
public class StringGroovyMethods { /** * Returns a ( possibly empty ) list of all occurrences of a regular expression ( in Pattern format ) found within a CharSequence .
* For example , if the pattern doesn ' t match , it returns an empty list :
* < pre >
* assert [ ] = = " foo " . findAll ( ~ / ( \ w * ) Fish / ... | Matcher matcher = pattern . matcher ( self . toString ( ) ) ; boolean hasGroup = hasGroup ( matcher ) ; List < String > list = new ArrayList < String > ( ) ; for ( Iterator iter = iterator ( matcher ) ; iter . hasNext ( ) ; ) { if ( hasGroup ) { list . add ( ( String ) ( ( List ) iter . next ( ) ) . get ( 0 ) ) ; } els... |
public class StorageDir { /** * Removes a temp block from this storage dir .
* @ param tempBlockMeta the metadata of the temp block to remove
* @ throws BlockDoesNotExistException if no temp block is found */
public void removeTempBlockMeta ( TempBlockMeta tempBlockMeta ) throws BlockDoesNotExistException { } } | Preconditions . checkNotNull ( tempBlockMeta , "tempBlockMeta" ) ; final long blockId = tempBlockMeta . getBlockId ( ) ; final long sessionId = tempBlockMeta . getSessionId ( ) ; TempBlockMeta deletedTempBlockMeta = mBlockIdToTempBlockMap . remove ( blockId ) ; if ( deletedTempBlockMeta == null ) { throw new BlockDoesN... |
public class Invoker { /** * compare parameter with whished parameter class and convert parameter to whished type
* @ param parameter parameter to compare
* @ param trgClass whished type of the parameter
* @ return converted parameter ( to whished type ) or null */
private static Object compareClasses ( Object pa... | Class srcClass = parameter . getClass ( ) ; trgClass = primitiveToWrapperType ( trgClass ) ; try { if ( parameter instanceof ObjectWrap ) parameter = ( ( ObjectWrap ) parameter ) . getEmbededObject ( ) ; // parameter is already ok
if ( srcClass == trgClass ) return parameter ; else if ( instaceOf ( srcClass , trgClass ... |
public class UsableURI { /** * In the case of a puny encoded IDN , this method returns the decoded Unicode version .
* Most of this implementation is copied from { @ link org . apache . commons . httpclient . URI # setURI ( ) } .
* @ return decoded IDN version of URI */
public String toUnicodeHostString ( ) { } } | if ( ! _is_hostname ) { return toString ( ) ; } try { StringBuilder buf = new StringBuilder ( ) ; if ( _scheme != null ) { buf . append ( _scheme ) ; buf . append ( ':' ) ; } if ( _is_net_path ) { buf . append ( "//" ) ; if ( _authority != null ) { // has _ authority
if ( _userinfo != null ) { buf . append ( _userinfo ... |
public class SymmetricDifferenceMatcher { /** * Remove mapping : item to target
* @ param item
* @ param target */
public void unmap ( I item , T target ) { } } | mapSet . removeItem ( item , target ) ; reverseMap . removeItem ( target , item ) ; |
public class BackgroundCache { /** * Gets a cached result for the given key , null if not cached .
* Extends the expiration of the cache entry . */
public Result < V , E > get ( K key ) { } } | CacheEntry entry = map . get ( key ) ; if ( entry == null ) { return null ; } else { return entry . getResult ( ) ; } |
public class JobManagerRunner { @ Override public void grantLeadership ( final UUID leaderSessionID ) { } } | synchronized ( lock ) { if ( shutdown ) { log . info ( "JobManagerRunner already shutdown." ) ; return ; } leadershipOperation = leadershipOperation . thenCompose ( ( ignored ) -> { synchronized ( lock ) { return verifyJobSchedulingStatusAndStartJobManager ( leaderSessionID ) ; } |
public class KieRuntimeFactory { /** * Returns a singleton instance of the given class ( if any )
* @ throws NoSuchElementException if it is not possible to find a service for the given class */
@ SuppressWarnings ( "unchecked" ) public < T > T get ( Class < T > cls ) { } } | T runtimeInstance = ( T ) runtimeServices . computeIfAbsent ( cls , this :: createRuntimeInstance ) ; if ( runtimeInstance == null ) { throw new NoSuchElementException ( cls . getName ( ) ) ; } else { return runtimeInstance ; } |
public class MathObservable { /** * Returns an Observable that emits the single numerically minimum item emitted by the source Observable .
* If there is more than one such item , it returns the last - emitted one .
* < img width = " 640 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images ... | return OperatorMinMax . min ( source ) ; |
public class AbstractWSingleSelectList { /** * { @ inheritDoc } */
@ Override public Object getRequestValue ( final Request request ) { } } | if ( isPresent ( request ) ) { return getNewSelection ( request ) ; } else { return getValue ( ) ; } |
public class SegmentedJournal { /** * Resets journal readers to the given head .
* @ param index The index at which to reset readers . */
void resetHead ( long index ) { } } | for ( SegmentedJournalReader reader : readers ) { if ( reader . getNextIndex ( ) < index ) { reader . reset ( index ) ; } } |
public class SourceFile { /** * Gets the source line for the indicated line number .
* @ param lineNumber the line number , 1 being the first line of the file .
* @ return The line indicated . Does not include the newline at the end
* of the file . Returns { @ code null } if it does not exist ,
* or if there wa... | findLineOffsets ( ) ; if ( lineNumber > lineOffsets . length ) { return null ; } if ( lineNumber < 1 ) { lineNumber = 1 ; } int pos = lineOffsets [ lineNumber - 1 ] ; String js = "" ; try { // NOTE ( nicksantos ) : Right now , this is optimized for few warnings .
// This is probably the right trade - off , but will be ... |
public class DropWizardMetrics { /** * Returns a { @ code Metric } collected from { @ link Counter } .
* @ param dropwizardMetric the metric name .
* @ param counter the counter object to collect .
* @ return a { @ code Metric } . */
private Metric collectCounter ( MetricName dropwizardMetric , Counter counter ) ... | String metricName = DropWizardUtils . generateFullMetricName ( dropwizardMetric . getKey ( ) , "counter" ) ; String metricDescription = DropWizardUtils . generateFullMetricDescription ( dropwizardMetric . getKey ( ) , counter ) ; AbstractMap . SimpleImmutableEntry < List < LabelKey > , List < LabelValue > > labels = Dr... |
public class WebUtils { /** * Removes any GrailsWebRequest instance from the current request . */
public static void clearGrailsWebRequest ( ) { } } | RequestAttributes reqAttrs = RequestContextHolder . getRequestAttributes ( ) ; if ( reqAttrs != null ) { // First remove the web request from the HTTP request attributes .
GrailsWebRequest webRequest = ( GrailsWebRequest ) reqAttrs ; webRequest . getRequest ( ) . removeAttribute ( GrailsApplicationAttributes . WEB_REQU... |
public class MinioClient { /** * Lists object information as { @ code Iterable < Result > < Item > } in given bucket , prefix , recursive flag and S3 API
* version to use .
* < / p > < b > Example : < / b > < br >
* < pre > { @ code Iterable < Result < Item > > myObjects = minioClient . listObjects ( " my - bucke... | if ( useVersion1 ) { return listObjectsV1 ( bucketName , prefix , recursive ) ; } return listObjectsV2 ( bucketName , prefix , recursive ) ; |
public class Repository { public References resolve ( Request request ) throws IOException , CyclicDependency { } } | List < Module > includes ; List < Module > excludes ; References references ; List < Module > moduleList ; Node resolved ; boolean minimize ; boolean declarationOnly ; includes = new ArrayList < > ( ) ; excludes = new ArrayList < > ( ) ; for ( String name : Module . SEP . split ( request . modules ) ) { if ( name . len... |
public class MobileCommand { /** * This method forms a { @ link java . util . Map } of parameters for the
* long key event invocation .
* @ param key code for the long key pressed on the Android device .
* @ param metastate metastate for the long key press .
* @ return a key - value pair . The key is the comman... | String [ ] parameters = new String [ ] { "keycode" , "metastate" } ; Object [ ] values = new Object [ ] { key , metastate } ; return new AbstractMap . SimpleEntry < > ( LONG_PRESS_KEY_CODE , prepareArguments ( parameters , values ) ) ; |
public class TSDB { /** * Adds a double precision floating - point value data point in the TSDB .
* WARNING : The tags map may be modified by this method without a lock . Give
* the method a copy if you plan to use it elsewhere .
* @ param metric A non - empty string .
* @ param timestamp The timestamp associat... | if ( Double . isNaN ( value ) || Double . isInfinite ( value ) ) { throw new IllegalArgumentException ( "value is NaN or Infinite: " + value + " for metric=" + metric + " timestamp=" + timestamp ) ; } final short flags = Const . FLAG_FLOAT | 0x7 ; // A float stored on 8 bytes .
return addPointInternal ( metric , timest... |
public class CClassLoader { /** * get the resource with the given name
* @ param name
* name of the resource to get
* @ return the resource with the given name */
private final List getPrivateResource ( final String name ) { } } | try { final Object to = this . resourcesMap . get ( name ) ; final List list = new ArrayList ( ) ; if ( to instanceof URL ) { list . add ( ( URL ) to ) ; return list ; } else if ( to instanceof List ) { final List l = ( List ) to ; for ( int i = 0 ; i < l . size ( ) ; i ++ ) { list . add ( ( URL ) l . get ( i ) ) ; } r... |
public class CmsAreaSelectPanel { /** * Setting a new left / top value for the selection . < p >
* @ param secondX the cursor X offset to the selection area */
private void positionX ( int secondX ) { } } | if ( secondX < m_firstX ) { setSelectPositionX ( secondX , m_firstX - secondX ) ; } else { setSelectWidth ( secondX - m_firstX ) ; } |
public class UpdateUserPoolRequest { /** * The attributes that are automatically verified when the Amazon Cognito service makes a request to update user
* pools .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setAutoVerifiedAttributes ( java . util . Coll... | if ( this . autoVerifiedAttributes == null ) { setAutoVerifiedAttributes ( new java . util . ArrayList < String > ( autoVerifiedAttributes . length ) ) ; } for ( String ele : autoVerifiedAttributes ) { this . autoVerifiedAttributes . add ( ele ) ; } return this ; |
public class AndroidStubServer { /** * Starts local HTTP server .
* @ param configReader reader that provides access to responses configuration , responses and static files
* @ param networkType network type to be simulated by adding extra delays . */
public static HttpMockServer start ( ConfigReader configReader ,... | return HttpMockServer . startMockApiServer ( configReader , networkType ) ; |
public class PaymentChannelClient { /** * < p > Called to indicate the connection has been opened and messages can now be generated for the server . < / p >
* < p > Attempts to find a channel to resume and generates a CLIENT _ VERSION message for the server based on the
* result . < / p > */
@ Override public void ... | lock . lock ( ) ; try { connectionOpen = true ; StoredPaymentChannelClientStates channels = ( StoredPaymentChannelClientStates ) wallet . getExtensions ( ) . get ( StoredPaymentChannelClientStates . EXTENSION_ID ) ; if ( channels != null ) storedChannel = channels . getUsableChannelForServerID ( serverId ) ; step = Ini... |
public class AmazonAppStreamClient { /** * Deletes the specified image builder and releases the capacity .
* @ param deleteImageBuilderRequest
* @ return Result of the DeleteImageBuilder operation returned by the service .
* @ throws ResourceNotFoundException
* The specified resource was not found .
* @ throw... | request = beforeClientExecution ( request ) ; return executeDeleteImageBuilder ( request ) ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcDuctSilencerType ( ) { } } | if ( ifcDuctSilencerTypeEClass == null ) { ifcDuctSilencerTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 205 ) ; } return ifcDuctSilencerTypeEClass ; |
public class SecureCredentialsManager { /** * Saves the given credentials in the Storage .
* @ param credentials the credentials to save .
* @ throws CredentialsManagerException if the credentials couldn ' t be encrypted . Some devices are not compatible at all with the cryptographic
* implementation and will hav... | if ( ( isEmpty ( credentials . getAccessToken ( ) ) && isEmpty ( credentials . getIdToken ( ) ) ) || credentials . getExpiresAt ( ) == null ) { throw new CredentialsManagerException ( "Credentials must have a valid date of expiration and a valid access_token or id_token value." ) ; } String json = gson . toJson ( crede... |
public class MLLibUtil { /** * Convert an rdd of data set in to labeled point
* @ param sc the spark context to use
* @ param data the dataset to convert
* @ return an rdd of labeled point
* @ deprecated Use { @ link # fromDataSet ( JavaRDD ) } */
@ Deprecated public static JavaRDD < LabeledPoint > fromDataSet ... | return data . map ( new Function < DataSet , LabeledPoint > ( ) { @ Override public LabeledPoint call ( DataSet pt ) { return toLabeledPoint ( pt ) ; } } ) ; |
public class ShakeAroundAPI { /** * 设备管理 - 申请设备ID
* @ param accessToken accessToken
* @ param deviceApplyId deviceApplyId
* @ return result */
public static DeviceApplyIdResult deviceApplyId ( String accessToken , DeviceApplyId deviceApplyId ) { } } | return deviceApplyId ( accessToken , JsonUtil . toJSONString ( deviceApplyId ) ) ; |
public class TransactionalRuleVisitor { /** * Executes a { @ link TransactionalSupplier } within a transaction .
* @ param txSupplier
* The { @ link TransactionalSupplier } .
* @ param < T >
* The return type of the { @ link TransactionalSupplier } .
* @ return The value provided by the { @ link Transactional... | try { store . beginTransaction ( ) ; T result = txSupplier . execute ( ) ; store . commitTransaction ( ) ; return result ; } catch ( RuleException e ) { throw e ; } catch ( RuntimeException e ) { throw new RuleException ( "Caught unexpected exception from store." , e ) ; } finally { if ( store . hasActiveTransaction ( ... |
public class Workspace { /** * Deserialize a Atom workspace XML element into an object */
protected void parseWorkspaceElement ( final Element element ) throws ProponoException { } } | final Element titleElem = element . getChild ( "title" , AtomService . ATOM_FORMAT ) ; setTitle ( titleElem . getText ( ) ) ; if ( titleElem . getAttribute ( "type" , AtomService . ATOM_FORMAT ) != null ) { setTitleType ( titleElem . getAttribute ( "type" , AtomService . ATOM_FORMAT ) . getValue ( ) ) ; } final List < ... |
public class ConsonantUtil { /** * * * * * * BEGINNING OF FUNCTION * * * * * */
/ * / public static boolean is_Tavargadi ( String str ) { } } | String s1 = VarnaUtil . getAdiVarna ( str ) ; if ( is_Tavarga ( s1 ) ) return true ; return false ; |
public class LibLoader { /** * Loads a native library . Uses { @ link LoadPolicy # PREFER _ SHIPPED } as the default loading policy .
* @ param clazz
* The class whose classloader should be used to resolve shipped libraries
* @ param name
* The name of the class . */
public void loadLibrary ( Class < ? > clazz ... | loadLibrary ( clazz , name , LoadPolicy . PREFER_SHIPPED ) ; |
public class MercatorProjection { /** * Calculates the distance on the ground that is represented by a single pixel on the map .
* @ param latitude the latitude coordinate at which the resolution should be calculated .
* @ param scaleFactor the scale at which the resolution should be calculated .
* @ return the g... | long mapSize = getMapSizeWithScaleFactor ( scaleFactor , tileSize ) ; return Math . cos ( latitude * ( Math . PI / 180 ) ) * EARTH_CIRCUMFERENCE / mapSize ; |
public class NoxItemCatalog { /** * Starts the resource download given a NoxItem instance and a given position . */
private void loadNoxItem ( final int position , NoxItem noxItem , boolean useCircularTransformation ) { } } | imageLoader . load ( noxItem . getUrl ( ) ) . load ( noxItem . getResourceId ( ) ) . withPlaceholder ( noxItem . getPlaceholderId ( ) ) . size ( noxItemSize ) . useCircularTransformation ( useCircularTransformation ) . notify ( getImageLoaderListener ( position ) ) ; |
public class WeldStartup { /** * Right now , only session and conversation scoped beans ( except for built - in beans ) are taken into account .
* @ return the set of beans the index should be built from */
private Set < Bean < ? > > getBeansForBeanIdentifierIndex ( ) { } } | Set < Bean < ? > > beans = new HashSet < Bean < ? > > ( ) ; for ( BeanDeployment beanDeployment : getBeanDeployments ( ) ) { for ( Bean < ? > bean : beanDeployment . getBeanManager ( ) . getBeans ( ) ) { if ( ! ( bean instanceof AbstractBuiltInBean < ? > ) && ( bean . getScope ( ) . equals ( SessionScoped . class ) || ... |
public class ModelResourceStructure { /** * find history as of timestamp
* @ param id model id
* @ param asOf Timestamp
* @ return history model
* @ throws java . lang . Exception any error */
public Response fetchHistoryAsOf ( @ PathParam ( "id" ) URI_ID id , @ PathParam ( "asof" ) final Timestamp asOf ) throw... | final MODEL_ID mId = tryConvertId ( id ) ; matchedFetchHistoryAsOf ( mId , asOf ) ; final Query < MODEL > query = server . find ( modelType ) ; defaultFindOrderBy ( query ) ; Object entity = executeTx ( t -> { configDefaultQuery ( query ) ; configFetchHistoryAsOfQuery ( query , mId , asOf ) ; applyUriQuery ( query , fa... |
public class Gen { /** * Convert string buffer on tos to string . */
void bufferToString ( DiagnosticPosition pos ) { } } | callMethod ( pos , stringBufferType , names . toString , List . < Type > nil ( ) , false ) ; |
public class CmsUgcSession { /** * Creates a new resource from upload data . < p >
* @ param fieldName the name of the form field for the upload
* @ param rawFileName the file name
* @ param content the file content
* @ return the newly created resource
* @ throws CmsUgcException if creating the resource fail... | CmsResource result = null ; CmsUgcSessionSecurityUtil . checkCreateUpload ( m_cms , m_configuration , rawFileName , content . length ) ; String baseName = rawFileName ; // if the given name is a path , make sure we only get the last segment
int lastSlashPos = Math . max ( baseName . lastIndexOf ( '/' ) , baseName . las... |
public class GPixelMath { /** * Bounds image pixels to be between these two values .
* @ param input Input image .
* @ param min minimum value . Inclusive .
* @ param max maximum value . Inclusive . */
public static < T extends ImageBase < T > > void boundImage ( T input , double min , double max ) { } } | if ( input instanceof ImageGray ) { if ( GrayU8 . class == input . getClass ( ) ) { PixelMath . boundImage ( ( GrayU8 ) input , ( int ) min , ( int ) max ) ; } else if ( GrayS8 . class == input . getClass ( ) ) { PixelMath . boundImage ( ( GrayS8 ) input , ( int ) min , ( int ) max ) ; } else if ( GrayU16 . class == in... |
public class FlashMessagesMethodArgumentResolver { /** * ( non - Javadoc )
* @ see
* org . springframework . web . method . support . HandlerMethodArgumentResolver # resolveArgument ( org . springframework . core
* . MethodParameter , org . springframework . web . method . support . ModelAndViewContainer ,
* or... | LOGGER . trace ( "Accesing to the messages publisher from the request: {}" , webRequest ) ; return this . context . publisher ( nativeRequest ( webRequest ) ) ; |
public class MoreCollectors { /** * A Collector into an { @ link ImmutableSet } . */
public static < T > Collector < T , Set < T > , Set < T > > toSet ( ) { } } | return Collector . of ( HashSet :: new , Set :: add , ( left , right ) -> { left . addAll ( right ) ; return left ; } , ImmutableSet :: copyOf ) ; |
public class QueryHandler { /** * Parses the query raw results from the content stream as long as there is data to be found . */
private void parseQueryRowsRaw ( boolean lastChunk ) { } } | while ( responseContent . isReadable ( ) ) { int splitPos = findSplitPosition ( responseContent , ',' ) ; int arrayEndPos = findSplitPosition ( responseContent , ']' ) ; boolean doSectionDone = false ; if ( splitPos == - 1 && arrayEndPos == - 1 ) { // need more data
break ; } else if ( arrayEndPos > 0 && ( arrayEndPos ... |
public class Json { /** * Converts MPS resources to Json string .
* @ param resources nitro resources .
* @ param option options class object .
* @ return returns a String */
public String resource_to_string ( base_resource resources [ ] , options option , String onerror ) { } } | String objecttype = resources [ 0 ] . get_object_type ( ) ; String request = "{" ; if ( ( option != null && option . get_action ( ) != null ) || ( ! onerror . equals ( "" ) ) ) { request = request + "\"params\":{" ; if ( option != null ) { if ( option . get_action ( ) != null ) { request = request + "\"action\":\"" + o... |
public class HashSparseVector { /** * v + sv
* @ param sv */
public void plus ( ISparseVector sv ) { } } | if ( sv instanceof HashSparseVector ) { TIntFloatIterator it = ( ( HashSparseVector ) sv ) . data . iterator ( ) ; while ( it . hasNext ( ) ) { it . advance ( ) ; data . adjustOrPutValue ( it . key ( ) , it . value ( ) , it . value ( ) ) ; } } else if ( sv instanceof BinarySparseVector ) { TIntIterator it = ( ( BinaryS... |
public class ScanningQueryEngine { /** * Create a node sequence for the given index
* @ param originalQuery the original query command ; may not be null
* @ param context the context in which the query is to be executed ; may not be null
* @ param sourceNode the { @ link Type # SOURCE } plan node for one part of ... | if ( index . getProviderName ( ) == null ) { String name = index . getName ( ) ; String pathStr = ( String ) index . getParameters ( ) . get ( IndexPlanners . PATH_PARAMETER ) ; if ( pathStr != null ) { if ( IndexPlanners . NODE_BY_PATH_INDEX_NAME . equals ( name ) ) { PathFactory paths = context . getExecutionContext ... |
public class AnnotationUtility { /** * Extract string .
* @ param elementUtils the element utils
* @ param item the item
* @ param annotationClass the annotation class
* @ param attribute the attribute
* @ param listener the listener */
static void extractString ( Elements elementUtils , Element item , Class ... | extractAttributeValue ( elementUtils , item , annotationClass . getCanonicalName ( ) , attribute , listener ) ; |
public class StringUtils { /** * Pad the specified < tt > String < / tt > with spaces on the right - hand side .
* @ param s String to add spaces
* @ param length Desired length of string after padding
* @ return padded string . */
public static String pad ( String s , int length ) { } } | // Trim if longer . . .
if ( s . length ( ) > length ) { return s . substring ( 0 , length ) ; } StringBuffer buffer = new StringBuffer ( s ) ; int spaces = length - s . length ( ) ; while ( spaces -- > 0 ) { buffer . append ( ' ' ) ; } return buffer . toString ( ) ; |
public class JmxMessage { /** * Adds operation parameter with custom parameter type .
* @ param arg
* @ param argType
* @ return */
public JmxMessage parameter ( Object arg , Class < ? > argType ) { } } | if ( mbeanInvocation == null ) { throw new CitrusRuntimeException ( "Invalid access to operation parameter for JMX message" ) ; } if ( mbeanInvocation . getOperation ( ) == null ) { throw new CitrusRuntimeException ( "Invalid access to operation parameter before operation was set for JMX message" ) ; } if ( mbeanInvoca... |
public class PTBTokenizer { /** * Constructs a new PTBTokenizer that optionally returns newlines
* as their own token . NLs come back as Words whose text is
* the value of < code > PTBLexer . NEWLINE _ TOKEN < / code > .
* @ param r The Reader to read tokens from
* @ param tokenizeNLs Whether to return newlines... | return new PTBTokenizer < Word > ( r , tokenizeNLs , false , false , new WordTokenFactory ( ) ) ; |
public class DescribeClientVpnEndpointsRequest { /** * The ID of the Client VPN endpoint .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setClientVpnEndpointIds ( java . util . Collection ) } or { @ link # withClientVpnEndpointIds ( java . util . Collection... | if ( this . clientVpnEndpointIds == null ) { setClientVpnEndpointIds ( new com . amazonaws . internal . SdkInternalList < String > ( clientVpnEndpointIds . length ) ) ; } for ( String ele : clientVpnEndpointIds ) { this . clientVpnEndpointIds . add ( ele ) ; } return this ; |
public class PartitionLevelWatermarker { /** * Initializes the expected high watermarks for a { @ link Table }
* { @ inheritDoc }
* @ see org . apache . gobblin . data . management . conversion . hive . watermarker . HiveSourceWatermarker # onTableProcessBegin ( org . apache . hadoop . hive . ql . metadata . Table ... | Preconditions . checkNotNull ( table ) ; if ( ! this . expectedHighWatermarks . hasPartitionWatermarks ( tableKey ( table ) ) ) { this . expectedHighWatermarks . setPartitionWatermarks ( tableKey ( table ) , Maps . < String , Long > newHashMap ( ) ) ; } |
public class HashIntSet { /** * { @ inheritDoc } */
@ Override public int first ( ) { } } | if ( isEmpty ( ) ) { throw new NoSuchElementException ( ) ; } int min = Integer . MAX_VALUE ; for ( int element : cells ) { if ( element >= 0 && min > element ) { min = element ; } } return min ; |
public class Metric { /** * Calculates the squared Euclidean length of a point divided by a scalar .
* @ param pointA
* point
* @ param dA
* scalar
* @ return the squared Euclidean length */
public static double distanceWithDivisionSquared ( double [ ] pointA , double dA ) { } } | double distance = 0.0 ; for ( int i = 0 ; i < pointA . length ; i ++ ) { double d = pointA [ i ] / dA ; distance += d * d ; } return distance ; |
public class XButtonBox { /** * Display this field in html input format . */
public boolean printData ( PrintWriter out , int iPrintOptions ) { } } | String strFieldName = this . getScreenField ( ) . getSFieldParam ( ) ; String strButtonDesc = ( ( SButtonBox ) this . getScreenField ( ) ) . getButtonDesc ( ) ; if ( ( strButtonDesc == null ) && ( ( ( SButtonBox ) this . getScreenField ( ) ) . getImageButtonName ( ) != null ) ) { if ( this . getScreenField ( ) . getPar... |
public class EntityPropertyClassNameResolver { /** * エンティティプロパティのクラス名を解決します 。
* @ param entityDesc エンティティ記述
* @ param propertyName エンティティプロパティ名
* @ param defaultPropertyClassName エンティティプロパティのデフォルトのクラス名
* @ return エンティティプロパティのクラス名 */
public String resolve ( EntityDesc entityDesc , String propertyName , ... | String qualifiedPropertyName = entityDesc . getQualifiedName ( ) + "@" + propertyName ; for ( Map . Entry < Pattern , String > entry : patternMap . entrySet ( ) ) { Pattern pattern = entry . getKey ( ) ; String input = pattern . pattern ( ) . contains ( "@" ) ? qualifiedPropertyName : propertyName ; Matcher matcher = p... |
public class AWSDatabaseMigrationServiceClient { /** * Deletes a subnet group .
* @ param deleteReplicationSubnetGroupRequest
* @ return Result of the DeleteReplicationSubnetGroup operation returned by the service .
* @ throws InvalidResourceStateException
* The resource is in a state that prevents it from bein... | request = beforeClientExecution ( request ) ; return executeDeleteReplicationSubnetGroup ( request ) ; |
public class ToTextStream { /** * Normalize the characters , but don ' t escape . Different from
* SerializerToXML # writeNormalizedChars because it does not attempt to do
* XML escaping at all .
* @ param ch The characters from the XML document .
* @ param start The start position in the array .
* @ param le... | final String encoding = getEncoding ( ) ; final java . io . Writer writer = m_writer ; final int end = start + length ; /* copy a few " constants " before the loop for performance */
final char S_LINEFEED = CharInfo . S_LINEFEED ; // This for ( ) loop always increments i by one at the end
// of the loop . Additional in... |
public class AbstractConverter { /** * Learn whether a { @ link Convert } operation ' s source value is ( already ) an instance of its target type ,
* @ param convert
* @ return boolean */
protected final boolean isNoop ( Convert < ? , ? > convert ) { } } | Type sourceType = convert . getSourcePosition ( ) . getType ( ) ; if ( ParameterizedType . class . isInstance ( sourceType ) && convert . getSourcePosition ( ) . getValue ( ) != null ) { sourceType = Types . narrowestParameterizedType ( convert . getSourcePosition ( ) . getValue ( ) . getClass ( ) , ( ParameterizedType... |
public class GsonFactory { /** * Registers type adapters by implicit type . Adds one to read numbers in a { @ code Map < String ,
* Object > } as Integers . */
static Gson create ( Iterable < TypeAdapter < ? > > adapters ) { } } | GsonBuilder builder = new GsonBuilder ( ) . setPrettyPrinting ( ) ; builder . registerTypeAdapter ( new TypeToken < Map < String , Object > > ( ) { } . getType ( ) , new DoubleToIntMapTypeAdapter ( ) ) ; for ( TypeAdapter < ? > adapter : adapters ) { Type type = resolveLastTypeParameter ( adapter . getClass ( ) , TypeA... |
public class SimpleViewGenerator { /** * Generates views based on annotations found in a persistent class .
* Typically @ DocumentReferences annotations .
* @ param persistentType
* @ return a Map with generated views . */
public Map < String , DesignDocument . View > generateViewsFromPersistentType ( final Class... | Assert . notNull ( persistentType , "persistentType may not be null" ) ; final Map < String , DesignDocument . View > views = new HashMap < String , DesignDocument . View > ( ) ; createDeclaredViews ( views , persistentType ) ; eachField ( persistentType , new Predicate < Field > ( ) { public boolean apply ( Field inpu... |
public class SubscriptionIndex { /** * Get number of non - durable subscriptions .
* @ return number of non - durable subscriptions . */
public synchronized int getNonDurableSubscriptions ( ) { } } | if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getNonDurableSubscriptions" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getNonDurableSubscriptions" , new Integer ( nonDurableSubscriptions ) ) ; return nonDurableSubscriptions ; |
public class BpmnParse { /** * Adds the new message job declaration to existing declarations .
* There will be executed an existing check before the adding is executed .
* @ param messageJobDeclaration the new message job declaration
* @ param activity the corresponding activity
* @ param exclusive the flag whi... | ProcessDefinition procDef = ( ProcessDefinition ) activity . getProcessDefinition ( ) ; if ( ! exists ( messageJobDeclaration , procDef . getKey ( ) , activity . getActivityId ( ) ) ) { messageJobDeclaration . setExclusive ( exclusive ) ; messageJobDeclaration . setActivity ( activity ) ; messageJobDeclaration . setJob... |
public class BytecodeUtils { /** * Returns an { @ link Expression } that evaluates to the given Dir , or null . */
public static Expression constant ( @ Nullable Dir dir ) { } } | return ( dir == null ) ? BytecodeUtils . constantNull ( DIR_TYPE ) : FieldRef . enumReference ( dir ) . accessor ( ) ; |
public class PackageIndexWriter { /** * Generate the package index page for the right - hand frame .
* @ param configuration the current configuration of the doclet . */
public static void generate ( ConfigurationImpl configuration ) { } } | PackageIndexWriter packgen ; DocPath filename = DocPaths . OVERVIEW_SUMMARY ; try { packgen = new PackageIndexWriter ( configuration , filename ) ; packgen . buildPackageIndexFile ( "doclet.Window_Overview_Summary" , true ) ; packgen . close ( ) ; } catch ( IOException exc ) { configuration . standardmessage . error ( ... |
public class LastaAction { /** * Do redirect the action with the more URL parts and the the parameters on GET . < br >
* This method is to other redirect methods so normally you don ' t use directly from your action .
* @ param actionType The class type of action that it redirects to . ( NotNull )
* @ param chain... | assertArgumentNotNull ( "actionType" , actionType ) ; assertArgumentNotNull ( "chain" , chain ) ; return newHtmlResponseAsRedirect ( toActionUrl ( actionType , chain ) ) ; |
public class Indentation { /** * Returns an indentation of < code > level < / code > tabs , increasing or decreasing
* by one tab at a time .
* @ param level The number of tabs for this indentation .
* @ return The indentation of < code > level < / code > tabs . */
public static Indentation tabs ( final int level... | return level < TABS . length ? TABS [ level > 0 ? level : 0 ] : new Indentation ( 1 , '\t' , level ) ; |
public class UpdateManager { /** * Remove a repository by id .
* @ param id of repository to remove */
public void removeRepository ( String id ) { } } | for ( UpdateRepository repo : getRepositories ( ) ) { if ( id . equals ( repo . getId ( ) ) ) { repositories . remove ( repo ) ; break ; } } log . warn ( "Repository with id " + id + " not found, doing nothing" ) ; |
public class ChatLinearLayoutManager { /** * Sets the orientation of the layout . { @ link ChatLinearLayoutManager }
* will do its best to keep scroll position .
* @ param orientation { @ link # HORIZONTAL } or { @ link # VERTICAL } */
public void setOrientation ( int orientation ) { } } | if ( orientation != HORIZONTAL && orientation != VERTICAL ) { throw new IllegalArgumentException ( "invalid orientation:" + orientation ) ; } assertNotInLayoutOrScroll ( null ) ; if ( orientation == mOrientation ) { return ; } mOrientation = orientation ; mOrientationHelper = null ; requestLayout ( ) ; |
public class DateConverter { /** * Converts the string to a date , using the given format for parsing .
* @ param pString the string to convert .
* @ param pType the type to convert to . { @ code java . util . Date } and
* subclasses allowed .
* @ param pFormat the format used for parsing . Must be a legal
* ... | if ( StringUtil . isEmpty ( pString ) ) return null ; try { DateFormat format ; if ( pFormat == null ) { // Use system default format , using default locale
format = DateFormat . getDateTimeInstance ( ) ; } else { // Get format from cache
format = getDateFormat ( pFormat ) ; } Date date = StringUtil . toDate ( pString ... |
public class SubstructureIdentifier { /** * Get the String form of this identifier .
* This provides the canonical form for a StructureIdentifier and has
* all the information needed to recreate a particular substructure .
* Example : 3iek . A _ 17-28 , A _ 56-294
* @ return The String form of this identifier *... | if ( ranges . isEmpty ( ) ) return pdbId ; return pdbId + "." + ResidueRange . toString ( ranges ) ; |
public class SequenceAlgorithms { /** * Returns the longest common subsequence between the two list of nodes . This version use
* type and label to ensure equality .
* @ see ITree # hasSameTypeAndLabel ( ITree )
* @ return a list of size 2 int arrays that corresponds
* to match of index in sequence 1 to index i... | int [ ] [ ] lengths = new int [ s0 . size ( ) + 1 ] [ s1 . size ( ) + 1 ] ; for ( int i = 0 ; i < s0 . size ( ) ; i ++ ) for ( int j = 0 ; j < s1 . size ( ) ; j ++ ) if ( s0 . get ( i ) . hasSameTypeAndLabel ( s1 . get ( j ) ) ) lengths [ i + 1 ] [ j + 1 ] = lengths [ i ] [ j ] + 1 ; else lengths [ i + 1 ] [ j + 1 ] = ... |
public class EventloopStats { /** * region updating */
@ Override public void onUpdateBusinessLogicTime ( boolean taskOrKeyPresent , boolean externalTaskPresent , long businessLogicTime ) { } } | loops . recordEvent ( ) ; if ( taskOrKeyPresent ) { this . businessLogicTime . recordValue ( ( int ) businessLogicTime ) ; } else { if ( ! externalTaskPresent ) { idleLoops . recordEvent ( ) ; } else { idleLoopsWaitingExternalTask . recordEvent ( ) ; } } if ( next != null ) { next . onUpdateBusinessLogicTime ( taskOrKe... |
public class br_broker_snmpmanager { /** * < pre >
* Performs generic data validation for the operation to be performed
* < / pre > */
protected void validate ( String operationType ) throws Exception { } } | super . validate ( operationType ) ; MPSString manager_ip_validator = new MPSString ( ) ; manager_ip_validator . setConstraintIsReq ( MPSConstants . GENERIC_CONSTRAINT , true ) ; manager_ip_validator . setConstraintMaxStrLen ( MPSConstants . GENERIC_CONSTRAINT , 128 ) ; manager_ip_validator . setConstraintMinStrLen ( M... |
public class SystemPropertiesUtil { /** * Properties 本质上是一个HashTable , 每次读写都会加锁 , 所以不支持频繁的System . getProperty ( name ) 来检查系统内容变化 因此扩展了一个ListenableProperties ,
* 在其所关心的属性变化时进行通知 .
* @ see ListenableProperties */
public static synchronized void registerSystemPropertiesListener ( PropertiesListener listener ) { } } | Properties currentProperties = System . getProperties ( ) ; // 将System的properties实现替换为ListenableProperties
if ( ! ( currentProperties instanceof ListenableProperties ) ) { ListenableProperties newProperties = new ListenableProperties ( currentProperties ) ; System . setProperties ( newProperties ) ; currentProperties =... |
public class LocalizationPlugin { /** * If you ' d like to manually set the camera position to a specific map region or country , pass in
* the locale ( which must have a paired } { @ link MapLocale } ) to work properly
* @ param locale a { @ link Locale } which has a complementary { @ link MapLocale } for it
* @... | MapLocale mapLocale = MapLocale . getMapLocale ( locale , false ) ; if ( mapLocale != null ) { setCameraToLocaleCountry ( mapLocale , padding ) ; } else { Timber . e ( "Couldn't match Locale %s to a MapLocale" , locale . getDisplayName ( ) ) ; } |
public class BatchEventProcessor { /** * Notifies the EventHandler immediately prior to this processor shutting down */
private void notifyShutdown ( ) { } } | if ( eventHandler instanceof LifecycleAware ) { try { ( ( LifecycleAware ) eventHandler ) . onShutdown ( ) ; } catch ( final Throwable ex ) { exceptionHandler . handleOnShutdownException ( ex ) ; } } |
public class DatePanel { /** * Add month count to month field
* @ param i month to add */
private void addMonth ( int i ) { } } | Calendar cal = Calendar . getInstance ( ) ; cal . set ( getDisplayYear ( ) , getDisplayMonth ( ) - 1 , 1 ) ; int month = cal . get ( Calendar . MONTH ) + 1 ; if ( i > 0 && month == 12 ) { addYear ( 1 ) ; } if ( i < 0 && month == 1 ) { addYear ( - 1 ) ; } cal . add ( Calendar . MONTH , i ) ; monthTextField . setText ( S... |
public class ConsumerDispatcherState { /** * Remove a topic from the array of topics
* @ param topic The topic to remove */
public void removeTopic ( String topic ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeTopic" , topic ) ; SelectionCriteria [ ] tmp = selectionCriteriaList ; // Loop through the selectionCriteriaList
for ( int i = 0 ; i < selectionCriteriaList . length ; ++ i ) { if ( ( selectionCriteriaList [ i ... |
public class AbstractLRParser { /** * This method does the actual parsing .
* @ return The result AST is returned .
* @ throws ParserException */
private final ParseTreeNode parse ( ) throws ParserException { } } | try { createActionStack ( ) ; return LRTokenStreamConverter . convert ( getTokenStream ( ) , getGrammar ( ) , actionStack ) ; } catch ( GrammarException e ) { logger . error ( e . getMessage ( ) , e ) ; throw new ParserException ( e . getMessage ( ) ) ; } |
public class Curve25519 { /** * / * Copy a number */
private static final void cpy ( long10 out , long10 in ) { } } | out . _0 = in . _0 ; out . _1 = in . _1 ; out . _2 = in . _2 ; out . _3 = in . _3 ; out . _4 = in . _4 ; out . _5 = in . _5 ; out . _6 = in . _6 ; out . _7 = in . _7 ; out . _8 = in . _8 ; out . _9 = in . _9 ; |
public class HtmlTree { /** * Generates a SECTION tag with role attribute and some content .
* @ param body content of the section tag
* @ return an HtmlTree object for the SECTION tag */
public static HtmlTree SECTION ( Content body ) { } } | HtmlTree htmltree = new HtmlTree ( HtmlTag . SECTION , nullCheck ( body ) ) ; htmltree . setRole ( Role . REGION ) ; return htmltree ; |
public class HiveConverterUtils { /** * Fills data from input table into output table .
* @ param inputTblName input hive table name
* @ param outputTblName output hive table name
* @ param inputDbName input hive database name
* @ param outputDbName output hive database name
* @ param optionalPartitionDMLInfo... | Preconditions . checkArgument ( StringUtils . isNotBlank ( inputTblName ) ) ; Preconditions . checkArgument ( StringUtils . isNotBlank ( outputTblName ) ) ; Preconditions . checkArgument ( StringUtils . isNotBlank ( inputDbName ) ) ; Preconditions . checkArgument ( StringUtils . isNotBlank ( outputDbName ) ) ; StringBu... |
public class ClassDescriptor { /** * Returns array of read / write FieldDescriptors . */
public FieldDescriptor [ ] getAllRwFields ( ) { } } | if ( m_RwFieldDescriptors == null ) { FieldDescriptor [ ] fields = getFieldDescriptions ( ) ; Collection rwFields = new ArrayList ( ) ; for ( int i = 0 ; i < fields . length ; i ++ ) { FieldDescriptor fd = fields [ i ] ; /* arminw : if locking is enabled and the increment of locking
values is done by the database , t... |
public class ColorSpecificationImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public boolean eIsSet ( int featureID ) { } } | switch ( featureID ) { case AfplibPackage . COLOR_SPECIFICATION__COL_SPCE : return COL_SPCE_EDEFAULT == null ? colSpce != null : ! COL_SPCE_EDEFAULT . equals ( colSpce ) ; case AfplibPackage . COLOR_SPECIFICATION__COL_SIZE1 : return COL_SIZE1_EDEFAULT == null ? colSize1 != null : ! COL_SIZE1_EDEFAULT . equals ( colSize... |
public class Inspector { /** * Get info about usual Java instance and class Methods as well as Constructors .
* @ return Array of StringArrays that can be indexed with the MEMBER _ xxx _ IDX constants */
public Object [ ] getMethods ( ) { } } | Method [ ] methods = getClassUnderInspection ( ) . getMethods ( ) ; Constructor [ ] ctors = getClassUnderInspection ( ) . getConstructors ( ) ; Object [ ] result = new Object [ methods . length + ctors . length ] ; int resultIndex = 0 ; for ( ; resultIndex < methods . length ; resultIndex ++ ) { Method method = methods... |
public class NineRectangleGridImageView { /** * 设置图片数据
* @ param data 图片数据集合 */
public void setImagesData ( List data ) { } } | if ( data == null || data . isEmpty ( ) ) { this . setVisibility ( GONE ) ; return ; } else { this . setVisibility ( VISIBLE ) ; } if ( mMaxSize > 0 && data . size ( ) > mMaxSize ) { data = data . subList ( 0 , mMaxSize ) ; } int [ ] gridParam = calculateGridParam ( data . size ( ) ) ; mRowCount = gridParam [ 0 ] ; mCo... |
public class JAXRSClientConfigImpl { /** * find the uri parameter which we will key off of
* @ param props
* @ return value of uri param within props , or null if no uri param */
private String getURI ( Map < String , Object > props ) { } } | if ( props == null ) return null ; if ( props . keySet ( ) . contains ( URI ) ) { return ( props . get ( URI ) . toString ( ) ) ; } else { return null ; } |
public class AuthManager { /** * Login using user authentication token
* @ param authToken authentication user for user .
* @ return Logged in user . */
public Observable < BackendUser > getUserFromAuthToken ( final String authToken ) { } } | return Observable . create ( new Observable . OnSubscribe < BackendUser > ( ) { @ Override public void call ( Subscriber < ? super BackendUser > subscriber ) { try { setLoginState ( LOGGING_IN ) ; logger . debug ( "getWebService(): " + getWebService ( ) ) ; logger . debug ( "getuserFromAuthToken: " + authToken ) ; Vali... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.