signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class LToSrtBiFunctionBuilder { /** * Adds full new case for the argument that are of specific classes ( matched by instanceOf , null is a wildcard ) . */
@ Nonnull public < V1 extends T1 , V2 extends T2 > LToSrtBiFunctionBuilder < T1 , T2 > aCase ( Class < V1 > argC1 , Class < V2 > argC2 , LToSrtBiFunction < V1... | PartialCaseWithSrtProduct . The pc = partialCaseFactoryMethod ( ( a1 , a2 ) -> ( argC1 == null || argC1 . isInstance ( a1 ) ) && ( argC2 == null || argC2 . isInstance ( a2 ) ) ) ; pc . evaluate ( function ) ; return self ( ) ; |
public class DirectedMultigraph { /** * { @ inheritDoc } */
public boolean remove ( int vertex ) { } } | // If we can remove the vertex from the global set , then at least one of
// the type - specific graphs has this vertex .
SparseDirectedTypedEdgeSet < T > edges = vertexToEdges . remove ( vertex ) ; if ( edges != null ) { size -= edges . size ( ) ; for ( int other : edges . connected ( ) ) { vertexToEdges . get ( other... |
public class AndroidExecutors { /** * Compatibility helper function for
* { @ link java . util . concurrent . ThreadPoolExecutor # allowCoreThreadTimeOut ( boolean ) }
* Only available on android - 9 + .
* @ param executor the { @ link java . util . concurrent . ThreadPoolExecutor }
* @ param value true if shou... | if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . GINGERBREAD ) { executor . allowCoreThreadTimeOut ( value ) ; } |
public class UserPreferences { /** * Read persistent global UserPreferences from file in the user ' s home
* directory . */
public void read ( ) { } } | File prefFile = new File ( SystemProperties . getProperty ( "user.home" ) , PREF_FILE_NAME ) ; if ( ! prefFile . exists ( ) || ! prefFile . isFile ( ) ) { return ; } try { read ( new FileInputStream ( prefFile ) ) ; } catch ( IOException e ) { // Ignore - just use default preferences
} |
public class PathChildrenCache { /** * NOTE : this is a BLOCKING method . Rebuild the internal cache for the given node by querying
* for all needed data WITHOUT generating any events to send to listeners .
* @ param fullPath full path of the node to rebuild
* @ throws Exception errors */
public void rebuildNode ... | Preconditions . checkArgument ( ZKPaths . getPathAndNode ( fullPath ) . getPath ( ) . equals ( path ) , "Node is not part of this cache: " + fullPath ) ; Preconditions . checkState ( ! executorService . isShutdown ( ) , "cache has been closed" ) ; ensurePath ( ) ; internalRebuildNode ( fullPath ) ; // this is necessary... |
public class AndroidExecutors { /** * Creates a proper Cached Thread Pool . Tasks will reuse cached threads if available
* or create new threads until the core pool is full . tasks will then be queued . If an
* task cannot be queued , a new thread will be created unless this would exceed max pool
* size , then th... | ThreadPoolExecutor executor = new ThreadPoolExecutor ( CORE_POOL_SIZE , MAX_POOL_SIZE , KEEP_ALIVE_TIME , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( ) ) ; allowCoreThreadTimeout ( executor , true ) ; return executor ; |
public class MapRow { /** * Retrieve a boolean value .
* @ param name column name
* @ return boolean value */
public final boolean getBoolean ( String name ) { } } | boolean result = false ; Boolean value = ( Boolean ) getObject ( name ) ; if ( value != null ) { result = BooleanHelper . getBoolean ( value ) ; } return result ; |
public class Cache { /** * Adds all data from a Message into the Cache . Each record is added with
* the appropriate credibility , and negative answers are cached as such .
* @ param in The Message to be added
* @ return A SetResponse that reflects what would be returned from a cache
* lookup , or null if nothi... | boolean isAuth = in . getHeader ( ) . getFlag ( Flags . AA ) ; Record question = in . getQuestion ( ) ; Name qname ; Name curname ; int qtype ; int qclass ; int cred ; int rcode = in . getHeader ( ) . getRcode ( ) ; boolean completed = false ; RRset [ ] answers , auth , addl ; SetResponse response = null ; boolean verb... |
public class DefaultGroovyMethods { /** * Returns the longest prefix of this list where each element
* passed to the given closure condition evaluates to true .
* Similar to { @ link # takeWhile ( Iterable , groovy . lang . Closure ) }
* except that it attempts to preserve the type of the original list .
* < pr... | int num = 0 ; BooleanClosureWrapper bcw = new BooleanClosureWrapper ( condition ) ; for ( T value : self ) { if ( bcw . call ( value ) ) { num += 1 ; } else { break ; } } return take ( self , num ) ; |
public class MediaOverlay { /** * Adds a dirty region to this overlay . */
public void addDirtyRegion ( Rectangle rect ) { } } | // Only add dirty regions where rect intersects our actual media as the set region will
// propagate out to the repaint manager .
for ( AbstractMedia media : _metamgr ) { Rectangle intersection = media . getBounds ( ) . intersection ( rect ) ; if ( ! intersection . isEmpty ( ) ) { _metamgr . getRegionManager ( ) . addD... |
public class FactoryDetectDescribe { /** * Creates a new SIFT feature detector and describer .
* @ see CompleteSift
* @ param config Configuration for the SIFT detector and descriptor .
* @ return SIFT */
public static < T extends ImageGray < T > > DetectDescribePoint < T , BrightFeature > sift ( @ Nullable Confi... | if ( config == null ) config = new ConfigCompleteSift ( ) ; ConfigSiftScaleSpace configSS = config . scaleSpace ; ConfigSiftDetector configDetector = config . detector ; ConfigSiftOrientation configOri = config . orientation ; ConfigSiftDescribe configDesc = config . describe ; SiftScaleSpace scaleSpace = new SiftScale... |
public class PrepareRequestInterceptor { /** * Setup accept header depends from the semantic of the request
* @ param action
* @ param requestHeaders */
private void setupAcceptHeader ( String action , Map < String , String > requestHeaders , Map < String , String > requestParameters ) { } } | // validates whether to add headers for accept for serialization
String serializeAcceptFormat = getSerializationResponseFormat ( ) ; if ( StringUtils . hasText ( serializeAcceptFormat ) && ! isDownload ( action ) && ! isDownloadPDF ( requestParameters ) ) { requestHeaders . put ( RequestElements . HEADER_PARAM_ACCEPT ,... |
public class CensusSpringAspect { /** * trace handles methods executed with the ` @ Traced ` annotation . A new span will be created with
* an optionally customizable span name .
* @ param call the join point to execute
* @ return the result of the invocation
* @ throws Throwable if the underlying target throws... | MethodSignature signature = ( MethodSignature ) call . getSignature ( ) ; Method method = signature . getMethod ( ) ; Traced annotation = method . getAnnotation ( Traced . class ) ; if ( annotation == null ) { return call . proceed ( ) ; } String spanName = annotation . name ( ) ; if ( spanName . isEmpty ( ) ) { spanNa... |
public class Translations { /** * Load from the XML translations file maintained by the FHIR project
* @ param filename
* @ throws IOException
* @ throws SAXException
* @ throws FileNotFoundException
* @ throws ParserConfigurationException
* @ throws Exception */
public void load ( String filename ) throws ... | DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder builder = factory . newDocumentBuilder ( ) ; loadMessages ( builder . parse ( new CSFileInputStream ( filename ) ) ) ; |
public class ElemWithParam { /** * Get the XObject representation of the variable .
* @ param transformer non - null reference to the the current transform - time state .
* @ param sourceNode non - null reference to the < a href = " http : / / www . w3 . org / TR / xslt # dt - current - node " > current source node... | XObject var ; XPathContext xctxt = transformer . getXPathContext ( ) ; xctxt . pushCurrentNode ( sourceNode ) ; try { if ( null != m_selectPattern ) { var = m_selectPattern . execute ( xctxt , sourceNode , this ) ; var . allowDetachToRelease ( false ) ; } else if ( null == getFirstChildElem ( ) ) { var = XString . EMPT... |
public class MaterialCalendarView { /** * Set the calendar to a specific month or week based on a date .
* In month mode , the calendar will be set to the corresponding month .
* In week mode , the calendar will be set to the corresponding week .
* @ param day a CalendarDay to focus the calendar on . Null will do... | if ( day == null ) { return ; } int index = adapter . getIndexForDay ( day ) ; pager . setCurrentItem ( index , useSmoothScroll ) ; updateUi ( ) ; |
public class AtomAPIMMessage { /** * Get the name of a method parameter via its < code > PName < / code > annotation .
* @ param m
* @ param paramIndex the index of the parameter array .
* @ return the parameter name or an empty string if not available . */
private static String getParameterName ( Method m , int ... | PName pName = getParameterAnnotation ( m , paramIndex , PName . class ) ; if ( pName != null ) { return pName . value ( ) ; } else { return "" ; } |
public class NotesInterface { /** * Add a note to a photo . The Note object bounds and text must be specified .
* @ param photoId
* The photo ID
* @ param note
* The Note object
* @ return The updated Note object */
public Note add ( String photoId , Note note ) throws FlickrException { } } | Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_ADD ) ; parameters . put ( "photo_id" , photoId ) ; Rectangle bounds = note . getBounds ( ) ; if ( bounds != null ) { parameters . put ( "note_x" , String . valueOf ( bounds . x ) ) ; parameters . put ( "note... |
public class CmsWebdavServlet { /** * Adds an xml element to the given parent and sets the appropriate namespace and
* prefix . < p >
* @ param parent the parent node to add the element
* @ param name the name of the new element
* @ return the created element with the given name which was added to the given par... | return parent . addElement ( new QName ( name , Namespace . get ( "D" , DEFAULT_NAMESPACE ) ) ) ; |
public class ConnectionGroupTree { /** * Adds all descendant sharing profiles of the given connections to their
* corresponding primary connections already stored under root .
* @ param connections
* The connections whose descendant sharing profiles should be added to
* the tree .
* @ param permissions
* If... | // If no connections , nothing to do
if ( connections . isEmpty ( ) ) return ; // Build lists of sharing profile identifiers for retrieval
Collection < String > identifiers = new ArrayList < String > ( ) ; for ( Connection connection : connections ) identifiers . addAll ( connection . getSharingProfileIdentifiers ( ) )... |
public class DemoActivity { /** * Photos loading failure callback . */
@ Failure ( FlickrApi . LOAD_IMAGES_EVENT ) private void onPhotosLoadFail ( ) { } } | gridAdapter . onNextItemsError ( ) ; // Skipping state restoration
if ( savedPagerPosition != NO_POSITION ) { // We can ' t show image right now , so we should return back to list
applyFullPagerState ( 0f , true ) ; } clearScreenState ( ) ; |
public class BaseAbilityBot { /** * Invokes the method and retrieves its return { @ link Ability } .
* @ param obj an bot or extension that this method is invoked with
* @ return a { @ link Function } which returns the { @ link Ability } returned by the given method */
private Function < ? super Method , Ability > ... | return method -> { try { return ( Ability ) method . invoke ( obj ) ; } catch ( IllegalAccessException | InvocationTargetException e ) { BotLogger . error ( "Could not add ability" , TAG , e ) ; throw propagate ( e ) ; } } ; |
public class MMCIFFileTools { /** * Converts a CrystalCell object to a { @ link Cell } object .
* @ param c
* @ return */
public static Cell convertCrystalCellToCell ( CrystalCell c ) { } } | Cell cell = new Cell ( ) ; cell . setLength_a ( String . format ( "%.3f" , c . getA ( ) ) ) ; cell . setLength_b ( String . format ( "%.3f" , c . getB ( ) ) ) ; cell . setLength_c ( String . format ( "%.3f" , c . getC ( ) ) ) ; cell . setAngle_alpha ( String . format ( "%.3f" , c . getAlpha ( ) ) ) ; cell . setAngle_be... |
public class CommonOps_DDRM { /** * < p > Computes the matrix multiplication outer product : < br >
* < br >
* c = a * a < sup > T < / sup > < br >
* < br >
* c < sub > ij < / sub > = & sum ; < sub > k = 1 : m < / sub > { a < sub > ik < / sub > * a < sub > jk < / sub > }
* Is faster than using a generic matri... | c . reshape ( a . numRows , a . numRows ) ; MatrixMultProduct_DDRM . outer ( a , c ) ; |
public class ReportGenerator { /** * Generates a report from a given Velocity Template . The template name
* provided can be the name of a template contained in the jar file , such as
* ' XmlReport ' or ' HtmlReport ' , or the template name can be the path to a
* template file .
* @ param template the name of t... | "OBL_UNSATISFIED_OBLIGATION" } ) protected void processTemplate ( String template , File file ) throws ReportException { ensureParentDirectoryExists ( file ) ; try ( OutputStream output = new FileOutputStream ( file ) ) { processTemplate ( template , output ) ; } catch ( IOException ex ) { throw new ReportException ( S... |
public class AVMiPushMessageReceiver { /** * 通知栏消息 , 用户手动点击后触发
* @ param context
* @ param miPushMessage */
@ Override public void onNotificationMessageClicked ( Context context , com . xiaomi . mipush . sdk . MiPushMessage miPushMessage ) { } } | processMiNotification ( miPushMessage ) ; |
public class Intersectionf { /** * Determine whether the undirected line segment with the end points < code > p0 < / code > and < code > p1 < / code >
* intersects the axis - aligned box given as its minimum corner < code > min < / code > and maximum corner < code > max < / code > ,
* and return the values of the p... | return intersectLineSegmentAab ( p0 . x ( ) , p0 . y ( ) , p0 . z ( ) , p1 . x ( ) , p1 . y ( ) , p1 . z ( ) , min . x ( ) , min . y ( ) , min . z ( ) , max . x ( ) , max . y ( ) , max . z ( ) , result ) ; |
public class ResultInterpreter { /** * Interprets the class result .
* @ param classResult The class result */
private void interpretClassResult ( final ClassResult classResult ) { } } | classResult . getMethods ( ) . forEach ( m -> interpretMethodResult ( m , classResult ) ) ; |
public class Expressions { /** * Create a new Path expression
* @ param type element type
* @ param queryType element expression type
* @ param metadata path metadata
* @ param < E > element type
* @ param < Q > element expression type
* @ return path expression */
public static < E , Q extends SimpleExpres... | return new CollectionPath < E , Q > ( type , queryType , metadata ) ; |
public class BoxesRunTime { /** * - arg */
public static Object negate ( Object arg ) throws NoSuchMethodException { } } | int code = typeCode ( arg ) ; if ( code <= INT ) { int val = unboxCharOrInt ( arg , code ) ; return boxToInteger ( - val ) ; } if ( code <= LONG ) { long val = unboxCharOrLong ( arg , code ) ; return boxToLong ( - val ) ; } if ( code <= FLOAT ) { float val = unboxCharOrFloat ( arg , code ) ; return boxToFloat ( - val )... |
public class UIUtils { /** * helper method to set the TranslucentStatusFlag
* @ param on */
public static void setTranslucentStatusFlag ( Activity activity , boolean on ) { } } | if ( Build . VERSION . SDK_INT >= 19 ) { setFlag ( activity , WindowManager . LayoutParams . FLAG_TRANSLUCENT_STATUS , on ) ; } |
public class CodeBlocks { /** * Joins multiple { @ link CodeBlock } s together with a given delimiter */
@ SuppressWarnings ( "SameParameterValue" ) static CodeBlock join ( Iterable < CodeBlock > codeBlocks , String delimiter ) { } } | CodeBlock . Builder builder = CodeBlock . builder ( ) ; Iterator < CodeBlock > iterator = codeBlocks . iterator ( ) ; while ( iterator . hasNext ( ) ) { builder . add ( iterator . next ( ) ) ; if ( iterator . hasNext ( ) ) { builder . add ( delimiter ) ; } } return builder . build ( ) ; |
public class FeatureDescription { /** * Returns the first sentence of the
* shortDescription . Returns " " if the shortDescription is the same as
* the displayName ( the default for reflection - generated
* FeatureDescriptors ) . */
public String getDescriptionFirstSentence ( ) { } } | FeatureDescriptor fd = getFeatureDescriptor ( ) ; if ( fd == null ) { return "" ; } return getTeaToolsUtils ( ) . getDescriptionFirstSentence ( fd ) ; |
public class JavaGenerator { /** * Returns the initial value of { @ code field } , or null if it is doesn ' t have one . */
private @ Nullable CodeBlock initialValue ( Field field ) { } } | if ( field . isPacked ( ) || field . isRepeated ( ) ) { return CodeBlock . of ( "$T.newMutableList()" , Internal . class ) ; } else if ( field . type ( ) . isMap ( ) ) { return CodeBlock . of ( "$T.newMutableMap()" , Internal . class ) ; } else { return null ; } |
public class WebServiceFilterTranslator { /** * { @ inheritDoc } */
@ Override protected Operand createLessThanExpression ( final LessThanFilter filter , final boolean not ) { } } | if ( filter == null ) { return null ; } final String name = filter . getAttribute ( ) . getName ( ) ; final String value = AttributeUtil . getAsStringValue ( filter . getAttribute ( ) ) ; if ( StringUtil . isBlank ( value ) ) { return null ; } return new Operand ( Operator . LT , name , value , not ) ; |
public class Atomix { /** * Returns a new Atomix builder .
* The returned builder will be initialized with the provided configuration .
* @ param config the Atomix configuration
* @ param classLoader the class loader with which to load the Atomix registry
* @ return the Atomix builder */
public static AtomixBui... | return new AtomixBuilder ( config , AtomixRegistry . registry ( classLoader ) ) ; |
public class ScoreBuildHistogram { /** * giving it an improved prediction ) . */
protected void score_decide ( Chunk chks [ ] , Chunk nids , int nnids [ ] ) { } } | for ( int row = 0 ; row < nids . _len ; row ++ ) { // Over all rows
int nid = ( int ) nids . at8 ( row ) ; // Get Node to decide from
if ( isDecidedRow ( nid ) ) { // already done
nnids [ row ] = nid - _leaf ; // will be negative , flagging a completed row
continue ; } // Score row against current decisions & assign ne... |
public class IntStreamEx { /** * Returns the maximum element of this stream according to the provided key
* extractor function .
* This is a terminal operation .
* @ param < V > the type of the { @ code Comparable } sort key
* @ param keyExtractor a non - interfering , stateless function
* @ return an { @ cod... | ObjIntBox < V > result = collect ( ( ) -> new ObjIntBox < > ( null , 0 ) , ( box , i ) -> { V val = Objects . requireNonNull ( keyExtractor . apply ( i ) ) ; if ( box . a == null || box . a . compareTo ( val ) < 0 ) { box . a = val ; box . b = i ; } } , ( box1 , box2 ) -> { if ( box2 . a != null && ( box1 . a == null |... |
public class ChainWriter { /** * Writes a JavaScript script tag that shows a date and time in the user ' s locale . Prints < code > & amp ; # 160 ; < / code >
* if the date is < code > - 1 < / code > .
* Writes to the internal < code > PrintWriter < / code > .
* @ deprecated
* @ see # writeDateTimeJavaScript ( ... | return writeDateTimeJavaScript ( date == - 1 ? null : new Date ( date ) , sequence , scriptOut ) ; |
public class ParseUtils { /** * Parses out the timestamp portion of the uid Strings used in the logrepo */
public static long parseTimestampFromUIDString ( String s , final int start , final int end ) { } } | long ret = 0 ; for ( int i = start ; i < end && i < start + 9 ; i ++ ) { ret <<= 5 ; char c = s . charAt ( i ) ; if ( c >= '0' && c <= '9' ) { ret |= c - '0' ; } else if ( c >= 'a' && c <= 'v' ) { ret |= c - 'a' + 10 ; } else if ( c >= 'A' && c <= 'V' ) { ret |= c - 'A' + 10 ; } else { throw new IllegalArgumentExceptio... |
public class Solo { /** * Waits for a View matching the specified resource id . Default timeout is 20 seconds .
* @ param id the R . id of the { @ link View } to wait for
* @ return { @ code true } if the { @ link View } is displayed and { @ code false } if it is not displayed before the timeout */
public boolean w... | if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "waitForView(" + id + ")" ) ; } return waitForView ( id , 0 , Timeout . getLargeTimeout ( ) , true ) ; |
public class JmsTemporaryTopicImpl { /** * / * ( non - Javadoc )
* @ see javax . jms . TemporaryTopic # delete ( ) */
public void delete ( ) throws JMSException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "delete" ) ; // check to see if this has already been deleted .
// If it has return with out doing anything
if ( ! deleted ) { session . deleteTemporaryDestination ( getConsumerSIDestinationAddress ( ) ) ; deleted = t... |
public class PhaseThreeImpl { /** * Returns true if the parameter has a namespace and value , false if not .
* @ param p Parameter */
private static boolean validParameter ( final Parameter p ) { } } | if ( p . getNamespace ( ) == null ) { return false ; } if ( p . getValue ( ) == null ) { return false ; } return true ; |
public class SeekableStringReader { /** * Returns the rest of the data until the end . */
public String rest ( ) { } } | if ( cursor >= str . length ( ) ) throw new ParseException ( "no more data" ) ; String result = str . substring ( cursor ) ; cursor = str . length ( ) ; return result ; |
public class ProductFactoryCascade { /** * Add a given factory to the list of factories at the BEGINNING .
* @ param factory The factory to be added .
* @ return Cascade with amended factory list . */
public ProductFactoryCascade < T > addFactoryBefore ( ProductFactory < ? extends T > factory ) { } } | ArrayList < ProductFactory < ? extends T > > factories = new ArrayList < ProductFactory < ? extends T > > ( this . factories . size ( ) + 1 ) ; factories . addAll ( this . factories ) ; factories . add ( 0 , factory ) ; return new ProductFactoryCascade < > ( factories ) ; |
public class GcsDelegationTokens { /** * Perform the unbonded deployment operations . Create the GCP credential provider chain to use
* when talking to GCP when there is no delegation token to work with . authenticating this client
* with GCP services , and saves it to { @ link # accessTokenProvider }
* @ throws ... | checkState ( ! isBoundToDT ( ) , "Already Bound to a delegation token" ) ; logger . atFine ( ) . log ( "No delegation tokens present: using direct authentication" ) ; accessTokenProvider = tokenBinding . deployUnbonded ( ) ; return accessTokenProvider ; |
public class RunController { /** * Run Citrus application with given test package names .
* @ param packages */
public void runPackages ( List < String > packages ) { } } | CitrusAppConfiguration citrusAppConfiguration = new CitrusAppConfiguration ( ) ; citrusAppConfiguration . setIncludes ( Optional . ofNullable ( includes ) . orElse ( configuration . getIncludes ( ) ) ) ; citrusAppConfiguration . setPackages ( packages ) ; citrusAppConfiguration . setConfigClass ( configuration . getCon... |
public class OmemoManager { /** * Returns true , if the Server supports PEP .
* @ param connection XMPPConnection
* @ param server domainBareJid of the server to test
* @ return true if server supports pep
* @ throws XMPPException . XMPPErrorException
* @ throws SmackException . NotConnectedException
* @ th... | return ServiceDiscoveryManager . getInstanceFor ( connection ) . discoverInfo ( server ) . containsFeature ( PubSub . NAMESPACE ) ; |
public class CmsVfsCache { /** * Adds this instance as an event listener to the CMS event manager . < p > */
protected void registerEventListener ( ) { } } | OpenCms . addCmsEventListener ( this , new int [ ] { I_CmsEventListener . EVENT_RESOURCE_AND_PROPERTIES_MODIFIED , I_CmsEventListener . EVENT_RESOURCES_AND_PROPERTIES_MODIFIED , I_CmsEventListener . EVENT_RESOURCE_MODIFIED , I_CmsEventListener . EVENT_RESOURCES_MODIFIED , I_CmsEventListener . EVENT_RESOURCE_MOVED , I_C... |
public class ClassUtil { /** * Gets the methods within this class that implements public " bean " methods
* ( get and set ) for the property name . Returns an array of methods where
* index = 0 is the get method and index = 1 is the set method .
* For example , for a name such as " firstName " , this method will ... | Method methods [ ] = new Method [ 2 ] ; // search for the " get "
methods [ 0 ] = getMethod ( type , "get" + propertyName , propertyType , null , caseSensitive ) ; // search for the " set "
methods [ 1 ] = getMethod ( type , "set" + propertyName , null , propertyType , caseSensitive ) ; return methods ; |
public class CachedResultSet { /** * Retrieves the rows from a collection of Objects , where a subset of the objects ' ( of type T ) < i > public fields < / i > are taken as result set columns .
* @ param < T > the type of the objects in the collection
* @ param collection a collection of objects
* @ param column... | CachedResultSet rs = new CachedResultSet ( columns , new ArrayList < Object [ ] > ( ) ) ; for ( T object : collection ) { Object [ ] row = new Object [ columns . length ] ; for ( int i = 0 ; i < columns . length ; ++ i ) { try { Object value = Beans . getKnownField ( object . getClass ( ) , columns [ i ] ) . get ( obje... |
public class Matrix3x2d { /** * Pre - multiply a rotation 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 > R *... | double sin = Math . sin ( ang ) ; double cos = Math . cosFromSin ( sin , ang ) ; double nm00 = cos * m00 - sin * m01 ; double nm01 = sin * m00 + cos * m01 ; double nm10 = cos * m10 - sin * m11 ; double nm11 = sin * m10 + cos * m11 ; double nm20 = cos * m20 - sin * m21 ; double nm21 = sin * m20 + cos * m21 ; dest . m00 ... |
public class ServerImpl { /** * Initiates an orderly shutdown in which preexisting calls continue but new calls are rejected . */
@ Override public ServerImpl shutdown ( ) { } } | boolean shutdownTransportServers ; synchronized ( lock ) { if ( shutdown ) { return this ; } shutdown = true ; shutdownTransportServers = started ; if ( ! shutdownTransportServers ) { transportServersTerminated = true ; checkForTermination ( ) ; } } if ( shutdownTransportServers ) { for ( InternalServer ts : transportS... |
public class Transport { /** * Delivers a single child entry by its identifier . */
public < T > T getChildEntry ( Class < ? > parentClass , String parentId , Class < T > classs , String childId , NameValuePair ... params ) throws RedmineException { } } | final EntityConfig < T > config = getConfig ( classs ) ; final URI uri = getURIConfigurator ( ) . getChildIdURI ( parentClass , parentId , classs , childId , params ) ; HttpGet http = new HttpGet ( uri ) ; String response = send ( http ) ; return parseResponse ( response , config . singleObjectName , config . parser ) ... |
public class BSHBinaryExpression { /** * object is a non - null and non - void Primitive type */
private boolean isPrimitiveValue ( Object obj ) { } } | return obj instanceof Primitive && obj != Primitive . VOID && obj != Primitive . NULL ; |
public class TCPTransportClient { /** * Network init socket */
public void initialize ( ) throws IOException , NotInitializedException { } } | logger . debug ( "Initialising TCPTransportClient. Origin address is [{}] and destination address is [{}]" , origAddress , destAddress ) ; if ( destAddress == null ) { throw new NotInitializedException ( "Destination address is not set" ) ; } socketChannel = SelectorProvider . provider ( ) . openSocketChannel ( ) ; try... |
public class CSSToken { /** * Returns common text stored in token . Content is not modified .
* @ return Model view of text in token */
@ Override public String getText ( ) { } } | // sets text from input if not text directly available
text = super . getText ( ) ; int t ; try { t = typeMapper . inverse ( ) . get ( type ) ; } catch ( NullPointerException e ) { return text ; } switch ( t ) { case FUNCTION : return text . substring ( 0 , text . length ( ) - 1 ) ; case URI : return extractURI ( text ... |
public class AbstractFilter { /** * Creates a list of Subjects from a servlet request . If no subject is found
* a subject called ' anonymous ' is created .
* @ param request
* the servlet request
* @ return a list of Subjects
* @ throws ServletException */
protected List < Map < URI , List < AttributeValue >... | @ SuppressWarnings ( "unchecked" ) Map < String , Set < String > > reqAttr = ( Map < String , Set < String > > ) request . getAttribute ( "FEDORA_AUX_SUBJECT_ATTRIBUTES" ) ; Set < String > fedoraRoles = null ; if ( reqAttr != null ) { fedoraRoles = reqAttr . get ( "fedoraRole" ) ; } String [ ] fedoraRole = null ; if ( ... |
public class SheetBase { /** * The error message to display when the sheet is in error .
* @ return */
public String getErrorMessage ( ) { } } | final Object result = getStateHelper ( ) . eval ( PropertyKeys . errorMessage ) ; if ( result == null ) { return null ; } return result . toString ( ) ; |
public class PreferenceActivity { /** * Handles the intent extra , which specifies whether bread crumbs should be shown , not .
* @ param extras
* The extras of the intent , which has been used to start the activity , as an instance
* of the class { @ link Bundle } . The bundle may not be null */
private void han... | if ( extras . containsKey ( EXTRA_NO_BREAD_CRUMBS ) ) { hideBreadCrumb ( extras . getBoolean ( EXTRA_NO_BREAD_CRUMBS ) ) ; } |
public class Reflections { /** * 直接调用对象方法 , 无视 private / protected 修饰符 。
* 用于一次性调用的情况 , 否则应使用 getAccessibleMethod ( ) 函数获得 Method 后反复调用 。
* 同时匹配方法名 + 参数类型 。
* @ param target
* 目标对象
* @ param name
* 方法名
* @ param parameterTypes
* 参数类型
* @ param parameterValues
* 参数值
* @ param < T >
* 期待的返回值类型
*... | Method method = getAccessibleMethod ( target , name , parameterTypes ) ; if ( method == null ) { throw new IllegalArgumentException ( "Could not find method [" + name + "] on target [" + target + ']' ) ; } try { return ( T ) method . invoke ( target , parameterValues ) ; } catch ( ReflectiveOperationException e ) { thr... |
public class TypeVariableType { /** * A type variable type is assignable only to / from itself or a reference thereof .
* For example : < pre >
* function foo < T , S > ( t : T , s : S )
* t = s / / illegal , T and S may not have the same type at runtime
* t = " hello " / / illegal , T may not be a String
* v... | if ( type == this ) { return true ; } if ( type instanceof ICompoundType ) { for ( IType t : ( ( ICompoundType ) type ) . getTypes ( ) ) { if ( isAssignableFrom ( t ) ) { return true ; } } return false ; } if ( ! ( type instanceof TypeVariableType ) ) { return false ; } if ( ! getRelativeName ( ) . equals ( type . getR... |
public class PrintfFormat { /** * Format an Object . Convert wrapper types to
* their primitive equivalents and call the
* appropriate internal formatting method . Convert
* Strings using an internal formatting method for
* Strings . Otherwise use the default formatter
* ( use toString ) .
* @ param x the O... | Enumeration e = vFmt . elements ( ) ; ConversionSpecification cs = null ; char c = 0 ; StringBuffer sb = new StringBuffer ( ) ; while ( e . hasMoreElements ( ) ) { cs = ( ConversionSpecification ) e . nextElement ( ) ; c = cs . getConversionCharacter ( ) ; if ( c == '\0' ) sb . append ( cs . getLiteral ( ) ) ; else if ... |
public class PropertyUtility { /** * Modifier is acceptable .
* @ param item
* the item
* @ return true , if successful */
static boolean modifierIsAcceptable ( Element item ) { } } | // kotlin define properties as final
Object [ ] values = { Modifier . NATIVE , Modifier . STATIC , /* Modifier . FINAL , */
Modifier . ABSTRACT } ; for ( Object i : values ) { if ( item . getModifiers ( ) . contains ( i ) ) return false ; } return true ; |
public class AbstractPropertyReader { /** * get XStream Object .
* @ return XStream object . */
private XStream getXStreamObject ( ) { } } | if ( xStream == null ) { XStream stream = new XStream ( ) ; stream . alias ( "clientProperties" , ClientProperties . class ) ; stream . alias ( "dataStore" , ClientProperties . DataStore . class ) ; stream . alias ( "schema" , ClientProperties . DataStore . Schema . class ) ; stream . alias ( "table" , ClientProperties... |
public class CheckBase { /** * Checks whether both provided elements are public or protected . If one at least one of them is null , the method
* returns false , because the accessibility cannot be truthfully detected in that case .
* @ param a first element
* @ param b second element
* @ return true if both el... | if ( a == null || b == null ) { return false ; } return isAccessible ( a ) && isAccessible ( b ) ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link DateTimeType }
* { @ code > } */
@ XmlElementDecl ( namespace = "http://www.w3.org/2005/Atom" , name = "published" , scope = EntryType . class ) public JAXBElement < DateTimeType > createEntryTypePublished ( DateTime... | return new JAXBElement < DateTimeType > ( ENTRY_TYPE_PUBLISHED_QNAME , DateTimeType . class , EntryType . class , value ) ; |
public class ComponentFactory { /** * Factory method for create a new { @ link TextField } .
* @ param < T >
* the generic type of the model
* @ param id
* the id
* @ param model
* the model
* @ return the new { @ link TextField } . */
public static < T > TextField < T > newTextField ( final String id , f... | final TextField < T > textField = new TextField < > ( id , model ) ; textField . setOutputMarkupId ( true ) ; return textField ; |
public class CacheConfigurationBuilder { /** * Adds { @ link org . ehcache . expiry . Expiry } configuration to the returned builder .
* { @ code Expiry } is what controls data freshness in a cache .
* @ param expiry the expiry to use
* @ return a new builder with the added expiry
* @ deprecated Use { @ link # ... | return withExpiry ( convertToExpiryPolicy ( requireNonNull ( expiry , "Null expiry" ) ) ) ; |
public class Pool { public PondLife get ( int timeoutMs ) throws Exception { } } | PondLife pl = null ; // Defer to other threads before locking
if ( _available < _min ) Thread . yield ( ) ; int new_id = - 1 ; // Try to get pondlife without creating new one .
synchronized ( this ) { // Wait if none available .
if ( _running > 0 && _available == 0 && _size == _pondLife . length && timeoutMs > 0 ) wait... |
public class TrajectoryUtil { /** * Splits a trajectory in overlapping / non - overlapping sub - trajectories .
* @ param t
* @ param windowWidth Window width . Each sub - trajectory will have this length
* @ param overlapping Allows the window to overlap
* @ return ArrayList with sub - trajectories */
public s... | int increment = 1 ; if ( overlapping == false ) { increment = windowWidth ; } ArrayList < Trajectory > subTrajectories = new ArrayList < Trajectory > ( ) ; boolean trackEndReached = false ; for ( int i = 0 ; i < t . size ( ) ; i = i + increment ) { int upperBound = i + ( windowWidth ) ; if ( upperBound > t . size ( ) )... |
public class CaptureChangedRecordsFilter { /** * Gets the key to use in the capture state file . If there is not a
* captureStateIdentifier available , we want to avoid using a hardcoded key ,
* since the same file may be used for multiple purposes , even multiple
* filters of the same type . Of course this is no... | if ( StringUtils . isNullOrEmpty ( captureStateIdentifier ) ) { if ( lastModifiedColumn . isPhysicalColumn ( ) ) { Table table = lastModifiedColumn . getPhysicalColumn ( ) . getTable ( ) ; if ( table != null && ! StringUtils . isNullOrEmpty ( table . getName ( ) ) ) { return table . getName ( ) + "." + lastModifiedColu... |
public class LocalFileSink { /** * Before polling messages from the queue , it should check whether to rotate
* the file and start to write to new file .
* @ throws java . io . IOException */
@ Override protected void beforePolling ( ) throws IOException { } } | // Don ' t rotate if we are not running
if ( isRunning && ( writer . getLength ( ) > maxFileSize || System . currentTimeMillis ( ) > nextRotation ) ) { rotate ( ) ; } |
public class IntegerSerializer { /** * { @ inheritDoc } */
@ Override public ByteBuffer serialize ( Integer object ) { } } | ByteBuffer byteBuffer = ByteBuffer . allocate ( 4 ) ; byteBuffer . putInt ( object ) . flip ( ) ; return byteBuffer ; |
public class RandomVariableDifferentiableAADPathwise { /** * / * for all functions that need to be differentiated and are returned as double in the Interface , write a method to return it as RandomVariableAAD
* that is deterministic by its nature . For their double - returning pendant just return the average of the d... | /* returns deterministic AAD random variable */
return new RandomVariableDifferentiableAADPathwise ( new RandomVariableFromDoubleArray ( getAverage ( probabilities ) ) , Arrays . asList ( this , new RandomVariableFromDoubleArray ( probabilities ) ) , OperatorType . AVERAGE2 ) ; |
public class Toothpick { /** * Removes all nodes of { @ code scope } using DFS . We don ' t lock here .
* @ param scope the parent scope of which all children will recursively be removed
* from the map . We don ' t do anything else to the children nodes are they will be
* garbage collected soon . We just cut a wh... | MAP_KEY_TO_SCOPE . remove ( scope . getName ( ) ) ; scope . close ( ) ; for ( ScopeNode childScope : scope . childrenScopes . values ( ) ) { removeScopeAndChildrenFromMap ( childScope ) ; } |
public class FactoryFinder { /** * Finds the implementation < code > Class < / code > object for the given
* factory name , or if that fails , finds the < code > Class < / code > object
* for the given fallback class name . The arguments supplied must be
* used in order . If using the first argument is successful... | ClassLoader classLoader ; try { if ( System . getSecurityManager ( ) == null ) { classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; } else { classLoader = AccessController . doPrivileged ( ( PrivilegedAction < ClassLoader > ) ( ) -> Thread . currentThread ( ) . getContextClassLoader ( ) ) ; } } catc... |
public class OmsDePitter { /** * Make cells flow ready by creating a slope starting from the output cell .
* @ param iteration the iteration .
* @ param pitfillExitNode the exit node .
* @ param cellsToMakeFlowReady the cells to check and change at each iteration .
* @ param allPitsPositions the marked position... | iteration ++ ; double exitElevation = pitfillExitNode . elevation ; List < GridNode > connected = new ArrayList < > ( ) ; for ( GridNode checkNode : cellsToMakeFlowReady ) { List < GridNode > validSurroundingNodes = checkNode . getValidSurroundingNodes ( ) ; for ( GridNode gridNode : validSurroundingNodes ) { if ( ! pi... |
public class ApacheHTTPClient { /** * This function sets the request content .
* @ param httpRequest
* The HTTP request
* @ param httpMethodClient
* The apache HTTP method */
protected void setRequestContent ( HTTPRequest httpRequest , HttpMethodBase httpMethodClient ) { } } | // set content
if ( httpMethodClient instanceof EntityEnclosingMethod ) { EntityEnclosingMethod pushMethod = ( EntityEnclosingMethod ) httpMethodClient ; RequestEntity requestEntity = null ; ContentType contentType = httpRequest . getContentType ( ) ; switch ( contentType ) { case STRING : requestEntity = this . create... |
public class MachineTime { /** * / * [ deutsch ]
* < p > Multipliziert diese Dauer mit dem angegebenen Dezimalfaktor . < / p >
* < p > Wenn mehr Kontrolle & uuml ; ber das Rundungsverfahren gebraucht wird , gibt es die
* Alternativen { @ link # multipliedBy ( long ) } und { @ link # dividedBy ( long , RoundingMod... | if ( factor == 1.0 ) { return this ; } else if ( factor == 0.0 ) { if ( this . scale == POSIX ) { return cast ( POSIX_ZERO ) ; } else { return cast ( UTC_ZERO ) ; } } else if ( Double . isFinite ( factor ) ) { double len = this . toBigDecimal ( ) . doubleValue ( ) * factor ; MachineTime < ? > mt ; if ( this . scale == ... |
public class Commands { /** * Starts or stops saving a script to a file .
* @ param line Command line
* @ param callback Callback for command status */
public void script ( String line , DispatchCallback callback ) { } } | if ( sqlLine . getScriptOutputFile ( ) == null ) { startScript ( line , callback ) ; } else { stopScript ( line , callback ) ; } |
public class RedisStorage { /** * Unsets the state of the given trigger key by removing the trigger from all trigger state sets .
* @ param triggerHashKey the redis key of the desired trigger hash
* @ param jedis a thread - safe Redis connection
* @ return true if the trigger was removed , false if the trigger wa... | boolean removed = false ; Pipeline pipe = jedis . pipelined ( ) ; List < Response < Long > > responses = new ArrayList < > ( RedisTriggerState . values ( ) . length ) ; for ( RedisTriggerState state : RedisTriggerState . values ( ) ) { responses . add ( pipe . zrem ( redisSchema . triggerStateKey ( state ) , triggerHas... |
public class Multimap { /** * Remove the specified value ( one occurrence ) from the value set associated with keys which satisfy the specified < code > predicate < / code > .
* @ param value
* @ param predicate
* @ return < code > true < / code > if this Multimap is modified by this operation , otherwise < code ... | Set < K > removingKeys = null ; for ( Map . Entry < K , V > entry : this . valueMap . entrySet ( ) ) { if ( predicate . test ( entry . getKey ( ) , entry . getValue ( ) ) ) { if ( removingKeys == null ) { removingKeys = new HashSet < > ( ) ; } removingKeys . add ( entry . getKey ( ) ) ; } } if ( N . isNullOrEmpty ( rem... |
public class InstanceTemplateClient { /** * Gets the access control policy for a resource . May be empty if no such policy or resource
* exists .
* < p > Sample code :
* < pre > < code >
* try ( InstanceTemplateClient instanceTemplateClient = InstanceTemplateClient . create ( ) ) {
* ProjectGlobalInstanceTemp... | GetIamPolicyInstanceTemplateHttpRequest request = GetIamPolicyInstanceTemplateHttpRequest . newBuilder ( ) . setResource ( resource ) . build ( ) ; return getIamPolicyInstanceTemplate ( request ) ; |
public class SpiceServiceListenerNotifier { /** * Notify interested observers that the request was cancelled .
* @ param request the request that was cancelled . */
public void notifyObserversOfRequestCancellation ( CachedSpiceRequest < ? > request ) { } } | RequestProcessingContext requestProcessingContext = new RequestProcessingContext ( ) ; requestProcessingContext . setExecutionThread ( Thread . currentThread ( ) ) ; post ( new RequestCancelledNotifier ( request , spiceServiceListenerList , requestProcessingContext ) ) ; |
public class Timing { /** * Mark section end */
public void end ( ) { } } | if ( this . sectionName != null ) { Log . d ( TAG , "" + this . sectionName + " loaded in " + ( ActorTime . currentTime ( ) - sectionStart ) + " ms" ) ; this . sectionName = null ; } |
public class JaxbConfigurationReader { /** * Convenience method to marshal a JAXB configuration object into an output
* stream .
* @ param configuration
* @ param outputStream */
public void marshall ( Configuration configuration , OutputStream outputStream ) { } } | try { final Marshaller marshaller = _jaxbContext . createMarshaller ( ) ; marshaller . setProperty ( Marshaller . JAXB_FORMATTED_OUTPUT , Boolean . TRUE ) ; marshaller . setEventHandler ( new JaxbValidationEventHandler ( ) ) ; marshaller . marshal ( configuration , outputStream ) ; } catch ( JAXBException e ) { throw n... |
public class CqlDataReaderDAO { /** * Converts rows from a single C * row to a Record . */
private Iterator < Record > decodeRows ( Iterator < Iterable < Row > > rowGroups , final AstyanaxTable table ) { } } | return Iterators . transform ( rowGroups , rowGroup -> { String key = AstyanaxStorage . getContentKey ( getRawKeyFromRowGroup ( rowGroup ) ) ; return newRecordFromCql ( new Key ( table , key ) , rowGroup ) ; } ) ; |
public class FlexBase64 { /** * Encodes a fixed and complete byte buffer into a Base64url byte array .
* < pre > < code >
* / / Encodes " ell "
* FlexBase64 . encodeStringURL ( " hello " . getBytes ( " US - ASCII " ) , 1 , 4 , false ) ;
* < / code > < / pre >
* @ param source the byte array to encode from
*... | return Encoder . encodeBytes ( source , pos , limit , wrap , true ) ; |
public class MethodConstant { /** * Creates a stack manipulation that loads a method constant onto the operand stack .
* @ param methodDescription The method to be loaded onto the stack .
* @ return A stack manipulation that assigns a method constant for the given method description . */
public static CanCache of (... | if ( methodDescription . isTypeInitializer ( ) ) { return CanCacheIllegal . INSTANCE ; } else if ( methodDescription . isConstructor ( ) ) { return new ForConstructor ( methodDescription ) ; } else { return new ForMethod ( methodDescription ) ; } |
public class TemplatesApi { /** * Gets the definition of a template .
* Retrieves the list of templates for the specified account . The request can be limited to a specific folder .
* @ param accountId The external account number ( int ) or account ID Guid . ( required )
* @ param options for modifying the method... | Object localVarPostBody = "{}" ; // verify the required parameter ' accountId ' is set
if ( accountId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'accountId' when calling listTemplates" ) ; } // create path and map variables
String localVarPath = "/v2/accounts/{accountId}/templates" . rep... |
public class JShellToolBuilder { /** * Create a tool instance for testing . Not in JavaShellToolBuilder .
* @ return the tool instance */
public JShellTool rawTool ( ) { } } | if ( prefs == null ) { prefs = new PreferencesStorage ( Preferences . userRoot ( ) . node ( PREFERENCES_NODE ) ) ; } if ( vars == null ) { vars = System . getenv ( ) ; } JShellTool sh = new JShellTool ( cmdIn , cmdOut , cmdErr , console , userIn , userOut , userErr , prefs , vars , locale ) ; sh . testPrompt = captureP... |
public class GBSTree { /** * Search after falling off a right edge .
* < p > We have fallen off of the right edge because the search key is
* greater than the median of the current node . In the example below
* if the current node is GHI then the successor node is JKL and the
* desired key is greater than H and... | int xcc = comp . compare ( searchKey , p . rightMostKey ( ) ) ; if ( xcc == 0 ) /* Target is right - most key in current */
point . setFound ( p , 0 ) ; else if ( xcc < 0 ) /* Target ( if it exists ) is in right */
{ /* half of current node */
int idx = p . searchRight ( comp , searchKey ) ; if ( ! ( idx < 0 ) ) point ... |
public class Builder { /** * Sets the package prefix directories to allow any files installed under
* them to be relocatable .
* @ param prefixes Path prefixes which may be relocated */
public void setPrefixes ( final String ... prefixes ) { } } | if ( prefixes != null && 0 < prefixes . length ) format . getHeader ( ) . createEntry ( PREFIXES , prefixes ) ; |
public class SibRaActivationSpecImpl { /** * ( non - Javadoc )
* @ see com . ibm . wsspi . sib . ra . SibRaActivationSpec # setMessageDeletionMode ( java . lang . String ) */
public void setMessageDeletionMode ( final String messageDeletionMode ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isDebugEnabled ( ) ) { SibTr . debug ( this , TRACE , "MessageDeletionMode" , messageDeletionMode ) ; } _messageDeletionMode = messageDeletionMode ; |
public class SpotifyApi { /** * Add the current user as a follower of one or more artists or other Spotify users .
* @ param type The ID type : either artist or user .
* @ param ids A list of the artist or the user Spotify IDs . Maximum : 50 IDs .
* @ return A { @ link FollowArtistsOrUsersRequest . Builder } .
... | return new FollowArtistsOrUsersRequest . Builder ( accessToken ) . setDefaults ( httpManager , scheme , host , port ) . type ( type ) . ids ( concat ( ids , ',' ) ) ; |
public class ProtoParser { /** * Reads an field declaration and returns it . */
private FieldElement readField ( String documentation , FieldElement . Label label ) { } } | DataType type = readDataType ( ) ; String name = readName ( ) ; if ( readChar ( ) != '=' ) throw unexpected ( "expected '='" ) ; int tag = readInt ( ) ; FieldElement . Builder builder = FieldElement . builder ( ) . label ( label ) . type ( type ) . name ( name ) . tag ( tag ) ; if ( peekChar ( ) == '[' ) { pos ++ ; whi... |
public class UrlTriePrefixGrouper { /** * Get the detailed pages under this group */
public static ArrayList < String > groupToPages ( Triple < String , GoogleWebmasterFilter . FilterOperator , UrlTrieNode > group ) { } } | ArrayList < String > ret = new ArrayList < > ( ) ; if ( group . getMiddle ( ) . equals ( GoogleWebmasterFilter . FilterOperator . EQUALS ) ) { if ( group . getRight ( ) . isExist ( ) ) { ret . add ( group . getLeft ( ) ) ; } } else if ( group . getMiddle ( ) . equals ( GoogleWebmasterFilter . FilterOperator . CONTAINS ... |
public class BaseRowSerializer { /** * Convert base row to binary row .
* TODO modify it to code gen , and reuse BinaryRow & BinaryRowWriter . */
@ Override public BinaryRow baseRowToBinary ( BaseRow row ) { } } | if ( row instanceof BinaryRow ) { return ( BinaryRow ) row ; } BinaryRow binaryRow = new BinaryRow ( types . length ) ; BinaryRowWriter writer = new BinaryRowWriter ( binaryRow ) ; writer . writeHeader ( row . getHeader ( ) ) ; for ( int i = 0 ; i < types . length ; i ++ ) { if ( row . isNullAt ( i ) ) { writer . setNu... |
public class UploadService { /** * Gets the delegate for an upload request .
* @ param uploadId uploadID of the upload request
* @ return { @ link UploadStatusDelegate } or null if no delegate has been set for the given
* uploadId */
protected static UploadStatusDelegate getUploadStatusDelegate ( String uploadId ... | WeakReference < UploadStatusDelegate > reference = uploadDelegates . get ( uploadId ) ; if ( reference == null ) return null ; UploadStatusDelegate delegate = reference . get ( ) ; if ( delegate == null ) { uploadDelegates . remove ( uploadId ) ; Logger . info ( TAG , "\n\n\nUpload delegate for upload with Id " + uploa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.