signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class SearchQueryParser { /** * / * Create a FieldValue for the query field from the string value .
* We try to convert the value types according to the data type of the query field . */
@ VisibleForTesting FieldValue createFieldValue ( SearchQueryField field , String quotedStringValue , boolean negate ) { } } | // Make sure there are no quotes in the value ( e . g . ` " foo " ' - - > ` foo ' )
final String value = quotedStringValue . replaceAll ( QUOTE_REPLACE_REGEX , "" ) ; final SearchQueryField . Type fieldType = field . getFieldType ( ) ; final Pair < String , SearchQueryOperator > pair = extractOperator ( value , fieldTy... |
public class StandardDirectoryAgentServer { /** * Handles a unicast TCP SrvRqst message arrived to this directory agent .
* < br / >
* This directory agent will reply with a list of matching services .
* @ param srvRqst the SrvRqst message to handle
* @ param socket the socket connected to th client where to wr... | // Match scopes , RFC 2608 , 11.1
if ( ! scopes . weakMatch ( srvRqst . getScopes ( ) ) ) { tcpSrvRply . perform ( socket , srvRqst , SLPError . SCOPE_NOT_SUPPORTED ) ; return ; } ServiceType serviceType = srvRqst . getServiceType ( ) ; List < ServiceInfo > matchingServices = matchServices ( serviceType , srvRqst . get... |
public class ConfluenceGreenPepper { /** * Retrieves the previous implemented version of the specification .
* @ param page a { @ link com . atlassian . confluence . pages . Page } object .
* @ return the previous implemented version of the specification . */
public Integer getPreviousImplementedVersion ( Page page... | ContentEntityObject entityObject = getContentEntityManager ( ) . getById ( page . getId ( ) ) ; String value = getContentPropertyManager ( ) . getStringProperty ( entityObject , PREVIOUS_IMPLEMENTED_VERSION ) ; return value == null ? null : Integer . valueOf ( value ) ; |
public class ControlDecisionExpectedImpl { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . mfp . control . ControlDecisionExpected # getTick ( ) */
public final long [ ] getTick ( ) { } } | List < Long > list = ( List < Long > ) jmo . getField ( ControlAccess . BODY_DECISIONEXPECTED_TICK ) ; long lists [ ] = new long [ list . size ( ) ] ; for ( int i = 0 ; i < lists . length ; i ++ ) lists [ i ] = list . get ( i ) . longValue ( ) ; return lists ; |
public class SSLComponent { /** * Process configuration information .
* @ param properties */
private synchronized void processConfig ( boolean updateSSLConfigManager ) { } } | if ( componentContext == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Not yet activated, can not process config" ) ; } return ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Processing configuration " + updat... |
public class CmafEncryptionMarshaller { /** * Marshall the given parameter object . */
public void marshall ( CmafEncryption cmafEncryption , ProtocolMarshaller protocolMarshaller ) { } } | if ( cmafEncryption == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( cmafEncryption . getKeyRotationIntervalSeconds ( ) , KEYROTATIONINTERVALSECONDS_BINDING ) ; protocolMarshaller . marshall ( cmafEncryption . getSpekeKeyProvider ( ) , SPE... |
public class Clahe { /** * This effect deals with OneBandSource and Binary MatrixSource
* @ param source
* @ return image */
@ Override public ImageSource apply ( ImageSource source ) { } } | int width = source . getWidth ( ) ; int height = source . getHeight ( ) ; int [ ] [ ] result = new int [ height ] [ width ] ; if ( source . isGrayscale ( ) ) { for ( int i = 0 ; i < height ; i ++ ) { int iMin = Math . max ( 0 , i - blockRadius ) ; int iMax = Math . min ( height , i + blockRadius + 1 ) ; int h = iMax - ... |
public class TapStream { /** * Check if all operations in the TapStream are completed .
* @ return true if all operations currently in the TapStream are completed */
public boolean isCompleted ( ) { } } | for ( TapOperation op : ops ) { if ( ! op . getState ( ) . equals ( OperationState . COMPLETE ) ) { return false ; } } return true ; |
public class WebSocketController { /** * tag : : publish [ ] */
@ OnMessage ( "/echo-all" ) public void echoAll ( @ Body String message ) { } } | logger ( ) . info ( "Message received : {}" , message ) ; publisher . publish ( "/echo-all" , message . toUpperCase ( ) ) ; |
public class AbstractNlsTemplate { /** * This method creates an { @ link NlsMessageFormatter } for the given { @ code messageTemplate } and { @ code locale } .
* @ param messageTemplate is the template of the message for the given { @ code locale } .
* @ param locale is the locale to use . The implementation may ig... | return nlsDependencies . getMessageFormatterFactory ( ) . create ( messageTemplate ) ; |
public class JSFormatter { /** * Produces { @ link IJSGeneratable } s separated by ' , '
* @ param aCont
* contained of { @ link IJSGeneratable }
* @ return this */
@ Nonnull public JSFormatter generatable ( @ Nonnull final Iterable < ? extends IJSGeneratable > aCont ) { } } | boolean bFirst = true ; for ( final IJSGeneratable aItem : aCont ) { if ( bFirst ) bFirst = false ; else plain ( ',' ) ; generatable ( aItem ) ; } return this ; |
public class ConfigImpl { /** * / * ( non - Javadoc )
* @ see com . ibm . jaggr . service . options . IOptionsListener # optionsUpdated ( com . ibm . jaggr . service . options . IOptions , long ) */
@ Override public void optionsUpdated ( IOptions options , long sequence ) { } } | Context cx = Context . enter ( ) ; try { Scriptable jsOptions = cx . newObject ( sharedScope ) ; Map < String , String > optionsMap = options . getOptionsMap ( ) ; for ( Map . Entry < String , String > entry : optionsMap . entrySet ( ) ) { Object value = Context . javaToJS ( entry . getValue ( ) , sharedScope ) ; Scrip... |
public class TangoAttribute { /** * Read attribute and return result as array .
* @ param type
* The requested output type , is the component type ( double ,
* Double . . . ) .
* @ return
* @ throws DevFailed */
public < T > Object readArray ( final Class < T > type ) throws DevFailed { } } | update ( ) ; return extractArray ( type ) ; |
public class DestructuringGlobalNameExtractor { /** * Adds the new assign or name declaration after the original assign or name declaration */
private static void addAfter ( Node originalLvalue , Node newLvalue , Node newRvalue ) { } } | Node parent = originalLvalue . getParent ( ) ; if ( parent . isAssign ( ) ) { // create ` ( < originalLvalue = . . . > , < newLvalue = newRvalue > ) `
Node newAssign = IR . assign ( newLvalue , newRvalue ) . srcref ( parent ) ; Node newComma = new Node ( Token . COMMA , newAssign ) ; parent . replaceWith ( newComma ) ;... |
public class WxApi2Impl { /** * 二维码API */
@ Override public WxResp qrcode_create ( Object scene_id , int expire_seconds ) { } } | NutMap params = new NutMap ( ) ; NutMap scene ; // 临时二维码
if ( expire_seconds > 0 ) { params . put ( "expire_seconds" , expire_seconds ) ; // 临时整型二维码
if ( scene_id instanceof Number ) { params . put ( "action_name" , "QR_SCENE" ) ; scene = Lang . map ( "scene_id" , Castors . me ( ) . castTo ( scene_id , Integer . class ... |
public class Reductions { /** * Reduces an iterator of elements using the passed function .
* @ param < E > the element type parameter
* @ param < R > the result type parameter
* @ param iterator the iterator to be consumed
* @ param function the reduction function
* @ param init the initial value for reducti... | return new Reductor < > ( function , init ) . apply ( iterator ) ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link CurvePropertyType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link CurvePropertyType } { @ code >... | return new JAXBElement < CurvePropertyType > ( _CurveProperty_QNAME , CurvePropertyType . class , null , value ) ; |
public class ClustersInner { /** * Update a Kusto cluster .
* @ param resourceGroupName The name of the resource group containing the Kusto cluster .
* @ param clusterName The name of the Kusto cluster .
* @ param parameters The Kusto cluster parameters supplied to the Update operation .
* @ throws IllegalArgum... | return beginUpdateWithServiceResponseAsync ( resourceGroupName , clusterName , parameters ) . map ( new Func1 < ServiceResponse < ClusterInner > , ClusterInner > ( ) { @ Override public ClusterInner call ( ServiceResponse < ClusterInner > response ) { return response . body ( ) ; } } ) ; |
public class CharsetDetector { /** * Set the input text ( byte ) data whose charset is to be detected .
* The input stream that supplies the character data must have markSupported ( )
* = = true ; the charset detection process will read a small amount of data ,
* then return the stream to its original position vi... | fInputStream = in ; fInputStream . mark ( kBufSize ) ; fRawInput = new byte [ kBufSize ] ; // Always make a new buffer because the
// previous one may have come from the caller ,
// in which case we can ' t touch it .
fRawLength = 0 ; int remainingLength = kBufSize ; while ( remainingLength > 0 ) { // read ( ) may give... |
public class QueryReferenceBroker { /** * retrieves an Object reference by its Identity .
* < br >
* If there is a Proxy - class is defined in the ReferenceDescriptor or
* if the ReferenceDescriptor is lazy , a Proxy - object is returned .
* < br >
* If no Proxy - class is defined , a getObjectByIdentity ( . ... | Class baseClassForProxy ; if ( rds . isLazy ( ) ) { /* arminw :
use real reference class instead of the top - level class ,
because we want to use a proxy representing the real class
not only the top - level class - right ? */
// referencedProxy = getClassDescriptor ( referencedClass ) . getDynamicProxyClass ( ) ... |
public class StringUtilities { /** * Get the minimum number of operations required to get from one string to another using the Damerau - Levenshtein distance algorithm
* Note : Java implementation of the C # algorithm from https : / / en . wikipedia . org / wiki / Damerau % E2%80%93Levenshtein _ distance
* @ param ... | if ( source == null || source . isEmpty ( ) ) { if ( target == null || target . isEmpty ( ) ) { return 0 ; } else { return target . length ( ) ; } } else if ( target == null || target . isEmpty ( ) ) { return source . length ( ) ; } int [ ] [ ] score = new int [ source . length ( ) + 2 ] [ target . length ( ) + 2 ] ; i... |
public class FieldPropertyExtractor { /** * { @ inheritDoc } */
public Map < String , PropertyWrapper > extractProperties ( Class < ? > clazz ) { } } | Map < String , PropertyWrapper > map = new LinkedHashMap < > ( ) ; extractProperties0 ( clazz , map ) ; return map ; |
public class PageOverlayConditionalProcessingImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setLevel ( Integer newLevel ) { } } | Integer oldLevel = level ; level = newLevel ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . PAGE_OVERLAY_CONDITIONAL_PROCESSING__LEVEL , oldLevel , level ) ) ; |
public class GetDatabasesRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetDatabasesRequest getDatabasesRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getDatabasesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDatabasesRequest . getCatalogId ( ) , CATALOGID_BINDING ) ; protocolMarshaller . marshall ( getDatabasesRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protoco... |
public class Base64 { /** * This method encodes the byte array into a char array in base 64 according to the specification given by the RFC
* 1521 ( 5.2 ) .
* @ param data
* the encoded char array
* @ return the byte array that needs to be encoded */
public static byte [ ] encode ( byte [ ] data ) { } } | int sourceChunks = data . length / 3 ; int len = ( data . length + 2 ) / 3 * 4 ; byte [ ] result = new byte [ len ] ; int extraBytes = data . length - sourceChunks * 3 ; // Each 4 bytes of input ( encoded ) we end up with 3 bytes of output
int dataIndex = 0 ; int resultIndex = 0 ; int allBits = 0 ; for ( int i = 0 ; i ... |
public class SvdlibcSparseBinaryFileRowIterator { /** * { @ inheritDoc } */
public SparseDoubleVector next ( ) { } } | if ( next == null ) throw new NoSuchElementException ( "No futher entries" ) ; SparseDoubleVector curCol = next ; try { advance ( ) ; } catch ( IOException ioe ) { throw new IOError ( ioe ) ; } return curCol ; |
public class SynchroReader { /** * Extract predecessor data . */
private void processPredecessors ( ) { } } | for ( Map . Entry < Task , List < MapRow > > entry : m_predecessorMap . entrySet ( ) ) { Task task = entry . getKey ( ) ; List < MapRow > predecessors = entry . getValue ( ) ; for ( MapRow predecessor : predecessors ) { processPredecessor ( task , predecessor ) ; } } |
public class AttributeHelper { /** * Extract data from DeviceAttribute to a String
* @ param deviceAttributeRead
* the DeviceAttribute attribute to read
* @ return String , the result in String format
* @ throws DevFailed */
public static String extractToString ( final DeviceAttribute deviceAttributeRead ) thro... | final Object value = AttributeHelper . extract ( deviceAttributeRead ) ; String argout = null ; if ( value instanceof Short ) { argout = ( ( Short ) value ) . toString ( ) ; } else if ( value instanceof String ) { argout = ( String ) value ; } else if ( value instanceof Integer ) { argout = ( ( Integer ) value ) . toSt... |
public class MutableRoaringBitmap { /** * Add the value if it is not already present , otherwise remove it .
* @ param x integer value */
public void flip ( final int x ) { } } | final short hb = BufferUtil . highbits ( x ) ; final int i = highLowContainer . getIndex ( hb ) ; if ( i >= 0 ) { MappeableContainer c = highLowContainer . getContainerAtIndex ( i ) ; c = c . flip ( BufferUtil . lowbits ( x ) ) ; if ( ! c . isEmpty ( ) ) { ( ( MutableRoaringArray ) highLowContainer ) . setContainerAtIn... |
public class MetaFileHandler { /** * Remove a file from ~ / . fscrawler / { subdir } dir
* @ param subdir subdir where we can read the file ( null if we read in the root dir )
* @ param filename filename
* @ throws IOException in case of error while reading */
protected void removeFile ( String subdir , String fi... | Path dir = root ; if ( subdir != null ) { dir = dir . resolve ( subdir ) ; } Files . deleteIfExists ( dir . resolve ( filename ) ) ; |
public class Server { /** * Creates the default HTTP server ( listening on port 9000 / ` http . port ` ) , no SSL , no mutual authentication ,
* accept all requests .
* @ param accessor the service accessor
* @ param vertx the vertx singleton
* @ return the configured server ( not bound , not started ) */
publi... | return new Server ( accessor , vertx , "default-http" , accessor . getConfiguration ( ) . getIntegerWithDefault ( "http.port" , 9000 ) , false , false , null , Collections . < String > emptyList ( ) , Collections . < String > emptyList ( ) , null ) ; |
public class MessageInteraction { /** * Create a MessageInteractionReader to execute read .
* @ param pathServiceSid The SID of the Service to read the resource from
* @ param pathSessionSid The SID of the parent Session
* @ param pathParticipantSid The SID of the Participant resource
* @ return MessageInteract... | return new MessageInteractionReader ( pathServiceSid , pathSessionSid , pathParticipantSid ) ; |
public class AbstractJpaTenantAwareBaseEntity { /** * PrePersist listener method for all { @ link TenantAwareBaseEntity }
* entities . */
@ PrePersist void prePersist ( ) { } } | // before persisting the entity check the current ID of the tenant by
// using the TenantAware
// service
final String currentTenant = SystemManagementHolder . getInstance ( ) . currentTenant ( ) ; if ( currentTenant == null ) { throw new TenantNotExistException ( "Tenant " + TenantAwareHolder . getInstance ( ) . getTe... |
public class OutboundCookiesHandler { /** * Sets the session cookie to the current HttpServerExchange
* @ param exchange The Undertow HttpServerExchange */
protected void setSessionCookie ( HttpServerExchange exchange ) { } } | Session session = this . attachment . getSession ( ) ; if ( session . isInvalid ( ) ) { Cookie cookie = new CookieImpl ( this . config . getSessionCookieName ( ) ) . setSecure ( this . config . isSessionCookieSecure ( ) ) . setHttpOnly ( true ) . setPath ( "/" ) . setMaxAge ( 0 ) . setSameSite ( true ) . setSameSiteMod... |
public class ApiOvhDbaasqueue { /** * Get a key
* REST : GET / dbaas / queue / { serviceName } / key / { keyId }
* @ param serviceName [ required ] Application ID
* @ param keyId [ required ] Key ID
* API beta */
public OvhKey serviceName_key_keyId_GET ( String serviceName , String keyId ) throws IOException { ... | String qPath = "/dbaas/queue/{serviceName}/key/{keyId}" ; StringBuilder sb = path ( qPath , serviceName , keyId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhKey . class ) ; |
public class DescribePublicIpv4PoolsResult { /** * Information about the address pools .
* @ return Information about the address pools . */
public java . util . List < PublicIpv4Pool > getPublicIpv4Pools ( ) { } } | if ( publicIpv4Pools == null ) { publicIpv4Pools = new com . amazonaws . internal . SdkInternalList < PublicIpv4Pool > ( ) ; } return publicIpv4Pools ; |
public class StyleCache { /** * Set the feature style into the polyline options
* @ param polylineOptions polyline options
* @ param featureStyle feature style
* @ return true if style was set into the polyline options */
public boolean setFeatureStyle ( PolylineOptions polylineOptions , FeatureStyle featureStyle... | return StyleUtils . setFeatureStyle ( polylineOptions , featureStyle , density ) ; |
public class JacksonJsonHandler { /** * { @ inheritDoc } */
@ Override public Map < String , Object > readJson ( Reader reader ) throws IOException { } } | // Issue # 99 : Take a look at better dealing with root Map < > vs root List < > in the response .
// We are expecting this isn ' t called on nested nodes in a recursive manner .
JsonNode rootNode = mapper . readTree ( reader ) ; Map < String , Object > rootMap = null ; // If we try to parse an empty string or invalid ... |
public class CommerceSubscriptionEntryPersistenceImpl { /** * Returns the last commerce subscription entry in the ordered set where subscriptionStatus = & # 63 ; .
* @ param subscriptionStatus the subscription status
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code ... | int count = countBySubscriptionStatus ( subscriptionStatus ) ; if ( count == 0 ) { return null ; } List < CommerceSubscriptionEntry > list = findBySubscriptionStatus ( subscriptionStatus , count - 1 , count , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ; |
public class DoublePropertyAssert { /** * Verifies that the actual observable number has a value that is close to the given one by less then the given offset .
* @ param expectedValue the given value to compare the actual observables value to .
* @ param offset the given positive offset .
* @ return { @ code this... | new ObservableNumberValueAssertions ( actual ) . hasValue ( expectedValue , offset ) ; return this ; |
public class JobContext { /** * Get a { @ link Map } from dataset URNs ( as being specified by { @ link ConfigurationKeys # DATASET _ URN _ KEY } to
* { @ link JobState . DatasetState } objects that represent the dataset states and store { @ link TaskState } s
* corresponding to the datasets .
* @ see JobState # ... | return ImmutableMap . copyOf ( this . datasetStatesByUrns . or ( Maps . < String , JobState . DatasetState > newHashMap ( ) ) ) ; |
public class GenericHibernateDao { /** * Unproxy the entity ( and eagerly fetch properties ) . */
@ SuppressWarnings ( "unchecked" ) public E unproxy ( E e ) { } } | if ( e == null ) { throw new NullPointerException ( "Entity passed for initialization is null" ) ; } Hibernate . initialize ( e ) ; if ( e instanceof HibernateProxy ) { e = ( E ) ( ( HibernateProxy ) e ) . getHibernateLazyInitializer ( ) . getImplementation ( ) ; } return e ; |
public class AbstractFilteredDataStream { /** * Apply the filters .
* @ param row The row to filter .
* @ return The filtered row . */
public final Map < String , Object > applyFilters ( final Map < String , Object > row ) { } } | Map < String , Object > filteringRow = new LinkedHashMap < > ( row ) ; assertFilterListExists ( ) ; for ( IDataFilter filter : getFilters ( ) ) { filteringRow = filter . apply ( filteringRow ) ; } return filteringRow ; |
public class PaginationDto { /** * Returns the first pagination link .
* @ return the first pagination link */
@ XmlElement ( name = "firstPageLink" ) @ JsonProperty ( value = "firstPageLink" ) @ ApiModelProperty ( value = "The first pagination link." , position = 1 ) public PageRequestLinkDto getFirstPageLink ( ) { ... | return firstPageLink ; |
public class ManifestCleanerDriver { /** * ( non - Javadoc )
* @ see
* org . duracloud . mill . util . DriverSupport # executeImpl ( org . apache . commons .
* cli . CommandLine ) */
@ Override protected void executeImpl ( CommandLine cmd ) { } } | try { List < PropertyDefinition > defintions = new PropertyDefinitionListBuilder ( ) . addMillDb ( ) . addManifestExpirationDate ( ) . build ( ) ; PropertyVerifier verifier = new PropertyVerifier ( defintions ) ; verifier . verify ( System . getProperties ( ) ) ; String time = System . getProperty ( ConfigConstants . M... |
public class InternalXbaseParser { /** * InternalXbase . g : 1675:1 : ruleJvmParameterizedTypeReference : ( ( rule _ _ JvmParameterizedTypeReference _ _ Group _ _ 0 ) ) ; */
public final void ruleJvmParameterizedTypeReference ( ) throws RecognitionException { } } | int stackSize = keepStackSize ( ) ; try { // InternalXbase . g : 1679:2 : ( ( ( rule _ _ JvmParameterizedTypeReference _ _ Group _ _ 0 ) ) )
// InternalXbase . g : 1680:2 : ( ( rule _ _ JvmParameterizedTypeReference _ _ Group _ _ 0 ) )
{ // InternalXbase . g : 1680:2 : ( ( rule _ _ JvmParameterizedTypeReference _ _ Gro... |
public class ExtensionsInner { /** * Enables the Operations Management Suite ( OMS ) on the HDInsight cluster .
* @ param resourceGroupName The name of the resource group .
* @ param clusterName The name of the cluster .
* @ param parameters The Operations Management Suite ( OMS ) workspace parameters .
* @ thr... | beginEnableMonitoringWithServiceResponseAsync ( resourceGroupName , clusterName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class ConverterUtils { /** * Does cell of a given address copy from { @ link Sheet } to { @ link IDataModel } . */
static void copyCell ( ICellAddress address , Sheet from , IDataModel to ) { } } | if ( from == null ) { return ; } Row fromRow = from . getRow ( address . a1Address ( ) . row ( ) ) ; if ( fromRow == null ) { return ; } Cell fromCell = fromRow . getCell ( address . a1Address ( ) . column ( ) ) ; if ( fromCell == null ) { return ; } DmCell toCell = new DmCell ( ) ; toCell . setAddress ( address ) ; to... |
public class TaxinvoiceServiceImp { /** * ( non - Javadoc )
* @ see com . popbill . api . TaxinvoiceService # getMassPrintURL ( java . lang . String , com . popbill . api . taxinvoice . MgtKeyType , java . lang . String [ ] ) */
@ Override public String getMassPrintURL ( String CorpNum , MgtKeyType KeyType , String [... | return getMassPrintURL ( CorpNum , KeyType , MgtKeyList , null ) ; |
public class RequestLoggingFilter { public void init ( FilterConfig filterConfig ) throws ServletException { } } | this . config = filterConfig ; this . errorLogging = isBooleanParameter ( filterConfig , "errorLogging" , true ) ; setupExceptExtSet ( filterConfig ) ; setupExceptUrlPattern ( filterConfig ) ; setupRequestUriTitleUrlPattern ( filterConfig ) ; setupSubRequestUrlPatternUrlPattern ( filterConfig ) ; setupRequestCharacterE... |
public class Node { /** * Inserts the suffix at the given active point .
* @ param suffix The suffix to insert .
* @ param activePoint The active point to insert it at . */
@ SuppressWarnings ( "unchecked" ) void insert ( Suffix < T , S > suffix , ActivePoint < T , S > activePoint ) { } } | Object item = suffix . getEndItem ( ) ; if ( edges . containsKey ( item ) ) { if ( tree . isNotFirstInsert ( ) && activePoint . getNode ( ) != tree . getRoot ( ) ) tree . setSuffixLink ( activePoint . getNode ( ) ) ; activePoint . setEdge ( edges . get ( item ) ) ; activePoint . incrementLength ( ) ; } else { saveSeque... |
public class StringHelper { /** * Get the number of trailing white spaces according to
* { @ link Character # isWhitespace ( char ) }
* @ param s
* The string to be parsed . May be < code > null < / code > .
* @ return Always & ge ; 0. */
@ Nonnegative public static int getTrailingWhitespaceCount ( @ Nullable f... | int ret = 0 ; if ( s != null ) { int nLast = s . length ( ) - 1 ; while ( nLast >= 0 && Character . isWhitespace ( s . charAt ( nLast ) ) ) { ++ ret ; -- nLast ; } } return ret ; |
public class DataSourceInitialContextBinder { /** * Unbinds all data sources currently bound by this instance of this class .
* If successful , it then closes the { @ link InitialContext } .
* @ throws Exception if an error occurs during unbinding or closing . */
@ Override public void close ( ) throws Exception { ... | unbindAll ( ) ; initialContext . destroySubcontext ( "java:/comp/env/jdbc" ) ; initialContext . destroySubcontext ( "java:/comp/env" ) ; initialContext . destroySubcontext ( "java:/comp" ) ; initialContext . destroySubcontext ( "java:" ) ; initialContext . close ( ) ; |
public class MiscUtils { /** * for logging */
static String dateToStrTs ( long dateMs ) { } } | SimpleDateFormat df = new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss.SSS" ) ; return df . format ( new Date ( dateMs ) ) ; |
public class SummarizedAttackVectorMarshaller { /** * Marshall the given parameter object . */
public void marshall ( SummarizedAttackVector summarizedAttackVector , ProtocolMarshaller protocolMarshaller ) { } } | if ( summarizedAttackVector == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( summarizedAttackVector . getVectorType ( ) , VECTORTYPE_BINDING ) ; protocolMarshaller . marshall ( summarizedAttackVector . getVectorCounters ( ) , VECTORCOUNTER... |
public class ContextRuleAssistant { /** * Resolve bean class for the autowire rule .
* @ param autowireRule the autowire rule
* @ throws IllegalRuleException if an illegal rule is found */
public void resolveBeanClass ( AutowireRule autowireRule ) throws IllegalRuleException { } } | if ( autowireRule . getTargetType ( ) == AutowireTargetType . FIELD ) { if ( autowireRule . isRequired ( ) ) { Class < ? > [ ] types = autowireRule . getTypes ( ) ; String [ ] qualifiers = autowireRule . getQualifiers ( ) ; reserveBeanReference ( qualifiers [ 0 ] , types [ 0 ] , autowireRule ) ; } } else if ( autowireR... |
public class ConcurrentIntrusiveList { /** * Removes the given { @ code element } from the list .
* @ param element the element to remove .
* @ throws IllegalArgumentException if the element is not in the list . */
public synchronized void removeElement ( T element ) { } } | checkArgument ( element . getNext ( ) != null || element . getPrev ( ) != null || element == head , "Element not in the list." ) ; size -- ; T prev = element . getPrev ( ) ; T next = element . getNext ( ) ; if ( prev == null ) { // This is the first element
head = next ; if ( head != null ) { // If more than one elemen... |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcAlarmType ( ) { } } | if ( ifcAlarmTypeEClass == null ) { ifcAlarmTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 10 ) ; } return ifcAlarmTypeEClass ; |
public class ASMUtil { /** * Gibt ein uebergeordnetes Tag mit dem uebergebenen Full - Name ( Namespace und Name ) zurueck , falls
* ein solches existiert , andernfalls wird null zurueckgegeben .
* @ param el Startelement , von wo aus gesucht werden soll .
* @ param fullName Name des gesuchten Tags .
* @ return ... | Statement parent = stat ; Tag tag ; while ( true ) { parent = parent . getParent ( ) ; if ( parent == null ) return null ; if ( parent instanceof Tag ) { tag = ( Tag ) parent ; if ( tag . getFullname ( ) . equalsIgnoreCase ( fullName ) ) return tag ; } } |
public class FileSystem { /** * Replies the system shared library directory for the specified software .
* < p > On Unix operating systems , the system directory for a
* software is by default { @ code / usr / lib / software } where { @ code software }
* is the given parameter ( case - sensitive ) . On Windows & ... | final File f = getSystemSharedLibraryDirectoryFor ( software ) ; if ( f == null ) { return null ; } return f . getAbsolutePath ( ) ; |
public class CRDExample { /** * Example of Cluster and Namespaced scoped K8S Custom Resources .
* To test Cluster scoped resource use " - - cluster " as first argument .
* To test Namespaced resource provide namespace as first argument ( namespace must exists in K8S ) .
* @ param args Either " - - cluster " or na... | boolean resourceNamespaced = true ; String namespace = null ; if ( args . length > 0 ) { if ( "--cluster" . equals ( args [ 0 ] ) ) { resourceNamespaced = false ; } else { namespace = args [ 0 ] ; } } try ( final KubernetesClient client = new DefaultKubernetesClient ( ) ) { if ( resourceNamespaced ) { if ( namespace ==... |
public class StatsOptions { /** * Adds a field to the statistics to be requested .
* @ param field
* @ return */
public FieldStatsOptions addField ( Field field ) { } } | Assert . notNull ( field , "Field for statistics must not be 'null'." ) ; state . fields . add ( field ) ; return new FieldStatsOptions ( field , state ) ; |
public class Status { /** * Extract an error trailers from the causal chain of a { @ link Throwable } .
* @ return the trailers or { @ code null } if not found . */
@ ExperimentalApi ( "https://github.com/grpc/grpc-java/issues/4683" ) public static Metadata trailersFromThrowable ( Throwable t ) { } } | Throwable cause = checkNotNull ( t , "t" ) ; while ( cause != null ) { if ( cause instanceof StatusException ) { return ( ( StatusException ) cause ) . getTrailers ( ) ; } else if ( cause instanceof StatusRuntimeException ) { return ( ( StatusRuntimeException ) cause ) . getTrailers ( ) ; } cause = cause . getCause ( )... |
public class PeerEurekaNode { /** * Synchronize { @ link InstanceInfo } information if the timestamp between
* this node and the peer eureka nodes vary . */
private void syncInstancesIfTimestampDiffers ( String appName , String id , InstanceInfo info , InstanceInfo infoFromPeer ) { } } | try { if ( infoFromPeer != null ) { logger . warn ( "Peer wants us to take the instance information from it, since the timestamp differs," + "Id : {} My Timestamp : {}, Peer's timestamp: {}" , id , info . getLastDirtyTimestamp ( ) , infoFromPeer . getLastDirtyTimestamp ( ) ) ; if ( infoFromPeer . getOverriddenStatus ( ... |
public class TaskAPI { /** * Creates a new task with a reference to the given object .
* @ param task
* The data of the task to be created
* @ param reference
* The reference to the object the task should be attached to
* @ param silent
* Disable notifications
* @ param hook
* Execute hooks for the chan... | return getResourceFactory ( ) . getApiResource ( "/task/" + reference . getType ( ) . name ( ) . toLowerCase ( ) + "/" + reference . getId ( ) + "/" ) . queryParam ( "silent" , silent ? "1" : "0" ) . queryParam ( "hook" , hook ? "1" : "0" ) . entity ( task , MediaType . APPLICATION_JSON_TYPE ) . post ( TaskCreateRespon... |
public class AWSOpsWorksClient { /** * Updates a specified layer .
* < b > Required Permissions < / b > : To use this action , an IAM user must have a Manage permissions level for the stack ,
* or an attached policy that explicitly grants permissions . For more information on user permissions , see < a
* href = "... | request = beforeClientExecution ( request ) ; return executeUpdateLayer ( request ) ; |
public class CommerceOrderNotePersistenceImpl { /** * Returns a range of all the commerce order notes .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . ... | return findAll ( start , end , null ) ; |
public class CommonDataProvider { /** * Writes a success result
* @ param line
* The line number */
public void writeSuccessResult ( int line ) { } } | logger . debug ( "Write Success result => line:{}" , line ) ; writeValue ( resultColumnName , line , Messages . getMessage ( Messages . SUCCESS_MESSAGE ) ) ; |
public class JCommander { /** * Invoke Console . readPassword through reflection to avoid depending
* on Java 6. */
private char [ ] readPassword ( String description , boolean echoInput ) { } } | getConsole ( ) . print ( description + ": " ) ; return getConsole ( ) . readPassword ( echoInput ) ; |
public class StatisticsJDBCStorageConnection { /** * { @ inheritDoc } */
public List < ACLHolder > getACLHolders ( ) throws RepositoryException , IllegalStateException , UnsupportedOperationException { } } | Statistics s = ALL_STATISTICS . get ( GET_ACL_HOLDERS ) ; try { s . begin ( ) ; return wcs . getACLHolders ( ) ; } finally { s . end ( ) ; } |
public class AmazonCloudDirectoryClient { /** * Publishes a development schema with a major version and a recommended minor version .
* @ param publishSchemaRequest
* @ return Result of the PublishSchema operation returned by the service .
* @ throws InternalServiceException
* Indicates a problem that must be r... | request = beforeClientExecution ( request ) ; return executePublishSchema ( request ) ; |
public class ReadCommEventLogResponse { /** * getMessage - - format the message into a byte array .
* @ return Response as byte array */
public byte [ ] getMessage ( ) { } } | byte result [ ] = new byte [ events . length + 7 ] ; result [ 0 ] = ( byte ) ( byteCount = events . length + 6 ) ; result [ 1 ] = ( byte ) ( status >> 8 ) ; result [ 2 ] = ( byte ) ( status & 0xFF ) ; result [ 3 ] = ( byte ) ( eventCount >> 8 ) ; result [ 4 ] = ( byte ) ( eventCount & 0xFF ) ; result [ 5 ] = ( byte ) (... |
public class EglCore { /** * Creates an EGL surface associated with a Surface .
* If this is destined for MediaCodec , the EGLConfig should have the " recordable " attribute . */
public EGLSurface createWindowSurface ( Object surface ) { } } | if ( ! ( surface instanceof Surface ) && ! ( surface instanceof SurfaceTexture ) ) { throw new RuntimeException ( "invalid surface: " + surface ) ; } // Create a window surface , and attach it to the Surface we received .
int [ ] surfaceAttribs = { EGL14 . EGL_NONE } ; EGLSurface eglSurface = EGL14 . eglCreateWindowSur... |
public class FilteringBeanMap { /** * < p > from . < / p >
* @ param src a { @ link java . lang . Object } object .
* @ param pathProperties a { @ link ameba . message . internal . BeanPathProperties } object .
* @ return a { @ link java . lang . Object } object . */
public static Object from ( Object src , final... | return new Transformer ( ) { @ Override protected FilteringBeanMap onTransform ( Object obj ) { return new FilteringBeanMap < > ( obj , pathProperties ) ; } } . transform ( src ) ; |
public class StreamingWordsi { /** * { @ inheritDoc } */
public void processSpace ( Properties props ) { } } | final double mergeThreshold = .15 ; WorkQueue workQueue = WorkQueue . getWorkQueue ( ) ; Object key = workQueue . registerTaskGroup ( clusterMap . size ( ) ) ; // Iterate through all of the clusters and perform an agglomerative
// cluster over the learned word senses . If there is a reporter , the
// cluster assignment... |
public class Table { /** * Transform the table in a CSV ( with selected delimiter ) representation .
* @ return A String representation of the table , with the column names in the head . */
public String getRowsWithColumnsAndColumnsNamesAsString ( ) { } } | StringBuffer sb = new StringBuffer ( ) ; String lvColumnNames = getColumnNames ( ) ; if ( lvColumnNames . trim ( ) . length ( ) > 0 ) { sb . append ( lvColumnNames ) ; sb . append ( CsvParser . CRLF ) ; } sb . append ( getRowsWithColumnsAsString ( ) ) ; return sb . toString ( ) ; |
public class JSONUtils { /** * Finds out if n represents a BigInteger
* @ return true if n is instanceOf BigInteger or the literal value can be
* evaluated as a BigInteger */
private static boolean isBigInteger ( Number n ) { } } | if ( n instanceof BigInteger ) { return true ; } try { new BigInteger ( String . valueOf ( n ) ) ; return true ; } catch ( NumberFormatException e ) { return false ; } |
public class MarcFieldTransformer { /** * Tail ( appending ) mode .
* @ param marcField MARC field
* @ param key key for the MARC field
* @ param appendToThisField the MARC field to append to
* @ return transformed MARC field */
public MarcField tail ( MarcField marcField , String key , MarcField appendToThisFi... | if ( key == null ) { return marcField ; } MarcField newMarcField = appendToThisField ; if ( newMarcField == null ) { newMarcField = get ( key ) ; } if ( lastReceived != null ) { String lastKey = getTransformKey ( lastReceived ) ; if ( key . equals ( lastKey ) ) { repeatCounter ++ ; } else { repeatCounter = 0 ; } } last... |
public class XTreeHeader { /** * Writes this header to the specified file . Writes to file the integer values
* < code > version < / code > , < code > pageSize < / code > , { @ link # dirCapacity } ,
* { @ link # leafCapacity } , { @ link # dirMinimum } , { @ link # leafMinimum } ,
* { @ link # min _ fanout } , {... | super . writeHeader ( file ) ; file . writeInt ( min_fanout ) ; file . writeLong ( num_elements ) ; file . writeInt ( dimensionality ) ; file . writeFloat ( max_overlap ) ; file . writeLong ( supernode_offset ) ; |
public class CmsPublishQueue { /** * Returns the next publish job to be published , removing it
* from the queue , or < code > null < / code > if the queue is empty . < p >
* @ return the next publish job to be published */
protected CmsPublishJobInfoBean next ( ) { } } | CmsPublishJobInfoBean publishJob = OpenCms . getMemoryMonitor ( ) . getFirstCachedPublishJob ( ) ; if ( publishJob != null ) { OpenCms . getMemoryMonitor ( ) . uncachePublishJob ( publishJob ) ; } return publishJob ; |
public class ExtendedMockito { /** * Common implementation of verification of static method calls .
* @ param method The static method call to be verified
* @ param mode The verification mode
* @ param instanceInOrder If set , the { @ link StaticInOrder } object */
@ SuppressWarnings ( { } } | "CheckReturnValue" , "MockitoUsage" , "unchecked" } ) static void verifyInt ( MockedVoidMethod method , VerificationMode mode , InOrder instanceInOrder ) { if ( onMethodCallDuringVerification . get ( ) != null ) { throw new IllegalStateException ( "Verification is already in progress on this " + "thread." ) ; } ArrayLi... |
public class StreamSet { /** * Set an element in the stream array
* @ param priority
* @ param reliability
* @ param stream
* @ throws SIResourceException */
protected void setStream ( int priority , Reliability reliability , Stream stream ) throws SIResourceException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setStream" , new Object [ ] { new Integer ( priority ) , reliability , stream } ) ; ReliabilitySubset subset = getSubset ( reliability ) ; subset . setStream ( priority , stream ) ; if ( TraceComponent . isAnyTracingEnabled... |
public class GetIdentityPoolConfigurationRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetIdentityPoolConfigurationRequest getIdentityPoolConfigurationRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getIdentityPoolConfigurationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getIdentityPoolConfigurationRequest . getIdentityPoolId ( ) , IDENTITYPOOLID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Un... |
public class PrimitiveDataChecksum { /** * Note : leaves the checksum untouched if given value is null ( provide a special value for stronger hashing ) . */
public void updateUtf8 ( String [ ] strings ) { } } | if ( strings != null ) { for ( String string : strings ) { updateUtf8 ( string ) ; } } |
public class HelixUtils { /** * We have switched from Helix JobQueue to WorkFlow based job execution . */
@ Deprecated public static void submitJobToQueue ( JobConfig . Builder jobConfigBuilder , String queueName , String jobName , TaskDriver helixTaskDriver , HelixManager helixManager , long jobQueueDeleteTimeoutSecon... | submitJobToWorkFlow ( jobConfigBuilder , queueName , jobName , helixTaskDriver , helixManager , jobQueueDeleteTimeoutSeconds ) ; |
public class Sorter { /** * Sorts the tests in < code > target < / code > using < code > comparator < / code > .
* @ since 4.0 */
@ Override public void apply ( Object target ) { } } | /* * Note that all runners that are Orderable are also Sortable ( because
* Orderable extends Sortable ) . Sorting is more efficient than ordering ,
* so we override the parent behavior so we sort instead . */
if ( target instanceof Sortable ) { Sortable sortable = ( Sortable ) target ; sortable . sort ( this ) ; } |
public class DictionaryFactory { /** * create a new ADictionary instance
* @ param _ class
* @ return ADictionary */
public static ADictionary createDictionary ( Class < ? extends ADictionary > _class , Class < ? > [ ] paramType , Object [ ] args ) { } } | try { Constructor < ? > cons = _class . getConstructor ( paramType ) ; return ( ( ADictionary ) cons . newInstance ( args ) ) ; } catch ( Exception e ) { System . err . println ( "can't create the ADictionary instance " + "with classpath [" + _class . getName ( ) + "]" ) ; e . printStackTrace ( ) ; } return null ; |
public class ReadWriteTypeExtractor { /** * Count the number of matching fields . That is , fields with the same name .
* @ param lhsFields
* @ param rhsFields
* @ return */
protected static int countMatchingFields ( Tuple < ? extends SemanticType . Field > lhsFields , Tuple < ? extends SemanticType . Field > rhs... | int count = 0 ; for ( int i = 0 ; i != lhsFields . size ( ) ; ++ i ) { for ( int j = 0 ; j != rhsFields . size ( ) ; ++ j ) { SemanticType . Field lhsField = lhsFields . get ( i ) ; SemanticType . Field rhsField = rhsFields . get ( j ) ; Identifier lhsFieldName = lhsField . getName ( ) ; Identifier rhsFieldName = rhsFi... |
public class VaultsInner { /** * Permanently deletes the specified vault . aka Purges the deleted Azure key vault .
* @ param vaultName The name of the soft - deleted vault .
* @ param location The location of the soft - deleted vault .
* @ throws IllegalArgumentException thrown if parameters fail the validation ... | return purgeDeletedWithServiceResponseAsync ( vaultName , location ) . map ( new Func1 < ServiceResponse < Void > , Void > ( ) { @ Override public Void call ( ServiceResponse < Void > response ) { return response . body ( ) ; } } ) ; |
public class ProxyInvocation { /** * < p > Creates a new instance of { @ link ProxyInvocation } which models a command for request invocation
* on the proxy of an endpoint definition . < / p >
* @ param template
* the instance of { @ link ProxyInvocation . Template } which defines the stages in invocation
* < b... | return new ProxyInvocation ( InvocationContext . newBuilder ( ) . setEndpoint ( template . endpoint ) . setProxy ( proxy ) . setRequest ( method ) . setArguments ( args ) . build ( ) , template ) ; |
public class CurrentAndFlatListHolder { /** * Returns in a { @ link ListHolder } all the T elements that are present in the
* current node ' s ancestors , up to the root node . */
public SimpleListHolder < T > getFlatAbove ( ) { } } | if ( flatAbove == null ) { flatAbove = newSimpleListHolder ( above , getSortProperty ( ) ) ; } return flatAbove ; |
public class DoubleChromosome { /** * Create a new { @ code DoubleChromosome } with the given genes .
* @ since 4.3
* @ param genes the genes of the chromosome .
* @ return a new chromosome with the given genes .
* @ throws NullPointerException if the given { @ code genes } are { @ code null }
* @ throws Ille... | final ISeq < DoubleGene > values = ISeq . of ( genes ) ; checkGeneRange ( values . stream ( ) . map ( DoubleGene :: range ) ) ; return new DoubleChromosome ( values , IntRange . of ( values . length ( ) ) ) ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcObjective ( ) { } } | if ( ifcObjectiveEClass == null ) { ifcObjectiveEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 392 ) ; } return ifcObjectiveEClass ; |
public class SimpleArangoRepository { /** * Finds one document which matches the given example object
* @ param example
* example object to construct query with
* @ param < S >
* @ return An object representing the example if it exists , else null */
@ Override public < S extends T > Optional < S > findOne ( fi... | final ArangoCursor cursor = findAllInternal ( ( Pageable ) null , example , new HashMap ( ) ) ; return cursor . hasNext ( ) ? Optional . ofNullable ( ( S ) cursor . next ( ) ) : Optional . empty ( ) ; |
public class WebSockets { /** * Sends a complete text message , invoking the callback when complete
* @ param message The text to send
* @ param wsChannel The web socket channel */
public static void sendTextBlocking ( final String message , final WebSocketChannel wsChannel ) throws IOException { } } | final ByteBuffer data = ByteBuffer . wrap ( message . getBytes ( StandardCharsets . UTF_8 ) ) ; sendBlockingInternal ( data , WebSocketFrameType . TEXT , wsChannel ) ; |
public class GroupsApi { /** * Gets a list of users in a group .
* Retrieves a list of users in a group .
* @ param accountId The external account number ( int ) or account ID Guid . ( required )
* @ param groupId The ID of the group being accessed . ( required )
* @ param options for modifying the method behav... | Object localVarPostBody = "{}" ; // verify the required parameter ' accountId ' is set
if ( accountId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'accountId' when calling listGroupUsers" ) ; } // verify the required parameter ' groupId ' is set
if ( groupId == null ) { throw new ApiExcept... |
public class AsynchronousRequest { /** * For more info on Skills API go < a href = " https : / / wiki . guildwars2 . com / wiki / API : 2 / skills " > here < / a > < br / >
* Give user the access to { @ link Callback # onResponse ( Call , Response ) } and { @ link Callback # onFailure ( Call , Throwable ) } methods f... | gw2API . getAllSkillIDs ( ) . enqueue ( callback ) ; |
public class FilterBasedTriggeringPolicy { /** * { @ inheritDoc } */
public boolean parseUnrecognizedElement ( final Element element , final Properties props ) throws Exception { } } | final String nodeName = element . getNodeName ( ) ; if ( "filter" . equals ( nodeName ) ) { OptionHandler filter = org . apache . log4j . extras . DOMConfigurator . parseElement ( element , props , Filter . class ) ; if ( filter instanceof Filter ) { filter . activateOptions ( ) ; this . addFilter ( ( Filter ) filter )... |
public class TimerSupport { /** * return tick observable for each user , user should handle the observable with cell ' s lifecycle
* @ param interval timer interval , in TimeUnit . SECOND
* @ param intermediate true , get event immediately
* @ return
* @ since 3.0.0 */
public Observable < Long > getTickObservab... | return Observable . interval ( intermediate ? 0 : interval , interval , TimeUnit . SECONDS ) ; |
public class RandomNormal { /** * Compute the next randomn value using the polar algorithm .
* Requires two uniformly - distributed random values in [ - 1 , + 1 ) .
* Actually computes two random values and saves the second one
* for the next invokation . */
public float nextPolar ( ) { } } | // If there ' s a saved value , return it .
if ( haveNextPolar ) { haveNextPolar = false ; return nextPolar ; } float u1 , u2 , r ; // point coordinates and their radius
do { // u1 and u2 will be uniformly - distributed
// random values in [ - 1 , + 1 ) .
u1 = 2 * gen . nextFloat ( ) - 1 ; u2 = 2 * gen . nextFloat ( ) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.