signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Factories { /** * Creates a new instance of a class whose full qualified name is specified under the given key . * < br / > * The class will be loaded using the current context ClassLoader . * < br / > * If the given settings is null , or it does not contain the specified key , the default value of...
// Workaround for compiler bug ( # 6302954) return Factories . < T > newInstance ( settings , key , Thread . currentThread ( ) . getContextClassLoader ( ) ) ;
public class AvailabilityForecast { /** * Sets the targetingCriteriaBreakdowns value for this AvailabilityForecast . * @ param targetingCriteriaBreakdowns * The forecast result broken down by the targeting of the forecasted * line item . */ public void setTargetingCriteriaBreakdowns ( com . google . api . ads . adm...
this . targetingCriteriaBreakdowns = targetingCriteriaBreakdowns ;
public class Unmarshaller { /** * Unamrshals the identifier . * @ throws Throwable * propagated */ private void unmarshalIdentifier ( ) throws Throwable { } }
IdentifierMetadata identifierMetadata = entityMetadata . getIdentifierMetadata ( ) ; Object id = ( ( Key ) nativeEntity . getKey ( ) ) . getNameOrId ( ) ; // If the ID is not a simple type . . . IdClassMetadata idClassMetadata = identifierMetadata . getIdClassMetadata ( ) ; if ( idClassMetadata != null ) { Object wrapp...
public class WebUtils { /** * 使用指定的字符集编码请求参数值 。 * @ param value 参数值 * @ param charset 字符集 * @ return 编码后的参数值 */ public static String encode ( String value , String charset ) { } }
String result = null ; if ( ! StringUtils . isEmpty ( value ) ) { try { result = URLEncoder . encode ( value , charset ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } return result ;
public class DeepEquals { /** * Get a deterministic hashCode ( int ) value for an Object , regardless of * when it was created or where it was loaded into memory . The problem * with java . lang . Object . hashCode ( ) is that it essentially relies on * memory location of an object ( what identity it was assigned...
Set < Object > visited = new HashSet < > ( ) ; LinkedList < Object > stack = new LinkedList < > ( ) ; stack . addFirst ( obj ) ; int hash = 0 ; while ( ! stack . isEmpty ( ) ) { obj = stack . removeFirst ( ) ; if ( obj == null || visited . contains ( obj ) ) { continue ; } visited . add ( obj ) ; if ( obj . getClass ( ...
public class LanguageServiceClient { /** * Finds named entities ( currently proper names and common nouns ) in the text along with entity * types , salience , mentions for each entity , and other properties . * < p > Sample code : * < pre > < code > * try ( LanguageServiceClient languageServiceClient = Language...
AnalyzeEntitiesRequest request = AnalyzeEntitiesRequest . newBuilder ( ) . setDocument ( document ) . build ( ) ; return analyzeEntities ( request ) ;
public class DateUtil { /** * 将长整型数字转换为日期格式的字符串 */ public static String convert2String ( long time , String format ) { } }
if ( time > 0l ) { if ( StringUtil . isEmpty ( format ) ) format = dateTimeFormat ; SimpleDateFormat sf = new SimpleDateFormat ( format ) ; Date date = new Date ( time ) ; return sf . format ( date ) ; } return "" ;
public class ChronoLocalDateImpl { /** * Returns a copy of this date with the specified number of months subtracted . * This subtracts the specified period in months to the date . * In some cases , subtracting months can cause the resulting date to become invalid . * If this occurs , then other fields , typically...
return ( monthsToSubtract == Long . MIN_VALUE ? ( ( ChronoLocalDateImpl < D > ) plusMonths ( Long . MAX_VALUE ) ) . plusMonths ( 1 ) : plusMonths ( - monthsToSubtract ) ) ;
public class IRFactory { /** * Try / Catch / Finally * The IRFactory tries to express as much as possible in the tree ; * the responsibilities remaining for Codegen are to add the Java * handlers : ( Either ( but not both ) of TARGET and FINALLY might not * be defined ) * - a catch handler for javascript exce...
boolean hasFinally = ( finallyBlock != null ) && ( finallyBlock . getType ( ) != Token . BLOCK || finallyBlock . hasChildren ( ) ) ; // short circuit if ( tryBlock . getType ( ) == Token . BLOCK && ! tryBlock . hasChildren ( ) && ! hasFinally ) { return tryBlock ; } boolean hasCatch = catchBlocks . hasChildren ( ) ; //...
public class FastAdapter { /** * wraps notifyDataSetChanged */ public void notifyAdapterDataSetChanged ( ) { } }
// handle our extensions for ( IAdapterExtension < Item > ext : mExtensions . values ( ) ) { ext . notifyAdapterDataSetChanged ( ) ; } cacheSizes ( ) ; notifyDataSetChanged ( ) ;
public class CommerceCurrencyUtil { /** * Removes the commerce currency where groupId = & # 63 ; and code = & # 63 ; from the database . * @ param groupId the group ID * @ param code the code * @ return the commerce currency that was removed */ public static CommerceCurrency removeByG_C ( long groupId , String co...
return getPersistence ( ) . removeByG_C ( groupId , code ) ;
public class BaseXmlExporter { /** * { @ inheritDoc } */ public void visit ( NodeData node ) throws RepositoryException { } }
try { entering ( node , currentLevel ) ; if ( ( maxLevel == - 1 ) || ( currentLevel < maxLevel ) ) { currentLevel ++ ; List < PropertyData > properies = new ArrayList < PropertyData > ( dataManager . getChildPropertiesData ( node ) ) ; // Sorting properties Collections . sort ( properies , new PropertyDataOrderComparat...
public class SftpClient { /** * Called by putFileMatches ( ) to do regular expression pattern matching on * the files in ' local ' ' s parent directory . * @ param local * @ return String [ ] * @ throws SftpStatusException * @ throws SshException */ private String [ ] matchLocalFiles ( String local ) throws S...
// Resolve the search path as it may not be CWD String actualDir ; String actualSearch ; int fileSeparatorIndex ; if ( ( fileSeparatorIndex = local . lastIndexOf ( System . getProperty ( "file.separator" ) ) ) > - 1 || ( fileSeparatorIndex = local . lastIndexOf ( '/' ) ) > - 1 ) { actualDir = resolveLocalPath ( local ....
public class CorporationApi { /** * Get corporation medals Returns a corporation & # 39 ; s medals - - - This route * is cached for up to 3600 seconds SSO Scope : * esi - corporations . read _ medals . v1 * @ param corporationId * An EVE corporation ID ( required ) * @ param datasource * The server name you...
ApiResponse < List < CorporationMedalsResponse > > resp = getCorporationsCorporationIdMedalsWithHttpInfo ( corporationId , datasource , ifNoneMatch , page , token ) ; return resp . getData ( ) ;
public class GroupMember { /** * Change the data stored in this instance ' s node * @ param data new data ( cannot be null ) */ public void setThisData ( byte [ ] data ) { } }
try { pen . setData ( data ) ; } catch ( Exception e ) { ThreadUtils . checkInterrupted ( e ) ; Throwables . propagate ( e ) ; }
public class Trace { /** * false or null first ( client first ) */ static int compareShared ( Span left , Span right ) { } }
// If either are shared put it last boolean leftShared = Boolean . TRUE . equals ( left . shared ( ) ) ; boolean rightShared = Boolean . TRUE . equals ( right . shared ( ) ) ; if ( leftShared && rightShared ) return 0 ; // both are shared , so skip out if ( leftShared ) return 1 ; if ( rightShared ) return - 1 ; // nei...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcHeatFluxDensityMeasure ( ) { } }
if ( ifcHeatFluxDensityMeasureEClass == null ) { ifcHeatFluxDensityMeasureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 812 ) ; } return ifcHeatFluxDensityMeasureEClass ;
public class JBossModuleUtils { /** * Populate a module spec builder with a dependencies on other modules . * @ param moduleSpecBuilder builder to populate * @ param moduleImportFilterPaths paths valid for importing into the module being built . * Can be null or empty to indicate that no filters should be applied...
Objects . requireNonNull ( moduleSpecBuilder , "moduleSpecBuilder" ) ; PathFilter moduleImportFilters = buildFilters ( moduleImportFilterPaths , false ) ; PathFilter dependencyExportFilters = buildFilters ( dependencyExportFilterPaths , false ) ; PathFilter importFilters = PathFilters . all ( dependencyExportFilters , ...
public class CouchbaseCore { /** * Helper method to dispatch internal requests accordingly , without going to the { @ link Disruptor } . * This makes sure that certain prioritized requests ( adding / removing services / nodes ) gets done , even when the * { @ link RingBuffer } is swamped with requests during failur...
if ( request instanceof GetConfigProviderRequest ) { request . observable ( ) . onNext ( new GetConfigProviderResponse ( configProvider ) ) ; request . observable ( ) . onCompleted ( ) ; } else if ( request instanceof AddNodeRequest ) { // we do not have access to the alternate here at this point , so just pass in null...
public class JaxRsPatientRestProvider { /** * START SNIPPET : jax - rs - provider - operation */ @ GET @ Path ( "/{id}/$someCustomOperation" ) public Response someCustomOperationUsingGet ( @ PathParam ( "id" ) String id , String resource ) throws Exception { } }
return customOperation ( resource , RequestTypeEnum . GET , id , "$someCustomOperation" , RestOperationTypeEnum . EXTENDED_OPERATION_INSTANCE ) ;
public class PseudoWordContextExtractor { /** * { @ inheritDoc } */ public void processDocument ( BufferedReader document , Wordsi wordsi ) { } }
Queue < String > prevWords = new ArrayDeque < String > ( ) ; Queue < String > nextWords = new ArrayDeque < String > ( ) ; Queue < String > nextRealWord = new ArrayDeque < String > ( ) ; Iterator < String > it = IteratorFactory . tokenizeOrdered ( document ) ; // Fill up the words after the context so that when the real...
public class PDBFileParser { /** * Handler for ATOM . * Record Format : * < pre > * ATOM 1 N ASP A 15 110.964 24.941 59.191 1.00 83.44 N * COLUMNS DATA TYPE FIELD DEFINITION * 1 - 6 Record name " ATOM " * 7 - 11 Integer serial Atom serial number . * 13 - 16 Atom name Atom name . * 17 Character altLoc Al...
if ( params . isHeaderOnly ( ) ) return ; // let ' s first get the chain name which will serve to identify if we are starting a new molecule String chainName = line . substring ( 21 , 22 ) ; if ( chainName . equals ( " " ) ) { blankChainIdsPresent = true ; } if ( currentChain != null && ! currentChain . getName ( ) . e...
public class Distance { /** * Gets the Squared Euclidean distance between two points . * @ param p IntPoint with X and Y axis coordinates . * @ param q IntPoint with X and Y axis coordinates . * @ return The Squared euclidean distance between x and y . */ public static double SquaredEuclidean ( IntPoint p , IntPo...
double dx = q . x - p . x ; double dy = q . y - p . y ; return dx * dx + dy * dy ;
public class HBaseRequestAdapter { /** * < p > adapt . < / p > * @ param increment a { @ link Increment } object . * @ return a { @ link ReadModifyWriteRow } object . */ public ReadModifyWriteRow adapt ( Increment increment ) { } }
ReadModifyWriteRow readModifyWriteRow = ReadModifyWriteRow . create ( bigtableTableName . getTableId ( ) , ByteString . copyFrom ( increment . getRow ( ) ) ) ; Adapters . INCREMENT_ADAPTER . adapt ( increment , readModifyWriteRow ) ; return readModifyWriteRow ;
public class DOMBuilder { /** * Tell if the current node is outside the document element . * @ return true if the current node is outside the document element . */ private boolean isOutsideDocElem ( ) { } }
return ( null == m_docFrag ) && m_elemStack . size ( ) == 0 && ( null == m_currentNode || m_currentNode . getNodeType ( ) == Node . DOCUMENT_NODE ) ;
public class TitlePaneCloseButtonPainter { /** * Create the shape for the mark interior . * @ param width the width . * @ param height the height . * @ return the shape of the mark interior . */ private Shape decodeMarkInterior ( int width , int height ) { } }
int left = ( width - 3 ) / 2 - 5 ; int top = ( height - 2 ) / 2 - 5 ; path . reset ( ) ; path . moveTo ( left + 1 , top + 1 ) ; path . lineTo ( left + 4 , top + 1 ) ; path . lineTo ( left + 5 , top + 3 ) ; path . lineTo ( left + 7 , top + 1 ) ; path . lineTo ( left + 10 , top + 1 ) ; path . lineTo ( left + 7 , top + 4 ...
public class MariaDbResultSetMetaData { /** * Gets the designated column ' s table name . * @ param column the first column is 1 , the second is 2 , . . . * @ return table name or " " if not applicable * @ throws SQLException if a database access error occurs */ public String getTableName ( final int column ) thr...
if ( returnTableAlias ) { return getColumnInformation ( column ) . getTable ( ) ; } else { return getColumnInformation ( column ) . getOriginalTable ( ) ; }
public class OptionsBuilder { /** * Sets the execution directory * @ param executionDirectory * execution directory * @ return updated OptionBuilder instance * @ see Options # EXECUTION _ DIRECTORY */ public OptionsBuilder executionDirectory ( File executionDirectory ) { } }
options . put ( Options . EXECUTION_DIRECTORY , executionDirectory != null ? executionDirectory : defaultExecutionDirectory ( ) ) ; return this ;
public class TimestampInterval { /** * / * [ deutsch ] * < p > Erzeugt ein unbegrenztes offenes Intervall bis zum angegebenen * Endzeitpunkt . < / p > * @ param end timestamp of upper boundary ( exclusive ) * @ return new timestamp interval * @ since 2.0 */ public static TimestampInterval until ( PlainTimesta...
Boundary < PlainTimestamp > past = Boundary . infinitePast ( ) ; return new TimestampInterval ( past , Boundary . of ( OPEN , end ) ) ;
public class DeviceDelegatingViewResolverFactory { /** * Create a { @ link LiteDeviceDelegatingViewResolver } delegating to the specified * { @ link ViewResolver } and computing a sensible order for it . The specified * { @ link ViewResolver } should implement { @ link Ordered } , consider using * { @ link # crea...
if ( ! ( delegate instanceof Ordered ) ) { throw new IllegalStateException ( "ViewResolver " + delegate + " should implement " + Ordered . class . getName ( ) ) ; } int delegateOrder = ( ( Ordered ) delegate ) . getOrder ( ) ; return createViewResolver ( delegate , adjustOrder ( delegateOrder ) ) ;
public class CQJDBCStorageConnection { /** * { @ inheritDoc } */ @ Override protected QPath traverseQPath ( String cpid ) throws SQLException , InvalidItemStateException , IllegalNameException { } }
String id = getIdentifier ( cpid ) ; if ( id . equals ( Constants . ROOT_UUID ) ) { return Constants . ROOT_PATH ; } // get item by Identifier usecase List < QPathEntry > qrpath = new ArrayList < QPathEntry > ( ) ; // reverted path String caid = cpid ; // container ancestor id boolean isRoot = false ; do { ResultSet re...
public class AvroUtils { /** * Helper method that does the actual work for { @ link # getField ( Schema , String ) } * @ param schema passed from { @ link # getFieldSchema ( Schema , String ) } * @ param pathList passed from { @ link # getFieldSchema ( Schema , String ) } * @ param field keeps track of the index ...
Field curField = schema . getField ( pathList . get ( field ) ) ; if ( field + 1 == pathList . size ( ) ) { return Optional . fromNullable ( curField ) ; } Schema fieldSchema = curField . schema ( ) ; switch ( fieldSchema . getType ( ) ) { case UNION : throw new AvroRuntimeException ( "Union of complex types cannot be ...
public class FSDataset { /** * Copies a file as fast as possible . Tries to do a hardlink instead of a copy * if the hardlink parameter is specified . * @ param src * the source file for copying * @ param dst * the destination file for copying * @ param hardlink * whether or not to attempt a hardlink * ...
if ( src == null || dst == null ) { throw new IOException ( "src/dst file is null" ) ; } try { if ( hardlink && shouldHardLinkBlockCopy ) { // Remove destination before hard linking , since this file might already // exist and a hardlink would fail as a result . if ( dst . exists ( ) ) { if ( ! dst . delete ( ) ) { thr...
public class LineBotAutoConfiguration { /** * Expose { @ link FixedChannelTokenSupplier } as { @ link Bean } * in case of no other definition for { @ link ChannelTokenSupplier } type . */ @ Bean @ ConditionalOnMissingBean ( ChannelTokenSupplier . class ) public ChannelTokenSupplier channelTokenSupplier ( ) { } }
final String channelToken = lineBotProperties . getChannelToken ( ) ; return FixedChannelTokenSupplier . of ( channelToken ) ;
public class MACAddressSection { /** * This produces a canonical string using the canonical standardized IEEE 802 MAC address representation of xx - xx - xx - xx - xx - xx * For range segments , ' . . ' is used : 11-22-33 . . 44-55-66 */ @ Override public String toCanonicalString ( ) { } }
String result ; if ( hasNoStringCache ( ) || ( result = getStringCache ( ) . canonicalString ) == null ) { getStringCache ( ) . canonicalString = result = toNormalizedString ( MACStringCache . canonicalParams ) ; } return result ;
public class ClassScreener { /** * ( non - Javadoc ) * @ see edu . umd . cs . findbugs . IClassScreener # matches ( java . lang . String ) */ @ Override public boolean matches ( String fileName ) { } }
// Special case : if no classes or packages have been defined , // then the screener matches all class files . if ( patternList . isEmpty ( ) ) { return true ; } LOG . debug ( "Matching: {}" , fileName ) ; // Scan through list of regexes for ( Matcher matcher : patternList ) { matcher . reset ( fileName ) ; if ( matche...
public class XMLParser { /** * Read comment . * @ param returnText the return text * @ return the string * @ throws IOException Signals that an I / O exception has occurred . * @ throws KriptonRuntimeException the kripton runtime exception */ private String readComment ( boolean returnText ) throws IOException ...
read ( START_COMMENT ) ; if ( relaxed ) { return readUntil ( END_COMMENT , returnText ) ; } String commentText = readUntil ( COMMENT_DOUBLE_DASH , returnText ) ; if ( peekCharacter ( ) != '>' ) { throw new KriptonRuntimeException ( "Comments may not contain --" , true , this . getLineNumber ( ) , this . getColumnNumber...
public class StrutsApp { /** * Get the MessageResourcesModel for which no " key " is set ( the default one used at runtime ) . */ public MessageResourcesModel getDefaultMessageResources ( ) { } }
for ( java . util . Iterator ii = _messageResources . iterator ( ) ; ii . hasNext ( ) ; ) { MessageResourcesModel i = ( MessageResourcesModel ) ii . next ( ) ; if ( i . getKey ( ) == null ) return i ; } return null ;
public class ClientController { /** * Update properties for a specific client id * @ param model * @ param profileIdentifier * @ param clientUUID * @ param active - true false depending on if the client should be active * @ param reset - true to reset the state of a client ( clears settings for all paths and ...
Integer profileId = ControllerUtils . convertProfileIdentifier ( profileIdentifier ) ; if ( active != null ) { logger . info ( "Active: {}" , active ) ; clientService . updateActive ( profileId , clientUUID , active ) ; } if ( friendlyName != null ) { clientService . setFriendlyName ( profileId , clientUUID , friendlyN...
public class Serializer { /** * Deserialize an instance of the given type reference from the input stream . * @ param input The { @ link InputStream } that contains the data to deserialize . * @ param ref The { @ link TypeReference } of the type to deserialize the result into . * @ param < T > The type to deseria...
return objectMapper . readerFor ( ref ) . readValue ( input ) ;
public class TelnetAdapter { /** * Rewrites the command line to show changes as a result of hitting the delete key * when the cursor is positioned in the middle of the command line * @ throws IOException */ private void handleDeleteKey ( ) throws IOException { } }
if ( commandLineBuffer . size ( ) > 0 && curPos < commandLineBuffer . size ( ) ) { String curLine = overwriteCommandlineSkippingChar ( curPos ) ; eraseLastCharAndMoveBack ( curLine , curPos + 1 ) ; }
public class MarkLogicRepositoryConnection { /** * add triples via Reader * @ param reader * @ param baseURI * @ param dataFormat * @ param contexts * @ throws IOException * @ throws RDFParseException * @ throws RepositoryException */ @ Override public void add ( Reader reader , String baseURI , RDFFormat...
getClient ( ) . sendAdd ( reader , baseURI , dataFormat , contexts ) ;
public class ModelsEngine { /** * Marks a map on the hillslope with the values on the channel of an attribute map . * @ param flowIter map of flow direction with the network cells * all marked as { @ link FlowNode # NETVALUE } . This is very important ! * @ param attributeIter map of attributes . * @ param mark...
pm . beginTask ( "Marking the hillslopes with the channel value..." , rows ) ; for ( int r = 0 ; r < rows ; r ++ ) { for ( int c = 0 ; c < cols ; c ++ ) { FlowNode flowNode = new FlowNode ( flowIter , cols , rows , c , r ) ; if ( flowNode . isHeadingOutside ( ) ) { // ignore single cells on borders that exit anyway con...
public class InstanceInformation { /** * / * ( non - Javadoc ) * @ see com . yahoo . labs . samoa . instances . InstanceInformationInterface # insertAttributeAt ( com . yahoo . labs . samoa . instances . Attribute , int ) */ public void insertAttributeAt ( Attribute attribute , int i ) { } }
this . attributesInformation . insertAttributeAt ( attribute , i ) ; if ( this . classIndex >= i ) { this . classIndex ++ ; }
public class Ramp { /** * Computes the membership function evaluated at ` x ` * @ param x * @ return * ` \ begin { cases } * 0h & \ mbox { if $ x = e $ } \ cr * \ begin { cases } 0h & \ mbox { if $ x \ leq s $ } \ cr 1h & \ mbox { if $ x \ geq e $ } \ cr h * ( x - s ) / ( e - s ) & \ mbox { otherwise } \ cr...
if ( Double . isNaN ( x ) ) { return Double . NaN ; } if ( Op . isEq ( start , end ) ) { return height * 0.0 ; } if ( Op . isLt ( start , end ) ) { if ( Op . isLE ( x , start ) ) { return height * 0.0 ; } if ( Op . isGE ( x , end ) ) { return height * 1.0 ; } return height * ( x - start ) / ( end - start ) ; } else { i...
public class SkillServlet { /** * Sets a { @ code Proxy } object that this servlet may use if Request Signature Verification is enabled . * @ param proxy the { @ code Proxy } to associate with this servlet . */ public void setProxy ( Proxy proxy ) { } }
if ( verifiers . removeIf ( verifier -> verifier instanceof SkillRequestSignatureVerifier ) ) { verifiers . add ( new SkillRequestSignatureVerifier ( proxy ) ) ; }
public class BaseCustomDfuImpl { /** * Wends the whole init packet stream to the given characteristic . * @ param characteristic the target characteristic * @ param crc32 the CRC object to be updated based on the data sent * @ throws DeviceDisconnectedException Thrown when the device will disconnect in the middle...
try { byte [ ] data = mBuffer ; int size ; while ( ( size = mInitPacketStream . read ( data , 0 , data . length ) ) != - 1 ) { writeInitPacket ( characteristic , data , size ) ; if ( crc32 != null ) crc32 . update ( data , 0 , size ) ; } } catch ( final IOException e ) { loge ( "Error while reading Init packet file" , ...
public class Searcher { /** * Search . * @ param _ search the search * @ return the search result * @ throws EFapsException on error */ protected SearchResult executeSearch ( final ISearch _search ) throws EFapsException { } }
final SearchResult ret = new SearchResult ( ) ; try { LOG . debug ( "Starting search with: {}" , _search . getQuery ( ) ) ; final StandardQueryParser queryParser = new StandardQueryParser ( Index . getAnalyzer ( ) ) ; queryParser . setAllowLeadingWildcard ( true ) ; if ( EFapsSystemConfiguration . get ( ) . containsAtt...
public class BlockDataHandler { /** * Called on the client when receiving the data from the server , either because client started to watch the chunk or server manually * sent the data . * @ param chunkX the chunk X * @ param chunkZ the chunk Z * @ param identifier the identifier * @ param data the data */ st...
HandlerInfo < ? > handlerInfo = instance . handlerInfos . get ( identifier ) ; if ( handlerInfo == null ) return ; // MalisisCore . message ( " Received blockData ( " + chunkX + " / " + chunkZ + " ) for " + identifier ) ; Chunk chunk = Utils . getClientWorld ( ) . getChunkFromChunkCoords ( chunkX , chunkZ ) ; ChunkData...
public class SasFileParser { /** * The function to convert an array of bytes that stores the number of days elapsed from 01/01/1960 into a variable * of the { @ link Date } type . { @ link SasFileConstants # DATE _ FORMAT _ STRINGS } stores the formats of columns that contain * such data . * @ param bytes the arr...
double doubleDays = bytesToDouble ( bytes ) ; return Double . isNaN ( doubleDays ) ? null : new Date ( ( long ) ( ( doubleDays - START_DATES_DAYS_DIFFERENCE ) * SECONDS_IN_MINUTE * MINUTES_IN_HOUR * HOURS_IN_DAY * MILLISECONDS_IN_SECONDS ) ) ;
public class MmffAtomTypeMatcher { /** * Hydrogen types , assigned based on the MMFFHDEF . PAR parent associations . * @ param container input structure representation * @ param symbs symbolic atom types * @ param graph adjacency list graph */ private void assignHydrogenTypes ( IAtomContainer container , String [...
for ( int v = 0 ; v < graph . length ; v ++ ) { if ( container . getAtom ( v ) . getSymbol ( ) . equals ( "H" ) && graph [ v ] . length == 1 ) { int w = graph [ v ] [ 0 ] ; symbs [ v ] = this . hydrogenMap . get ( symbs [ w ] ) ; } }
public class GetComplianceDetailsByResourceResult { /** * Indicates whether the specified AWS resource complies each AWS Config rule . * @ param evaluationResults * Indicates whether the specified AWS resource complies each AWS Config rule . */ public void setEvaluationResults ( java . util . Collection < Evaluatio...
if ( evaluationResults == null ) { this . evaluationResults = null ; return ; } this . evaluationResults = new com . amazonaws . internal . SdkInternalList < EvaluationResult > ( evaluationResults ) ;
public class ServerSecurityAlertPoliciesInner { /** * Creates or updates a threat detection policy . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . *...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , parameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class BitInputStream { /** * Read a block of bytes ( aligned ) without updating the CRC value . * @ param val The array to receive the bytes . If null , no bytes are returned * @ param nvals The number of bytes to read * @ throws IOException Thrown if error reading input stream */ public void readByteBlock...
int destlength = nvals ; while ( nvals > 0 ) { int chunk = Math . min ( nvals , putByte - getByte ) ; if ( chunk == 0 ) { readFromStream ( ) ; } else { if ( val != null ) System . arraycopy ( buffer , getByte , val , destlength - nvals , chunk ) ; nvals -= chunk ; getByte += chunk ; // totalConsumedBits = ( getByte < <...
public class ClassInfo { /** * Get the full class name . */ public String getPackageName ( ClassProject . CodeType codeType ) { } }
if ( codeType == null ) codeType = ClassProject . CodeType . THICK ; String packageName = this . getField ( ClassInfo . CLASS_PACKAGE ) . toString ( ) ; ClassProject classProject = ( ClassProject ) ( ( ReferenceField ) this . getField ( ClassInfo . CLASS_PROJECT_ID ) ) . getReference ( ) ; if ( classProject != null ) i...
public class PassiveRole { /** * Checks the previous index of the given AppendRequest , returning a boolean indicating whether to continue * handling the request . */ protected boolean checkPreviousEntry ( AppendRequest request , CompletableFuture < AppendResponse > future ) { } }
RaftLogWriter writer = raft . getLogWriter ( ) ; RaftLogReader reader = raft . getLogReader ( ) ; // If the previous term is set , validate that it matches the local log . // We check the previous log term since that indicates whether any entry is present in the leader ' s // log at the previous log index . It ' s poss...
public class RoleMappingMarshaller { /** * Marshall the given parameter object . */ public void marshall ( RoleMapping roleMapping , ProtocolMarshaller protocolMarshaller ) { } }
if ( roleMapping == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( roleMapping . getType ( ) , TYPE_BINDING ) ; protocolMarshaller . marshall ( roleMapping . getAmbiguousRoleResolution ( ) , AMBIGUOUSROLERESOLUTION_BINDING ) ; protocolMarsh...
public class DBCluster { /** * Contains one or more identifiers of the Read Replicas associated with this DB cluster . * @ param readReplicaIdentifiers * Contains one or more identifiers of the Read Replicas associated with this DB cluster . */ public void setReadReplicaIdentifiers ( java . util . Collection < Stri...
if ( readReplicaIdentifiers == null ) { this . readReplicaIdentifiers = null ; return ; } this . readReplicaIdentifiers = new java . util . ArrayList < String > ( readReplicaIdentifiers ) ;
public class EncodingUtilsImpl { /** * DS method for runtime updates to configuration without stopping and * restarting the component . * @ param config */ @ Modified protected void modified ( Map < String , Object > config ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Config modified: " + this ) ; } if ( null == config ) { return ; } final String ENC = "encoding." ; final String CONV = "converter." ; for ( Map . Entry < String , Object > entry : config . entrySet ( ) ) { String key = entr...
public class UnreviewedPagesTitles { /** * generates the next MediaWiki - request ( GetMethod ) and adds it to msgs . * @ param namespace the namespace ( s ) that will be searched for links , as a string of numbers * separated by ' | ' ; if null , this parameter is omitted * @ param urstart Start listing at this ...
RequestBuilder requestBuilder = new ApiRequestBuilder ( ) . action ( "query" ) . formatXml ( ) . param ( "list" , "unreviewedpages" ) . param ( "urlimit" , LIMIT ) ; if ( namespace != null ) { String urnamespace = MediaWiki . urlEncode ( MWAction . createNsString ( namespace ) ) ; requestBuilder . param ( "urnamespace"...
public class InternalService { /** * Returns observable to create a conversation . * @ param conversationId ID of a conversation to obtain . * @ return Observable to to create a conversation . */ public Observable < ComapiResult < ConversationDetails > > getConversation ( @ NonNull final String conversationId ) { }...
final String token = getToken ( ) ; if ( sessionController . isCreatingSession ( ) ) { return getTaskQueue ( ) . queueGetConversation ( conversationId ) ; } else if ( TextUtils . isEmpty ( token ) ) { return Observable . error ( getSessionStateErrorDescription ( ) ) ; } else { return doGetConversation ( token , convers...
public class ScoreBuildHistogram { /** * histograms once - per - NID , but requires pre - sorting the rows by NID . */ private void accum_all ( Chunk chks [ ] , Chunk wrks , int nnids [ ] ) { } }
final DHistogram hcs [ ] [ ] = _hcs ; // Sort the rows by NID , so we visit all the same NIDs in a row // Find the count of unique NIDs in this chunk int nh [ ] = new int [ hcs . length + 1 ] ; for ( int i : nnids ) if ( i >= 0 ) nh [ i + 1 ] ++ ; // Rollup the histogram of rows - per - NID in this chunk for ( int i = ...
public class Quad { /** * Gets coordinates of a corner . * @ param index The index of a corner . */ public Vector3D getConer ( int index ) { } }
Vector3D v = new Vector3D ( 0 , 0 , 0 ) ; if ( index <= 0 ) { v . set ( this . x1 , this . y1 ) ; } else if ( index == 1 ) { v . set ( this . x2 , this . y2 ) ; } else if ( index == 2 ) { v . set ( this . x3 , this . y3 ) ; } else if ( 3 <= index ) { v . set ( this . x4 , this . y4 ) ; } return v ;
public class SqlConnRunner { /** * 分页查询 < br > * 此方法不会关闭Connection * @ param conn 数据库连接对象 * @ param fields 返回的字段列表 , null则返回所有字段 * @ param where 条件实体类 ( 包含表名 ) * @ param page 分页对象 * @ return 结果对象 * @ throws SQLException SQL执行异常 */ public PageResult < Entity > page ( Connection conn , Collection < String >...
checkConn ( conn ) ; // 查询全部 if ( null == page ) { List < Entity > entityList = this . find ( conn , fields , where , new EntityListHandler ( ) ) ; final PageResult < Entity > pageResult = new PageResult < Entity > ( 0 , entityList . size ( ) , entityList . size ( ) ) ; pageResult . addAll ( entityList ) ; return pageR...
public class GConvolveImageOps { /** * Performs a horizontal 1D convolution across the image . The horizontal border is not processed . * @ param input The original image . Not modified . * @ param output Where the resulting image is written to . Modified . * @ param kernel The kernel that is being convolved . No...
switch ( input . getImageType ( ) . getFamily ( ) ) { case GRAY : { if ( input instanceof GrayF32 ) { ConvolveImageNoBorder . horizontal ( ( Kernel1D_F32 ) kernel , ( GrayF32 ) input , ( GrayF32 ) output ) ; } else if ( input instanceof GrayU8 ) { if ( GrayI16 . class . isAssignableFrom ( output . getClass ( ) ) ) Conv...
public class XCollectionLiteralImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case XbasePackage . XCOLLECTION_LITERAL__ELEMENTS : getElements ( ) . clear ( ) ; getElements ( ) . addAll ( ( Collection < ? extends XExpression > ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class FaceListsImpl { /** * Create an empty face list . Up to 64 face lists are allowed to exist in one subscription . * @ param faceListId Id referencing a particular face list . * @ param createOptionalParameter the object representing the optional parameters to be set before calling this API * @ throws ...
return createWithServiceResponseAsync ( faceListId , createOptionalParameter ) . map ( new Func1 < ServiceResponse < Void > , Void > ( ) { @ Override public Void call ( ServiceResponse < Void > response ) { return response . body ( ) ; } } ) ;
public class Migrators { /** * Inspects the vault and checks if it is supported by this library . * @ param pathToVault Path to the vault ' s root * @ param masterkeyFilename Name of the masterkey file located in the vault * @ return < code > true < / code > if the vault at the given path is of an older format th...
Path masterKeyPath = pathToVault . resolve ( masterkeyFilename ) ; byte [ ] keyFileContents = Files . readAllBytes ( masterKeyPath ) ; KeyFile keyFile = KeyFile . parse ( keyFileContents ) ; return keyFile . getVersion ( ) < Constants . VAULT_VERSION ;
public class EditManager { /** * Searches for a dlm : pref command which indicates that a user preference was change and if * found removes it from the user ' s PLF . */ public static void removePreferenceDirective ( IPerson person , String elementId , String attributeName ) { } }
removeDirective ( elementId , attributeName , Constants . ELM_PREF , person ) ;
public class StatisticsApi { /** * Get export statistic definitions . * Get export statistic definitions * @ return ApiResponse & lt ; GetExportStatisticDefinitions & gt ; * @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */ public ApiResponse < GetExpo...
com . squareup . okhttp . Call call = getExportStatisticDefinitionsValidateBeforeCall ( null , null ) ; Type localVarReturnType = new TypeToken < GetExportStatisticDefinitions > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class FixedSizeBitSet { /** * Flips all bits : 1 - - > 0 and 0 - - > 1 */ public void flip ( ) { } }
int fromIndex = 0 , toIndex = size ( ) ; if ( fromIndex == toIndex ) return ; int startWordIndex = wordIndex ( fromIndex ) ; int endWordIndex = wordIndex ( toIndex ) ; long firstWordMask = WORD_MASK << fromIndex ; long lastWordMask = WORD_MASK >>> - toIndex ; if ( startWordIndex == endWordIndex ) { // Case 1 : One word...
public class ProductSearchClient { /** * Creates and returns a new product resource . * < p > Possible errors : * < p > & # 42 ; Returns INVALID _ ARGUMENT if display _ name is missing or longer than 4096 characters . * & # 42 ; Returns INVALID _ ARGUMENT if description is longer than 4096 characters . & # 42 ; R...
CreateProductRequest request = CreateProductRequest . newBuilder ( ) . setParent ( parent ) . setProduct ( product ) . setProductId ( productId ) . build ( ) ; return createProduct ( request ) ;
public class FlexiBean { /** * Sets a property in this bean to the specified value . * This creates a property if one does not exist . * @ param propertyName the property name , not empty * @ param newValue the new value , may be null * @ return the old value of the property , may be null */ public Object put (...
if ( VALID_KEY . matcher ( propertyName ) . matches ( ) == false ) { throw new IllegalArgumentException ( "Invalid key for FlexiBean: " + propertyName ) ; } return dataWritable ( ) . put ( propertyName , newValue ) ;
public class JHelpView { /** * Initialize the HTMLView window . * @ param parent The parent screen / applet . * @ param strURL The initial URL ( otherwise , you should supply the URL with the properties ) . */ public void init ( Object parent , Object strURL ) { } }
BaseApplet applet = null ; if ( parent instanceof BaseApplet ) applet = ( BaseApplet ) parent ; if ( strURL instanceof BaseApplet ) applet = ( BaseApplet ) strURL ; if ( applet == null ) applet = this . getBaseApplet ( ) ; if ( strURL == null ) if ( applet != null ) if ( applet . getProperty ( Params . URL ) == null ) ...
public class CmsDbUtil { /** * Fills a given prepared statement with parameters from a list of objects . < p > * @ param stmt the prepared statement * @ param params the parameter objects * @ throws SQLException if something goes wrong */ public static void fillParameters ( PreparedStatement stmt , List < Object ...
int i = 1 ; for ( Object param : params ) { if ( param instanceof String ) { stmt . setString ( i , ( String ) param ) ; } else if ( param instanceof Integer ) { stmt . setInt ( i , ( ( Integer ) param ) . intValue ( ) ) ; } else if ( param instanceof Long ) { stmt . setLong ( i , ( ( Long ) param ) . longValue ( ) ) ;...
public class Texture2dProgram { /** * Configures the convolution filter values . * This only has an effect for programs that use the * FRAGMENT _ SHADER _ EXT _ FILT Fragment shader . * @ param values Normalized filter values ; must be KERNEL _ SIZE elements . */ public void setKernel ( float [ ] values , float c...
if ( values . length != KERNEL_SIZE ) { throw new IllegalArgumentException ( "Kernel size is " + values . length + " vs. " + KERNEL_SIZE ) ; } System . arraycopy ( values , 0 , mKernel , 0 , KERNEL_SIZE ) ; mColorAdjust = colorAdj ; // Log . d ( TAG , " filt kernel : " + Arrays . toString ( mKernel ) + " , adj = " + co...
public class PDF417Writer { /** * Takes encoder , accounts for width / height , and retrieves bit matrix */ private static BitMatrix bitMatrixFromEncoder ( PDF417 encoder , String contents , int errorCorrectionLevel , int width , int height , int margin ) throws WriterException { } }
encoder . generateBarcodeLogic ( contents , errorCorrectionLevel ) ; int aspectRatio = 4 ; byte [ ] [ ] originalScale = encoder . getBarcodeMatrix ( ) . getScaledMatrix ( 1 , aspectRatio ) ; boolean rotated = false ; if ( ( height > width ) != ( originalScale [ 0 ] . length < originalScale . length ) ) { originalScale ...
public class FileUtil { /** * Returns invalid fileSize error message . * @ param maxFileSize allowed fileSize * @ return human readable message */ public static String getInvalidFileSizeMessage ( final long maxFileSize ) { } }
return String . format ( I18nUtilities . format ( null , InternalMessages . DEFAULT_VALIDATION_ERROR_FILE_WRONG_SIZE ) , FileUtil . readableFileSize ( maxFileSize ) ) ;
public class Es6RewriteDestructuring { /** * Transpiles a destructuring pattern in a declaration or assignment to ES5 * @ param nodeToDetach a statement node containing the pattern . This method will replace the node * with one or more other statements . */ private void replacePattern ( NodeTraversal t , Node patte...
checkArgument ( NodeUtil . isStatement ( nodeToDetach ) , nodeToDetach ) ; switch ( pattern . getToken ( ) ) { case ARRAY_PATTERN : replaceArrayPattern ( t , pattern , rhs , parent , nodeToDetach ) ; break ; case OBJECT_PATTERN : replaceObjectPattern ( t , pattern , rhs , parent , nodeToDetach ) ; break ; default : thr...
public class CompColMatrix { /** * Finds the insertion index */ private int getIndex ( int row , int column ) { } }
int i = no . uib . cipr . matrix . sparse . Arrays . binarySearch ( rowIndex , row , columnPointer [ column ] , columnPointer [ column + 1 ] ) ; if ( i >= 0 && rowIndex [ i ] == row ) return i ; else throw new IndexOutOfBoundsException ( "Entry (" + ( row + 1 ) + ", " + ( column + 1 ) + ") is not in the matrix structur...
public class AOStream { /** * Callback from JSRemoteConsumerPoint that the given tick in the stream should be changed to the value state . * The message has already been non - persistently locked . * @ param tick The tick in the stream * @ param msg The value */ public final void satisfiedRequest ( long tick , SI...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "satisfiedRequest" , new Object [ ] { Long . valueOf ( tick ) , msg } ) ; boolean sendMsg = false ; // used to send a message outside the synchronized block long startstamp = tick ; AOValue value = null ; boolean transitionT...
public class ContainerKeyCache { /** * Updates the Last Indexed Offset for a given Segment . This is used for cache eviction purposes - no cache entry with * a segment offsets smaller than this value may be evicted . A Segment must be registered either via this method or * via { @ link # updateSegmentIndexOffsetIfM...
boolean remove = indexOffset < 0 ; SegmentKeyCache cache ; int generation ; synchronized ( this . segmentCaches ) { generation = this . currentCacheGeneration ; if ( remove ) { cache = this . segmentCaches . remove ( segmentId ) ; } else { cache = this . segmentCaches . computeIfAbsent ( segmentId , s -> new SegmentKey...
public class RangeUtils { /** * Recursive function that splits a given token range to a given number of token ranges . * @ param range the token range to be splitted . * @ param partitioner the cassandra partitioner . * @ param bisectFactor the actual number of pieces the original token range will be splitted to ...
final AbstractType tkValidator = partitioner . getTokenValidator ( ) ; Token leftToken = partitioner . getTokenFactory ( ) . fromByteArray ( tkValidator . decompose ( range . getStartToken ( ) ) ) ; Token rightToken = partitioner . getTokenFactory ( ) . fromByteArray ( tkValidator . decompose ( range . getEndToken ( ) ...
public class SoyDataException { /** * Prepends a key to the data path where this error occurred . E . g . if the dataPath was previously * ' foo . goo ' and the key to prepend is ' boo ' , then the new data path will be ' boo . foo . goo ' . * @ param key The key to prepend . */ public void prependKeyToDataPath ( S...
if ( dataPath == null ) { dataPath = key ; } else { dataPath = key + ( ( dataPath . charAt ( 0 ) == '[' ) ? "" : "." ) + dataPath ; }
public class RegExp { /** * Replace the matches in the input with the replacement . * @ param input the input string * @ param replacement the replacement * @ return the resulting string * @ throws ParameterOutOfBoundsException if Java can not replace it like Javascript */ public String replace ( String input ,...
// Replace \ in the replacement with \ \ to escape it for Java replace . replacement = REPLACEMENT_BACKSLASH . matcher ( replacement ) . replaceAll ( REPLACEMENT_BACKSLASH_FOR_JAVA ) ; // Replace the Javascript - ese $ & in the replacement with Java - ese $ 0 , but // watch out for $ $ & , which should stay $ $ & , to ...
public class Serializer { /** * Registers an abstract type serializer for the given abstract type . * Abstract serializers allow abstract types to be serialized without explicitly registering a concrete type . * The concept of abstract serializers differs from { @ link # registerDefault ( Class , TypeSerializerFact...
registry . registerAbstract ( abstractType , serializer ) ; return this ;
public class SunriseSunsetCalculator { /** * Computes the sunrise for an arbitrary declination . * @ param latitude * @ param longitude * Coordinates for the location to compute the sunrise / sunset for . * @ param timeZone * timezone to compute the sunrise / sunset times in . * @ param date * < code > Ca...
SolarEventCalculator solarEventCalculator = new SolarEventCalculator ( new Location ( latitude , longitude ) , timeZone ) ; return solarEventCalculator . computeSunriseCalendar ( new Zenith ( 90 - degrees ) , date ) ;
public class ApiOvhTelephony { /** * Get this object properties * REST : GET / telephony / { billingAccount } / ovhPabx / { serviceName } / dialplan / { dialplanId } / extension / { extensionId } / conditionTime / { conditionId } * @ param billingAccount [ required ] The name of your billingAccount * @ param serv...
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}" ; StringBuilder sb = path ( qPath , billingAccount , serviceName , dialplanId , extensionId , conditionId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; ret...
public class SimpleBitSet { /** * Sets the bits from the specified < tt > fromIndex < / tt > ( inclusive ) to the * specified < tt > toIndex < / tt > ( exclusive ) to < code > true < / code > . * @ param fromIndex index of the first bit to be set . * @ param toIndex index after the last bit to be set . * @ exce...
checkRange ( fromIndex , toIndex ) ; if ( fromIndex == toIndex ) return ; // Increase capacity if necessary int startWordIndex = wordIndex ( fromIndex ) ; int endWordIndex = wordIndex ( toIndex - 1 ) ; expandTo ( endWordIndex ) ; long firstWordMask = WORD_MASK << fromIndex ; long lastWordMask = WORD_MASK >>> - toIndex ...
public class SingleDocument { /** * Reset allParas */ private boolean resetAllParas ( DocumentCursorTools docCursor , FlatParagraphTools flatPara ) { } }
allParas = docCursor . getAllTextParagraphs ( ) ; if ( allParas == null || allParas . size ( ) < 1 ) { return false ; } // change all footnotes to \ u200B ( like in paraText ) // List of footnotes List < int [ ] > footnotes = flatPara . getFootnotePositions ( ) ; divNum = footnotes . size ( ) - allParas . size ( ) ; if...
public class KunderaCoreUtils { /** * Gets the lucene query from jpa query . * @ return the lucene query from jpa query */ public static String getLuceneQueryFromJPAQuery ( final KunderaQuery kunderaQuery , final KunderaMetadata kunderaMetadata ) { } }
LuceneQueryBuilder queryBuilder = new LuceneQueryBuilder ( ) ; EntityMetadata metadata = kunderaQuery . getEntityMetadata ( ) ; MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( metadata . getPersistenceUnit ( ) ) ; Class valueClazz = null ; EntityType entity = me...
public class IOUtil { /** * 创建输入流 ( 经过IO适配器创建 ) * @ param path * @ return * @ throws IOException */ public static InputStream newInputStream ( String path ) throws IOException { } }
if ( IOAdapter == null ) return new FileInputStream ( path ) ; return IOAdapter . open ( path ) ;
public class SeaGlassStyle { /** * Returns true if the region is opaque . * < p > Overridden to cause this style to populate itself with data from * UIDefaults , if necessary . If opacity is not specified in UI defaults , * then it defaults to being non - opaque . < / p > * @ param ctx context SynthContext iden...
// Force Table CellRenderers to be opaque if ( "Table.cellRenderer" . equals ( ctx . getComponent ( ) . getName ( ) ) ) { return true ; } Boolean opaque = ( Boolean ) get ( ctx , "opaque" ) ; return opaque == null ? false : opaque ;
public class ActionMethod { /** * 执行本体方法 * @ throws ActionException */ private void invokeActionMethod ( ) throws ActionException { } }
Object returnValue = null ; Class < ? > [ ] parameterTypes = this . method . getParameterTypes ( ) ; try { returnValue = this . method . invoke ( action , paramTypesToObj ( parameterTypes ) ) ; } catch ( InvocationTargetException te ) { throw new ActionException ( te . getCause ( ) ) ; } catch ( Exception e ) { throw n...
public class KeyMatcher { /** * Access the bucket for this specific character . * @ param c * @ return HeaderBucket */ protected KeyBucket getBucket ( char c ) { } }
if ( c > this . buckets . length ) { // can ' t handle non - ASCII chars return null ; } int index = c ; // if we ' re case - insensitive , push uppercase into lowercase buckets if ( ! isCaseSensitive ( ) && ( c >= 'A' && c <= 'Z' ) ) { index += 32 ; } return this . buckets [ index ] ;
public class LocatableInputSplitAssigner { @ Override public LocatableInputSplit getNextInputSplit ( String host , int taskId ) { } }
// for a null host , we return a remote split if ( host == null ) { synchronized ( this . remoteSplitChooser ) { synchronized ( this . unassigned ) { LocatableInputSplitWithCount split = this . remoteSplitChooser . getNextUnassignedMinLocalCountSplit ( this . unassigned ) ; if ( split != null ) { // got a split to assi...
public class UserZoneEventHandler { /** * Check zone name * @ param handler * structure of handle class * @ param apiZone * api zone reference * @ return true of false */ protected boolean checkHandler ( ZoneHandlerClass handler , ApiZone apiZone ) { } }
return apiZone . getName ( ) . startsWith ( handler . getZoneName ( ) ) ;
public class FLACDecoder { /** * Fill the given ByteData object with PCM data from the frame . * @ param frame the frame to send to the PCM processors * @ param pcmData the byte data to be filled , or null if it should be allocated * @ return the ByteData that was filled ( may be a new instance from < code > spac...
// required size of the byte buffer int byteSize = frame . header . blockSize * channels * ( ( streamInfo . getBitsPerSample ( ) + 7 ) / 2 ) ; if ( pcmData == null || pcmData . getData ( ) . length < byteSize ) { pcmData = new ByteData ( byteSize ) ; } else { pcmData . setLen ( 0 ) ; } if ( streamInfo . getBitsPerSampl...
public class JsGeometryEditService { /** * Move a set of indices to new locations . These indices can point to vertices , edges or sub - geometries . For each * index , a list of new coordinates is provided . * @ param indices * The list of indices to move . * @ param coordinates * The coordinates to move the...
List < List < Coordinate > > coords = new ArrayList < List < Coordinate > > ( coordinates . length ( ) ) ; for ( int i = 0 ; i < coordinates . length ( ) ; i ++ ) { JsArrayObject jsObj = coordinates . get ( i ) ; coords . add ( Arrays . asList ( ExporterUtil . toArrObject ( jsObj , new Coordinate [ jsObj . length ( ) ]...
public class AOBrowserSession { /** * The alarm has expired */ public void alarm ( Object thandle ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "alarm" , thandle ) ; synchronized ( this ) { if ( expiryAlarmHandle != null ) { expiryAlarmHandle = null ; close ( ) ; // call into parent asking it to remove me parent . removeBrowserSession ( key ) ; } } if ( TraceCompone...