signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class HttpChain { /** * ChainEventListener method .
* This method can not be synchronized ( deadlock with update / stop ) .
* Rely on CFW synchronization of chain operations . */
@ Override public void chainStopped ( ChainData chainData ) { } } | final ActiveConfiguration cfg = currentConfig ; int oldState = chainState . getAndSet ( ChainState . STOPPED . val ) ; if ( oldState > ChainState . QUIESCED . val ) { quiesceChain ( ) ; } // Wake up anything waiting for the chain to stop
// ( see the update method for one example )
stopWait . notifyStopped ( ) ; // Pos... |
public class XmlParser { /** * Parse XML from InputStream . */
public synchronized Node parse ( InputStream in ) throws IOException , SAXException { } } | // _ dtd = null ;
Handler handler = new Handler ( ) ; XMLReader reader = _parser . getXMLReader ( ) ; reader . setContentHandler ( handler ) ; reader . setErrorHandler ( handler ) ; reader . setEntityResolver ( handler ) ; _parser . parse ( new InputSource ( in ) , handler ) ; if ( handler . error != null ) throw handl... |
public class CommerceAccountOrganizationRelPersistenceImpl { /** * Returns an ordered range of all the commerce account organization rels where commerceAccountId = & # 63 ; .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end ... | return findByCommerceAccountId ( commerceAccountId , start , end , orderByComparator , true ) ; |
public class Follower { /** * Sends CEPOCH message to its prospective leader .
* @ throws IOException in case of IO failure . */
void sendProposedEpoch ( ) throws IOException { } } | Message message = MessageBuilder . buildProposedEpoch ( persistence . getProposedEpoch ( ) , persistence . getAckEpoch ( ) , persistence . getLastSeenConfig ( ) , getSyncTimeoutMs ( ) ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Sends {} to leader {}" , TextFormat . shortDebugString ( message ) , this . elected... |
public class Attributes { /** * Get an attribute ' s value by case - insensitive key
* @ param key the attribute name
* @ return the first matching attribute value if set ; or empty string if not set ( ora boolean attribute ) . */
public String getIgnoreCase ( String key ) { } } | int i = indexOfKeyIgnoreCase ( key ) ; return i == NotFound ? EmptyString : checkNotNull ( vals [ i ] ) ; |
public class PrefsConfig { /** * Sets the value of the specified preference , overriding the value defined in the
* configuration files shipped with the application . */
public void setValue ( String name , String value ) { } } | String oldValue = getValue ( name , ( String ) null ) ; _prefs . put ( name , value ) ; _propsup . firePropertyChange ( name , oldValue , value ) ; |
public class VirtualNetworkGatewaysInner { /** * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider .
* @ param resourceGroupName The name of the resource group . ... | return ServiceFuture . fromResponse ( getVpnclientIpsecParametersWithServiceResponseAsync ( resourceGroupName , virtualNetworkGatewayName ) , serviceCallback ) ; |
public class CPDefinitionSpecificationOptionValuePersistenceImpl { /** * Returns the first cp definition specification option value in the ordered set where CPDefinitionId = & # 63 ; and CPSpecificationOptionId = & # 63 ; .
* @ param CPDefinitionId the cp definition ID
* @ param CPSpecificationOptionId the cp speci... | CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue = fetchByC_CSO_First ( CPDefinitionId , CPSpecificationOptionId , orderByComparator ) ; if ( cpDefinitionSpecificationOptionValue != null ) { return cpDefinitionSpecificationOptionValue ; } StringBundler msg = new StringBundler ( 6 ) ; msg . appe... |
public class PhoneNumberUtil { /** * parse phone number .
* @ param pphoneNumber phone number as string
* @ param pcountryCode iso code of country
* @ param plocale locale to read properties in the correct language
* @ return PhoneNumberData */
public PhoneNumberData parsePhoneNumber ( final String pphoneNumber... | return ( PhoneNumberData ) this . parsePhoneNumber ( pphoneNumber , new PhoneNumberData ( ) , CreatePhoneCountryConstantsClass . create ( plocale ) . countryMap ( ) . get ( StringUtils . defaultString ( pcountryCode ) ) ) ; |
public class InjectionTargetField { /** * F743-29174 */
@ Override protected void injectMember ( Object objectToInject , Object dependentObject ) throws Exception { } } | ivField . set ( objectToInject , dependentObject ) ; |
public class FindingReplacing { /** * Sets the substring in given left index and right index as the delegate string
* @ param leftIndex
* @ param rightIndex
* @ return */
public S setBetn ( int leftIndex , int rightIndex ) { } } | return set ( Indexer . of ( delegate . get ( ) ) . between ( leftIndex , rightIndex ) ) ; |
public class CommerceWarehouseItemUtil { /** * Returns the commerce warehouse items before and after the current commerce warehouse item in the ordered set where CProductId = & # 63 ; and CPInstanceUuid = & # 63 ; .
* @ param commerceWarehouseItemId the primary key of the current commerce warehouse item
* @ param C... | return getPersistence ( ) . findByCPI_CPIU_PrevAndNext ( commerceWarehouseItemId , CProductId , CPInstanceUuid , orderByComparator ) ; |
public class Slf4JLogger { /** * Log an error to the SLF4J Logger with < code > TRACE < / code > priority . */
public void trace ( Object message , Throwable t ) { } } | getLogger ( ) . trace ( message . toString ( ) , t ) ; |
public class TextMateGenerator2 { /** * Generate the rules for the comments .
* @ return the rules . */
protected List < Map < String , ? > > generateComments ( ) { } } | final List < Map < String , ? > > list = new ArrayList < > ( ) ; // Block comment
list . add ( pattern ( it -> { it . delimiters ( "(/\\*+)" , "(\\*/)" ) ; // $ NON - NLS - 1 $ / / $ NON - NLS - 2 $
it . style ( BLOCK_COMMENT_STYLE ) ; it . beginStyle ( BLOCK_COMMENT_DELIMITER_STYLE ) ; it . endStyle ( BLOCK_COMMENT_DE... |
public class DiscountCurveInterpolation { /** * Create a discount curve from given times and given zero rates using default interpolation and extrapolation methods .
* The discount factor is determined by
* < code >
* givenDiscountFactors [ timeIndex ] = Math . exp ( - givenZeroRates [ timeIndex ] * times [ timeI... | RandomVariable [ ] givenDiscountFactors = new RandomVariable [ givenZeroRates . length ] ; for ( int timeIndex = 0 ; timeIndex < times . length ; timeIndex ++ ) { givenDiscountFactors [ timeIndex ] = givenZeroRates [ timeIndex ] . mult ( - times [ timeIndex ] ) . exp ( ) ; } return createDiscountCurveFromDiscountFactor... |
public class ChainGroupDataImpl { /** * Method removeChainEventListener . Removes a listener from the list
* of those being informed of chain events on this chain . The listener is also
* removed from each chain in the group unless the chain is in another group
* which is associated with the listener .
* @ para... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "removeChainEventListener: " + listener ) ; } if ( null != listener ) { // Remove the listener from the list monitored by this group .
if ( ! getChainEventListeners ( ) . remove ( listener ) ) { if ( TraceComponent . isAnyTra... |
public class fpGenericConstrainedInterface { /** * this method is really suspect , but will ignore this case */
@ Override public int compare ( GregorianCalendar c1 , GregorianCalendar c2 ) { } } | if ( c2 . getGregorianChange ( ) == null ) { return ( int ) ( c1 . getTime ( ) . getTime ( ) - c2 . getTime ( ) . getTime ( ) ) ; } else { return 0 ; } |
public class CmsSearchReplaceSettings { /** * Returns < code > true < / code > if Solr index is selected and a query was entered . < p >
* @ return < code > true < / code > if Solr index is selected and a query was entered */
public boolean isSolrSearch ( ) { } } | if ( VFS . equals ( m_source ) ) { // VFS search selected
return false ; } // index selected and query entered - - > Solr search else VFS
return ( CmsStringUtil . isNotEmptyOrWhitespaceOnly ( m_source ) && CmsStringUtil . isNotEmptyOrWhitespaceOnly ( m_query ) ) ; |
public class AmazonEC2Client { /** * Creates a data feed for Spot Instances , enabling you to view Spot Instance usage logs . You can create one data
* feed per AWS account . For more information , see < a
* href = " https : / / docs . aws . amazon . com / AWSEC2 / latest / UserGuide / spot - data - feeds . html " ... | request = beforeClientExecution ( request ) ; return executeCreateSpotDatafeedSubscription ( request ) ; |
public class HttpHandler { /** * Sets attributes of the request that are common to all requests for this handler . */
@ Override public void initialize ( HttpRequest httpRequest ) throws IOException { } } | // Do not throw if execute fails , since Axis will handle unmarshalling the
// fault .
httpRequest . setThrowExceptionOnExecuteError ( false ) ; // For consistency with the default Axis HTTPSender and CommonsHTTPSender , do not
// follow redirects .
httpRequest . setFollowRedirects ( false ) ; // Retry should be handle... |
public class ConnectivityStateManager { /** * Connectivity state is changed to the specified value . Will trigger some notifications that have
* been registered earlier by { @ link ManagedChannel # notifyWhenStateChanged } . */
void gotoState ( @ Nonnull ConnectivityState newState ) { } } | checkNotNull ( newState , "newState" ) ; if ( state != newState && state != ConnectivityState . SHUTDOWN ) { state = newState ; if ( listeners . isEmpty ( ) ) { return ; } // Swap out callback list before calling them , because a callback may register new callbacks ,
// if run in direct executor , can cause ConcurrentM... |
public class BosClient { /** * Uploads the specified string to Bos under the specified bucket and key name .
* @ param bucketName The name of an existing bucket , to which you have Write permission .
* @ param key The key under which to store the specified file .
* @ param value The string containing the value to... | try { return this . putObject ( bucketName , key , value . getBytes ( DEFAULT_ENCODING ) , new ObjectMetadata ( ) ) ; } catch ( UnsupportedEncodingException e ) { throw new BceClientException ( "Fail to get bytes." , e ) ; } |
public class Validator { /** * Where to find the schema . */
public void setSchemaSources ( Source ... s ) { } } | if ( s != null ) { sourceLocations = Arrays . copyOf ( s , s . length ) ; } else { sourceLocations = null ; } |
public class MviConductorLifecycleListener { /** * Determines whether or not a Presenter Instance should be kept
* @ param keepPresenterInstance true , if the delegate has enabled keep */
static boolean retainPresenterInstance ( boolean keepPresenterInstance , Controller controller ) { } } | return keepPresenterInstance && ( controller . getActivity ( ) . isChangingConfigurations ( ) || ! controller . getActivity ( ) . isFinishing ( ) ) && ! controller . isBeingDestroyed ( ) ; |
public class Connection { public String getFullTangoHost ( ) throws DevFailed { } } | // Get the tango _ host
String tangoHost = get_tango_host ( ) ; String host = tangoHost . substring ( 0 , tangoHost . indexOf ( ':' ) ) ; String port = tangoHost . substring ( tangoHost . indexOf ( ':' ) ) ; host = TangoUrl . getCanonicalName ( host ) ; return host + port ; |
public class J2CSecurityHelper { /** * This method validates whether the user security name provided by the CallerPrincipalCallback and
* the PasswordValidationCallback match . It does this check only in case the CallerPrincipalCallback
* was invoked prior to the current invocation of the PasswordValidationCallback... | boolean status = true ; if ( isInvoked == Invocation . CALLERPRINCIPALCALLBACK ) { String existingName = ( String ) credData . get ( AttributeNameConstants . WSCREDENTIAL_SECURITYNAME ) ; if ( existingName != null && ! ( existingName . equals ( securityName ) ) ) { status = false ; Tr . error ( tc , "CALLBACK_SECURITY_... |
public class ModelRegistryService { /** * Returns true if the class with the given class name contained in the given bundle is a model and false if not or
* the class couldn ' t be loaded . */
private boolean isModelClass ( String classname , Bundle bundle ) { } } | LOGGER . debug ( "Check if class '{}' is a model class" , classname ) ; Class < ? > clazz ; try { clazz = bundle . loadClass ( classname ) ; } catch ( ClassNotFoundException e ) { LOGGER . warn ( "Bundle could not load its own class: '{}' bundle: '{}'" , classname , bundle . getSymbolicName ( ) ) ; LOGGER . debug ( "Ex... |
public class Flowable { /** * Returns a Flowable that emits windows of items it collects from the source Publisher . The resulting
* Publisher emits connected , non - overlapping windows , each of a fixed duration specified by the
* { @ code timespan } argument or a maximum size specified by the { @ code count } ar... | ObjectHelper . verifyPositive ( bufferSize , "bufferSize" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . verifyPositive ( count , "count" ) ; return RxJavaPlugins . onAssembly ( new FlowableWindowTimed < T > ( this , times... |
public class CronCalendar { /** * Determines whether the given time ( in milliseconds ) is ' included ' by the
* < CODE > BaseCalendar < / CODE >
* @ param timeInMillis
* the date / time to test
* @ return a boolean indicating whether the specified time is ' included ' by
* the < CODE > CronCalendar < / CODE ... | if ( getBaseCalendar ( ) != null && ! getBaseCalendar ( ) . isTimeIncluded ( timeInMillis ) ) { return false ; } return ! m_aCronExpression . isSatisfiedBy ( new Date ( timeInMillis ) ) ; |
public class Engine { /** * This method is an < i > alias < / i > for the { @ link # evolve ( EvolutionStart ) }
* method .
* @ since 3.1 */
@ Override public EvolutionResult < G , C > apply ( final EvolutionStart < G , C > start ) { } } | return evolve ( start ) ; |
public class LTPAKeyFileUtilityImpl { /** * Write the LTPA key properties to the given OutputStream . This method
* will close the OutputStream .
* @ param keyImportFile The import file to be created
* @ param ltpaProps The properties containing the LTPA keys
* @ throws TokenException
* @ throws IOException *... | try { // Write the ltpa key propeperties to
ltpaProps . store ( os , null ) ; } catch ( IOException e ) { throw e ; } finally { if ( os != null ) try { os . close ( ) ; } catch ( IOException e ) { } } return ; |
public class CommerceUserSegmentEntryPersistenceImpl { /** * Removes the commerce user segment entry with the primary key from the database . Also notifies the appropriate model listeners .
* @ param primaryKey the primary key of the commerce user segment entry
* @ return the commerce user segment entry that was re... | Session session = null ; try { session = openSession ( ) ; CommerceUserSegmentEntry commerceUserSegmentEntry = ( CommerceUserSegmentEntry ) session . get ( CommerceUserSegmentEntryImpl . class , primaryKey ) ; if ( commerceUserSegmentEntry == null ) { if ( _log . isDebugEnabled ( ) ) { _log . debug ( _NO_SUCH_ENTITY_WI... |
public class StringAttributeConstraintsTypeMarshaller { /** * Marshall the given parameter object . */
public void marshall ( StringAttributeConstraintsType stringAttributeConstraintsType , ProtocolMarshaller protocolMarshaller ) { } } | if ( stringAttributeConstraintsType == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( stringAttributeConstraintsType . getMinLength ( ) , MINLENGTH_BINDING ) ; protocolMarshaller . marshall ( stringAttributeConstraintsType . getMaxLength ( ... |
public class LogBuffer { /** * Return 48 - bit signed long from buffer . ( little - endian )
* @ see mysql - 5.1.60 / include / my _ global . h - sint6korr */
public final long getLong48 ( final int pos ) { } } | final int position = origin + pos ; if ( pos + 5 >= limit || pos < 0 ) throw new IllegalArgumentException ( "limit excceed: " + ( pos < 0 ? pos : ( pos + 5 ) ) ) ; byte [ ] buf = buffer ; return ( ( long ) ( 0xff & buf [ position ] ) ) | ( ( long ) ( 0xff & buf [ position + 1 ] ) << 8 ) | ( ( long ) ( 0xff & buf [ posi... |
public class MetaBuilder { /** * 文档参考 :
* http : / / dev . mysql . com / doc / connector - j / en / connector - j - reference - type - conversions . html
* JDBC 与时间有关类型转换规则 , mysql 类型到 java 类型如下对应关系 :
* DATEjava . sql . Date
* DATETIMEjava . sql . Timestamp
* TIMESTAMP [ ( M ) ] java . sql . Timestamp
* TIM... | String sql = dialect . forTableBuilderDoBuild ( tableMeta . name ) ; Statement stm = conn . createStatement ( ) ; ResultSet rs = stm . executeQuery ( sql ) ; ResultSetMetaData rsmd = rs . getMetaData ( ) ; int columnCount = rsmd . getColumnCount ( ) ; Map < String , ColumnMeta > columnMetaMap = new HashMap < > ( ) ; if... |
public class CPDefinitionPersistenceImpl { /** * Removes the cp definition with the primary key from the database . Also notifies the appropriate model listeners .
* @ param primaryKey the primary key of the cp definition
* @ return the cp definition that was removed
* @ throws NoSuchCPDefinitionException if a cp... | Session session = null ; try { session = openSession ( ) ; CPDefinition cpDefinition = ( CPDefinition ) session . get ( CPDefinitionImpl . class , primaryKey ) ; if ( cpDefinition == null ) { if ( _log . isDebugEnabled ( ) ) { _log . debug ( _NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey ) ; } throw new NoSuchCPDefiniti... |
public class Flowable { /** * Converts an arbitrary Reactive - Streams Publisher into a Flowable if not already a
* Flowable .
* The { @ link Publisher } must follow the
* < a href = " https : / / github . com / reactive - streams / reactive - streams - jvm # reactive - streams " > Reactive - Streams specificatio... | if ( source instanceof Flowable ) { return RxJavaPlugins . onAssembly ( ( Flowable < T > ) source ) ; } ObjectHelper . requireNonNull ( source , "publisher is null" ) ; return RxJavaPlugins . onAssembly ( new FlowableFromPublisher < T > ( source ) ) ; |
public class GSCHImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case AfplibPackage . GSCH__HX : return getHX ( ) ; case AfplibPackage . GSCH__HY : return getHY ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; |
public class StringPath { /** * Method to construct the less than or equals expression for string
* @ param value the string value
* @ return Expression */
public Expression < String > lte ( String value ) { } } | String valueString = "'" + value + "'" ; return new Expression < String > ( this , Operation . lte , valueString ) ; |
public class AvroUtils { /** * Returns either the default { @ link AvroUtils } which throw an exception in cases where Avro
* would be needed or loads the specific utils for Avro from flink - avro . */
public static AvroUtils getAvroUtils ( ) { } } | // try and load the special AvroUtils from the flink - avro package
try { Class < ? > clazz = Class . forName ( AVRO_KRYO_UTILS , false , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; return clazz . asSubclass ( AvroUtils . class ) . getConstructor ( ) . newInstance ( ) ; } catch ( ClassNotFoundException e... |
public class AggregatorImpl { /** * Returns an opened ServiceTracker for the Aggregator options . Aggregator options
* are created by the bundle activator and are shared by all Aggregator instances
* created from the same bundle .
* @ param bundleContext The contributing bundle context
* @ return The opened ser... | ServiceTracker < IOptions , ? > tracker = new ServiceTracker < IOptions , Object > ( bundleContext , bundleContext . createFilter ( "(&(" + Constants . OBJECTCLASS + "=" + IOptions . class . getName ( ) + // $ NON - NLS - 1 $ / / $ NON - NLS - 2 $
")(name=" + getServletBundleName ( ) + "))" ) , // $ NON - NLS - 1 $ / /... |
public class BaseTraceService { /** * Escape \ b , \ f , \ n , \ r , \ t , " , \ , / characters and appends to a string builder
* @ param sb String builder to append to
* @ param s String to escape */
private void jsonEscape ( StringBuilder sb , String s ) { } } | if ( s == null ) { sb . append ( s ) ; return ; } for ( int i = 0 ; i < s . length ( ) ; i ++ ) { char c = s . charAt ( i ) ; switch ( c ) { case '\b' : sb . append ( "\\b" ) ; break ; case '\f' : sb . append ( "\\f" ) ; break ; case '\n' : sb . append ( "\\n" ) ; break ; case '\r' : sb . append ( "\\r" ) ; break ; cas... |
public class AbstractBcAsymmetricCipherFactory { /** * Helper function to create supported key size arrays .
* @ param minSize minimum size supported .
* @ param maxSize maximum size supported .
* @ param step intermediate step supported .
* @ return an array of sizes . */
protected static int [ ] newKeySizeArr... | int [ ] result = new int [ ( ( maxSize - minSize ) / step ) + 1 ] ; for ( int i = minSize , j = 0 ; i <= maxSize ; i += step , j ++ ) { result [ j ] = i ; } return result ; |
public class TaintConfig { /** * Loads summaries from stream checking the format
* @ param input input stream of configured summaries
* @ param checkRewrite whether to check duplicit summaries
* @ throws IOException if cannot read the stream or the format is bad
* @ throws IllegalArgumentException for bad metho... | new TaintConfigLoader ( ) . load ( input , new TaintConfigLoader . TaintConfigReceiver ( ) { @ Override public void receiveTaintConfig ( String typeSignature , String config ) throws IOException { if ( TaintMethodConfig . accepts ( typeSignature , config ) ) { if ( checkRewrite && containsKey ( typeSignature ) ) { thro... |
public class UpdateNFSFileShareRequest { /** * The list of clients that are allowed to access the file gateway . The list must contain either valid IP addresses
* or valid CIDR blocks .
* @ return The list of clients that are allowed to access the file gateway . The list must contain either valid IP
* addresses o... | if ( clientList == null ) { clientList = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return clientList ; |
public class ThreadDumps { /** * Prints the { @ link ThreadInfo } ( because { @ link ThreadInfo # toString ( ) } caps out the stack trace at 8 frames )
* @ param writer the writer to print to .
* @ param t the thread to print
* @ param mbean the { @ link ThreadMXBean } to use . */
@ edu . umd . cs . findbugs . an... | "VA_FORMAT_STRING_USES_NEWLINE" } , justification = "We don't want platform specific" ) public static void printThreadInfo ( PrintWriter writer , ThreadInfo t , ThreadMXBean mbean ) { long cpuPercentage ; try { long cpuTime = mbean . getThreadCpuTime ( t . getThreadId ( ) ) ; long threadUserTime = mbean . getThreadUser... |
public class RawScale2x { /** * Process filter .
* @ param srcImage The image source .
* @ param dstImage The image destination .
* @ param x The location x .
* @ param y The location y . */
private void process ( int [ ] srcImage , int [ ] dstImage , int x , int y ) { } } | final int b = getSourcePixel ( srcImage , x , y - 1 ) ; final int d = getSourcePixel ( srcImage , x - 1 , y ) ; final int e = getSourcePixel ( srcImage , x , y ) ; final int f = getSourcePixel ( srcImage , x + 1 , y ) ; final int h = getSourcePixel ( srcImage , x , y + 1 ) ; int e0 = e ; int e1 = e ; int e2 = e ; int e... |
public class CheckAccessControls { /** * Returns the type that best represents the instance type for { @ code type } .
* < ul >
* < li > Prototype type = > The instance type having that prototype
* < li > Instance type = > The type
* < li > Constructor type = > The type that constructor instantiates
* < li > ... | if ( type == null ) { return null ; } else if ( type . isUnionType ( ) ) { return null ; // A union has no meaningful instance type .
} else if ( type . isInstanceType ( ) || type . isUnknownType ( ) ) { return type . toMaybeObjectType ( ) ; } else if ( type . isConstructor ( ) || type . isInterface ( ) ) { return type... |
public class FacesImpl { /** * Identify unknown faces from a person group .
* @ param personGroupId PersonGroupId of the target person group , created by PersonGroups . Create
* @ param faceIds Array of query faces faceIds , created by the Face - Detect . Each of the faces are identified independently . The valid n... | if ( this . client . azureRegion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.azureRegion() is required and cannot be null." ) ; } if ( personGroupId == null ) { throw new IllegalArgumentException ( "Parameter personGroupId is required and cannot be null." ) ; } if ( faceIds == null ) { t... |
public class ClassDescriptor { /** * adds a FIELDDESCRIPTOR to this ClassDescriptor .
* @ param fld */
public void addFieldDescriptor ( FieldDescriptor fld ) { } } | fld . setClassDescriptor ( this ) ; // BRJ
if ( m_FieldDescriptions == null ) { m_FieldDescriptions = new FieldDescriptor [ 1 ] ; m_FieldDescriptions [ 0 ] = fld ; } else { int size = m_FieldDescriptions . length ; FieldDescriptor [ ] tmpArray = new FieldDescriptor [ size + 1 ] ; System . arraycopy ( m_FieldDescription... |
public class xen_upgrade { /** * < pre >
* Converts API response of bulk operation into object and returns the object array in case of get request .
* < / pre > */
protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } } | xen_upgrade_responses result = ( xen_upgrade_responses ) service . get_payload_formatter ( ) . string_to_resource ( xen_upgrade_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exception ( result . message , r... |
public class FavoritesEditController { /** * Handles all Favorites portlet EDIT mode renders . Populates model with user ' s favorites and
* selects a view to display those favorites .
* < p > View selection :
* < p > Returns " jsp / Favorites / edit " in the normal case where the user has at least one favorited ... | IUserInstance ui = userInstanceManager . getUserInstance ( portalRequestUtils . getCurrentPortalRequest ( ) ) ; UserPreferencesManager upm = ( UserPreferencesManager ) ui . getPreferencesManager ( ) ; IUserLayoutManager ulm = upm . getUserLayoutManager ( ) ; IUserLayout userLayout = ulm . getUserLayout ( ) ; // TODO : ... |
public class ControlBeanContextServicesSupport { /** * Serialize this instance including any serializable services and BeanContextServicesListeners .
* Any services or listeners which are not Serializable will not be present once deserialized .
* @ param oos
* @ throws IOException */
private synchronized void wri... | int serializable = 0 ; oos . defaultWriteObject ( ) ; // write out the service providers
Set < Map . Entry < Class , ServiceProvider > > providers = _serviceProviders . entrySet ( ) ; for ( Map . Entry < Class , ServiceProvider > provider : providers ) { if ( provider . getValue ( ) . isSerializable ( ) ) { serializabl... |
public class SipApplicationSessionImpl { /** * ( non - Javadoc )
* @ see javax . servlet . sip . SipApplicationSession # getSessions ( ) */
@ SuppressWarnings ( value = "unchecked" ) public Iterator < ? > getSessions ( ) { } } | if ( ! isValid ( ) ) { throw new IllegalStateException ( "SipApplicationSession already invalidated !" ) ; } Set < MobicentsSipSession > sipSessions = getSipSessions ( false ) ; Set < HttpSession > httpSessions = getHttpSessions ( ) ; Set protocolSessions = new HashSet ( ) ; protocolSessions . addAll ( httpSessions ) ;... |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link AbstractTimeComplexType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link AbstractTimeComplexType ... | return new JAXBElement < AbstractTimeComplexType > ( __TimeComplex_QNAME , AbstractTimeComplexType . class , null , value ) ; |
public class HTMLGen { /** * - - - - - HTML Version Specific - - - - - */
public HTMLGen imports ( Imports imports ) { } } | // this . imports = imports ;
for ( String str : imports . css ) { forward . print ( "<link rel=\"stylesheet\" href=\"" ) ; forward . print ( imports . themePath ( null ) ) ; forward . print ( str ) ; forward . println ( "\">" ) ; } for ( String str : imports . js ) { forward . print ( "<script type=\"text/javascript\"... |
public class StatementServiceImp { /** * ( non - Javadoc )
* @ see com . popbill . api . StatementService # getPopUpURL ( java . lang . String , int , java . lang . String ) */
@ Override public String getPopUpURL ( String CorpNum , int ItemCode , String MgtKey ) throws PopbillException { } } | if ( MgtKey == null || MgtKey . isEmpty ( ) ) throw new PopbillException ( - 99999999 , "관리번호 가 입력되지 않았습니다." ) ; return getPopUpURL ( CorpNum , ItemCode , MgtKey , null ) ; |
public class SortaServiceImpl { /** * A helper function to check if the ontology term ( OT ) contains the ontology annotations provided
* in input . If the OT has the same annotation , the OT will be considered as a good match and the
* similarity scores 100 are allocated to the OT */
private Entity calculateNGromO... | OntologyTermHitEntity mapEntity = new OntologyTermHitEntity ( ontologyTermEntity , ontologyTermHitMetaData ) ; for ( Entity annotationEntity : ontologyTermEntity . getEntities ( OntologyTermMetadata . ONTOLOGY_TERM_DYNAMIC_ANNOTATION ) ) { String annotationName = annotationEntity . getString ( OntologyTermDynamicAnnota... |
public class ComposedCharIter { /** * Returns the next precomposed Unicode character .
* Repeated calls to < tt > next < / tt > return all of the precomposed characters defined
* by Unicode , in ascending order . After all precomposed characters have
* been returned , { @ link # hasNext } will return < tt > false... | if ( nextChar == Normalizer . DONE ) { findNextChar ( ) ; } curChar = nextChar ; nextChar = Normalizer . DONE ; return ( char ) curChar ; |
public class TempFileProvider { /** * Create a temporary file provider for a given type .
* @ param providerType The provider type string ( used as a prefix in the temp file dir name )
* @ param executor Executor which will be used to manage temp file provider tasks ( like cleaning up / deleting the temp files when... | if ( cleanExisting ) { try { // The " clean existing " logic is as follows :
// 1 ) Rename the root directory " foo " corresponding to the provider type to " bar "
// 2 ) Submit a task to delete " bar " and its contents , in a background thread , to the the passed executor .
// 3 ) Create a " foo " root directory for t... |
public class SynchroLogger { /** * Log a string .
* @ param label label text
* @ param data string data */
public static void log ( String label , String data ) { } } | if ( LOG != null ) { LOG . write ( label ) ; LOG . write ( ": " ) ; LOG . println ( data ) ; LOG . flush ( ) ; } |
public class TileCache { /** * Updates the tile cache by rebuilding tiles touched by unfinished obstacle requests .
* @ return Returns true if the tile cache is fully up to date with obstacle requests and tile rebuilds . If the tile
* cache is up to date another ( immediate ) call to update will have no effect ; ot... | if ( m_update . isEmpty ( ) ) { // Process requests .
for ( ObstacleRequest req : m_reqs ) { int idx = decodeObstacleIdObstacle ( req . ref ) ; if ( idx >= m_obstacles . size ( ) ) { continue ; } TileCacheObstacle ob = m_obstacles . get ( idx ) ; int salt = decodeObstacleIdSalt ( req . ref ) ; if ( ob . salt != salt ) ... |
public class DurianPlugins { /** * Returns an implementation of the given class using the system properties as a registry . */
private static Object getPluginImplementationViaProperty ( Class < ? > pluginClass ) { } } | String className = pluginClass . getCanonicalName ( ) ; if ( className == null ) { throw new IllegalArgumentException ( "Class " + pluginClass + " does not have a canonical name!" ) ; } // Check system properties for plugin class .
// This will only happen during system startup thus it ' s okay to use the synchronized
... |
public class HttpBase { /** * 移除一个头信息
* @ param name Header名
* @ return this */
public T removeHeader ( String name ) { } } | if ( name != null ) { headers . remove ( name . trim ( ) ) ; } return ( T ) this ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcParameterValue ( ) { } } | if ( ifcParameterValueEClass == null ) { ifcParameterValueEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 849 ) ; } return ifcParameterValueEClass ; |
public class lbmonbindings_service_binding { /** * Use this API to fetch filtered set of lbmonbindings _ service _ binding resources .
* filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */
public static lbmonbindings_service_binding [ ] get_filtered ( nitro_service service , String m... | lbmonbindings_service_binding obj = new lbmonbindings_service_binding ( ) ; obj . set_monitorname ( monitorname ) ; options option = new options ( ) ; option . set_filter ( filter ) ; lbmonbindings_service_binding [ ] response = ( lbmonbindings_service_binding [ ] ) obj . getfiltered ( service , option ) ; return respo... |
public class PrivateTaskScheduler { /** * Free / Kill this task . */
public void free ( ) { } } | if ( m_bKeepAlive ) { m_bKeepAlive = false ; // Don ' t stay alive
m_bThreadSuspended = false ; // Unsuspend this puppy
try { this . notify ( ) ; // If you ' re waiting , continue ( and the thread will die )
} catch ( IllegalMonitorStateException ex ) { // Ignore
} } super . free ( ) ; |
public class LaTeXMLConverter { /** * Parses latex to MathML string via LaTeXML ( locally )
* @ param arguments
* @ param latex
* @ return */
public String convertToString ( List < String > arguments , String latex ) { } } | NativeResponse response = parseToNativeResponse ( arguments , latex ) ; if ( handleResponseCode ( response , NAME , LOG ) != 0 ) { return null ; } LOG . info ( NAME + " conversion successful." ) ; return response . getResult ( ) ; |
public class CsvFileDownloader { /** * Provide iterator via OpenCSV ' s CSVReader .
* Provides a way to skip top rows by providing regex . ( This is useful when CSV file comes with comments on top rows , but not in fixed size .
* It also provides validation on schema by matching header names between property ' s sc... | log . info ( "Beginning to download file: " + file ) ; final State state = fileBasedExtractor . workUnitState ; CSVReader reader ; try { if ( state . contains ( DELIMITER ) ) { String delimiterStr = state . getProp ( DELIMITER ) . trim ( ) ; Preconditions . checkArgument ( delimiterStr . length ( ) == 1 , "Delimiter sh... |
public class JcrServiceImpl { /** * Picks access entry for the given principal .
* @ param acl
* @ param principal
* @ return the ACL entry
* @ throws RepositoryException */
private AccessControlEntry pick ( AccessControlList acl , String principal ) throws RepositoryException { } } | for ( AccessControlEntry entry : acl . getAccessControlEntries ( ) ) { if ( entry . getPrincipal ( ) . getName ( ) . equals ( principal ) ) { return entry ; } } return null ; |
public class BrushedMetalFilter { /** * Return a mod b . This differs from the % operator with respect to negative numbers .
* @ param a the dividend
* @ param B the divisor
* @ return a mod b */
private static int mod ( int a , final int B ) { } } | final int N = a / B ; a -= N * B ; if ( a < 0 ) { return a + B ; } return a ; |
public class ShReplicatedSessionDataFactory { /** * ( non - Javadoc )
* @ see org . jdiameter . common . api . app . IAppSessionDataFactory # getAppSessionData ( java . lang . Class , java . lang . String ) */
@ Override public IShSessionData getAppSessionData ( Class < ? extends AppSession > clazz , String sessionId... | if ( clazz . equals ( ClientShSession . class ) ) { ShClientSessionDataReplicatedImpl data = new ShClientSessionDataReplicatedImpl ( sessionId , this . mobicentsCluster ) ; return data ; } else if ( clazz . equals ( ServerShSession . class ) ) { ShServerSessionDataReplicatedImpl data = new ShServerSessionDataReplicated... |
public class DocumentTemplateRepository { /** * region > validate . . . */
@ Programmatic public TranslatableString validateApplicationTenancyAndDate ( final DocumentType proposedType , final String proposedAtPath , final LocalDate proposedDate , final DocumentTemplate ignore ) { } } | final List < DocumentTemplate > existingTemplates = findByTypeAndAtPath ( proposedType , proposedAtPath ) ; for ( DocumentTemplate existingTemplate : existingTemplates ) { if ( existingTemplate == ignore ) { continue ; } if ( java . util . Objects . equals ( existingTemplate . getDate ( ) , proposedDate ) ) { return Tr... |
public class ClassUtil { /** * 获得资源相对路径对应的URL
* @ param resource 资源相对路径
* @ param baseClass 基准Class , 获得的相对路径相对于此Class所在路径 , 如果为 { @ code null } 则相对ClassPath
* @ return { @ link URL }
* @ see ResourceUtil # getResource ( String , Class ) */
public static URL getResourceUrl ( String resource , Class < ? > baseCl... | return ResourceUtil . getResource ( resource , baseClass ) ; |
public class DescribeGatewayInformationRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeGatewayInformationRequest describeGatewayInformationRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( describeGatewayInformationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeGatewayInformationRequest . getGatewayARN ( ) , GATEWAYARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to mars... |
public class ShardedCounterServiceImpl { /** * Helper method to determine if a counter ' s incrementAmount can be mutated ( incremented or decremented ) . In order
* for that to happen , the counter ' s status must be { @ link CounterStatus # AVAILABLE } .
* @ param counterName The name of the counter .
* @ param... | Preconditions . checkNotNull ( counterName ) ; Preconditions . checkNotNull ( counterStatus ) ; if ( counterStatus != CounterStatus . AVAILABLE && counterStatus != CounterStatus . READ_ONLY_COUNT ) { final String msg = String . format ( "Can't mutate with status %s. Counter must be in in the %s or %s state!" , counter... |
public class GeoPackageProperties { /** * Initialize the configuration properties
* @ return properties */
private static Properties initializeConfigurationProperties ( ) { } } | Properties properties = new Properties ( ) ; InputStream in = GeoPackageProperties . class . getResourceAsStream ( "/" + PropertyConstants . PROPERTIES_FILE ) ; if ( in != null ) { try { properties . load ( in ) ; } catch ( Exception e ) { log . log ( Level . SEVERE , "Failed to load properties file: " + PropertyConsta... |
public class WebLocatorAbstractBuilder { /** * < p > < b > Used for finding element process ( to generate xpath address ) < / b > < / p >
* < p > Use it when element must have all specified css classes ( order is not important ) . < / p >
* < ul >
* < li > Provided classes must be conform css rules . < / li >
*... | pathBuilder . setClasses ( classes ) ; return ( T ) this ; |
public class SingleDbJDBCConnection { /** * { @ inheritDoc } */
@ Override protected int deleteValueData ( String cid ) throws SQLException , InvalidItemStateException , RepositoryException { } } | if ( deleteValue == null ) { deleteValue = dbConnection . prepareStatement ( DELETE_VALUE ) ; } else { deleteValue . clearParameters ( ) ; } deleteValue . setString ( 1 , cid ) ; return executeUpdate ( deleteValue , TYPE_DELETE_VALUE ) ; |
public class Manager { /** * Sends a { @ link Crouton } within a delayed { @ link Message } .
* @ param crouton
* The { @ link Crouton } that should be sent .
* @ param messageId
* The { @ link Message } id .
* @ param delay
* The delay in milliseconds . */
private void sendMessageDelayed ( Crouton crouton ... | Message message = obtainMessage ( messageId ) ; message . obj = crouton ; sendMessageDelayed ( message , delay ) ; |
public class KernelUtils { /** * This
* @ param stateDir */
public static void cleanDirectory ( File dir , String dirType ) { } } | boolean cleaned = true ; if ( dir . exists ( ) && dir . isDirectory ( ) ) cleaned = FileUtils . recursiveClean ( dir ) ; if ( ! cleaned ) throw new IllegalStateException ( "The " + dirType + " could not be cleaned. " + dirType + "=" + dir ) ; // re - create empty directory if it doesn ' t exist
boolean created = dir . ... |
public class ReflectionMethods { /** * Finds the public , protected , default or private method of the object with the provided name and parameters .
* @ param obj
* @ param methodName
* @ param params
* @ return */
public static Method findMethod ( Object obj , String methodName , Object ... params ) { } } | Class < ? > [ ] classArray = new Class < ? > [ params . length ] ; for ( int i = 0 ; i < params . length ; i ++ ) { classArray [ i ] = params [ i ] . getClass ( ) ; } try { // look on all the public , protected , default and private methods of the class hierarchy .
Class < ? > klass = obj . getClass ( ) ; while ( klass... |
public class HeaderViewRecyclerAdapter { /** * Replaces the underlying adapter , notifying RecyclerView of changes
* @ param adapter The new adapter to wrap */
public void setAdapter ( RecyclerView . Adapter adapter ) { } } | if ( mWrappedAdapter != null && mWrappedAdapter . getItemCount ( ) > 0 ) { notifyItemRangeRemoved ( getHeaderCount ( ) , mWrappedAdapter . getItemCount ( ) ) ; } setWrappedAdapter ( adapter ) ; notifyItemRangeInserted ( getHeaderCount ( ) , mWrappedAdapter . getItemCount ( ) ) ; |
public class SharedElementTransitionChangeHandler { /** * The transition will be delayed until the view with the name passed in is available in the " to " hierarchy . This is
* particularly useful for views that don ' t load instantly , like RecyclerViews . Note that using this method can
* potentially lock up your... | if ( ! sharedElementNames . values ( ) . contains ( name ) ) { throw new IllegalStateException ( "Can't wait on a shared element that hasn't been registered using addSharedElement" ) ; } waitForTransitionNames . add ( name ) ; |
public class ImgUtil { /** * 缩放图像 ( 按高度和宽度缩放 ) < br >
* 缩放后默认为jpeg格式 , 此方法并不关闭流
* @ param srcStream 源图像流
* @ param destStream 缩放后的图像目标流
* @ param width 缩放后的宽度
* @ param height 缩放后的高度
* @ param fixedColor 比例不对时补充的颜色 , 不补充为 < code > null < / code >
* @ throws IORuntimeException IO异常 */
public static void sc... | scale ( read ( srcStream ) , getImageOutputStream ( destStream ) , width , height , fixedColor ) ; |
public class ParseUtils { /** * Get an exception reporting that an element of a given type and name has
* already been declared in this scope .
* @ param reader the stream reader
* @ param name the name that was redeclared
* @ return the exception */
public static XMLStreamException duplicateNamedElement ( fina... | return new XMLStreamException ( "An element of this type named '" + name + "' has already been declared" , reader . getLocation ( ) ) ; |
public class BroxWarpingSpacial { /** * Inner SOR iteration step
* @ param i Index of target pixel at ( x , y )
* @ param ipx ( x + 1 , y )
* @ param imx ( x - 1 , y )
* @ param ipy ( x , y + 1)
* @ param imy ( x , y - 1) */
private float iterationSor ( GrayF32 image1 , GrayF32 deriv1X , GrayF32 deriv1Y , int... | float w = SOR_RELAXATION ; // these variables could be precomputed once . See equation 11
float psid = psiData . data [ i ] ; float psig = gamma * psiGradient . data [ i ] ; float di = warpImage2 . data [ i ] - image1 . data [ i ] ; float dx2 = warpDeriv2X . data [ i ] ; float dy2 = warpDeriv2Y . data [ i ] ; float dxx... |
public class InternalSARLParser { /** * InternalSARL . g : 11518:1 : ruleXAnnotation returns [ EObject current = null ] : ( ( ) otherlv _ 1 = ' @ ' ( ( ruleQualifiedName ) ) ( ( ( ' ( ' ) = > otherlv _ 3 = ' ( ' ) ( ( ( ( ( ( ( ruleValidID ) ) ' = ' ) ) = > ( lv _ elementValuePairs _ 4_0 = ruleXAnnotationElementValuePa... | EObject current = null ; Token otherlv_1 = null ; Token otherlv_3 = null ; Token otherlv_5 = null ; Token otherlv_8 = null ; EObject lv_elementValuePairs_4_0 = null ; EObject lv_elementValuePairs_6_0 = null ; EObject lv_value_7_0 = null ; enterRule ( ) ; try { // InternalSARL . g : 11524:2 : ( ( ( ) otherlv _ 1 = ' @ '... |
public class Expiration { /** * Return expiry for a given cache operation . It returns null when the
* expiry time cannot be determined , in which case clients should not update
* expiry settings for the cached entry . */
public static Duration getExpiry ( ExpiryPolicy policy , Operation op ) { } } | if ( policy == null ) { return getDefaultDuration ( ) ; } switch ( op ) { case CREATION : try { return policy . getExpiryForCreation ( ) ; } catch ( Throwable t ) { log . getExpiryHasThrown ( t ) ; return getDefaultDuration ( ) ; } case ACCESS : try { return policy . getExpiryForAccess ( ) ; } catch ( Throwable t ) { l... |
public class DocumentVersionInfo { /** * Returns the version document of the given document , if any ; returns null otherwise .
* @ param document the document to get the version from .
* @ return the version of the given document , if any ; returns null otherwise . */
static BsonDocument getDocumentVersionDoc ( fi... | if ( document == null || ! document . containsKey ( DOCUMENT_VERSION_FIELD ) ) { return null ; } return document . getDocument ( DOCUMENT_VERSION_FIELD , null ) ; |
public class ElementLayout { /** * Checks for a circular reference to the same linked layout , throwing an exception if found . */
private void checkForCircularReference ( ) { } } | ElementLayout layout = this ; while ( ( layout = layout . getAncestor ( ElementLayout . class ) ) != null ) { if ( layout . linked && layout . shared == shared && layout . layoutName . equals ( layoutName ) ) { CWFException . raise ( "Circular reference to layout " + layoutName ) ; } } |
public class HttpsFileUploader { /** * Uploads a file . This is a convenience method of the more general
* { @ link # upload ( com . addicticks . net . httpsupload . HttpsFileUploaderConfig , java . util . List , java . util . Map , com . addicticks . net . httpsupload . UploadProgress ) upload ( . . . ) } method .
... | return upload ( config , Collections . singletonList ( new UploadItemFile ( uploadFile ) ) , null , null ) ; |
public class SoundStore { /** * Get a MOD sound ( mod / xm etc )
* @ param ref The stream to the MOD to load
* @ param in The stream to the MOD to load
* @ return The sound for play back
* @ throws IOException Indicates a failure to read the data */
public Audio getMOD ( String ref , InputStream in ) throws IOE... | if ( ! soundWorks ) { return new NullAudio ( ) ; } if ( ! inited ) { throw new RuntimeException ( "Can't load sounds until SoundStore is init(). Use the container init() method." ) ; } if ( deferred ) { return new DeferredSound ( ref , in , DeferredSound . MOD ) ; } return new MODSound ( this , in ) ; |
public class BaseFacebookClient { /** * Appends the given { @ code parameter } to the given { @ code parameters } array .
* @ param parameter
* The parameter value to append .
* @ param parameters
* The parameters to which the given { @ code parameter } is appended .
* @ return A new array which contains both... | Parameter [ ] updatedParameters = new Parameter [ parameters . length + 1 ] ; System . arraycopy ( parameters , 0 , updatedParameters , 0 , parameters . length ) ; updatedParameters [ parameters . length ] = parameter ; return updatedParameters ; |
public class RoadNetworkConstants { /** * Set the preferred distance below which roads may be connected .
* @ param distance is the preferred distance ( in meters ) below which roads may be connected . */
public static void setPreferredRoadConnectionDistance ( double distance ) { } } | final Preferences prefs = Preferences . userNodeForPackage ( RoadNetworkConstants . class ) ; if ( prefs != null ) { if ( distance <= 0. ) { prefs . remove ( "ROAD_CONNECTION_DISTANCE" ) ; // $ NON - NLS - 1 $
} else { prefs . putDouble ( "ROAD_CONNECTION_DISTANCE" , distance ) ; // $ NON - NLS - 1 $
} } |
public class Stream { /** * If specified map is null , returns an empty { @ code Stream } ,
* otherwise returns a { @ code Stream } containing entries of this map .
* @ param < K > the type of map keys
* @ param < V > the type of map values
* @ param map the map with elements to be passed to stream
* @ return... | return ( map == null ) ? Stream . < Map . Entry < K , V > > empty ( ) : Stream . of ( map ) ; |
public class MultiLayerNetwork { /** * See { @ link # rnnTimeStep ( INDArray ) } for details < br >
* If no memory workspace is provided , the output will be detached ( not in any workspace ) . < br >
* If a memory workspace is provided , the output activation array ( i . e . , the INDArray returned by this method ... | try { boolean inputIs2d = input . rank ( ) == 2 ; INDArray out = outputOfLayerDetached ( false , FwdPassType . RNN_TIMESTEP , layers . length - 1 , input , null , null , outputWorkspace ) ; if ( inputIs2d && out . rank ( ) == 3 && layers [ layers . length - 1 ] . type ( ) == Type . RECURRENT ) { // Return 2d output wit... |
public class FastQueue { /** * Returns a new element of data . If there are new data elements available then array will
* automatically grow .
* @ return A new instance . */
public T grow ( ) { } } | if ( size < data . length ) { return data [ size ++ ] ; } else { growArray ( ( data . length + 1 ) * 2 ) ; return data [ size ++ ] ; } |
public class Fibers { /** * Creates a new Fiber subclassing the Fiber class and overriding the { @ link Fiber # run ( ) run } method .
* The new fiber has no name , and uses the default initial stack size .
* @ param scheduler The scheduler pool in which the fiber should run .
* @ throws NullPointerException when... | return Fibers . < V > create ( scheduler ) . start ( ) ; |
public class AsynchDeletionThread { /** * Method isStopping - Determine if the AsynchDeletionThread is stopping or not .
* @ return boolean */
public boolean isStopping ( ) { } } | if ( tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isStopping" ) ; SibTr . exit ( tc , "isStopping" , new Boolean ( _isStopping ) ) ; } return _isStopping ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.