idx
int64 0
41.2k
| question
stringlengths 83
4.15k
| target
stringlengths 5
715
|
|---|---|---|
500
|
final boolean hasNoMajorSolarTerm ( long utcDays ) { double jd0 = JulianDay . ofEphemerisTime ( this . midnight ( utcDays ) ) . getValue ( ) ; int index0 = ( 2 + ( int ) Math . floor ( SolarTerm . solarLongitude ( jd0 ) / 30 ) ) % 12 ; double jd1 = JulianDay . ofEphemerisTime ( this . midnight ( this . newMoonOnOrAfter ( utcDays + 1 ) ) ) . getValue ( ) ; int index1 = ( 2 + ( int ) Math . floor ( SolarTerm . solarLongitude ( jd1 ) / 30 ) ) % 12 ; return ( index0 == index1 ) ; }
|
leap months have no major solar terms
|
501
|
private long newYearInSui ( long utcDays ) { long s1 = this . winterOnOrBefore ( utcDays ) ; long s2 = this . winterOnOrBefore ( s1 + 370 ) ; long m12 = this . newMoonOnOrAfter ( s1 + 1 ) ; long m13 = this . newMoonOnOrAfter ( m12 + 1 ) ; long nextM11 = this . newMoonBefore ( s2 + 1 ) ; if ( ( lunations ( m12 , nextM11 ) == 12 ) && ( this . hasNoMajorSolarTerm ( m12 ) || this . hasNoMajorSolarTerm ( m13 ) ) ) { return this . newMoonOnOrAfter ( m13 + 1 ) ; } else { return m13 ; } }
|
a sui is the period from one winter to next winter ensuring that winter solstice is always in 11th month
|
502
|
private long newYearOnOrBefore ( long utcDays ) { long ny = this . newYearInSui ( utcDays ) ; if ( utcDays >= ny ) { return ny ; } else { return this . newYearInSui ( utcDays - 180 ) ; } }
|
start of lunisolar year
|
503
|
private boolean hasLeapMonth ( long m0 , long m ) { return ( ( m >= m0 ) && ( this . hasNoMajorSolarTerm ( m ) || this . hasLeapMonth ( m0 , this . newMoonBefore ( m ) ) ) ) ; }
|
is there any leap month between m0 and m?
|
504
|
private long winterOnOrBefore ( long utcDays ) { ZonalOffset offset = this . getOffset ( utcDays ) ; PlainDate date = PlainDate . of ( utcDays , EpochDays . UTC ) ; int year = ( ( ( date . getMonth ( ) <= 11 ) || ( date . getDayOfMonth ( ) <= 15 ) ) ? date . getYear ( ) - 1 : date . getYear ( ) ) ; Moment winter = AstronomicalSeason . WINTER_SOLSTICE . inYear ( year ) ; PlainDate d = winter . toZonalTimestamp ( offset ) . getCalendarDate ( ) ; if ( d . isAfter ( date ) ) { winter = AstronomicalSeason . WINTER_SOLSTICE . inYear ( year - 1 ) ; d = winter . toZonalTimestamp ( offset ) . getCalendarDate ( ) ; } return d . getDaysSinceEpochUTC ( ) ; }
|
search for winter solstice
|
505
|
private static int search ( long utcDays , long [ ] firstOfMonth ) { int low = 0 ; int high = firstOfMonth . length - 1 ; while ( low <= high ) { int middle = ( low + high ) / 2 ; if ( firstOfMonth [ middle ] <= utcDays ) { low = middle + 1 ; } else { high = middle - 1 ; } } return low - 1 ; }
|
returns index of month - start associated with utcDays
|
506
|
private static double decode ( byte [ ] data , int pointer ) { long ntp = 0L ; for ( int i = 0 ; i < 8 ; i ++ ) { long unsigned = ( data [ i + pointer ] & 0xFF ) ; ntp |= ( unsigned << ( 56 - i * 8 ) ) ; } long integer = ( ( ntp >>> 32 ) & 0xFFFFFFFFL ) ; long fraction = ( ( ( ntp & 0xFFFFFFFFL ) * MIO ) >>> 32 ) ; long off = ( ( ( integer & 0x80000000L ) == 0 ) ? OFFSET_2036 : OFFSET_1900 ) ; long ut1 = ( integer * MIO ) + fraction - off ; return ( ( ut1 + OFFSET_1900 ) / MIO_AS_DOUBLE ) ; }
|
NTP - Timestamp aus byte - Array dekodieren
|
507
|
private static void encode ( byte [ ] data , int pointer , double timestamp ) { long ut1 = convert ( timestamp ) ; boolean before2036 = ( ut1 + OFFSET_2036 < 0 ) ; long micros ; if ( before2036 ) { micros = ut1 + OFFSET_1900 ; } else { micros = ut1 + OFFSET_2036 ; } long integer = micros / MIO ; long fraction = ( ( micros % MIO ) << 32 ) / MIO ; if ( before2036 ) { integer |= 0x80000000L ; } long ntp = ( ( integer << 32 ) | fraction ) ; for ( int i = 7 ; i >= 0 ; i -- ) { data [ i + pointer ] = ( byte ) ( ntp & 0xFF ) ; ntp >>>= 8 ; } data [ 7 + pointer ] = ( byte ) ( Math . random ( ) * BIT08 ) ; }
|
NTP - Timestamp als byte - Array kodieren
|
508
|
private static Object readBoundary ( ObjectInput in , byte header ) throws IOException , ClassNotFoundException { int past = ( header & 0x1 ) ; if ( past == 1 ) { return Boundary . infinitePast ( ) ; } int future = ( header & 0x2 ) ; if ( future == 2 ) { return Boundary . infiniteFuture ( ) ; } int openClosed = in . readByte ( ) ; IntervalEdge edge ; switch ( openClosed ) { case 0 : edge = IntervalEdge . CLOSED ; break ; case 1 : edge = IntervalEdge . OPEN ; break ; default : throw new StreamCorruptedException ( "Invalid edge state." ) ; } Object t = in . readObject ( ) ; return Boundary . of ( edge , t ) ; }
|
serialization of a single boundary object
|
509
|
MomentInterval in ( Timezone tz ) { Boundary < Moment > b1 ; Boundary < Moment > b2 ; if ( this . getStart ( ) . isInfinite ( ) ) { b1 = Boundary . infinitePast ( ) ; } else { Moment m1 = this . getStart ( ) . getTemporal ( ) . in ( tz ) ; b1 = Boundary . of ( this . getStart ( ) . getEdge ( ) , m1 ) ; } if ( this . getEnd ( ) . isInfinite ( ) ) { b2 = Boundary . infiniteFuture ( ) ; } else { Moment m2 = this . getEnd ( ) . getTemporal ( ) . in ( tz ) ; b2 = Boundary . of ( this . getEnd ( ) . getEdge ( ) , m2 ) ; } return new MomentInterval ( b1 , b2 ) ; }
|
combines this local timestamp interval with given timezone to a global UTC - interval
|
510
|
static double getValue ( Moment moment , TimeScale scale ) { long elapsedTime = moment . getElapsedTime ( scale ) + jdOffset ( scale ) ; int nano = moment . getNanosecond ( scale ) ; double secs = elapsedTime + nano / ( MRD * 1.0 ) ; return secs / DAY_IN_SECONDS ; }
|
obtains the JD - value for given moment and scale
|
511
|
static DayPeriod of ( Locale locale , String calendarType ) { String lang = locale . getLanguage ( ) ; if ( lang . equals ( "nn" ) ) { locale = new Locale ( "nb" ) ; } Map < String , String > resourceMap = loadTextForms ( locale , calendarType ) ; SortedMap < PlainTime , String > codeMap = Collections . emptySortedMap ( ) ; for ( String key : resourceMap . keySet ( ) ) { if ( accept ( key ) ) { int hour = Integer . parseInt ( key . substring ( 1 , 3 ) ) ; int minute = Integer . parseInt ( key . substring ( 3 , 5 ) ) ; PlainTime time = PlainTime . midnightAtStartOfDay ( ) ; if ( hour == 24 ) { if ( minute != 0 ) { throw new IllegalStateException ( "Invalid time key: " + key ) ; } } else if ( ( hour >= 0 ) && ( hour < 24 ) && ( minute >= 0 ) && ( minute < 60 ) ) { time = time . plus ( hour * 60 + minute , ClockUnit . MINUTES ) ; } else { throw new IllegalStateException ( "Invalid time key: " + key ) ; } if ( codeMap . isEmpty ( ) ) { codeMap = new TreeMap < > ( ) ; } codeMap . put ( time , resourceMap . get ( key ) ) ; } } if ( codeMap . isEmpty ( ) || lang . isEmpty ( ) ) { return FALLBACK ; } Iterator < PlainTime > iter = codeMap . keySet ( ) . iterator ( ) ; String oldCode = "" ; while ( iter . hasNext ( ) ) { PlainTime time = iter . next ( ) ; String code = codeMap . get ( time ) ; if ( code . equals ( oldCode ) ) { iter . remove ( ) ; } else { oldCode = code ; } } return new DayPeriod ( locale , calendarType , codeMap ) ; }
|
package - private because used in deserialization
|
512
|
double getHighestElevationOfSun ( PlainDate date ) { Moment noon = date . get ( this . transitAtNoon ( ) ) ; double jde = JulianDay . getValue ( noon , TimeScale . TT ) ; double decInRad = Math . toRadians ( this . getCalculator ( ) . getFeature ( jde , DECLINATION ) ) ; double latInRad = Math . toRadians ( this . latitude ) ; double sinElevation = Math . sin ( latInRad ) * Math . sin ( decInRad ) + Math . cos ( latInRad ) * Math . cos ( decInRad ) ; double result = Math . toDegrees ( Math . asin ( sinElevation ) ) ; if ( Double . isNaN ( result ) ) { throw new UnsupportedOperationException ( "Solar declination not supported by: " + this . getCalculator ( ) . name ( ) ) ; } return result ; }
|
used in test classes too
|
513
|
HistoricEra getPreferredEra ( HistoricDate hd , PlainDate date ) { if ( ( this . era == null ) || date . isBefore ( this . start ) || date . isAfter ( this . end ) ) { return ( ( hd . compareTo ( AD1 ) < 0 ) ? HistoricEra . BC : HistoricEra . AD ) ; } else if ( ( this . era == HistoricEra . HISPANIC ) && ( hd . compareTo ( BC38 ) < 0 ) ) { return HistoricEra . BC ; } else { return this . era ; } }
|
determines the preferred era for a given historic date
|
514
|
void dump ( int size , Appendable buffer ) throws IOException { for ( int i = 0 ; i < size ; i ++ ) { ZonalTransition transition = this . transitions [ i ] ; TransitionModel . dump ( transition , buffer ) ; } }
|
Called by CompositeTransitionModel
|
515
|
private static int search ( long posixTime , ZonalTransition [ ] transitions ) { int low = 0 ; int high = transitions . length - 1 ; while ( low <= high ) { int middle = ( low + high ) / 2 ; if ( transitions [ middle ] . getPosixTime ( ) <= posixTime ) { low = middle + 1 ; } else { high = middle - 1 ; } } return low ; }
|
returns index of first transition after posixTime
|
516
|
private static int searchLocal ( long localSecs , ZonalTransition [ ] transitions ) { int low = 0 ; int high = transitions . length - 1 ; while ( low <= high ) { int middle = ( low + high ) / 2 ; ZonalTransition zt = transitions [ middle ] ; int offset = Math . max ( zt . getTotalOffset ( ) , zt . getPreviousOffset ( ) ) ; if ( zt . getPosixTime ( ) + offset <= localSecs ) { low = middle + 1 ; } else { high = middle - 1 ; } } return low ; }
|
returns index of first transition after local date and time
|
517
|
< V > ElementRule < T , V > getRule ( ChronoElement < V > element ) { return this . getChronology ( ) . getRule ( element ) ; }
|
Determines the associated element rule .
|
518
|
int getValue ( ) { if ( this . matches ( Selector . NORTHERN_COURT ) ) { return ( this . index - NORTHERN_NENGOS . length + NENGO_OEI . index - Nengo . SHOWA . index + 1 ) ; } return ( this . index - Nengo . SHOWA . index + 1 ) ; }
|
verwendet in JapaneseCalendar
|
519
|
static long transform ( int relgregyear , int dayOfYear ) { if ( relgregyear >= 1873 ) { return PlainDate . of ( relgregyear , dayOfYear ) . getDaysSinceEpochUTC ( ) ; } else { return START_OF_YEAR [ relgregyear - 701 ] + dayOfYear - 1 ; } }
|
also used in serialization
|
520
|
int getPrefixedDigitArea ( ) { if ( this . multi == null ) { return 0 ; } int digits = 0 ; for ( int i = 0 , n = this . multi . length ( ) ; i < n && Character . isDigit ( this . multi . charAt ( i ) ) ; i ++ ) { digits ++ ; } return digits ; }
|
count of leading digits
|
521
|
static int subSequenceEquals ( CharSequence test , int offset , CharSequence expected , boolean caseInsensitive , boolean rtl ) { int j = 0 ; int max = test . length ( ) ; int len = expected . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { char c = '\u0000' ; char exp = expected . charAt ( i ) ; if ( isBidi ( exp ) ) { continue ; } if ( rtl ) { while ( ( j + offset < max ) && isBidi ( c = test . charAt ( j + offset ) ) ) { j ++ ; } } else if ( j + offset < max ) { c = test . charAt ( j + offset ) ; } if ( j + offset >= max ) { return - 1 ; } else { j ++ ; } if ( caseInsensitive ) { if ( ! charEqualsIgnoreCase ( c , exp ) ) { return - 1 ; } } else if ( c != exp ) { return - 1 ; } } if ( rtl ) { while ( ( j + offset < max ) && isBidi ( test . charAt ( j + offset ) ) ) { j ++ ; } } return j ; }
|
also used by LocalizedGMTProcessor
|
522
|
ChronoFormatter < T > with ( Map < ChronoElement < ? > , Object > outerDefaults , AttributeSet outerAttrs ) { AttributeSet merged = AttributeSet . merge ( outerAttrs , this . globalAttributes ) ; return new ChronoFormatter < > ( new ChronoFormatter < > ( this , outerDefaults ) , merged , merged . get ( HistoricAttribute . CALENDAR_HISTORY , null ) ) ; }
|
used by CustomizedProcessor
|
523
|
static boolean hasUnixChronology ( Chronology < ? > chronology ) { Chronology < ? > c = chronology ; do { if ( UnixTime . class . isAssignableFrom ( c . getChronoType ( ) ) ) { return true ; } } while ( ( c = c . preparser ( ) ) != null ) ; return false ; }
|
also called in PatternType
|
524
|
private static double sinAlt ( double mjd0 , double hour , double longitudeRad , double cosLatitude , double sinLatitude , double geodeticAngle , double refraction , double deltaT ) { double mjd = mjd0 + hour / 24.0 ; double jct = toJulianCenturies ( mjd + ( deltaT / 86400 ) ) ; double [ ] data = MoonPosition . calculateMeeus ( jct ) ; double nutationCorr = data [ 0 ] * Math . cos ( Math . toRadians ( data [ 1 ] ) ) ; double tau = AstroUtils . gmst ( mjd ) + Math . toRadians ( nutationCorr ) + longitudeRad - Math . toRadians ( data [ 2 ] ) ; double decl = Math . toRadians ( data [ 3 ] ) ; double sinAltitude = sinLatitude * Math . sin ( decl ) + cosLatitude * Math . cos ( decl ) * Math . cos ( tau ) ; double correction = 0.7275 * getHorizontalParallax ( data [ 4 ] ) - refraction - geodeticAngle ; return sinAltitude - Math . sin ( Math . toRadians ( correction ) ) ; }
|
sinus of moon altitude above or below horizon
|
525
|
public static String removeZones ( String pattern ) { boolean literal = false ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 , n = pattern . length ( ) ; i < n ; i ++ ) { char c = pattern . charAt ( i ) ; if ( c == '\'' ) { if ( i + 1 < n && pattern . charAt ( i + 1 ) == '\'' ) { sb . append ( c ) ; i ++ ; } else { literal = ! literal ; } sb . append ( c ) ; } else if ( literal ) { sb . append ( c ) ; } else if ( c != 'z' && c != 'Z' && c != 'v' && c != 'V' && c != 'x' && c != 'X' ) { sb . append ( c ) ; } } for ( int j = 0 ; j < sb . length ( ) ; j ++ ) { char c = sb . charAt ( j ) ; if ( c == ' ' && j + 1 < sb . length ( ) && sb . charAt ( j + 1 ) == ' ' ) { sb . deleteCharAt ( j ) ; j -- ; } else if ( c == '[' || c == ']' || c == '(' || c == ')' ) { sb . deleteCharAt ( j ) ; j -- ; } } String result = sb . toString ( ) . trim ( ) ; if ( result . endsWith ( " '" ) ) { result = result . substring ( 0 , result . length ( ) - 2 ) + "'" ; } else if ( result . endsWith ( "," ) ) { result = result . substring ( 0 , result . length ( ) - 1 ) ; } return result ; }
|
Strips off any timezone symbols in clock time patterns .
|
526
|
static void printNanos ( StringBuilder sb , int nano ) { sb . append ( PlainTime . ISO_DECIMAL_SEPARATOR ) ; String num = Integer . toString ( nano ) ; int len ; if ( ( nano % MIO ) == 0 ) { len = 3 ; } else if ( ( nano % KILO ) == 0 ) { len = 6 ; } else { len = 9 ; } for ( int i = num . length ( ) ; i < 9 ; i ++ ) { sb . append ( '0' ) ; } for ( int i = 0 , n = len + num . length ( ) - 9 ; i < n ; i ++ ) { sb . append ( num . charAt ( i ) ) ; } }
|
also called by ZonalDateTime
|
527
|
static AttributeSet merge ( AttributeSet outer , AttributeSet inner ) { Map < String , Object > internalsNew = new HashMap < > ( ) ; internalsNew . putAll ( inner . internals ) ; internalsNew . putAll ( outer . internals ) ; Attributes attributesNew = new Attributes . Builder ( ) . setAll ( inner . attributes ) . setAll ( outer . attributes ) . build ( ) ; AttributeSet as = new AttributeSet ( attributesNew , Locale . ROOT , 0 , 0 , null , internalsNew ) ; return as . withLocale ( outer . locale ) ; }
|
used to create merged global attributes for a new formatter
|
528
|
void reset ( ) { if ( this . keys == null ) { this . len = Integer . MIN_VALUE ; this . mask = Integer . MIN_VALUE ; this . threshold = Integer . MIN_VALUE ; this . count = Integer . MIN_VALUE ; for ( int i = 0 ; i < 3 ; i ++ ) { this . ints [ i ] = Integer . MIN_VALUE ; } this . map = null ; } else { this . keys = new Object [ this . keys . length ] ; } this . count = 0 ; }
|
called in context of erraneous or - block
|
529
|
static int parsePeriod ( String period , char symbol ) throws ParseException { if ( period . isEmpty ( ) ) { throw new ParseException ( "Empty period." , 0 ) ; } boolean negative = false ; int index = 0 ; int len = period . length ( ) ; if ( period . charAt ( 0 ) == '-' ) { index ++ ; negative = true ; } if ( ( index < len ) && ( period . charAt ( index ) != 'P' ) ) { throw new ParseException ( "Missing P-literal: " + period , index ) ; } index ++ ; long total = 0 ; int old = index ; for ( int i = index , n = Math . min ( len , 10 ) ; i < n ; i ++ ) { char c = period . charAt ( i ) ; if ( ( c >= '0' ) && ( c <= '9' ) ) { int digit = ( c - '0' ) ; total = total * 10 + digit ; index ++ ; } else { break ; } } if ( index == old ) { throw new ParseException ( "Missing digits: " + period , index ) ; } if ( ( len == index + 1 ) && ( period . charAt ( index ) == symbol ) ) { index ++ ; try { if ( negative ) { total = MathUtils . safeNegate ( total ) ; } return MathUtils . safeCast ( total ) ; } catch ( ArithmeticException ae ) { throw new ParseException ( ae . getMessage ( ) , index ) ; } } throw new ParseException ( "Unparseable format: " + period , index ) ; }
|
called by subclasses
|
530
|
static void writeTransitions ( ZonalTransition [ ] transitions , int size , DataOutput out ) throws IOException { int n = Math . min ( size , transitions . length ) ; out . writeInt ( n ) ; if ( n > 0 ) { int stdOffset = transitions [ 0 ] . getPreviousOffset ( ) ; writeOffset ( out , stdOffset ) ; for ( int i = 0 ; i < n ; i ++ ) { stdOffset = writeTransition ( transitions [ i ] , stdOffset , out ) ; } } }
|
called by ArrayTransitionModel
|
531
|
protected TextAccessor accessor ( AttributeQuery attributes , OutputContext outputContext , boolean leap ) { Locale lang = attributes . get ( Attributes . LANGUAGE , Locale . ROOT ) ; TextWidth textWidth = attributes . get ( Attributes . TEXT_WIDTH , TextWidth . WIDE ) ; CalendarText cnames = CalendarText . getInstance ( this . getCalendarType ( attributes ) , lang ) ; if ( this . isMonthElement ( ) ) { if ( leap ) { return cnames . getLeapMonths ( textWidth , outputContext ) ; } else { return cnames . getStdMonths ( textWidth , outputContext ) ; } } else if ( this . isWeekdayElement ( ) ) { return cnames . getWeekdays ( textWidth , outputContext ) ; } else if ( this . isEraElement ( ) ) { return cnames . getEras ( textWidth ) ; } else { return cnames . getTextForms ( this . name ( ) , this . type ) ; } }
|
Might be overridden in special cases .
|
532
|
static HijriAdjustment from ( String variant ) { int index = variant . indexOf ( ':' ) ; if ( index == - 1 ) { return new HijriAdjustment ( variant , 0 ) ; } else { try { int adjustment = Integer . parseInt ( variant . substring ( index + 1 ) ) ; return new HijriAdjustment ( variant . substring ( 0 , index ) , adjustment ) ; } catch ( NumberFormatException nfe ) { throw new ChronoException ( "Invalid day adjustment: " + variant ) ; } } }
|
also called by Hijri calendar systems
|
533
|
private int unFilledSpacesInHeaderGroup ( int header ) { if ( mNumColumns == 0 ) { return 0 ; } int remainder = mDelegate . getCountForHeader ( header ) % mNumColumns ; return remainder == 0 ? 0 : mNumColumns - remainder ; }
|
Counts the number of items that would be need to fill out the last row in the group of items with the given header .
|
534
|
public View getHeaderAt ( int position ) { if ( position == MATCHED_STICKIED_HEADER ) { return mStickiedHeader ; } try { return ( View ) getChildAt ( position ) . getTag ( ) ; } catch ( Exception e ) { } return null ; }
|
Gets the header at an item position . However the position must be that of a HeaderFiller .
|
535
|
@ TargetApi ( Build . VERSION_CODES . HONEYCOMB ) public void setActivateOnItemClick ( boolean activateOnItemClick ) { if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . HONEYCOMB ) { mGridView . setChoiceMode ( activateOnItemClick ? ListView . CHOICE_MODE_SINGLE : ListView . CHOICE_MODE_NONE ) ; } }
|
Turns on activate - on - click mode . When this mode is on list items will be given the activated state when touched .
|
536
|
@ TargetApi ( Build . VERSION_CODES . ICE_CREAM_SANDWICH ) void addScrapView ( View scrap , int position , int viewType ) { Scrap item = new Scrap ( scrap , true ) ; if ( viewTypeCount == 1 ) { currentScraps . put ( position , item ) ; } else { scraps [ viewType ] . put ( position , item ) ; } if ( Build . VERSION . SDK_INT >= 14 ) { scrap . setAccessibilityDelegate ( null ) ; } }
|
Put a view into the ScrapViews list . These views are unordered .
|
537
|
private void setDrawWithLayer ( View v , boolean drawWithLayer ) { if ( isHardwareAccelerated ( ) ) { if ( v . getLayerType ( ) != LAYER_TYPE_HARDWARE && drawWithLayer ) { v . setLayerType ( LAYER_TYPE_HARDWARE , null ) ; } else if ( v . getLayerType ( ) != LAYER_TYPE_NONE && ! drawWithLayer ) { v . setLayerType ( LAYER_TYPE_NONE , null ) ; } } }
|
Enable a hardware layer for the view .
|
538
|
public static Parser < Void > many ( CharPredicate predicate ) { return Patterns . isChar ( predicate ) . many ( ) . toScanner ( predicate + "*" ) ; }
|
A scanner that scans greedily for 0 or more characters that satisfies the given CharPredicate .
|
539
|
public static Parser < Void > many1 ( CharPredicate predicate ) { return Patterns . many1 ( predicate ) . toScanner ( predicate + "+" ) ; }
|
A scanner that scans greedily for 1 or more characters that satisfies the given CharPredicate .
|
540
|
public static Parser < Void > many1 ( Pattern pattern , String name ) { return pattern . many1 ( ) . toScanner ( name ) ; }
|
A scanner that scans greedily for 1 or more occurrences of the given pattern .
|
541
|
public static Parser < Void > stringCaseInsensitive ( String str ) { return Patterns . stringCaseInsensitive ( str ) . toScanner ( str ) ; }
|
A scanner that matches the input against the specified string case insensitively .
|
542
|
public static void checkState ( boolean condition , String message , Object ... args ) throws IllegalStateException { if ( ! condition ) { throw new IllegalStateException ( String . format ( message , args ) ) ; } }
|
Checks a certain state .
|
543
|
static Parser < Expression > simpleNewExpression ( Parser < Expression > arg , Parser < DefBody > body ) { return Parsers . sequence ( term ( "new" ) . next ( TypeLiteralParser . ELEMENT_TYPE_LITERAL ) , argumentList ( arg ) , body . optional ( ) , ( type , args , defBody ) -> new NewExpression ( null , type , args , defBody ) ) ; }
|
new a class instance
|
544
|
public OperatorTable < T > prefix ( Parser < ? extends Function < ? super T , ? extends T > > parser , int precedence ) { ops . add ( new Operator ( parser , precedence , Associativity . PREFIX ) ) ; return this ; }
|
Adds a prefix unary operator .
|
545
|
public OperatorTable < T > postfix ( Parser < ? extends Function < ? super T , ? extends T > > parser , int precedence ) { ops . add ( new Operator ( parser , precedence , Associativity . POSTFIX ) ) ; return this ; }
|
Adds a postfix unary operator .
|
546
|
public OperatorTable < T > infixl ( Parser < ? extends BiFunction < ? super T , ? super T , ? extends T > > parser , int precedence ) { ops . add ( new Operator ( parser , precedence , Associativity . LASSOC ) ) ; return this ; }
|
Adds an infix left - associative binary operator .
|
547
|
public OperatorTable < T > infixr ( Parser < ? extends BiFunction < ? super T , ? super T , ? extends T > > parser , int precedence ) { ops . add ( new Operator ( parser , precedence , Associativity . RASSOC ) ) ; return this ; }
|
Adds an infix right - associative binary operator .
|
548
|
public OperatorTable < T > infixn ( Parser < ? extends BiFunction < ? super T , ? super T , ? extends T > > parser , int precedence ) { ops . add ( new Operator ( parser , precedence , Associativity . NASSOC ) ) ; return this ; }
|
Adds an infix non - associative binary operator .
|
549
|
public static long cleartextSize ( long ciphertextSize , Cryptor cryptor ) { checkArgument ( ciphertextSize >= 0 , "expected ciphertextSize to be positive, but was %s" , ciphertextSize ) ; long cleartextChunkSize = cryptor . fileContentCryptor ( ) . cleartextChunkSize ( ) ; long ciphertextChunkSize = cryptor . fileContentCryptor ( ) . ciphertextChunkSize ( ) ; long overheadPerChunk = ciphertextChunkSize - cleartextChunkSize ; long numFullChunks = ciphertextSize / ciphertextChunkSize ; long additionalCiphertextBytes = ciphertextSize % ciphertextChunkSize ; if ( additionalCiphertextBytes > 0 && additionalCiphertextBytes <= overheadPerChunk ) { throw new IllegalArgumentException ( "Method not defined for input value " + ciphertextSize ) ; } long additionalCleartextBytes = ( additionalCiphertextBytes == 0 ) ? 0 : additionalCiphertextBytes - overheadPerChunk ; assert additionalCleartextBytes >= 0 ; return cleartextChunkSize * numFullChunks + additionalCleartextBytes ; }
|
Calculates the size of the cleartext resulting from the given ciphertext decrypted with the given cryptor .
|
550
|
public static long ciphertextSize ( long cleartextSize , Cryptor cryptor ) { checkArgument ( cleartextSize >= 0 , "expected cleartextSize to be positive, but was %s" , cleartextSize ) ; long cleartextChunkSize = cryptor . fileContentCryptor ( ) . cleartextChunkSize ( ) ; long ciphertextChunkSize = cryptor . fileContentCryptor ( ) . ciphertextChunkSize ( ) ; long overheadPerChunk = ciphertextChunkSize - cleartextChunkSize ; long numFullChunks = cleartextSize / cleartextChunkSize ; long additionalCleartextBytes = cleartextSize % cleartextChunkSize ; long additionalCiphertextBytes = ( additionalCleartextBytes == 0 ) ? 0 : additionalCleartextBytes + overheadPerChunk ; assert additionalCiphertextBytes >= 0 ; return ciphertextChunkSize * numFullChunks + additionalCiphertextBytes ; }
|
Calculates the size of the ciphertext resulting from the given cleartext encrypted with the given cryptor .
|
551
|
public static int copy ( ByteBuffer source , ByteBuffer destination ) { final int numBytes = Math . min ( source . remaining ( ) , destination . remaining ( ) ) ; final ByteBuffer tmp = source . asReadOnlyBuffer ( ) ; tmp . limit ( tmp . position ( ) + numBytes ) ; destination . put ( tmp ) ; source . position ( tmp . position ( ) ) ; return numBytes ; }
|
Copies as many bytes as possible from the given source to the destination buffer . The position of both buffers will be incremented by as many bytes as have been copied .
|
552
|
public static KeyFile parse ( byte [ ] serialized ) { try ( InputStream in = new ByteArrayInputStream ( serialized ) ; Reader reader = new InputStreamReader ( in , UTF_8 ) ; JsonReader jsonReader = GSON . newJsonReader ( reader ) ) { JsonObject jsonObj = new JsonParser ( ) . parse ( jsonReader ) . getAsJsonObject ( ) ; KeyFile result = GSON . fromJson ( jsonObj , GenericKeyFile . class ) ; result . jsonObj = jsonObj ; return result ; } catch ( IOException | JsonParseException e ) { throw new IllegalArgumentException ( "Unable to parse key file." , e ) ; } }
|
Parses a json keyfile .
|
553
|
public < T extends KeyFile > T as ( Class < T > clazz ) { T result = GSON . fromJson ( jsonObj , clazz ) ; ( ( KeyFile ) result ) . jsonObj = jsonObj ; return result ; }
|
Creates a new version - specific KeyFile instance from this instance .
|
554
|
public static < T > void register ( Class < T > pluginClass , T pluginImpl ) throws IllegalStateException { INSTANCE . registerInternal ( pluginClass , pluginImpl ) ; }
|
Registers an implementation as a global override of any injected or default implementations .
|
555
|
private static Object getPluginImplementationViaProperty ( Class < ? > pluginClass ) { String className = pluginClass . getCanonicalName ( ) ; if ( className == null ) { throw new IllegalArgumentException ( "Class " + pluginClass + " does not have a canonical name!" ) ; } String implementingClass = System . getProperty ( PROPERTY_PREFIX + className ) ; if ( implementingClass != null ) { try { Class < ? > cls = Class . forName ( implementingClass ) ; cls = cls . asSubclass ( pluginClass ) ; return cls . newInstance ( ) ; } catch ( ClassCastException e ) { throw new RuntimeException ( className + " implementation is not an instance of " + className + ": " + implementingClass ) ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( className + " implementation class not found: " + implementingClass , e ) ; } catch ( InstantiationException e ) { throw new RuntimeException ( className + " implementation not able to be instantiated: " + implementingClass , e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( className + " implementation not able to be accessed: " + implementingClass , e ) ; } } else { return null ; } }
|
Returns an implementation of the given class using the system properties as a registry .
|
556
|
public static < T > Function < T , Boolean > forPredicate ( Predicate < T > predicate ) { return predicate :: test ; }
|
Creates a function that returns the same boolean output as the given predicate for all inputs .
|
557
|
public final Optional < L > asOptionalLeft ( ) { return fold ( Optional :: of , val -> Optional . < L > empty ( ) ) ; }
|
Returns the left side as an Optional .
|
558
|
public final Optional < R > asOptionalRight ( ) { return fold ( val -> Optional . < R > empty ( ) , Optional :: of ) ; }
|
Returns the right side as an Optional .
|
559
|
public final < T > T fold ( Function < ? super L , ? extends T > left , Function < ? super R , ? extends T > right ) { if ( isLeft ( ) ) { return left . apply ( getLeft ( ) ) ; } else { return right . apply ( getRight ( ) ) ; } }
|
Applies either the left or the right function as appropriate .
|
560
|
public final void accept ( Consumer < ? super L > left , Consumer < ? super R > right ) { if ( isLeft ( ) ) { left . accept ( getLeft ( ) ) ; } else { right . accept ( getRight ( ) ) ; } }
|
Accepts either the left or the right consumer as appropriate .
|
561
|
public final void acceptBoth ( Consumer < ? super L > left , Consumer < ? super R > right , L defaultLeft , R defaultRight ) { left . accept ( isLeft ( ) ? getLeft ( ) : defaultLeft ) ; right . accept ( isRight ( ) ? getRight ( ) : defaultRight ) ; }
|
Accepts both the left and right consumers using the default values to set the empty side .
|
562
|
public static < L , R > Either < L , R > create ( L l , R r ) { if ( l == null && r != null ) { return createRight ( r ) ; } else if ( l != null && r == null ) { return createLeft ( l ) ; } else { if ( l == null ) { throw new IllegalArgumentException ( "Both arguments were null." ) ; } else { throw new IllegalArgumentException ( "Both arguments were non-null: " + l + " " + r ) ; } } }
|
Creates a left or right depending on which element is non - null . Precisely one element should be non - null .
|
563
|
public static < L , R > Either < L , R > createLeft ( L l ) { return new Left < > ( l ) ; }
|
Creates an instance of Left .
|
564
|
public static < L , R > Either < L , R > createRight ( R r ) { return new Right < > ( r ) ; }
|
Creates an instance of Right .
|
565
|
public TreeComparison < E , A > decorateErrorsWith ( Function < ? super E , String > expectedToString , Function < ? super A , String > actualToString ) { this . expectedToString = expectedToString ; this . actualToString = actualToString ; return this ; }
|
Decorates errors thrown by any assertions with the given functions .
|
566
|
private AssertionError createComparisonFailure ( String className , String expected , String actual ) throws Exception { Class < ? > clazz = Class . forName ( className ) ; Constructor < ? > constructor = clazz . getConstructor ( String . class , String . class , String . class ) ; return ( AssertionError ) constructor . newInstance ( "" , expected , actual ) ; }
|
Attempts to create an instance of junit s ComparisonFailure exception using reflection .
|
567
|
public < T > SameType < T > mapToSame ( Function < ? super E , ? extends T > mapExpected , Function < ? super A , ? extends T > mapActual ) { return new SameTypeImp < > ( this , mapExpected , mapActual ) ; }
|
Maps both sides of the comparison to the same type for easier comparison and assertions .
|
568
|
public void sortChildrenByContent ( Comparator < ? super T > comparator ) { Comparator < TreeNode < T > > byContent = Comparator . comparing ( TreeNode :: getContent , comparator ) ; sortChildrenByNode ( byContent ) ; }
|
Recursively sorts all children using the given comparator of their content .
|
569
|
public void sortChildrenByNode ( Comparator < TreeNode < T > > comparator ) { Collections . sort ( children , comparator ) ; for ( TreeNode < T > child : children ) { child . sortChildrenByNode ( comparator ) ; } }
|
Recursively sorts all children using the given comparator of TreeNode .
|
570
|
public static < T > TreeNode < T > copy ( TreeDef < T > treeDef , T root ) { return copy ( treeDef , root , Function . identity ( ) ) ; }
|
Creates a hierarchy of TreeNodes that copies the structure and content of the given tree .
|
571
|
public TreeNode < T > findByContent ( T content ) { Optional < TreeNode < T > > opt = TreeStream . breadthFirst ( treeDef ( ) , this ) . filter ( node -> node . getContent ( ) . equals ( content ) ) . findFirst ( ) ; if ( opt . isPresent ( ) ) { return opt . get ( ) ; } else { throw new IllegalArgumentException ( this . toString ( ) + " has no child with content " + content ) ; } }
|
Searches breadth - first for the TreeNode with the given content .
|
572
|
public static < T > boolean isDescendantOf ( TreeDef . Parented < T > treeDef , T child , T parent ) { T candidateParent = treeDef . parentOf ( child ) ; while ( candidateParent != null ) { if ( candidateParent . equals ( parent ) ) { return true ; } else { candidateParent = treeDef . parentOf ( candidateParent ) ; } } return false ; }
|
Returns true iff child is a descendant of parent .
|
573
|
public static < T > boolean isDescendantOfOrEqualTo ( TreeDef . Parented < T > treeDef , T child , T parent ) { if ( child . equals ( parent ) ) { return true ; } else { return isDescendantOf ( treeDef , child , parent ) ; } }
|
Returns true iff child is a descendant of parent or if child is equal to parent .
|
574
|
public static < T > T root ( TreeDef . Parented < T > treeDef , T node ) { T lastParent ; T parent = node ; do { lastParent = parent ; parent = treeDef . parentOf ( lastParent ) ; } while ( parent != null ) ; return lastParent ; }
|
Returns the root of the given tree .
|
575
|
private static < T > Optional < T > lowestCommonAncestor ( TreeDef . Parented < T > treeDef , T nodeA , T nodeB ) { class TreeSearcher { private T tip ; private final Set < T > visited ; public TreeSearcher ( T start ) { this . tip = start ; this . visited = new HashSet < > ( ) ; } public boolean hasMore ( ) { return tip != null ; } public Optional < T > march ( TreeSearcher other ) { if ( other . visited . contains ( tip ) ) { return Optional . of ( tip ) ; } else { visited . add ( tip ) ; tip = treeDef . parentOf ( tip ) ; return Optional . empty ( ) ; } } } TreeSearcher searchA = new TreeSearcher ( nodeA ) ; TreeSearcher searchB = new TreeSearcher ( nodeB ) ; Optional < T > commonAncestor = searchB . march ( searchA ) ; while ( searchA . hasMore ( ) && searchB . hasMore ( ) ) { commonAncestor = searchA . march ( searchB ) ; if ( commonAncestor . isPresent ( ) ) { return commonAncestor ; } commonAncestor = searchB . march ( searchA ) ; if ( commonAncestor . isPresent ( ) ) { return commonAncestor ; } } while ( searchA . hasMore ( ) && ! commonAncestor . isPresent ( ) ) { commonAncestor = searchA . march ( searchB ) ; } while ( searchB . hasMore ( ) && ! commonAncestor . isPresent ( ) ) { commonAncestor = searchB . march ( searchA ) ; } return commonAncestor ; }
|
Returns the common parent of the two given elements .
|
576
|
public static < T > String path ( TreeDef . Parented < T > treeDef , T node , Function < ? super T , String > toString , String delimiter ) { List < T > toRoot = toRoot ( treeDef , node ) ; ListIterator < T > iterator = toRoot . listIterator ( toRoot . size ( ) ) ; StringBuilder builder = new StringBuilder ( ) ; while ( iterator . hasPrevious ( ) ) { T segment = iterator . previous ( ) ; builder . append ( toString . apply ( segment ) ) ; if ( iterator . hasPrevious ( ) ) { builder . append ( delimiter ) ; } } return builder . toString ( ) ; }
|
Returns the path of the given node .
|
577
|
public Runnable wrap ( Throwing . Runnable runnable ) { return ( ) -> { try { runnable . run ( ) ; } catch ( Throwable e ) { handler . accept ( e ) ; } } ; }
|
Returns a Runnable whose exceptions are handled by this Errors .
|
578
|
public < T > Consumer < T > wrap ( Throwing . Consumer < T > consumer ) { return val -> { try { consumer . accept ( val ) ; } catch ( Throwable e ) { handler . accept ( e ) ; } } ; }
|
Returns a Consumer whose exceptions are handled by this Errors .
|
579
|
public static RuntimeException asRuntime ( Throwable e ) { if ( e instanceof RuntimeException ) { return ( RuntimeException ) e ; } else { return new WrappedAsRuntimeException ( e ) ; } }
|
Casts or wraps the given exception to be a RuntimeException .
|
580
|
private static Object tryCall ( String methodName , Throwing . Supplier < Object > supplier ) { try { return supplier . get ( ) ; } catch ( Throwable error ) { return new CallException ( methodName , error ) ; } }
|
Executes the given function return any exceptions it might throw as wrapped values .
|
581
|
private static < K , V > Map . Entry < K , V > createEntry ( K key , V value ) { return new Map . Entry < K , V > ( ) { public K getKey ( ) { return key ; } public V getValue ( ) { return value ; } public V setValue ( V value ) { throw new UnsupportedOperationException ( ) ; } } ; }
|
Creates an immutable Map . Entry .
|
582
|
public static void dump ( String message , Throwable exception ) { printEmphasized ( StringPrinter . buildString ( printer -> { printer . println ( message ) ; exception . printStackTrace ( printer . toPrintWriter ( ) ) ; } ) ) ; }
|
Dumps the given message and exception stack to the system error console
|
583
|
public static PrintStream wrapAndDumpWhenContains ( PrintStream source , String trigger ) { StringPrinter wrapped = new StringPrinter ( StringPrinter . stringsToLines ( perLine -> { source . println ( perLine ) ; if ( perLine . contains ( trigger ) ) { dump ( "Triggered by " + trigger ) ; } } ) ) ; return wrapped . toPrintStream ( ) ; }
|
Returns a PrintStream which will redirect all of its output to the source PrintStream . If the trigger string is passed through the wrapped PrintStream then it will dump the stack trace of the call that printed the trigger .
|
584
|
public static List < StackTraceElement > captureStackBelow ( Class < ? > ... clazzes ) { List < Class < ? > > toIgnore = new ArrayList < > ( clazzes . length + 1 ) ; toIgnore . addAll ( Arrays . asList ( clazzes ) ) ; toIgnore . add ( StackDumper . class ) ; Predicate < StackTraceElement > isSkipped = element -> toIgnore . stream ( ) . anyMatch ( clazz -> { String name = element . getClassName ( ) ; return name . equals ( clazz . getName ( ) ) || name . startsWith ( clazz . getName ( ) + "$$Lambda" ) ; } ) ; List < StackTraceElement > rawStack = Arrays . asList ( Thread . currentThread ( ) . getStackTrace ( ) ) ; ListIterator < StackTraceElement > iterator = rawStack . listIterator ( ) ; while ( iterator . hasNext ( ) && ! isSkipped . test ( iterator . next ( ) ) ) { } boolean foundSomethingToSkip = iterator . hasNext ( ) ; if ( foundSomethingToSkip ) { while ( iterator . hasNext ( ) && isSkipped . test ( iterator . next ( ) ) ) { } return rawStack . subList ( iterator . previousIndex ( ) , rawStack . size ( ) ) ; } else { return rawStack ; } }
|
Captures all of the current stack which is below the given classes .
|
585
|
private static void printEmphasized ( String toPrint ) { pristineSysErr . println ( "+----------\\" ) ; for ( String line : toPrint . split ( "\n" ) ) { pristineSysErr . println ( "| " + line ) ; } pristineSysErr . println ( "+----------/" ) ; }
|
Prints the given string to the the given printer wrapped in hierarchy - friendly braces . Useful for emphasizing a specific event from a sea of logging statements .
|
586
|
public static String buildString ( Consumer < StringPrinter > printer ) { StringBuilder builder = new StringBuilder ( ) ; printer . accept ( new StringPrinter ( builder :: append ) ) ; return builder . toString ( ) ; }
|
Easy way to create a String using a StringPrinter .
|
587
|
public static String buildStringFromLines ( String ... lines ) { int numChars = lines . length ; for ( String line : lines ) { numChars += line . length ( ) ; } StringBuilder builder = new StringBuilder ( numChars ) ; for ( String line : lines ) { builder . append ( line ) ; builder . append ( '\n' ) ; } return builder . toString ( ) ; }
|
Easy way to create a String from a bunch of lines .
|
588
|
public PrintStream toPrintStream ( Charset charset ) { return Errors . rethrow ( ) . get ( ( ) -> { return new PrintStream ( toOutputStream ( charset ) , true , charset . name ( ) ) ; } ) ; }
|
Creates a PrintStream of the given charset which passes its content to this StringPrinter .
|
589
|
public Writer toWriter ( ) { return new Writer ( ) { public Writer append ( char c ) { consumer . accept ( new String ( new char [ ] { c } ) ) ; return this ; } public Writer append ( CharSequence csq ) { if ( csq instanceof String ) { consumer . accept ( ( String ) csq ) ; } else { consumer . accept ( toStringSafely ( csq ) ) ; } return this ; } public Writer append ( CharSequence csq , int start , int end ) { if ( csq instanceof String ) { consumer . accept ( ( ( String ) csq ) . substring ( start , end ) ) ; } else { consumer . accept ( toStringSafely ( csq . subSequence ( start , end ) ) ) ; } return this ; } private String toStringSafely ( CharSequence csq ) { String asString = csq . toString ( ) ; if ( asString . length ( ) == csq . length ( ) ) { return asString ; } else { Errors . log ( ) . accept ( new IllegalArgumentException ( csq . getClass ( ) + " did not implement toString() correctly." ) ) ; char [ ] chars = new char [ csq . length ( ) ] ; for ( int i = 0 ; i < chars . length ; ++ i ) { chars [ i ] = csq . charAt ( i ) ; } return new String ( chars ) ; } } public void close ( ) throws IOException { } public void flush ( ) throws IOException { } public void write ( char [ ] cbuf , int off , int len ) throws IOException { consumer . accept ( new String ( cbuf , off , len ) ) ; } public void write ( String str ) { consumer . accept ( str ) ; } public void write ( String str , int off , int len ) { consumer . accept ( str . substring ( off , off + len ) ) ; } } ; }
|
Creates a Writer which passes its content to this StringPrinter .
|
590
|
public static double getDouble ( final String key ) { return Double . longBitsToDouble ( getPreferences ( ) . getLong ( key , Double . doubleToLongBits ( 0.0d ) ) ) ; }
|
Returns the double that has been saved as a long raw bits value in the long preferences . Returns 0 if the preference does not exist .
|
591
|
public static String getString ( final String key , final String defValue ) { return getPreferences ( ) . getString ( key , defValue ) ; }
|
Retrieves a stored String value .
|
592
|
public static void putLong ( final String key , final long value ) { final Editor editor = getPreferences ( ) . edit ( ) ; editor . putLong ( key , value ) ; editor . apply ( ) ; }
|
Stores a long value .
|
593
|
public static void putDouble ( final String key , final double value ) { final Editor editor = getPreferences ( ) . edit ( ) ; editor . putLong ( key , Double . doubleToRawLongBits ( value ) ) ; editor . apply ( ) ; }
|
Stores a double value as a long raw bits value .
|
594
|
public static void remove ( final String key ) { SharedPreferences prefs = getPreferences ( ) ; final Editor editor = prefs . edit ( ) ; if ( prefs . contains ( key + LENGTH ) ) { int stringSetLength = prefs . getInt ( key + LENGTH , - 1 ) ; if ( stringSetLength >= 0 ) { editor . remove ( key + LENGTH ) ; for ( int i = 0 ; i < stringSetLength ; i ++ ) { editor . remove ( key + "[" + i + "]" ) ; } } } editor . remove ( key ) ; editor . apply ( ) ; }
|
Removes a preference value .
|
595
|
public static Editor clear ( ) { final Editor editor = getPreferences ( ) . edit ( ) . clear ( ) ; editor . apply ( ) ; return editor ; }
|
Removed all the stored keys and values .
|
596
|
protected String fetchMarkdownTagletDescriptionFile ( String resourceName ) { final URL url = this . getClass ( ) . getResource ( resourceName ) ; if ( url != null ) { try { return FileUtils . readFileToString ( new File ( url . toURI ( ) ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } return "" ; }
|
Fetch the markdown taglet description from a resource within your classpath .
|
597
|
public void render ( Tag tag , StringBuilder target , MarkdownDoclet doclet ) { Counter counter ; if ( tag . holder ( ) instanceof MemberDoc ) { counter = getCounter ( ( ( MemberDoc ) tag . holder ( ) ) . containingClass ( ) ) ; } else { counter = getCounter ( tag . holder ( ) ) ; } target . append ( "<div class=\"todo\">" ) ; target . append ( "<div class=\"todoTitle\"><span class=\"todoTitle\">" ) . append ( doclet . getOptions ( ) . getTodoTitle ( ) ) . append ( "</span><span class=\"todoCounter\">#" ) . append ( counter . next ( ) ) . append ( "</span></div>" ) ; target . append ( "<div class=\"todoText\">" ) ; target . append ( doclet . toHtml ( tag . text ( ) . trim ( ) ) ) ; target . append ( "</div></div>" ) ; }
|
Render the tag .
|
598
|
public void appendOption ( String ... option ) { options = Arrays . copyOf ( options , options . length + 1 ) ; options [ options . length - 1 ] = option ; }
|
Append an option to the doclet options .
|
599
|
protected void processOverview ( ) { if ( options . getOverviewFile ( ) != null ) { try { rootDoc . setRawCommentText ( Files . toString ( options . getOverviewFile ( ) , options . getEncoding ( ) ) ) ; defaultProcess ( rootDoc , false ) ; } catch ( IOException e ) { printError ( "Error loading overview from " + options . getOverviewFile ( ) + ": " + e . getLocalizedMessage ( ) ) ; rootDoc . setRawCommentText ( "" ) ; } } }
|
Process the overview file if specified .
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.