signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class PrincipalAttributeMultifactorAuthenticationTrigger { /** * Resolve multifactor provider by regex predicate set .
* @ param context the context
* @ param service the service
* @ param principal the principal
* @ param providers the providers
* @ return the set */
protected Set < Event > resolveMul... | val attributeNames = commaDelimitedListToSet ( casProperties . getAuthn ( ) . getMfa ( ) . getGlobalPrincipalAttributeNameTriggers ( ) ) ; return multifactorAuthenticationProviderResolver . resolveEventViaPrincipalAttribute ( principal , attributeNames , service , context , providers , input -> providers . stream ( ) .... |
public class AnnotationManager { /** * Find { @ link ru . yandex . qatools . allure . annotations . Issues } annotation and return respective key
* @ return issue keys or empty array if annotation isn ' t present */
public String [ ] getIssueKeys ( ) { } } | Issues issues = getAnnotation ( Issues . class ) ; if ( issues == null ) { return new String [ 0 ] ; } List < String > keys = new ArrayList < > ( ) ; for ( Issue issue : issues . value ( ) ) { keys . add ( issue . value ( ) ) ; } return keys . toArray ( new String [ keys . size ( ) ] ) ; |
public class br { /** * Use this operation to reboot Repeater Instance . */
public static br reboot ( nitro_service client , br resource ) throws Exception { } } | return ( ( br [ ] ) resource . perform_operation ( client , "reboot" ) ) [ 0 ] ; |
public class ReservoirItemsUnion { /** * Returns a byte array representation of this union . This method should be used when the array
* elements are subclasses of a common base class .
* @ param serDe An instance of ArrayOfItemsSerDe
* @ param clazz A class to which the items are cast before serialization
* @ ... | final int preLongs , outBytes ; final boolean empty = gadget_ == null ; final byte [ ] gadgetBytes = ( gadget_ != null ? gadget_ . toByteArray ( serDe , clazz ) : null ) ; if ( empty ) { preLongs = Family . RESERVOIR_UNION . getMinPreLongs ( ) ; outBytes = 8 ; } else { preLongs = Family . RESERVOIR_UNION . getMaxPreLon... |
public class MapUtils { /** * A list of the entries of { @ code map } , ordered by { @ code ordering }
* @ deprecated Because this doesn ' t seem any clearer than doing { @ code ordering . sortedCopy ( map . entrySet ( ) ) }
* directly . */
@ Deprecated public static < K , V > List < Entry < K , V > > sortedCopyOfE... | return ordering . sortedCopy ( map . entrySet ( ) ) ; |
public class CmmnActivity { /** * create a new activity / / / / / */
public CmmnActivity createActivity ( String activityId ) { } } | CmmnActivity activity = new CmmnActivity ( activityId , caseDefinition ) ; if ( activityId != null ) { namedActivities . put ( activityId , activity ) ; } activity . setParent ( this ) ; activities . add ( activity ) ; return activity ; |
public class UnsignedInteger { /** * Returns the result of adding this and { @ code val } . If the result would have more than 32 bits ,
* returns the low 32 bits of the result .
* @ since 14.0 */
@ CheckReturnValue public UnsignedInteger plus ( UnsignedInteger val ) { } } | return fromIntBits ( this . value + checkNotNull ( val ) . value ) ; |
public class DeploymentNode { /** * Adds a relationship between this and another deployment node .
* @ param destination the destination DeploymentNode
* @ param description a short description of the relationship
* @ param technology the technology
* @ return a Relationship object */
public Relationship uses (... | return uses ( destination , description , technology , InteractionStyle . Synchronous ) ; |
public class ConnectivityPredicate { /** * Filter , which returns true if at least one given state occurred
* @ param states NetworkInfo . State , which can have one or more states
* @ return true if at least one given state occurred */
public static Predicate < Connectivity > hasState ( final NetworkInfo . State .... | return new Predicate < Connectivity > ( ) { @ Override public boolean test ( @ NonNull Connectivity connectivity ) throws Exception { for ( NetworkInfo . State state : states ) { if ( connectivity . state ( ) == state ) { return true ; } } return false ; } } ; |
public class XHTMLExtension { /** * Returns the XML representation of a XHTML extension according the specification .
* Usually the XML representation will be inside of a Message XML representation like
* in the following example :
* < pre >
* & lt ; message id = " MlIpV - 4 " to = " gato1 @ gato . home " from ... | XmlStringBuilder xml = new XmlStringBuilder ( this ) ; xml . rightAngleBracket ( ) ; // Loop through all the bodies and append them to the string buffer
for ( CharSequence body : getBodies ( ) ) { xml . append ( body ) ; } xml . closeElement ( this ) ; return xml ; |
public class CmsImagePreviewDialog { /** * Initializes the preview . < p >
* @ param handler the preview handler */
public void init ( CmsImagePreviewHandler handler ) { } } | m_handler = handler ; m_propertiesTab = new CmsPropertiesTab ( m_galleryMode , m_dialogHeight , m_dialogWidth , m_handler ) ; m_tabbedPanel . add ( m_propertiesTab , Messages . get ( ) . key ( Messages . GUI_PREVIEW_TAB_PROPERTIES_0 ) ) ; if ( ( m_galleryMode == GalleryMode . editor ) || ( m_galleryMode == GalleryMode ... |
public class UriUtils { /** * Encodes the given URI port with the given encoding .
* @ param port the port to be encoded
* @ param encoding the character encoding to encode to
* @ return the encoded port
* @ throws UnsupportedEncodingException when the given encoding parameter is not supported */
public static ... | return HierarchicalUriComponents . encodeUriComponent ( port , encoding , HierarchicalUriComponents . Type . PORT ) ; |
public class DescribeFleetsResult { /** * Information about the EC2 Fleets .
* @ return Information about the EC2 Fleets . */
public java . util . List < FleetData > getFleets ( ) { } } | if ( fleets == null ) { fleets = new com . amazonaws . internal . SdkInternalList < FleetData > ( ) ; } return fleets ; |
public class SequenceVectors { /** * Builds vocabulary from provided SequenceIterator instance */
public void buildVocab ( ) { } } | val constructor = new VocabConstructor . Builder < T > ( ) . addSource ( iterator , minWordFrequency ) . setTargetVocabCache ( vocab ) . fetchLabels ( trainSequenceVectors ) . setStopWords ( stopWords ) . enableScavenger ( enableScavenger ) . setEntriesLimit ( vocabLimit ) . allowParallelTokenization ( configuration . ... |
public class EmbedBuilder { /** * Sets the Image of the embed .
* < p > < b > < a href = " http : / / i . imgur . com / 2hzuHFJ . png " > Example < / a > < / b >
* < p > < b > Uploading images with Embeds < / b >
* < br > When uploading an < u > image < / u >
* ( using { @ link net . dv8tion . jda . core . enti... | if ( url == null ) { this . image = null ; } else { urlCheck ( url ) ; this . image = new MessageEmbed . ImageInfo ( url , null , 0 , 0 ) ; } return this ; |
public class ResizeJobFlowStep { /** * Creates the final HadoopJarStepConfig once you are done configuring the step . You can use
* this as you would any other HadoopJarStepConfig .
* @ return HadoopJarStepConfig configured to perform the specified actions . */
public HadoopJarStepConfig toHadoopJarStepConfig ( ) {... | if ( args . size ( ) == 0 ) { throw new AmazonServiceException ( "Cannot create a ResizeJobFlowStep with no resize actions." ) ; } if ( wait == false ) { args . add ( "--no-wait" ) ; } if ( onArrested != null ) { args . add ( "--on-arrested" ) ; args . add ( onArrested . toString ( ) ) ; } if ( onFailure != null ) { ar... |
public class ProtoUtils { /** * createChannelHeader create chainHeader
* @ param type header type . See { @ link ChannelHeader . Builder # setType } .
* @ param txID transaction ID . See { @ link ChannelHeader . Builder # setTxId } .
* @ param channelID channel ID . See { @ link ChannelHeader . Builder # setChann... | if ( isDebugLevel ) { String tlschs = "" ; if ( tlsCertHash != null ) { tlschs = DatatypeConverter . printHexBinary ( tlsCertHash ) ; } logger . debug ( format ( "ChannelHeader: type: %s, version: 1, Txid: %s, channelId: %s, epoch %d, clientTLSCertificate digest: %s" , type . name ( ) , txID , channelID , epoch , tlsch... |
public class StringUtil { /** * 先頭の文字を小文字に変換します 。
* @ param text 文字列
* @ return 変換された文字列 。 ただし 、 { @ code text } が { @ code null } の場合は { @ code null } 、 { @ code text }
* が空文字の場合は空文字を返します 。 */
public static String decapitalize ( String text ) { } } | if ( isNullOrEmpty ( text ) ) { return text ; } char chars [ ] = text . toCharArray ( ) ; chars [ 0 ] = Character . toLowerCase ( chars [ 0 ] ) ; return new String ( chars ) ; |
public class NodeGroupConfiguration { /** * A list of Availability Zones to be used for the read replicas . The number of Availability Zones in this list must
* match the value of < code > ReplicaCount < / code > or < code > ReplicasPerNodeGroup < / code > if not specified .
* @ param replicaAvailabilityZones
* A... | if ( replicaAvailabilityZones == null ) { this . replicaAvailabilityZones = null ; return ; } this . replicaAvailabilityZones = new com . amazonaws . internal . SdkInternalList < String > ( replicaAvailabilityZones ) ; |
public class RemoteRuntimeManager { /** * { @ inheritDoc } */
@ Override public synchronized RuntimeEngine getRuntimeEngine ( Context < ? > context ) { } } | Object contextId = context != null ? context . getContextId ( ) : null ; if ( contextId == null ) { contextId = NULL_CONTEXT_ID ; } RuntimeEngine engine = _engines . get ( contextId ) ; if ( engine == null ) { engine = new ExtendedRemoteRuntimeEngine ( _configuration , context ) ; _engines . put ( contextId , engine ) ... |
public class URLUtil { /** * 标准化URL字符串 , 包括 :
* < pre >
* 1 . 多个 / 替换为一个
* < / pre >
* @ param url URL字符串
* @ param isEncodeBody 是否对URL中body部分的中文和特殊字符做转义 ( 不包括http : 和 / )
* @ return 标准化后的URL字符串
* @ since 4.4.1 */
public static String normalize ( String url , boolean isEncodeBody ) { } } | if ( StrUtil . isBlank ( url ) ) { return url ; } final int sepIndex = url . indexOf ( "://" ) ; String pre ; String body ; if ( sepIndex > 0 ) { pre = StrUtil . subPre ( url , sepIndex + 3 ) ; body = StrUtil . subSuf ( url , sepIndex + 3 ) ; } else { pre = "http://" ; body = url ; } final int paramsSepIndex = StrUtil ... |
public class ClassHelper { /** * Resolve the given class name as primitive class , if appropriate ,
* according to the JVM ' s naming rules for primitive classes .
* Also supports the JVM ' s internal class names for primitive arrays . Does
* < i > not < / i > support the " [ ] " suffix notation for primitive arr... | Class < ? > result = null ; // Most class names will be quite long , considering that they
// SHOULD sit in a package , so a length check is worthwhile .
if ( name != null && name . length ( ) <= 8 ) { // Could be a primitive - likely .
result = ( Class < ? > ) PRIMIIIVE_TYPE_NAME_MAP . get ( name ) ; } return result ; |
public class DeploymentClassFinder { /** * Finds class with should produce global deployment PER project .
* @ return class marked witch @ ArquillianSuiteDeployment annotation */
private static Class < ? > getDeploymentClassFromAnnotation ( ) { } } | // Had a bug that if you open inside eclipse more than one project with @ ArquillianSuiteDeployment and is a dependency , the test doesn ' t run because found more than one @ ArquillianSuiteDeployment .
// Filter the deployment PER project .
final Reflections reflections = new Reflections ( ClasspathHelper . contextCla... |
public class XmlStreamReaderUtils { /** * Returns the value of an attribute as a float . If the attribute is empty , this method throws
* an exception .
* @ param reader
* < code > XMLStreamReader < / code > that contains attribute values .
* @ param localName
* local name of attribute ( the namespace is igno... | return requiredFloatAttribute ( reader , null , localName ) ; |
public class FileUtils { /** * Close the closeable object
* @ param closeable */
public static boolean tryToClose ( Closeable closeable ) { } } | Object token = ThreadIdentityManager . runAsServer ( ) ; try { if ( closeable != null ) { try { closeable . close ( ) ; return true ; } catch ( IOException e ) { // ignore
} } } finally { ThreadIdentityManager . reset ( token ) ; } return false ; |
public class NamespaceApi { /** * Get all namespaces that match a string in their name or path in the specified page range .
* < pre > < code > GitLab Endpoint : GET / namespaces ? search = : query < / code > < / pre >
* @ param query the search string
* @ param page the page to get
* @ param perPage the number... | GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "search" , query , true ) . withParam ( PAGE_PARAM , page ) . withParam ( PER_PAGE_PARAM , perPage ) ; Response response = get ( Response . Status . OK , formData . asMap ( ) , "namespaces" ) ; return ( response . readEntity ( new GenericType < List < Namespa... |
public class PullerInternal { /** * Add a revision to the appropriate queue of revs to individually GET */
@ InterfaceAudience . Private protected void queueRemoteRevision ( RevisionInternal rev ) { } } | if ( rev . isDeleted ( ) ) { deletedRevsToPull . add ( rev ) ; } else { revsToPull . add ( rev ) ; } |
public class SmoothProgressDrawable { /** * / / / / / SETTERS */
@ UiThread public void setInterpolator ( Interpolator interpolator ) { } } | if ( interpolator == null ) throw new IllegalArgumentException ( "Interpolator cannot be null" ) ; mInterpolator = interpolator ; invalidateSelf ( ) ; |
public class MetaConfigPool { /** * { @ inheritDoc }
* @ param variable { @ inheritDoc }
* @ return { @ inheritDoc }
* @ throws NotAvailableException { @ inheritDoc } */
@ Override public String getValue ( final String variable ) throws NotAvailableException { } } | try { return VariableProcessor . resolveVariables ( VariableProcessor . resolveVariable ( variable , variableProviderPool ) , true , variableProviderPool ) ; } catch ( MultiException ex ) { throw new NotAvailableException ( "Variable[" + variable + "]" , ex ) ; } |
public class CreateWorkspacesResult { /** * Information about the WorkSpaces that were created .
* Because this operation is asynchronous , the identifier returned is not immediately available for use with other
* operations . For example , if you call < a > DescribeWorkspaces < / a > before the WorkSpace is create... | if ( pendingRequests == null ) { pendingRequests = new com . amazonaws . internal . SdkInternalList < Workspace > ( ) ; } return pendingRequests ; |
public class CsvMapReader { /** * { @ inheritDoc } */
public Map < String , String > read ( final String ... nameMapping ) throws IOException { } } | if ( nameMapping == null ) { throw new NullPointerException ( "nameMapping should not be null" ) ; } if ( readRow ( ) ) { final Map < String , String > destination = new HashMap < String , String > ( ) ; Util . filterListToMap ( destination , nameMapping , getColumns ( ) ) ; return destination ; } return null ; // EOF |
public class FaceListsImpl { /** * Retrieve a face list ' s information .
* @ param faceListId Id referencing a particular face list .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the FaceList object */
public Observable < FaceList > getAsync ( String f... | return getWithServiceResponseAsync ( faceListId ) . map ( new Func1 < ServiceResponse < FaceList > , FaceList > ( ) { @ Override public FaceList call ( ServiceResponse < FaceList > response ) { return response . body ( ) ; } } ) ; |
public class YggdrasilAuthenticator { /** * Refreshes the current session manually using token .
* @ param clientToken the client token
* @ param accessToken the access token
* @ throws AuthenticationException If an exception occurs during the
* authentication */
public synchronized void refreshWithToken ( Stri... | authResult = authenticationService . refresh ( Objects . requireNonNull ( clientToken ) , Objects . requireNonNull ( accessToken ) ) ; |
public class WriterFactoryImpl { /** * { @ inheritDoc } */
@ Override public ClassWriter getClassWriter ( TypeElement typeElement , TypeElement prevClass , TypeElement nextClass , ClassTree classTree ) { } } | return new ClassWriterImpl ( configuration , typeElement , prevClass , nextClass , classTree ) ; |
public class authenticationauthnprofile { /** * Use this API to add authenticationauthnprofile . */
public static base_response add ( nitro_service client , authenticationauthnprofile resource ) throws Exception { } } | authenticationauthnprofile addresource = new authenticationauthnprofile ( ) ; addresource . name = resource . name ; addresource . authnvsname = resource . authnvsname ; addresource . authenticationhost = resource . authenticationhost ; addresource . authenticationdomain = resource . authenticationdomain ; addresource ... |
public class StackdriverExportUtils { /** * Convert a OpenCensus Distribution to a StackDriver Distribution */
@ VisibleForTesting static Distribution createDistribution ( io . opencensus . metrics . export . Distribution distribution ) { } } | Distribution . Builder builder = Distribution . newBuilder ( ) . setBucketOptions ( createBucketOptions ( distribution . getBucketOptions ( ) ) ) . setCount ( distribution . getCount ( ) ) . setMean ( distribution . getCount ( ) == 0 ? 0 : distribution . getSum ( ) / distribution . getCount ( ) ) . setSumOfSquaredDevia... |
public class FeatureCollection { /** * Create a new instance of this class by giving the feature collection a single { @ link Feature } .
* @ param feature a single feature
* @ param bbox optionally include a bbox definition as a double array
* @ return a new instance of this class defined by the values passed in... | List < Feature > featureList = Arrays . asList ( feature ) ; return new FeatureCollection ( TYPE , bbox , featureList ) ; |
public class AbstractThresholdingOutputStream { /** * Checks to see if writing the specified number of bytes would cause the
* configured threshold to be exceeded . If so , triggers an event to allow a
* concrete implementation to take action on
* @ param nCount
* The number of bytes about to be written to the ... | if ( ! m_bThresholdExceeded && ( m_nWritten + nCount > m_nThreshold ) ) { m_bThresholdExceeded = true ; onThresholdReached ( ) ; } |
public class AWSGreengrassClient { /** * Creates a version of a device definition that has already been defined .
* @ param createDeviceDefinitionVersionRequest
* @ return Result of the CreateDeviceDefinitionVersion operation returned by the service .
* @ throws BadRequestException
* invalid request
* @ sampl... | request = beforeClientExecution ( request ) ; return executeCreateDeviceDefinitionVersion ( request ) ; |
public class DefaultTableHeaderCellRenderer { /** * Overloaded to return an icon suitable to the primary sorted column , or null if
* the column is not the primary sort key .
* @ param table the < code > JTable < / code > .
* @ param column the column index .
* @ return the sort icon , or null if the column is ... | SortKey sortKey = getSortKey ( table , column ) ; if ( sortKey != null && table . convertColumnIndexToView ( sortKey . getColumn ( ) ) == column ) { switch ( sortKey . getSortOrder ( ) ) { case ASCENDING : return UIManager . getIcon ( "Table.ascendingSortIcon" ) ; case DESCENDING : return UIManager . getIcon ( "Table.d... |
public class S3ConditionFactory { /** * Constructs a new access policy condition that compares an Amazon S3
* canned ACL with the canned ACL specified by an incoming request .
* You can use this condition to ensure that any objects uploaded to an
* Amazon S3 bucket have a specific canned ACL set .
* @ param can... | return new StringCondition ( StringComparisonType . StringEquals , CANNED_ACL_CONDITION_KEY , cannedAcl . toString ( ) ) ; |
public class ConfusionMatrix { /** * Outputs the ConfusionMatrix as comma - separated values for easy import into spreadsheets */
public String toCSV ( ) { } } | StringBuilder builder = new StringBuilder ( ) ; // Header Row
builder . append ( ",,Predicted Class,\n" ) ; // Predicted Classes Header Row
builder . append ( ",," ) ; for ( T predicted : classes ) { builder . append ( String . format ( "%s," , predicted ) ) ; } builder . append ( "Total\n" ) ; // Data Rows
String firs... |
public class JSONTokener { /** * Get the text up but not including the specified character or the
* end of line , whichever comes first . < p >
* @ param d a delimiter character
* @ return a string
* @ throws JSONException if something goes wrong */
public String nextTo ( char d ) throws JSONException { } } | StringBuffer sb = new StringBuffer ( ) ; for ( ; ; ) { char c = next ( ) ; if ( ( c == d ) || ( c == 0 ) || ( c == '\n' ) || ( c == '\r' ) ) { if ( c != 0 ) { back ( ) ; } return sb . toString ( ) . trim ( ) ; } sb . append ( c ) ; } |
public class AdminElevatewordAction { @ Execute public HtmlResponse create ( final CreateForm form ) { } } | verifyCrudMode ( form . crudMode , CrudMode . CREATE ) ; validate ( form , messages -> { } , ( ) -> asEditHtml ( ) ) ; verifyToken ( ( ) -> asEditHtml ( ) ) ; getElevateWord ( form ) . ifPresent ( entity -> { try { elevateWordService . store ( entity ) ; suggestHelper . addElevateWord ( entity . getSuggestWord ( ) , en... |
public class LeaderRole { /** * Appends initial entries to the log to take leadership . */
private CompletableFuture < Void > appendInitialEntries ( ) { } } | final long term = raft . getTerm ( ) ; return appendAndCompact ( new InitializeEntry ( term , appender . getTime ( ) ) ) . thenApply ( index -> null ) ; |
public class JJTMithraQLState { /** * / * Returns the node on the top of the stack , and remove it from the
* stack . */
Node popNode ( ) { } } | if ( -- sp < mk ) { mk = ( ( Integer ) marks . pop ( ) ) . intValue ( ) ; } return ( Node ) nodes . pop ( ) ; |
public class CodedConstant { /** * Gets the map kv message elements .
* @ param name the name
* @ param mapType the map type
* @ return the map kv message elements */
private static MessageElement getMapKVMessageElements ( String name , MapType mapType ) { } } | MessageElement . Builder ret = MessageElement . builder ( ) ; ret . name ( name ) ; DataType keyType = mapType . keyType ( ) ; Builder fieldBuilder = FieldElement . builder ( ) . name ( "key" ) . tag ( 1 ) ; fieldBuilder . type ( keyType ) . label ( FieldElement . Label . OPTIONAL ) ; ret . addField ( fieldBuilder . bu... |
public class CmsInternalLinkValidationDialog { /** * Commits the edited project to the db . < p > */
@ Override public void actionCommit ( ) { } } | List errors = new ArrayList ( ) ; try { setDialogObject ( m_resources ) ; // refresh the list
Map objects = ( Map ) getSettings ( ) . getListObject ( ) ; if ( objects != null ) { objects . remove ( CmsInternalLinkValidationList . class . getName ( ) ) ; } // forward to the list
getToolManager ( ) . jspForwardTool ( thi... |
public class ServiceFuture { /** * Creates a ServiceCall from an observable object and a callback .
* @ param observable the observable to create from
* @ param callback the callback to call when events happen
* @ param < T > the type of the response
* @ return the created ServiceCall */
public static < T > Ser... | final ServiceFuture < T > serviceFuture = new ServiceFuture < > ( ) ; serviceFuture . subscription = observable . last ( ) . subscribe ( new Action1 < ServiceResponse < T > > ( ) { @ Override public void call ( ServiceResponse < T > t ) { if ( callback != null ) { callback . success ( t . body ( ) ) ; } serviceFuture .... |
public class ExtensionUtil { /** * Utility method that helps instantiate a class used to extend the data grid .
* @ param className the name of a class to instantiate
* @ param assignableFrom the type that should be assignable from an instance of type < code > className < / code >
* @ return an instance of the gi... | if ( className == null ) throw new IllegalArgumentException ( Bundle . getErrorString ( "DataGridUtil_CantCreateClass" ) ) ; Class clazz = null ; try { clazz = Class . forName ( className , false , Thread . currentThread ( ) . getContextClassLoader ( ) ) ; } catch ( Exception e ) { assert e instanceof IllegalAccessExce... |
public class MethodUtils { /** * < p > Return an accessible method ( that is , one that can be invoked via
* reflection ) that implements the specified method , by scanning through
* all implemented interfaces and subinterfaces . If no such method
* can be found , return { @ code null } . < / p >
* < p > There ... | Method method = null ; // Search up the superclass chain
for ( ; clazz != null ; clazz = clazz . getSuperclass ( ) ) { // Check the implemented interfaces of the parent class
Class < ? > [ ] interfaces = clazz . getInterfaces ( ) ; for ( Class < ? > anInterface : interfaces ) { // Is this interface public ?
if ( ! Modi... |
public class JvmAgent { /** * Entry point for the agent , using dynamic attach
* ( this is post VM initialisation attachment , via com . sun . attach )
* @ param agentArgs arguments as given on the command line */
public static void agentmain ( String agentArgs , Instrumentation instrumentation ) { } } | JvmAgentConfig config = new JvmAgentConfig ( agentArgs ) ; if ( ! config . isModeStop ( ) ) { startAgent ( config , false , instrumentation ) ; } else { stopAgent ( ) ; } |
public class AWSOpsWorksClient { /** * Deregisters an Amazon RDS instance .
* < b > Required Permissions < / b > : To use this action , an IAM user must have a Manage permissions level for the stack ,
* or an attached policy that explicitly grants permissions . For more information on user permissions , see < a
*... | request = beforeClientExecution ( request ) ; return executeDeregisterRdsDbInstance ( request ) ; |
public class FileTransferClient { /** * Handle MBean invocation requests */
public Object handleOperation ( String operation , Object [ ] params ) throws IOException { } } | if ( OPERATION_DOWNLOAD . equals ( operation ) ) { if ( params . length == 2 ) { downloadFile ( ( String ) params [ 0 ] , ( String ) params [ 1 ] ) ; } else { // partial download
return downloadFile ( ( String ) params [ 0 ] , ( String ) params [ 1 ] , ( Long ) params [ 2 ] , ( Long ) params [ 3 ] ) ; } } else if ( OPE... |
public class AtomicIntegerFieldUpdater { /** * Atomically adds the given value to the current value of the field of
* the given object managed by this updater .
* @ param obj An object whose field to get and set
* @ param delta the value to add
* @ return the updated value */
public int addAndGet ( T obj , int ... | int prev , next ; do { prev = get ( obj ) ; next = prev + delta ; } while ( ! compareAndSet ( obj , prev , next ) ) ; return next ; |
public class ApplicationDialog { /** * Returns the title to use upon succesful finish . */
protected String getFinishSuccessTitle ( ) { } } | ActionCommand callingCommand = getCallingCommand ( ) ; if ( callingCommand != null ) { String [ ] successTitleKeys = new String [ ] { callingCommand . getId ( ) + "." + SUCCESS_FINISH_TITLE_KEY , DEFAULT_FINISH_SUCCESS_TITLE_KEY } ; return getApplicationConfig ( ) . messageResolver ( ) . getMessage ( successTitleKeys ,... |
public class ServerMBean { protected void defineManagedResource ( ) { } } | super . defineManagedResource ( ) ; defineAttribute ( "configuration" ) ; defineAttribute ( "rootWebApp" ) ; defineAttribute ( "webApplicationConfigurationClassNames" ) ; defineOperation ( "addWebApplication" , new String [ ] { "java.lang.String" , "java.lang.String" } , IMPACT_ACTION ) ; defineOperation ( "addWebAppli... |
public class AgentActivator { /** * Put event .
* @ param eventType the event type
* @ throws Exception the exception */
private void putEvent ( EventType eventType ) throws Exception { } } | List < EventType > eventTypes = Collections . singletonList ( eventType ) ; int i ; for ( i = 0 ; i < retryNum ; ++ i ) { try { monitoringService . putEvents ( eventTypes ) ; break ; } catch ( Exception e ) { LOG . log ( Level . SEVERE , e . getMessage ( ) , e ) ; } Thread . sleep ( retryDelay ) ; } if ( i == retryNum ... |
public class ModifyDBInstanceRequest { /** * A list of DB security groups to authorize on this DB instance . Changing this setting doesn ' t result in an outage
* and the change is asynchronously applied as soon as possible .
* Constraints :
* < ul >
* < li >
* If supplied , must match existing DBSecurityGrou... | if ( this . dBSecurityGroups == null ) { setDBSecurityGroups ( new com . amazonaws . internal . SdkInternalList < String > ( dBSecurityGroups . length ) ) ; } for ( String ele : dBSecurityGroups ) { this . dBSecurityGroups . add ( ele ) ; } return this ; |
public class CmsResultsTab { /** * Updates the height ( with border ) of the result list panel according to the search parameter panels shown . < p > */
public void updateListSize ( ) { } } | int paramsHeight = m_params . isVisible ( ) ? m_params . getOffsetHeight ( ) + CmsDomUtil . getCurrentStyleInt ( m_params . getElement ( ) , CmsDomUtil . Style . marginBottom ) : 21 ; int optionsHeight = m_options . getOffsetHeight ( ) + CmsDomUtil . getCurrentStyleInt ( m_options . getElement ( ) , CmsDomUtil . Style ... |
public class DiskBasedCache { /** * Invalidates an entry in the cache .
* @ param key Cache key
* @ param fullExpire True to fully expire the entry , false to soft expire */
@ Override public synchronized void invalidate ( String key , boolean fullExpire ) { } } | Entry entry = get ( key ) ; if ( entry != null ) { entry . softTtl = 0 ; if ( fullExpire ) { entry . ttl = 0 ; } put ( key , entry ) ; } |
public class AbstractConfigObject { /** * This looks up the key with no transformation or type conversion of any
* kind , and returns null if the key is not present . The object must be
* resolved along the nodes needed to get the key or
* ConfigException . NotResolved will be thrown .
* @ param key
* @ retur... | try { return attemptPeekWithPartialResolve ( key ) ; } catch ( ConfigException . NotResolved e ) { throw ConfigImpl . improveNotResolved ( originalPath , e ) ; } |
public class GoogleCommon { /** * Before retrieving private key , it makes sure that original private key ' s permission is read only on the owner .
* This is a way to ensure to keep private key private .
* @ param fs
* @ param privateKeyPath
* @ return
* @ throws IOException */
private static Path getPrivate... | Path keyPath = new Path ( privateKeyPath ) ; FileStatus fileStatus = fs . getFileStatus ( keyPath ) ; Preconditions . checkArgument ( USER_READ_PERMISSION_ONLY . equals ( fileStatus . getPermission ( ) ) , "Private key file should only have read only permission only on user. " + keyPath ) ; return keyPath ; |
public class CodeJamSession { /** * < p > Static factory method that should be used for creating a session .
* Loads associated contest info and initial values from the given
* < tt > round < / tt > , using the given < tt > executor < / tt > . < / p >
* @ param executor { @ link HttpRequestExecutor } instance to ... | final ContestInfo info = ContestInfo . get ( executor , round ) ; final InitialValues values = InitialValues . get ( executor , round ) ; return new CodeJamSession ( executor , round , info , values ) ; |
public class AbstractInstanceManager { /** * Return the proxy instance which corresponds to the given datastore type for
* writing .
* @ param datastoreType
* The datastore type .
* @ param types
* The { @ link DynamicType } .
* @ param < T >
* The instance type .
* @ return The instance . */
public < T... | return newInstance ( getDatastoreId ( datastoreType ) , datastoreType , types , TransactionalCache . Mode . WRITE ) ; |
public class Configuration { /** * Get a default style . If null a simple black line style will be returned .
* @ param geometryType the name of the geometry type ( point , line , polygon ) */
@ Nonnull public final Style getDefaultStyle ( @ Nonnull final String geometryType ) { } } | String normalizedGeomName = GEOMETRY_NAME_ALIASES . get ( geometryType . toLowerCase ( ) ) ; if ( normalizedGeomName == null ) { normalizedGeomName = geometryType . toLowerCase ( ) ; } Style style = this . defaultStyle . get ( normalizedGeomName . toLowerCase ( ) ) ; if ( style == null ) { style = this . namedStyles . ... |
public class CertificateMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Certificate certificate , ProtocolMarshaller protocolMarshaller ) { } } | if ( certificate == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( certificate . getCertificateArn ( ) , CERTIFICATEARN_BINDING ) ; protocolMarshaller . marshall ( certificate . getCertificateId ( ) , CERTIFICATEID_BINDING ) ; protocolMarsh... |
public class ArrayByteInput { /** * Creates a new instance of { @ link ArrayByteInput } which reads bytes from given input stream using an array of
* bytes whose { @ code length } equals to specified .
* @ param length the length of the byte array ; must be positive .
* @ param stream the input stream from which ... | "Duplicates" } ) public static ArrayByteInput of ( final int length , final InputStream stream ) { if ( length <= 0 ) { throw new IllegalArgumentException ( "length(" + length + ") <= 0" ) ; } if ( stream == null ) { throw new NullPointerException ( "stream is null" ) ; } return new ArrayByteInput ( null ) { @ Override... |
public class GeneNamesParser { /** * parses a file from the genenames website
* @ param args */
public static void main ( String [ ] args ) { } } | try { List < GeneName > geneNames = getGeneNames ( ) ; logger . info ( "got {} gene names" , geneNames . size ( ) ) ; for ( GeneName g : geneNames ) { if ( g . getApprovedSymbol ( ) . equals ( "FOLH1" ) ) logger . info ( "Gene Name: {}" , g ) ; } // and returns a list of beans that contains key - value pairs for each g... |
public class XString { /** * Compares two strings lexicographically .
* @ param xstr the < code > String < / code > to be compared .
* @ return the value < code > 0 < / code > if the argument string is equal to
* this string ; a value less than < code > 0 < / code > if this string
* is lexicographically less th... | int len1 = this . length ( ) ; int len2 = xstr . length ( ) ; int n = Math . min ( len1 , len2 ) ; int i = 0 ; int j = 0 ; while ( n -- != 0 ) { char c1 = this . charAt ( i ) ; char c2 = xstr . charAt ( j ) ; if ( c1 != c2 ) { return c1 - c2 ; } i ++ ; j ++ ; } return len1 - len2 ; |
public class GeoPackageOverlayFactory { /** * Create a composite overlay by first adding tile overlays for the tile DAOs followed by the provided overlay
* @ param tileDaos collection of tile daos
* @ param overlay bounded overlay
* @ return composite overlay */
public static CompositeOverlay getCompositeOverlay ... | CompositeOverlay compositeOverlay = getCompositeOverlay ( tileDaos ) ; compositeOverlay . addOverlay ( overlay ) ; return compositeOverlay ; |
public class FctConvertersToFromString { /** * < p > Create put CnvTfsHasId ( String ) . < / p >
* @ param pBeanName - bean name
* @ param pClass - bean class
* @ param pIdName - bean ID name
* @ return requested CnvTfsHasId ( String )
* @ throws Exception - an exception */
protected final CnvTfsHasId < IHasI... | CnvTfsHasId < IHasId < String > , String > convrt = new CnvTfsHasId < IHasId < String > , String > ( ) ; convrt . setUtlReflection ( getUtlReflection ( ) ) ; convrt . setIdConverter ( lazyGetCnvTfsString ( ) ) ; convrt . init ( pClass , pIdName ) ; this . convertersMap . put ( pBeanName , convrt ) ; return convrt ; |
public class StopAccessLoggingRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( StopAccessLoggingRequest stopAccessLoggingRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( stopAccessLoggingRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( stopAccessLoggingRequest . getContainerName ( ) , CONTAINERNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request... |
public class AWSBackupClient { /** * Returns metadata of your saved backup plans , including Amazon Resource Names ( ARNs ) , plan IDs , creation and
* deletion dates , version IDs , plan names , and creator request IDs .
* @ param listBackupPlansRequest
* @ return Result of the ListBackupPlans operation returned... | request = beforeClientExecution ( request ) ; return executeListBackupPlans ( request ) ; |
public class AbstractSEPAGenerator { /** * Schreibt die Bean mittels JAXB in den Strean .
* @ param e das zu schreibende JAXBElement mit der Bean .
* @ param os der OutputStream , in den das XML geschrieben wird .
* @ param validate true , wenn das erzeugte XML gegen das PAIN - Schema validiert werden soll .
* ... | JAXBContext jaxbContext = JAXBContext . newInstance ( e . getDeclaredType ( ) ) ; Marshaller marshaller = jaxbContext . createMarshaller ( ) ; // Wir verwenden hier hart UTF - 8 . Siehe http : / / www . onlinebanking - forum . de / forum / topic . php ? p = 107420 # real107420
marshaller . setProperty ( Marshaller . JA... |
public class AwsSecurityFindingFilters { /** * The ARN of the solution that generated a related finding .
* @ param relatedFindingsProductArn
* The ARN of the solution that generated a related finding . */
public void setRelatedFindingsProductArn ( java . util . Collection < StringFilter > relatedFindingsProductArn... | if ( relatedFindingsProductArn == null ) { this . relatedFindingsProductArn = null ; return ; } this . relatedFindingsProductArn = new java . util . ArrayList < StringFilter > ( relatedFindingsProductArn ) ; |
public class LocalDate { /** * Gets the value of the specified field from this date as a { @ code long } .
* This queries this date for the value of the specified field .
* If it is not possible to return the value , because the field is not supported
* or for some other reason , an exception is thrown .
* If t... | if ( field instanceof ChronoField ) { if ( field == EPOCH_DAY ) { return toEpochDay ( ) ; } if ( field == PROLEPTIC_MONTH ) { return getProlepticMonth ( ) ; } return get0 ( field ) ; } return field . getFrom ( this ) ; |
public class VLDockingBeanPostProcessor { /** * Gets the configured template for the given view descriptor .
* @ param viewDescriptor the view descriptor .
* @ return the more suitable template . */
private VLDockingViewDescriptor getTemplate ( ViewDescriptor viewDescriptor ) { } } | Assert . notNull ( viewDescriptor , "viewDescriptor" ) ; final VLDockingViewDescriptor vlDockingViewDescriptor ; vlDockingViewDescriptor = new VLDockingViewDescriptor ( ) ; return vlDockingViewDescriptor ; |
public class Cob2AvroGenerator { /** * Produce the avro schema .
* @ param xmlSchemaSource the XML schema source
* @ param targetPackageName the target Avro package name
* @ param targetAvroSchemaName the target Avro schema name
* @ return the generated Avro schema
* @ throws IOException if serialization fail... | log . debug ( "Avro schema {} generation started" , targetAvroSchemaName + AVSC_FILE_EXTENSION ) ; String avroSchemaSource = cob2AvroTranslator . translate ( new StringReader ( xmlSchemaSource ) , targetPackageName , targetAvroSchemaName ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "Generated Avro Schema: " ) ; ... |
public class AbstractRegionPainter { /** * Creates a simple horizontal gradient using the shape for bounds and the
* colors for top , two middle , and bottom colors .
* @ param s the shape to use for bounds .
* @ param colors the colors to use for the gradient .
* @ return the gradient . */
protected Paint crea... | Rectangle2D bounds = s . getBounds2D ( ) ; float x = ( float ) bounds . getX ( ) ; float y = ( float ) bounds . getY ( ) ; float w = ( float ) bounds . getWidth ( ) ; float h = ( float ) bounds . getHeight ( ) ; return createGradient ( x , ( 0.5f * h ) + y , x + w , ( 0.5f * h ) + y , new float [ ] { 0f , 0.45f , 0.62f... |
public class Shape { /** * Prints the { @ link IntBuffer }
* @ param buffer the buffer to print
* @ return the to string for the buffer */
public static String bufferToString ( IntBuffer buffer ) { } } | StringBuilder builder = new StringBuilder ( ) ; int rank = buffer . get ( 0 ) ; builder . append ( "[ " ) . append ( rank ) . append ( ", " ) ; for ( int p = 1 ; p < rank * 2 + 4 ; p ++ ) { builder . append ( buffer . get ( p ) ) ; if ( p < rank * 2 + 4 - 1 ) builder . append ( ", " ) ; } builder . append ( "]" ) ; ret... |
public class MethodCompilerPass { /** * Adds a node that may represent a function signature ( if it ' s a function
* itself or the name of a function ) . */
private void addPossibleSignature ( String name , Node node , NodeTraversal t ) { } } | if ( node . isFunction ( ) ) { // The node we ' re looking at is a function , so we can add it directly
addSignature ( name , node , t . getSourceName ( ) ) ; } else { nonMethodProperties . add ( name ) ; } |
public class ExtensionsDao { /** * Query by extension name
* @ param extensionName
* extension name
* @ return extensions
* @ throws SQLException
* upon failure */
public List < Extensions > queryByExtension ( String extensionName ) throws SQLException { } } | QueryBuilder < Extensions , Void > qb = queryBuilder ( ) ; setUniqueWhere ( qb . where ( ) , extensionName , false , null , false , null ) ; List < Extensions > extensions = qb . query ( ) ; return extensions ; |
public class ApplicationDialog { /** * Returns the message to use upon succesful finish . */
protected String getFinishSuccessMessage ( ) { } } | ActionCommand callingCommand = getCallingCommand ( ) ; if ( callingCommand != null ) { String [ ] successMessageKeys = new String [ ] { callingCommand . getId ( ) + "." + SUCCESS_FINISH_MESSAGE_KEY , DEFAULT_FINISH_SUCCESS_MESSAGE_KEY } ; return getApplicationConfig ( ) . messageResolver ( ) . getMessage ( successMessa... |
public class DatabaseRecommendedActionsInner { /** * Gets a database recommended action .
* @ 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 .
* @ param da... | return getWithServiceResponseAsync ( resourceGroupName , serverName , databaseName , advisorName , recommendedActionName ) . map ( new Func1 < ServiceResponse < RecommendedActionInner > , RecommendedActionInner > ( ) { @ Override public RecommendedActionInner call ( ServiceResponse < RecommendedActionInner > response )... |
import java . io . * ; import java . util . * ; class DifferenceNestedTuples { /** * This function calculates the differences between elements of two given nested tuples .
* Examples :
* differenceNestedTuples ( new int [ ] [ ] { { 1 , 3 } , { 4 , 5 } , { 2 , 9 } , { 1 , 10 } } , new int [ ] [ ] { { 6 , 7 } , { 3 ,... | int [ ] [ ] result = new int [ tuple1 . length ] [ tuple1 [ 0 ] . length ] ; for ( int i = 0 ; i < tuple1 . length ; i ++ ) { for ( int j = 0 ; j < tuple1 [ i ] . length ; j ++ ) { result [ i ] [ j ] = tuple1 [ i ] [ j ] - tuple2 [ i ] [ j ] ; } } return result ; |
public class ConfigurationUtils { /** * Calls { @ link ConfigurationComponent # basicValidate ( String ) } on the supplied component if not null
* @ param component the nullable component
* @ param section the configuration section
* @ param < F > the component type
* @ throws ConfigException validation failure... | try { final Class < ? > type = component . getClass ( ) ; final BeanInfo beanInfo = Introspector . getBeanInfo ( type ) ; for ( final PropertyDescriptor propertyDescriptor : beanInfo . getPropertyDescriptors ( ) ) { if ( ConfigurationComponent . class . isAssignableFrom ( propertyDescriptor . getPropertyType ( ) ) ) { ... |
public class AVIMConversationsQuery { /** * 增加查询条件 , 指定聊天室的组员条件满足条件的才返回
* @ param peerIds
* @ param includeSelf 是否包含自己
* @ return */
public AVIMConversationsQuery withMembers ( List < String > peerIds , boolean includeSelf ) { } } | Set < String > targetPeerIds = new HashSet < String > ( peerIds ) ; if ( includeSelf ) { targetPeerIds . add ( client . getClientId ( ) ) ; } containsMembers ( new LinkedList < String > ( targetPeerIds ) ) ; this . whereSizeEqual ( Conversation . MEMBERS , targetPeerIds . size ( ) ) ; return this ; |
public class ReversePurgeLongHashMap { /** * Returns an instance of this class from the given String ,
* which must be a String representation of this class .
* @ param string a String representation of this class .
* @ return an instance of this class . */
static ReversePurgeLongHashMap getInstance ( final Strin... | final String [ ] tokens = string . split ( "," ) ; if ( tokens . length < 2 ) { throw new SketchesArgumentException ( "String not long enough to specify length and capacity." ) ; } final int numActive = Integer . parseInt ( tokens [ 0 ] ) ; final int length = Integer . parseInt ( tokens [ 1 ] ) ; final ReversePurgeLong... |
public class ClientInterceptors { /** * Create a new { @ link Channel } that will call { @ code interceptors } before starting a call on the
* given channel . The last interceptor will have its { @ link ClientInterceptor # interceptCall }
* called first .
* @ param channel the underlying channel to intercept .
... | return intercept ( channel , Arrays . asList ( interceptors ) ) ; |
public class GenericFilter { /** * Called by the web container to indicate to a filter that it is being
* placed into service .
* This implementation stores the { @ code FilterConfig } object it
* receives from the servlet container for later use .
* Generally , there ' s no reason to override this method , ove... | if ( pConfig == null ) { throw new ServletConfigException ( "filter config == null" ) ; } // Store filter config
filterConfig = pConfig ; // Configure this
try { BeanUtil . configure ( this , ServletUtil . asMap ( pConfig ) , true ) ; } catch ( InvocationTargetException e ) { throw new ServletConfigException ( "Could n... |
public class VaultDriverBase { /** * Creates a stub method for an abstract method , typically a createXXX
* method . */
protected < S > MethodVault < S > newMethod ( Method method ) { } } | if ( ! Modifier . isAbstract ( method . getModifiers ( ) ) ) { throw new IllegalStateException ( String . valueOf ( method ) ) ; } else if ( method . getName ( ) . startsWith ( "create" ) ) { Method target = assetMethod ( method ) ; if ( target != null ) { return newCreateMethod ( target ) ; } else { return newCreateMe... |
public class Record { /** * Get grouping { @ link LongWritable } value
* @ param label target label
* @ return { @ link LongWritable } value of the label . If it is not null . */
public LongWritable getGroupingLongWritable ( String label ) { } } | HadoopObject o = getHadoopObject ( KEY , label , ObjectUtil . LONG , "Long" ) ; if ( o == null ) { return null ; } return ( LongWritable ) o . getObject ( ) ; |
public class DocumentClassifierEvaluator { /** * Evaluates the given reference { @ link DocSample } object .
* This is done by categorizing the document from the provided
* { @ link DocSample } . The detected category is then used
* to calculate and update the score .
* @ param sample the reference { @ link Doc... | if ( sample . isClearAdaptiveDataSet ( ) ) { this . docClassifier . clearFeatureData ( ) ; } String [ ] document = sample . getTokens ( ) ; String cat = docClassifier . classify ( document ) ; if ( sample . getLabel ( ) . equals ( cat ) ) { accuracy . add ( 1 ) ; } else { accuracy . add ( 0 ) ; } return new DocSample (... |
public class CmsParameterConfiguration { /** * Adds a parameter , parsing the value if required . < p >
* @ param key the parameter to add
* @ param value the value of the parameter */
private void addInternal ( String key , String value ) { } } | Object currentObj = m_configurationObjects . get ( key ) ; String currentStr = get ( key ) ; if ( currentObj instanceof String ) { // one object already in map - convert it to a list
ArrayList < String > values = new ArrayList < String > ( 2 ) ; values . add ( currentStr ) ; values . add ( value ) ; m_configurationObje... |
public class I18nSpecificInList { /** * < p > Setter for itemId . < / p >
* @ param pItemId reference */
public final void setItemId ( final Long pItemId ) { } } | this . itemId = pItemId ; if ( this . itsId == null ) { this . itsId = new IdI18nSpecificInList ( ) ; } this . itsId . setItemId ( this . itemId ) ; |
public class GetNamespaceRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetNamespaceRequest getNamespaceRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getNamespaceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getNamespaceRequest . getId ( ) , ID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( )... |
public class SOM { /** * Sets the rate at which input is incorporated at each iteration of the SOM
* algorithm
* @ param initialLearningRate the rate the SOM learns at */
public void setInitialLearningRate ( double initialLearningRate ) { } } | if ( Double . isInfinite ( initialLearningRate ) || Double . isNaN ( initialLearningRate ) || initialLearningRate <= 0 ) throw new ArithmeticException ( "Learning rate must be a positive constant, not " + initialLearningRate ) ; this . initialLearningRate = initialLearningRate ; |
public class GeometryUtil { /** * Centers the molecule in the given area . See comment for center ( IAtomContainer atomCon ,
* Dimension areaDim , HashMap renderingCoordinates ) for details on coordinate sets
* @ param atomCon molecule to be centered
* @ param areaDim dimension in which the molecule is to be cent... | double [ ] molDim = get2DDimension ( atomCon ) ; double transX = ( areaDim [ 0 ] - molDim [ 0 ] ) / 2 ; double transY = ( areaDim [ 1 ] - molDim [ 1 ] ) / 2 ; translateAllPositive ( atomCon ) ; translate2D ( atomCon , new Vector2d ( transX , transY ) ) ; |
public class FileSystemLocationScanner { /** * Converts this file into a resource name on the classpath by cutting of the file path
* to the classpath root .
* @ param classPathRootOnDisk The location of the classpath root on disk , with a trailing slash .
* @ param file The file .
* @ return The resource name ... | String fileName = file . getAbsolutePath ( ) . replace ( "\\" , "/" ) ; return fileName . substring ( classPathRootOnDisk . length ( ) ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.