languageShortName
using a newly created ScriptEngineManager
instance.Optional
instance to a boolean
value.
as
operator.as
operator.
BufferedIterator
that allows examining the next element without
consuming it.
BufferedIterator
that allows examining the next element without
consuming it.
BufferedIterator
that allows examining the next element without
consuming it.
numberOfChars
by adding the space character around it as many times as needed so that it remains centered.
numberOfChars
, appending the supplied padding CharSequence around the original as many times as needed keeping it centered.
size
.
size
. size
stepping through the code step
elements for each subList.
size
stepping through the code step
elements for each sub-list. transform
closure
returning a list of transformed values.
transform
closure, returning a list of transformed values.
transform
closure, returning a list of transformed values.transform
closure, returning a list of transformed values.transform
closure
returning a list of transformed values.
transform
closure
or otherwise an empty optional.
transform
closure
and adding it to the supplied collector
.
transform
closure
and adding it to the supplied collector
.transform
closure
and adding it to the supplied collector
.
transform
closure
and adding it to the supplied collector
.transform
closure
returning the collector
with all transformed values added to it.
transform
closure
and returning a map of the resulting transformed entries.
transform
closure
and returning a map of the resulting transformed entries.
transform
closure
and returning a map of the transformed entries.
transform
closure
and returning a map of the resulting transformed entries.
transform
closure
returning a map of the transformed entries.
collector
.
collector
.
transform
closure. searchString
ignoring the caseConsiderations.true
if the intersection of two iterables is empty.
to
Temporal, inclusive, decrementing by one
unit each iteration, calling the closure once per iteration. to
Temporal, inclusive, decrementing by one
unit
each iteration, calling the closure once per iteration. num
chars.
searchString
ignoring the case considerations.eval(ScriptEngine, Reader, Binding)
except that the
source of the script is provided as a Reader
true
according to the Groovy Truth.
true
for all items in this iterable).
true
for all items in this data structure).
true
for all items in this Array).true
for all items in this iterator).
self
as a command-line process.
String
array.
self
with environment defined by envp
and under the working directory dir
.
String
array given in the first parameter,
with the environment defined by envp
and under the working directory dir
.
envp
and under the working directory dir
.
self
with environment defined
by envp
and under the working directory dir
.
String
array given in the first parameter,
with the environment defined by envp
and under the working directory dir
.
envp
and under the working directory dir
.
OptionalDouble
, tests the value using
the given predicate and returns the optional if the test returns true or
empty otherwise.
OptionalInt
, tests the value using
the given predicate and returns the optional if the test returns true or
else empty.
OptionalLong
, tests the value using
the given predicate and returns the optional if the test returns true or
else empty.
Shortcut for SimpleDateFormat to output a String representation of this calendar instance.
Create a String representation of this date according to the given format pattern.
Create a String representation of this date according to the given format pattern and timezone.
OptionalDouble
, returns the value,
otherwise throws NoSuchElementException
.
OptionalInt
, returns the value,
otherwise throws NoSuchElementException
.
OptionalLong
, returns the value,
otherwise throws NoSuchElementException
.
Return a string representation of the 'day' portion of this date according to the locale-specific DateFormat#SHORT default format.
Return a string representation of the date and time time portion of this Date instance, according to the locale-specific format used by DateFormat.
String.metaClass.myMethod = { println "foo" }
Return a string representation of the time portion of this date according to the locale-specific DateFormat#MEDIUM default format.
Object#isCase(java.lang.Object)
method used by switch statements. Object#isCase(java.lang.Object)
method used by switch statements. Object#isCase(java.lang.Object)
method used by switch statements. method can be used with different
kinds of filters like regular expressions, classes, ranges etc.
Object#isCase(java.lang.Object)
method used by switch statements. Object#isCase(java.lang.Object)
method used by switch statements. Returns true of the implementing MetaClass has a property of the given name
Note that this method will only return true for realised properties and does not take into account implementation of getProperty or propertyMissing
compareTo()
method for comparing numbers of different
types.Iterable
has elements
def items = [1] def iterable = { [ hasNext:{ !
true
if the DayOfWeek is a weekday.true
if this day of the week is a weekend day (Saturday or Sunday).toString()
representation of each
item in this Iterable, with the given String as a separator between each item.
toString()
representation of each
items in this array, with the given String as a separator between each
item.toString()
representation of each
item from the iterator, with the given String as a separator between
each item. OptionalDouble
, returns an OptionalDouble
consisting of the result of applying the given function to the value or else empty.
OptionalInt
, returns an OptionalInt
consisting of the result of applying the given function to the value or else empty.
OptionalLong
, returns an OptionalLong
consisting of the result of applying the given function to the value or else empty.
OptionalDouble
, returns an Optional
consisting of the result of applying the given function to the value or else empty.
OptionalInt
, returns an Optional
consisting of the result of applying the given function to the value or else empty.
OptionalLong
, returns an Optional
consisting of the result of applying the given function to the value or else empty.
days
many days before this day of the week.months
months before this month.seconds
seconds shorter that this duration.seconds
seconds before this instant.days
days before this date.seconds
seconds before this date/time.seconds
seconds before this time.seconds
seconds before this date/time.seconds
seconds before this time.days
days shorter than this period.
years
years before this year.months
months before this year/month.seconds
seconds before this date/time.++
operator for the class CharSequence.
or
on JDK8.numberOfChars
by adding the space character
to the left as many times as needed.
numberOfChars
, adding the supplied
padding CharSequence as many times as needed to the left.
numberOfChars
by adding the space
character to the right as many times as needed.
numberOfChars
, adding the supplied padding
CharSequence as many times as needed to the right.
days
many days after this day of the week.months
months after this month.Map
containing all entries from self
and entries
,
giving precedence to entries
. Map
containing all entries from left
and right
,
giving precedence to right
. seconds
seconds longer than this duration.seconds
seconds after this instant.days
days after this date.seconds
seconds after this date/time.seconds
seconds after this time.seconds
seconds after this date/time.seconds
seconds after this time.days
days longer than this period.
years
years after this year.months
months after this year/month.seconds
seconds after this date/time.--
operator for the class CharSequence.
Returns an object satisfying Groovy truth if the implementing MetaClass responds to a method with the given name regardless of the arguments.
Returns an object satisfying Groovy truth if the implementing MetaClass responds to a method with the given name and arguments types.
other
Temporal (exclusive).
Note that this method differs from BigDecimal#round(java.math.MathContext) which specifies the digits to retain starting from the leftmost nonzero digit.
Note that this method differs from BigDecimal#round(java.math.MathContext) which specifies the digits to retain starting from the leftmost nonzero digit.
myFile.setText('some text', charset)or with some help from
ExpandoMetaClass
, you could do something like:
myFile.metaClass.setText = { String s ->
delegate.setText(s, 'UTF-8') }
myfile.text = 'some text'
myFile.setText('some text', charset)or with some help from
ExpandoMetaClass
, you could do something like:
myFile.metaClass.setText = { String s ->
delegate.setText(s, 'UTF-8') }
myfile.text = 'some text'
size()
method for Container
.size()
method for File
.size()
method for CharSequence
.size()
method for Iterable
.
size()
method for an array.size()
method for Path
.size()
method for Iterator
.
size()
method for Matcher
.size()
method for ButtonGroup
.size()
method for JComboBox
.size()
method for JMenu
.size()
method for JMenuBar
.size()
method for JTabbedPane
.size()
method for ListModel
.size()
method for TableColumnModel
.size()
method for TableModel
.size()
method for TreeNode
.size()
method for TreePath
.searchString
ignoring the case considerations.forceGroovyBehavior
is true
,
otherwise Java 13's stripIndent
will be invoked.numChars
leading characters from every line in a CharSequence.
marginChar
from
every line in a CharSequence.
marginChar
from
every line in a CharSequence.num
elements from this CharSequence.
num
elements from the head of this Iterable.
num
elements from the head of this array.
num
elements from this iterator.
num
elements from the head of this List.
num
elements from the head of this map.
num
elements from the head of this SortedSet.
CharSequence
that exists after the first occurrence of the given
searchString
in this CharSequence.
CharSequence
that exists before the first occurrence of the given
searchString
in this CharSequence.
enclosure
strings.
enclosure
strings.
from
and to
CharSequences and empty if the unavailable inputs are given.
from
and to
CharSequences and empty if the unavailable inputs are given.
num
elements from this CharSequence.
num
elements from the tail of this Iterable.
num
elements from the tail of this array.
num
elements from the tail of this List.
num
elements from the tail of this SortedSet.
with
and always returns self.
SpreadMap
from this map.
Converts the Calendar to a corresponding ZonedDateTime.
to
Temporal, inclusive, incrementing by one
unit each iteration, calling the closure once per iteration. to
Temporal, inclusive, incrementing by one
unit
each iteration, calling the closure once per iteration. withLazyDefault
which decorates a list allowing
it to grow when called with index values outside the normal list bounds.get(key)
.