signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class MetadataReceivedAlert { /** * This method construct the torrent lazily . If the metadata * is very big it can be a problem in memory constrained devices . * Internally it uses a lock synchronization to make it thread - safe . * @ param extra this controls if extra data , like trackers and web seeds ...
if ( invalid ) { return null ; } if ( data != null ) { return data ; } sync . lock ( ) ; try { if ( invalid ) { return null ; } if ( data != null ) { return data ; } torrent_handle th = alert . getHandle ( ) ; if ( th == null || ! th . is_valid ( ) ) { invalid = true ; return null ; } torrent_info ti = th . torrent_fil...
public class Relation { /** * Returns the value at the given row and column indexes * @ param r the row index , 0 based * @ param c the column index , 0 based */ public Object get ( int r , int c ) { } }
Column < ? > column = column ( c ) ; return column . get ( r ) ;
public class PdfLayerMembership { /** * Adds a new member to the layer . * @ param layer the new member to the layer */ public void addMember ( PdfLayer layer ) { } }
if ( ! layers . contains ( layer ) ) { members . add ( layer . getRef ( ) ) ; layers . add ( layer ) ; }
public class BroxWarpingSpacial { /** * Compute Psi - data using equation 6 and approximation in equation 5 */ protected void computePsiDataPsiGradient ( GrayF32 image1 , GrayF32 image2 , GrayF32 deriv1x , GrayF32 deriv1y , GrayF32 deriv2x , GrayF32 deriv2y , GrayF32 deriv2xx , GrayF32 deriv2yy , GrayF32 deriv2xy , Gra...
int N = image1 . width * image1 . height ; for ( int i = 0 ; i < N ; i ++ ) { float du_ = du . data [ i ] ; float dv_ = dv . data [ i ] ; // compute Psi - data float taylor2 = image2 . data [ i ] + deriv2x . data [ i ] * du_ + deriv2y . data [ i ] * dv_ ; float v = taylor2 - image1 . data [ i ] ; psiData . data [ i ] =...
public class HttpService { /** * - - - - - private methods - - - - - */ private List < ContextHandler > collectResourceHandlers ( ) throws ClassNotFoundException , InstantiationException , IllegalAccessException { } }
final List < ContextHandler > resourceHandlers = new LinkedList < > ( ) ; final String resourceHandlerList = Settings . ResourceHandlers . getValue ( ) ; if ( resourceHandlerList != null ) { for ( String resourceHandlerName : resourceHandlerList . split ( "[ \\t]+" ) ) { if ( StringUtils . isNotBlank ( resourceHandlerN...
public class Database { public void delete_class_property ( String name , String [ ] propnames ) throws DevFailed { } }
databaseDAO . delete_class_property ( this , name , propnames ) ;
public class PnPInfinitesimalPlanePoseEstimation { /** * R = R _ v * [ R22 , sgn * c ; sgn * b ^ T , a ] */ static void constructR ( DMatrixRMaj R , DMatrixRMaj R_v , DMatrix2x2 R22 , double b1 , double b2 , Vector3D_F64 ca , double sign , DMatrixRMaj tmp ) { } }
tmp . data [ 0 ] = R22 . a11 ; tmp . data [ 1 ] = R22 . a12 ; tmp . data [ 2 ] = sign * ca . x ; tmp . data [ 3 ] = R22 . a21 ; tmp . data [ 4 ] = R22 . a22 ; tmp . data [ 5 ] = sign * ca . y ; tmp . data [ 6 ] = sign * b1 ; tmp . data [ 7 ] = sign * b2 ; tmp . data [ 8 ] = ca . z ; CommonOps_DDRM . mult ( R_v , tmp , ...
public class MockingApi { /** * Creates a stub with the specified type . If enclosed in a variable assignment , the variable name will be * used as the stub ' s name . * Example : * < pre > * def person = Stub ( Person ) / / type is Person . class , name is " person " * < / pre > * @ param type the interfac...
invalidMockCreation ( ) ; return null ;
public class AbstractCobolSourceCleaner { /** * Examine characters before an assumed level . If these characters are not * terminated by a COBOL delimiter then the level is actually an argument to * a previous keyword , not an actual level . * @ param fragment a fragment of code preceding an assumed level * @ r...
String s = fragment . trim ( ) ; if ( s . length ( ) > 0 ) { return s . charAt ( s . length ( ) - 1 ) != COBOL_DELIMITER ; } return false ;
public class TransferServlet { /** * Returns a { @ link AbstractUploadRequestProcessor } for { @ link DefaultManagedArtifact } * @ param transferContext * Instance of { @ link TransferContext } * @ return Instance of { @ link UploadRequestProcessor } . */ private UploadRequestProcessor getUploadRequestProcessor (...
LOGGER . entering ( transferContext ) ; String contentType = transferContext . getHttpServletRequest ( ) . getContentType ( ) != null ? transferContext . getHttpServletRequest ( ) . getContentType ( ) . toLowerCase ( ) : "unknown" ; if ( contentType . contains ( AbstractUploadRequestProcessor . MULTIPART_CONTENT_TYPE )...
public class ParameterTool { /** * Returns the Long value for the given key . * The method fails if the key does not exist . */ public long getLong ( String key ) { } }
addToDefaults ( key , null ) ; String value = getRequired ( key ) ; return Long . parseLong ( value ) ;
public class DistanceCorrelationDependenceMeasure { /** * Compute the double - centered delta matrix . * @ param adapter Data adapter * @ param data Input data * @ return Double - centered delta matrix . */ protected static < A > double [ ] computeDistances ( NumberArrayAdapter < ? , A > adapter , A data ) { } }
final int size = adapter . size ( data ) ; double [ ] dMatrix = new double [ ( size * ( size + 1 ) ) >> 1 ] ; for ( int i = 0 , c = 0 ; i < size ; i ++ ) { for ( int j = 0 ; j < i ; j ++ ) { double dx = adapter . getDouble ( data , i ) - adapter . getDouble ( data , j ) ; dMatrix [ c ++ ] = ( dx < 0 ) ? - dx : dx ; // ...
public class HashCodeCalculator { /** * Object hash code generation . * @ param nPrevHashCode * The previous hash code used as the basis for calculation * @ param x * Object to add . May be < code > null < / code > . * @ return The updated hash code */ public static int append ( final int nPrevHashCode , @ Nu...
return append ( nPrevHashCode , HashCodeImplementationRegistry . getHashCode ( x ) ) ;
public class CLI { /** * Set a Properties object with the CLI parameters for evaluation . * @ param model * the model parameter * @ param testset * the reference set * @ return the properties object */ private Properties setParsevalProperties ( final String language , final String model , final String testset...
final Properties parsevalProperties = new Properties ( ) ; parsevalProperties . setProperty ( "language" , language ) ; parsevalProperties . setProperty ( "model" , model ) ; parsevalProperties . setProperty ( "testset" , testset ) ; return parsevalProperties ;
public class RedisStateMachine { /** * Safely sets { @ link CommandOutput # set ( ByteBuffer ) } . Completes a command exceptionally in case an exception occurs . * @ param output * @ param bytes * @ param command */ protected void safeSet ( CommandOutput < ? , ? , ? > output , ByteBuffer bytes , RedisCommand < ?...
try { output . set ( bytes ) ; } catch ( Exception e ) { command . completeExceptionally ( e ) ; }
public class Post { /** * Set the date as a date * @ param date the date to set */ public void setDate ( Date date ) { } }
DateFormat df = new SimpleDateFormat ( "yyyy/MM/dd HH:mm:ss" ) ; df . setTimeZone ( TimeZone . getTimeZone ( "GMT" ) ) ; setDate ( df . format ( date ) ) ;
public class JSTypeRegistry { /** * Restores the derived state . * Note : This should be only used when deserializing the compiler state and needs to be done at * the end , after deserializing CompilerState . */ @ SuppressWarnings ( "unchecked" ) @ GwtIncompatible ( "ObjectInputStream" ) public void restoreContents...
eachRefTypeIndexedByProperty = ( Map < String , Map < String , ObjectType > > ) in . readObject ( ) ; interfaceToImplementors = ( Multimap < String , FunctionType > ) in . readObject ( ) ; typesIndexedByProperty = ( Multimap < String , JSType > ) in . readObject ( ) ;
public class ExceptionUtils { /** * < p > Creates a compact stack trace for the root cause of the supplied * < code > Throwable < / code > . < / p > * < p > The output of this method is consistent across JDK versions . * It consists of the root exception followed by each of its wrapping * exceptions separated b...
if ( throwable == null ) { return ArrayUtils . EMPTY_STRING_ARRAY ; } final Throwable throwables [ ] = getThrowables ( throwable ) ; final int count = throwables . length ; final List < String > frames = new ArrayList < > ( ) ; List < String > nextTrace = getStackFrameList ( throwables [ count - 1 ] ) ; for ( int i = c...
public class SessionBeanTypeImpl { /** * If not already created , a new < code > post - activate < / code > element will be created and returned . * Otherwise , the first existing < code > post - activate < / code > element will be returned . * @ return the instance defined for the element < code > post - activate ...
List < Node > nodeList = childNode . get ( "post-activate" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new LifecycleCallbackTypeImpl < SessionBeanType < T > > ( this , "post-activate" , childNode , nodeList . get ( 0 ) ) ; } return createPostActivate ( ) ;
public class ApiOvhMe { /** * Alter this object properties * REST : PUT / me / sshKey / { keyName } * @ param body [ required ] New object properties * @ param keyName [ required ] Name of this public SSH key */ public void sshKey_keyName_PUT ( String keyName , OvhSshKey body ) throws IOException { } }
String qPath = "/me/sshKey/{keyName}" ; StringBuilder sb = path ( qPath , keyName ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ;
public class WhileContextDef { /** * < pre > * Name of the pivot tensor . * < / pre > * < code > optional string pivot _ name = 5 ; < / code > */ public java . lang . String getPivotName ( ) { } }
java . lang . Object ref = pivotName_ ; if ( ref instanceof java . lang . String ) { return ( java . lang . String ) ref ; } else { com . google . protobuf . ByteString bs = ( com . google . protobuf . ByteString ) ref ; java . lang . String s = bs . toStringUtf8 ( ) ; pivotName_ = s ; return s ; }
public class JvmTypesBuilder { /** * / * @ Nullable */ protected < T extends EObject > T initializeSafely ( /* @ Nullable */ T targetElement , /* @ Nullable */ Procedure1 < ? super T > initializer ) { } }
if ( targetElement != null && initializer != null ) { try { initializer . apply ( targetElement ) ; } catch ( Exception e ) { LOG . error ( "Error initializing JvmElement" , e ) ; } } return targetElement ;
public class AnalyticsHandler { /** * Clean up the query states after all rows have been consumed . */ private void cleanupQueryStates ( ) { } }
completeRequestSpan ( currentRequest ( ) ) ; finishedDecoding ( ) ; queryInfoObservable = null ; queryRowObservable = null ; queryErrorObservable = null ; queryStatusObservable = null ; querySignatureObservable = null ; queryParsingState = QUERY_STATE_INITIAL ;
public class RevisionUtils { /** * in CBLDatabase + Insertion . m * - ( NSString * ) generateRevID : ( CBL _ Revision * ) rev * withJSON : ( NSData * ) json * attachments : ( NSDictionary * ) attachments * prevID : ( NSString * ) prevID * @ exclude */ @ InterfaceAudience . Private public static String generat...
MessageDigest md5Digest ; // Revision IDs have a generation count , a hyphen , and a UUID . int generation = 0 ; if ( prevID != null ) { generation = RevisionInternal . generationFromRevID ( prevID ) ; if ( generation == 0 ) { return null ; } } // Generate a getDigest for this revision based on the previous revision ID...
public class DirectoryResourceFileSource { /** * / * ( non - Javadoc ) * @ see org . archive . wayback . resourcestore . resourcefile . ResourceFileSource # getSources ( ) */ public List < ResourceFileSource > getSources ( ) { } }
List < ResourceFileSource > sources = new ArrayList < ResourceFileSource > ( ) ; sources . add ( this ) ; return sources ;
public class CaptureToUrlSearchResultIterator { /** * / * ( non - Javadoc ) * @ see java . util . Iterator # next ( ) */ public UrlSearchResult next ( ) { } }
if ( cachedNext == null ) { throw new NoSuchElementException ( "use hasNext!" ) ; } UrlSearchResult tmp = cachedNext ; cachedNext = null ; return tmp ;
public class TableSession { /** * Add add this data to the file . * @ param data A vector object containing the raw data for the record . * @ exception DBException File exception . */ public Object add ( Object data , int iOpenMode ) throws DBException , RemoteException { } }
Object bookmarkLast = null ; Record record = this . getMainRecord ( ) ; int iOldOpenMode = record . getOpenMode ( ) ; try { Utility . getLogger ( ) . info ( "EJB Add" ) ; synchronized ( this . getTask ( ) ) { record . setOpenMode ( ( iOldOpenMode & ~ DBConstants . LOCK_TYPE_MASK ) | ( iOpenMode & DBConstants . LOCK_TYP...
public class RedisInner { /** * Lists all Redis caches in a resource group . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; RedisResourceInner &...
return listByResourceGroupNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < RedisResourceInner > > , Page < RedisResourceInner > > ( ) { @ Override public Page < RedisResourceInner > call ( ServiceResponse < Page < RedisResourceInner > > response ) { return response . body ( ) ;...
public class LofCalculator { /** * 指定したK値 、 データセットを基に学習データセットの初期化を行う 。 < br > * データセット中の各対象点の以下の値を再計算する 。 * < ol > * < li > K距離値 < / li > * < li > K距離近傍データのIDリスト < / li > * < li > 局所到達可能密度 < / li > * < / ol > * @ param kn K値 * @ param dataSet 学習データセット */ public static void initDataSet ( int kn , Lo...
Collection < LofPoint > pointList = dataSet . getDataMap ( ) . values ( ) ; // K距離 、 K距離近傍を全て更新した後局所到達可能密度を更新する必要があるため 、 2ブロックに分けて行う 。 for ( LofPoint targetPoint : pointList ) { // 対象点のK距離 、 K距離近傍を更新する 。 updateKDistance ( kn , targetPoint , dataSet ) ; } for ( LofPoint targetPoint : pointList ) { // 対象点の局所到達可能密度を更新する...
public class CacheEntry { static public CacheEntryPool createCacheEntryPool ( DCache cache , int size ) { } }
CacheEntryPool pool = new CacheEntryPool ( size , cache ) ; return pool ;
public class FileSystemResourceReader { /** * ( non - Javadoc ) * @ see * net . jawr . web . resource . handler . reader . TextResourceReader # getResource ( net . * jawr . web . resource . bundle . JoinableResourceBundle , java . lang . String , * boolean ) */ @ Override public Reader getResource ( JoinableRes...
Reader rd = null ; FileInputStream fis = ( FileInputStream ) getResourceAsStream ( resourceName ) ; if ( fis != null ) { FileChannel inchannel = fis . getChannel ( ) ; rd = Channels . newReader ( inchannel , charset . newDecoder ( ) , - 1 ) ; } return rd ;
public class ExportManager { /** * line that contains a non escaped $ * @ param key input * @ return line with variables replaced with their value */ public String getValue ( String key ) { } }
if ( key . indexOf ( DOLLAR ) == - 1 ) { String value = getVariable ( key ) ; if ( value == null ) return null ; if ( value . indexOf ( DOLLAR ) == - 1 ) return value ; else return parseValue ( value ) ; } return parseValue ( key ) ;
public class Configuration { /** * Returns the value associated with the given config option as a float . * @ param configOption The configuration option * @ return the ( default ) value associated with the given config option */ @ PublicEvolving public float getFloat ( ConfigOption < Float > configOption ) { } }
Object o = getValueOrDefaultFromOption ( configOption ) ; return convertToFloat ( o , configOption . defaultValue ( ) ) ;
public class Parsers { /** * Checks the current token with the { @ code fromToken } object . If the * { @ link TokenMap # map ( Token ) } method returns null , an unexpected token error occurs ; * if the method returns a non - null value , the value is returned and the parser succeeds . * @ param fromToken the { ...
return new Parser < T > ( ) { @ Override boolean apply ( final ParseContext ctxt ) { if ( ctxt . isEof ( ) ) { ctxt . missing ( fromToken ) ; return false ; } Token token = ctxt . getToken ( ) ; Object v = fromToken . map ( token ) ; if ( v == null ) { ctxt . missing ( fromToken ) ; return false ; } ctxt . result = v ;...
public class FieldDefinition { /** * Serialize this field definition into a { @ link UNode } tree and return the root node . * @ return This field definition serialized into a UNode tree . */ public UNode toDoc ( ) { } }
// Root node is a MAP and its name is the field name . Set its tag name to " field " // for XML . UNode fieldNode = UNode . createMapNode ( m_name , "field" ) ; // Groups and non - groups are handled differently . if ( m_type != FieldType . GROUP ) { // Non - group : Add a " type " attribute , marked as an XML attribut...
public class ConsoleReporter { /** * Print only if the attribute is enabled * @ param type Metric attribute * @ param status Status to be logged */ private void printIfEnabled ( MetricAttribute type , String status ) { } }
if ( getDisabledMetricAttributes ( ) . contains ( type ) ) { return ; } output . println ( status ) ;
public class MiscUtils { /** * Simple code to copy a file from one place to another . . . * Java should have this built in . . . stupid java . . . */ public static void copyFile ( String fromPath , String toPath ) throws Exception { } }
File inputFile = new File ( fromPath ) ; File outputFile = new File ( toPath ) ; com . google_voltpatches . common . io . Files . copy ( inputFile , outputFile ) ;
public class Graphs { /** * Find all strongly - connected components in a graph . When a new SCC is found , the { @ link * SCCListener # foundSCC ( java . util . Collection ) } method is invoked . The listener object may hence not be null . * Tarjan ' s algorithm is used for realizing the SCC search . * @ param g...
SCCs . findSCCs ( graph , sccListener ) ;
public class TextOnlyLayout { /** * Ends one line of content . */ @ Override public void endContentLine ( ChainWriter out , WebSiteRequest req , HttpServletResponse resp , int rowspan , boolean endsInternal ) { } }
out . print ( " </td>\n" + " </tr>\n" ) ;
public class OAuth20Utils { /** * Is authorized grant type for service ? * @ param context the context * @ param registeredService the registered service * @ return true / false */ public static boolean isAuthorizedGrantTypeForService ( final J2EContext context , final OAuthRegisteredService registeredService ) {...
return isAuthorizedGrantTypeForService ( context . getRequestParameter ( OAuth20Constants . GRANT_TYPE ) , registeredService ) ;
public class JavacParser { /** * SwitchBlockStatementGroups = { SwitchBlockStatementGroup } * SwitchBlockStatementGroup = SwitchLabel BlockStatements * SwitchLabel = CASE ConstantExpression " : " | DEFAULT " : " */ List < JCCase > switchBlockStatementGroups ( ) { } }
ListBuffer < JCCase > cases = new ListBuffer < JCCase > ( ) ; while ( true ) { int pos = token . pos ; switch ( token . kind ) { case CASE : case DEFAULT : cases . append ( switchBlockStatementGroup ( ) ) ; break ; case RBRACE : case EOF : return cases . toList ( ) ; default : nextToken ( ) ; // to ensure progress synt...
public class PoolsImpl { /** * Updates the properties of the specified pool . * This only replaces the pool properties specified in the request . For example , if the pool has a start task associated with it , and a request does not specify a start task element , then the pool keeps the existing start task . * @ pa...
return ServiceFuture . fromHeaderResponse ( patchWithServiceResponseAsync ( poolId , poolPatchParameter , poolPatchOptions ) , serviceCallback ) ;
public class BaseRequest { /** * Download this resource asynchronously , with the given JSON object as the request body . * The download progress will be monitored with a { @ link ProgressListener } . * If the Content - Type header was not previously set , this method will set it to " application / json " . * < b...
String contentType = headers . get ( CONTENT_TYPE ) ; if ( contentType == null ) { contentType = JSON_CONTENT_TYPE ; } RequestBody body = RequestBody . create ( MediaType . parse ( contentType ) , json . toString ( ) ) ; sendRequest ( progressListener , responseListener , body ) ;
public class XPathParser { /** * Parses the the rule CastableExpr according to the following production * rule : * [ 18 ] CastableExpr : : = CastExpr ( < " castable " " as " > SingleType ) ? . * @ throws TTXPathException */ private void parseCastableExpr ( ) throws TTXPathException { } }
parseCastExpr ( ) ; if ( is ( "castable" , true ) ) { consume ( "as" , true ) ; mPipeBuilder . addCastableExpr ( getTransaction ( ) , parseSingleType ( ) ) ; }
public class KeyUsageExtension { /** * Set the attribute value . */ public void set ( String name , Object obj ) throws IOException { } }
if ( ! ( obj instanceof Boolean ) ) { throw new IOException ( "Attribute must be of type Boolean." ) ; } boolean val = ( ( Boolean ) obj ) . booleanValue ( ) ; if ( name . equalsIgnoreCase ( DIGITAL_SIGNATURE ) ) { set ( 0 , val ) ; } else if ( name . equalsIgnoreCase ( NON_REPUDIATION ) ) { set ( 1 , val ) ; } else if...
public class Paginator { /** * Returns total count of records based on provided criteria . * @ return total count of records based on provided criteria */ public Long getCount ( ) { } }
if ( count == 0L || ! suppressCounts ) { if ( metaModel . cached ( ) ) { count = ( Long ) QueryCache . instance ( ) . getItem ( metaModel . getTableName ( ) , countQueryFull , params ) ; if ( count == null || count == 0 ) { count = doCount ( ) ; QueryCache . instance ( ) . addItem ( metaModel . getTableName ( ) , count...
public class DatanodeInfo { /** * A formatted string for reporting the status of the DataNode . */ public String getDatanodeReport ( ) { } }
StringBuffer buffer = new StringBuffer ( ) ; long c = getCapacity ( ) ; long r = getRemaining ( ) ; long u = getDfsUsed ( ) ; long nonDFSUsed = getNonDfsUsed ( ) ; float usedPercent = getDfsUsedPercent ( ) ; float remainingPercent = getRemainingPercent ( ) ; buffer . append ( "Name: " + name + "\n" ) ; if ( ! NetworkTo...
public class Intersectionf { /** * Compute the distance of the given point < code > ( pX , pY , pZ ) < / code > to the line defined by the two points < code > ( x0 , y0 , z0 ) < / code > and < code > ( x1 , y1 , z1 ) < / code > . * Reference : < a href = " http : / / mathworld . wolfram . com / Point - LineDistance3 ...
float d21x = x1 - x0 , d21y = y1 - y0 , d21z = z1 - z0 ; float d10x = x0 - pX , d10y = y0 - pY , d10z = z0 - pZ ; float cx = d21y * d10z - d21z * d10y , cy = d21z * d10x - d21x * d10z , cz = d21x * d10y - d21y * d10x ; return ( float ) Math . sqrt ( ( cx * cx + cy * cy + cz * cz ) / ( d21x * d21x + d21y * d21y + d21z *...
public class BaseDaoEnabled { /** * A call through to the { @ link Dao # objectToString ( Object ) } . */ public String objectToString ( ) { } }
try { checkForDao ( ) ; } catch ( SQLException e ) { throw new IllegalArgumentException ( e ) ; } @ SuppressWarnings ( "unchecked" ) T t = ( T ) this ; return dao . objectToString ( t ) ;
public class Serializer { /** * Serialize document to the writer initialized by constructor . This method accept both XML and HTML documents and write * prolog accordingly : HTML document type , respective XML declaration . After prolog write nodes tree recursively , invoking * { @ link # write ( Node ) } with docu...
org . w3c . dom . Document w3cDoc = doc . getDocument ( ) ; if ( w3cDoc instanceof HTMLDocumentImpl ) { // if w3cDoc has no document type default to html5 : < ! DOCTYPE html > writer . write ( "<!DOCTYPE html" ) ; DocumentType dt = w3cDoc . getDoctype ( ) ; if ( dt != null ) { if ( dt . getPublicId ( ) != null ) { writ...
public class StructuredObject { /** * Validate this object against the specific schema for this type from the official repo . * @ param parser A parser to do the validation . * @ return A context containing the detailed error report if any . * @ throws SchemaValidationException If this object is not valid accordi...
StringBuffer ubuf = new StringBuffer ( "https://symphonyosf.github.io/symphony-object/proposed" ) ; for ( String part : type_ . split ( "\\." ) ) { ubuf . append ( "/" ) ; ubuf . append ( part ) ; } ubuf . append ( "-v" ) ; ubuf . append ( majorVersion_ ) ; ubuf . append ( "_" ) ; ubuf . append ( minorVersion_ ) ; ubuf...
public class Slice { /** * Gets a 64 - bit double at the specified absolute { @ code index } in * this buffer . * @ throws IndexOutOfBoundsException if the specified { @ code index } is less than { @ code 0 } or * { @ code index + 8 } is greater than { @ code this . length ( ) } */ public double getDouble ( int i...
checkIndexLength ( index , SizeOf . SIZE_OF_DOUBLE ) ; return unsafe . getDouble ( base , address + index ) ;
public class LabelInfo { /** * Configures the given label with the property values described by this instance and then sets * it as the label for the given component . * @ param label The label to be configured . * @ param component The component that the label is ' for ' . * @ throws IllegalArgumentException i...
Assert . notNull ( label , "label" ) ; Assert . notNull ( component , "component" ) ; configureLabel ( label ) ; if ( ! ( component instanceof JPanel ) ) { String labelText = label . getText ( ) ; if ( ! labelText . endsWith ( ":" ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Appending colon to text fiel...
public class AbstractNotification { /** * Returns the helper for { @ link # toString ( ) } . */ protected Objects . ToStringHelper toStringHelper ( ) { } }
return Objects . toStringHelper ( this ) . add ( "messageNumber" , messageNumber ) . add ( "resourceState" , resourceState ) . add ( "resourceId" , resourceId ) . add ( "resourceUri" , resourceUri ) . add ( "channelId" , channelId ) . add ( "channelExpiration" , channelExpiration ) . add ( "channelToken" , channelToken...
public class CSV { /** * Reads in a CSV dataset as a classification dataset . * @ param classification _ target the column index ( starting from zero ) of the * feature that will be the categorical target value * @ param reader the reader for the CSV content * @ param delimiter the delimiter to separate columns...
return ( ClassificationDataSet ) readCSV ( reader , lines_to_skip , delimiter , comment , cat_cols , - 1 , classification_target ) ;
public class ChessboardCornerClusterFinder { /** * Given the current graph , attempt to replace edges from vertexes which lost them in an apparent bad decision . * This is a very simple algorithm and gives up if the graph around the current node is less than perfect . * 1 ) Can only connect to vertexes which lost e...
// System . out . println ( " # # # # # Repair " ) ; for ( int idxV = 0 ; idxV < dirtyVertexes . size ( ) ; idxV ++ ) { final Vertex v = dirtyVertexes . get ( idxV ) ; // System . out . println ( " dirty = " + v . index ) ; bestSolution . clear ( ) ; for ( int idxE = 0 ; idxE < v . perpendicular . size ( ) ; idxE ++ ) ...
public class GregorianCalendar { /** * Adds a signed amount to the specified calendar field without changing larger fields . * A negative roll amount means to subtract from field without changing * larger fields . If the specified amount is 0 , this method performs nothing . * < p > This method calls { @ link # c...
// If amount = = 0 , do nothing even the given field is out of // range . This is tested by JCK . if ( amount == 0 ) { return ; } if ( field < 0 || field >= ZONE_OFFSET ) { throw new IllegalArgumentException ( ) ; } // Sync the time and calendar fields . complete ( ) ; int min = getMinimum ( field ) ; int max = getMaxi...
public class ValueDataUtil { /** * Read value data from file . * @ param type * property type , { @ link PropertyType } * @ param file * File * @ param orderNumber * value data order number * @ param spoolConfig * contains threshold for spooling * @ return PersistedValueData * @ throws IOException ...
ValueDataWrapper vdDataWrapper = new ValueDataWrapper ( ) ; long fileSize = file . length ( ) ; vdDataWrapper . size = fileSize ; if ( fileSize > spoolConfig . maxBufferSize ) { vdDataWrapper . value = new FilePersistedValueData ( orderNumber , file , spoolConfig ) ; } else { // JCR - 2463 In case the file was renamed ...
public class Assembler { /** * ge succeeds if and only if value & gt ; = 0 * @ param target * @ throws IOException */ public void ifge ( String target ) throws IOException { } }
if ( wideIndex ) { out . writeByte ( NOT_IFGE ) ; out . writeShort ( WIDEFIXOFFSET ) ; Branch branch = createBranch ( target ) ; out . writeByte ( GOTO_W ) ; out . writeInt ( branch ) ; } else { Branch branch = createBranch ( target ) ; out . writeOpCode ( IFGE ) ; out . writeShort ( branch ) ; }
public class Dcs_qr { /** * Sparse QR factorization of an m - by - n matrix A , A = Q * R * @ param A * column - compressed matrix * @ param S * symbolic QR analysis * @ return numeric QR factorization , null on error */ public static Dcsn cs_qr ( Dcs A , Dcss S ) { } }
double Rx [ ] , Vx [ ] , Ax [ ] , x [ ] , Beta [ ] ; int i , k , p , n , vnz , p1 , top , m2 , len , col , rnz , s [ ] , leftmost [ ] , Ap [ ] , Ai [ ] , parent [ ] , Rp [ ] , Ri [ ] , Vp [ ] , Vi [ ] , w [ ] , pinv [ ] , q [ ] ; Dcs R , V ; Dcsn N ; if ( ! Dcs_util . CS_CSC ( A ) || S == null ) return ( null ) ; n = A...
public class DSLSentence { /** * Build the Values from the Definition . */ private void parseDefinition ( ) { } }
values = new ArrayList < DSLVariableValue > ( ) ; if ( getDefinition ( ) == null ) { return ; } int variableStart = definition . indexOf ( "{" ) ; while ( variableStart >= 0 ) { int variableEnd = getIndexForEndOfVariable ( definition , variableStart ) ; String variable = definition . substring ( variableStart + 1 , var...
public class ApiKeyResource1 { /** * Creates an API Key . */ @ POST @ Consumes ( "application/x.json-create-api-key" ) public Response createApiKey ( CreateEmoApiKeyRequest request , @ QueryParam ( "key" ) String key , @ Authenticated Subject subject ) { } }
if ( key != null ) { request . setCustomRequestParameter ( "key" , key ) ; } CreateEmoApiKeyResponse response = _uac . createApiKey ( subject , request ) ; return Response . created ( URI . create ( response . getId ( ) ) ) . entity ( response ) . build ( ) ;
public class FaxServiceImp { /** * ( non - Javadoc ) * @ see com . popbill . api . FaxService # sendFAX ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . io . File [ ] , java . util . Date , java . lang . String , java . lang . String ) */ @ Override public String se...
Receiver receiver = new Receiver ( ) ; receiver . setReceiveNum ( receiveNum ) ; receiver . setReceiveName ( receiveName ) ; return requestFax ( corpNum , sendNum , null , new Receiver [ ] { receiver } , files , reserveDT , userID , false , title , null ) ;
public class AbstractSamlProfileHandlerController { /** * Gets registered service and verify . * @ param serviceId the service id * @ return the registered service and verify */ protected SamlRegisteredService verifySamlRegisteredService ( final String serviceId ) { } }
if ( StringUtils . isBlank ( serviceId ) ) { throw new UnauthorizedServiceException ( UnauthorizedServiceException . CODE_UNAUTHZ_SERVICE , "Could not verify/locate SAML registered service since no serviceId is provided" ) ; } LOGGER . debug ( "Checking service access in CAS service registry for [{}]" , serviceId ) ; v...
public class DefaultJsonMapper { /** * Extracts JSON data for a field according to its { @ code Facebook } annotation and returns it converted to the proper * Java type . * @ param fieldWithAnnotation * The field / annotation pair which specifies what Java type to convert to . * @ param jsonObject * " Raw " J...
Class < ? > type = fieldWithAnnotation . getField ( ) . getType ( ) ; JsonValue rawValue = jsonObject . get ( facebookFieldName ) ; // Short - circuit right off the bat if we ' ve got a null value . if ( rawValue . isNull ( ) ) { return null ; } if ( String . class . equals ( type ) ) { /* * Special handling here for b...
public class HashUtils { /** * Calculate the RipeMd160 value of the SHA - 256 of an array of bytes . This is * how a Bitcoin address is derived from public key bytes . * @ param pubkeyBytes * A Bitcoin public key as an array of bytes . * @ return The Bitcoin address as an array of bytes . */ public static synch...
try { byte [ ] sha256 = MessageDigest . getInstance ( SHA256 ) . digest ( pubkeyBytes ) ; byte [ ] out = new byte [ 20 ] ; ripeMD160 . update ( sha256 , 0 , sha256 . length ) ; ripeMD160 . doFinal ( out , 0 ) ; // This also resets the hash function for // next use return out ; } catch ( NoSuchAlgorithmException e ) { t...
public class BoxApiMetadata { /** * Gets a request that retrieves a metadata template schema ( scope defaults to BOX _ API _ SCOPE _ ENTERPRISE ) * @ param scope currently only global and enterprise scopes are supported * @ param template metadata template to use * @ return request to retrieve a metadata template...
BoxRequestsMetadata . GetMetadataTemplateSchema request = new BoxRequestsMetadata . GetMetadataTemplateSchema ( getMetadataTemplatesUrl ( scope , template ) , mSession ) ; return request ;
public class RelationalOperations { /** * Returns true if polyline _ a overlaps envelope _ b . */ private static boolean polylineOverlapsEnvelope_ ( Polyline polyline_a , Envelope envelope_b , double tolerance , ProgressTracker progress_tracker ) { } }
Envelope2D env_a = new Envelope2D ( ) , env_b = new Envelope2D ( ) ; polyline_a . queryEnvelope2D ( env_a ) ; envelope_b . queryEnvelope2D ( env_b ) ; if ( envelopeInfContainsEnvelope_ ( env_a , env_b , tolerance ) || envelopeInfContainsEnvelope_ ( env_b , env_a , tolerance ) ) return false ; if ( envelopeInfContainsEn...
public class CmsFlexCacheKey { /** * Calculates the cache key name that is used as key in * the first level of the FlexCache . < p > * @ param resourcename the full name of the resource including site root * @ param online must be true for an online resource , false for offline resources * @ return the FlexCach...
return resourcename . concat ( online ? CmsFlexCache . CACHE_ONLINESUFFIX : CmsFlexCache . CACHE_OFFLINESUFFIX ) ;
public class TransformerFactoryImpl { /** * Process the stylesheet from a DOM tree , if the * processor supports the " http : / / xml . org / trax / features / dom / input " * feature . * @ param node A DOM tree which must contain * valid transform instructions that this processor understands . * @ param syst...
m_DOMsystemID = systemID ; return processFromNode ( node ) ;
public class MethodProxy { /** * Add a proxy for a method declared in class { @ code declaringClass } . * Each call to the method will be routed to the invocationHandler instead . */ public static void proxy ( Class < ? > declaringClass , String methodName , InvocationHandler invocationHandler ) { } }
assertInvocationHandlerNotNull ( invocationHandler ) ; if ( declaringClass == null ) { throw new IllegalArgumentException ( "declaringClass cannot be null" ) ; } if ( methodName == null || methodName . length ( ) == 0 ) { throw new IllegalArgumentException ( "methodName cannot be empty" ) ; } Method [ ] methods = White...
public class JsBusImpl { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . admin . JsBus # getSIBDestination ( java . lang . String , * java . lang . String , com . ibm . ws . sib . admin . DestinationDefinition ) */ public void getSIBDestination ( String busName , String name , DestinationDefinition dd ) thro...
getDestinationCache ( ) . getSIBDestination ( busName , name , dd ) ;
public class CPDefinitionInventoryLocalServiceUtil { /** * Adds the cp definition inventory to the database . Also notifies the appropriate model listeners . * @ param cpDefinitionInventory the cp definition inventory * @ return the cp definition inventory that was added */ public static com . liferay . commerce . ...
return getService ( ) . addCPDefinitionInventory ( cpDefinitionInventory ) ;
public class ReadBuffer { /** * Converts a variable amount of bytes from the read buffer to an unsigned int . * The first bit is for continuation info , the other seven bits are for data . * @ return the int value . */ public int readUnsignedInt ( ) { } }
int variableByteDecode = 0 ; byte variableByteShift = 0 ; // check if the continuation bit is set while ( ( this . bufferData [ this . bufferPosition ] & 0x80 ) != 0 ) { variableByteDecode |= ( this . bufferData [ this . bufferPosition ++ ] & 0x7f ) << variableByteShift ; variableByteShift += 7 ; } // read the seven da...
public class XmlJobDefParser { /** * Will import all JobDef from an XML file . Creates and commits a transaction . * @ param path * full or relative path to the deployment descriptor to read . * @ param cnx * a database connection to use with no active transaction . * @ param overrideJarBasePath * ignore th...
// Argument checks jqmlogger . trace ( path ) ; if ( path == null || path . isEmpty ( ) ) { throw new IllegalArgumentException ( "XML file path cannot be empty" ) ; } if ( cnx == null ) { throw new IllegalArgumentException ( "Database connection cannot be null" ) ; } File f = new File ( path ) ; if ( f == null || ! f ....
public class CmsGalleriesTab { /** * Adds more gallery list items to display in the tab , if available . < p > */ protected void loadMoreItems ( ) { } }
setLoading ( true ) ; MoreItemsCommand cmd = new MoreItemsCommand ( 30 ) ; Scheduler . get ( ) . scheduleFixedDelay ( cmd , 1 ) ;
public class GrailsMessageBundleScriptCreator { /** * Returns the basenames * @ return the base names for the bundle resources */ public String [ ] getBaseNames ( boolean warDeployed ) { } }
String [ ] names = configParam . split ( GrailsLocaleUtils . RESOURCE_BUNDLE_SEPARATOR ) ; List < String > baseNames = new ArrayList < String > ( ) ; for ( String baseName : names ) { // Read the properties files to find out the available message keys . It // is done differently // for run - app or run - war style of r...
public class UAgentInfo { /** * Detects if the current browser is a BlackBerry Touch * device , such as the Storm , Torch , and Bold Touch . Excludes the Playbook . * @ return detection of a Blackberry touchscreen device */ public boolean detectBlackBerryTouch ( ) { } }
if ( detectBlackBerry ( ) && ( ( userAgent . indexOf ( deviceBBStorm ) != - 1 ) || ( userAgent . indexOf ( deviceBBTorch ) != - 1 ) || ( userAgent . indexOf ( deviceBBBoldTouch ) != - 1 ) || ( userAgent . indexOf ( deviceBBCurveTouch ) != - 1 ) ) ) { return true ; } return false ;
public class Config { /** * Retrieve an array of < tt > InetAddress < / tt > created from a property * value containing a < tt > delim < / tt > separated list of host names and / or * ip addresses . */ public static InetAddress [ ] getInetAddressArray ( Properties props , String key , String delim , InetAddress [ ]...
String p = props . getProperty ( key ) ; if ( p != null ) { StringTokenizer tok = new StringTokenizer ( p , delim ) ; int len = tok . countTokens ( ) ; InetAddress [ ] arr = new InetAddress [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { String addr = tok . nextToken ( ) ; try { arr [ i ] = InetAddress . getByName ( add...
public class TransactionableResourceManager { /** * Add session to the transaction group . * @ param userSession * SessionImpl , user Session * @ throws SystemException * @ throws RollbackException * @ throws IllegalStateException */ private void add ( SessionImpl session , PlainChangesLog changes ) throws Sy...
Transaction tx = tm . getTransaction ( ) ; if ( tx == null ) { // No active tx so there is no need to register the session return ; } // Get the current TransactionContext TransactionContext ctx = getOrCreateTransactionContext ( ) ; // Register the tx if it has not been done already ctx . registerTransaction ( tx ) ; /...
public class CLI { /** * Create the parameters available for evaluation . */ private void loadTokevalParameters ( ) { } }
this . tokevalParser . addArgument ( "-l" , "--language" ) . required ( true ) . choices ( "ca" , "de" , "en" , "es" , "eu" , "fr" , "it" ) . help ( "Choose language.\n" ) ; this . tokevalParser . addArgument ( "-t" , "--testset" ) . required ( true ) . help ( "The test or reference corpus.\n" ) ;
public class JspFunctions { /** * Utility method used to build a query parameter map which includes the list of parameters needed to change the * direction of a sort related to the given sort expression . This method uses a { @ link DataGridURLBuilder } * instance to call its { @ link DataGridURLBuilder # buildSort...
if ( urlBuilder == null || sortExpression == null ) return null ; return urlBuilder . buildSortQueryParamsMap ( sortExpression ) ;
public class DiskAccessOneFile { /** * Get the class of a given object . */ @ Override public long getObjectClass ( long oid ) { } }
FilePos oie = oidIndex . findOid ( oid ) ; if ( oie == null ) { throw DBLogger . newObjectNotFoundException ( "OID not found: " + Util . oidToString ( oid ) ) ; } try { fileInAP . seekPage ( PAGE_TYPE . DATA , oie . getPage ( ) , oie . getOffs ( ) ) ; return DataDeSerializerNoClass . getClassOid ( fileInAP ) ; } catch ...
public class JSDocInfo { /** * Adds an implemented interface . Returns whether the interface was added . If * the interface was already present in the list , it won ' t get added again . */ boolean addImplementedInterface ( JSTypeExpression interfaceName ) { } }
lazyInitInfo ( ) ; if ( info . implementedInterfaces == null ) { info . implementedInterfaces = new ArrayList < > ( 2 ) ; } if ( info . implementedInterfaces . contains ( interfaceName ) ) { return false ; } info . implementedInterfaces . add ( interfaceName ) ; return true ;
public class Shape { /** * Returns the order given the shape information * @ param buffer the buffer * @ return */ public static char order ( DataBuffer buffer ) { } }
int length = Shape . shapeInfoLength ( Shape . rank ( buffer ) ) ; return ( char ) buffer . getInt ( length - 1 ) ;
public class GraphHelper { /** * Remove the specified edge from the graph . * @ param edge */ public void removeEdge ( AtlasEdge edge ) { } }
String edgeString = null ; if ( LOG . isDebugEnabled ( ) ) { edgeString = string ( edge ) ; LOG . debug ( "Removing {}" , edgeString ) ; } graph . removeEdge ( edge ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . info ( "Removed {}" , edgeString ) ; }
public class IntTuples { /** * Computes the minimum value that occurs in the given tuple , * or < code > Integer . MAX _ VALUE < / code > if the given tuple has a * size of 0. * @ param t The input tuple * @ return The minimum value */ public static int min ( IntTuple t ) { } }
return IntTupleFunctions . reduce ( t , Integer . MAX_VALUE , Math :: min ) ;
public class JavacParser { /** * AnnotationsOpt = { ' @ ' Annotation } * @ param kind Whether to parse an ANNOTATION or TYPE _ ANNOTATION */ List < JCAnnotation > annotationsOpt ( Tag kind ) { } }
if ( token . kind != MONKEYS_AT ) return List . nil ( ) ; // optimization ListBuffer < JCAnnotation > buf = new ListBuffer < JCAnnotation > ( ) ; int prevmode = mode ; while ( token . kind == MONKEYS_AT ) { int pos = token . pos ; nextToken ( ) ; buf . append ( annotation ( pos , kind ) ) ; } lastmode = mode ; mode = p...
public class Exceptions { /** * Returns the same throwing bi - consumer . * @ param consumer the bi - consumer * @ param < T > the first input type * @ param < U > the second input type * @ param < E > the exception type * @ return the bi - consumer */ public static < T , U , E extends Throwable > @ NonNull B...
return consumer ;
public class BlockInfo { /** * Return a specific envelope in the block by it ' s index . * @ param envelopeIndex the index into list . * @ return envelopeIndex the index * @ throws InvalidProtocolBufferException */ public EnvelopeInfo getEnvelopeInfo ( int envelopeIndex ) throws InvalidProtocolBufferException { }...
try { EnvelopeInfo ret ; if ( isFiltered ( ) ) { switch ( filteredBlock . getFilteredTransactions ( envelopeIndex ) . getType ( ) . getNumber ( ) ) { case Common . HeaderType . ENDORSER_TRANSACTION_VALUE : ret = new TransactionEnvelopeInfo ( this . filteredBlock . getFilteredTransactions ( envelopeIndex ) ) ; break ; d...
public class ViewSet { /** * Creates a dynamic view , where the scope is the specified software system . The following * elements can be added to the resulting view : * < ul > * < li > People < / li > * < li > Software systems < / li > * < li > Containers that reside inside the specified software system < / l...
assertThatTheSoftwareSystemIsNotNull ( softwareSystem ) ; assertThatTheViewKeyIsSpecifiedAndUnique ( key ) ; DynamicView view = new DynamicView ( softwareSystem , key , description ) ; view . setViewSet ( this ) ; dynamicViews . add ( view ) ; return view ;
public class Commands { /** * Connects to the database defined in the specified properties file . * @ param line Command line * @ param callback Callback for command status * @ throws Exception on error */ public void properties ( String line , DispatchCallback callback ) throws Exception { } }
String example = "" ; example += "Usage: properties <properties file>" + SqlLine . getSeparator ( ) ; String [ ] parts = sqlLine . split ( line ) ; if ( parts . length < 2 ) { callback . setToFailure ( ) ; sqlLine . error ( example ) ; return ; } int successes = 0 ; for ( int i = 1 ; i < parts . length ; i ++ ) { Prope...
public class PreambleUtil { /** * Mode bits */ static void insertCurMode ( final WritableMemory wmem , final CurMode curMode ) { } }
final int curModeId = curMode . ordinal ( ) ; int mode = wmem . getByte ( MODE_BYTE ) & ~ CUR_MODE_MASK ; // strip bits 0 , 1 mode |= ( curModeId & CUR_MODE_MASK ) ; wmem . putByte ( MODE_BYTE , ( byte ) mode ) ;
public class Validate { /** * Validates that the argument can be converted to the specified class , if not , throws an exception . * < p > This method is useful when validating that there will be no casting errors . < / p > * < pre > Validate . isAssignableFrom ( SuperClass . class , object . getClass ( ) ) ; < / p...
// TODO when breaking BC , consider returning type if ( ! superType . isAssignableFrom ( type ) ) { throw new IllegalArgumentException ( StringUtils . simpleFormat ( DEFAULT_IS_ASSIGNABLE_EX_MESSAGE , type == null ? "null" : type . getName ( ) , superType . getName ( ) ) ) ; }
public class Friend { /** * Gets the FriendGroup that contains this friend . * @ return the FriendGroup that currently contains this Friend or null if * this Friend is not in a FriendGroup . */ public FriendGroup getGroup ( ) { } }
final Collection < RosterGroup > groups = get ( ) . getGroups ( ) ; if ( groups . size ( ) > 0 ) { return new FriendGroup ( api , con , get ( ) . getGroups ( ) . iterator ( ) . next ( ) ) ; } return null ;
public class SARLEclipsePlugin { /** * Create a status . * @ param severity the severity level , see { @ link IStatus } . * @ param code the code of the error . * @ param cause the cause of the problem . * @ return the status . */ public IStatus createStatus ( int severity , int code , Throwable cause ) { } }
return createStatus ( severity , code , null , cause ) ;
public class Layout { /** * Returns the layout for a particular generation of this layout ' s type . * @ throws FetchNoneException if generation not found */ public Layout getGeneration ( int generation ) throws FetchNoneException , FetchException { } }
try { Storage < StoredLayoutEquivalence > equivStorage = mLayoutFactory . mRepository . storageFor ( StoredLayoutEquivalence . class ) ; StoredLayoutEquivalence equiv = equivStorage . prepare ( ) ; equiv . setStorableTypeName ( getStorableTypeName ( ) ) ; equiv . setGeneration ( generation ) ; if ( equiv . tryLoad ( ) ...
public class DbsUtilities { /** * Join a list of strings by comma . * @ param items the list of strings . * @ return the resulting string . */ public static String joinByComma ( List < String > items ) { } }
StringBuilder sb = new StringBuilder ( ) ; for ( String item : items ) { sb . append ( "," ) . append ( item ) ; } if ( sb . length ( ) == 0 ) { return "" ; } return sb . substring ( 1 ) ;
public class StatementParameter { /** * 设置参数 . * @ param value */ public void setObject ( Class < ? > type , Object value ) { } }
if ( type . equals ( String . class ) ) { this . setString ( ( String ) value ) ; } else if ( type . equals ( Integer . class ) || type . equals ( int . class ) ) { this . setInt ( ( Integer ) value ) ; } else if ( type . equals ( Long . class ) || type . equals ( long . class ) ) { this . setLong ( ( Long ) value ) ; ...
public class BadiCalendar { /** * / * [ deutsch ] * < p > Erzeugt ein neues Badi - Kalenderdatum . < / p > * @ param era Bahai era * @ param yearOfEra year of era in range 1-1083 * @ param division either { @ code BadiMonth } or { @ code BadiIntercalaryDays } * @ param day day in range 1-19 ( 1-4/5 in case of...
if ( era == null ) { throw new NullPointerException ( "Missing Bahai era." ) ; } else if ( ( yearOfEra < 1 ) || ( yearOfEra > 1083 ) ) { throw new IllegalArgumentException ( "Year of era out of range 1-1083: " + yearOfEra ) ; } BadiCalendar prototype = BadiCalendar . axis ( ) . getMinimum ( ) . with ( YEAR_OF_ERA , yea...