signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class Utils { /** * Reads a { @ code T } instance from { @ code source } using { @ code adapter } . This method can handle
* { @ code null } values . It should be used for reading objects that were written using
* { @ link # writeNullable ( Object , Parcel , int , TypeAdapter ) } . */
@ Nullable public stati... | T value = null ; if ( source . readInt ( ) == 1 ) { value = adapter . readFromParcel ( source ) ; } return value ; |
public class GetAccountSettingsRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetAccountSettingsRequest getAccountSettingsRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getAccountSettingsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getAccountSettingsRequest . getAccountId ( ) , ACCOUNTID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JS... |
public class LiteProtoSubject { /** * Checks whether the MessageLite is equivalent to the argument , using the standard equals ( )
* implementation . */
@ Override public void isEqualTo ( @ NullableDecl Object expected ) { } } | // TODO ( user ) : Do better here when MessageLite descriptors are available .
if ( Objects . equal ( actual ( ) , expected ) ) { return ; } if ( actual ( ) == null || expected == null ) { super . isEqualTo ( expected ) ; } else if ( actual ( ) . getClass ( ) != expected . getClass ( ) ) { failWithoutActual ( simpleFac... |
public class ViewControlsLayer { /** * Sets the relative viewport location to display the view controls . Can be one of { @ link AVKey # NORTHEAST } , { @ link
* AVKey # NORTHWEST } , { @ link AVKey # SOUTHEAST } , or { @ link AVKey # SOUTHWEST } ( the default ) . These indicate the corner of
* the viewport to plac... | if ( position == null ) { String message = Logging . getMessage ( "nullValue.PositionIsNull" ) ; Logging . logger ( ) . severe ( message ) ; throw new IllegalArgumentException ( message ) ; } this . position = position ; clearControls ( ) ; |
public class GobblinMetrics { /** * Build scheduled metrics reporters by reflection from the property
* { @ link org . apache . gobblin . configuration . ConfigurationKeys # METRICS _ CUSTOM _ BUILDERS } . This allows users to specify custom
* reporters for Gobblin runtime without having to modify the code . */
pri... | String reporterClasses = properties . getProperty ( ConfigurationKeys . METRICS_CUSTOM_BUILDERS ) ; if ( Strings . isNullOrEmpty ( reporterClasses ) ) { return ; } for ( String reporterClass : Splitter . on ( "," ) . split ( reporterClasses ) ) { buildScheduledReporter ( properties , reporterClass , Optional . < String... |
public class DriverRestartManager { /** * Sets the driver restart status to be completed if not yet set and notifies the restart completed event handlers . */
private synchronized void onDriverRestartCompleted ( final boolean isTimedOut ) { } } | if ( this . state != DriverRestartState . COMPLETED ) { final Set < String > outstandingEvaluatorIds = getOutstandingEvaluatorsAndMarkExpired ( ) ; driverRuntimeRestartManager . informAboutEvaluatorFailures ( outstandingEvaluatorIds ) ; this . state = DriverRestartState . COMPLETED ; final DriverRestartCompleted driver... |
public class RDBMEntityLockStore { /** * Updates the lock ' s < code > expiration < / code > and < code > lockType < / code > in the underlying store .
* Param < code > lockType < / code > may be null .
* @ param lock
* @ param newExpiration java . util . Date
* @ param newLockType Integer */
@ Override public ... | Connection conn = null ; try { conn = RDBMServices . getConnection ( ) ; if ( newLockType != null ) { primDeleteExpired ( new Date ( ) , lock . getEntityType ( ) , lock . getEntityKey ( ) , conn ) ; } primUpdate ( lock , newExpiration , newLockType , conn ) ; } catch ( SQLException sqle ) { throw new LockingException (... |
public class AndroidEventBuilderHelper { /** * Get the total amount of external storage , in bytes , or null if no external storage
* is mounted .
* @ return the total amount of external storage , in bytes , or null if no external storage
* is mounted */
protected static Long getTotalExternalStorage ( ) { } } | try { if ( isExternalStorageMounted ( ) ) { File path = Environment . getExternalStorageDirectory ( ) ; StatFs stat = new StatFs ( path . getPath ( ) ) ; long blockSize = stat . getBlockSize ( ) ; long totalBlocks = stat . getBlockCount ( ) ; return totalBlocks * blockSize ; } } catch ( Exception e ) { Log . e ( TAG , ... |
public class AspectranNodeParser { /** * Adds the type alias nodelets . */
private void addTypeAliasNodelets ( ) { } } | parser . setXpath ( "/aspectran/typeAliases" ) ; parser . addNodeEndlet ( text -> { if ( StringUtils . hasLength ( text ) ) { Parameters parameters = new VariableParameters ( text ) ; for ( String alias : parameters . getParameterNameSet ( ) ) { assistant . addTypeAlias ( alias , parameters . getString ( alias ) ) ; } ... |
public class OutputStreamBitWriter { /** * byte based methods */
@ Override protected void writeByte ( int value ) throws BitStreamException { } } | try { out . write ( value ) ; } catch ( IOException e ) { throw new BitStreamException ( e ) ; } |
public class ExceptionSoftener { /** * Soften a Callable that throws a ChecekdException into a Supplier
* < pre >
* { @ code
* Supplier < String > supplier = ExceptionSoftener . softenCallable ( this ) ;
* supplier . getValue ( ) ; / / thows IOException but doesn ' t need to declare it
* public String call ( ... | return ( ) -> { try { return s . call ( ) ; } catch ( final Throwable e ) { throw throwSoftenedException ( e ) ; } } ; |
public class IFixCompareCommandTask { /** * Returns < code > true < / code > if the IFixInfo applies the current installation version .
* @ param productVersion
* @ param iFixInfo
* @ return */
private boolean isIFixApplicable ( Version productVersion , IFixInfo iFixInfo ) throws VersionParsingException { } } | // If we don ' t know the product version just return true
if ( productVersion == null ) { return true ; } // Get the applicability for the iFix
Applicability applicability = iFixInfo . getApplicability ( ) ; if ( applicability == null ) { throw new VersionParsingException ( getMessage ( "compare.unable.to.find.offerin... |
public class LoadingLayout { /** * create loading mask
* @ return */
@ Override protected View createOverlayView ( ) { } } | LinearLayout ll = new LinearLayout ( getContext ( ) ) ; ll . setLayoutParams ( new FrameLayout . LayoutParams ( FrameLayout . LayoutParams . MATCH_PARENT , FrameLayout . LayoutParams . MATCH_PARENT ) ) ; ll . setGravity ( Gravity . CENTER ) ; View progressBar = createProgressBar ( ) ; ll . addView ( progressBar ) ; ret... |
public class PlanAssembler { /** * Create an order by node as required by the statement and make it a parent of root .
* @ param parsedStmt Parsed statement , for context
* @ param root The root of the plan needing ordering
* @ return new orderByNode ( the new root ) or the original root if no orderByNode was req... | assert ( parsedStmt instanceof ParsedSelectStmt || parsedStmt instanceof ParsedUnionStmt || parsedStmt instanceof ParsedDeleteStmt ) ; if ( ! isOrderByNodeRequired ( parsedStmt , root ) ) { return root ; } OrderByPlanNode orderByNode = buildOrderByPlanNode ( parsedStmt . orderByColumns ( ) ) ; orderByNode . addAndLinkC... |
public class SamplingEvictionStrategy { /** * Processes sampling based eviction logic on { @ link SampleableEvictableStore } .
* @ param sampleableEvictableStore { @ link SampleableEvictableStore } that holds { @ link Evictable } entries
* @ param evictionPolicyEvaluator { @ link EvictionPolicyEvaluator } to evalua... | final Iterable < EvictionCandidate < A , E > > samples = sampleableEvictableStore . sample ( SAMPLE_COUNT ) ; final EvictionCandidate < A , E > evictionCandidate = evictionPolicyEvaluator . evaluate ( samples ) ; return sampleableEvictableStore . tryEvict ( evictionCandidate , evictionListener ) ; |
public class HashMapImpl { /** * Clears the cache */
@ Override public void clear ( ) { } } | if ( _size > 0 ) { final K [ ] keys = _keys ; final V [ ] values = _values ; final int length = values . length ; for ( int i = length - 1 ; i >= 0 ; i -- ) { keys [ i ] = null ; values [ i ] = null ; } _size = 0 ; } _nullValue = null ; |
public class StandardConversions { /** * Converts a java object to a sequence of bytes applying standard java serialization .
* @ param source source the java object to convert .
* @ param sourceMediaType the MediaType matching application / x - application - object describing the source .
* @ return byte [ ] rep... | if ( source == null ) return null ; if ( ! sourceMediaType . match ( MediaType . APPLICATION_OBJECT ) ) { throw new EncodingException ( "destination MediaType not conforming to application/x-java-object!" ) ; } Object decoded = decodeObjectContent ( source , sourceMediaType ) ; if ( decoded instanceof byte [ ] ) return... |
public class CryptoUtil { /** * 生成HMAC - SHA1密钥 , 返回字节数组 , 长度为160位 ( 20字节 ) . HMAC - SHA1算法对密钥无特殊要求 , RFC2401建议最少长度为160位 ( 20字节 ) . */
public static byte [ ] generateHmacSha1Key ( ) { } } | try { KeyGenerator keyGenerator = KeyGenerator . getInstance ( HMACSHA1_ALG ) ; keyGenerator . init ( DEFAULT_HMACSHA1_KEYSIZE ) ; SecretKey secretKey = keyGenerator . generateKey ( ) ; return secretKey . getEncoded ( ) ; } catch ( GeneralSecurityException e ) { throw ExceptionUtil . unchecked ( e ) ; } |
public class QueueBuilder { /** * Create the new Queue using the currently set properties . */
public Queue < B > newQueue ( ) { } } | return new Queue < B > ( parent_queue , queue_restriction , index , process_builder_class , process_server_class , default_occurence , default_visibility , default_access , default_resilience , default_output , implementation_options ) ; |
public class MainController { /** * Activates the property grid once the provider and group ids are set . */
private void init ( ) { } } | if ( provider != null ) { propertyGrid . setTarget ( StringUtils . isEmpty ( groupId ) ? null : new Settings ( groupId , provider ) ) ; } |
public class MapDBEngine { /** * { @ inheritDoc } */
@ Override @ SuppressWarnings ( "unchecked" ) public < T extends Serializable > T loadObject ( String name , Class < T > klass ) throws NoSuchElementException { } } | assertConnectionOpen ( ) ; if ( ! existsObject ( name ) ) { throw new NoSuchElementException ( "Can't find any object with name '" + name + "'" ) ; } DB storage = openStorage ( StorageType . PRIMARY_STORAGE ) ; Atomic . Var < T > atomicVar = storage . getAtomicVar ( name ) ; T serializableObject = klass . cast ( atomic... |
public class CircuitBreakerBuilder { /** * Sets the time length of sliding window to accumulate the count of events .
* Defaults to { @ value Defaults # COUNTER _ SLIDING _ WINDOW _ SECONDS } seconds if unspecified . */
public CircuitBreakerBuilder counterSlidingWindow ( Duration counterSlidingWindow ) { } } | requireNonNull ( counterSlidingWindow , "counterSlidingWindow" ) ; if ( counterSlidingWindow . isNegative ( ) || counterSlidingWindow . isZero ( ) ) { throw new IllegalArgumentException ( "counterSlidingWindow: " + counterSlidingWindow + " (expected: > 0)" ) ; } this . counterSlidingWindow = counterSlidingWindow ; retu... |
public class ClassNode { /** * The complete class structure will be initialized only when really
* needed to avoid having too many objects during compilation */
private void lazyClassInit ( ) { } } | if ( lazyInitDone ) return ; synchronized ( lazyInitLock ) { if ( redirect != null ) { throw new GroovyBugError ( "lazyClassInit called on a proxy ClassNode, that must not happen." + "A redirect() call is missing somewhere!" ) ; } if ( lazyInitDone ) return ; VMPluginFactory . getPlugin ( ) . configureClassNode ( compi... |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcApplication ( ) { } } | if ( ifcApplicationEClass == null ) { ifcApplicationEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 20 ) ; } return ifcApplicationEClass ; |
public class OS { /** * Returns the name of the current Windows visual style .
* < ul >
* < li > it looks for a property name " win . xpstyle . name " in UIManager and if
* not found
* < li > it queries the win . xpstyle . colorName desktop property
* ( { @ link Toolkit # getDesktopProperty ( java . lang . St... | String style = UIManager . getString ( "win.xpstyle.name" ) ; if ( style == null ) { // guess the name of the current XPStyle
// ( win . xpstyle . colorName property found in awt _ DesktopProperties . cpp in
// JDK source )
style = ( String ) Toolkit . getDefaultToolkit ( ) . getDesktopProperty ( "win.xpstyle.colorName... |
public class HttpConnection { /** * 建立连接
* @ return { @ link URLConnection }
* @ throws IOException */
private URLConnection openConnection ( ) throws IOException { } } | return ( null == this . proxy ) ? url . openConnection ( ) : url . openConnection ( this . proxy ) ; |
public class CustomerSession { /** * Force an update of the current customer , regardless of how much time has passed .
* @ param listener a { @ link CustomerRetrievalListener } to invoke with the result of getting
* the customer from the server */
public void updateCurrentCustomer ( @ NonNull CustomerRetrievalList... | mCustomer = null ; final String operationId = UUID . randomUUID ( ) . toString ( ) ; mCustomerRetrievalListeners . put ( operationId , listener ) ; mEphemeralKeyManager . retrieveEphemeralKey ( operationId , null , null ) ; |
public class OpDouble { /** * Create a String expression from a Expression
* @ param left
* @ param right
* @ param operation
* @ return String expression
* @ throws TemplateException */
public static ExprDouble toExprDouble ( Expression left , Expression right , int operation ) { } } | return new OpDouble ( left , right , operation ) ; |
public class UkrainianHybridDisambiguator { /** * all uppercase mostly are abbreviations , e . g . " АТО " is not part / intj */
private void removeLowerCaseHomonymsForAbbreviations ( AnalyzedSentence input ) { } } | AnalyzedTokenReadings [ ] tokens = input . getTokensWithoutWhitespace ( ) ; for ( int i = 1 ; i < tokens . length ; i ++ ) { if ( StringUtils . isAllUpperCase ( tokens [ i ] . getToken ( ) ) && PosTagHelper . hasPosTagPart ( tokens [ i ] , ":abbr" ) ) { List < AnalyzedToken > analyzedTokens = tokens [ i ] . getReadings... |
public class KllFloatsSketch { /** * Heapify takes the sketch image in Memory and instantiates an on - heap sketch .
* The resulting sketch will not retain any link to the source Memory .
* @ param mem a Memory image of a sketch .
* < a href = " { @ docRoot } / resources / dictionary . html # mem " > See Memory <... | final int preambleInts = mem . getByte ( PREAMBLE_INTS_BYTE ) & 0xff ; final int serialVersion = mem . getByte ( SER_VER_BYTE ) & 0xff ; final int family = mem . getByte ( FAMILY_BYTE ) & 0xff ; final int flags = mem . getByte ( FLAGS_BYTE ) & 0xff ; final int m = mem . getByte ( M_BYTE ) & 0xff ; if ( m != DEFAULT_M )... |
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EEnum getMediaFidelityStpMedEx ( ) { } } | if ( mediaFidelityStpMedExEEnum == null ) { mediaFidelityStpMedExEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 165 ) ; } return mediaFidelityStpMedExEEnum ; |
public class ApiOvhOrder { /** * Get prices and contracts information
* REST : GET / order / license / windows / new / { duration }
* @ param serviceType [ required ] # DEPRECATED # The kind of service on which this license will be used # Will not be used , keeped only for compatibility #
* @ param sqlVersion [ r... | String qPath = "/order/license/windows/new/{duration}" ; StringBuilder sb = path ( qPath , duration ) ; query ( sb , "ip" , ip ) ; query ( sb , "serviceType" , serviceType ) ; query ( sb , "sqlVersion" , sqlVersion ) ; query ( sb , "version" , version ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ... |
public class LogFileEntry { /** * Writes the contents of the entry into the given outputWriter .
* @ param outputWriter
* @ throws IOException */
public void write ( final Writer outputWriter ) throws IOException { } } | try ( final DataInputStream keyStream = entry . getKeyStream ( ) ; final DataInputStream valueStream = entry . getValueStream ( ) ; ) { outputWriter . write ( "Container: " ) ; outputWriter . write ( keyStream . readUTF ( ) ) ; outputWriter . write ( "\n" ) ; this . writeFiles ( valueStream , outputWriter ) ; } |
public class JsAdminFactoryImpl { @ Override public DestinationDefinition createDestinationDefinition ( DestinationType type , String name ) { } } | return new DestinationDefinitionImpl ( type , name ) ; |
public class SwingBindingFactory { /** * Binds the values specified in the collection contained within
* < code > selectableItemsHolder < / code > to a { @ link ShuttleList } , with any
* user selection being placed in the form property referred to by
* < code > selectionFormProperty < / code > . Each item in the... | Map context = ShuttleListBinder . createBindingContext ( getFormModel ( ) , selectionFormProperty , selectableItemsHolder , renderedProperty ) ; return createBinding ( ShuttleList . class , selectionFormProperty , context ) ; |
public class JSMinPostProcessor { /** * Convert a byte array to a String buffer taking into account the charset
* @ param charset
* the charset
* @ param minified
* the byte array
* @ return the string buffer
* @ throws IOException
* if an IO exception occurs */
private StringBuffer byteArrayToString ( Ch... | // Write the data into a string
ReadableByteChannel chan = Channels . newChannel ( new ByteArrayInputStream ( minified ) ) ; Reader rd = Channels . newReader ( chan , charset . newDecoder ( ) , - 1 ) ; StringWriter writer = new StringWriter ( ) ; IOUtils . copy ( rd , writer , true ) ; return writer . getBuffer ( ) ; |
public class SeMetricName { /** * { @ inheritDoc } */
@ Override public Metadata metadataOf ( AnnotatedMember < ? > member , Class < ? > type ) { } } | String name = of ( member ) ; return metadataOf ( member , name , type ) ; |
public class TransformerFactoryImpl { /** * Allows the user to retrieve specific attributes on the underlying
* implementation .
* @ param name The name of the attribute .
* @ return value The value of the attribute .
* @ throws IllegalArgumentException thrown if the underlying
* implementation doesn ' t reco... | if ( name . equals ( FEATURE_INCREMENTAL ) ) { return new Boolean ( m_incremental ) ; } else if ( name . equals ( FEATURE_OPTIMIZE ) ) { return new Boolean ( m_optimize ) ; } else if ( name . equals ( FEATURE_SOURCE_LOCATION ) ) { return new Boolean ( m_source_location ) ; } else throw new IllegalArgumentException ( XS... |
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public IfcBoilerTypeEnum createIfcBoilerTypeEnumFromString ( EDataType eDataType , String initialValue ) { } } | IfcBoilerTypeEnum result = IfcBoilerTypeEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ; |
public class PropertiesManagerCore { /** * Remove the extension from a specified GeoPackage
* @ param geoPackage
* GeoPackage name */
public void removeExtension ( String geoPackage ) { } } | PropertiesCoreExtension < T , ? , ? , ? > properties = propertiesMap . get ( geoPackage ) ; if ( properties != null ) { properties . removeExtension ( ) ; } |
public class CmsProjectDriver { /** * Checks if the given resource ( by id ) is available in the online project ,
* if there exists a resource with a different path ( a moved file ) , then the
* online entry is moved to the right ( new ) location before publishing . < p >
* @ param dbc the db context
* @ param ... | CmsResource onlineResource ; // check if the resource has been moved since last publishing
try { onlineResource = m_driverManager . getVfsDriver ( dbc ) . readResource ( dbc , onlineProject . getUuid ( ) , offlineResource . getStructureId ( ) , true ) ; if ( onlineResource . getRootPath ( ) . equals ( offlineResource .... |
public class IOUtil { /** * The { @ code buf } size limits the size of the message that must be read .
* A ProtobufException ( sizeLimitExceeded ) will be thrown if the
* size of the delimited message is larger . */
static int mergeDelimitedFrom ( InputStream in , byte [ ] buf , Object message , Schema schema , boo... | final int size = in . read ( ) ; if ( size == - 1 ) throw new EOFException ( "mergeDelimitedFrom" ) ; final int len = size < 0x80 ? size : CodedInput . readRawVarint32 ( in , size ) ; if ( len < 0 ) throw ProtobufException . negativeSize ( ) ; if ( len != 0 ) { // not an empty message
if ( len > buf . length ) { // siz... |
public class Model { /** * Update model . */
public boolean update ( ) { } } | filter ( FILTER_BY_UPDATE ) ; if ( _getModifyFlag ( ) . isEmpty ( ) ) { return false ; } Table table = _getTable ( ) ; String [ ] pKeys = table . getPrimaryKey ( ) ; for ( String pKey : pKeys ) { Object id = attrs . get ( pKey ) ; if ( id == null ) throw new ActiveRecordException ( "You can't update model without Prima... |
public class StreamName { /** * stuck with it , this is just a hack to work around that . */
private int compareKinds ( Kind kind1 , Kind kind2 ) { } } | if ( kind1 == Kind . LENGTH && kind2 == Kind . DATA ) { return - 1 ; } if ( kind1 == Kind . DATA && kind2 == Kind . LENGTH ) { return 1 ; } return kind1 . compareTo ( kind2 ) ; |
public class MappingsManager { /** * Transform the full qualified name of { @ code clazz } by applying the rules
* on namespace / package mappings . The mappings on the class name is not
* applied here . Does not work on inner class .
* @ param clazz
* the class to get namespace from .
* @ return the associat... | int bestScore = 0 ; String bestNamespace = clazz . getName ( ) . replaceAll ( "\\." , "::" ) ; for ( Namespace namespace : mappings . getNamespaces ( ) ) { if ( namespace . getJavaPackage ( ) . length ( ) > bestScore && clazz . getName ( ) . matches ( namespace . getJavaPackage ( ) ) ) { bestScore = namespace . getJava... |
public class InterfaceExtractor { /** * Extract the fixed interface for a class and a type descriptor with more details on the methods .
* @ param classbytes bytes for the class which is going through interface extraction
* @ param registry type registry related to the classloader for this class
* @ param typeDes... | return new InterfaceExtractor ( registry ) . extract ( classbytes , typeDescriptor ) ; |
public class KeyIgnoringVCFOutputFormat { /** * Allows wrappers to provide their own work file . */
public RecordWriter < K , VariantContextWritable > getRecordWriter ( TaskAttemptContext ctx , Path out ) throws IOException { } } | if ( this . header == null ) throw new IOException ( "Can't create a RecordWriter without the VCF header" ) ; final boolean wh = ctx . getConfiguration ( ) . getBoolean ( WRITE_HEADER_PROPERTY , true ) ; switch ( format ) { case BCF : return new KeyIgnoringBCFRecordWriter < K > ( out , header , wh , ctx ) ; case VCF : ... |
public class AmqpArguments { /** * Returns a list of AmqpTableEntry objects that matches the specified key .
* If a null key is passed in , then a null is returned . Also , if the internal
* structure is null , then a null is returned .
* @ param key name of the entry
* @ return List < AmqpTableEntry > object w... | if ( ( key == null ) || ( tableEntryArray == null ) ) { return null ; } List < AmqpTableEntry > entries = new ArrayList < AmqpTableEntry > ( ) ; for ( AmqpTableEntry entry : tableEntryArray ) { if ( entry . key . equals ( key ) ) { entries . add ( entry ) ; } } return entries ; |
public class DateBetween { /** * 计算两个日期相差月数 < br >
* 在非重置情况下 , 如果起始日期的天小于结束日期的天 , 月数要少算1 ( 不足1个月 )
* @ param isReset 是否重置时间为起始时间 ( 重置天时分秒 )
* @ return 相差月数
* @ since 3.0.8 */
public long betweenMonth ( boolean isReset ) { } } | final Calendar beginCal = DateUtil . calendar ( begin ) ; final Calendar endCal = DateUtil . calendar ( end ) ; final int betweenYear = endCal . get ( Calendar . YEAR ) - beginCal . get ( Calendar . YEAR ) ; final int betweenMonthOfYear = endCal . get ( Calendar . MONTH ) - beginCal . get ( Calendar . MONTH ) ; int res... |
public class MtasToken { /** * Creates the automaton map .
* @ param prefix the prefix
* @ param valueList the value list
* @ param filter the filter
* @ return the map */
public static Map < String , Automaton > createAutomatonMap ( String prefix , List < String > valueList , Boolean filter ) { } } | HashMap < String , Automaton > automatonMap = new HashMap < > ( ) ; if ( valueList != null ) { for ( String item : valueList ) { if ( filter ) { item = item . replaceAll ( "([\\\"\\)\\(\\<\\>\\.\\@\\#\\]\\[\\{\\}])" , "\\\\$1" ) ; } automatonMap . put ( item , new RegExp ( prefix + MtasToken . DELIMITER + item + "\u000... |
public class OMVRBTreeRIDEntryProvider { /** * Lazy unmarshall the RID if not in memory . */
public OIdentifiable getKeyAt ( final int iIndex ) { } } | if ( rids != null && rids [ iIndex ] != null ) return rids [ iIndex ] ; final ORecordId rid = itemFromStream ( iIndex ) ; if ( rids != null ) rids [ iIndex ] = rid ; return rid ; |
public class ConfigurationBuilder { /** * Create an immutable Configuration instance .
* @ return Configuration Immutable configuration instance . */
public Configuration build ( ) { } } | if ( configuration . connector == null || configuration . address == null ) { throw new IllegalArgumentException ( "You must call either withRemoteSocket or withSerialPort." ) ; } return configuration ; |
public class Document { /** * Adds the subject to a Document .
* @ param subject
* the subject
* @ return < CODE > true < / CODE > if successful , < CODE > false < / CODE > otherwise */
public boolean addSubject ( String subject ) { } } | try { return add ( new Meta ( Element . SUBJECT , subject ) ) ; } catch ( DocumentException de ) { throw new ExceptionConverter ( de ) ; } |
public class ImplEnhanceFilter_MT { /** * Handle outside image pixels by extending the image . */
public static float safeGet ( GrayF32 input , int x , int y ) { } } | if ( x < 0 ) x = 0 ; else if ( x >= input . width ) x = input . width - 1 ; if ( y < 0 ) y = 0 ; else if ( y >= input . height ) y = input . height - 1 ; return input . unsafe_get ( x , y ) ; |
public class snmpmanager { /** * Use this API to add snmpmanager resources . */
public static base_responses add ( nitro_service client , snmpmanager resources [ ] ) throws Exception { } } | base_responses result = null ; if ( resources != null && resources . length > 0 ) { snmpmanager addresources [ ] = new snmpmanager [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new snmpmanager ( ) ; addresources [ i ] . ipaddress = resources [ i ] . ipaddress ; addres... |
public class Signature { /** * FormalTypeParameters :
* < FormalTypeParameter + >
* @ param clazz
* @ return */
private static void formalTypeParameters ( Result sb , List < ? extends TypeParameterElement > typeParameters ) throws IOException { } } | if ( ! typeParameters . isEmpty ( ) ) { sb . setNeedsSignature ( true ) ; sb . append ( '<' ) ; for ( TypeParameterElement typeParameter : typeParameters ) { formalTypeParameter ( sb , typeParameter ) ; } sb . append ( '>' ) ; } |
public class DocumentViewContentExporter { /** * ( non - Javadoc )
* @ see
* org . exoplatform . services . jcr . dataflow . ItemDataTraversingVisitor # leaving ( org . exoplatform . services
* . jcr . datamodel . NodeData , int ) */
protected void leaving ( NodeData node , int level ) throws RepositoryException ... | try { if ( ! node . getQPath ( ) . getName ( ) . equals ( Constants . JCR_XMLTEXT ) ) { if ( Constants . ROOT_PATH . equals ( node . getQPath ( ) ) ) contentHandler . endElement ( Constants . NS_JCR_URI , Constants . NS_JCR_PREFIX , JCR_ROOT ) ; else contentHandler . endElement ( node . getQPath ( ) . getName ( ) . get... |
public class ServiceEndpointPolicyDefinitionsInner { /** * Creates or updates a service endpoint policy definition in the specified service endpoint policy .
* @ param resourceGroupName The name of the resource group .
* @ param serviceEndpointPolicyName The name of the service endpoint policy .
* @ param service... | return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , serviceEndpointPolicyName , serviceEndpointPolicyDefinitionName , serviceEndpointPolicyDefinitions ) . map ( new Func1 < ServiceResponse < ServiceEndpointPolicyDefinitionInner > , ServiceEndpointPolicyDefinitionInner > ( ) { @ Override public Serv... |
public class JulianChronology { /** * Serialization singleton */
private Object readResolve ( ) { } } | Chronology base = getBase ( ) ; int minDays = getMinimumDaysInFirstWeek ( ) ; minDays = ( minDays == 0 ? 4 : minDays ) ; // handle rename of BaseGJChronology
return base == null ? getInstance ( DateTimeZone . UTC , minDays ) : getInstance ( base . getZone ( ) , minDays ) ; |
public class XML { /** * Try to convert a string into a number , boolean , or null . If the string
* can ' t be converted , return the string . This is much less ambitious than
* JSONObject . stringToValue , especially because it does not attempt to
* convert plus forms , octal forms , hex forms , or E forms lack... | if ( "true" . equalsIgnoreCase ( string ) ) { return Boolean . TRUE ; } if ( "false" . equalsIgnoreCase ( string ) ) { return Boolean . FALSE ; } if ( "null" . equalsIgnoreCase ( string ) ) { return JSONObject . NULL ; } // If it might be a number , try converting it , first as a Long , and then as a
// Double . If tha... |
public class ResourceFactoryTrackerData { /** * Gets an array of resource service properties from a { @ link ResourceFactory } service reference .
* @ param ref a ResourceFactory service reference
* @ return service properties */
private Dictionary < String , Object > getServiceProperties ( ServiceReference < Resou... | String [ ] keys = ref . getPropertyKeys ( ) ; Dictionary < String , Object > properties = new Hashtable < String , Object > ( keys . length ) ; for ( String key : keys ) { if ( ! key . equals ( ResourceFactory . JNDI_NAME ) && ! key . equals ( ResourceFactory . CREATES_OBJECT_CLASS ) ) { properties . put ( key , ref . ... |
public class CloudHarmonySPECint { /** * Gets the SPECint of the specified instance of the specified offerings provider
* @ param providerName the name of the offerings provider
* @ param instanceType istance type as specified in the CloudHarmony API
* @ return SPECint of the specified instance */
public static I... | String key = providerName + "." + instanceType ; return SPECint . get ( key ) ; |
public class Section { /** * This method will process the section in the context of the Template
* @ return returns the integer code doEndTag ( ) will return . */
private int processTemplate ( ) { } } | ServletRequest req = pageContext . getRequest ( ) ; Template . TemplateContext tc = ( Template . TemplateContext ) req . getAttribute ( TEMPLATE_SECTIONS ) ; if ( tc . secs == null ) { tc . secs = new HashMap ( ) ; } assert ( tc . secs != null ) ; if ( ! _visible ) { // set the section so that it doesn ' t contain anyt... |
public class LoadProperties { /** * Loads in the properties file
* @ param props Properties being loaded from the file
* @ param file File declartion that is being used
* @ throws java . io . IOException IOException is thrown */
public static void loadProps ( Properties props , File file ) throws IOException { } ... | FileInputStream fis = null ; try { fis = new FileInputStream ( file ) ; props . load ( fis ) ; } finally { if ( null != fis ) { fis . close ( ) ; } } |
public class JSONComposer { /** * Method to call to complete composition , flush any pending content ,
* and return instance of specified result type . */
@ SuppressWarnings ( "unchecked" ) public T finish ( ) throws IOException { } } | if ( _open ) { _closeChild ( ) ; _open = false ; if ( _closeGenerator ) { _generator . close ( ) ; } else if ( Feature . FLUSH_AFTER_WRITE_VALUE . isEnabled ( _features ) ) { _generator . flush ( ) ; } } if ( _result == null ) { Object x ; if ( _stringWriter != null ) { x = _stringWriter . getAndClear ( ) ; _stringWrit... |
public class RtfParser { /** * Imports a complete RTF document .
* @ param readerIn
* The Reader to read the RTF document from .
* @ param rtfDoc
* The RtfDocument to add the imported document to .
* @ throws IOException On I / O errors .
* @ since 2.1.3 */
public void importRtfDocument ( InputStream reader... | if ( readerIn == null || rtfDoc == null ) return ; this . init ( TYPE_IMPORT_FULL , rtfDoc , readerIn , this . document , null ) ; this . setCurrentDestination ( RtfDestinationMgr . DESTINATION_NULL ) ; this . groupLevel = 0 ; try { this . tokenise ( ) ; } catch ( RuntimeException e ) { // TODO Auto - generated catch b... |
public class Pubsub { /** * Acknowledge a batch of received messages .
* @ param project The Google Cloud project .
* @ param subscription The subscription to acknowledge messages on .
* @ param ackIds List of message ID ' s to acknowledge .
* @ return A future that is completed when this request is completed .... | return acknowledge ( project , subscription , asList ( ackIds ) ) ; |
public class Bean { /** * Creates { @ link Session } instance , connected to the database .
* @ throws NamingException
* @ throws SQLException */
protected Session createSession ( ) throws Exception { } } | Config config = configBean . getConfig ( ) ; DataSource dataSource = InitialContext . doLookup ( config . getDataSourceJNDI ( ) ) ; return new Session ( dataSource , config . getDialect ( ) ) ; |
public class Command { /** * Get the { @ link ApplicationDefinition } for the given application name . If the
* connected Doradus server has no such application defined , null is returned .
* @ param appName Application name .
* @ return Application ' s { @ link ApplicationDefinition } , if it exists ,
* otherw... | // GET / _ applications / { application }
Utils . require ( ! restClient . isClosed ( ) , "Client has been closed" ) ; Utils . require ( appName != null && appName . length ( ) > 0 , "appName" ) ; try { StringBuilder uri = new StringBuilder ( Utils . isEmpty ( restClient . getApiPrefix ( ) ) ? "" : "/" + restClient . g... |
public class SqlServerParser { /** * 复制 OrderByElement
* @ param orig 原 OrderByElement
* @ param alias 新 OrderByElement 的排序要素
* @ return 复制的新 OrderByElement */
protected OrderByElement cloneOrderByElement ( OrderByElement orig , String alias ) { } } | return cloneOrderByElement ( orig , new Column ( alias ) ) ; |
public class BpmPlatformXmlParse { /** * parse a < code > & lt ; job - acquisition . . . / & gt ; < / code > element and add it to the
* list of parsed elements */
protected void parseJobAcquisition ( Element element , List < JobAcquisitionXml > jobAcquisitions ) { } } | JobAcquisitionXmlImpl jobAcquisition = new JobAcquisitionXmlImpl ( ) ; // set name
jobAcquisition . setName ( element . attribute ( NAME ) ) ; Map < String , String > properties = new HashMap < String , String > ( ) ; for ( Element childElement : element . elements ( ) ) { if ( JOB_EXECUTOR_CLASS_NAME . equals ( childE... |
public class AdapterUtil { /** * This method returns the Level based on a string representation fo the level
* possbile values are : < br >
* ALL < br >
* SEVERE ( highest value ) < br >
* WARNING < br >
* INFO < br >
* CONFIG < br >
* FINE < br >
* FINER < br >
* FINEST ( lowest value ) < br > */
pub... | Level _level = Level . INFO ; // default
if ( level == null ) return _level ; // default is all
char firstLetter = level . charAt ( 0 ) ; switch ( firstLetter ) { case 'i' : case 'I' : _level = Level . INFO ; break ; case 'A' : case 'a' : _level = Level . ALL ; break ; case 's' : case 'S' : _level = Level . SEVERE ; br... |
public class Cache { /** * lookup without stats */
public synchronized V probe ( K key ) { } } | Item < V > item ; item = items . get ( key ) ; return item == null ? null : item . value ; |
public class ListUsersInGroupResult { /** * The users returned in the request to list users .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setUsers ( java . util . Collection ) } or { @ link # withUsers ( java . util . Collection ) } if you want to overrid... | if ( this . users == null ) { setUsers ( new java . util . ArrayList < UserType > ( users . length ) ) ; } for ( UserType ele : users ) { this . users . add ( ele ) ; } return this ; |
public class CmsLogout { /** * Returns the context menu command according to
* { @ link org . opencms . gwt . client . ui . contextmenu . I _ CmsHasContextMenuCommand } . < p >
* @ return the context menu command */
public static I_CmsContextMenuCommand getContextMenuCommand ( ) { } } | return new I_CmsContextMenuCommand ( ) { public void execute ( CmsUUID structureId , final I_CmsContextMenuHandler handler , CmsContextMenuEntryBean bean ) { CmsConfirmDialog dialog = new CmsConfirmDialog ( Messages . get ( ) . key ( Messages . GUI_DIALOG_LOGOUT_TITLE_0 ) , Messages . get ( ) . key ( Messages . GUI_DIA... |
public class EigenValueDecomposition { /** * Symmetric Householder reduction to tridiagonal form . */
private void tred2 ( ) { } } | for ( int j = 0 ; j < n ; j ++ ) d [ j ] = V . get ( n - 1 , j ) ; // Householder reduction to tridiagonal form .
for ( int i = n - 1 ; i > 0 ; i -- ) { // Scale to avoid under / overflow .
double scale = 0.0 ; double h = 0.0 ; for ( int k = 0 ; k < i ; k ++ ) { scale = scale + abs ( d [ k ] ) ; } if ( scale == 0.0 ) {... |
public class JsMessageVisitor { /** * Initializes a message builder from a FUNCTION node .
* < pre >
* The tree should look something like :
* function
* | - - name
* | - - lp
* | | - - name < arg1 >
* | - - name < arg2 >
* - - block
* - - return
* - - add
* | - - string foo
* - - name < arg1 > ... | Set < String > phNames = new HashSet < > ( ) ; for ( Node fnChild : node . children ( ) ) { switch ( fnChild . getToken ( ) ) { case NAME : // This is okay . The function has a name , but it is empty .
break ; case PARAM_LIST : // Parse the placeholder names from the function argument list .
for ( Node argumentNode : f... |
public class StochasticLaw { /** * Extract a parameter value from a map of parameters .
* @ param paramName is the nameof the parameter to extract .
* @ param parameters is the map of available parameters
* @ return the extract value
* @ throws LawParameterNotFoundException if the parameter was not found or the... | final String svalue = parameters . get ( paramName ) ; if ( svalue != null && ! "" . equals ( svalue ) ) { // $ NON - NLS - 1 $
try { return Boolean . parseBoolean ( svalue ) ; } catch ( AssertionError e ) { throw e ; } catch ( Throwable e ) { } } throw new LawParameterNotFoundException ( paramName ) ; |
public class PrintStreamOutput { /** * Looks up the format pattern for the event output by key , conventionally
* equal to the method name . The pattern is used by the
* { # format ( String , String , Object . . . ) } method and by default is formatted
* using the { @ link MessageFormat # format ( String , Object... | if ( outputPatterns . containsKey ( key ) ) { return outputPatterns . getProperty ( key ) ; } return defaultPattern ; |
public class FeatureUtilities { /** * Create a featurecollection from a vector of features
* @ param features - the vectore of features
* @ return the created featurecollection */
public static SimpleFeatureCollection createFeatureCollection ( SimpleFeature ... features ) { } } | DefaultFeatureCollection fcollection = new DefaultFeatureCollection ( ) ; for ( SimpleFeature feature : features ) { fcollection . add ( feature ) ; } return fcollection ; |
public class ListDatastreams { /** * Parses an XML based response and removes the items that are not
* permitted .
* @ param request
* the http servlet request
* @ param response
* the http servlet response
* @ return the new response body without non - permissable objects .
* @ throws ServletException */... | String body = new String ( response . getData ( ) ) ; DocumentBuilder docBuilder = null ; Document doc = null ; try { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory . newInstance ( ) ; docBuilderFactory . setNamespaceAware ( true ) ; docBuilder = docBuilderFactory . newDocumentBuilder ( ) ; doc = doc... |
public class Validator { /** * Validate Required for urlPara . */
protected void validateRequired ( int index , String errorKey , String errorMessage ) { } } | String value = controller . getPara ( index ) ; if ( value == null /* | | " " . equals ( value ) */
) { addError ( errorKey , errorMessage ) ; } |
public class LFltToIntFunctionBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */
@ Nonnull public static LFltToIntFunction fltToIntFunctionFrom ( Consumer < LFltToIntFunctionBuilder > buildingFunction ) { } } | LFltToIntFunctionBuilder builder = new LFltToIntFunctionBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ; |
public class CmsProperty { /** * Transforms a Map of String values into a list of
* { @ link CmsProperty } objects with the property name set from the
* Map key , and the structure value set from the Map value . < p >
* @ param map a Map with String keys and String values
* @ return a list of { @ link CmsProper... | if ( ( map == null ) || ( map . size ( ) == 0 ) ) { return Collections . emptyList ( ) ; } List < CmsProperty > result = new ArrayList < CmsProperty > ( map . size ( ) ) ; Iterator < Map . Entry < String , String > > i = map . entrySet ( ) . iterator ( ) ; while ( i . hasNext ( ) ) { Map . Entry < String , String > e =... |
public class Sanitizers { /** * Checks that the input is part of the name of an innocuous element . */
public static String filterHtmlElementName ( SoyValue value ) { } } | value = normalizeNull ( value ) ; return filterHtmlElementName ( value . coerceToString ( ) ) ; |
public class InternalXbaseParser { /** * InternalXbase . g : 1458:1 : entryRuleXTryCatchFinallyExpression : ruleXTryCatchFinallyExpression EOF ; */
public final void entryRuleXTryCatchFinallyExpression ( ) throws RecognitionException { } } | try { // InternalXbase . g : 1459:1 : ( ruleXTryCatchFinallyExpression EOF )
// InternalXbase . g : 1460:1 : ruleXTryCatchFinallyExpression EOF
{ if ( state . backtracking == 0 ) { before ( grammarAccess . getXTryCatchFinallyExpressionRule ( ) ) ; } pushFollow ( FOLLOW_1 ) ; ruleXTryCatchFinallyExpression ( ) ; state .... |
public class CommercePaymentMethodGroupRelWrapper { /** * Returns the localized description of this commerce payment method group rel in the language , optionally using the default language if no localization exists for the requested language .
* @ param languageId the ID of the language
* @ param useDefault whethe... | return _commercePaymentMethodGroupRel . getDescription ( languageId , useDefault ) ; |
public class HBaseDataHandler { /** * Gets the object from byte array .
* @ param entityType
* the entity type
* @ param value
* the value
* @ param jpaColumnName
* the jpa column name
* @ param m
* the m
* @ return the object from byte array */
private Object getObjectFromByteArray ( EntityType entit... | if ( jpaColumnName != null ) { String fieldName = m . getFieldName ( jpaColumnName ) ; if ( fieldName != null ) { Attribute attribute = fieldName != null ? entityType . getAttribute ( fieldName ) : null ; EntityMetadata relationMetadata = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , attribute . getJav... |
public class JodaBeanReferencingBinReader { /** * reads the input stream */
@ Override < T > T read ( Class < T > rootType ) { } } | try { try { return parseRemaining ( rootType ) ; } finally { input . close ( ) ; } } catch ( RuntimeException ex ) { throw ex ; } catch ( Exception ex ) { throw new RuntimeException ( ex ) ; } |
public class InformedArrayList { /** * Extract the upper class that contains all the elements of
* this array .
* @ param < E > is the type of the list ' s elements .
* @ param collection is the collection to scan
* @ return the top class of all the elements . */
@ SuppressWarnings ( "unchecked" ) protected sta... | Class < ? extends E > clazz = null ; for ( final E elt : collection ) { clazz = ( Class < ? extends E > ) ReflectionUtil . getCommonType ( clazz , elt . getClass ( ) ) ; } return clazz == null ? ( Class < E > ) Object . class : clazz ; |
public class NodeSequence { /** * Create a sequence of nodes that all satisfy the supplied filter .
* @ param sequence the original sequence that is to be limited ; may be null
* @ param filter the filter to apply to the nodes ; if null this method simply returns < code > sequence < / code >
* @ return the sequen... | if ( sequence == null ) return emptySequence ( 0 ) ; if ( filter == null || sequence . isEmpty ( ) ) return sequence ; return new NodeSequence ( ) { @ Override public long getRowCount ( ) { // we don ' t know how the filter affects the row count . . .
return - 1 ; } @ Override public int width ( ) { return sequence . w... |
public class JBossDetector { /** * { @ inheritDoc } */
public ServerHandle detect ( MBeanServerExecutor pMBeanServerExecutor ) { } } | ServerHandle handle = checkFromJSR77 ( pMBeanServerExecutor ) ; if ( handle == null ) { handle = checkFor5viaJMX ( pMBeanServerExecutor ) ; if ( handle == null ) { handle = checkForManagementRootServerViaJMX ( pMBeanServerExecutor ) ; } if ( handle == null ) { handle = checkForWildflySwarm ( ) ; } if ( handle == null )... |
public class TimeBasedAvroWriterPartitioner { /** * Retrieve the value of the partition column field specified by this . partitionColumns */
private Optional < Object > getWriterPartitionColumnValue ( GenericRecord record ) { } } | if ( ! this . partitionColumns . isPresent ( ) ) { return Optional . absent ( ) ; } for ( String partitionColumn : this . partitionColumns . get ( ) ) { Optional < Object > fieldValue = AvroUtils . getFieldValue ( record , partitionColumn ) ; if ( fieldValue . isPresent ( ) ) { return fieldValue ; } } return Optional .... |
public class ClassUtils { /** * 使用默认ClassLoader加载class
* @ param className class名字
* @ param < T > class实际类型
* @ return class */
@ SuppressWarnings ( "unchecked" ) public static < T > Class < T > loadClass ( String className ) { } } | return ( Class < T > ) loadClass ( className , getDefaultClassLoader ( ) ) ; |
public class OccupantDirector { /** * Deals with all of the processing when an occupant shows up . */
public void entryAdded ( EntryAddedEvent < OccupantInfo > event ) { } } | // bail if this isn ' t for the OCCUPANT _ INFO field
if ( ! event . getName ( ) . equals ( PlaceObject . OCCUPANT_INFO ) ) { return ; } // now let the occupant observers know what ' s up
final OccupantInfo info = event . getEntry ( ) ; _observers . apply ( new ObserverList . ObserverOp < OccupantObserver > ( ) { publi... |
public class BlurDialogEngine { /** * Must be linked to the original lifecycle . */
@ SuppressLint ( "NewApi" ) public void onDismiss ( ) { } } | // remove blurred background and clear memory , could be null if dismissed before blur effect
// processing ends
// cancel async task
if ( mBluringTask != null ) { mBluringTask . cancel ( true ) ; } if ( mBlurredBackgroundView != null ) { if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . ICE_CREAM_SANDWICH ) { ... |
public class AccountController { /** * Creation of an account group */
@ RequestMapping ( value = "groups/create" , method = RequestMethod . POST ) public AccountGroup create ( @ RequestBody @ Valid NameDescription nameDescription ) { } } | return accountService . createGroup ( nameDescription ) ; |
public class BasicAtomGenerator { /** * Checks a carbon atom to see if it should be shown .
* @ param carbonAtom the carbon atom to check
* @ param container the atom container
* @ param model the renderer model
* @ return true if the carbon should be shown */
protected boolean showCarbon ( IAtom carbonAtom , I... | if ( ( Boolean ) model . get ( KekuleStructure . class ) ) return true ; if ( carbonAtom . getFormalCharge ( ) != 0 ) return true ; int connectedBondCount = container . getConnectedBondsList ( carbonAtom ) . size ( ) ; if ( connectedBondCount < 1 ) return true ; if ( ( Boolean ) model . get ( ShowEndCarbons . class ) &... |
public class AcpService { /** * 请求报文签名 ( 使用配置文件中配置的私钥证书或者对称密钥签名 ) < br >
* 功能 : 对请求报文进行签名 , 并计算赋值certid , signature字段并返回 < br >
* @ param reqData 请求报文map < br >
* @ param encoding 上送请求报文域encoding字段的值 < br >
* @ return 签名后的map对象 < br > */
public static Map < String , String > sign ( Map < String , String > reqDa... | reqData = SDKUtil . filterBlank ( reqData ) ; SDKUtil . sign ( reqData , encoding ) ; return reqData ; |
public class Artwork { /** * Deserializes an artwork object from a { @ link Bundle } .
* @ param bundle Bundle generated by { @ link # toBundle } to deserialize .
* @ return the artwork from the given { @ link Bundle } */
@ NonNull public static Artwork fromBundle ( @ NonNull Bundle bundle ) { } } | @ SuppressWarnings ( "WrongConstant" ) // Assume the KEY _ META _ FONT is valid
Builder builder = new Builder ( ) . title ( bundle . getString ( KEY_TITLE ) ) . byline ( bundle . getString ( KEY_BYLINE ) ) . attribution ( bundle . getString ( KEY_ATTRIBUTION ) ) . token ( bundle . getString ( KEY_TOKEN ) ) . metaFont (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.