signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class LowLevelAbstractionDefinition { /** * Test whether or not the given time series satisfies the constraints of
* this detector and an optional algorithm . If no algorithm is specified ,
* then this test just uses the detector ' s constraints .
* @ param segment
* a time series < code > Segment < / co... | if ( satisfiesGapBetweenValues ( segment ) ) { for ( LowLevelAbstractionValueDefinition valueDef : this . valueDefinitions ) { if ( valueDef . satisfiedBy ( segment , algorithm ) ) { return valueDef ; } } } return null ; |
public class TypeParser { /** * Parses the given { @ code input } string to the given { @ code targetType } .
* Example : < br / >
* < code >
* TypeParser parser = TypeParser . newBuilder ( ) . build ( ) ; < br / >
* Integer i = parser . parse ( " 1 " , Integer . class ) ;
* < / code >
* @ param input - str... | if ( input == null ) { throw new NullPointerException ( makeNullArgumentErrorMsg ( "input" ) ) ; } if ( targetType == null ) { throw new NullPointerException ( makeNullArgumentErrorMsg ( "targetType" ) ) ; } @ SuppressWarnings ( "unchecked" ) T temp = ( T ) parseType2 ( input , new TargetType ( targetType ) ) ; return ... |
public class SimpleConfigProperties { /** * Converts a hierarchical { @ link Map } of configuration values to { @ link ConfigProperties } . E . g . the hierarchical map
* < code > { " foo " = { " bar " = { " some " = " my - value " , " other " = " magic - value " } } } < / code > would result in { @ link ConfigProper... | SimpleConfigProperties root = new SimpleConfigProperties ( key ) ; root . fromHierarchicalMap ( map ) ; return root ; |
public class CmsXmlEntityResolver { /** * Checks whether the given schema id is an internal schema id or is translated to an internal schema id . < p >
* @ param schema the schema id
* @ return true if the given schema id is an internal schema id or translated to an internal schema id */
public static boolean isInt... | String translatedId = translateLegacySystemId ( schema ) ; if ( translatedId . startsWith ( INTERNAL_SCHEME ) ) { return true ; } return false ; |
public class ComplexFloat { /** * Multiply two complex numbers , in - place
* @ param c other complex number
* @ param result complex number where product is stored
* @ return same as result */
public ComplexFloat muli ( ComplexFloat c , ComplexFloat result ) { } } | float newR = r * c . r - i * c . i ; float newI = r * c . i + i * c . r ; result . r = newR ; result . i = newI ; return result ; |
public class AliPayApi { /** * 红包页面支付接口
* @ param model
* { AlipayFundCouponOrderPagePayModel }
* @ return { AlipayFundCouponOrderPagePayResponse }
* @ throws { AlipayApiException } */
public static AlipayFundCouponOrderPagePayResponse fundCouponOrderPagePayToResponse ( AlipayFundCouponOrderPagePayModel model )... | AlipayFundCouponOrderPagePayRequest request = new AlipayFundCouponOrderPagePayRequest ( ) ; request . setBizModel ( model ) ; return AliPayApiConfigKit . getAliPayApiConfig ( ) . getAlipayClient ( ) . execute ( request ) ; |
public class IsotopeFactory { /** * Get an isotope based on the element symbol and exact mass .
* @ param symbol the element symbol
* @ param exactMass the mass number
* @ param tolerance allowed difference from provided exact mass
* @ return the corresponding isotope */
public IIsotope getIsotope ( String symb... | IIsotope ret = null ; double minDiff = Double . MAX_VALUE ; int elem = Elements . ofString ( symbol ) . number ( ) ; List < IIsotope > isotopes = this . isotopes [ elem ] ; if ( isotopes == null ) return null ; for ( IIsotope isotope : isotopes ) { double diff = Math . abs ( isotope . getExactMass ( ) - exactMass ) ; i... |
public class IncrementalSemanticAnalysis { /** * Returns the current semantic vector for the provided word , or if the word
* is not currently in the semantic space , a vector is added for it and
* returned .
* @ param word a word
* @ return the { @ code SemanticVector } for the provide word . */
private Semant... | SemanticVector v = wordToMeaning . get ( word ) ; if ( v == null ) { v = ( useSparseSemantics ) ? new SparseSemanticVector ( vectorLength ) : new DenseSemanticVector ( vectorLength ) ; wordToMeaning . put ( word , v ) ; } return v ; |
public class NFAState { /** * Adds a set of transitions
* @ param rs
* @ param to */
public void addTransition ( RangeSet rs , NFAState < T > to ) { } } | for ( CharRange c : rs ) { addTransition ( c , to ) ; } edges . add ( to ) ; to . inStates . add ( this ) ; |
public class RandomVariableDifferentiableAADPathwise { /** * / * ( non - Javadoc )
* @ see net . finmath . stochastic . RandomVariable # addProduct ( net . finmath . stochastic . RandomVariable , double ) */
@ Override public RandomVariable addProduct ( RandomVariable factor1 , double factor2 ) { } } | return new RandomVariableDifferentiableAADPathwise ( getValues ( ) . addProduct ( factor1 , factor2 ) , Arrays . asList ( this , factor1 , new RandomVariableFromDoubleArray ( factor2 ) ) , OperatorType . ADDPRODUCT ) ; |
public class SearchOptions { /** * Sets the limit on the number of results to return . */
public SearchOptions setLimit ( int limit ) { } } | if ( limit <= 0 ) { this . limit = MAX_LIMIT ; } else { this . limit = Math . min ( limit , MAX_LIMIT ) ; } return this ; |
public class HpelPlainFormatter { /** * Generates the short type string based off the RepositoryLogRecord ' s Level .
* @ param logRecord
* @ return String - The type . */
protected static String mapLevelToType ( RepositoryLogRecord logRecord ) { } } | if ( null == logRecord ) { return " Z " ; } Level l = logRecord . getLevel ( ) ; if ( null == l ) { return " Z " ; } // In HPEL SystemOut and SystemErr are recorded in custom level but since we want
// them to be handled specially do it now before checking for custom levels
String s = logRecord . getLoggerName ( ) ; if... |
public class ImageFormatList { /** * this method returns a format in a list given its index
* @ param l the image format list
* @ param i the index of the format
* @ return the image format with the given index , or null */
private ImageFormat getFormat ( List < ImageFormat > l , int i ) { } } | for ( ImageFormat f : l ) if ( f . getIndex ( ) == i ) return f ; return null ; |
public class RTMPProtocolEncoder { /** * Determine type of header to use .
* @ param header RTMP message header
* @ param lastHeader Previous header
* @ return Header type to use */
private byte getHeaderType ( final Header header , final Header lastHeader ) { } } | // int lastFullTs = ( ( RTMPConnection ) Red5 . getConnectionLocal ( ) ) . getState ( ) . getLastFullTimestampWritten ( header . getChannelId ( ) ) ;
if ( lastHeader == null || header . getStreamId ( ) != lastHeader . getStreamId ( ) || header . getTimer ( ) < lastHeader . getTimer ( ) ) { // new header mark if header ... |
public class SubWriterHolderWriter { /** * Get the method type links for the table caption .
* @ param methodType the method type to be displayed as link
* @ return the content tree for the method type link */
public Content getMethodTypeLinks ( MethodTypes methodType ) { } } | String jsShow = "javascript:show(" + methodType . tableTabs ( ) . value ( ) + ");" ; HtmlTree link = HtmlTree . A ( jsShow , configuration . getContent ( methodType . tableTabs ( ) . resourceKey ( ) ) ) ; return link ; |
public class Inet6Address { /** * Utility routine to check if the InetAddress in a wildcard address .
* @ return a < code > boolean < / code > indicating if the Inetaddress is
* a wildcard address .
* @ since 1.4 */
@ Override public boolean isAnyLocalAddress ( ) { } } | byte test = 0x00 ; for ( int i = 0 ; i < INADDRSZ ; i ++ ) { test |= ipaddress [ i ] ; } return ( test == 0x00 ) ; |
public class CDKHueckelAromaticityDetector { /** * Tests if the electron count matches the H & uuml ; ckel 4n + 2 rule . */
private static boolean isHueckelValid ( IAtomContainer singleRing ) throws CDKException { } } | int electronCount = 0 ; for ( IAtom ringAtom : singleRing . atoms ( ) ) { if ( ringAtom . getHybridization ( ) != CDKConstants . UNSET && ( ringAtom . getHybridization ( ) == Hybridization . SP2 ) || ringAtom . getHybridization ( ) == Hybridization . PLANAR3 ) { // for example , a carbon
// note : the double bond is in... |
public class JQMSearch { /** * Standard GWT ChangeEvent is not working for search input , that ' s why we have to activate
* it manually by listening jQuery change event . */
private void initChangeHandler ( ) { } } | JQMChangeHandler handler = new JQMChangeHandler ( ) { @ Override public void onEvent ( JQMEvent < ? > event ) { DomEvent . fireNativeEvent ( Document . get ( ) . createChangeEvent ( ) , input ) ; } } ; JQMHandlerRegistration . registerJQueryHandler ( new WidgetHandlerCounter ( ) { @ Override public int getHandlerCountF... |
public class InternalCache2kBuilder { /** * The generic wiring code is not working on android .
* Explicitly call the wiring methods . */
@ SuppressWarnings ( "unchecked" ) private void configureViaSettersDirect ( HeapCache < K , V > c ) { } } | if ( config . getLoader ( ) != null ) { Object obj = c . createCustomization ( config . getLoader ( ) ) ; if ( obj instanceof CacheLoader ) { final CacheLoader < K , V > _loader = ( CacheLoader ) obj ; c . setAdvancedLoader ( new AdvancedCacheLoader < K , V > ( ) { @ Override public V load ( final K key , final long cu... |
public class ReUtil { /** * 指定内容中是否有表达式匹配的内容
* @ param pattern 编译后的正则模式
* @ param content 被查找的内容
* @ return 指定内容中是否有表达式匹配的内容
* @ since 3.3.1 */
public static boolean contains ( Pattern pattern , CharSequence content ) { } } | if ( null == pattern || null == content ) { return false ; } return pattern . matcher ( content ) . find ( ) ; |
public class IOUtils { /** * Creates formatted String for displaying conservation legend in PDB output
* @ return legend String */
public static String getPDBLegend ( ) { } } | StringBuilder s = new StringBuilder ( ) ; s . append ( "</pre></div>" ) ; s . append ( " <div class=\"subText\">" ) ; s . append ( " <b>Legend:</b>" ) ; s . append ( " <span class=\"m\">Green</span> - identical residues |" ) ; s . append ( " <span class=\"sm\">Pink</span> - similar r... |
public class NonSymmetricEquals { /** * implements the visitor to see if this method is equals ( Object o )
* @ param obj
* the context object of the currently parsed code block */
@ Override public void visitCode ( Code obj ) { } } | Method m = getMethod ( ) ; String name = m . getName ( ) ; String signature = m . getSignature ( ) ; if ( "equals" . equals ( name ) && SignatureBuilder . SIG_OBJECT_TO_BOOLEAN . equals ( signature ) && prescreen ( m ) ) { stack . resetForMethodEntry ( this ) ; super . visitCode ( obj ) ; } |
public class CCEncoder { /** * Encodes an incremental cardinality constraint and returns its encoding .
* @ param cc the cardinality constraint
* @ return the encoding of the constraint and the incremental data */
public Pair < ImmutableFormulaList , CCIncrementalData > encodeIncremental ( final PBConstraint cc ) {... | final EncodingResult result = EncodingResult . resultForFormula ( f ) ; final CCIncrementalData incData = this . encodeIncremental ( cc , result ) ; return new Pair < > ( new ImmutableFormulaList ( FType . AND , result . result ( ) ) , incData ) ; |
public class RecyclerLinePageIndicator { /** * Determines the width of this view
* @ param measureSpec
* A measureSpec packed into an int
* @ return The width of the view , honoring constraints from measureSpec */
private int measureWidth ( int measureSpec ) { } } | float result ; int specMode = MeasureSpec . getMode ( measureSpec ) ; int specSize = MeasureSpec . getSize ( measureSpec ) ; if ( ( specMode == MeasureSpec . EXACTLY ) || ( mRecyclerView == null ) ) { // We were told how big to be
result = specSize ; } else { // Calculate the width according the views count
final int c... |
public class BaseXMLBuilder { /** * Return the Document node representing the n < em > th < / em > ancestor element
* of this node , or the root node if n exceeds the document ' s depth .
* @ param steps
* the number of parent elements to step over while navigating up the chain
* of node ancestors . A steps val... | Node currNode = this . xmlNode ; int stepCount = 0 ; while ( currNode . getParentNode ( ) != null && stepCount < steps ) { currNode = currNode . getParentNode ( ) ; stepCount ++ ; } return currNode ; |
public class PropsCodeGen { /** * import ConfigProperty
* @ param def definition
* @ param out Writer
* @ throws IOException IOException */
protected void importConfigProperty ( Definition def , Writer out ) throws IOException { } } | if ( getConfigProps ( def ) . size ( ) > 0 ) { out . write ( "import javax.resource.spi.ConfigProperty;\n" ) ; } |
public class BaseField { /** * Convert this index to a string .
* This method is usually overidden by popup fields .
* @ param index The index to convert .
* @ return The display string . */
public String convertIndexToString ( int index ) { } } | String tempString = null ; if ( ( index >= 0 ) && ( index <= 9 ) ) { char value [ ] = new char [ 1 ] ; value [ 0 ] = ( char ) ( '0' + index ) ; tempString = new String ( value ) ; // 1 = ' 1 ' ; 2 = ' 2 ' ; etc . . .
} else tempString = Constants . BLANK ; return tempString ; |
public class AsyncRequestHandler { /** * Returns true if the request should continue .
* @ return */
private boolean initRequestHandler ( SelectionKey selectionKey ) { } } | ByteBuffer inputBuffer = inputStream . getBuffer ( ) ; int remaining = inputBuffer . remaining ( ) ; // Don ' t have enough bytes to determine the protocol yet . . .
if ( remaining < 3 ) return true ; byte [ ] protoBytes = { inputBuffer . get ( 0 ) , inputBuffer . get ( 1 ) , inputBuffer . get ( 2 ) } ; try { String pr... |
public class systemglobal_auditsyslogpolicy_binding { /** * Use this API to fetch filtered set of systemglobal _ auditsyslogpolicy _ binding resources .
* filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */
public static systemglobal_auditsyslogpolicy_binding [ ] get_filtered ( nitro... | systemglobal_auditsyslogpolicy_binding obj = new systemglobal_auditsyslogpolicy_binding ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; systemglobal_auditsyslogpolicy_binding [ ] response = ( systemglobal_auditsyslogpolicy_binding [ ] ) obj . getfiltered ( service , option ) ; return response ... |
public class CommerceOrderItemPersistenceImpl { /** * Returns all the commerce order items where CPInstanceId = & # 63 ; .
* @ param CPInstanceId the cp instance ID
* @ return the matching commerce order items */
@ Override public List < CommerceOrderItem > findByCPInstanceId ( long CPInstanceId ) { } } | return findByCPInstanceId ( CPInstanceId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ; |
public class Formation { /** * Changes the pattern of this formation and updates slot assignments if the number of member is supported by the given
* pattern .
* @ param pattern the pattern to set
* @ return { @ code true } if the pattern has effectively changed ; { @ code false } otherwise . */
public boolean ch... | // Find out how many slots we have occupied
int occupiedSlots = slotAssignments . size ; // Check if the pattern supports one more slot
if ( pattern . supportsSlots ( occupiedSlots ) ) { setPattern ( pattern ) ; // Update the slot assignments and return success
updateSlotAssignments ( ) ; return true ; } return false ; |
public class LoginHandler { /** * The person represented in the JAAS login context is created and
* associated to eFaps . If the person is defined in more than one JAAS
* system , the person is also associated to the other JAAS systems .
* @ param _ login JAAS login context
* @ return Java instance of newly cre... | Person person = null ; for ( final JAASSystem system : JAASSystem . getAllJAASSystems ( ) ) { final Set < ? > users = _login . getSubject ( ) . getPrincipals ( system . getPersonJAASPrincipleClass ( ) ) ; for ( final Object persObj : users ) { try { final String persKey = ( String ) system . getPersonMethodKey ( ) . in... |
public class HtmlPageUtil { /** * Creates a { @ link HtmlPage } from a given { @ link Reader } that reads the HTML code for that page .
* @ param reader { @ link Reader } that reads the HTML code
* @ return { @ link HtmlPage } for this { @ link Reader } */
public static HtmlPage toHtmlPage ( Reader reader ) { } } | try { return toHtmlPage ( IOUtils . toString ( reader ) ) ; } catch ( IOException e ) { throw new RuntimeException ( "Error creating HtmlPage from Reader." , e ) ; } |
public class PolicyStatesInner { /** * Queries policy states for the subscription level policy definition .
* @ param policyStatesResource The virtual resource under PolicyStates resource type . In a given time range , ' latest ' represents the latest policy state ( s ) , whereas ' default ' represents all policy sta... | return ServiceFuture . fromResponse ( listQueryResultsForPolicyDefinitionWithServiceResponseAsync ( policyStatesResource , subscriptionId , policyDefinitionName , queryOptions ) , serviceCallback ) ; |
public class JanusConfig { /** * Replies the value of the system property .
* @ param name
* - name of the property .
* @ param defaultValue
* - value to reply if the these is no property found
* @ return the value , or defaultValue . */
public static String getSystemProperty ( String name , String defaultVal... | String value ; value = System . getProperty ( name , null ) ; if ( value != null ) { return value ; } value = System . getenv ( name ) ; if ( value != null ) { return value ; } return defaultValue ; |
public class Sort { /** * Check if the long array is reverse sorted . It loops through the entire long
* array once , checking that the elements are reverse sorted .
* < br >
* < br >
* < i > Runtime : < / i > O ( n )
* @ param longArray the long array to check
* @ return < i > true < / i > if the long arra... | for ( int i = 0 ; i < longArray . length - 1 ; i ++ ) { if ( longArray [ i ] < longArray [ i + 1 ] ) { return false ; } } return true ; |
public class CmsSiteManagerImpl { /** * Gets an offline project to read offline resources from . < p >
* @ return CmsProject */
private CmsProject getOfflineProject ( ) { } } | try { return m_clone . readProject ( "Offline" ) ; } catch ( CmsException e ) { try { for ( CmsProject p : OpenCms . getOrgUnitManager ( ) . getAllAccessibleProjects ( m_clone , "/" , true ) ) { if ( ! p . isOnlineProject ( ) ) { return p ; } } } catch ( CmsException e1 ) { LOG . error ( "Unable to get ptoject" , e ) ;... |
public class Logging { /** * Log a message at the ' severe ' level .
* @ param message Warning log message .
* @ param e Exception */
public void error ( CharSequence message , Throwable e ) { } } | log ( Level . SEVERE , message , e ) ; |
public class ExecutionEnvironment { /** * Creates a { @ link DataSet } that represents the Strings produced by reading the given file line wise .
* The { @ link java . nio . charset . Charset } with the given name will be used to read the files .
* @ param filePath The path of the file , as a URI ( e . g . , " file... | Preconditions . checkNotNull ( filePath , "The file path may not be null." ) ; TextInputFormat format = new TextInputFormat ( new Path ( filePath ) ) ; format . setCharsetName ( charsetName ) ; return new DataSource < > ( this , format , BasicTypeInfo . STRING_TYPE_INFO , Utils . getCallLocationName ( ) ) ; |
public class Zones { /** * Evaluates to true if the input { @ link denominator . model . Zone } exists with { @ link
* denominator . model . Zone # name ( ) name } corresponding to the { @ code name } parameter .
* @ param name the { @ link denominator . model . Zone # name ( ) name } of the desired zone . */
publi... | checkNotNull ( name , "name" ) ; return new Filter < Zone > ( ) { @ Override public boolean apply ( Zone in ) { return in != null && name . equals ( in . name ( ) ) ; } @ Override public String toString ( ) { return "nameEqualTo(" + name + ")" ; } } ; |
public class SoftMethodStorage { /** * returns a methods matching given criteria or null if method doesn ' t exist
* @ param clazz clazz to get methods from
* @ param methodName Name of the Method to get
* @ param count wished count of arguments
* @ return matching Methods as Array */
public Method [ ] getMetho... | Map < Key , Array > methodsMap = map . get ( clazz ) ; if ( methodsMap == null ) methodsMap = store ( clazz ) ; Array methods = methodsMap . get ( methodName ) ; if ( methods == null ) return null ; Object o = methods . get ( count + 1 , null ) ; if ( o == null ) return null ; return ( Method [ ] ) o ; |
public class HlsGroupSettings { /** * Language to be used on Caption outputs
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setCaptionLanguageMappings ( java . util . Collection ) } or
* { @ link # withCaptionLanguageMappings ( java . util . Collection ) }... | if ( this . captionLanguageMappings == null ) { setCaptionLanguageMappings ( new java . util . ArrayList < HlsCaptionLanguageMapping > ( captionLanguageMappings . length ) ) ; } for ( HlsCaptionLanguageMapping ele : captionLanguageMappings ) { this . captionLanguageMappings . add ( ele ) ; } return this ; |
public class JacksonJerseyAnnotationProcessor { /** * Given an { @ link Element } representing the method get either a cached { @ link ResourceClass } or
* produce a new one . */
private ResourceClass getParentResourceClass ( final Element e ) { } } | final String parentClassName = e . getEnclosingElement ( ) . toString ( ) ; final ResourceClass klass = resourceClasses . get ( parentClassName ) ; if ( klass != null ) { return klass ; } final Path klassPath = e . getEnclosingElement ( ) . getAnnotation ( Path . class ) ; final ResourceClass newKlass = new ResourceCla... |
public class AWSMediaPackageClient { /** * Returns a collection of OriginEndpoint records .
* @ param listOriginEndpointsRequest
* @ return Result of the ListOriginEndpoints operation returned by the service .
* @ throws UnprocessableEntityException
* The parameters sent in the request are not valid .
* @ thr... | request = beforeClientExecution ( request ) ; return executeListOriginEndpoints ( request ) ; |
public class WorkflowExecutor { /** * Executes the async system task */
public void executeSystemTask ( WorkflowSystemTask systemTask , String taskId , int unackTimeout ) { } } | try { Task task = executionDAOFacade . getTaskById ( taskId ) ; if ( task == null ) { LOGGER . error ( "TaskId: {} could not be found while executing SystemTask" , taskId ) ; return ; } LOGGER . info ( "Task: {} fetched from execution DAO for taskId: {}" , task , taskId ) ; if ( task . getStatus ( ) . isTerminal ( ) ) ... |
public class ExecutorFilter { /** * { @ inheritDoc } */
@ Override public final void filterWrite ( NextFilter nextFilter , IoSession session , WriteRequest writeRequest ) { } } | if ( eventTypes . contains ( IoEventType . WRITE ) ) { IoFilterEvent event = new IoFilterEvent ( nextFilter , IoEventType . WRITE , session , writeRequest ) ; fireEvent ( event ) ; } else { nextFilter . filterWrite ( session , writeRequest ) ; } |
public class WDropdownOptionsExample { /** * build the drop down controls .
* @ return a field set containing the dropdown controls . */
private WFieldSet getDropDownControls ( ) { } } | WFieldSet fieldSet = new WFieldSet ( "Drop down configuration" ) ; WFieldLayout layout = new WFieldLayout ( ) ; layout . setLabelWidth ( 25 ) ; fieldSet . add ( layout ) ; rbsDDType . setButtonLayout ( WRadioButtonSelect . LAYOUT_FLAT ) ; rbsDDType . setSelected ( WDropdown . DropdownType . NATIVE ) ; rbsDDType . setFr... |
public class CmsJspStandardContextBean { /** * Returns the formatter configuration to the given element . < p >
* @ param element the element
* @ return the formatter configuration */
protected I_CmsFormatterBean getElementFormatter ( CmsContainerElementBean element ) { } } | if ( m_elementInstances == null ) { initPageData ( ) ; } I_CmsFormatterBean formatter = null ; CmsContainerBean container = m_parentContainers . get ( element . getInstanceId ( ) ) ; if ( container == null ) { // use the current container
container = getContainer ( ) ; } if ( container != null ) { String containerName ... |
public class ColorHelper { /** * Method to transform from HSV to ARGB
* Source from : https : / / www . cs . rit . edu / ~ ncs / color / t _ convert . html
* @ param h - hue
* @ param s - saturation
* @ param v - brightness
* @ param a - alpha
* @ return rgb color */
public static int fromHSV ( float h , fl... | float r = v ; float g = v ; float b = v ; int i ; float f , p , q , t ; if ( s == 0 ) { // achromatic ( grey )
int ri = ( int ) ( r * 0xff ) ; int gi = ( int ) ( g * 0xff ) ; int bi = ( int ) ( b * 0xff ) ; return getRGB ( ri , gi , bi ) ; } h /= 60 ; // sector 0 to 5
i = ( int ) Math . floor ( h ) ; f = h - i ; // fac... |
public class AbstractGraph { /** * { @ inheritDoc } */
public boolean contains ( int vertex1 , int vertex2 ) { } } | EdgeSet < T > e1 = getEdgeSet ( vertex1 ) ; return e1 != null && e1 . connects ( vertex2 ) ; |
public class IntegerProperty { /** * Sets the value of this integer property . The value is limited to the
* min / max range given during construction .
* @ return the previous value , or if not set : the default value . If no
* default value exists , 0 if that value is in the range [ minValue ,
* maxValue ] , ... | String prevValue = setString ( Integer . toString ( limit ( value ) ) ) ; if ( prevValue == null ) { prevValue = getDefaultValue ( ) ; if ( prevValue == null ) { return noValue ( ) ; } } int v = Integer . parseInt ( prevValue ) ; return limit ( v ) ; |
public class GeometryFactoryImpl { /** * Creates the default factory implementation .
* < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public static GeometryFactory init ( ) { } } | try { GeometryFactory theGeometryFactory = ( GeometryFactory ) EPackage . Registry . INSTANCE . getEFactory ( GeometryPackage . eNS_URI ) ; if ( theGeometryFactory != null ) { return theGeometryFactory ; } } catch ( Exception exception ) { EcorePlugin . INSTANCE . log ( exception ) ; } return new GeometryFactoryImpl ( ... |
public class QrCodeEncoder { /** * Call this function after you are done adding to the QR code
* @ return The generated QR Code */
public QrCode fixate ( ) { } } | autoSelectVersionAndError ( ) ; // sanity check of code
int expectedBitSize = bitsAtVersion ( qr . version ) ; qr . message = "" ; for ( MessageSegment m : segments ) { qr . message += m . message ; switch ( m . mode ) { case NUMERIC : encodeNumeric ( m . data , m . length ) ; break ; case ALPHANUMERIC : encodeAlphanum... |
public class FactoryCache { /** * Adds the given factory to the cache and associates it with the given
* type name .
* @ param < T > Should match { @ code typeName } .
* @ param typeName The fully qualified name of the type .
* @ param factory The factory to associate with { @ code typeName } */
public < T > vo... | if ( typeName != null ) { cache . put ( typeName , factory ) ; } |
public class StringUtils { /** * Removes trailing and leading whitespace , and also reduces each
* sequence of internal whitespace to a single space . */
public static String normalizeWS ( String value ) { } } | char [ ] tmp = new char [ value . length ( ) ] ; int pos = 0 ; boolean prevws = false ; for ( int ix = 0 ; ix < tmp . length ; ix ++ ) { char ch = value . charAt ( ix ) ; if ( ch != ' ' && ch != '\t' && ch != '\n' && ch != '\r' ) { if ( prevws && pos != 0 ) tmp [ pos ++ ] = ' ' ; tmp [ pos ++ ] = ch ; prevws = false ; ... |
public class GeneFeatureHelper { /** * Loads Fasta file and GFF2 feature file generated from the geneid prediction algorithm
* @ param fastaSequenceFile
* @ param gffFile
* @ return
* @ throws Exception */
static public LinkedHashMap < String , ChromosomeSequence > loadFastaAddGeneFeaturesFromGeneIDGFF2 ( File ... | LinkedHashMap < String , DNASequence > dnaSequenceList = FastaReaderHelper . readFastaDNASequence ( fastaSequenceFile ) ; LinkedHashMap < String , ChromosomeSequence > chromosomeSequenceList = GeneFeatureHelper . getChromosomeSequenceFromDNASequence ( dnaSequenceList ) ; FeatureList listGenes = GeneIDGFF2Reader . read ... |
public class DateUtils { /** * < p > 将 { @ link Date } 类型转换为指定格式的字符串 < / p >
* author : Crab2Died
* date : 2017年06月02日 15:32:04
* @ param date { @ link Date } 类型的时间
* @ param format 指定格式化类型
* @ return 返回格式化后的时间字符串 */
public static String date2Str ( Date date , String format ) { } } | SimpleDateFormat sdf = new SimpleDateFormat ( format ) ; return sdf . format ( date ) ; |
public class DefaultEasyFxml { /** * @ param fxmlNode The node who ' s filepath we look for
* @ return The node ' s { @ link FxmlNode # getFile ( ) } path prepended with the views root folder , as defined by
* environment variable " moe . tristan . easyfxml . fxml . fxml _ root _ path " . */
private String determin... | final String rootPath = Try . of ( ( ) -> "moe.tristan.easyfxml.fxml.fxml_root_path" ) . map ( this . environment :: getRequiredProperty ) . getOrElse ( "" ) ; return rootPath + fxmlNode . getFile ( ) . getPath ( ) ; |
public class DRL6Expressions { /** * src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 500:1 : unaryExpressionNotPlusMinus returns [ BaseDescr result ] : ( TILDE unaryExpression | NEGATION unaryExpression | ( castExpression ) = > castExpression | ( backReferenceExpression ) = > backReferen... | DRL6Expressions . unaryExpressionNotPlusMinus_return retval = new DRL6Expressions . unaryExpressionNotPlusMinus_return ( ) ; retval . start = input . LT ( 1 ) ; Token var = null ; Token COLON9 = null ; Token UNIFY10 = null ; BaseDescr left2 = null ; BaseDescr left1 = null ; boolean isLeft = false ; BindingDescr bind = ... |
public class ChartComputator { /** * Finds the chart point ( i . e . within the chart ' s domain and range ) represented by the given pixel coordinates , if
* that pixel is within the chart region described by { @ link # contentRectMinusAllMargins } . If the point is found ,
* the " dest "
* argument is set to th... | if ( ! contentRectMinusAllMargins . contains ( ( int ) x , ( int ) y ) ) { return false ; } dest . set ( currentViewport . left + ( x - contentRectMinusAllMargins . left ) * currentViewport . width ( ) / contentRectMinusAllMargins . width ( ) , currentViewport . bottom + ( y - contentRectMinusAllMargins . bottom ) * cu... |
public class RedisCacheManager { /** * redis回调调用
* @ param redisCallBack
* @ param clients
* @ param key
* @ param isRead
* @ return */
private < T > T execute ( RedisCallBack < T > redisCallBack , List < RedisClient > clients , Object key , boolean isRead ) { } } | for ( int i = 0 ; i < getRetryTimes ( ) ; i ++ ) { boolean result = redisCallBack . doInRedis ( clients , isRead , key ) ; if ( result ) { return redisCallBack . getResult ( ) ; } } Throwable e = redisCallBack . getException ( ) ; if ( e != null ) { logger . error ( "Return null because exception occurs: " + e . getMes... |
public class AdminToolUtils { /** * Utility function that checks if store names are valid on a node .
* @ param adminClient An instance of AdminClient points to given cluster
* @ param nodeId Node id to fetch stores from
* @ param storeNames Store names to check */
public static void validateUserStoreNamesOnNode ... | List < StoreDefinition > storeDefList = adminClient . metadataMgmtOps . getRemoteStoreDefList ( nodeId ) . getValue ( ) ; Map < String , Boolean > existingStoreNames = new HashMap < String , Boolean > ( ) ; for ( StoreDefinition storeDef : storeDefList ) { existingStoreNames . put ( storeDef . getName ( ) , true ) ; } ... |
public class DescribeAccountLimitsResult { /** * Information about the limits .
* @ param limits
* Information about the limits . */
public void setLimits ( java . util . Collection < Limit > limits ) { } } | if ( limits == null ) { this . limits = null ; return ; } this . limits = new com . amazonaws . internal . SdkInternalList < Limit > ( limits ) ; |
public class ProductPartitionTreeImpl { /** * Returns a new tree based on a non - empty collection of ad group criteria . All parameters
* required .
* @ param adGroupId the ID of the ad group
* @ param parentIdMap the multimap from parent product partition ID to child criteria
* @ return a new ProductPartition... | Preconditions . checkNotNull ( adGroupId , "Null ad group ID" ) ; Preconditions . checkArgument ( ! parentIdMap . isEmpty ( ) , "parentIdMap passed for ad group ID %s is empty" , adGroupId ) ; Preconditions . checkArgument ( parentIdMap . containsKey ( null ) , "No root criterion found in the list of ad group criteria ... |
public class JSLocalConsumerPoint { /** * ( non - Javadoc )
* @ see com . ibm . ws . sib . processor . impl . ConsumerPoint # notifyException ( com . ibm . ws . sib . processor . SIMPException ) */
@ Override public void notifyException ( Throwable exception ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "notifyException" , new Object [ ] { this , exception } ) ; // If an asynch consumer is registered we need to let them know something went wrong
if ( _asynchConsumerRegistered ) _asynchConsumer . notifyExceptionListeners ( e... |
public class EDTImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case AfplibPackage . EDT__DOC_NAME : return getDocName ( ) ; case AfplibPackage . EDT__TRIPLETS : return getTriplets ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; |
public class AWSMediaLiveClient { /** * Creates a Input Security Group
* @ param createInputSecurityGroupRequest
* The IPv4 CIDRs to whitelist for this Input Security Group
* @ return Result of the CreateInputSecurityGroup operation returned by the service .
* @ throws BadRequestException
* The request to cre... | request = beforeClientExecution ( request ) ; return executeCreateInputSecurityGroup ( request ) ; |
public class BundleUtil { /** * Extracts , but does not initialize , a serialized tileset bundle
* instance from the supplied file . */
public static TileSetBundle extractBundle ( File file ) throws IOException , ClassNotFoundException { } } | // unserialize the tileset bundles array
FileInputStream fin = new FileInputStream ( file ) ; try { ObjectInputStream oin = new ObjectInputStream ( new BufferedInputStream ( fin ) ) ; TileSetBundle tsb = ( TileSetBundle ) oin . readObject ( ) ; return tsb ; } finally { StreamUtil . close ( fin ) ; } |
public class ArrayUtils { /** * Removes the element at index from the given array .
* @ param < T > { @ link Class } type of the elements in the array .
* @ param array array from which to remove the element at index .
* @ param index index of the element to remove from the array .
* @ return a new array with t... | Assert . notNull ( array , "Array is required" ) ; assertThat ( index ) . throwing ( new ArrayIndexOutOfBoundsException ( String . format ( "[%1$d] is not a valid index [0, %2$d] in the array" , index , array . length ) ) ) . isGreaterThanEqualToAndLessThan ( 0 , array . length ) ; Class < ? > componentType = defaultIf... |
public class GetResponseSender { /** * Sends a multipart response . Each body part represents a versioned value
* of the given key .
* @ throws IOException
* @ throws MessagingException */
@ Override public void sendResponse ( StoreStats performanceStats , boolean isFromLocalZone , long startTimeInMs ) throws Exc... | /* * Pay attention to the code below . Note that in this method we wrap a multiPart object with a mimeMessage .
* However when writing to the outputStream we only send the multiPart object and not the entire
* mimeMessage . This is intentional .
* In the earlier version of this code we used to create a multiPart ... |
public class EbeanQueryCreator { /** * ( non - Javadoc )
* @ see org . springframework . data . repository . query . parser . AbstractQueryCreator # and ( org . springframework . data . repository . query . parser . Part , java . lang . Object , java . util . Iterator ) */
@ Override protected Expression and ( Part p... | return Expr . and ( base , toExpression ( part , root ) ) ; |
public class DataSet { /** * Hash - partitions a DataSet on the specified key fields .
* < p > < b > Important : < / b > This operation shuffles the whole DataSet over the network and can take significant amount of time .
* @ param fields The field indexes on which the DataSet is hash - partitioned .
* @ return T... | return new PartitionOperator < > ( this , PartitionMethod . HASH , new Keys . ExpressionKeys < > ( fields , getType ( ) ) , Utils . getCallLocationName ( ) ) ; |
public class XObject { /** * Create the right XObject based on the type of the object passed .
* This function < emph > can < / emph > make an XObject that exposes DOM Nodes , NodeLists , and
* NodeIterators to the XSLT stylesheet as node - sets .
* @ param val The java object which this object will wrap .
* @ ... | return XObjectFactory . create ( val , xctxt ) ; |
public class BaseEntity { /** * Returns the property value as a Timestamp .
* @ throws DatastoreException if no such property
* @ throws ClassCastException if value is not a Timestamp */
@ SuppressWarnings ( "unchecked" ) public Timestamp getTimestamp ( String name ) { } } | return ( ( Value < Timestamp > ) getValue ( name ) ) . get ( ) ; |
public class DMatrixUtils { /** * Consumes an array and desired respective indices in an array and return a new array with values from the desired indices .
* @ param vector Values .
* @ param indices Desired indices for order .
* @ return A new array . */
public static double [ ] applyIndices ( double [ ] vector... | // Initialize the return array :
final double [ ] retval = new double [ indices . length ] ; // Iterate over indices and populate :
for ( int i = 0 ; i < retval . length ; i ++ ) { retval [ i ] = vector [ indices [ i ] ] ; } // Done , return the return value :
return retval ; |
public class CmsHtmlList { /** * Removes an item from the list . < p >
* Keeping care of all the state like sorted column , sorting order , displayed page and search filter . < p >
* Try to use it instead of < code > { @ link A _ CmsListDialog # refreshList ( ) } < / code > . < p >
* @ param id the id of the item... | CmsListItem item = getItem ( id ) ; if ( item == null ) { return null ; } CmsListState state = null ; if ( ( m_filteredItems != null ) || ( m_visibleItems != null ) ) { state = getState ( ) ; } m_originalItems . remove ( item ) ; if ( m_filteredItems != null ) { m_filteredItems . remove ( item ) ; } if ( m_visibleItems... |
public class ItemStreamLink { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . msgstore . ItemCollection # findFirstMatchingItemStream ( com . ibm . ws . sib . msgstore . Filter ) */
public final ItemStream findFirstMatchingItemStream ( Filter filter ) throws MessageStoreException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "findFirstMatchingItemStream" , filter ) ; ItemStream item = ( ItemStream ) _itemStreams . findFirstMatching ( filter ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this ... |
public class FaceletViewDeclarationLanguage { /** * Generate the content type
* @ param context
* @ param orig
* @ return */
protected String getResponseContentType ( FacesContext context , String orig ) { } } | String contentType = orig ; // see if we need to override the contentType
Map < Object , Object > m = context . getAttributes ( ) ; if ( m . containsKey ( "facelets.ContentType" ) ) { contentType = ( String ) m . get ( "facelets.ContentType" ) ; if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "Facelet speci... |
public class ServerUtility { /** * Signals for the server to reload its policies . */
public static void reloadPolicies ( String protocol , String user , String pass ) throws IOException { } } | getServerResponse ( protocol , user , pass , "/management/control?action=reloadPolicies" ) ; |
public class RemoteTaskRunner { /** * Ensures no workers are already running a task before assigning the task to a worker .
* It is possible that a worker is running a task that the RTR has no knowledge of . This occurs when the RTR
* needs to bootstrap after a restart .
* @ param taskRunnerWorkItem - the task to... | Preconditions . checkNotNull ( task , "task" ) ; Preconditions . checkNotNull ( taskRunnerWorkItem , "taskRunnerWorkItem" ) ; Preconditions . checkArgument ( task . getId ( ) . equals ( taskRunnerWorkItem . getTaskId ( ) ) , "task id != workItem id" ) ; if ( runningTasks . containsKey ( task . getId ( ) ) || findWorker... |
public class PlaceRegistry { /** * Returns an enumeration of all of the registered place objects . This should only be accessed
* on the dobjmgr thread and shouldn ' t be kept around across event dispatches . */
public Iterator < PlaceObject > enumeratePlaces ( ) { } } | final Iterator < PlaceManager > itr = _pmgrs . values ( ) . iterator ( ) ; return new Iterator < PlaceObject > ( ) { public boolean hasNext ( ) { return itr . hasNext ( ) ; } public PlaceObject next ( ) { PlaceManager plmgr = itr . next ( ) ; return ( plmgr == null ) ? null : plmgr . getPlaceObject ( ) ; } public void ... |
public class RestService { /** * For entities with the given attribute that is part of a bidirectional one - to - many relationship
* update the other side of the relationship .
* @ param entity created or updated entity
* @ param existingEntity existing entity
* @ param attr bidirectional one - to - many attri... | if ( attr . getDataType ( ) != ONE_TO_MANY || ! attr . isMappedBy ( ) ) { throw new IllegalArgumentException ( format ( "Attribute [%s] is not of type [%s] or not mapped by another attribute" , attr . getName ( ) , attr . getDataType ( ) . toString ( ) ) ) ; } // update ref entities of created / updated entity
Attribut... |
public class ExpressionToken { /** * Get a JavaBean property from the given < code > value < / code >
* @ param value the JavaBean
* @ param propertyName the property name
* @ return the value of the property from the object < code > value < / code > */
protected final Object beanLookup ( Object value , Object pr... | LOGGER . trace ( "get JavaBean property : " + propertyName ) ; return ParseUtils . getProperty ( value , propertyName . toString ( ) , PROPERTY_CACHE ) ; |
public class MapExpressionBase { /** * Create a { @ code value in values ( this ) } expression
* @ param value value
* @ return expression */
public final BooleanExpression containsValue ( Expression < V > value ) { } } | return Expressions . booleanOperation ( Ops . CONTAINS_VALUE , mixin , value ) ; |
public class GenericSorting { /** * Sorts the specified range of elements according
* to the order induced by the specified comparator . All elements in the
* range must be < i > mutually comparable < / i > by the specified comparator
* ( that is , < tt > c . compare ( a , b ) < / tt > must not throw an
* excep... | /* We retain the same method signature as quickSort .
Given only a comparator and swapper we do not know how to copy and move elements from / to temporary arrays .
Hence , in contrast to the JDK mergesorts this is an " in - place " mergesort , i . e . does not allocate any temporary arrays .
A non - inplace merge... |
public class LazyFutureStreamFunctions { /** * Returns a stream ed to all elements for which a predicate evaluates to
* < code > true < / code > .
* < code >
* / / ( 1 , 2)
* Seq . of ( 1 , 2 , 3 , 4 , 5 ) . limitUntil ( i - & gt ; i = = 3)
* < / code > */
@ SuppressWarnings ( "unchecked" ) public static < T ... | final Iterator < T > it = stream . iterator ( ) ; class LimitUntil implements Iterator < T > { T next = ( T ) NULL ; boolean test = false ; void test ( ) { if ( ! test && next == NULL && it . hasNext ( ) ) { next = it . next ( ) ; if ( test = predicate . test ( next ) ) { next = ( T ) NULL ; close ( it ) ; // need to c... |
public class DOMDifferenceEngine { /** * Compares properties of an attribute . */
private ComparisonState compareAttributes ( Attr control , XPathContext controlContext , Attr test , XPathContext testContext ) { } } | return compareAttributeExplicitness ( control , controlContext , test , testContext ) . apply ( ) . andThen ( new Comparison ( ComparisonType . ATTR_VALUE , control , getXPath ( controlContext ) , control . getValue ( ) , getParentXPath ( controlContext ) , test , getXPath ( testContext ) , test . getValue ( ) , getPar... |
public class Bubble { /** * Sort the int array in descending order using this algorithm .
* @ param intArray the array of ints that we want to sort */
public static void sortDescending ( int [ ] intArray ) { } } | boolean swapped = true ; while ( swapped ) { swapped = false ; for ( int i = 0 ; i < ( intArray . length - 1 ) ; i ++ ) { if ( intArray [ i ] < intArray [ i + 1 ] ) { TrivialSwap . swap ( intArray , i , i + 1 ) ; swapped = true ; } } } |
public class DefaultJsonGenerator { /** * Serializes date and writes it into specified buffer . */
protected void writeDate ( Date date , CharBuf buffer ) { } } | SimpleDateFormat formatter = new SimpleDateFormat ( dateFormat , dateLocale ) ; formatter . setTimeZone ( timezone ) ; buffer . addQuoted ( formatter . format ( date ) ) ; |
public class V1BPMComponentImplementationModel { /** * { @ inheritDoc } */
@ Override public boolean isPersistent ( ) { } } | String p = getModelAttribute ( "persistent" ) ; return p != null ? Boolean . parseBoolean ( p ) : false ; |
public class ServiceOperations { /** * Initialize then start a service .
* The service state is checked < i > before < / i > the operation begins .
* This process is < i > not < / i > thread safe .
* @ param service a service that must be in the state
* { @ link Service . STATE # NOTINITED }
* @ param configu... | init ( service , configuration ) ; start ( service ) ; |
public class DefaultGroovyPagesUriService { /** * / * ( non - Javadoc )
* @ see grails . web . pages . GroovyPagesUriService # getNoSuffixViewURI ( groovy . lang . GroovyObject , java . lang . String ) */
@ Override public String getNoSuffixViewURI ( GroovyObject controller , String viewName ) { } } | Assert . notNull ( controller , "Argument [controller] cannot be null" ) ; return getNoSuffixViewURI ( getLogicalControllerName ( controller ) , viewName ) ; |
public class JSONClient { /** * Demonstrates various JSON / flexible schema queries .
* @ throws Exception if anything unexpected happens . */
private VoltTable runQuery ( String description , String SQL ) throws Exception { } } | System . out . println ( description ) ; ClientResponse resp = client . callProcedure ( "@AdHoc" , SQL ) ; System . out . println ( "SQL query: " + SQL ) ; System . out . println ( ) ; VoltTable table = resp . getResults ( ) [ 0 ] ; System . out . println ( table . toFormattedString ( ) ) ; System . out . println ( ) ;... |
public class LoggerFactory { /** * Return the { @ link ILoggerFactory } instance in use .
* ILoggerFactory instance is bound with this class at compile time .
* @ return the ILoggerFactory instance in use */
public static ILoggerFactory getILoggerFactory ( ) { } } | if ( INITIALIZATION_STATE == UNINITIALIZED ) { synchronized ( LoggerFactory . class ) { if ( INITIALIZATION_STATE == UNINITIALIZED ) { INITIALIZATION_STATE = ONGOING_INITIALIZATION ; performInitialization ( ) ; } } } switch ( INITIALIZATION_STATE ) { case SUCCESSFUL_INITIALIZATION : return StaticLoggerBinder . getSingl... |
public class StopWorkspacesRequest { /** * The WorkSpaces to stop . You can specify up to 25 WorkSpaces .
* @ return The WorkSpaces to stop . You can specify up to 25 WorkSpaces . */
public java . util . List < StopRequest > getStopWorkspaceRequests ( ) { } } | if ( stopWorkspaceRequests == null ) { stopWorkspaceRequests = new com . amazonaws . internal . SdkInternalList < StopRequest > ( ) ; } return stopWorkspaceRequests ; |
public class XPathQueryBuilder { /** * Creates a new { @ link org . apache . jackrabbit . spi . commons . query . RelationQueryNode }
* with < code > queryNode < / code > as its parent node .
* @ param node a comparison expression node .
* @ param queryNode the current < code > QueryNode < / code > . */
private v... | if ( node . getId ( ) != JJTCOMPARISONEXPR ) { throw new IllegalArgumentException ( "node must be of type ComparisonExpr" ) ; } // get operation type
String opType = node . getValue ( ) ; int type = 0 ; if ( opType . equals ( OP_EQ ) ) { type = RelationQueryNode . OPERATION_EQ_VALUE ; } else if ( opType . equals ( OP_S... |
public class Config { /** * Read config object stored in JSON format from < code > InputStream < / code >
* @ param inputStream object
* @ return config
* @ throws IOException error */
public static Config fromJSON ( InputStream inputStream ) throws IOException { } } | ConfigSupport support = new ConfigSupport ( ) ; return support . fromJSON ( inputStream , Config . class ) ; |
public class DoubleTupleCollections { /** * Create the specified number of tuples with the given dimensions
* ( { @ link Tuple # getSize ( ) size } ) , all initialized to zero , and place
* them into the given target collection
* @ param dimensions The dimensions ( { @ link Tuple # getSize ( ) size } )
* of the... | for ( int i = 0 ; i < numElements ; i ++ ) { target . add ( DoubleTuples . create ( dimensions ) ) ; } |
public class ElementPlugin { /** * Notify listeners of plugin events .
* @ param event The plugin event containing the action . */
@ EventHandler ( "action" ) private void onAction ( PluginEvent event ) { } } | PluginException exception = null ; PluginAction action = event . getAction ( ) ; boolean debug = log . isDebugEnabled ( ) ; if ( pluginEventListeners1 != null ) { for ( IPluginEvent listener : new ArrayList < > ( pluginEventListeners1 ) ) { try { if ( debug ) { log . debug ( "Invoking IPluginEvent.on" + WordUtils . cap... |
public class BuilderImpl { /** * ( non - Javadoc )
* @ see com . ibm . ws . security . jwt . internal . Builder # audience ( java . util . List ) */
@ Override public Builder audience ( List < String > newaudiences ) throws InvalidClaimException { } } | // this . AUDIENCE
if ( newaudiences != null && ! newaudiences . isEmpty ( ) ) { ArrayList < String > audiences = new ArrayList < String > ( ) ; for ( String aud : newaudiences ) { if ( aud != null && ! aud . trim ( ) . isEmpty ( ) && ! audiences . contains ( aud ) ) { audiences . add ( aud ) ; } } if ( audiences . isE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.