signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class ExtraLanguageFeatureNameConverter { /** * Convert a full call to a feature .
* < p > This function is supposed to change the two list parameters for reflecting the conversion .
* @ param simpleName the simple name of the feature to be called .
* @ param calledFeature the called feature .
* @ param ... | if ( this . conversions == null ) { this . conversions = initMapping ( ) ; } final List < Pair < FeaturePattern , FeatureReplacement > > struct = this . conversions . get ( getKey ( simpleName ) ) ; if ( struct != null ) { final String replacementId = calledFeature . getIdentifier ( ) ; final FeatureReplacement replace... |
public class CloseableReference { /** * Close ( or free ) the reference
* @ throws IOException if any exception occurs */
@ Override public void close ( ) throws IOException { } } | try { if ( reference != null ) { closer . close ( reference ) ; } } catch ( Exception e ) { throw new IOException ( e ) ; } finally { this . wasClosed = true ; } |
public class Es6RewriteDestructuring { /** * Convert " rest " of object destructuring lhs by making a clone and deleting any properties that
* were stated in the original object pattern .
* < p > Nodes in statedProperties that are a stringKey will be used in a getprop when deleting . All
* other types will be use... | checkArgument ( objectPattern . getLastChild ( ) == rest ) ; Node restTempVarModel = astFactory . createName ( restTempVarName , objectPattern . getJSType ( ) ) ; Node result = restTempVarModel . cloneNode ( ) ; if ( ! statedProperties . isEmpty ( ) ) { Iterator < Node > propItr = statedProperties . iterator ( ) ; Node... |
public class ContentKeyPoliciesInner { /** * List Content Key Policies .
* Lists the Content Key Policies in the account .
* @ param resourceGroupName The name of the resource group within the Azure subscription .
* @ param accountName The Media Services account name .
* @ param filter Restricts the set of item... | return listWithServiceResponseAsync ( resourceGroupName , accountName , filter , top , orderby ) . map ( new Func1 < ServiceResponse < Page < ContentKeyPolicyInner > > , Page < ContentKeyPolicyInner > > ( ) { @ Override public Page < ContentKeyPolicyInner > call ( ServiceResponse < Page < ContentKeyPolicyInner > > resp... |
public class ValidationObjUtil { /** * Copy from to .
* @ param from the from
* @ param to the to
* @ param fieldNames the field names */
public static void copyFromTo ( Object from , Object to , String ... fieldNames ) { } } | for ( String field : fieldNames ) { copyFromTo ( from , to , field ) ; } |
public class YearMonthDay { /** * Converts this YearMonthDay to a full datetime at midnight using the
* specified time zone .
* This method uses the chronology from this instance plus the time zone
* specified .
* @ param zone the zone to use , null means default
* @ return this date as a datetime at midnight... | Chronology chrono = getChronology ( ) . withZone ( zone ) ; return new DateTime ( getYear ( ) , getMonthOfYear ( ) , getDayOfMonth ( ) , 0 , 0 , 0 , 0 , chrono ) ; |
public class UseEnumCollections { /** * returns whether the collection has already been reported on
* @ param stackPos
* the position on the opstack to check
* @ return whether the collection has already been reported . */
private boolean alreadyReported ( int stackPos ) { } } | if ( stack . getStackDepth ( ) <= stackPos ) { return false ; } OpcodeStack . Item item = stack . getStackItem ( stackPos ) ; XField field = item . getXField ( ) ; if ( field == null ) { return false ; } String fieldName = field . getName ( ) ; return ! checkedFields . add ( fieldName ) ; |
public class Serializer { /** * Reads a writable object .
* @ param buffer The buffer from which to read the object .
* @ param < T > The object type .
* @ return The read object . */
@ SuppressWarnings ( "unchecked" ) private < T > T readByClass ( BufferInput < ? > buffer ) { } } | String name = buffer . readUTF8 ( ) ; if ( whitelistRequired . get ( ) ) throw new SerializationException ( "cannot deserialize unregistered type: " + name ) ; Class < T > type = ( Class < T > ) types . get ( name ) ; if ( type == null ) { try { type = ( Class < T > ) Class . forName ( name ) ; if ( type == null ) thro... |
public class InternalRoute { /** * Matches / index to / index or / person / 1 to / person / { id }
* @ return True if the actual route matches a raw route . False if not . */
public boolean matches ( String requestUri ) { } } | Matcher matcher = regex . matcher ( requestUri ) ; return matcher . matches ( ) ; |
public class Matrix3f { /** * Set the column at the given < code > column < / code > index , starting with < code > 0 < / code > .
* @ param column
* the column index in < code > [ 0 . . 2 ] < / code >
* @ param src
* the column components to set
* @ return this
* @ throws IndexOutOfBoundsException if < cod... | return setColumn ( column , src . x ( ) , src . y ( ) , src . z ( ) ) ; |
public class InstructionView { /** * Sets up the { @ link RecyclerView } that is used to display the turn lanes . */
private void initializeTurnLaneRecyclerView ( ) { } } | turnLaneAdapter = new TurnLaneAdapter ( ) ; rvTurnLanes . setAdapter ( turnLaneAdapter ) ; rvTurnLanes . setHasFixedSize ( true ) ; rvTurnLanes . setLayoutManager ( new LinearLayoutManager ( getContext ( ) , LinearLayoutManager . HORIZONTAL , false ) ) ; |
public class ELParser { /** * BracketSuffix
* Sub Expression Suffix */
final public void BracketSuffix ( ) throws ParseException { } } | /* @ bgen ( jjtree ) BracketSuffix */
AstBracketSuffix jjtn000 = new AstBracketSuffix ( JJTBRACKETSUFFIX ) ; boolean jjtc000 = true ; jjtree . openNodeScope ( jjtn000 ) ; try { jj_consume_token ( LBRACK ) ; Expression ( ) ; jj_consume_token ( RBRACK ) ; } catch ( Throwable jjte000 ) { if ( jjtc000 ) { jjtree . clearNod... |
public class ChronoFormatter { /** * used by CustomizedProcessor */
ChronoFormatter < T > with ( Map < ChronoElement < ? > , Object > outerDefaults , AttributeSet outerAttrs ) { } } | AttributeSet merged = AttributeSet . merge ( outerAttrs , this . globalAttributes ) ; return new ChronoFormatter < > ( new ChronoFormatter < > ( this , outerDefaults ) , merged , merged . get ( HistoricAttribute . CALENDAR_HISTORY , null ) ) ; |
public class Decoder { /** * Reads a code of given length and at given index in an array of bits */
private static int readCode ( boolean [ ] rawbits , int startIndex , int length ) { } } | int res = 0 ; for ( int i = startIndex ; i < startIndex + length ; i ++ ) { res <<= 1 ; if ( rawbits [ i ] ) { res |= 0x01 ; } } return res ; |
public class HttpDispatcherChannel { /** * @ see com . ibm . wsspi . channelfw . Channel # destroy ( ) */
@ Override public void destroy ( ) throws ChannelException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Destroy channel: " + this ) ; } if ( null != this . myFactory ) { this . myFactory . removeChannel ( getName ( ) ) ; this . myFactory = null ; } |
public class Graph { /** * Removes the given vertex and its edges from the graph .
* @ param vertex the vertex to remove
* @ return the new graph containing the existing vertices and edges without
* the removed vertex and its edges */
public Graph < K , VV , EV > removeVertex ( Vertex < K , VV > vertex ) { } } | List < Vertex < K , VV > > vertexToBeRemoved = new ArrayList < > ( ) ; vertexToBeRemoved . add ( vertex ) ; return removeVertices ( vertexToBeRemoved ) ; |
public class Consortium { /** * Returns for given parameter < i > _ id < / i > the instance of class
* { @ link Consortium } .
* @ param _ id id to search in the cache
* @ return instance of class { @ link Consortium }
* @ throws CacheReloadException on error
* @ see # getCache */
public static Consortium get... | final Cache < Long , Consortium > cache = InfinispanCache . get ( ) . < Long , Consortium > getCache ( Consortium . IDCACHE ) ; if ( ! cache . containsKey ( _id ) && ! Consortium . getConsortiumFromDB ( Consortium . SQL_ID , _id ) ) { cache . put ( _id , Consortium . NULL , 100 , TimeUnit . SECONDS ) ; } final Consorti... |
public class Journal { /** * Complete the upgrade for local image storage with the given namespace . */
private void completeUpgradeImage ( NamespaceInfo nsInfo ) throws IOException { } } | Preconditions . checkState ( nsInfo . getNamespaceID ( ) != 0 , "can't upgrade with uninitialized namespace info: %s" , nsInfo . toColonSeparatedString ( ) ) ; LOG . info ( "Completing Upgrading image " + this . getJournalId ( ) + " with namespace info: (" + nsInfo . toColonSeparatedString ( ) + ")" ) ; // Do something... |
public class CmsXmlDisplayFormatterValue { /** * Returns the formatter config id . < p >
* @ return the formatter config id */
public CmsUUID getFormatterId ( ) { } } | String value = getStringValue ( null ) ; if ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( value ) ) { String [ ] parts = value . split ( SEPARATOR ) ; if ( parts . length == 2 ) { return new CmsUUID ( parts [ 1 ] ) ; } } return null ; |
public class PercentileBuckets { /** * Returns a copy of the bucket values array . */
public static long [ ] asArray ( ) { } } | long [ ] values = new long [ BUCKET_VALUES . length ] ; System . arraycopy ( BUCKET_VALUES , 0 , values , 0 , BUCKET_VALUES . length ) ; return values ; |
public class DesignDocumentManager { /** * Removes a design document from the database .
* @ param id the document id ( optionally prefixed with " _ design / " )
* @ return { @ link DesignDocument } */
public Response remove ( String id ) { } } | assertNotEmpty ( id , "id" ) ; id = ensureDesignPrefix ( id ) ; String revision = null ; // Get the revision ID from ETag , removing leading and trailing "
revision = client . executeRequest ( Http . HEAD ( new DatabaseURIHelper ( db . getDBUri ( ) ) . documentUri ( id ) ) ) . getConnection ( ) . getHeaderField ( "ETag... |
public class Assistant { /** * List workspaces .
* List the workspaces associated with a Watson Assistant service instance .
* This operation is limited to 500 requests per 30 minutes . For more information , see * * Rate limiting * * .
* @ param listWorkspacesOptions the { @ link ListWorkspacesOptions } containi... | String [ ] pathSegments = { "v1/workspaces" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listWorkspaces"... |
public class Field { /** * Find the right converter for this field on the given operation .
* @ param operation
* @ return a converter */
public Converter getConverter ( String operation ) { } } | // First we check " covnerters " list
Converter c = getConverters ( ) . getConverterForOperation ( operation ) ; if ( c == null ) { // if not found , we check configs
for ( FieldOperationConfig config : getConfigs ( ) ) { if ( config . includes ( operation ) ) { c = getPm ( ) . findExternalConverter ( config . getEconv... |
public class TokenStream { /** * Attempt to consume this current token and the next tokens if and only if they match the expected values , and return whether
* this method was indeed able to consume all of the supplied tokens .
* This is < i > not < / i > the same as calling { @ link # canConsume ( String ) } for e... | if ( completed ) return false ; ListIterator < Token > iter = tokens . listIterator ( tokenIterator . previousIndex ( ) ) ; Token token = null ; for ( String nextExpected : nextTokens ) { if ( ! iter . hasNext ( ) ) return false ; token = iter . next ( ) ; if ( nextExpected == ANY_VALUE ) continue ; if ( ! token . matc... |
public class FnLocalDate { /** * It converts a { @ link Calendar } into a { @ link LocalDate } in the given { @ link DateTimeZone }
* @ param dateTimeZone the the time zone ( { @ link DateTimeZone } ) to be used
* @ return the { @ link LocalDate } created from the input and arguments */
public static final < T exte... | return new CalendarToLocalDate < T > ( dateTimeZone ) ; |
public class ChecksumFileSystem { /** * Report a checksum error to the file system .
* @ param f the file name containing the error
* @ param in the stream open on the file
* @ param inPos the position of the beginning of the bad data in the file
* @ param sums the stream open on the checksum file
* @ param s... | return false ; |
public class KeyUtil { /** * 生成用于非对称加密的公钥和私钥 < br >
* 密钥对生成算法见 : https : / / docs . oracle . com / javase / 7 / docs / technotes / guides / security / StandardNames . html # KeyPairGenerator
* @ param algorithm 非对称加密算法
* @ param keySize 密钥模 ( modulus ) 长度
* @ param seed 种子
* @ param params { @ link AlgorithmP... | algorithm = getAlgorithmAfterWith ( algorithm ) ; final KeyPairGenerator keyPairGen = getKeyPairGenerator ( algorithm ) ; // 密钥模 ( modulus ) 长度初始化定义
if ( keySize > 0 ) { // key长度适配修正
if ( "EC" . equalsIgnoreCase ( algorithm ) && keySize > 256 ) { // 对于EC算法 , 密钥长度有限制 , 在此使用默认256
keySize = 256 ; } if ( null != seed ) { k... |
public class JsonParser { /** * 将Object序列化 ( 对于byte [ ] , 会将byte [ ] 用Base64编码一下 , 然后返回 , 相当于对该byte调用Base64的encode方法然后将结果返回 , 对于String
* 会直接将String返回 )
* @ param obj 要序列化的对象
* @ param ignoreNull 是否忽略空元素 , 如果为true为忽略
* @ return 序列化失败将返回空字符串 */
public String toJson ( Object obj , boolean ignoreNull ) { } } | if ( obj == null ) { return null ; } if ( obj instanceof String ) { return ( String ) obj ; } try { ObjectMapper mapper ; if ( ignoreNull ) { mapper = MAPPER_IGNORE_NULL ; } else { mapper = MAPPER ; } return mapper . writeValueAsString ( obj ) ; } catch ( Exception e ) { log . error ( "序列化失败,失败原因:" , e ) ; return "" ; ... |
public class PlayEngine { /** * Send seek status notification
* @ param item
* Playlist item
* @ param position
* Seek position */
private void sendSeekStatus ( IPlayItem item , int position ) { } } | Status seek = new Status ( StatusCodes . NS_SEEK_NOTIFY ) ; seek . setClientid ( streamId ) ; seek . setDetails ( item . getName ( ) ) ; seek . setDesciption ( String . format ( "Seeking %d (stream ID: %d)." , position , streamId ) ) ; doPushMessage ( seek ) ; |
public class ProjectReactorBuilder { /** * Transforms a comma - separated list String property in to a array of trimmed strings .
* This works even if they are separated by whitespace characters ( space char , EOL , . . . ) */
static String [ ] getListFromProperty ( Map < String , String > properties , String key ) {... | String propValue = properties . get ( key ) ; if ( propValue != null ) { return parseAsCsv ( key , propValue ) ; } return new String [ 0 ] ; |
public class LanguageJSONImpl { /** * / * package */
static ResponseList < HelpResources . Language > createLanguageList ( JSONArray list , HttpResponse res , Configuration conf ) throws TwitterException { } } | if ( conf . isJSONStoreEnabled ( ) ) { TwitterObjectFactory . clearThreadLocalMap ( ) ; } try { int size = list . length ( ) ; ResponseList < HelpResources . Language > languages = new ResponseListImpl < HelpResources . Language > ( size , res ) ; for ( int i = 0 ; i < size ; i ++ ) { JSONObject json = list . getJSONOb... |
public class AbstractGenericTreeNode { /** * This method adds the given { @ code child } to the { @ link # getChildren ( ) children } of this
* { @ link GenericTreeNode } .
* @ param child is the { @ link # getChildren ( ) child } to add . It ' s { @ link # getParent ( ) parent } has to be
* identical to this { @... | Objects . requireNonNull ( child , "child" ) ; if ( child . getParent ( ) != this ) { throw new IllegalArgumentException ( child . toString ( ) ) ; } this . mutableChildList . add ( child ) ; |
public class NameNode { /** * add new replica blocks to the Inode to target mapping
* also add the Inode file to DataNodeDesc */
public void blocksBeingWrittenReport ( DatanodeRegistration nodeReg , BlockReport blocks ) throws IOException { } } | verifyRequest ( nodeReg ) ; long [ ] blocksAsLong = blocks . getBlockReportInLongs ( ) ; BlockListAsLongs blist = new BlockListAsLongs ( blocksAsLong ) ; boolean processed = namesystem . processBlocksBeingWrittenReport ( nodeReg , blist ) ; String message = "*BLOCK* NameNode.blocksBeingWrittenReport: " + "from " + node... |
public class ModelAdapter { /** * Turns a changeset into a composite write attribute operation .
* @ param changeSet
* @ param bindings
* @ return composite operation */
@ Deprecated public static ModelNode detypedFromChangeset ( ModelNode prototype , Map < String , Object > changeSet , List < PropertyBinding > b... | // pre requesites
prototype . require ( ADDRESS ) ; prototype . require ( OP ) ; ModelNode operation = new ModelNode ( ) ; operation . get ( OP ) . set ( COMPOSITE ) ; operation . get ( ADDRESS ) . setEmptyList ( ) ; List < ModelNode > steps = new ArrayList < ModelNode > ( ) ; for ( PropertyBinding binding : bindings )... |
public class ManagedObject { /** * Convert serialized bytes back into a managed object .
* @ param serializedBytes the bytes that have been formed by previously serializing
* the ManagedObject .
* @ param objectManagerState of the objectManager reconstructing the ManagedObject .
* @ return ManagedObject that is... | String methodName = "restoreFromSerializedBytes" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( cclass , methodName , new Object [ ] { serializedBytes , objectManagerState } ) ; ManagedObject managedObjectToReturn = null ; java . io . ByteArrayInputStream byteArrayInputStream =... |
public class JobStatistics { /** * Print the Job Execution Statistics
* TODO : split to pring job , map / reduce task list and individual map / reduce task stats */
public void printJobExecutionStatistics ( ) { } } | /* * Print Job Counters */
System . out . println ( "JOB COUNTERS *********************************************" ) ; int size = this . _job . size ( ) ; java . util . Iterator < Map . Entry < Enum , String > > kv = this . _job . entrySet ( ) . iterator ( ) ; for ( int i = 0 ; i < size ; i ++ ) { Map . Entry < Enum , St... |
public class ProcessController { /** * Start an instance
* @ param home The home directory
* @ param options The options
* @ return True if started successfully ; otherwise false */
public boolean start ( String home , File options ) { } } | File homeDirectory = new File ( home ) ; if ( ! homeDirectory . exists ( ) ) return false ; stop ( home ) ; try { List < String > command = new ArrayList < String > ( ) ; command . add ( java ) ; command . add ( "-Dironjacamar.home=" + home ) ; if ( options != null && options . exists ( ) ) command . add ( "-Dironjacam... |
public class AWSWAFRegionalClient { /** * Attaches a IAM policy to the specified resource . The only supported use for this action is to share a RuleGroup
* across accounts .
* The < code > PutPermissionPolicy < / code > is subject to the following restrictions :
* < ul >
* < li >
* You can attach only one po... | request = beforeClientExecution ( request ) ; return executePutPermissionPolicy ( request ) ; |
public class HintManager { /** * Get table sharding values .
* @ param logicTable logic table name
* @ return table sharding values */
public static Collection < Comparable < ? > > getTableShardingValues ( final String logicTable ) { } } | return null == HINT_MANAGER_HOLDER . get ( ) ? Collections . < Comparable < ? > > emptyList ( ) : HINT_MANAGER_HOLDER . get ( ) . tableShardingValues . get ( logicTable ) ; |
public class ContentTypeNormaliserImpl { /** * EG : Content - Type : text / html ; charset = utf - 8 */
private String getEncoding ( final String contentType ) { } } | if ( contentType == null || ! contentType . contains ( CHARSET ) ) { return DEFAULT_ENCODING ; } String encoding = null ; try { encoding = contentType . substring ( contentType . indexOf ( CHARSET ) + CHARSET . length ( ) ) ; encoding = encoding . toLowerCase ( ) . replaceAll ( "\"" , "" ) ; } catch ( Exception e ) { /... |
public class Response { public ChannelFuture respond ( ) throws Exception { } } | // For chunked response , this method is only called to respond the 1st chunk ,
// next chunks are responded directly by respondXXX
if ( nonChunkedResponseOrFirstChunkSent ) throwDoubleResponseError ( ) ; // Run after filter
if ( server . after ( ) != null ) { server . after ( ) . run ( request , this ) ; } ChannelFutu... |
public class InjectionProviders { /** * Creates new supplier containing all providers in a new set .
* @ param suppliers
* vararg array of existing suppliers
* @ return new instance containing all providers */
private static InjectionProviderInstancesSupplier mergeSuppliers ( final InjectionProviderInstancesSuppl... | final Set < InjectionProvider < ? > > result = new LinkedHashSet < InjectionProvider < ? > > ( ) ; if ( suppliers != null && suppliers . length > 0 ) { for ( final InjectionProviderInstancesSupplier supplier : suppliers ) { result . addAll ( supplier . get ( ) ) ; } } return new InjectionProviderInstancesSupplier ( ) {... |
public class ScriptBuilderFragment { /** * Generate the script builder default implementation . */
protected void generateScriptBuilderImpl ( ) { } } | final List < StringConcatenationClient > topElements = generateTopElements ( false , false ) ; final TypeReference script = getScriptBuilderImpl ( ) ; final TypeReference scriptInterface = getScriptBuilderInterface ( ) ; final StringConcatenationClient content = new StringConcatenationClient ( ) { @ Override protected ... |
public class CacheInstance { /** * produces nice ascii text */
public String fancyFormat ( ) { } } | StringWriter sw = new StringWriter ( ) ; PrintWriter pw = new PrintWriter ( sw ) ; pw . println ( "[" + name + "]" ) ; for ( int i = 0 ; configEntries != null && i < configEntries . length ; i ++ ) { pw . println ( "[CacheEntry " + i + "]" ) ; pw . println ( configEntries [ i ] . fancyFormat ( ) ) ; } return sw . toStr... |
public class Quicksortables { /** * Returns the index of the median of the three indexed integers . */
private static int med3 ( Quicksortable q , int a , int b , int c ) { } } | return ( q . compare ( a , b ) < 0 ? ( q . compare ( b , c ) < 0 ? b : q . compare ( a , c ) < 0 ? c : a ) : ( q . compare ( b , c ) > 0 ? b : q . compare ( a , c ) > 0 ? c : a ) ) ; |
public class Client { /** * Make a PUT API call .
* @ param path
* The GET path . Include the GET parameters after ?
* @ param params
* The parameters to be passed in the body of the call as JSON
* @ return A JSON object .
* @ throws APIError
* If an error occurs . */
public JSONObject put ( String path ,... | return request ( Verb . PUT , path , params ) ; |
public class KeyEvent { /** * Get the special key representation , { @ link Keys } , of the supplied character if there is one . If
* there is no special key tied to this character , null will be returned .
* @ param key unicode character code
* @ return special key linked to the character code , or null if chara... | for ( Keys unicodeKey : Keys . values ( ) ) { if ( unicodeKey . charAt ( 0 ) == key ) { return unicodeKey ; } } return null ; |
public class ParserTrainer { /** * 保存模型
* 以序列化的方式保存模型
* @ param models
* 模型参数
* @ param factory
* @ throws IOException */
public static void saveModels ( String modelfile , Linear [ ] models , AlphabetFactory factory ) throws IOException { } } | ObjectOutputStream outstream = new ObjectOutputStream ( new GZIPOutputStream ( new FileOutputStream ( modelfile ) ) ) ; outstream . writeObject ( factory ) ; outstream . writeObject ( models ) ; outstream . close ( ) ; |
public class PreferenceFragment { /** * Initializes the preference , which allows to display the applications , which are suited for
* handling an intent . */
private void initializeShowIntentBottmSheetPreference ( ) { } } | Preference showIntentBottomSheetPreference = findPreference ( getString ( R . string . show_intent_bottom_sheet_preference_key ) ) ; showIntentBottomSheetPreference . setOnPreferenceClickListener ( new OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference preference ) { initializeInte... |
public class MigrationManager { /** * Sets the active migration if none is set and returns { @ code null } , otherwise returns the currently set active migration .
* Acquires the partition service lock . */
public MigrationInfo setActiveMigration ( MigrationInfo migrationInfo ) { } } | partitionServiceLock . lock ( ) ; try { if ( activeMigrationInfo == null ) { activeMigrationInfo = migrationInfo ; return null ; } if ( ! activeMigrationInfo . equals ( migrationInfo ) ) { if ( logger . isFineEnabled ( ) ) { logger . fine ( "Active migration is not set: " + migrationInfo + ". Existing active migration:... |
public class WikibaseDataEditor { /** * Updates statements of the given document . The document should be the
* current revision of the data that is to be updated . The updates are
* computed with respect to the data found in the document , making sure that
* no redundant deletions or duplicate insertions happen ... | StatementUpdate statementUpdate = new StatementUpdate ( currentDocument , addStatements , deleteStatements ) ; statementUpdate . setGuidGenerator ( guidGenerator ) ; if ( statementUpdate . isEmptyEdit ( ) ) { return currentDocument ; } else { return ( T ) this . wbEditingAction . wbEditEntity ( currentDocument . getEnt... |
public class MaskConverter { /** * Convert and move string to this field .
* @ param strString the state to set the data to .
* @ param bDisplayOption Display the data on the screen if true .
* @ param iMoveMode INIT , SCREEN , or READ move mode .
* @ return The error code ( or NORMAL _ RETURN ) . */
public int... | if ( ( strValue == null ) || ( strValue . length ( ) == 0 ) ) return super . setString ( strValue , bDisplayOption , iMoveMode ) ; // Don ' t trip change or display
if ( strValue . charAt ( 0 ) == FILLER ) return DBConstants . NORMAL_RETURN ; return super . setString ( strValue , bDisplayOption , iMoveMode ) ; |
public class StatementFusion { /** * Given a block , fuse a list of statements with comma ' s .
* @ param parent The parent that contains the statements .
* @ param first The first statement to fuse ( inclusive )
* @ param last The last statement to fuse ( exclusive )
* @ return A single statement that contains... | // Nothing to fuse if there is only one statement .
if ( first . getNext ( ) == last ) { return first ; } // Step one : Create a comma tree that contains all the statements .
Node commaTree = first . removeFirstChild ( ) ; Node next = null ; for ( Node cur = first . getNext ( ) ; cur != last ; cur = next ) { commaTree ... |
public class Selector { /** * Find elements matching selector .
* @ param query CSS selector
* @ param roots root elements to descend into
* @ return matching elements , empty if none */
public static Elements select ( String query , Iterable < Element > roots ) { } } | Validate . notEmpty ( query ) ; Validate . notNull ( roots ) ; Evaluator evaluator = QueryParser . parse ( query ) ; ArrayList < Element > elements = new ArrayList < > ( ) ; IdentityHashMap < Element , Boolean > seenElements = new IdentityHashMap < > ( ) ; // dedupe elements by identity , not equality
for ( Element roo... |
public class GetUrlTaskRunner { /** * Build URL */
public String performTask ( String taskParameters ) { } } | GetUrlTaskParameters taskParams = GetUrlTaskParameters . deserialize ( taskParameters ) ; String spaceId = taskParams . getSpaceId ( ) ; String contentId = taskParams . getContentId ( ) ; String resourcePrefix = taskParams . getResourcePrefix ( ) ; log . info ( "Performing " + TASK_NAME + " task with parameters: spaceI... |
public class RqAuth { /** * Authenticated user .
* @ return User identity
* @ throws IOException If fails */
public Identity identity ( ) throws IOException { } } | final Iterator < String > headers = new RqHeaders . Base ( this ) . header ( this . header ) . iterator ( ) ; final Identity user ; if ( headers . hasNext ( ) ) { user = new CcPlain ( ) . decode ( new Utf8String ( headers . next ( ) ) . asBytes ( ) ) ; } else { user = Identity . ANONYMOUS ; } return user ; |
public class PrincipalNameTransformerUtils { /** * New principal name transformer .
* @ param p the p
* @ return the principal name transformer */
public static PrincipalNameTransformer newPrincipalNameTransformer ( final PrincipalTransformationProperties p ) { } } | val chain = new ChainingPrincipalNameTransformer ( ) ; if ( p . getGroovy ( ) . getLocation ( ) != null ) { val t = new GroovyPrincipalNameTransformer ( p . getGroovy ( ) . getLocation ( ) ) ; chain . addTransformer ( t ) ; } if ( StringUtils . isNotBlank ( p . getPattern ( ) ) ) { val t = new RegexPrincipalNameTransfo... |
public class IdGenerator { /** * Generates a 64 - bit id .
* Format : { @ code < 41 - bit : timestamp > < 10 - bit : node - id > < 13 - bit : sequence - number > } . Where
* { @ code timestamp } is in milliseconds , minus the epoch .
* @ return */
synchronized public long generateId64 ( ) { } } | long timestamp = System . currentTimeMillis ( ) ; long sequence = 0 ; boolean done = false ; while ( ! done ) { done = true ; while ( timestamp < lastTimestampMillisec . get ( ) ) { timestamp = waitTillNextMillisec ( timestamp ) ; } if ( timestamp == lastTimestampMillisec . get ( ) ) { // increase sequence
sequence = s... |
public class Offer { /** * Accepts the offer .
* @ throws NotConnectedException
* @ throws InterruptedException */
public void accept ( ) throws NotConnectedException , InterruptedException { } } | Stanza acceptPacket = new AcceptPacket ( this . session . getWorkgroupJID ( ) ) ; connection . sendStanza ( acceptPacket ) ; // TODO : listen for a reply .
accepted = true ; |
public class CommerceUserSegmentCriterionLocalServiceBaseImpl { /** * Returns the number of rows matching the dynamic query .
* @ param dynamicQuery the dynamic query
* @ param projection the projection to apply to the query
* @ return the number of rows matching the dynamic query */
@ Override public long dynami... | return commerceUserSegmentCriterionPersistence . countWithDynamicQuery ( dynamicQuery , projection ) ; |
public class NCBIQBlastService { /** * Converts given GenBank GID to String and calls
* { @ link # sendAlignmentRequest ( String , RemotePairwiseAlignmentProperties ) } */
public String sendAlignmentRequest ( int gid , RemotePairwiseAlignmentProperties rpa ) throws Exception { } } | return sendAlignmentRequest ( Integer . toString ( gid ) , rpa ) ; |
public class HttpHeaders { /** * @ deprecated Use { @ link # set ( CharSequence , Object ) } instead .
* @ see # setHeader ( HttpMessage , CharSequence , Object ) */
@ Deprecated public static void setHeader ( HttpMessage message , String name , Object value ) { } } | message . headers ( ) . set ( name , value ) ; |
public class Envelope { /** * / * When you set a point , all subsequent points are reset . */
public void set_point ( int point , int tick , int ampl ) { } } | if ( point >= 0 && point < ticks . length ) { if ( point == 0 ) { tick = 0 ; } if ( point > 0 ) { if ( tick < ticks [ point - 1 ] ) { /* Simple guess at where the point is supposed to be . */
tick += 256 ; } if ( tick <= ticks [ point - 1 ] ) { System . out . println ( "Envelope: Point not valid (" + tick + " <= " + ti... |
public class CsvFileExtensions { /** * Read an csv - file and puts them in a String - array .
* @ param csvData
* The csv - file with the data .
* @ param encoding
* The encoding to read .
* @ return The data from the csv - file as a String - array .
* @ throws FileNotFoundException
* the file not found e... | final List < String > fn = new ArrayList < > ( ) ; try ( BufferedReader reader = ( BufferedReader ) StreamExtensions . getReader ( csvData , encoding , false ) ) { // the line .
String line = null ; int index , last ; // read all lines from the file
do { line = reader . readLine ( ) ; // if null break the loop
if ( lin... |
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertIOBXoaOrentToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class DateFormat { /** * Format a date using { @ link JsonSerializerParameters } or default values : { @ link # DATE _ FORMAT _ STR _ ISO8601 } and { @ link # UTC _ TIMEZONE }
* @ param date date to format
* @ return the formatted date
* @ param params a { @ link com . github . nmorel . gwtjackson . client... | DateTimeFormat format ; if ( null == params . getPattern ( ) ) { format = DateFormat . DATE_FORMAT_STR_ISO8601 ; } else { format = DateTimeFormat . getFormat ( params . getPattern ( ) ) ; } TimeZone timeZone ; if ( null == params . getTimezone ( ) ) { timeZone = DateFormat . UTC_TIMEZONE ; } else { timeZone = params . ... |
public class ProgramChromosome { /** * Create a new program chromosome with the defined depth . This method will
* create a < em > full < / em > program tree .
* @ param depth the depth of the created ( full ) program tree
* @ param operations the allowed non - terminal operations
* @ param terminals the allowe... | return of ( depth , ( Predicate < ? super ProgramChromosome < A > > & Serializable ) ProgramChromosome :: isSuperValid , operations , terminals ) ; |
public class IntTupleStreams { /** * Returns a stream that returns { @ link MutableIntTuple } s in the given
* range , in colexicographical iteration order . < br >
* < br >
* Copies of the given tuples will be stored internally . < br >
* < br >
* Also see < a href = " . . / . . / package - summary . html # ... | return stream ( Order . COLEXICOGRAPHICAL , min , max ) ; |
public class ExtForwFeatureImpl { /** * ( non - Javadoc )
* @ see org . restcomm . protocols . ss7 . map . primitives . MAPAsnPrimitive # encodeData ( org . mobicents . protocols . asn . AsnOutputStream ) */
public void encodeData ( AsnOutputStream asnOs ) throws MAPException { } } | if ( this . ssStatus == null ) throw new MAPException ( "Error while encoding " + _PrimitiveName + ": ssStatus required." ) ; try { if ( this . basicService != null ) ( ( ExtBasicServiceCodeImpl ) this . basicService ) . encodeAll ( asnOs ) ; ( ( ExtSSStatusImpl ) this . ssStatus ) . encodeAll ( asnOs , Tag . CLASS_CON... |
public class LittleEndianDataInputStream { /** * / * ( non - Javadoc )
* @ see java . io . DataInput # readFully ( byte [ ] ) */
@ Override public void readFully ( byte [ ] b ) throws IOException { } } | if ( inner . read ( b ) < b . length ) { throw new EOFException ( ) ; } |
public class SystemPropertiesEnvHolder { /** * 设置配置信息 */
public String set ( String key , String value ) { } } | return System . setProperty ( key , value ) ; |
public class PatternStream { /** * Applies a process function to the detected pattern sequence . For each pattern sequence the
* provided { @ link PatternProcessFunction } is called . In order to process timed out partial matches as well one can
* use { @ link TimedOutPartialMatchHandler } as additional interface .... | final TypeInformation < R > returnType = TypeExtractor . getUnaryOperatorReturnType ( patternProcessFunction , PatternProcessFunction . class , 0 , 1 , TypeExtractor . NO_INDEX , builder . getInputType ( ) , null , false ) ; return process ( patternProcessFunction , returnType ) ; |
public class GAEUtils { /** * Look in all jars located inside / WEB - INF / lib / folder for files that has
* some specified prefix and suffix . It is a simplification that can be done
* in GAE , because no JSF libraries are outside / WEB - INF / lib
* @ param context
* @ param classloader
* @ param prefix
... | if ( ! filter . equals ( "none" ) ) { String [ ] jarFilesToScan = StringUtils . trim ( StringUtils . splitLongString ( filter , ',' ) ) ; Set < URL > urlSet = null ; Set < String > paths = context . getResourcePaths ( WEB_LIB_PREFIX ) ; if ( paths != null ) { for ( Object pathObject : paths ) { String path = ( String )... |
public class CmsSecurityManager { /** * Moves a resource . < p >
* You must ensure that the destination path is an absolute , valid and
* existing VFS path . Relative paths from the source are currently not supported . < p >
* The moved resource will always be locked to the current user
* after the move operati... | CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; try { checkOfflineProject ( dbc ) ; // checking if the destination folder exists and is not marked as deleted
readResource ( context , CmsResource . getParentFolder ( destination ) , CmsResourceFilter . IGNORE_EXPIRATION ) ; checkPermissions ( dbc , sou... |
public class AbstractAzkabanServlet { /** * Creates a new velocity page to use . */
protected Page newPage ( final HttpServletRequest req , final HttpServletResponse resp , final String template ) { } } | final Page page = new Page ( req , resp , getApplication ( ) . getVelocityEngine ( ) , template ) ; page . add ( "version" , jarVersion ) ; page . add ( "azkaban_name" , this . name ) ; page . add ( "azkaban_label" , this . label ) ; page . add ( "azkaban_color" , this . color ) ; page . add ( "note_type" , NoteServlet... |
public class RedundentExprEliminator { /** * Create a new WalkingIterator from the steps in another WalkingIterator .
* @ param wi The iterator from where the steps will be taken .
* @ param numSteps The number of steps from the first to copy into the new
* iterator .
* @ return The new iterator . */
protected ... | WalkingIterator newIter = new WalkingIterator ( wi . getPrefixResolver ( ) ) ; try { AxesWalker walker = ( AxesWalker ) wi . getFirstWalker ( ) . clone ( ) ; newIter . setFirstWalker ( walker ) ; walker . setLocPathIterator ( newIter ) ; for ( int i = 1 ; i < numSteps ; i ++ ) { AxesWalker next = ( AxesWalker ) walker ... |
public class AnnotationVisitor { /** * Visit annotation on a method parameter
* @ param p
* parameter number , starting at zero ( " this " parameter is not
* counted )
* @ param annotationClass
* class of annotation
* @ param map
* map from names to values
* @ param runtimeVisible
* true if annotation... | |
public class Item { /** * Returns the value of the specified attribute in the current item as a
* string ; or null if the attribute either doesn ' t exist or the attribute
* value is null .
* @ see # isNull ( String ) # isNull ( String ) to check if the attribute value is
* null .
* @ see # isPresent ( String... | Object val = attributes . get ( attrName ) ; return valToString ( val ) ; |
public class VaadinForHeroku { /** * Add an application listener to the configuration of the server .
* @ param listeners the application listener ( s ) to add to the server configuration .
* @ since 0.3 */
public VaadinForHeroku withApplicationListener ( final String ... listeners ) { } } | checkVarArgsArguments ( listeners ) ; this . applicationListeners . addAll ( Arrays . asList ( listeners ) ) ; return self ( ) ; |
public class ChainWriter { /** * Encodes a javascript string for use in an XML attribute context . Quotes
* are added around the string . Also , if the string is translated , comments
* will be added giving the translation lookup id to aid in translation of
* server - translated values in JavaScript .
* @ see C... | // Two stage encoding :
// 1 ) Text - > JavaScript ( with quotes added )
// 2 ) JavaScript - > XML Attribute
if ( value instanceof Writable && ! ( ( Writable ) value ) . isFastToString ( ) ) { // Avoid unnecessary toString calls
textInJavaScriptEncoder . writePrefixTo ( javaScriptInXhtmlAttributeWriter ) ; Coercion . w... |
public class ButtonRenderer { /** * Renders the Javascript code dealing with the click event . If the
* developer provides their own onclick handler , is precedes the generated
* Javascript code .
* @ param context
* The current FacesContext .
* @ param attrs
* the attribute list
* @ return some Javascrip... | String js ; String userClick = button . getOnclick ( ) ; if ( userClick != null ) { js = userClick ; } // + COLON ; }
else { js = "" ; } String fragment = button . getFragment ( ) ; String outcome = button . getOutcome ( ) ; if ( null != outcome && outcome . contains ( "#" ) ) { if ( null != fragment && fragment . leng... |
public class ArrowButtonPainter { /** * Paint the arrow in disabled state .
* @ param g the Graphics2D context to paint with .
* @ param width the width .
* @ param height the height . */
private void paintForegroundDisabled ( Graphics2D g , int width , int height ) { } } | Shape s = decodeArrowPath ( width , height ) ; g . setPaint ( disabledColor ) ; g . fill ( s ) ; |
public class GrailsClassUtils { /** * Retrieves a boolean value from a Map for the given key
* @ param key The key that references the boolean value
* @ param map The map to look in
* @ return A boolean value which will be false if the map is null , the map doesn ' t contain the key or the value is false */
publi... | if ( map == null ) return defaultValue ; if ( map . containsKey ( key ) ) { Object o = map . get ( key ) ; if ( o == null ) { return defaultValue ; } if ( o instanceof Boolean ) { return ( Boolean ) o ; } return Boolean . valueOf ( o . toString ( ) ) ; } return defaultValue ; |
public class GetRepresentatives { /** * Returns a representative set of PDB protein chains at the specified sequence
* identity cutoff . See http : / / www . pdb . org / pdb / statistics / clusterStatistics . do
* for more information .
* @ param sequenceIdentity sequence identity threshold
* @ return PdbChainK... | SortedSet < StructureName > representatives = new TreeSet < StructureName > ( ) ; if ( ! seqIdentities . contains ( sequenceIdentity ) ) { System . err . println ( "Error: representative chains are not available for %sequence identity: " + sequenceIdentity ) ; return representatives ; } try { URL u = new URL ( clusterU... |
public class Cob2AvroGenerator { /** * Given an Avro schema produce java specific classes .
* @ param avroSchemaFile the Avro schema file ( used by avro for timestamp
* checking )
* @ param avroSchemaSource the Avro schema source
* @ param javaTargetFolder the target folder for java classes
* @ throws IOExcep... | log . debug ( "Avro compiler started for: {}" , avroSchemaFile ) ; Schema . Parser parser = new Schema . Parser ( ) ; Schema schema = parser . parse ( avroSchemaSource ) ; SpecificCompiler compiler = new CustomSpecificCompiler ( schema ) ; compiler . setStringType ( StringType . CharSequence ) ; compiler . compileToDes... |
public class JsonDiff { /** * Returns the comparator for the give field , and nodes . This method can be
* overriden to customize comparison logic . */
public JsonComparator getComparator ( List < String > context , JsonNode node1 , JsonNode node2 ) { } } | if ( node1 == null ) { if ( node2 == null ) { return NODIFF_CMP ; } else { return null ; } } else if ( node2 == null ) { return null ; } else { if ( node1 instanceof NullNode ) { if ( node2 instanceof NullNode ) { return NODIFF_CMP ; } else { return null ; } } else if ( node2 instanceof NullNode ) { return null ; } // ... |
public class NetUtils { /** * Returns a valid address for Akka . It returns a String of format ' host : port ' .
* When an IPv6 address is specified , it normalizes the IPv6 address to avoid
* complications with the exact URL match policy of Akka .
* @ param host The hostname , IPv4 or IPv6 address
* @ param po... | Preconditions . checkArgument ( port >= 0 && port < 65536 , "Port is not within the valid range," ) ; return unresolvedHostToNormalizedString ( host ) + ":" + port ; |
public class PersonaAuthorizer { /** * / * package */
static Map < String , Object > parseAssertion ( String assertion ) { } } | // https : / / github . com / mozilla / id - specs / blob / prod / browserid / index . md
// http : / / self - issued . info / docs / draft - jones - json - web - token - 04 . html
Map < String , Object > result = new HashMap < String , Object > ( ) ; String [ ] components = assertion . split ( "\\." ) ; // split on " ... |
public class DynamicJasperHelper { /** * Creates a jrxml file
* @ param dr
* @ param layoutManager
* @ param _ parameters
* @ param xmlEncoding ( default is UTF - 8 )
* @ param outputStream
* @ throws JRException */
public static void generateJRXML ( DynamicReport dr , LayoutManager layoutManager , Map _par... | JasperReport jr = generateJasperReport ( dr , layoutManager , _parameters ) ; if ( xmlEncoding == null ) xmlEncoding = DEFAULT_XML_ENCODING ; JRXmlWriter . writeReport ( jr , outputStream , xmlEncoding ) ; |
public class Viewport { /** * Adds a { @ link BlurEvent } handler .
* @ param handler the handler
* @ return returns the handler registration */
@ Override public HandlerRegistration addBlurHandler ( BlurHandler handler ) { } } | return ensureHandlers ( ) . addHandler ( BlurEvent . getType ( ) , handler ) ; |
public class CSVInputMarshaller { /** * Marshall the given parameter object . */
public void marshall ( CSVInput cSVInput , ProtocolMarshaller protocolMarshaller ) { } } | if ( cSVInput == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( cSVInput . getFileHeaderInfo ( ) , FILEHEADERINFO_BINDING ) ; protocolMarshaller . marshall ( cSVInput . getComments ( ) , COMMENTS_BINDING ) ; protocolMarshaller . marshall ( ... |
public class SingleDbJDBCConnection { /** * { @ inheritDoc } */
@ Override protected int addReference ( PropertyData data ) throws SQLException , IOException , InvalidItemStateException , RepositoryException { } } | List < ValueData > values = data . getValues ( ) ; int added = 0 ; for ( int i = 0 ; i < values . size ( ) ; i ++ ) { ValueData vdata = values . get ( i ) ; String refNodeIdentifier ; try { refNodeIdentifier = ValueDataUtil . getString ( vdata ) ; } catch ( RepositoryException e ) { throw new IOException ( e . getMessa... |
public class Manager { /** * Sets the target resolver .
* @ param targetHandlerResolver a resolver for target handlers */
public void setTargetResolver ( ITargetHandlerResolver targetHandlerResolver ) { } } | if ( targetHandlerResolver == null ) { this . targetConfigurator . setTargetHandlerResolver ( this . defaultTargetHandlerResolver ) ; this . instancesMngr . setTargetHandlerResolver ( this . defaultTargetHandlerResolver ) ; } else { this . targetConfigurator . setTargetHandlerResolver ( targetHandlerResolver ) ; this .... |
public class CoreTransactionService { /** * Completes a transaction by modifying the transaction state to change ownership to this member and then completing
* the transaction based on the existing transaction state . */
@ SuppressWarnings ( "unchecked" ) private CompletableFuture < Void > completeTransaction ( Trans... | return transactions . compute ( transactionId , ( id , info ) -> { if ( info == null ) { return null ; } else if ( info . state == expectState ) { return updateFunction . apply ( info ) ; } else { return info ; } } ) . thenCompose ( value -> { if ( value != null && updatedPredicate . test ( value . value ( ) ) ) { retu... |
public class CmsEncoder { /** * Encodes all characters that are contained in the String which can not displayed
* in the given encodings charset with HTML entity references
* like < code > & amp ; # 8364 ; < / code > . < p >
* This is required since a Java String is
* internally always stored as Unicode , meani... | StringBuffer result = new StringBuffer ( input . length ( ) * 2 ) ; CharBuffer buffer = CharBuffer . wrap ( input . toCharArray ( ) ) ; Charset charset = Charset . forName ( encoding ) ; CharsetEncoder encoder = charset . newEncoder ( ) ; for ( int i = 0 ; i < buffer . length ( ) ; i ++ ) { int c = buffer . get ( i ) ;... |
public class MultiDexHelper { /** * get all the classes name in " classes . dex " , " classes2 . dex " , . . . .
* @ return all the classes name
* @ throws PackageManager . NameNotFoundException
* @ throws IOException */
public static List < String > getAllClasses ( ) throws PackageManager . NameNotFoundException... | List < String > classNames = new ArrayList < > ( ) ; for ( String path : getSourcePaths ( ) ) { try { DexFile dexfile ; if ( path . endsWith ( EXTRACTED_SUFFIX ) ) { // NOT use new DexFile ( path ) , because it will throw " permission error in / data / dalvik - cache "
dexfile = DexFile . loadDex ( path , path + ".tmp"... |
public class Communications { /** * Returns received stations as per 1371-4 . pdf .
* @ param extractor
* @ param slotTimeout
* @ param startIndex
* @ return */
@ VisibleForTesting static Integer getReceivedStations ( AisExtractor extractor , int slotTimeout , int startIndex ) { } } | if ( slotTimeout == 3 || slotTimeout == 5 || slotTimeout == 7 ) return extractor . getValue ( startIndex + 5 , startIndex + 19 ) ; else return null ; |
public class IteratorExtensions { /** * Returns an Iterator of Pairs where the nth pair is created by taking the nth element of the source as the value
* and its 0 - based index as the key . E . g .
* < code > zipWitIndex ( # [ " a " , " b " , " c " ] ) = = # [ ( 0 , " a " ) , ( 1 , " b " ) , ( 2 , " c " ) ] < / co... | if ( iterator == null ) throw new NullPointerException ( "iterator" ) ; return new AbstractIterator < Pair < Integer , A > > ( ) { int i = 0 ; @ Override protected Pair < Integer , A > computeNext ( ) { if ( iterator . hasNext ( ) ) { Pair < Integer , A > next = new Pair < Integer , A > ( i , iterator . next ( ) ) ; if... |
public class KickflipApiClient { /** * Send Stream Metadata for a { @ link io . kickflip . sdk . api . json . Stream } .
* The target Stream must be owned by the User created with { @ link io . kickflip . sdk . api . KickflipApiClient # createNewUser ( KickflipCallback ) }
* from this KickflipApiClient .
* @ para... | if ( ! assertActiveUserAvailable ( cb ) ) return ; GenericData data = new GenericData ( ) ; data . put ( "stream_id" , stream . getStreamId ( ) ) ; data . put ( "uuid" , getActiveUser ( ) . getUUID ( ) ) ; if ( stream . getTitle ( ) != null ) { data . put ( "title" , stream . getTitle ( ) ) ; } if ( stream . getDescrip... |
public class Callbacks { /** * Creates a chained callback that calls the supplied pre - operation before passing the result
* on to the supplied target callback . */
public static < T > AsyncCallback < T > before ( AsyncCallback < T > target , final Function < T , Void > preOp ) { } } | return new ChainedCallback < T , T > ( target ) { @ Override public void onSuccess ( T result ) { preOp . apply ( result ) ; forwardSuccess ( result ) ; } } ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.