signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ActivityChooserModel { /** * Sets an intent for which to choose a activity . * < strong > Note : < / strong > Clients must set only semantically similar * intents for each data model . * @ param intent The intent . */ public void setIntent ( Intent intent ) { } }
synchronized ( mInstanceLock ) { if ( mIntent == intent ) { return ; } mIntent = intent ; mReloadActivities = true ; ensureConsistentState ( ) ; }
public class TableDescription { /** * The global secondary indexes , if any , on the table . Each index is scoped to a given partition key value . Each * element is composed of : * < ul > * < li > * < code > Backfilling < / code > - If true , then the index is currently in the backfilling phase . Backfilling oc...
if ( globalSecondaryIndexes == null ) { this . globalSecondaryIndexes = null ; return ; } this . globalSecondaryIndexes = new java . util . ArrayList < GlobalSecondaryIndexDescription > ( globalSecondaryIndexes ) ;
public class PoolInfo { /** * Convert this object to PoolInfoStrings for Thrift * @ param poolInfo Pool info * @ return { @ link PoolInfo } converted to a Thrift form */ public static PoolInfoStrings createPoolInfoStrings ( PoolInfo poolInfo ) { } }
if ( poolInfo == null ) { return null ; } return new PoolInfoStrings ( poolInfo . getPoolGroupName ( ) , poolInfo . getPoolName ( ) ) ;
public class ExtensionHook { /** * Gets the { @ link ConnectRequestProxyListener } s added to this hook . * @ return an unmodifiable { @ code List } containing the added { @ code ConnectRequestProxyListener } s , never { @ code null } . * @ since 2.5.0 */ List < ConnectRequestProxyListener > getConnectRequestProxyL...
if ( connectRequestProxyListeners == null ) { return Collections . emptyList ( ) ; } return Collections . unmodifiableList ( connectRequestProxyListeners ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link TexCoordGenType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link TexCoordGenType } { @ code > } *...
return new JAXBElement < TexCoordGenType > ( _TexCoordGen_QNAME , TexCoordGenType . class , null , value ) ;
public class SparkBitcoinBlockCounter { /** * a job for counting the total number of transactions * @ param sc context * @ param hadoopConf Configuration for input format * @ param inputFile Input file * @ param output outputFile file */ public static void jobTotalNumOfTransactions ( JavaSparkContext sc , Confi...
// read bitcoin data from HDFS JavaPairRDD < BytesWritable , BitcoinBlock > bitcoinBlocksRDD = sc . newAPIHadoopFile ( inputFile , BitcoinBlockFileInputFormat . class , BytesWritable . class , BitcoinBlock . class , hadoopConf ) ; // extract the no transactions / block ( map ) JavaPairRDD < String , Long > noOfTransact...
public class ConfigurationAction { /** * < p > doEditClasspath . < / p > * @ return a { @ link java . lang . String } object . */ public String doEditClasspath ( ) { } }
try { selectedRunner = getService ( ) . getRunner ( selectedRunnerName ) ; selectedRunner . setClasspaths ( ClasspathSet . parse ( classpath ) ) ; getService ( ) . updateRunner ( selectedRunnerName , selectedRunner ) ; } catch ( GreenPepperServerException e ) { addActionError ( e . getId ( ) ) ; } return doGetRunners (...
public class BasicRequestCtx { /** * Private helper function to encode the subjects */ private void encodeSubject ( Subject subject , PrintStream out , Indenter indenter ) { } }
char [ ] indent = indenter . makeString ( ) . toCharArray ( ) ; out . print ( indent ) ; out . append ( "<Subject SubjectCategory=\"" ) . append ( subject . getCategory ( ) . toString ( ) ) . append ( '"' ) ; List subjectAttrs = subject . getAttributesAsList ( ) ; if ( subjectAttrs . size ( ) == 0 ) { // there ' s noth...
public class CassandraStorage { /** * { @ inheritDoc } Memoized in order to avoid re - preparing statements */ @ Override public SpanConsumer spanConsumer ( ) { } }
if ( spanConsumer == null ) { synchronized ( this ) { if ( spanConsumer == null ) { spanConsumer = new CassandraSpanConsumer ( this , indexCacheSpec ) ; } } } return spanConsumer ;
public class AtomWriter { /** * Write feed body . * @ param entities The list of entities to fill in the XML stream . It can not { @ code null } . * @ throws ODataRenderException In case it is not possible to write to the XML stream . */ public void writeBodyFeed ( List < ? > entities ) throws ODataRenderException ...
checkNotNull ( entities ) ; try { for ( Object entity : entities ) { writeEntry ( entity , true ) ; } } catch ( XMLStreamException | IllegalAccessException | NoSuchFieldException | ODataEdmException e ) { LOG . error ( "Not possible to marshall feed stream XML" ) ; throw new ODataRenderException ( "Not possible to mars...
public class JmsSession { /** * Method that opens a new Context in eFaps , setting the User , the Locale , * the Attributes of this Session { @ link # sessionAttributes } . * @ throws EFapsException on error * @ see # attach ( ) */ public void openContext ( ) throws EFapsException { } }
if ( isLogedIn ( ) ) { if ( ! Context . isTMActive ( ) ) { if ( ! this . sessionAttributes . containsKey ( UserAttributesSet . CONTEXTMAPKEY ) ) { Context . begin ( null , Context . Inheritance . Local ) ; this . sessionAttributes . put ( UserAttributesSet . CONTEXTMAPKEY , new UserAttributesSet ( this . userName ) ) ;...
public class TransformerIdentityImpl { /** * Report an element type declaration . * < p > The content model will consist of the string " EMPTY " , the * string " ANY " , or a parenthesised group , optionally followed * by an occurrence indicator . The model will be normalized so * that all whitespace is removed...
if ( null != m_resultDeclHandler ) m_resultDeclHandler . elementDecl ( name , model ) ;
public class JBBPFieldString { /** * Get the reversed bit representation of the value . * @ param value the value to be reversed , can be null * @ return the reversed value */ public static String reverseBits ( final String value ) { } }
String result = null ; if ( value != null ) { final char [ ] chars = value . toCharArray ( ) ; for ( int i = 0 ; i < chars . length ; i ++ ) { chars [ i ] = ( char ) JBBPFieldUShort . reverseBits ( ( short ) chars [ i ] ) ; } result = String . valueOf ( chars ) ; } return result ;
public class DateTimeDialogFragment { /** * < p > The callback used by the DatePicker to update { @ code mCalendar } as * the user changes the date . Each time this is called , we also update * the text on the date tab to reflect the date the user has currenly * selected . < / p > * < p > Implements the { @ lin...
mCalendar . set ( year , month , day ) ; updateDateTab ( ) ;
public class StreamingCinchContext { /** * Create a new ForeachRddFunction , which implements Spark ' s VoidFunction interface . */ public < T > ForeachRddFunction < T > foreachRddFunction ( Class < ? extends VoidFunction < T > > springBeanClass ) { } }
return new ForeachRddFunction < > ( voidFunction ( springBeanClass ) ) ;
public class IndexedSet { /** * { @ inheritDoc } */ @ Override public void flip ( T e ) { } }
indices . flip ( itemToIndex . get ( e ) . intValue ( ) ) ;
public class AbstractResilienceStrategy { /** * Called when the cache failed to recover from a failing store operation on a key . * @ param key key now inconsistent * @ param because exception thrown by the failing operation * @ param cleanup all the exceptions that occurred during cleanup */ protected void incon...
pacedErrorLog ( "Ehcache key {} in possible inconsistent state" , key , because ) ;
public class CommandHelpers { /** * A helper function to add the components to the builder and return a list of all the components */ public static List < InputComponent > addInputComponents ( UIBuilder builder , InputComponent ... components ) { } }
List < InputComponent > inputComponents = new ArrayList < > ( ) ; for ( InputComponent component : components ) { builder . add ( component ) ; inputComponents . add ( component ) ; } return inputComponents ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcRelDecomposes ( ) { } }
if ( ifcRelDecomposesEClass == null ) { ifcRelDecomposesEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 469 ) ; } return ifcRelDecomposesEClass ;
public class ImgUtil { /** * 给图片添加图片水印 < br > * 此方法并不关闭流 * @ param srcImage 源图像流 * @ param out 目标图像流 * @ param pressImg 水印图片 , 可以使用 { @ link ImageIO # read ( File ) } 方法读取文件 * @ param x 修正值 。 默认在中间 , 偏移量相对于中间偏移 * @ param y 修正值 。 默认在中间 , 偏移量相对于中间偏移 * @ param alpha 透明度 : alpha 必须是范围 [ 0.0 , 1.0 ] 之内 ( 包含边界值...
pressImage ( srcImage , getImageOutputStream ( out ) , pressImg , x , y , alpha ) ;
public class DubiousListCollection { /** * return the field object that the current method was called on , by finding the * reference down in the stack based on the number of parameters * @ param stk the opcode stack where fields are stored * @ param signature the signature of the called method * @ return the f...
int parmCount = SignatureUtils . getNumParameters ( signature ) ; if ( stk . getStackDepth ( ) > parmCount ) { OpcodeStack . Item itm = stk . getStackItem ( parmCount ) ; return itm . getXField ( ) ; } return null ;
public class BetaDetector { /** * Reports bug in case the field defined by the given name is { @ link Beta } . * < p > The field is searched in current class and all super classses as well . */ private void checkField ( String fieldName ) { } }
JavaClass javaClass = checkClass ( ) ; if ( javaClass == null ) { return ; } for ( JavaClass current = javaClass ; current != null ; current = getSuperclass ( current ) ) { for ( Field field : current . getFields ( ) ) { if ( fieldName . equals ( field . getName ( ) ) ) { // field has been found - check if it ' s beta ...
public class IfcPersonImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) public EList < IfcAddress > getAddresses ( ) { } }
return ( EList < IfcAddress > ) eGet ( Ifc2x3tc1Package . Literals . IFC_PERSON__ADDRESSES , true ) ;
public class AbstractDatabaseEngine { /** * Connects to the database . * @ throws Exception If connection is not possible , or failed to decrypt username / password if encryption was provided . */ protected void connect ( ) throws Exception { } }
String username = this . properties . getUsername ( ) ; String password = this . properties . getPassword ( ) ; if ( this . properties . isEncryptedPassword ( ) || this . properties . isEncryptedUsername ( ) ) { String privateKey = getPrivateKey ( ) ; if ( this . properties . isEncryptedUsername ( ) ) { final String de...
public class Polygon { /** * Point in polygon test , based on * http : / / www . ecse . rpi . edu / Homepages / wrf / Research / Short _ Notes / pnpoly . html * by W . Randolph Franklin * @ param v Point to test * @ return True when contained . */ public boolean containsPoint2D ( double [ ] v ) { } }
assert ( v . length == 2 ) ; final double testx = v [ 0 ] ; final double testy = v [ 1 ] ; boolean c = false ; Iterator < double [ ] > it = points . iterator ( ) ; double [ ] pre = points . get ( points . size ( ) - 1 ) ; while ( it . hasNext ( ) ) { final double [ ] cur = it . next ( ) ; final double curx = cur [ 0 ] ...
public class EntityFactory { private Table getTableStrict ( EntityConfig entityConfig ) { } }
Assert . isTrue ( entityConfig . hasTableName ( ) , "A tableName is expected for the entityConfig " + entityConfig . getEntityName ( ) ) ; Table table = config . getMetadata ( ) . getTableBySchemaAndName ( entityConfig . getSchemaName ( ) , entityConfig . getTableName ( ) ) ; Assert . notNull ( table , "Could not find ...
public class AccordionPanel { /** * Add the given component to this accordion , wrapping it into a * collapsible panel with the given title . * @ param title The title * @ param component The component to add * @ return The collapsible panel that has been created internally */ public CollapsiblePanel addToAccor...
return addToAccordion ( title , component , false ) ;
public class RetentionEnforcingStore { /** * Updates the store definition object and the retention time based on the * updated store definition */ @ Override public void updateStoreDefinition ( StoreDefinition storeDef ) { } }
this . storeDef = storeDef ; if ( storeDef . hasRetentionPeriod ( ) ) this . retentionTimeMs = storeDef . getRetentionDays ( ) * Time . MS_PER_DAY ;
public class DrizzleResultSet { /** * Retrieves the value of the designated column in the current row of this < code > ResultSet < / code > object as a * < code > java . sql . Time < / code > object in the Java programming language . This method uses the given calendar to * construct an appropriate millisecond valu...
return getValueObject ( columnIndex ) . getTime ( cal ) ;
public class BindingElement { /** * Replies the string representation of the binding key . * @ return the string representation of the binding key . * @ since 0.8 */ public String getKeyString ( ) { } }
if ( ! Strings . isEmpty ( getAnnotatedWith ( ) ) ) { return MessageFormat . format ( "@{1} {0}" , getBind ( ) , getAnnotatedWith ( ) ) ; // $ NON - NLS - 1 $ } if ( ! Strings . isEmpty ( getAnnotatedWithName ( ) ) ) { return MessageFormat . format ( "@Named({1}) {0}" , getBind ( ) , getAnnotatedWithName ( ) ) ; // $ N...
public class InfiniteScrollPanel { /** * Will be called once the scroll bar reached at the bottom of the scroll panel . * This will load the current { @ link this # offset } and { @ link this # limit } and will * check if recycling is enabled . */ protected void onScrollBottom ( ) { } }
if ( isEnableRecycling ( ) && recycleManager . hasRecycledWidgets ( ) ) { recycleManager . recycle ( RecyclePosition . BOTTOM ) ; } else { load ( offset , limit ) ; }
public class ItemListener { /** * Calls { @ link # onRenamed } and { @ link # onLocationChanged } as appropriate . * @ param rootItem the topmost item whose location has just changed * @ param oldFullName the previous { @ link Item # getFullName } * @ since 1.548 */ public static void fireLocationChange ( final I...
String prefix = rootItem . getParent ( ) . getFullName ( ) ; if ( ! prefix . isEmpty ( ) ) { prefix += '/' ; } final String newFullName = rootItem . getFullName ( ) ; assert newFullName . startsWith ( prefix ) ; int prefixS = prefix . length ( ) ; if ( oldFullName . startsWith ( prefix ) && oldFullName . indexOf ( '/' ...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link Boolean } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link Boolean } { @ code > } */ @ XmlElementDe...
return new JAXBElement < Boolean > ( _Boolean_QNAME , Boolean . class , null , value ) ;
public class SxmpSession { /** * Processes an InputStream that contains a request . Does its best to * only produce a Response that can be written to an OutputStream . Any * exception this method throws should be treated as fatal and no attempt * should be made to print out valid XML as a response . * @ param i...
// create a new XML parser SxmpParser parser = new SxmpParser ( version ) ; // an instance of an operation we ' ll be processing as a request Operation operation = null ; try { // parse input stream into an operation ( this may operation = parser . parse ( is ) ; } catch ( SxmpParsingException e ) { // major issue pars...
public class EnglishGrammaticalStructure { /** * Destructively modifies this < code > Collection & lt ; TypedDependency & gt ; < / code > * by collapsing several types of transitive pairs of dependencies . * < dl > * < dt > prepositional object dependencies : pobj < / dt > * < dd > * < code > prep ( cat , in ...
if ( DEBUG ) { printListSorted ( "collapseDependencies: CCproc: " + CCprocess , list ) ; } correctDependencies ( list ) ; if ( DEBUG ) { printListSorted ( "After correctDependencies:" , list ) ; } eraseMultiConj ( list ) ; if ( DEBUG ) { printListSorted ( "After collapse multi conj:" , list ) ; } collapse2WP ( list ) ;...
public class JKFormatUtil { /** * Gets the number formatter . * @ param pattern the pattern * @ return the number formatter */ public static Format getNumberFormatter ( final String pattern ) { } }
Format format = JKFormatUtil . formatMap . get ( pattern ) ; if ( format == null ) { format = new DecimalFormat ( pattern ) ; JKFormatUtil . formatMap . put ( pattern , format ) ; } return format ;
public class ItemAPI { /** * Returns the difference in fields values between the two revisions . * @ param itemId * The id of the item * @ param revisionFrom * The from revision * @ param revisionTo * The to revision * @ return The difference between the two revision */ public List < ItemFieldDifference >...
return getResourceFactory ( ) . getApiResource ( "/item/" + itemId + "/revision/" + revisionFrom + "/" + revisionTo ) . get ( new GenericType < List < ItemFieldDifference > > ( ) { } ) ;
public class TrainingsImpl { /** * Create a project . * @ param name Name of the project * @ param createProjectOptionalParameter the object representing the optional parameters to be set before calling this API * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observab...
if ( name == null ) { throw new IllegalArgumentException ( "Parameter name is required and cannot be null." ) ; } if ( this . client . apiKey ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiKey() is required and cannot be null." ) ; } final String description = createProjectOptionalParame...
public class PreviewAgentsResult { /** * The resulting list of agents . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setAgentPreviews ( java . util . Collection ) } or { @ link # withAgentPreviews ( java . util . Collection ) } if you want * to override ...
if ( this . agentPreviews == null ) { setAgentPreviews ( new java . util . ArrayList < AgentPreview > ( agentPreviews . length ) ) ; } for ( AgentPreview ele : agentPreviews ) { this . agentPreviews . add ( ele ) ; } return this ;
public class CampaignEventFilterMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CampaignEventFilter campaignEventFilter , ProtocolMarshaller protocolMarshaller ) { } }
if ( campaignEventFilter == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( campaignEventFilter . getDimensions ( ) , DIMENSIONS_BINDING ) ; protocolMarshaller . marshall ( campaignEventFilter . getFilterType ( ) , FILTERTYPE_BINDING ) ; } c...
public class AcpOrd { /** * < p > Lazy Getter for quOrGdChk . < / p > * @ return String * @ throws IOException - IO exception */ public final String lazyGetQuOrGdChk ( ) throws IOException { } }
if ( this . quOrGdChk == null ) { String flName = "/webstore/ordGdChk.sql" ; this . quOrGdChk = loadString ( flName ) ; } return this . quOrGdChk ;
public class OrientedBox3f { /** * Set the second axis of the box . * The third axis is updated to be perpendicular to the two other axis . * @ param axis - the new values for the first axis . * @ param extent - the extent of the axis . */ @ Override public void setSecondAxis ( Vector3D axis , double extent ) { }...
setSecondAxis ( axis . getX ( ) , axis . getY ( ) , axis . getZ ( ) , extent ) ;
public class DatabaseHashMap { /** * close the connection */ void closeConnection ( Connection con ) { } }
if ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . entering ( methodClassName , methodNames [ CLOSE_CONNECTION ] , "closing " + con ) ; } try { con . close ( ) ; } catch ( Throwable t ) { co...
public class Css { /** * Create a Css Selector Transform */ public static CssSel sel ( String selector , String value ) { } }
return j . sel ( selector , value ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EEnum getIfcLightFixtureTypeEnum ( ) { } }
if ( ifcLightFixtureTypeEnumEEnum == null ) { ifcLightFixtureTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1013 ) ; } return ifcLightFixtureTypeEnumEEnum ;
public class Timestamp { /** * Creates a new timestamp from given seconds and nanoseconds . * @ param seconds Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z . Must be * from from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive . * @ param nanos Non - negative fractions of a second at ...
if ( seconds < - MAX_SECONDS ) { throw new IllegalArgumentException ( "'seconds' is less than minimum (" + - MAX_SECONDS + "): " + seconds ) ; } if ( seconds > MAX_SECONDS ) { throw new IllegalArgumentException ( "'seconds' is greater than maximum (" + MAX_SECONDS + "): " + seconds ) ; } if ( nanos < 0 ) { throw new Il...
public class JDBCResultSet { /** * # ifdef JAVA4 */ public void updateBlob ( int columnIndex , java . sql . Blob x ) throws SQLException { } }
if ( x instanceof JDBCBlobClient ) { throw Util . sqlException ( ErrorCode . JDBC_INVALID_ARGUMENT , "invalid Blob" ) ; } startUpdate ( columnIndex ) ; preparedStatement . setBlobParameter ( columnIndex , x ) ;
public class AbstractItem { /** * Updates an Item by its XML definition . * @ param source source of the Item ' s new definition . * The source should be either a < code > StreamSource < / code > or a < code > SAXSource < / code > , other * sources may not be handled . * @ since 1.473 */ public void updateByXml...
checkPermission ( CONFIGURE ) ; XmlFile configXmlFile = getConfigFile ( ) ; final AtomicFileWriter out = new AtomicFileWriter ( configXmlFile . getFile ( ) ) ; try { try { XMLUtils . safeTransform ( source , new StreamResult ( out ) ) ; out . close ( ) ; } catch ( TransformerException | SAXException e ) { throw new IOE...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcMaterialConstituentSet ( ) { } }
if ( ifcMaterialConstituentSetEClass == null ) { ifcMaterialConstituentSetEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 359 ) ; } return ifcMaterialConstituentSetEClass ;
public class ShapeModifiersProcessor { /** * Override name of the enums , marshall / unmarshall location of the * members in the given shape model . */ private void postprocess_ModifyMemberProperty ( ShapeModel shapeModel , String memberName , ShapeModifier_ModifyModel modifyModel ) { } }
if ( modifyModel . getEmitEnumName ( ) != null ) { EnumModel enumModel = shapeModel . findEnumModelByValue ( memberName ) ; if ( enumModel == null ) { throw new IllegalStateException ( String . format ( "Cannot find enum [%s] in the intermediate model when processing " + "customization config shapeModifiers.%s" , membe...
public class AutomationExecution { /** * The key - value map of execution parameters , which were supplied when calling StartAutomationExecution . * @ param parameters * The key - value map of execution parameters , which were supplied when calling StartAutomationExecution . * @ return Returns a reference to this...
setParameters ( parameters ) ; return this ;
public class SqlgStartupManager { /** * get the build version * @ return the build version , or null if unknown */ String getBuildVersion ( ) { } }
if ( this . buildVersion == null ) { Properties prop = new Properties ( ) ; try { // try system URL u = ClassLoader . getSystemResource ( SQLG_APPLICATION_PROPERTIES ) ; if ( u == null ) { // try own class loader u = getClass ( ) . getClassLoader ( ) . getResource ( SQLG_APPLICATION_PROPERTIES ) ; } if ( u != null ) { ...
public class WdrVideoUrlParser { /** * Erzeugt eine Map aus der Auflösungsbreite und der Video - URL * @ param m3u8Content Inhalt der m3u8 - Datei * @ return */ private Map < Integer , String > getResolutionUrlMapFromM3u8 ( String m3u8Content ) { } }
Map < Integer , String > resolutionUrlMap = new HashMap < > ( ) ; // Split nach # , um für jede Auflösung eine eigenen String zu erhalten String [ ] parts = m3u8Content . split ( "#" ) ; for ( String part : parts ) { String resolution = getSubstring ( part , M3U8_RESOLUTION_BEGIN , M3U8_RESOLUTION_END ) ; String url ...
public class QueuedExecutions { /** * Wraps BoundedQueue Take method to have a corresponding update in queuedFlowMap lookup table */ public Pair < ExecutionReference , ExecutableFlow > fetchHead ( ) throws InterruptedException { } }
final Pair < ExecutionReference , ExecutableFlow > pair = this . queuedFlowList . take ( ) ; if ( pair != null && pair . getFirst ( ) != null ) { this . queuedFlowMap . remove ( pair . getFirst ( ) . getExecId ( ) ) ; } return pair ;
public class MRCompactorJobPropCreator { /** * Create MR job properties for a { @ link Dataset } . */ protected Optional < Dataset > createJobProps ( Dataset dataset ) throws IOException { } }
if ( this . recompactFromOutputPaths && ( ! latePathsFound ( dataset ) ) ) { LOG . info ( String . format ( "Skipping recompaction for %s since there is no late data in %s" , new Object [ ] { dataset . inputPaths ( ) , dataset . inputLatePaths ( ) } ) ) ; return Optional . absent ( ) ; } State jobProps = new State ( ) ...
public class ExcelFunctions { /** * Returns only the day of the month of a date ( 1 to 31) */ public static int day ( EvaluationContext ctx , Object date ) { } }
return Conversions . toDateOrDateTime ( date , ctx ) . get ( ChronoField . DAY_OF_MONTH ) ;
public class DateTime { /** * 计算相差时长 * @ param date 对比的日期 * @ param unit 单位 { @ link DateUnit } * @ param formatLevel 格式化级别 * @ return 相差时长 */ public String between ( Date date , DateUnit unit , BetweenFormater . Level formatLevel ) { } }
return new DateBetween ( this , date ) . toString ( formatLevel ) ;
public class TargetBulkUpdateWindowLayout { /** * Reset the values in popup . */ public void resetComponents ( ) { } }
dsNamecomboBox . clear ( ) ; descTextArea . clear ( ) ; targetBulkTokenTags . getTokenField ( ) . clear ( ) ; targetBulkTokenTags . populateContainer ( ) ; progressBar . setValue ( 0F ) ; progressBar . setVisible ( false ) ; managementUIState . getTargetTableFilters ( ) . getBulkUpload ( ) . setProgressBarCurrentValue ...
public class ResponseLaunchTemplateData { /** * The elastic inference accelerator for the instance . * @ return The elastic inference accelerator for the instance . */ public java . util . List < LaunchTemplateElasticInferenceAcceleratorResponse > getElasticInferenceAccelerators ( ) { } }
if ( elasticInferenceAccelerators == null ) { elasticInferenceAccelerators = new com . amazonaws . internal . SdkInternalList < LaunchTemplateElasticInferenceAcceleratorResponse > ( ) ; } return elasticInferenceAccelerators ;
public class AggregateDirContextProcessor { /** * @ see org . springframework . ldap . core . DirContextProcessor # preProcess ( javax . naming . directory . DirContext ) */ public void preProcess ( DirContext ctx ) throws NamingException { } }
for ( DirContextProcessor processor : dirContextProcessors ) { processor . preProcess ( ctx ) ; }
public class JavaClassProcessor { /** * This is inconsistent with the behavior of Class . getSuperClass ( ) */ private Optional < String > getSuperClassName ( String superName , boolean isInterface ) { } }
return superName != null && ! isInterface ? Optional . of ( createTypeName ( superName ) ) : Optional . < String > absent ( ) ;
public class UserAPI { /** * 黑名单管理获取公众号的黑名单列表 < br > * 该接口每次调用最多可拉取 10000 个OpenID , 当列表数较多时 , 可以通过多次拉取的方式来满足需求 。 * @ since 2.8.1 * @ param access _ tokenaccess _ token * @ param begin _ openid当 begin _ openid 为空时 , 默认从开头拉取 。 * @ return result */ public static GetblacklistResult tagsMembersGetblacklist ( Strin...
String json = String . format ( "{\"begin_openid\":\"%s\"}" , begin_openid == null ? "" : begin_openid ) ; HttpUriRequest httpUriRequest = RequestBuilder . post ( ) . setHeader ( jsonHeader ) . setUri ( BASE_URI + "/cgi-bin/tags/members/getblacklist" ) . addParameter ( PARAM_ACCESS_TOKEN , API . accessToken ( access_to...
public class PullRequestMergedStateChangedEventMetadataMarshaller { /** * Marshall the given parameter object . */ public void marshall ( PullRequestMergedStateChangedEventMetadata pullRequestMergedStateChangedEventMetadata , ProtocolMarshaller protocolMarshaller ) { } }
if ( pullRequestMergedStateChangedEventMetadata == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( pullRequestMergedStateChangedEventMetadata . getRepositoryName ( ) , REPOSITORYNAME_BINDING ) ; protocolMarshaller . marshall ( pullRequestMer...
public class UserPasswordHandler { /** * Called when a new blank record is required for the table / query . * @ param bDisplayOption If true , display any changes . */ public void doNewRecord ( boolean bDisplayOption ) { } }
Record recUserInfo = this . getOwner ( ) ; RecordOwner recordOwner = recUserInfo . getRecordOwner ( ) ; Record recUserScreenRecord = ( Record ) recordOwner . getScreenRecord ( ) ; recUserScreenRecord . getField ( UserScreenRecord . CURRENT_PASSWORD ) . setData ( null ) ; recUserScreenRecord . getField ( UserScreenRecor...
public class CompositeRecordReader { /** * Report progress as the minimum of all child RR progress . */ public float getProgress ( ) throws IOException { } }
float ret = 1.0f ; for ( RecordReader < K , ? extends Writable > rr : kids ) { ret = Math . min ( ret , rr . getProgress ( ) ) ; } return ret ;
public class CurrentGpsInfo { /** * Method to add a new { @ link GGASentence } . * @ param gaa the sentence to add . */ public void addGGA ( GGASentence gga ) { } }
try { if ( gga . isValid ( ) ) { gpsFixQuality = gga . getFixQuality ( ) ; position = gga . getPosition ( ) ; altitude = gga . getAltitude ( ) ; if ( time == null ) { time = gga . getTime ( ) ; } } } catch ( Exception e ) { // ignore it , this should be handled in the isValid , // if an exception is thrown , we can ' t...
public class DynamicReportBuilder { /** * Defines the text to show when the data source is empty . < br > * By default the title and column headers are shown * @ param text * @ param style : the style of the text * @ return */ public DynamicReportBuilder setWhenNoData ( String text , Style style ) { } }
this . report . setWhenNoDataStyle ( style ) ; this . report . setWhenNoDataText ( text ) ; this . report . setWhenNoDataType ( DJConstants . WHEN_NO_DATA_TYPE_NO_DATA_SECTION ) ; return this ;
public class Meter { /** * Marks the number of events . * @ param n the number of events */ public void mark ( final long n ) { } }
tickIfNecessary ( ) ; count . addAndGet ( n ) ; m1Thp . update ( n ) ; m5Thp . update ( n ) ; m15Thp . update ( n ) ;
public class JdepsFilter { /** * Tests if the given source includes classes specified in - include option * This method can be used to determine if the given source should eagerly * be processed . */ public boolean matches ( Archive source ) { } }
if ( includePattern != null ) { return source . reader ( ) . entries ( ) . stream ( ) . map ( name -> name . replace ( '/' , '.' ) ) . filter ( name -> ! name . equals ( "module-info.class" ) ) . anyMatch ( this :: matches ) ; } return hasTargetFilter ( ) ;
public class UniversalIdStrMessage { /** * Create a new { @ link UniversalIdStrMessage } object with specified content . * @ param content * @ return */ public static UniversalIdStrMessage newInstance ( byte [ ] content ) { } }
UniversalIdStrMessage msg = newInstance ( ) ; msg . setContent ( content ) ; return msg ;
public class MCF1RGImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setCharRot ( Integer newCharRot ) { } }
Integer oldCharRot = charRot ; charRot = newCharRot ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . MCF1RG__CHAR_ROT , oldCharRot , charRot ) ) ;
public class DefaultEventbus { /** * - - - SEND EVENT TO ALL LISTENERS IN THE SPECIFIED GROUP - - - */ @ Override public void broadcast ( String name , Tree payload , Groups groups , boolean local ) { } }
String key = getCacheKey ( name , groups ) ; ListenerEndpoint [ ] endpoints ; if ( local ) { endpoints = localBroadcasterCache . get ( key ) ; } else { endpoints = broadcasterCache . get ( key ) ; } if ( endpoints == null ) { HashSet < ListenerEndpoint > list = new HashSet < > ( ) ; readLock . lock ( ) ; try { for ( Ma...
public class EndPointMgrImpl { /** * { @ inheritDoc } */ @ Override public EndPointInfo defineEndPoint ( String name , String host , int port ) { } }
try { EndPointInfoImpl ep ; synchronized ( this . endpoints ) { // if the endpoint with the same name already exists , // update it if ( this . endpoints . containsKey ( name ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "The new endpoint " + name + "already exists...
public class MasterSlaveSchema { /** * Renew disabled data source names . * @ param disabledStateChangedEvent disabled state changed event */ @ Subscribe public synchronized void renew ( final DisabledStateChangedEvent disabledStateChangedEvent ) { } }
OrchestrationShardingSchema shardingSchema = disabledStateChangedEvent . getShardingSchema ( ) ; if ( getName ( ) . equals ( shardingSchema . getSchemaName ( ) ) ) { ( ( OrchestrationMasterSlaveRule ) masterSlaveRule ) . updateDisabledDataSourceNames ( shardingSchema . getDataSourceName ( ) , disabledStateChangedEvent ...
public class PostgreSqlQueryGenerator { /** * Returns whether this attribute is stored in the entity table or another table such as a * junction table or referenced entity table . * @ param attr attribute * @ return whether this attribute is stored in another table than the entity table */ private static boolean ...
boolean bidirectionalOneToMany = attr . getDataType ( ) == ONE_TO_MANY && attr . isMappedBy ( ) ; return isMultipleReferenceType ( attr ) || bidirectionalOneToMany ;
public class VerificationConditionGenerator { /** * Generate the logically inverted expression corresponding to a given * comparator . For example , inverting " < = " gives " > " , inverting " = = " gives " ! = " , * etc . * @ param test * - - - the binary comparator being inverted . * @ return */ public Expr...
if ( expr instanceof Expr . Operator ) { Expr . Operator binTest = ( Expr . Operator ) expr ; switch ( binTest . getOpcode ( ) ) { case WyalFile . EXPR_eq : return new Expr . NotEqual ( binTest . getAll ( ) ) ; case WyalFile . EXPR_neq : return new Expr . Equal ( binTest . getAll ( ) ) ; case WyalFile . EXPR_gteq : ret...
public class VisualizationUtils { /** * Plots the MSD curve for trajectory t * @ param t Trajectory to calculate the msd curve * @ param lagMin Minimum timelag ( e . g . 1,2,3 . . ) lagMin * timelag = elapsed time in seconds * @ param lagMax Maximum timelag ( e . g . 1,2,3 . . ) lagMax * timelag = elapsed time in...
double [ ] xData = new double [ lagMax - lagMin + 1 ] ; double [ ] yData = new double [ lagMax - lagMin + 1 ] ; msdeval . setTrajectory ( t ) ; msdeval . setTimelag ( lagMin ) ; for ( int i = lagMin ; i < lagMax + 1 ; i ++ ) { msdeval . setTimelag ( i ) ; double msdhelp = msdeval . evaluate ( ) [ 0 ] ; xData [ i - lagM...
public class AlertWindow { /** * Display the alert window . */ public void show ( ) { } }
if ( isShowing ) { Log . w ( "AlertWindow" , "AlertWindow is already displayed." ) ; } else { isShowing = true ; mWindowManager . addView ( mContentView , mParams ) ; }
public class Filters { /** * { @ link Filter } that exclude all { @ link ArchivePath } s that match a given Regular Expression { @ link Pattern } . * @ param regexp * The expression to exclude * @ return A Regular Expression based exclude { @ link Filter } */ public static Filter < ArchivePath > exclude ( final S...
return getFilterInstance ( IMPL_CLASS_NAME_EXCLUDE_REGEXP_PATHS , new Class < ? > [ ] { String . class } , new Object [ ] { regexp } ) ;
public class MetadataAwareClassVisitor { /** * An order - sensitive invocation of { @ link ClassVisitor # visitOuterClass ( String , String , String ) } . * @ param owner The outer class ' s internal name . * @ param name The outer method ' s name or { @ code null } if it does not exist . * @ param descriptor The...
super . visitOuterClass ( owner , name , descriptor ) ;
public class Version { /** * Serialization only looks at major and minor , not micro or below . */ public static String decodeVersionForSerialization ( short version ) { } }
int major = ( version & MAJOR_MASK ) >> MAJOR_SHIFT ; int minor = ( version & MINOR_MASK ) >> MINOR_SHIFT ; return major + "." + minor ;
public class CrystalCell { /** * Converts a set of points so that the reference point falls in the unit cell . * This is useful to transform a whole chain at once , allowing some of the * atoms to be outside the unit cell , but forcing the centroid to be within it . * @ param points A set of points to transform (...
reference = new Point3d ( reference ) ; // clone transfToCrystal ( reference ) ; int x = ( int ) Math . floor ( reference . x ) ; int y = ( int ) Math . floor ( reference . y ) ; int z = ( int ) Math . floor ( reference . z ) ; for ( Tuple3d point : points ) { transfToCrystal ( point ) ; point . x -= x ; point . y -= y...
public class Criteria { /** * Adds GreaterOrEqual Than ( > = ) criteria , * customer _ id > = person _ id * @ param attribute The field name to be used * @ param value The field name to compare with */ public void addGreaterOrEqualThanField ( String attribute , Object value ) { } }
// PAW // addSelectionCriteria ( FieldCriteria . buildNotLessCriteria ( attribute , value , getAlias ( ) ) ) ; addSelectionCriteria ( FieldCriteria . buildNotLessCriteria ( attribute , value , getUserAlias ( attribute ) ) ) ;
public class StringSerializer { /** * Checks whether mime types is supported by this serializer implementation */ @ Override public boolean canRead ( @ Nonnull MediaType mimeType , Type resultType ) { } }
MediaType type = mimeType . withoutParameters ( ) ; return ( type . is ( MediaType . ANY_TEXT_TYPE ) || MediaType . APPLICATION_XML_UTF_8 . withoutParameters ( ) . is ( type ) || MediaType . JSON_UTF_8 . withoutParameters ( ) . is ( type ) ) && String . class . equals ( TypeToken . of ( resultType ) . getRawType ( ) ) ...
public class ExampleTemplateMatching { /** * Computes the template match intensity image and displays the results . Brighter intensity indicates * a better match to the template . */ public static void showMatchIntensity ( GrayF32 image , GrayF32 template , GrayF32 mask ) { } }
// create algorithm for computing intensity image TemplateMatchingIntensity < GrayF32 > matchIntensity = FactoryTemplateMatching . createIntensity ( TemplateScoreType . SUM_DIFF_SQ , GrayF32 . class ) ; // apply the template to the image matchIntensity . setInputImage ( image ) ; matchIntensity . process ( template , m...
public class ArgumentImpl { /** * return a value matching to key * @ param intKey * @ return value matching key * @ throws PageException */ @ Override public Object getE ( int intKey ) throws PageException { } }
Iterator it = valueIterator ( ) ; // getMap ( ) . keySet ( ) . iterator ( ) ; int count = 0 ; Object o ; while ( it . hasNext ( ) ) { o = it . next ( ) ; if ( ( ++ count ) == intKey ) { return o ; // super . get ( o . toString ( ) ) ; } } throw new ExpressionException ( "invalid index [" + intKey + "] for argument scop...
public class ComputeInstanceMetadataResolverUtils { /** * Resolve a value as a string from the metadata json . * @ param json The json * @ param key The key * @ return An optional value */ public static Optional < String > stringValue ( JsonNode json , String key ) { } }
return Optional . ofNullable ( json . findValue ( key ) ) . map ( JsonNode :: asText ) ;
public class RobotUtil { /** * 截屏 * @ param screenRect 截屏的矩形区域 * @ param outFile 写出到的文件 * @ return 写出到的文件 */ public static File captureScreen ( Rectangle screenRect , File outFile ) { } }
ImgUtil . write ( captureScreen ( screenRect ) , outFile ) ; return outFile ;
public class BlobContainersInner { /** * Creates a new container under the specified account as described by request body . The container resource includes metadata and properties for that container . It does not include a list of the blobs contained by the container . * @ param resourceGroupName The name of the reso...
return createWithServiceResponseAsync ( resourceGroupName , accountName , containerName , publicAccess , metadata ) . map ( new Func1 < ServiceResponse < BlobContainerInner > , BlobContainerInner > ( ) { @ Override public BlobContainerInner call ( ServiceResponse < BlobContainerInner > response ) { return response . bo...
public class SBTCompileMojo { /** * { @ inheritDoc } */ @ Override protected void internalExecute ( ) throws MojoExecutionException , MojoFailureException { } }
if ( skipMain ) { getLog ( ) . info ( "Not compiling main sources" ) ; return ; } super . internalExecute ( ) ; if ( outputDirectory . isDirectory ( ) ) { projectArtifact . setFile ( outputDirectory ) ; }
public class XmlTag { /** * Creates a compact string representation for the log . * @ param data the XmlTag to log * @ return string representation for log */ public static String toLog ( XmlTag data ) { } }
if ( data . channels == null ) { return data . getName ( ) + "(" + data . getOwner ( ) + ")" ; } else { return data . getName ( ) + "(" + data . getOwner ( ) + ")" + ( data . channels ) ; }
public class SubmitterLinkNameHtmlRenderer { /** * { @ inheritDoc } */ @ Override public String getNameHtml ( ) { } }
final SubmitterLink submitterLink = submitterLinkRenderer . getGedObject ( ) ; if ( ! submitterLink . isSet ( ) ) { return "" ; } final Submitter submitter = ( Submitter ) submitterLink . find ( submitterLink . getToString ( ) ) ; final GedRenderer < ? extends GedObject > renderer = new SimpleNameRenderer ( submitter ....
import java . io . * ; import java . lang . * ; import java . util . * ; import java . math . * ; class TilingOptions { /** * Function to calculate the number of ways the tiling problem can be solved . * Example : * > > > calculate _ tiling _ options ( 4) * > > > calculate _ tiling _ options ( 3) * > > > calcul...
if ( n == 0 ) { return 0 ; } if ( n == 1 ) { return 1 ; } return ( calculateTilingOptions ( n - 1 ) + calculateTilingOptions ( n - 2 ) ) ;
public class Quaternionf { /** * Set this quaternion to represent scaling , which results in a transformed vector to change * its length by the given < code > factor < / code > . * @ param factor * the scaling factor * @ return this */ public Quaternionf scaling ( float factor ) { } }
float sqrt = ( float ) Math . sqrt ( factor ) ; this . x = 0.0f ; this . y = 0.0f ; this . z = 0.0f ; this . w = sqrt ; return this ;
public class RowService { /** * Commits the pending changes . This operation is performed asynchronously . */ public final void commit ( ) { } }
if ( indexQueue == null ) { luceneIndex . commit ( ) ; } else { indexQueue . submitSynchronous ( new Runnable ( ) { @ Override public void run ( ) { luceneIndex . commit ( ) ; } } ) ; }
public class Predicates { /** * Returns a predicate that returns to true if the persistent attributes included with the { @ link HandlerInput } * contain the expected attribute value . * @ param key key of the attribute to evaluate * @ param value value of the attribute to evaluate * @ return true if the persis...
return i -> i . getAttributesManager ( ) . getPersistentAttributes ( ) . containsKey ( key ) && value . equals ( i . getAttributesManager ( ) . getPersistentAttributes ( ) . get ( key ) ) ;
public class NamingRegisterRequestCodec { /** * Decodes the bytes to a name assignment . * @ param buf the byte array * @ return a naming registration request * @ throws org . apache . reef . io . network . naming . exception . NamingRuntimeException */ @ Override public NamingRegisterRequest decode ( final byte ...
final AvroNamingRegisterRequest avroNamingRegisterRequest = AvroUtils . fromBytes ( buf , AvroNamingRegisterRequest . class ) ; return new NamingRegisterRequest ( new NameAssignmentTuple ( factory . getNewInstance ( avroNamingRegisterRequest . getId ( ) . toString ( ) ) , new InetSocketAddress ( avroNamingRegisterReque...
public class systemsession { /** * Use this API to fetch systemsession resources of given names . */ public static systemsession [ ] get ( nitro_service service , Long sid [ ] ) throws Exception { } }
if ( sid != null && sid . length > 0 ) { systemsession response [ ] = new systemsession [ sid . length ] ; systemsession obj [ ] = new systemsession [ sid . length ] ; for ( int i = 0 ; i < sid . length ; i ++ ) { obj [ i ] = new systemsession ( ) ; obj [ i ] . set_sid ( sid [ i ] ) ; response [ i ] = ( systemsession )...
public class CollisionFormulaConfig { /** * Remove the formula node . * @ param root The root node ( must not be < code > null < / code > ) . * @ param formula The formula name to remove ( must not be < code > null < / code > ) . * @ throws LionEngineException If invalid argument . */ public static void remove ( ...
Check . notNull ( root ) ; Check . notNull ( formula ) ; for ( final Xml node : root . getChildren ( NODE_FORMULA ) ) { if ( node . readString ( ATT_NAME ) . equals ( formula ) ) { root . removeChild ( node ) ; } }
public class JDBCResultSet { /** * < ! - - start generic documentation - - > * Moves the cursor to the front of * this < code > ResultSet < / code > object , just before the * first row . This method has no effect if the result set contains no rows . * < ! - - end generic documentation - - > * @ exception SQL...
checkClosed ( ) ; checkNotForwardOnly ( ) ; if ( isOnInsertRow || isRowUpdated ) { throw Util . sqlExceptionSQL ( ErrorCode . X_24513 ) ; } navigator . beforeFirst ( ) ;