signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class OpenPgpContact { /** * Return a { @ link Set } of { @ link OpenPgpV4Fingerprint } s of all keys of the contact , which have the trust state * { @ link OpenPgpStore . Trust # untrusted } . * @ return untrusted fingerprints * @ throws IOException IO error * @ throws PGPException PGP error */ public S...
return getFingerprintsOfKeysWithState ( getAnyPublicKeys ( ) , OpenPgpTrustStore . Trust . untrusted ) ;
public class Entity { /** * Returns a list of this entity instances with null from and count and with * the given filter * @ param ctx The context * @ param filter The filter * @ return The list * @ throws PMException */ public List < ? > getList ( PMContext ctx , EntityFilter filter ) throws PMException { } ...
return getList ( ctx , filter , null , null , null ) ;
public class CommerceWarehouseItemUtil { /** * Returns the last commerce warehouse item in the ordered set where commerceWarehouseId = & # 63 ; . * @ param commerceWarehouseId the commerce warehouse ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ retur...
return getPersistence ( ) . fetchByCommerceWarehouseId_Last ( commerceWarehouseId , orderByComparator ) ;
public class SyncCommand { /** * Serializes the given object into the given writer . The following format will * be used to serialize objects . The first two characters are the type index , see * typeMap above . After that , a single digit that indicates the length of the following * length field follows . After ...
outputStream . writeInt ( data . length ) ; outputStream . write ( data ) ; outputStream . flush ( ) ;
public class V1InstanceCreator { /** * Create a new schedule entity with a name , iteration length , and iteration gap * @ param name Name of the new schedule * @ param iterationLength The duration an iteration will last in this schedule * @ param iterationGap The duration between iterations in this schedule . ...
return schedule ( name , iterationLength , iterationGap , null ) ;
public class ChronoHistory { /** * / * [ deutsch ] * < p > Rekonstruiert die Kalenderhistorie von der angegebenen Beschreibung . < / p > * @ param variant description as defined in { @ link # getVariant ( ) } * @ return ChronoHistory * @ throws IllegalArgumentException if the variant cannot be interpreted as ca...
if ( ! variant . startsWith ( "historic-" ) ) { throw new IllegalArgumentException ( "Variant does not start with \"historic-\": " + variant ) ; } String [ ] parts = variant . substring ( 9 ) . split ( ":" ) ; if ( parts . length == 0 ) { throw new IllegalArgumentException ( "Invalid variant description." ) ; } Histori...
public class Ordering { /** * Returns the least of the specified values according to this ordering . If there are multiple * least values , the first of those is returned . The iterator will be left exhausted : its { @ code * hasNext ( ) } method will return { @ code false } . * < p > < b > Java 8 users : < / b >...
// let this throw NoSuchElementException as necessary E minSoFar = iterator . next ( ) ; while ( iterator . hasNext ( ) ) { minSoFar = min ( minSoFar , iterator . next ( ) ) ; } return minSoFar ;
public class CasServerDiscoveryProfileEndpoint { /** * Discovery . * @ return the map */ @ GetMapping @ ResponseBody public Map < String , Object > discovery ( ) { } }
val results = new HashMap < String , Object > ( ) ; results . put ( "profile" , casServerProfileRegistrar . getProfile ( ) ) ; return results ;
public class AbstractCodeElementExtractor { /** * Replies the assignment component with the given nazme in the given grammar component . * @ param grammarComponent the component to explore . * @ param assignmentName the name of the assignment to search for . * @ return the assignment component . */ protected stat...
for ( final Action action : GrammarUtil . containedActions ( grammarComponent ) ) { if ( GrammarUtil . isAssignedAction ( action ) ) { if ( Objects . equals ( assignmentName , action . getFeature ( ) ) ) { return action ; } } } return null ;
public class StorageAccountsInner { /** * Gets the first page of Azure Storage accounts , if any , linked to the specified Data Lake Analytics account . The response includes a link to the next page , if any . * @ param resourceGroupName The name of the Azure resource group . * @ param accountName The name of the D...
return AzureServiceFuture . fromPageResponse ( listByAccountSinglePageAsync ( resourceGroupName , accountName , filter , top , skip , select , orderby , count ) , new Func1 < String , Observable < ServiceResponse < Page < StorageAccountInformationInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page...
public class AbstractColorPickerPreference { /** * Creates and returns the layout params of the view , which is used to show a preview of the * preference ' s color , depending on the preference ' s properties . * @ return The layout params , which have been created , as an instance of the class { @ link * Layout...
LayoutParams layoutParams = new LayoutParams ( getPreviewSize ( ) , getPreviewSize ( ) ) ; layoutParams . gravity = Gravity . CENTER_VERTICAL ; return layoutParams ;
public class ValueEnforcer { /** * Check if * < code > nValue & ge ; nLowerBoundInclusive & amp ; & amp ; nValue & le ; nUpperBoundInclusive < / code > * @ param fValue * Value * @ param sName * Name * @ param fLowerBoundInclusive * Lower bound * @ param fUpperBoundInclusive * Upper bound * @ return...
if ( isEnabled ( ) ) return isBetweenInclusive ( fValue , ( ) -> sName , fLowerBoundInclusive , fUpperBoundInclusive ) ; return fValue ;
public class BusinessReportScheduleMarshaller { /** * Marshall the given parameter object . */ public void marshall ( BusinessReportSchedule businessReportSchedule , ProtocolMarshaller protocolMarshaller ) { } }
if ( businessReportSchedule == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( businessReportSchedule . getScheduleArn ( ) , SCHEDULEARN_BINDING ) ; protocolMarshaller . marshall ( businessReportSchedule . getScheduleName ( ) , SCHEDULENAME_...
public class Graphics { /** * Sets a perspective matrix defined through the parameters . Works like * glFrustum , except it wipes out the current perspective matrix rather * than multiplying itself with it . * @ param left * left coordinate of the clipping plane * @ param right * right coordinate of the cli...
matrixMode ( MatrixMode . PROJECTION ) ; resetMatrix ( ) ; gl . glFrustum ( left , right , bottom , top , near , far ) ; matrixMode ( MatrixMode . MODELVIEW ) ; resetMatrix ( ) ;
public class BulkheadExports { /** * Creates a new instance of { @ link BulkheadExports } with specified metrics names prefix and * { @ link Iterable } of bulkheads . * @ param prefix the prefix of metrics names * @ param bulkheads the bulkheads */ public static BulkheadExports ofIterable ( String prefix , Iterab...
return new BulkheadExports ( prefix , bulkheads ) ;
public class BaasUser { /** * Logouts the user from the server . After this call completes no current user * is available . { @ link BaasUser # current ( ) } will return < code > null < / code > . * @ param handler an handler to be invoked upon completion of the request * @ return a { @ link com . baasbox . andro...
return logout ( null , RequestOptions . DEFAULT , handler ) ;
public class HashExtensions { /** * Hashes the given { @ link String } object with the given parameters . * @ param hashIt * the hash it * @ param salt * the salt * @ param hashAlgorithm * the hash algorithm * @ param charset * the charset * @ return the generated { @ link String } object * @ throws...
final MessageDigest messageDigest = MessageDigest . getInstance ( hashAlgorithm . getAlgorithm ( ) ) ; messageDigest . reset ( ) ; messageDigest . update ( salt . getBytes ( charset ) ) ; return new String ( messageDigest . digest ( hashIt . getBytes ( charset ) ) , charset ) ;
public class TaskTracker { /** * Pick a task to kill to free up memory / disk - space * @ param tasksToExclude tasks that are to be excluded while trying to find a * task to kill . If null , all runningTasks will be searched . * @ return the task to kill or null , if one wasn ' t found */ synchronized TaskInProgr...
TaskInProgress killMe = null ; for ( Iterator it = runningTasks . values ( ) . iterator ( ) ; it . hasNext ( ) ; ) { TaskInProgress tip = ( TaskInProgress ) it . next ( ) ; if ( tasksToExclude != null && tasksToExclude . contains ( tip . getTask ( ) . getTaskID ( ) ) ) { // exclude this task continue ; } if ( ( tip . g...
public class ByteSequenceIterator { /** * Descends to a given node , adds its arcs to the stack to be traversed . */ private void pushNode ( int node ) { } }
// Expand buffers if needed . if ( position == arcs . length ) { arcs = Arrays . copyOf ( arcs , arcs . length + EXPECTED_MAX_STATES ) ; } arcs [ position ++ ] = fsa . getFirstArc ( node ) ;
public class TimeOfDay { /** * Returns a copy of this time with the value of the specified field increased , * wrapping to what would be a new day if required . * If the addition is zero , then < code > this < / code > is returned . * These three lines are equivalent : * < pre > * TimeOfDay added = tod . with...
int index = indexOfSupported ( fieldType ) ; if ( amount == 0 ) { return this ; } int [ ] newValues = getValues ( ) ; newValues = getField ( index ) . addWrapPartial ( this , index , newValues , amount ) ; return new TimeOfDay ( this , newValues ) ;
public class InternalXtextParser { /** * InternalXtext . g : 3646:1 : ruleEnumLiterals returns [ EObject current = null ] : ( this _ EnumLiteralDeclaration _ 0 = ruleEnumLiteralDeclaration ( ( ) ( otherlv _ 2 = ' | ' ( ( lv _ elements _ 3_0 = ruleEnumLiteralDeclaration ) ) ) + ) ? ) ; */ public final EObject ruleEnumLi...
EObject current = null ; Token otherlv_2 = null ; EObject this_EnumLiteralDeclaration_0 = null ; EObject lv_elements_3_0 = null ; enterRule ( ) ; try { // InternalXtext . g : 3652:2 : ( ( this _ EnumLiteralDeclaration _ 0 = ruleEnumLiteralDeclaration ( ( ) ( otherlv _ 2 = ' | ' ( ( lv _ elements _ 3_0 = ruleEnumLiteral...
public class BufferUtils { /** * Checks if the given byte array starts with a constant sequence of bytes of the given value * and length . * @ param value the value to check for * @ param len the target length of the sequence * @ param arr the byte array to check * @ return true if the byte array has a prefix...
if ( arr == null || arr . length != len ) { return false ; } for ( int k = 0 ; k < len ; k ++ ) { if ( arr [ k ] != value ) { return false ; } } return true ;
public class ParserString { /** * Stellt den internen Zeiger an den Anfang der naechsten Zeile , gibt zurueck ob eine weitere Zeile * existiert oder ob es bereits die letzte Zeile war . * @ return Existiert eine weitere Zeile . */ public boolean nextLine ( ) { } }
while ( isValidIndex ( ) && text [ pos ] != '\n' ) { next ( ) ; } if ( isValidIndex ( ) && text [ pos ] == '\n' ) { next ( ) ; return isValidIndex ( ) ; } return false ;
public class DescribeTrainingJobResult { /** * An array of < code > Channel < / code > objects that describes each data input channel . * @ param inputDataConfig * An array of < code > Channel < / code > objects that describes each data input channel . */ public void setInputDataConfig ( java . util . Collection < ...
if ( inputDataConfig == null ) { this . inputDataConfig = null ; return ; } this . inputDataConfig = new java . util . ArrayList < Channel > ( inputDataConfig ) ;
public class AbstractAsyncFuture { /** * Runs a callback on the given listener safely . We cannot allow misbehaved application * callback code to spoil the notification of subsequent listeners or other tidy - up work , * so the callbacks have to be tightly wrappered in an exception hander that ignores the * error...
try { ExecutorService executorService = CHFWBundle . getExecutorService ( ) ; if ( null == executorService ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Unable to schedule callback, using this thread" ) ; } listener . futureCompleted ( future , userState ) ; } else ...
public class BaseHllSketch { /** * Gets the current ( approximate ) Relative Error ( RE ) asymptotic values given several * parameters . This is used primarily for testing . * @ param upperBound return the RE for the Upper Bound , otherwise for the Lower Bound . * @ param unioned set true if the sketch is the res...
return RelativeErrorTables . getRelErr ( upperBound , unioned , lgConfigK , numStdDev ) ;
public class DefaultClusterManager { /** * Clears all items in a queue . */ private void doQueueClear ( final Message < JsonObject > message ) { } }
final String name = message . body ( ) . getString ( "name" ) ; if ( name == null ) { message . reply ( new JsonObject ( ) . putString ( "status" , "error" ) . putString ( "message" , "No name specified." ) ) ; return ; } context . execute ( new Action < Void > ( ) { @ Override public Void perform ( ) { data . getQueue...
public class AstaTextFileReader { /** * Retrieve table data , return an empty result set if no table data is present . * @ param name table name * @ return table data */ private List < Row > getTable ( String name ) { } }
List < Row > result = m_tables . get ( name ) ; if ( result == null ) { result = Collections . emptyList ( ) ; } return result ;
public class PortablePositionNavigator { /** * Token with [ number ] quantifier . It means we are navigating in an array cell . */ private static PortablePosition navigateToPathTokenWithNumberQuantifier ( PortableNavigatorContext ctx , PortablePathCursor path ) throws IOException { } }
// makes sure that the field type is an array and parses the qantifier validateArrayType ( ctx . getCurrentClassDefinition ( ) , ctx . getCurrentFieldDefinition ( ) , path . path ( ) ) ; int index = validateAndGetArrayQuantifierFromCurrentToken ( path . token ( ) , path . path ( ) ) ; // reads the array length and chec...
public class CmsXmlContent { /** * Returns all simple type sub values . < p > * @ param value the value * @ return the simple type sub values */ public List < I_CmsXmlContentValue > getAllSimpleSubValues ( I_CmsXmlContentValue value ) { } }
List < I_CmsXmlContentValue > result = new ArrayList < I_CmsXmlContentValue > ( ) ; for ( I_CmsXmlContentValue subValue : getSubValues ( value . getPath ( ) , value . getLocale ( ) ) ) { if ( subValue . isSimpleType ( ) ) { result . add ( subValue ) ; } else { result . addAll ( getAllSimpleSubValues ( subValue ) ) ; } ...
public class TypeUsage_Builder { /** * Sets the value to be returned by { @ link TypeUsage # type ( ) } . * @ return this { @ code Builder } object * @ throws NullPointerException if { @ code type } is null */ public TypeUsage . Builder type ( QualifiedName type ) { } }
this . type = Objects . requireNonNull ( type ) ; _unsetProperties . remove ( Property . TYPE ) ; return ( TypeUsage . Builder ) this ;
public class MariaDbClob { /** * Return character length of the Clob . Assume UTF8 encoding . */ @ Override public long length ( ) { } }
// The length of a character string is the number of UTF - 16 units ( not the number of characters ) long len = 0 ; int pos = offset ; // set ASCII ( < = 127 chars ) for ( ; len < length && data [ pos ] >= 0 ; ) { len ++ ; pos ++ ; } // multi - bytes UTF - 8 while ( pos < offset + length ) { byte firstByte = data [ pos...
public class ImageLoader { /** * Load a rastered image from file * @ param file the file to load * @ return the rastered image * @ throws IOException */ public int [ ] [ ] fromFile ( File file ) throws IOException { } }
BufferedImage image = ImageIO . read ( file ) ; image = scalingIfNeed ( image , true ) ; return toIntArrayArray ( image ) ;
public class ReadablePartialConverter { /** * Extracts the values of the partial from an object of this converter ' s type . * The chrono parameter is a hint to the converter , should it require a * chronology to aid in conversion . * @ param fieldSource a partial that provides access to the fields . * This par...
ReadablePartial input = ( ReadablePartial ) object ; int size = fieldSource . size ( ) ; int [ ] values = new int [ size ] ; for ( int i = 0 ; i < size ; i ++ ) { values [ i ] = input . get ( fieldSource . getFieldType ( i ) ) ; } chrono . validate ( fieldSource , values ) ; return values ;
public class Transliterator { /** * Unregisters a transliterator or class . This may be either * a system transliterator or a user transliterator or class . * @ param ID the ID of the transliterator or class * @ see # registerClass */ public static void unregister ( String ID ) { } }
displayNameCache . remove ( new CaseInsensitiveString ( ID ) ) ; registry . remove ( ID ) ;
public class InternalXtypeParser { /** * Delegated rules */ public final boolean synpred4_InternalXtype ( ) { } }
state . backtracking ++ ; int start = input . mark ( ) ; try { synpred4_InternalXtype_fragment ( ) ; // can never throw exception } catch ( RecognitionException re ) { System . err . println ( "impossible: " + re ) ; } boolean success = ! state . failed ; input . rewind ( start ) ; state . backtracking -- ; state . fai...
public class JAXBMarshaller { /** * { @ inheritDoc } */ public void marshal ( Object oValue , OutputStream out ) throws IOException { } }
try { javax . xml . bind . Marshaller marshaller = m_ctx . createMarshaller ( ) ; configureJaxbMarshaller ( marshaller ) ; marshaller . marshal ( oValue , out ) ; } catch ( JAXBException e ) { throw new IOException ( e ) ; }
public class Invariants { /** * A { @ code double } specialized version of { @ link # checkInvariants ( Object , * ContractConditionType [ ] ) } * @ param value The value * @ param conditions The conditions the value must obey * @ return value * @ throws InvariantViolationException If any of the conditions ar...
final Violations violations = innerCheckAllDouble ( value , conditions ) ; if ( violations != null ) { throw new InvariantViolationException ( failedMessage ( Double . valueOf ( value ) , violations ) , null , violations . count ( ) ) ; } return value ;
public class Tile { /** * Render the tile image at the specified position in the given * graphics context . */ public void paint ( Graphics2D gfx , int x , int y ) { } }
_mirage . paint ( gfx , x , y ) ;
public class ResourceManager { /** * Get a new thread - local instance of the ResourceManager * If you are having problems with bundles beeing the same for different * threads and locales , try forceGet ( ) * @ return the thread - local ResourceManager */ public static ResourceManager get ( ) { } }
ResourceManager resourceManager = ( ResourceManager ) instance . get ( ) ; if ( null == resourceManager ) { resourceManager = new ResourceManager ( ) ; instance . set ( resourceManager ) ; } return resourceManager ;
public class BuilderFactory { /** * Return an instance of the annotation type fields builder for the given * class . * @ return an instance of the annotation type field builder for the given * annotation type . */ public AbstractBuilder getAnnotationTypeFieldsBuilder ( AnnotationTypeWriter annotationTypeWriter ) ...
return AnnotationTypeFieldBuilder . getInstance ( context , annotationTypeWriter . getAnnotationTypeDoc ( ) , writerFactory . getAnnotationTypeFieldWriter ( annotationTypeWriter ) ) ;
public class GenericDao { /** * 通过getTableName获取表名 * @ return the tableName */ public String getTableName ( ) { } }
recordLog ( "----" + ThreadContext . getShardKey ( ) + "\t" + getTableName ( orMapping . getTable ( ) , ( Number ) ThreadContext . getShardKey ( ) ) ) ; Number shardKey = ThreadContext . getShardKey ( ) ; return getTableName ( orMapping . getTable ( ) , shardKey ) ;
public class ObjectFactory { /** * Create an instance of { @ link Project . Calendars . Calendar . WorkWeeks . WorkWeek . WeekDays . WeekDay } */ public Project . Calendars . Calendar . WorkWeeks . WorkWeek . WeekDays . WeekDay createProjectCalendarsCalendarWorkWeeksWorkWeekWeekDaysWeekDay ( ) { } }
return new Project . Calendars . Calendar . WorkWeeks . WorkWeek . WeekDays . WeekDay ( ) ;
public class QRCodeWriter { /** * 0 = = black , 255 = = white ( i . e . an 8 bit greyscale bitmap ) . */ private static BitMatrix renderResult ( QRCode code , int width , int height , int quietZone ) { } }
ByteMatrix input = code . getMatrix ( ) ; if ( input == null ) { throw new IllegalStateException ( ) ; } int inputWidth = input . getWidth ( ) ; int inputHeight = input . getHeight ( ) ; int qrWidth = inputWidth + ( quietZone * 2 ) ; int qrHeight = inputHeight + ( quietZone * 2 ) ; int outputWidth = Math . max ( width ...
public class RoundedMoney { /** * ( non - Javadoc ) * @ see javax . money . MonetaryAmount # remainder ( Number ) */ @ Override public RoundedMoney remainder ( Number divisor ) { } }
return new RoundedMoney ( number . remainder ( MoneyUtils . getBigDecimal ( divisor ) , Optional . ofNullable ( monetaryContext . get ( MathContext . class ) ) . orElse ( MathContext . DECIMAL64 ) ) , currency , rounding ) ;
public class CategoryThreadComparator { /** * 按总次数排序 . * @ param o1 * @ param o2 * @ return */ protected int byCurrentSize ( ThreadInfo o1 , ThreadInfo o2 ) { } }
double count = o2 . getCurrentSize ( ) - o1 . getCurrentSize ( ) ; if ( count > 0 ) { return 1 ; } else if ( count == 0 ) { return 0 ; } else { return - 1 ; }
public class IfcConnectedFaceSetImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcFace > getCfsFaces ( ) { } }
return ( EList < IfcFace > ) eGet ( Ifc4Package . Literals . IFC_CONNECTED_FACE_SET__CFS_FACES , true ) ;
public class WebService { /** * method to generate HELM from a FASTA containing peptide sequence ( s ) * @ param notation * FASTA containing peptide sequence ( s ) * @ return HELM * @ throws FastaFormatException * if the FASTA input is not valid * @ throws MonomerLoadingException * if the MonomerFactory c...
String result = FastaFormat . generatePeptidePolymersFromFASTAFormatHELM1 ( notation ) . toHELM2 ( ) ; setMonomerFactoryToDefault ( notation ) ; return result ;
public class SegmentationHelper { /** * Determine if a name is segmented , i . e . if it ends with the correct marker type . * @ param name the name of a packet * @ param marker the marker type ( the initial byte of the component ) * @ return true if the name is segmented */ public static boolean isSegmented ( Na...
return name . size ( ) > 0 && name . get ( - 1 ) . getValue ( ) . buf ( ) . get ( 0 ) == marker ;
public class GitlabAPI { /** * Delete a project team member . * @ param projectId the project id * @ param userId the user id * @ throws IOException on gitlab api call error */ public void deleteProjectMember ( Integer projectId , Integer userId ) throws IOException { } }
String tailUrl = GitlabProject . URL + "/" + projectId + "/" + GitlabProjectMember . URL + "/" + userId ; retrieve ( ) . method ( DELETE ) . to ( tailUrl , Void . class ) ;
public class CassandraSchemaManager { /** * Check relation and execute query . * @ param embeddableKey * the embeddable key * @ param embeddableToDependentEmbeddables * the embeddable to dependent embeddables * @ param queries * the queries */ private void checkRelationAndExecuteQuery ( String embeddableKey...
List < String > dependentEmbeddables = embeddableToDependentEmbeddables . get ( embeddableKey ) ; if ( ! dependentEmbeddables . isEmpty ( ) ) { for ( String dependentEmbeddable : dependentEmbeddables ) { checkRelationAndExecuteQuery ( dependentEmbeddable , embeddableToDependentEmbeddables , queries ) ; } } KunderaCoreU...
public class HBaseUtils { /** * From bytes . * @ param m * the m * @ param metaModel * the meta model * @ param b * the b * @ return the object */ public static Object fromBytes ( EntityMetadata m , MetamodelImpl metaModel , byte [ ] b ) { } }
Class idFieldClass = m . getIdAttribute ( ) . getJavaType ( ) ; if ( metaModel . isEmbeddable ( m . getIdAttribute ( ) . getBindableJavaType ( ) ) ) { return fromBytes ( b , String . class ) ; } return fromBytes ( b , idFieldClass ) ;
public class IntegralValueMapping { /** * ~ Methods * * * * * */ @ Override public Map < Long , Double > mapping ( Map < Long , Double > originalDatapoints ) { } }
Map < Long , Double > sortedDatapoints = new TreeMap < > ( ) ; Double prevSum = 0.0 ; sortedDatapoints . putAll ( originalDatapoints ) ; for ( Entry < Long , Double > entry : sortedDatapoints . entrySet ( ) ) { prevSum += entry . getValue ( ) ; sortedDatapoints . put ( entry . getKey ( ) , prevSum ) ; } return sortedDa...
public class GenericStorableCodec { /** * Returns an instance of the codec . The Storable type itself may be an * interface or a class . If it is a class , then it must not be final , and * it must have a public , no - arg constructor . * @ param isMaster when true , version properties and sequences are managed ...
Object layoutKey = layout == null ? null : new LayoutKey ( layout ) ; Object key = KeyFactory . createKey ( new Object [ ] { encodingStrategy , isMaster , layoutKey } ) ; Class < ? extends S > storableImpl = ( Class < ? extends S > ) cCache . get ( key ) ; if ( storableImpl == null ) { storableImpl = generateStorable (...
public class MSPDIReader { /** * Update the project properties from the project summary task . * @ param task project summary task */ private void updateProjectProperties ( Task task ) { } }
ProjectProperties props = m_projectFile . getProjectProperties ( ) ; props . setComments ( task . getNotes ( ) ) ;
public class Matrix { /** * Converts this matrix into the string representation . * @ param formatter the number formatter * @ param rowsDelimiter the rows ' delimiter * @ param columnsDelimiter the columns ' delimiter * @ return the matrix converted to a string */ public String mkString ( NumberFormat formatte...
// TODO : rewrite using iterators int [ ] formats = new int [ columns ] ; for ( int i = 0 ; i < rows ; i ++ ) { for ( int j = 0 ; j < columns ; j ++ ) { double value = get ( i , j ) ; String output = formatter . format ( value ) ; int size = output . length ( ) ; formats [ j ] = size > formats [ j ] ? size : formats [ ...
public class VariantAvroToVariantContextConverter { /** * Adjust start / end if a reference base is required due to an empty allele . All variants are checked due to SecAlts . * @ param variant { @ link Variant } object . * @ param study Study * @ return Pair < Integer , Integer > The adjusted ( or same ) start /...
if ( variant . getType ( ) . equals ( VariantType . NO_VARIATION ) ) { return new ImmutablePair < > ( variant . getStart ( ) , variant . getEnd ( ) ) ; } MutablePair < Integer , Integer > pos = adjustedVariantStart ( variant . getStart ( ) , variant . getEnd ( ) , variant . getReference ( ) , variant . getAlternate ( )...
public class DistributionPointsBuilder { /** * { @ inheritDoc } */ public DistributionPoints buildObject ( String namespaceURI , String localName , String namespacePrefix ) { } }
return new DistributionPointsImpl ( namespaceURI , localName , namespacePrefix ) ;
public class AdvancedRecyclerArrayAdapter { /** * Adds the specified list of objects at the end of the array . * @ param collection The objects to add at the end of the array . */ public void addAll ( @ NonNull final Collection < T > collection ) { } }
final int length = collection . size ( ) ; if ( length == 0 ) { return ; } synchronized ( mLock ) { final int position = getItemCount ( ) ; mObjects . addAll ( collection ) ; notifyItemRangeInserted ( position , length ) ; }
public class ListAlgorithmsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListAlgorithmsRequest listAlgorithmsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listAlgorithmsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listAlgorithmsRequest . getCreationTimeAfter ( ) , CREATIONTIMEAFTER_BINDING ) ; protocolMarshaller . marshall ( listAlgorithmsRequest . getCreationTimeBefore ( ) ...
public class AmazonKinesisAnalyticsV2Client { /** * Infers a schema for an SQL - based Amazon Kinesis Data Analytics application by evaluating sample records on the * specified streaming source ( Kinesis data stream or Kinesis Data Firehose delivery stream ) or Amazon S3 object . In * the response , the operation r...
request = beforeClientExecution ( request ) ; return executeDiscoverInputSchema ( request ) ;
public class IntIterator { /** * Returns an infinite { @ code IntIterator } . * @ param supplier * @ return */ public static IntIterator generate ( final IntSupplier supplier ) { } }
N . checkArgNotNull ( supplier ) ; return new IntIterator ( ) { @ Override public boolean hasNext ( ) { return true ; } @ Override public int nextInt ( ) { return supplier . getAsInt ( ) ; } } ;
public class RelatedTablesCoreExtension { /** * Create a user related table if it does not exist . When not created , there * is no guarantee that an existing table has the same schema as the * provided tabled . * @ param relatedTable * user related table * @ return true if created , false if the table alread...
boolean created = false ; String relatedTableName = relatedTable . getTableName ( ) ; if ( ! geoPackage . isTable ( relatedTableName ) ) { geoPackage . createUserTable ( relatedTable ) ; try { // Create the contents Contents contents = new Contents ( ) ; contents . setTableName ( relatedTableName ) ; contents . setData...
public class BizwifiAPI { /** * 连Wi - Fi小程序 - 连Wi - Fi完成页跳转小程序 * 场景介绍 : * 设置需要跳转的小程序 , 连网完成点击 “ 完成 ” 按钮 , 即可进入设置的小程序 。 * 注 : 只能跳转与公众号关联的小程序 。 * @ param accessToken accessToken * @ param finishPageSet finishPageSet * @ return BaseResult */ public static BaseResult finishpageSet ( String accessToken , FinishP...
return finishpageSet ( accessToken , JsonUtil . toJSONString ( finishPageSet ) ) ;
public class RBBINode { /** * / CLOVER : OFF */ static void printInt ( int i , int minWidth ) { } }
String s = Integer . toString ( i ) ; printString ( s , Math . max ( minWidth , s . length ( ) + 1 ) ) ;
public class MapIterate { /** * Get and return the value in the Map at the specified key , or if there is no value at the key , return the result * of evaluating the specified { @ link Function0 } , and put that value in the map at the specified key . * This method handles the { @ code null } - value - at - key cas...
if ( map instanceof MutableMap ) { return ( ( MutableMap < K , V > ) map ) . getIfAbsentPut ( key , instanceBlock ) ; } V result = map . get ( key ) ; if ( MapIterate . isAbsent ( result , map , key ) ) { result = instanceBlock . value ( ) ; map . put ( key , result ) ; } return result ;
public class TransactedReturnGeneratedKeysBuilder { /** * Transforms the results using the given function . * @ param mapper * maps the query results to an object * @ return the results of the query as an Observable */ @ Override public < T > Flowable < Tx < T > > get ( @ Nonnull ResultSetMapper < ? extends T > m...
Preconditions . checkNotNull ( mapper , "mapper cannot be null" ) ; return Flowable . defer ( ( ) -> { AtomicReference < Connection > connection = new AtomicReference < Connection > ( ) ; Flowable < T > o = Update . < T > createReturnGeneratedKeys ( update . updateBuilder . connections . map ( c -> Util . toTransactedC...
public class StreamingPoliciesInner { /** * List Streaming Policies . * Lists the Streaming Policies in the account . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable t...
return listNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < StreamingPolicyInner > > , Page < StreamingPolicyInner > > ( ) { @ Override public Page < StreamingPolicyInner > call ( ServiceResponse < Page < StreamingPolicyInner > > response ) { return response . body ( ) ; } } ) ...
public class LstnDbChanged { /** * < p > Make something with a model . < / p > * @ param pReqVars additional request scoped parameters * @ throws Exception - an exception * @ param pFactoryAppBeans with make */ @ Override public final void make ( final Map < String , Object > pReqVars ) throws Exception { } }
@ SuppressWarnings ( "unchecked" ) AFactoryAppBeans < RS > factoryAppBeans = ( AFactoryAppBeans < RS > ) this . factoryAndServlet . getFactoryAppBeans ( ) ; this . factoryAndServlet . getHttpServlet ( ) . getServletContext ( ) . setAttribute ( "srvI18n" , factoryAppBeans . lazyGet ( "ISrvI18n" ) ) ; this . factoryAndSe...
public class TypeCheckUtil { /** * Is obj class boolean . * @ param type the type * @ return the boolean */ public static boolean isObjClass ( Class < ? > type ) { } }
if ( type . isPrimitive ( ) || type . isEnum ( ) || type . isArray ( ) ) { return false ; } String block = BASIC_PACKAGE_PREFIX_LIST . stream ( ) . filter ( prefix -> type . getName ( ) . startsWith ( prefix ) ) . findAny ( ) . orElse ( null ) ; if ( block != null ) { return false ; } return ! PRIMITIVE_CLASS_LIST . co...
public class FileSystemShellUtils { /** * Validates the path , verifying that it contains the { @ link Constants # HEADER } or * { @ link Constants # HEADER _ FT } and a hostname : port specified . * @ param path the path to be verified * @ param alluxioConf Alluxio configuration * @ return the verified path in...
if ( path . startsWith ( Constants . HEADER ) || path . startsWith ( Constants . HEADER_FT ) ) { if ( ! path . contains ( ":" ) ) { throw new IOException ( "Invalid Path: " + path + ". Use " + Constants . HEADER + "host:port/ ," + Constants . HEADER_FT + "host:port/" + " , or /file" ) ; } else { return path ; } } else ...
public class GVREventManager { /** * Return the method in eventsClass by checking the signature . * RuntimeException is thrown if the event is not found in the eventsClass interface , * or the parameter types don ' t match . */ private Method findHandlerMethod ( Object target , Class < ? extends IEvents > eventsCla...
// Use cached method if available . Note : no further type checking is done if the // method has been cached . It will be checked by JRE when the method is invoked . Method cachedMethod = getCachedMethod ( target , eventName ) ; if ( cachedMethod != null ) { return cachedMethod ; } // Check the event and params against...
public class ShapePath { /** * Adds a { @ link ShadowCompatOperation } , adding an { @ link ArcShadowOperation } if needed in order * to connect the previous shadow end to the new shadow operation ' s beginning . */ private void addShadowCompatOperation ( ShadowCompatOperation shadowOperation , float startShadowAngle...
addConnectingShadowIfNecessary ( startShadowAngle ) ; shadowCompatOperations . add ( shadowOperation ) ; currentShadowAngle = endShadowAngle ;
public class AWSIotClient { /** * Deprecates a thing type . You can not associate new things with deprecated thing type . * @ param deprecateThingTypeRequest * The input for the DeprecateThingType operation . * @ return Result of the DeprecateThingType operation returned by the service . * @ throws ResourceNotF...
request = beforeClientExecution ( request ) ; return executeDeprecateThingType ( request ) ;
public class ArtifactDetailsLayout { /** * Set title of artifact details header layout . */ private void setTitleOfLayoutHeader ( ) { } }
titleOfArtifactDetails . setValue ( HawkbitCommonUtil . getArtifactoryDetailsLabelId ( "" , i18n ) ) ; titleOfArtifactDetails . setContentMode ( ContentMode . HTML ) ;
public class MBeanServerHandler { /** * Unregister all previously registered MBean . This is tried for all previously * registered MBeans * @ throws JMException if an exception occurs during unregistration */ public final void destroy ( ) throws JMException { } }
synchronized ( mBeanHandles ) { List < JMException > exceptions = new ArrayList < JMException > ( ) ; List < MBeanHandle > unregistered = new ArrayList < MBeanHandle > ( ) ; for ( MBeanHandle handle : mBeanHandles ) { try { unregistered . add ( handle ) ; handle . server . unregisterMBean ( handle . objectName ) ; } ca...
public class Vector3Axis { /** * Checks if vector is { @ link Float # isInfinite } or not . * @ return true if all dimensions are { @ link Float # isInfinite } , otherwise - false */ public boolean isInfinite ( ) { } }
return Float . isInfinite ( x ) && Float . isInfinite ( y ) && Float . isInfinite ( z ) ;
public class SavedQueriesPanel { /** * End of variables declaration / / GEN - END : variables */ public void fireQueryChanged ( String newgroup , String newquery , String newid ) { } }
for ( SavedQueriesPanelListener listener : listeners ) { listener . selectedQueryChanged ( newgroup , newquery , newid ) ; }
public class Cell { /** * Set all constraints to cell default values . */ void defaults ( ) { } }
minWidth = new MinWidthValue < C , T > ( layout . toolkit ) ; minHeight = new MinHeightValue < C , T > ( layout . toolkit ) ; prefWidth = new PrefWidthValue < C , T > ( layout . toolkit ) ; prefHeight = new PrefHeightValue < C , T > ( layout . toolkit ) ; maxWidth = new MaxWidthValue < C , T > ( layout . toolkit ) ; ma...
public class ExtensionManager { /** * Notifies the extensions that the kernel is stopped */ public void stopped ( ) { } }
for ( KernelExtension kernelExtension : kernelExtensions . keySet ( ) ) { kernelExtension . stopped ( kernelExtensions . get ( kernelExtension ) ) ; }
public class MethodDelegation { /** * { @ inheritDoc } */ public ByteCodeAppender appender ( Target implementationTarget ) { } }
ImplementationDelegate . Compiled compiled = implementationDelegate . compile ( implementationTarget . getInstrumentedType ( ) ) ; return new Appender ( implementationTarget , new MethodDelegationBinder . Processor ( compiled . getRecords ( ) , ambiguityResolver , bindingResolver ) , terminationHandler , assigner , com...
public class X500Name { /** * Return an immutable List of the the AVAs contained in all the * RDNs of this X500Name . */ public List < AVA > allAvas ( ) { } }
List < AVA > list = allAvaList ; if ( list == null ) { list = new ArrayList < AVA > ( ) ; for ( int i = 0 ; i < names . length ; i ++ ) { list . addAll ( names [ i ] . avas ( ) ) ; } } return list ;
public class SessionIdGenerator { /** * Create a new random number generator instance we should use for * generating session identifiers . */ private SecureRandom createSecureRandom ( ) { } }
SecureRandom result = null ; long t1 = System . currentTimeMillis ( ) ; if ( secureRandomClass != null ) { try { // Construct and seed a new random number generator Class < ? > clazz = Class . forName ( secureRandomClass ) ; result = ( SecureRandom ) clazz . newInstance ( ) ; } catch ( Exception e ) { log . log ( Level...
public class MapModel { /** * Deselect the currently selected layer , includes sending the deselect events . * @ param layer * layer to clear */ private void deselectLayer ( Layer < ? > layer ) { } }
if ( layer != null ) { layer . setSelected ( false ) ; handlerManager . fireEvent ( new LayerDeselectedEvent ( layer ) ) ; }
public class AbstractDAO { /** * Get the results of a query . * @ param query the query to run * @ return the list of matched query results * @ see Query # list ( ) */ protected List < E > list ( Query < E > query ) throws HibernateException { } }
return requireNonNull ( query ) . list ( ) ;
public class LexTokenReader { /** * Read a fully qualified module ` name . * @ return A list of one or two name parts . */ private List < String > rdName ( ) { } }
List < String > names = new Vector < String > ( ) ; names . add ( rdIdentifier ( ) ) ; if ( ch == '`' ) { if ( startOfName ( rdCh ( ) ) ) { names . add ( rdIdentifier ( ) ) ; } } if ( names . size ( ) == 2 ) { // We have the strange mk _ Mod ` name case . . . String first = names . get ( 0 ) ; if ( first . startsWith (...
public class SecurityContextBuilder { /** * Builds SslContext using protected keystore and truststores . Adequate for mutual TLS connections . * @ param keystorePath Path for keystore file * @ param keystorePassword Password for protected keystore file * @ param truststorePath Path for truststore file * @ param...
try { return forKeystoreAndTruststore ( new FileInputStream ( keystorePath ) , keystorePassword , new FileInputStream ( truststorePath ) , truststorePassword , keyManagerAlgorithm ) ; } catch ( Exception e ) { throw new SecurityContextException ( e ) ; }
public class Jenkins { /** * Parses a version string into { @ link VersionNumber } , or null if it ' s not parseable as a version number * ( such as when Jenkins is run with " mvn hudson - dev : run " ) */ private static @ CheckForNull VersionNumber toVersion ( @ CheckForNull String versionString ) { } }
if ( versionString == null ) { return null ; } try { return new VersionNumber ( versionString ) ; } catch ( NumberFormatException e ) { try { // for non - released version of Jenkins , this looks like " 1.345 ( private - foobar ) , so try to approximate . int idx = versionString . indexOf ( ' ' ) ; if ( idx > 0 ) { ret...
public class MainController { /** * Refreshes the iframe content . */ @ Override public void refresh ( ) { } }
String url = mockupTypes . getUrl ( mockupType ) ; if ( mockupId == null || url == null ) { iframe . setSrc ( null ) ; return ; } iframe . setSrc ( String . format ( url , mockupId , System . currentTimeMillis ( ) ) ) ;
public class Properties { /** * Returns the string property associated with { @ code propName } , or { @ code * defaultValue } if there is no property . */ public String getProperty ( String propName , String defaultValue ) { } }
return props . getProperty ( propName , defaultValue ) ;
public class DirectLogFetcher { /** * Connect MySQL master to fetch binlog . */ public void open ( Connection conn , String fileName , long filePosition , final int serverId , boolean nonBlocking ) throws IOException { } }
try { this . conn = conn ; Class < ? > connClazz = Class . forName ( "com.mysql.jdbc.ConnectionImpl" ) ; Object unwrapConn = unwrapConnection ( conn , connClazz ) ; if ( unwrapConn == null ) { throw new IOException ( "Unable to unwrap " + conn . getClass ( ) . getName ( ) + " to com.mysql.jdbc.ConnectionImpl" ) ; } // ...
public class StyleHelper { /** * Sets the ui object to be visible on the device size * @ param uiObject object to be visible on the device size * @ param deviceSize device size */ public static void setVisibleOn ( final UIObject uiObject , final DeviceSize deviceSize ) { } }
// Split the enum up by _ to get the different devices // Separates the SM _ MD into [ SM , MD ] so we can add the right styles final String [ ] deviceString = deviceSize . name ( ) . split ( "_" ) ; for ( final String device : deviceString ) { // Case back to basic enum ( PRINT , XS , SM , MD , LG ) final DeviceSize s...
public class ApiOvhMe { /** * Create a default IP restriction for your future VoIP lines * REST : POST / me / telephony / defaultIpRestriction * @ param subnet [ required ] The IPv4 subnet you want to allow * @ param type [ required ] The protocol you want to restrict ( sip / mgcp ) */ public OvhDefaultIpRestrict...
String qPath = "/me/telephony/defaultIpRestriction" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "subnet" , subnet ) ; addBody ( o , "type" , type ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , Ov...
public class JingleSession { /** * Dispatch an incoming packet . The method is responsible for recognizing * the stanza type and , depending on the current state , delivering the * stanza to the right event handler and wait for a response . * @ param iq * the stanza received * @ return the new Jingle stanza t...
List < IQ > responses = new ArrayList < > ( ) ; IQ response = null ; if ( iq != null ) { if ( iq . getType ( ) . equals ( IQ . Type . error ) ) { // Process errors // TODO getState ( ) . eventError ( iq ) ; } else if ( iq . getType ( ) . equals ( IQ . Type . result ) ) { // Process ACKs if ( isExpectedId ( iq . getStan...
public class Graylog2Module { /** * See comments in MessageOutput . Factory and MessageOutput . Factory2 for details */ protected MapBinder < String , MessageOutput . Factory2 < ? extends MessageOutput > > outputsMapBinder2 ( ) { } }
return MapBinder . newMapBinder ( binder ( ) , TypeLiteral . get ( String . class ) , new TypeLiteral < MessageOutput . Factory2 < ? extends MessageOutput > > ( ) { } ) ;
public class CloudTasksClient { /** * Creates a task and adds it to a queue . * < p > Tasks cannot be updated after creation ; there is no UpdateTask command . * < p > & # 42 ; For [ App Engine queues ] [ google . cloud . tasks . v2 . AppEngineHttpQueue ] , the maximum task * size is 100KB . * < p > Sample code...
CreateTaskRequest request = CreateTaskRequest . newBuilder ( ) . setParent ( parent == null ? null : parent . toString ( ) ) . setTask ( task ) . build ( ) ; return createTask ( request ) ;
public class DeviceDAO { /** * Loads device details from internal storage . * @ return Loaded device details . */ private Device loadDevice ( ) { } }
// Initialise object with the content saved in shared pref file . SharedPreferences sharedPreferences = getSharedPreferences ( ) ; return new Device ( ) . setApiSpaceId ( sharedPreferences . getString ( KEY_API_SPACE_ID , null ) ) . setAppVer ( sharedPreferences . getInt ( KEY_APP_VER , - 1 ) ) . setInstanceId ( shared...
public class FutureCollectionCompletionListener { /** * Caller is responsible for ensuring that the futureConditions collection is immutable . */ public static void newFutureCollectionCompletionListener ( Collection < ApplicationDependency > futureConditions , CompletionListener < Boolean > newCL ) { } }
if ( futureConditions . isEmpty ( ) ) { newCL . successfulCompletion ( null , true ) ; } else { FutureCollectionCompletionListener futureListener = new FutureCollectionCompletionListener ( futureConditions . size ( ) , newCL ) ; futureListener . onCompletion ( futureConditions ) ; }
public class Ix { /** * Combines the next element from this and the other source Iterable via a zipper function . * If one of the source Iterables is sorter the sequence terminates eagerly . * The result ' s iterator ( ) doesn ' t support remove ( ) . * @ param < U > the other source ' s element type * @ param ...
return zip ( this , other , zipper ) ;
public class BandLU { /** * Computes the reciprocal condition number , using either the infinity norm * of the 1 norm . * @ param A * The matrix this is a decomposition of * @ param norm * Either < code > Norm . One < / code > or < code > Norm . Infinity < / code > * @ return The reciprocal condition number...
if ( norm != Norm . One && norm != Norm . Infinity ) throw new IllegalArgumentException ( "Only the 1 or the Infinity norms are supported" ) ; if ( A . numRows ( ) != n ) throw new IllegalArgumentException ( "A.numRows() != n" ) ; if ( ! A . isSquare ( ) ) throw new IllegalArgumentException ( "!A.isSquare()" ) ; double...