repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractTriangle3F.java | AbstractTriangle3F.contains | @Pure
public boolean contains(FunctionalPoint3D point) {
return containsTrianglePoint(
this.getP1().getX(), this.getP1().getY(), this.getP1().getZ(),
this.getP2().getX(), this.getP2().getY(), this.getP2().getZ(),
this.getP3().getX(), this.getP3().getY(), this.getP3().getZ(),
point.getX(), point.get... | java | @Pure
public boolean contains(FunctionalPoint3D point) {
return containsTrianglePoint(
this.getP1().getX(), this.getP1().getY(), this.getP1().getZ(),
this.getP2().getX(), this.getP2().getY(), this.getP2().getZ(),
this.getP3().getX(), this.getP3().getY(), this.getP3().getZ(),
point.getX(), point.get... | [
"@",
"Pure",
"public",
"boolean",
"contains",
"(",
"FunctionalPoint3D",
"point",
")",
"{",
"return",
"containsTrianglePoint",
"(",
"this",
".",
"getP1",
"(",
")",
".",
"getX",
"(",
")",
",",
"this",
".",
"getP1",
"(",
")",
".",
"getY",
"(",
")",
",",
... | Checks if a point is inside this triangle.
@param point is the the point
@return <code>true</code> if the point is in the triangle , otherwise <code>false</code>. | [
"Checks",
"if",
"a",
"point",
"is",
"inside",
"this",
"triangle",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractTriangle3F.java#L1580-L1588 | train |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractTriangle3F.java | AbstractTriangle3F.getPlane | @Pure
public Plane3D<?> getPlane() {
return toPlane(
getX1(), getY1(), getZ1(),
getX1(), getY1(), getZ1(),
getX1(), getY1(), getZ1());
} | java | @Pure
public Plane3D<?> getPlane() {
return toPlane(
getX1(), getY1(), getZ1(),
getX1(), getY1(), getZ1(),
getX1(), getY1(), getZ1());
} | [
"@",
"Pure",
"public",
"Plane3D",
"<",
"?",
">",
"getPlane",
"(",
")",
"{",
"return",
"toPlane",
"(",
"getX1",
"(",
")",
",",
"getY1",
"(",
")",
",",
"getZ1",
"(",
")",
",",
"getX1",
"(",
")",
",",
"getY1",
"(",
")",
",",
"getZ1",
"(",
")",
"... | Replies the plane on which this triangle is coplanar.
@return the coplanar plane to this triangle | [
"Replies",
"the",
"plane",
"on",
"which",
"this",
"triangle",
"is",
"coplanar",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractTriangle3F.java#L1599-L1605 | train |
gallandarakhneorg/afc | core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/stream/WriterOutputStream.java | WriterOutputStream.writeln | public void writeln(String text) throws IOException {
this.writer.write(text);
if (text != null && text.length() > 0) {
this.writer.write("\n"); //$NON-NLS-1$
}
} | java | public void writeln(String text) throws IOException {
this.writer.write(text);
if (text != null && text.length() > 0) {
this.writer.write("\n"); //$NON-NLS-1$
}
} | [
"public",
"void",
"writeln",
"(",
"String",
"text",
")",
"throws",
"IOException",
"{",
"this",
".",
"writer",
".",
"write",
"(",
"text",
")",
";",
"if",
"(",
"text",
"!=",
"null",
"&&",
"text",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"this",
... | Write a sequence of characters followed by a carriage return.
@param text text.
@throws IOException on error. | [
"Write",
"a",
"sequence",
"of",
"characters",
"followed",
"by",
"a",
"carriage",
"return",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/stream/WriterOutputStream.java#L67-L72 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java | IterableUtils.zip | public static <X, Y> Iterable<ZipPair<X, Y>> zip(final Iterable<X> iter1,
final Iterable<Y> iter2) {
return new ZipIterable<X, Y>(iter1, iter2);
} | java | public static <X, Y> Iterable<ZipPair<X, Y>> zip(final Iterable<X> iter1,
final Iterable<Y> iter2) {
return new ZipIterable<X, Y>(iter1, iter2);
} | [
"public",
"static",
"<",
"X",
",",
"Y",
">",
"Iterable",
"<",
"ZipPair",
"<",
"X",
",",
"Y",
">",
">",
"zip",
"(",
"final",
"Iterable",
"<",
"X",
">",
"iter1",
",",
"final",
"Iterable",
"<",
"Y",
">",
"iter2",
")",
"{",
"return",
"new",
"ZipItera... | An implementation of Python's zip. | [
"An",
"implementation",
"of",
"Python",
"s",
"zip",
"."
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java#L75-L78 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java | IterableUtils.reduce | public static <A, B> B reduce(final Iterable<A> iterable,
final B initial, final Function2<A, B> func) {
B b = initial;
for (final A item : iterable) {
b = func.apply(b, item);
}
return b;
} | java | public static <A, B> B reduce(final Iterable<A> iterable,
final B initial, final Function2<A, B> func) {
B b = initial;
for (final A item : iterable) {
b = func.apply(b, item);
}
return b;
} | [
"public",
"static",
"<",
"A",
",",
"B",
">",
"B",
"reduce",
"(",
"final",
"Iterable",
"<",
"A",
">",
"iterable",
",",
"final",
"B",
"initial",
",",
"final",
"Function2",
"<",
"A",
",",
"B",
">",
"func",
")",
"{",
"B",
"b",
"=",
"initial",
";",
... | reduces an iterable to a single value starting from an initial value and applying down the
iterable. | [
"reduces",
"an",
"iterable",
"to",
"a",
"single",
"value",
"starting",
"from",
"an",
"initial",
"value",
"and",
"applying",
"down",
"the",
"iterable",
"."
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java#L251-L258 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java | IterableUtils.mapFromPairedKeyValueSequences | public static <K, V> ImmutableMap<K, V> mapFromPairedKeyValueSequences(
final Iterable<K> keys, final Iterable<V> values) {
final ImmutableMap.Builder<K, V> builder = ImmutableMap.builder();
for (final ZipPair<K, V> pair : zip(keys, values)) {
builder.put(pair.first(), pair.second());
}
retu... | java | public static <K, V> ImmutableMap<K, V> mapFromPairedKeyValueSequences(
final Iterable<K> keys, final Iterable<V> values) {
final ImmutableMap.Builder<K, V> builder = ImmutableMap.builder();
for (final ZipPair<K, V> pair : zip(keys, values)) {
builder.put(pair.first(), pair.second());
}
retu... | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"ImmutableMap",
"<",
"K",
",",
"V",
">",
"mapFromPairedKeyValueSequences",
"(",
"final",
"Iterable",
"<",
"K",
">",
"keys",
",",
"final",
"Iterable",
"<",
"V",
">",
"values",
")",
"{",
"final",
"ImmutableMap",... | Given a paired sequence of Iterables, produce a map with keys from the first and values from
the second. An exception will be raised if the Iterables have different numbers of elements, or
if there are multiple mappings for the same key. | [
"Given",
"a",
"paired",
"sequence",
"of",
"Iterables",
"produce",
"a",
"map",
"with",
"keys",
"from",
"the",
"first",
"and",
"values",
"from",
"the",
"second",
".",
"An",
"exception",
"will",
"be",
"raised",
"if",
"the",
"Iterables",
"have",
"different",
"... | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java#L338-L345 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java | IterableUtils.allTheSame | @Deprecated
public static <T> boolean allTheSame(final Iterable<T> iterable) {
if (Iterables.isEmpty(iterable)) {
return true;
}
final T reference = Iterables.getFirst(iterable, null);
for (final T x : iterable) {
if (!x.equals(reference)) {
return false;
}
}
return... | java | @Deprecated
public static <T> boolean allTheSame(final Iterable<T> iterable) {
if (Iterables.isEmpty(iterable)) {
return true;
}
final T reference = Iterables.getFirst(iterable, null);
for (final T x : iterable) {
if (!x.equals(reference)) {
return false;
}
}
return... | [
"@",
"Deprecated",
"public",
"static",
"<",
"T",
">",
"boolean",
"allTheSame",
"(",
"final",
"Iterable",
"<",
"T",
">",
"iterable",
")",
"{",
"if",
"(",
"Iterables",
".",
"isEmpty",
"(",
"iterable",
")",
")",
"{",
"return",
"true",
";",
"}",
"final",
... | Prefer allEqual, whose name is less ambiguous between equality and identity
@deprecated | [
"Prefer",
"allEqual",
"whose",
"name",
"is",
"less",
"ambiguous",
"between",
"equality",
"and",
"identity"
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java#L360-L374 | train |
gallandarakhneorg/afc | advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/Vector1dfx.java | Vector1dfx.convert | public static Vector1dfx convert(Tuple1dfx<?> tuple) {
if (tuple instanceof Vector1dfx) {
return (Vector1dfx) tuple;
}
return new Vector1dfx(tuple.getSegment(), tuple.getX(), tuple.getY());
} | java | public static Vector1dfx convert(Tuple1dfx<?> tuple) {
if (tuple instanceof Vector1dfx) {
return (Vector1dfx) tuple;
}
return new Vector1dfx(tuple.getSegment(), tuple.getX(), tuple.getY());
} | [
"public",
"static",
"Vector1dfx",
"convert",
"(",
"Tuple1dfx",
"<",
"?",
">",
"tuple",
")",
"{",
"if",
"(",
"tuple",
"instanceof",
"Vector1dfx",
")",
"{",
"return",
"(",
"Vector1dfx",
")",
"tuple",
";",
"}",
"return",
"new",
"Vector1dfx",
"(",
"tuple",
"... | Convert the given tuple to a real Vector1dfx.
<p>If the given tuple is already a Vector1dfx, it is replied.
@param tuple the tuple.
@return the Vector1dfx.
@since 14.0 | [
"Convert",
"the",
"given",
"tuple",
"to",
"a",
"real",
"Vector1dfx",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/Vector1dfx.java#L157-L162 | train |
qiujuer/OkHttpPacker | okhttp/src/main/java/net/qiujuer/common/okhttp/impl/RequestCallBuilder.java | RequestCallBuilder.buildGetParams | protected boolean buildGetParams(StringBuilder sb, boolean isFirst) {
BuilderListener listener = mListener;
if (listener != null) {
return listener.onBuildGetParams(sb, isFirst);
} else {
return isFirst;
}
} | java | protected boolean buildGetParams(StringBuilder sb, boolean isFirst) {
BuilderListener listener = mListener;
if (listener != null) {
return listener.onBuildGetParams(sb, isFirst);
} else {
return isFirst;
}
} | [
"protected",
"boolean",
"buildGetParams",
"(",
"StringBuilder",
"sb",
",",
"boolean",
"isFirst",
")",
"{",
"BuilderListener",
"listener",
"=",
"mListener",
";",
"if",
"(",
"listener",
"!=",
"null",
")",
"{",
"return",
"listener",
".",
"onBuildGetParams",
"(",
... | In this we should add same default params to the get builder
@param sb Get Values
@param isFirst The Url and values is have "?" char
@return values is have "?" char | [
"In",
"this",
"we",
"should",
"add",
"same",
"default",
"params",
"to",
"the",
"get",
"builder"
] | d2d484facb66b7e11e6cbbfeb78025f76ce25ebd | https://github.com/qiujuer/OkHttpPacker/blob/d2d484facb66b7e11e6cbbfeb78025f76ce25ebd/okhttp/src/main/java/net/qiujuer/common/okhttp/impl/RequestCallBuilder.java#L59-L66 | train |
italiangrid/voms-clients | src/main/java/org/italiangrid/voms/clients/impl/DefaultVOMSProxyInitBehaviour.java | DefaultVOMSProxyInitBehaviour.extendedProxyTypeAsProxyType | private ProxyType extendedProxyTypeAsProxyType(ExtendedProxyType pt) {
switch (pt) {
case DRAFT_RFC:
return ProxyType.DRAFT_RFC;
case LEGACY:
return ProxyType.LEGACY;
case RFC3820:
return ProxyType.RFC3820;
default:
return null;
}
} | java | private ProxyType extendedProxyTypeAsProxyType(ExtendedProxyType pt) {
switch (pt) {
case DRAFT_RFC:
return ProxyType.DRAFT_RFC;
case LEGACY:
return ProxyType.LEGACY;
case RFC3820:
return ProxyType.RFC3820;
default:
return null;
}
} | [
"private",
"ProxyType",
"extendedProxyTypeAsProxyType",
"(",
"ExtendedProxyType",
"pt",
")",
"{",
"switch",
"(",
"pt",
")",
"{",
"case",
"DRAFT_RFC",
":",
"return",
"ProxyType",
".",
"DRAFT_RFC",
";",
"case",
"LEGACY",
":",
"return",
"ProxyType",
".",
"LEGACY",
... | Why we have to do this nonsense? | [
"Why",
"we",
"have",
"to",
"do",
"this",
"nonsense?"
] | 069cbe324c85286fa454bd78c3f76c23e97e5768 | https://github.com/italiangrid/voms-clients/blob/069cbe324c85286fa454bd78c3f76c23e97e5768/src/main/java/org/italiangrid/voms/clients/impl/DefaultVOMSProxyInitBehaviour.java#L317-L333 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.encodeBase26 | @Pure
@SuppressWarnings("checkstyle:magicnumber")
public static String encodeBase26(int number) {
final StringBuilder value = new StringBuilder();
int code = number;
do {
final int rest = code % 26;
value.insert(0, (char) ('A' + rest));
code = code / 26 - 1;
}
while (code >= 0);
return value.toSt... | java | @Pure
@SuppressWarnings("checkstyle:magicnumber")
public static String encodeBase26(int number) {
final StringBuilder value = new StringBuilder();
int code = number;
do {
final int rest = code % 26;
value.insert(0, (char) ('A' + rest));
code = code / 26 - 1;
}
while (code >= 0);
return value.toSt... | [
"@",
"Pure",
"@",
"SuppressWarnings",
"(",
"\"checkstyle:magicnumber\"",
")",
"public",
"static",
"String",
"encodeBase26",
"(",
"int",
"number",
")",
"{",
"final",
"StringBuilder",
"value",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"code",
"=",
"numb... | Replies a base 26 encoding string for the given
number.
@param number the number to encode.
@return the base 26 encoding.
@since 4.0 | [
"Replies",
"a",
"base",
"26",
"encoding",
"string",
"for",
"the",
"given",
"number",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L98-L110 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.getJavaToHTMLTranslationTable | @Pure
@SuppressWarnings("checkstyle:npathcomplexity")
public static Map<Character, String> getJavaToHTMLTranslationTable() {
Map<Character, String> map = null;
try {
LOCK.lock();
if (javaToHtmlTransTbl != null) {
map = javaToHtmlTransTbl.get();
}
} finally {
LOCK.unlock();
}
if (map != null... | java | @Pure
@SuppressWarnings("checkstyle:npathcomplexity")
public static Map<Character, String> getJavaToHTMLTranslationTable() {
Map<Character, String> map = null;
try {
LOCK.lock();
if (javaToHtmlTransTbl != null) {
map = javaToHtmlTransTbl.get();
}
} finally {
LOCK.unlock();
}
if (map != null... | [
"@",
"Pure",
"@",
"SuppressWarnings",
"(",
"\"checkstyle:npathcomplexity\"",
")",
"public",
"static",
"Map",
"<",
"Character",
",",
"String",
">",
"getJavaToHTMLTranslationTable",
"(",
")",
"{",
"Map",
"<",
"Character",
",",
"String",
">",
"map",
"=",
"null",
... | Replies the java-to-html's translation table.
<p>This method read the translations from the
resource file <code>HTML_TRANS_TBL</code>.
@return the translation table or <code>null</code> if none was found.
The translation table maps an ISO character code to its corresponding HTML entity.
@since 4.0 | [
"Replies",
"the",
"java",
"-",
"to",
"-",
"html",
"s",
"translation",
"table",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L195-L258 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.parseHTML | @Pure
@SuppressWarnings("checkstyle:magicnumber")
public static String parseHTML(String html) {
if (html == null) {
return null;
}
final Map<String, Integer> transTbl = getHtmlToJavaTranslationTable();
assert transTbl != null;
if (transTbl.isEmpty()) {
return html;
}
final Pattern pattern = Patter... | java | @Pure
@SuppressWarnings("checkstyle:magicnumber")
public static String parseHTML(String html) {
if (html == null) {
return null;
}
final Map<String, Integer> transTbl = getHtmlToJavaTranslationTable();
assert transTbl != null;
if (transTbl.isEmpty()) {
return html;
}
final Pattern pattern = Patter... | [
"@",
"Pure",
"@",
"SuppressWarnings",
"(",
"\"checkstyle:magicnumber\"",
")",
"public",
"static",
"String",
"parseHTML",
"(",
"String",
"html",
")",
"{",
"if",
"(",
"html",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Map",
"<",
"String",
... | Parse the given HTML text and replace all
the HTML entities by the corresponding unicode
character.
@param html is the HTML to convert.
@return the unicode representation of the given html text.
@since 4.0
@see #toHTML(String) | [
"Parse",
"the",
"given",
"HTML",
"text",
"and",
"replace",
"all",
"the",
"HTML",
"entities",
"by",
"the",
"corresponding",
"unicode",
"character",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L269-L317 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.toHTML | @Pure
public static String toHTML(String text) {
if (text == null) {
return null;
}
final Map<Character, String> transTbl = getJavaToHTMLTranslationTable();
assert transTbl != null;
if (transTbl.isEmpty()) {
return text;
}
final StringBuilder patternStr = new StringBuilder();
for (final Character... | java | @Pure
public static String toHTML(String text) {
if (text == null) {
return null;
}
final Map<Character, String> transTbl = getJavaToHTMLTranslationTable();
assert transTbl != null;
if (transTbl.isEmpty()) {
return text;
}
final StringBuilder patternStr = new StringBuilder();
for (final Character... | [
"@",
"Pure",
"public",
"static",
"String",
"toHTML",
"(",
"String",
"text",
")",
"{",
"if",
"(",
"text",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Map",
"<",
"Character",
",",
"String",
">",
"transTbl",
"=",
"getJavaToHTMLTranslationT... | Translate all the special character from the given
text to their equivalent HTML entities.
@param text is the text to convert.
@return the HTML text which is corresponding to the given text.
@since 4.0
@see #parseHTML(String) | [
"Translate",
"all",
"the",
"special",
"character",
"from",
"the",
"given",
"text",
"to",
"their",
"equivalent",
"HTML",
"entities",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L327-L371 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.cutStringAsArray | public static void cutStringAsArray(String text, CutStringCritera critera, List<String> output) {
cutStringAlgo(text, critera, new CutStringToArray(output));
} | java | public static void cutStringAsArray(String text, CutStringCritera critera, List<String> output) {
cutStringAlgo(text, critera, new CutStringToArray(output));
} | [
"public",
"static",
"void",
"cutStringAsArray",
"(",
"String",
"text",
",",
"CutStringCritera",
"critera",
",",
"List",
"<",
"String",
">",
"output",
")",
"{",
"cutStringAlgo",
"(",
"text",
",",
"critera",
",",
"new",
"CutStringToArray",
"(",
"output",
")",
... | Format the text to be sure that each line is not
more longer than the specified critera.
@param text is the string to cut
@param critera is the critera to respect.
@param output is the given {@code text} splitted in lines separated by <code>\n</code>.
@since 4.0 | [
"Format",
"the",
"text",
"to",
"be",
"sure",
"that",
"each",
"line",
"is",
"not",
"more",
"longer",
"than",
"the",
"specified",
"critera",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L412-L414 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.getMnemonicChar | @Pure
public static char getMnemonicChar(String text) {
if (text != null) {
final int pos = text.indexOf('&');
if ((pos != -1) && (pos < text.length() - 1)) {
return text.charAt(pos + 1);
}
}
return '\0';
} | java | @Pure
public static char getMnemonicChar(String text) {
if (text != null) {
final int pos = text.indexOf('&');
if ((pos != -1) && (pos < text.length() - 1)) {
return text.charAt(pos + 1);
}
}
return '\0';
} | [
"@",
"Pure",
"public",
"static",
"char",
"getMnemonicChar",
"(",
"String",
"text",
")",
"{",
"if",
"(",
"text",
"!=",
"null",
")",
"{",
"final",
"int",
"pos",
"=",
"text",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"(",
"pos",
"!=",
"-",... | Replies the character which follow the first '&'.
@param text is the text to scan.
@return the character that is following the first '&' or '<code>\0</code>' | [
"Replies",
"the",
"character",
"which",
"follow",
"the",
"first",
"&",
";",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L472-L481 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.removeMnemonicChar | @Pure
public static String removeMnemonicChar(String text) {
if (text == null) {
return text;
}
return text.replaceFirst("&", ""); //$NON-NLS-1$ //$NON-NLS-2$
} | java | @Pure
public static String removeMnemonicChar(String text) {
if (text == null) {
return text;
}
return text.replaceFirst("&", ""); //$NON-NLS-1$ //$NON-NLS-2$
} | [
"@",
"Pure",
"public",
"static",
"String",
"removeMnemonicChar",
"(",
"String",
"text",
")",
"{",
"if",
"(",
"text",
"==",
"null",
")",
"{",
"return",
"text",
";",
"}",
"return",
"text",
".",
"replaceFirst",
"(",
"\"&\"",
",",
"\"\"",
")",
";",
"//$NON... | Remove the mnemonic char from the specified string.
@param text is the text to scan.
@return the given text without the mnemonic character. | [
"Remove",
"the",
"mnemonic",
"char",
"from",
"the",
"specified",
"string",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L488-L494 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.getAccentTranslationTable | @Pure
@SuppressWarnings("checkstyle:npathcomplexity")
public static Map<Character, String> getAccentTranslationTable() {
Map<Character, String> map = null;
try {
LOCK.lock();
if (accentTransTbl != null) {
map = accentTransTbl.get();
}
} finally {
LOCK.unlock();
}
if (map != null) {
retur... | java | @Pure
@SuppressWarnings("checkstyle:npathcomplexity")
public static Map<Character, String> getAccentTranslationTable() {
Map<Character, String> map = null;
try {
LOCK.lock();
if (accentTransTbl != null) {
map = accentTransTbl.get();
}
} finally {
LOCK.unlock();
}
if (map != null) {
retur... | [
"@",
"Pure",
"@",
"SuppressWarnings",
"(",
"\"checkstyle:npathcomplexity\"",
")",
"public",
"static",
"Map",
"<",
"Character",
",",
"String",
">",
"getAccentTranslationTable",
"(",
")",
"{",
"Map",
"<",
"Character",
",",
"String",
">",
"map",
"=",
"null",
";",... | Replies the accent's translation table.
<p>This method read the translations from the
resource file <code>ACCENT_TRANS_TBL</code>.
@return the translation table or <code>null</code> if none was found. | [
"Replies",
"the",
"accent",
"s",
"translation",
"table",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L503-L556 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.removeAccents | @Pure
public static String removeAccents(String text) {
final Map<Character, String> map = getAccentTranslationTable();
if ((map == null) || (map.isEmpty())) {
return text;
}
return removeAccents(text, map);
} | java | @Pure
public static String removeAccents(String text) {
final Map<Character, String> map = getAccentTranslationTable();
if ((map == null) || (map.isEmpty())) {
return text;
}
return removeAccents(text, map);
} | [
"@",
"Pure",
"public",
"static",
"String",
"removeAccents",
"(",
"String",
"text",
")",
"{",
"final",
"Map",
"<",
"Character",
",",
"String",
">",
"map",
"=",
"getAccentTranslationTable",
"(",
")",
";",
"if",
"(",
"(",
"map",
"==",
"null",
")",
"||",
"... | Remove the accents inside the specified string.
@param text is the string into which the accents must be removed.
@return the given string without the accents | [
"Remove",
"the",
"accents",
"inside",
"the",
"specified",
"string",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L563-L570 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.split | @Pure
public static String[] split(char leftSeparator, char rightSeparator, String str) {
final SplitSeparatorToArrayAlgorithm algo = new SplitSeparatorToArrayAlgorithm();
splitSeparatorAlgorithm(leftSeparator, rightSeparator, str, algo);
return algo.toArray();
} | java | @Pure
public static String[] split(char leftSeparator, char rightSeparator, String str) {
final SplitSeparatorToArrayAlgorithm algo = new SplitSeparatorToArrayAlgorithm();
splitSeparatorAlgorithm(leftSeparator, rightSeparator, str, algo);
return algo.toArray();
} | [
"@",
"Pure",
"public",
"static",
"String",
"[",
"]",
"split",
"(",
"char",
"leftSeparator",
",",
"char",
"rightSeparator",
",",
"String",
"str",
")",
"{",
"final",
"SplitSeparatorToArrayAlgorithm",
"algo",
"=",
"new",
"SplitSeparatorToArrayAlgorithm",
"(",
")",
... | Split the given string according to the separators.
The separators are used to delimit the groups
of characters.
<p>Examples:
<ul>
<li><code>split('{','}',"{a}{b}{cd}")</code> returns the array
<code>["a","b","cd"]</code></li>
<li><code>split('{','}',"abcd")</code> returns the array
<code>["abcd"]</code></li>
<li><cod... | [
"Split",
"the",
"given",
"string",
"according",
"to",
"the",
"separators",
".",
"The",
"separators",
"are",
"used",
"to",
"delimit",
"the",
"groups",
"of",
"characters",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L639-L644 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.join | @Pure
public static <T> String join(char leftSeparator, char rightSeparator, @SuppressWarnings("unchecked") T... strs) {
final StringBuilder buffer = new StringBuilder();
for (final Object s : strs) {
buffer.append(leftSeparator);
if (s != null) {
buffer.append(s.toString());
}
buffer.append(rightS... | java | @Pure
public static <T> String join(char leftSeparator, char rightSeparator, @SuppressWarnings("unchecked") T... strs) {
final StringBuilder buffer = new StringBuilder();
for (final Object s : strs) {
buffer.append(leftSeparator);
if (s != null) {
buffer.append(s.toString());
}
buffer.append(rightS... | [
"@",
"Pure",
"public",
"static",
"<",
"T",
">",
"String",
"join",
"(",
"char",
"leftSeparator",
",",
"char",
"rightSeparator",
",",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"T",
"...",
"strs",
")",
"{",
"final",
"StringBuilder",
"buffer",
"=",
"... | Merge the given strings with to separators.
The separators are used to delimit the groups
of characters.
<p>Examples:
<ul>
<li><code>merge('{','}',"a","b","cd")</code> returns the string
<code>"{a}{b}{cd}"</code></li>
<li><code>merge('{','}',"a{bcd")</code> returns the string
<code>"{a{bcd}"</code></li>
</ul>
@param ... | [
"Merge",
"the",
"given",
"strings",
"with",
"to",
"separators",
".",
"The",
"separators",
"are",
"used",
"to",
"delimit",
"the",
"groups",
"of",
"characters",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L889-L900 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.toUpperCaseWithoutAccent | @Pure
public static String toUpperCaseWithoutAccent(String text, Map<Character, String> map) {
final StringBuilder buffer = new StringBuilder();
for (final char c : text.toCharArray()) {
final String trans = map.get(c);
if (trans != null) {
buffer.append(trans.toUpperCase());
} else {
buffer.appen... | java | @Pure
public static String toUpperCaseWithoutAccent(String text, Map<Character, String> map) {
final StringBuilder buffer = new StringBuilder();
for (final char c : text.toCharArray()) {
final String trans = map.get(c);
if (trans != null) {
buffer.append(trans.toUpperCase());
} else {
buffer.appen... | [
"@",
"Pure",
"public",
"static",
"String",
"toUpperCaseWithoutAccent",
"(",
"String",
"text",
",",
"Map",
"<",
"Character",
",",
"String",
">",
"map",
")",
"{",
"final",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"fi... | Translate the specified string to upper case and remove the accents.
@param text is the text to scan.
@param map is the translation table from an accentuated character to an
unaccentuated character.
@return the given string without the accents and upper cased | [
"Translate",
"the",
"specified",
"string",
"to",
"upper",
"case",
"and",
"remove",
"the",
"accents",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L1439-L1451 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.formatDouble | @Pure
public static String formatDouble(double amount, int decimalCount) {
final int dc = (decimalCount < 0) ? 0 : decimalCount;
final StringBuilder str = new StringBuilder("#0"); //$NON-NLS-1$
if (dc > 0) {
str.append('.');
for (int i = 0; i < dc; ++i) {
str.append('0');
}
}
final DecimalFor... | java | @Pure
public static String formatDouble(double amount, int decimalCount) {
final int dc = (decimalCount < 0) ? 0 : decimalCount;
final StringBuilder str = new StringBuilder("#0"); //$NON-NLS-1$
if (dc > 0) {
str.append('.');
for (int i = 0; i < dc; ++i) {
str.append('0');
}
}
final DecimalFor... | [
"@",
"Pure",
"public",
"static",
"String",
"formatDouble",
"(",
"double",
"amount",
",",
"int",
"decimalCount",
")",
"{",
"final",
"int",
"dc",
"=",
"(",
"decimalCount",
"<",
"0",
")",
"?",
"0",
":",
"decimalCount",
";",
"final",
"StringBuilder",
"str",
... | Format the given double value.
@param amount the value to convert.
@param decimalCount is the maximal count of decimal to put in the string.
@return a string representation of the given value. | [
"Format",
"the",
"given",
"double",
"value",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L1639-L1654 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.getLevenshteinDistance | public static int getLevenshteinDistance(String firstString, String secondString) {
final String s0 = firstString == null ? "" : firstString; //$NON-NLS-1$
final String s1 = secondString == null ? "" : secondString; //$NON-NLS-1$
final int len0 = s0.length() + 1;
final int len1 = s1.length() + 1;
// the arr... | java | public static int getLevenshteinDistance(String firstString, String secondString) {
final String s0 = firstString == null ? "" : firstString; //$NON-NLS-1$
final String s1 = secondString == null ? "" : secondString; //$NON-NLS-1$
final int len0 = s0.length() + 1;
final int len1 = s1.length() + 1;
// the arr... | [
"public",
"static",
"int",
"getLevenshteinDistance",
"(",
"String",
"firstString",
",",
"String",
"secondString",
")",
"{",
"final",
"String",
"s0",
"=",
"firstString",
"==",
"null",
"?",
"\"\"",
":",
"firstString",
";",
"//$NON-NLS-1$",
"final",
"String",
"s1",... | Compute the Levenshstein distance between two strings.
<p>Null string is assimilated to the empty string.
@param firstString first string.
@param secondString second string.
@return the Levenshstein distance.
@see "https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance" | [
"Compute",
"the",
"Levenshstein",
"distance",
"between",
"two",
"strings",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L1688-L1733 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.toJavaString | @Pure
public static String toJavaString(String text) {
final StringEscaper escaper = new StringEscaper();
return escaper.escape(text);
} | java | @Pure
public static String toJavaString(String text) {
final StringEscaper escaper = new StringEscaper();
return escaper.escape(text);
} | [
"@",
"Pure",
"public",
"static",
"String",
"toJavaString",
"(",
"String",
"text",
")",
"{",
"final",
"StringEscaper",
"escaper",
"=",
"new",
"StringEscaper",
"(",
")",
";",
"return",
"escaper",
".",
"escape",
"(",
"text",
")",
";",
"}"
] | Translate the given string to its Java string equivalent.
All the special characters will be escaped. The enclosing double quote
characters are not added.
<p>The Java special characters are listed within {@link StringEscaper#JAVA_SPECIAL_CHARS}.
Any character outside the range [{@link StringEscaper#JAVA_MIN_CHAR}, {@l... | [
"Translate",
"the",
"given",
"string",
"to",
"its",
"Java",
"string",
"equivalent",
".",
"All",
"the",
"special",
"characters",
"will",
"be",
"escaped",
".",
"The",
"enclosing",
"double",
"quote",
"characters",
"are",
"not",
"added",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L1747-L1751 | train |
gallandarakhneorg/afc | core/text/src/main/java/org/arakhne/afc/text/TextUtil.java | TextUtil.toJsonString | @Pure
public static String toJsonString(String text) {
final StringEscaper escaper = new StringEscaper(
StringEscaper.JAVA_ESCAPE_CHAR,
StringEscaper.JAVA_STRING_CHAR, StringEscaper.JAVA_ESCAPE_CHAR, StringEscaper.JSON_SPECIAL_ESCAPED_CHAR);
return escaper.escape(text);
} | java | @Pure
public static String toJsonString(String text) {
final StringEscaper escaper = new StringEscaper(
StringEscaper.JAVA_ESCAPE_CHAR,
StringEscaper.JAVA_STRING_CHAR, StringEscaper.JAVA_ESCAPE_CHAR, StringEscaper.JSON_SPECIAL_ESCAPED_CHAR);
return escaper.escape(text);
} | [
"@",
"Pure",
"public",
"static",
"String",
"toJsonString",
"(",
"String",
"text",
")",
"{",
"final",
"StringEscaper",
"escaper",
"=",
"new",
"StringEscaper",
"(",
"StringEscaper",
".",
"JAVA_ESCAPE_CHAR",
",",
"StringEscaper",
".",
"JAVA_STRING_CHAR",
",",
"String... | Translate the given string to its Json string equivalent.
All the special characters will be escaped. The enclosing double quote
characters are not added.
<p>The Json escaping extends the {@link #toJavaString(String) Java escaping} by
protecting the {@code /} character.
@param text is the text to convert.
@return the... | [
"Translate",
"the",
"given",
"string",
"to",
"its",
"Json",
"string",
"equivalent",
".",
"All",
"the",
"special",
"characters",
"will",
"be",
"escaped",
".",
"The",
"enclosing",
"double",
"quote",
"characters",
"are",
"not",
"added",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/text/src/main/java/org/arakhne/afc/text/TextUtil.java#L1764-L1770 | train |
gallandarakhneorg/afc | advanced/bootique/bootique-variables/src/main/java/org/arakhne/afc/bootique/variables/VariableDecls.java | VariableDecls.extend | public static VariableDecls extend(Binder binder) {
return new VariableDecls(io.bootique.BQCoreModule.extend(binder));
} | java | public static VariableDecls extend(Binder binder) {
return new VariableDecls(io.bootique.BQCoreModule.extend(binder));
} | [
"public",
"static",
"VariableDecls",
"extend",
"(",
"Binder",
"binder",
")",
"{",
"return",
"new",
"VariableDecls",
"(",
"io",
".",
"bootique",
".",
"BQCoreModule",
".",
"extend",
"(",
"binder",
")",
")",
";",
"}"
] | Create an extended from the given binder.
@param binder the injection binder.
@return the variable declarator. | [
"Create",
"an",
"extended",
"from",
"the",
"given",
"binder",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/bootique/bootique-variables/src/main/java/org/arakhne/afc/bootique/variables/VariableDecls.java#L52-L54 | train |
gallandarakhneorg/afc | advanced/bootique/bootique-variables/src/main/java/org/arakhne/afc/bootique/variables/VariableDecls.java | VariableDecls.declareVar | public VariableDecls declareVar(String bootiqueVariable) {
this.extender.declareVar(bootiqueVariable, VariableNames.toEnvironmentVariableName(bootiqueVariable));
return this;
} | java | public VariableDecls declareVar(String bootiqueVariable) {
this.extender.declareVar(bootiqueVariable, VariableNames.toEnvironmentVariableName(bootiqueVariable));
return this;
} | [
"public",
"VariableDecls",
"declareVar",
"(",
"String",
"bootiqueVariable",
")",
"{",
"this",
".",
"extender",
".",
"declareVar",
"(",
"bootiqueVariable",
",",
"VariableNames",
".",
"toEnvironmentVariableName",
"(",
"bootiqueVariable",
")",
")",
";",
"return",
"this... | Declare an environment variable which is linked to the given Bootique variable, and has its name defined
from the name of the Bootique variable.
@param bootiqueVariable the name of the bootique variable.
@return the Bootique extender. | [
"Declare",
"an",
"environment",
"variable",
"which",
"is",
"linked",
"to",
"the",
"given",
"Bootique",
"variable",
"and",
"has",
"its",
"name",
"defined",
"from",
"the",
"name",
"of",
"the",
"Bootique",
"variable",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/bootique/bootique-variables/src/main/java/org/arakhne/afc/bootique/variables/VariableDecls.java#L62-L65 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusItineraryLayer.java | BusItineraryLayer.initializeElements | protected void initializeElements() {
final BusItinerary itinerary = getBusItinerary();
if (itinerary != null) {
int i = 0;
for (final BusItineraryHalt halt : itinerary.busHalts()) {
onBusItineraryHaltAdded(halt, i, null);
++i;
}
}
} | java | protected void initializeElements() {
final BusItinerary itinerary = getBusItinerary();
if (itinerary != null) {
int i = 0;
for (final BusItineraryHalt halt : itinerary.busHalts()) {
onBusItineraryHaltAdded(halt, i, null);
++i;
}
}
} | [
"protected",
"void",
"initializeElements",
"(",
")",
"{",
"final",
"BusItinerary",
"itinerary",
"=",
"getBusItinerary",
"(",
")",
";",
"if",
"(",
"itinerary",
"!=",
"null",
")",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"final",
"BusItineraryHalt",
"halt... | Run the initialization of the elements from the current bus itinerary.
<p>This function is invoked by the constructor of BusItineraryLayer
if its parameter <var>autoUpdate</var> is <code>true</code>, and
not invoked if this parameter is <code>false</code>. | [
"Run",
"the",
"initialization",
"of",
"the",
"elements",
"from",
"the",
"current",
"bus",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/layer/BusItineraryLayer.java#L254-L263 | train |
gallandarakhneorg/afc | core/references/src/main/java/org/arakhne/afc/references/AbstractReferencedValueMap.java | AbstractReferencedValueMap.maskNull | @Pure
@SuppressWarnings("unchecked")
protected static <VALUET> VALUET maskNull(VALUET value) {
return (value == null) ? (VALUET) NULL_VALUE : value;
} | java | @Pure
@SuppressWarnings("unchecked")
protected static <VALUET> VALUET maskNull(VALUET value) {
return (value == null) ? (VALUET) NULL_VALUE : value;
} | [
"@",
"Pure",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"static",
"<",
"VALUET",
">",
"VALUET",
"maskNull",
"(",
"VALUET",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"null",
")",
"?",
"(",
"VALUET",
")",
"NULL_VALUE",
":",
"va... | Mask the null values given by the used of this map.
<p>This method replaces the <code>null</code> value by
the internal representation {@link #NULL_VALUE}.
@param <VALUET> is the type of the value.
@param value is the value given by the user of this map.
@return the internal representation of the value.
@see #unmaskN... | [
"Mask",
"the",
"null",
"values",
"given",
"by",
"the",
"used",
"of",
"this",
"map",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/references/src/main/java/org/arakhne/afc/references/AbstractReferencedValueMap.java#L94-L98 | train |
gallandarakhneorg/afc | core/references/src/main/java/org/arakhne/afc/references/AbstractReferencedValueMap.java | AbstractReferencedValueMap.unmaskNull | @Pure
protected static <VALUET> VALUET unmaskNull(VALUET value) {
return (value == NULL_VALUE) ? null : value;
} | java | @Pure
protected static <VALUET> VALUET unmaskNull(VALUET value) {
return (value == NULL_VALUE) ? null : value;
} | [
"@",
"Pure",
"protected",
"static",
"<",
"VALUET",
">",
"VALUET",
"unmaskNull",
"(",
"VALUET",
"value",
")",
"{",
"return",
"(",
"value",
"==",
"NULL_VALUE",
")",
"?",
"null",
":",
"value",
";",
"}"
] | Unmask the null values given by the used of this map.
<p>This method replaces the internal representation
{@link #NULL_VALUE} of null values by its user representation
<code>null</code>.
@param <VALUET> is the type of the value.
@param value is the value given by the user of this map.
@return the internal representat... | [
"Unmask",
"the",
"null",
"values",
"given",
"by",
"the",
"used",
"of",
"this",
"map",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/references/src/main/java/org/arakhne/afc/references/AbstractReferencedValueMap.java#L111-L114 | train |
gallandarakhneorg/afc | core/references/src/main/java/org/arakhne/afc/references/AbstractReferencedValueMap.java | AbstractReferencedValueMap.finishToArray | @SuppressWarnings("unchecked")
static <T> T[] finishToArray(T[] array, Iterator<?> it) {
T[] rp = array;
int i = rp.length;
while (it.hasNext()) {
final int cap = rp.length;
if (i == cap) {
int newCap = ((cap / 2) + 1) * 3;
if (newCap <= cap) {
// integer overflow
if (cap == Integer.MAX_V... | java | @SuppressWarnings("unchecked")
static <T> T[] finishToArray(T[] array, Iterator<?> it) {
T[] rp = array;
int i = rp.length;
while (it.hasNext()) {
final int cap = rp.length;
if (i == cap) {
int newCap = ((cap / 2) + 1) * 3;
if (newCap <= cap) {
// integer overflow
if (cap == Integer.MAX_V... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"static",
"<",
"T",
">",
"T",
"[",
"]",
"finishToArray",
"(",
"T",
"[",
"]",
"array",
",",
"Iterator",
"<",
"?",
">",
"it",
")",
"{",
"T",
"[",
"]",
"rp",
"=",
"array",
";",
"int",
"i",
"=",
"... | Reallocates the array being used within toArray when the iterator
returned more elements than expected, and finishes filling it from
the iterator.
@param <T> the type of the elements in the array.
@param array the array, replete with previously stored elements
@param it the in-progress iterator over this collection
@r... | [
"Reallocates",
"the",
"array",
"being",
"used",
"within",
"toArray",
"when",
"the",
"iterator",
"returned",
"more",
"elements",
"than",
"expected",
"and",
"finishes",
"filling",
"it",
"from",
"the",
"iterator",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/references/src/main/java/org/arakhne/afc/references/AbstractReferencedValueMap.java#L127-L148 | train |
gallandarakhneorg/afc | core/references/src/main/java/org/arakhne/afc/references/AbstractReferencedValueMap.java | AbstractReferencedValueMap.makeValue | protected final ReferencableValue<K, V> makeValue(K key, V value) {
return makeValue(key, value, this.queue);
} | java | protected final ReferencableValue<K, V> makeValue(K key, V value) {
return makeValue(key, value, this.queue);
} | [
"protected",
"final",
"ReferencableValue",
"<",
"K",
",",
"V",
">",
"makeValue",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"return",
"makeValue",
"(",
"key",
",",
"value",
",",
"this",
".",
"queue",
")",
";",
"}"
] | Create a storage object that permits to put the specified
elements inside this map.
@param key is the key associated to the value
@param value is the value
@return the new storage object | [
"Create",
"a",
"storage",
"object",
"that",
"permits",
"to",
"put",
"the",
"specified",
"elements",
"inside",
"this",
"map",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/references/src/main/java/org/arakhne/afc/references/AbstractReferencedValueMap.java#L242-L244 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.getFirstFreeBusItineraryName | @Pure
public static String getFirstFreeBusItineraryName(BusLine busline) {
if (busline == null) {
return null;
}
int nb = busline.getBusItineraryCount();
String name;
do {
++nb;
name = Locale.getString("NAME_TEMPLATE", Integer.toString(nb)); //$NON-NLS-1$
}
while (busline.getBusItinerary(name) !... | java | @Pure
public static String getFirstFreeBusItineraryName(BusLine busline) {
if (busline == null) {
return null;
}
int nb = busline.getBusItineraryCount();
String name;
do {
++nb;
name = Locale.getString("NAME_TEMPLATE", Integer.toString(nb)); //$NON-NLS-1$
}
while (busline.getBusItinerary(name) !... | [
"@",
"Pure",
"public",
"static",
"String",
"getFirstFreeBusItineraryName",
"(",
"BusLine",
"busline",
")",
"{",
"if",
"(",
"busline",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"int",
"nb",
"=",
"busline",
".",
"getBusItineraryCount",
"(",
")",
";... | Replies a bus itinerary name that was not exist in the specified
bus line.
@param busline the line.
@return a free name | [
"Replies",
"a",
"bus",
"itinerary",
"name",
"that",
"was",
"not",
"exist",
"in",
"the",
"specified",
"bus",
"line",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L286-L299 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.invert | public void invert() {
final boolean isEventFirable = isEventFirable();
setEventFirable(false);
try {
final int count = this.roadSegments.getRoadSegmentCount();
// Invert the segments
this.roadSegments.invert();
// Invert the bus halts and their indexes.
final int middle = this.validHalts.size() ... | java | public void invert() {
final boolean isEventFirable = isEventFirable();
setEventFirable(false);
try {
final int count = this.roadSegments.getRoadSegmentCount();
// Invert the segments
this.roadSegments.invert();
// Invert the bus halts and their indexes.
final int middle = this.validHalts.size() ... | [
"public",
"void",
"invert",
"(",
")",
"{",
"final",
"boolean",
"isEventFirable",
"=",
"isEventFirable",
"(",
")",
";",
"setEventFirable",
"(",
"false",
")",
";",
"try",
"{",
"final",
"int",
"count",
"=",
"this",
".",
"roadSegments",
".",
"getRoadSegmentCount... | Invert the order of this itinerary.
<p>This function reverses the direction of the itinerary, ie. the order
of the road segments of the itinerary.
<p>This function does not reverse the location of the bus halts on the itinerary.
Their locations will be unchanged. | [
"Invert",
"the",
"order",
"of",
"this",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L711-L753 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.hasBusHaltOnSegment | @Pure
public boolean hasBusHaltOnSegment(RoadSegment segment) {
if (this.roadSegments.isEmpty() || this.validHalts.isEmpty()) {
return false;
}
int cIdxSegment;
int lIdxSegment = -1;
RoadSegment cSegment;
for (final BusItineraryHalt bushalt : this.validHalts) {
cIdxSegment = bushalt.getRoadSegmentI... | java | @Pure
public boolean hasBusHaltOnSegment(RoadSegment segment) {
if (this.roadSegments.isEmpty() || this.validHalts.isEmpty()) {
return false;
}
int cIdxSegment;
int lIdxSegment = -1;
RoadSegment cSegment;
for (final BusItineraryHalt bushalt : this.validHalts) {
cIdxSegment = bushalt.getRoadSegmentI... | [
"@",
"Pure",
"public",
"boolean",
"hasBusHaltOnSegment",
"(",
"RoadSegment",
"segment",
")",
"{",
"if",
"(",
"this",
".",
"roadSegments",
".",
"isEmpty",
"(",
")",
"||",
"this",
".",
"validHalts",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"false",
";... | Replies if the given segment has a bus halt on it.
@param segment is the segment to search on.
@return <code>true</code> if a bus halt was located on the segment,
otherwhise <code>false</code> | [
"Replies",
"if",
"the",
"given",
"segment",
"has",
"a",
"bus",
"halt",
"on",
"it",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L761-L784 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.getBusHaltsOnSegment | @Pure
public List<BusItineraryHalt> getBusHaltsOnSegment(RoadSegment segment) {
if (this.roadSegments.isEmpty() || this.validHalts.isEmpty()) {
return Collections.emptyList();
}
int cIdxSegment;
int lIdxSegment = -1;
int sIdxSegment = -1;
RoadSegment cSegment;
final List<BusItineraryHalt> halts = ne... | java | @Pure
public List<BusItineraryHalt> getBusHaltsOnSegment(RoadSegment segment) {
if (this.roadSegments.isEmpty() || this.validHalts.isEmpty()) {
return Collections.emptyList();
}
int cIdxSegment;
int lIdxSegment = -1;
int sIdxSegment = -1;
RoadSegment cSegment;
final List<BusItineraryHalt> halts = ne... | [
"@",
"Pure",
"public",
"List",
"<",
"BusItineraryHalt",
">",
"getBusHaltsOnSegment",
"(",
"RoadSegment",
"segment",
")",
"{",
"if",
"(",
"this",
".",
"roadSegments",
".",
"isEmpty",
"(",
")",
"||",
"this",
".",
"validHalts",
".",
"isEmpty",
"(",
")",
")",
... | Replies the bus halts on the given segment.
@param segment is the segment to search on.
@return the list of bus halts. | [
"Replies",
"the",
"bus",
"halts",
"on",
"the",
"given",
"segment",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L791-L823 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.getBusHaltBinding | @Pure
public Map<BusItineraryHalt, Pair<Integer, Double>> getBusHaltBinding() {
final Comparator<BusItineraryHalt> comp = (elt1, elt2) -> {
if (elt1 == elt2) {
return 0;
}
if (elt1 == null) {
return -1;
}
if (elt2 == null) {
return 1;
}
return elt1.getName().compareTo(elt2.getName())... | java | @Pure
public Map<BusItineraryHalt, Pair<Integer, Double>> getBusHaltBinding() {
final Comparator<BusItineraryHalt> comp = (elt1, elt2) -> {
if (elt1 == elt2) {
return 0;
}
if (elt1 == null) {
return -1;
}
if (elt2 == null) {
return 1;
}
return elt1.getName().compareTo(elt2.getName())... | [
"@",
"Pure",
"public",
"Map",
"<",
"BusItineraryHalt",
",",
"Pair",
"<",
"Integer",
",",
"Double",
">",
">",
"getBusHaltBinding",
"(",
")",
"{",
"final",
"Comparator",
"<",
"BusItineraryHalt",
">",
"comp",
"=",
"(",
"elt1",
",",
"elt2",
")",
"->",
"{",
... | Replies the binding informations for all the bus halts of this itinerary.
@return the pairs containing the index of the road segment and the
curviline position of each bus itinerary halt. | [
"Replies",
"the",
"binding",
"informations",
"for",
"all",
"the",
"bus",
"halts",
"of",
"this",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L830-L851 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.setBusHaltBinding | public void setBusHaltBinding(Map<BusItineraryHalt, Pair<Integer, Float>> binding) {
if (binding != null) {
BusItineraryHalt halt;
boolean shapeChanged = false;
for (final Entry<BusItineraryHalt, Pair<Integer, Float>> entry : binding.entrySet()) {
halt = entry.getKey();
halt.setRoadSegmentIndex(entry... | java | public void setBusHaltBinding(Map<BusItineraryHalt, Pair<Integer, Float>> binding) {
if (binding != null) {
BusItineraryHalt halt;
boolean shapeChanged = false;
for (final Entry<BusItineraryHalt, Pair<Integer, Float>> entry : binding.entrySet()) {
halt = entry.getKey();
halt.setRoadSegmentIndex(entry... | [
"public",
"void",
"setBusHaltBinding",
"(",
"Map",
"<",
"BusItineraryHalt",
",",
"Pair",
"<",
"Integer",
",",
"Float",
">",
">",
"binding",
")",
"{",
"if",
"(",
"binding",
"!=",
"null",
")",
"{",
"BusItineraryHalt",
"halt",
";",
"boolean",
"shapeChanged",
... | Set the binding informations for all the bus halts of this itinerary.
@param binding are the pairs containing the index of the road segment and the
curviline position of each bus itinerary halt. | [
"Set",
"the",
"binding",
"informations",
"for",
"all",
"the",
"bus",
"halts",
"of",
"this",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L858-L880 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.getLength | @Pure
public double getLength() {
double length = this.roadSegments.getLength();
if (isValidPrimitive()) {
BusItineraryHalt halt = this.validHalts.get(0);
assert halt != null;
RoadSegment sgmt = halt.getRoadSegment();
assert sgmt != null;
Direction1D dir = this.roadSegments.getRoadSegmentDirectionAt... | java | @Pure
public double getLength() {
double length = this.roadSegments.getLength();
if (isValidPrimitive()) {
BusItineraryHalt halt = this.validHalts.get(0);
assert halt != null;
RoadSegment sgmt = halt.getRoadSegment();
assert sgmt != null;
Direction1D dir = this.roadSegments.getRoadSegmentDirectionAt... | [
"@",
"Pure",
"public",
"double",
"getLength",
"(",
")",
"{",
"double",
"length",
"=",
"this",
".",
"roadSegments",
".",
"getLength",
"(",
")",
";",
"if",
"(",
"isValidPrimitive",
"(",
")",
")",
"{",
"BusItineraryHalt",
"halt",
"=",
"this",
".",
"validHal... | Replies the length of this itinerary.
<p>If the itinerary is valid, replies the distance
between the start bus halt and the terminus.
If the itinerary is not valid, replies the sum
of the road segment lengths.
@return the length of the itinerary. | [
"Replies",
"the",
"length",
"of",
"this",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L892-L925 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.getDistanceBetweenBusHalts | @Pure
public double getDistanceBetweenBusHalts(int firsthaltIndex, int lasthaltIndex) {
if (firsthaltIndex < 0 || firsthaltIndex >= this.validHalts.size() - 1) {
throw new ArrayIndexOutOfBoundsException(firsthaltIndex);
}
if (lasthaltIndex <= firsthaltIndex || lasthaltIndex >= this.validHalts.size()) {
thr... | java | @Pure
public double getDistanceBetweenBusHalts(int firsthaltIndex, int lasthaltIndex) {
if (firsthaltIndex < 0 || firsthaltIndex >= this.validHalts.size() - 1) {
throw new ArrayIndexOutOfBoundsException(firsthaltIndex);
}
if (lasthaltIndex <= firsthaltIndex || lasthaltIndex >= this.validHalts.size()) {
thr... | [
"@",
"Pure",
"public",
"double",
"getDistanceBetweenBusHalts",
"(",
"int",
"firsthaltIndex",
",",
"int",
"lasthaltIndex",
")",
"{",
"if",
"(",
"firsthaltIndex",
"<",
"0",
"||",
"firsthaltIndex",
">=",
"this",
".",
"validHalts",
".",
"size",
"(",
")",
"-",
"1... | Replies the distance between two bus halt.
@param firsthaltIndex is the index of the first bus halt.
@param lasthaltIndex is the index of the last bus halt.
@return the distance in meters between the given bus halts. | [
"Replies",
"the",
"distance",
"between",
"two",
"bus",
"halt",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L934-L970 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.addBusHalt | boolean addBusHalt(BusItineraryHalt halt, int insertToIndex) {
//set index for right ordering when add to invalid list !
if (insertToIndex < 0) {
halt.setInvalidListIndex(this.insertionIndex);
} else {
halt.setInvalidListIndex(insertToIndex);
}
if (halt.isValidPrimitive()) {
ListUtil.addIfAbsent(thi... | java | boolean addBusHalt(BusItineraryHalt halt, int insertToIndex) {
//set index for right ordering when add to invalid list !
if (insertToIndex < 0) {
halt.setInvalidListIndex(this.insertionIndex);
} else {
halt.setInvalidListIndex(insertToIndex);
}
if (halt.isValidPrimitive()) {
ListUtil.addIfAbsent(thi... | [
"boolean",
"addBusHalt",
"(",
"BusItineraryHalt",
"halt",
",",
"int",
"insertToIndex",
")",
"{",
"//set index for right ordering when add to invalid list !",
"if",
"(",
"insertToIndex",
"<",
"0",
")",
"{",
"halt",
".",
"setInvalidListIndex",
"(",
"this",
".",
"inserti... | Add the given bus halt in this itinerary.
@param halt the halt.
@param insertToIndex the insertion index.
@return <code>true</code> if the addition was successful, <code>false</code>
otherwise. | [
"Add",
"the",
"given",
"bus",
"halt",
"in",
"this",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1127-L1151 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.removeAllBusHalts | public void removeAllBusHalts() {
for (final BusItineraryHalt bushalt : this.invalidHalts) {
bushalt.setContainer(null);
bushalt.setRoadSegmentIndex(-1);
bushalt.setPositionOnSegment(Float.NaN);
bushalt.checkPrimitiveValidity();
}
final BusItineraryHalt[] halts = new BusItineraryHalt[this.validHalts... | java | public void removeAllBusHalts() {
for (final BusItineraryHalt bushalt : this.invalidHalts) {
bushalt.setContainer(null);
bushalt.setRoadSegmentIndex(-1);
bushalt.setPositionOnSegment(Float.NaN);
bushalt.checkPrimitiveValidity();
}
final BusItineraryHalt[] halts = new BusItineraryHalt[this.validHalts... | [
"public",
"void",
"removeAllBusHalts",
"(",
")",
"{",
"for",
"(",
"final",
"BusItineraryHalt",
"bushalt",
":",
"this",
".",
"invalidHalts",
")",
"{",
"bushalt",
".",
"setContainer",
"(",
"null",
")",
";",
"bushalt",
".",
"setRoadSegmentIndex",
"(",
"-",
"1",... | Remove all the bus halts from the current itinerary. | [
"Remove",
"all",
"the",
"bus",
"halts",
"from",
"the",
"current",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1299-L1328 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.removeBusHalt | public boolean removeBusHalt(BusItineraryHalt bushalt) {
try {
int index = ListUtil.indexOf(this.validHalts, VALID_HALT_COMPARATOR, bushalt);
if (index >= 0) {
return removeBusHalt(index);
}
index = ListUtil.indexOf(this.invalidHalts, INVALID_HALT_COMPARATOR, bushalt);
if (index >= 0) {
index +... | java | public boolean removeBusHalt(BusItineraryHalt bushalt) {
try {
int index = ListUtil.indexOf(this.validHalts, VALID_HALT_COMPARATOR, bushalt);
if (index >= 0) {
return removeBusHalt(index);
}
index = ListUtil.indexOf(this.invalidHalts, INVALID_HALT_COMPARATOR, bushalt);
if (index >= 0) {
index +... | [
"public",
"boolean",
"removeBusHalt",
"(",
"BusItineraryHalt",
"bushalt",
")",
"{",
"try",
"{",
"int",
"index",
"=",
"ListUtil",
".",
"indexOf",
"(",
"this",
".",
"validHalts",
",",
"VALID_HALT_COMPARATOR",
",",
"bushalt",
")",
";",
"if",
"(",
"index",
">=",... | Remove a bus bus from this itinerary.
@param bushalt is the bus halt to remove.
@return <code>true</code> if the bus halt was successfully removed, otherwise <code>false</code> | [
"Remove",
"a",
"bus",
"bus",
"from",
"this",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1336-L1351 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.removeBusHalt | public boolean removeBusHalt(String name) {
Iterator<BusItineraryHalt> iterator = this.validHalts.iterator();
BusItineraryHalt bushalt;
int i = 0;
while (iterator.hasNext()) {
bushalt = iterator.next();
if (name.equals(bushalt.getName())) {
return removeBusHalt(i);
}
++i;
}
iterator = this.... | java | public boolean removeBusHalt(String name) {
Iterator<BusItineraryHalt> iterator = this.validHalts.iterator();
BusItineraryHalt bushalt;
int i = 0;
while (iterator.hasNext()) {
bushalt = iterator.next();
if (name.equals(bushalt.getName())) {
return removeBusHalt(i);
}
++i;
}
iterator = this.... | [
"public",
"boolean",
"removeBusHalt",
"(",
"String",
"name",
")",
"{",
"Iterator",
"<",
"BusItineraryHalt",
">",
"iterator",
"=",
"this",
".",
"validHalts",
".",
"iterator",
"(",
")",
";",
"BusItineraryHalt",
"bushalt",
";",
"int",
"i",
"=",
"0",
";",
"whi... | Remove the bus halt with the given name.
@param name is the name of the bus halt to remove.
@return <code>true</code> if the bus halt was successfully removed, otherwise <code>false</code> | [
"Remove",
"the",
"bus",
"halt",
"with",
"the",
"given",
"name",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1359-L1382 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.removeBusHalt | public boolean removeBusHalt(int index) {
try {
final BusItineraryHalt removedBushalt;
if (index < this.validHalts.size()) {
removedBushalt = this.validHalts.remove(index);
} else {
final int idx = index - this.validHalts.size();
removedBushalt = this.invalidHalts.remove(idx);
}
removedBush... | java | public boolean removeBusHalt(int index) {
try {
final BusItineraryHalt removedBushalt;
if (index < this.validHalts.size()) {
removedBushalt = this.validHalts.remove(index);
} else {
final int idx = index - this.validHalts.size();
removedBushalt = this.invalidHalts.remove(idx);
}
removedBush... | [
"public",
"boolean",
"removeBusHalt",
"(",
"int",
"index",
")",
"{",
"try",
"{",
"final",
"BusItineraryHalt",
"removedBushalt",
";",
"if",
"(",
"index",
"<",
"this",
".",
"validHalts",
".",
"size",
"(",
")",
")",
"{",
"removedBushalt",
"=",
"this",
".",
... | Remove the bus halt at the specified index.
@param index is the index of the bus halt to remove.
@return <code>true</code> if the bus halt was successfully removed, otherwise <code>false</code> | [
"Remove",
"the",
"bus",
"halt",
"at",
"the",
"specified",
"index",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1390-L1417 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.indexOf | @Pure
public int indexOf(BusItineraryHalt bushalt) {
if (bushalt == null) {
return -1;
}
if (bushalt.isValidPrimitive()) {
return ListUtil.indexOf(this.validHalts, VALID_HALT_COMPARATOR, bushalt);
}
int idx = ListUtil.indexOf(this.invalidHalts, INVALID_HALT_COMPARATOR, bushalt);
if (idx >= 0) {
id... | java | @Pure
public int indexOf(BusItineraryHalt bushalt) {
if (bushalt == null) {
return -1;
}
if (bushalt.isValidPrimitive()) {
return ListUtil.indexOf(this.validHalts, VALID_HALT_COMPARATOR, bushalt);
}
int idx = ListUtil.indexOf(this.invalidHalts, INVALID_HALT_COMPARATOR, bushalt);
if (idx >= 0) {
id... | [
"@",
"Pure",
"public",
"int",
"indexOf",
"(",
"BusItineraryHalt",
"bushalt",
")",
"{",
"if",
"(",
"bushalt",
"==",
"null",
")",
"{",
"return",
"-",
"1",
";",
"}",
"if",
"(",
"bushalt",
".",
"isValidPrimitive",
"(",
")",
")",
"{",
"return",
"ListUtil",
... | Replies the index of the specified bus halt.
@param bushalt is the bus halt to search for.
@return the index or <code>-1</code> if it was not found. | [
"Replies",
"the",
"index",
"of",
"the",
"specified",
"bus",
"halt",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1449-L1462 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.contains | @Pure
public boolean contains(BusItineraryHalt bushalt) {
if (bushalt == null) {
return false;
}
if (bushalt.isValidPrimitive()) {
return ListUtil.contains(this.validHalts, VALID_HALT_COMPARATOR, bushalt);
}
return ListUtil.contains(this.invalidHalts, INVALID_HALT_COMPARATOR, bushalt);
} | java | @Pure
public boolean contains(BusItineraryHalt bushalt) {
if (bushalt == null) {
return false;
}
if (bushalt.isValidPrimitive()) {
return ListUtil.contains(this.validHalts, VALID_HALT_COMPARATOR, bushalt);
}
return ListUtil.contains(this.invalidHalts, INVALID_HALT_COMPARATOR, bushalt);
} | [
"@",
"Pure",
"public",
"boolean",
"contains",
"(",
"BusItineraryHalt",
"bushalt",
")",
"{",
"if",
"(",
"bushalt",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"bushalt",
".",
"isValidPrimitive",
"(",
")",
")",
"{",
"return",
"ListUtil"... | Replies if the given bus halt is inside this bus itinerary.
@param bushalt is the bus halt to search for.
@return <code>true</code> if the bus halt is inside the itinerary,
otherwise <code>false</code> | [
"Replies",
"if",
"the",
"given",
"bus",
"halt",
"is",
"inside",
"this",
"bus",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1503-L1512 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.getBusHaltAt | @Pure
public BusItineraryHalt getBusHaltAt(int index) {
if (index < this.validHalts.size()) {
return this.validHalts.get(index);
}
return this.invalidHalts.get(index - this.validHalts.size());
} | java | @Pure
public BusItineraryHalt getBusHaltAt(int index) {
if (index < this.validHalts.size()) {
return this.validHalts.get(index);
}
return this.invalidHalts.get(index - this.validHalts.size());
} | [
"@",
"Pure",
"public",
"BusItineraryHalt",
"getBusHaltAt",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"<",
"this",
".",
"validHalts",
".",
"size",
"(",
")",
")",
"{",
"return",
"this",
".",
"validHalts",
".",
"get",
"(",
"index",
")",
";",
"}... | Replies the halt at the specified index.
@param index the index.
@return a bus halt | [
"Replies",
"the",
"halt",
"at",
"the",
"specified",
"index",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1533-L1539 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.getBusHalt | @Pure
public BusItineraryHalt getBusHalt(UUID uuid) {
if (uuid == null) {
return null;
}
for (final BusItineraryHalt busHalt : this.validHalts) {
if (uuid.equals(busHalt.getUUID())) {
return busHalt;
}
}
for (final BusItineraryHalt busHalt : this.invalidHalts) {
if (uuid.equals(busHalt.getUUI... | java | @Pure
public BusItineraryHalt getBusHalt(UUID uuid) {
if (uuid == null) {
return null;
}
for (final BusItineraryHalt busHalt : this.validHalts) {
if (uuid.equals(busHalt.getUUID())) {
return busHalt;
}
}
for (final BusItineraryHalt busHalt : this.invalidHalts) {
if (uuid.equals(busHalt.getUUI... | [
"@",
"Pure",
"public",
"BusItineraryHalt",
"getBusHalt",
"(",
"UUID",
"uuid",
")",
"{",
"if",
"(",
"uuid",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"final",
"BusItineraryHalt",
"busHalt",
":",
"this",
".",
"validHalts",
")",
"{",
... | Replies the bus halt with the specified uuid.
@param uuid the identifier.
@return BusItineraryHalt or <code>null</code> | [
"Replies",
"the",
"bus",
"halt",
"with",
"the",
"specified",
"uuid",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1558-L1574 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.getBusHalt | @Pure
public BusItineraryHalt getBusHalt(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusItineraryHalt bushalt : this.validHalts) {
if (cmp.comp... | java | @Pure
public BusItineraryHalt getBusHalt(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusItineraryHalt bushalt : this.validHalts) {
if (cmp.comp... | [
"@",
"Pure",
"public",
"BusItineraryHalt",
"getBusHalt",
"(",
"String",
"name",
",",
"Comparator",
"<",
"String",
">",
"nameComparator",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Comparator",
"<",
"String",
... | Replies the bus halt with the specified name.
@param name is the desired name
@param nameComparator is used to compare the names.
@return a bus halt or <code>null</code> | [
"Replies",
"the",
"bus",
"halt",
"with",
"the",
"specified",
"name",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1583-L1600 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.toBusHaltArray | @Pure
public BusItineraryHalt[] toBusHaltArray() {
final BusItineraryHalt[] tab = new BusItineraryHalt[this.validHalts.size() + this.invalidHalts.size()];
int i = 0;
for (final BusItineraryHalt h : this.validHalts) {
tab[i] = h;
++i;
}
for (final BusItineraryHalt h : this.invalidHalts) {
tab[i] = h;... | java | @Pure
public BusItineraryHalt[] toBusHaltArray() {
final BusItineraryHalt[] tab = new BusItineraryHalt[this.validHalts.size() + this.invalidHalts.size()];
int i = 0;
for (final BusItineraryHalt h : this.validHalts) {
tab[i] = h;
++i;
}
for (final BusItineraryHalt h : this.invalidHalts) {
tab[i] = h;... | [
"@",
"Pure",
"public",
"BusItineraryHalt",
"[",
"]",
"toBusHaltArray",
"(",
")",
"{",
"final",
"BusItineraryHalt",
"[",
"]",
"tab",
"=",
"new",
"BusItineraryHalt",
"[",
"this",
".",
"validHalts",
".",
"size",
"(",
")",
"+",
"this",
".",
"invalidHalts",
"."... | Replies an array of the bus halts inside this itinerary.
This function copy the internal data structures into the array.
@return an array of the bus halts inside this itinerary. | [
"Replies",
"an",
"array",
"of",
"the",
"bus",
"halts",
"inside",
"this",
"itinerary",
".",
"This",
"function",
"copy",
"the",
"internal",
"data",
"structures",
"into",
"the",
"array",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1628-L1641 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.toInvalidBusHaltArray | @Pure
public BusItineraryHalt[] toInvalidBusHaltArray() {
final BusItineraryHalt[] tab = new BusItineraryHalt[this.invalidHalts.size()];
return this.invalidHalts.toArray(tab);
} | java | @Pure
public BusItineraryHalt[] toInvalidBusHaltArray() {
final BusItineraryHalt[] tab = new BusItineraryHalt[this.invalidHalts.size()];
return this.invalidHalts.toArray(tab);
} | [
"@",
"Pure",
"public",
"BusItineraryHalt",
"[",
"]",
"toInvalidBusHaltArray",
"(",
")",
"{",
"final",
"BusItineraryHalt",
"[",
"]",
"tab",
"=",
"new",
"BusItineraryHalt",
"[",
"this",
".",
"invalidHalts",
".",
"size",
"(",
")",
"]",
";",
"return",
"this",
... | Replies an array of the invalid bus halts inside this itinerary.
This function copy the internal data structures into the array.
@return an array of the invalid bus halts inside this itinerary. | [
"Replies",
"an",
"array",
"of",
"the",
"invalid",
"bus",
"halts",
"inside",
"this",
"itinerary",
".",
"This",
"function",
"copy",
"the",
"internal",
"data",
"structures",
"into",
"the",
"array",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1648-L1652 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.toValidBusHaltArray | @Pure
public BusItineraryHalt[] toValidBusHaltArray() {
final BusItineraryHalt[] tab = new BusItineraryHalt[this.validHalts.size()];
return this.validHalts.toArray(tab);
} | java | @Pure
public BusItineraryHalt[] toValidBusHaltArray() {
final BusItineraryHalt[] tab = new BusItineraryHalt[this.validHalts.size()];
return this.validHalts.toArray(tab);
} | [
"@",
"Pure",
"public",
"BusItineraryHalt",
"[",
"]",
"toValidBusHaltArray",
"(",
")",
"{",
"final",
"BusItineraryHalt",
"[",
"]",
"tab",
"=",
"new",
"BusItineraryHalt",
"[",
"this",
".",
"validHalts",
".",
"size",
"(",
")",
"]",
";",
"return",
"this",
".",... | Replies an array of the valid bus halts inside this itinerary.
This function copy the internal data structures into the array.
@return an array of the invalid bus halts inside this itinerary. | [
"Replies",
"an",
"array",
"of",
"the",
"valid",
"bus",
"halts",
"inside",
"this",
"itinerary",
".",
"This",
"function",
"copy",
"the",
"internal",
"data",
"structures",
"into",
"the",
"array",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1659-L1663 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.getNearestRoadSegment | @Pure
public RoadSegment getNearestRoadSegment(Point2D<?, ?> point) {
assert point != null;
double distance = Double.MAX_VALUE;
RoadSegment nearestSegment = null;
final Iterator<RoadSegment> iterator = this.roadSegments.roadSegments();
RoadSegment segment;
while (iterator.hasNext()) {
segment = iterator... | java | @Pure
public RoadSegment getNearestRoadSegment(Point2D<?, ?> point) {
assert point != null;
double distance = Double.MAX_VALUE;
RoadSegment nearestSegment = null;
final Iterator<RoadSegment> iterator = this.roadSegments.roadSegments();
RoadSegment segment;
while (iterator.hasNext()) {
segment = iterator... | [
"@",
"Pure",
"public",
"RoadSegment",
"getNearestRoadSegment",
"(",
"Point2D",
"<",
"?",
",",
"?",
">",
"point",
")",
"{",
"assert",
"point",
"!=",
"null",
";",
"double",
"distance",
"=",
"Double",
".",
"MAX_VALUE",
";",
"RoadSegment",
"nearestSegment",
"=",... | Replies the nearest road segment from this itinerary to the given point.
@param point the point.
@return the nearest road segment or <code>null</code> if none was found. | [
"Replies",
"the",
"nearest",
"road",
"segment",
"from",
"this",
"itinerary",
"to",
"the",
"given",
"point",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1698-L1714 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.addRoadSegments | public boolean addRoadSegments(RoadPath segments, boolean autoConnectHalts, boolean enableLoopAutoBuild) {
if (segments == null || segments.isEmpty()) {
return false;
}
BusItineraryHalt halt;
RoadSegment sgmt;
final Map<BusItineraryHalt, RoadSegment> haltMapping = new TreeMap<>(
(obj1, obj2) -> Intege... | java | public boolean addRoadSegments(RoadPath segments, boolean autoConnectHalts, boolean enableLoopAutoBuild) {
if (segments == null || segments.isEmpty()) {
return false;
}
BusItineraryHalt halt;
RoadSegment sgmt;
final Map<BusItineraryHalt, RoadSegment> haltMapping = new TreeMap<>(
(obj1, obj2) -> Intege... | [
"public",
"boolean",
"addRoadSegments",
"(",
"RoadPath",
"segments",
",",
"boolean",
"autoConnectHalts",
",",
"boolean",
"enableLoopAutoBuild",
")",
"{",
"if",
"(",
"segments",
"==",
"null",
"||",
"segments",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"fals... | Add road segments inside the bus itinerary.
@param segments is the segment to add.
@param autoConnectHalts indicates if the invalid itinery halts are trying to
be connected to the added segments. If <code>true</code> {@link #putInvalidHaltsOnRoads(BusItineraryHalt...)}
is invoked.
@param enableLoopAutoBuild indicates ... | [
"Add",
"road",
"segments",
"inside",
"the",
"bus",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1813-L1883 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.putHaltOnRoad | @SuppressWarnings("checkstyle:nestedifdepth")
public boolean putHaltOnRoad(BusItineraryHalt halt, RoadSegment road) {
if (contains(halt)) {
final BusStop stop = halt.getBusStop();
if (stop != null) {
final Point2d stopPosition = stop.getPosition2D();
if (stopPosition != null) {
final int idx = ind... | java | @SuppressWarnings("checkstyle:nestedifdepth")
public boolean putHaltOnRoad(BusItineraryHalt halt, RoadSegment road) {
if (contains(halt)) {
final BusStop stop = halt.getBusStop();
if (stop != null) {
final Point2d stopPosition = stop.getPosition2D();
if (stopPosition != null) {
final int idx = ind... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:nestedifdepth\"",
")",
"public",
"boolean",
"putHaltOnRoad",
"(",
"BusItineraryHalt",
"halt",
",",
"RoadSegment",
"road",
")",
"{",
"if",
"(",
"contains",
"(",
"halt",
")",
")",
"{",
"final",
"BusStop",
"stop",
"=",
... | Put the given bus itinerary halt on the nearest
point on road.
@param halt is the halt to put on the road.
@param road is the road.
@return <code>false</code> if the road was not found;
otherwise <code>true</code>. If the bus halt is not binded
to a valid bus stop, replies <code>true</code> also. | [
"Put",
"the",
"given",
"bus",
"itinerary",
"halt",
"on",
"the",
"nearest",
"point",
"on",
"road",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L2068-L2098 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.removeAllRoadSegments | public void removeAllRoadSegments() {
for (final BusItineraryHalt halt : this.invalidHalts) {
halt.setRoadSegmentIndex(-1);
halt.setPositionOnSegment(Float.NaN);
halt.checkPrimitiveValidity();
}
final BusItineraryHalt[] halts = new BusItineraryHalt[this.validHalts.size()];
this.validHalts.toArray(halt... | java | public void removeAllRoadSegments() {
for (final BusItineraryHalt halt : this.invalidHalts) {
halt.setRoadSegmentIndex(-1);
halt.setPositionOnSegment(Float.NaN);
halt.checkPrimitiveValidity();
}
final BusItineraryHalt[] halts = new BusItineraryHalt[this.validHalts.size()];
this.validHalts.toArray(halt... | [
"public",
"void",
"removeAllRoadSegments",
"(",
")",
"{",
"for",
"(",
"final",
"BusItineraryHalt",
"halt",
":",
"this",
".",
"invalidHalts",
")",
"{",
"halt",
".",
"setRoadSegmentIndex",
"(",
"-",
"1",
")",
";",
"halt",
".",
"setPositionOnSegment",
"(",
"Flo... | Remove all the road segments from the current itinerary.
<p>All the bus halts will also be removed. | [
"Remove",
"all",
"the",
"road",
"segments",
"from",
"the",
"current",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L2147-L2178 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.removeRoadSegment | public boolean removeRoadSegment(int segmentIndex) {
if (segmentIndex >= 0 && segmentIndex < this.roadSegments.getRoadSegmentCount()) {
final RoadSegment segment = this.roadSegments.getRoadSegmentAt(segmentIndex);
if (segment != null) {
//
// Invalidate the bus halts on the segment
//
final Map<... | java | public boolean removeRoadSegment(int segmentIndex) {
if (segmentIndex >= 0 && segmentIndex < this.roadSegments.getRoadSegmentCount()) {
final RoadSegment segment = this.roadSegments.getRoadSegmentAt(segmentIndex);
if (segment != null) {
//
// Invalidate the bus halts on the segment
//
final Map<... | [
"public",
"boolean",
"removeRoadSegment",
"(",
"int",
"segmentIndex",
")",
"{",
"if",
"(",
"segmentIndex",
">=",
"0",
"&&",
"segmentIndex",
"<",
"this",
".",
"roadSegments",
".",
"getRoadSegmentCount",
"(",
")",
")",
"{",
"final",
"RoadSegment",
"segment",
"="... | Remove a road segment from this itinerary.
<p>The bus halts on the segment will also be removed.
@param segmentIndex is the index of the segment to remove.
@return <code>true</code> if the segment was successfully removed, otherwise <code>false</code> | [
"Remove",
"a",
"road",
"segment",
"from",
"this",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L2188-L2257 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java | BusItinerary.roadSegments | @Pure
public Iterable<RoadSegment> roadSegments() {
return new Iterable<RoadSegment>() {
@Override
public Iterator<RoadSegment> iterator() {
return roadSegmentsIterator();
}
};
} | java | @Pure
public Iterable<RoadSegment> roadSegments() {
return new Iterable<RoadSegment>() {
@Override
public Iterator<RoadSegment> iterator() {
return roadSegmentsIterator();
}
};
} | [
"@",
"Pure",
"public",
"Iterable",
"<",
"RoadSegment",
">",
"roadSegments",
"(",
")",
"{",
"return",
"new",
"Iterable",
"<",
"RoadSegment",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Iterator",
"<",
"RoadSegment",
">",
"iterator",
"(",
")",
"{",
"re... | Replies the list of the road segments of the bus itinerary.
@return a list of road segments | [
"Replies",
"the",
"list",
"of",
"the",
"road",
"segments",
"of",
"the",
"bus",
"itinerary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L2453-L2461 | train |
BBN-E/bue-common-open | scoring-open/src/main/java/com/bbn/bue/common/evaluation/EquivalenceBasedProvenancedAligner.java | EquivalenceBasedProvenancedAligner.forEquivalenceFunction | @SuppressWarnings("unchecked")
/**
* Creates an aligner given a single function from items to equivalence classes (requires left
* and right items to both be of types compatible with this function).
*/
public static <InT, EqClass> EquivalenceBasedProvenancedAligner<InT, InT, EqClass> forEquivalenceFunction... | java | @SuppressWarnings("unchecked")
/**
* Creates an aligner given a single function from items to equivalence classes (requires left
* and right items to both be of types compatible with this function).
*/
public static <InT, EqClass> EquivalenceBasedProvenancedAligner<InT, InT, EqClass> forEquivalenceFunction... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"/**\n * Creates an aligner given a single function from items to equivalence classes (requires left\n * and right items to both be of types compatible with this function).\n */",
"public",
"static",
"<",
"InT",
",",
"EqClass",
">",
... | we don't need | [
"we",
"don",
"t",
"need"
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/scoring-open/src/main/java/com/bbn/bue/common/evaluation/EquivalenceBasedProvenancedAligner.java#L30-L40 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.getExecutableFilename | @Pure
public static String getExecutableFilename(String name) {
if (OperatingSystem.WIN.isCurrentOS()) {
return name + ".exe"; //$NON-NLS-1$
}
return name;
} | java | @Pure
public static String getExecutableFilename(String name) {
if (OperatingSystem.WIN.isCurrentOS()) {
return name + ".exe"; //$NON-NLS-1$
}
return name;
} | [
"@",
"Pure",
"public",
"static",
"String",
"getExecutableFilename",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"OperatingSystem",
".",
"WIN",
".",
"isCurrentOS",
"(",
")",
")",
"{",
"return",
"name",
"+",
"\".exe\"",
";",
"//$NON-NLS-1$",
"}",
"return",
"... | Replies a binary executable filename depending of the current platform.
@param name is the name which must be converted into a binary executable filename.
@return the binary executable filename. | [
"Replies",
"a",
"binary",
"executable",
"filename",
"depending",
"of",
"the",
"current",
"platform",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L126-L132 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.getVMBinary | @Pure
public static String getVMBinary() {
final String javaHome = System.getProperty("java.home"); //$NON-NLS-1$
final File binDir = new File(new File(javaHome), "bin"); //$NON-NLS-1$
if (binDir.isDirectory()) {
File exec = new File(binDir, getExecutableFilename("javaw")); //$NON-NLS-1$
if (exec.isFile())... | java | @Pure
public static String getVMBinary() {
final String javaHome = System.getProperty("java.home"); //$NON-NLS-1$
final File binDir = new File(new File(javaHome), "bin"); //$NON-NLS-1$
if (binDir.isDirectory()) {
File exec = new File(binDir, getExecutableFilename("javaw")); //$NON-NLS-1$
if (exec.isFile())... | [
"@",
"Pure",
"public",
"static",
"String",
"getVMBinary",
"(",
")",
"{",
"final",
"String",
"javaHome",
"=",
"System",
".",
"getProperty",
"(",
"\"java.home\"",
")",
";",
"//$NON-NLS-1$",
"final",
"File",
"binDir",
"=",
"new",
"File",
"(",
"new",
"File",
"... | Replies the current java VM binary.
@return the binary executable filename that was used to launch the virtual machine. | [
"Replies",
"the",
"current",
"java",
"VM",
"binary",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L138-L153 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.launchVMWithJar | @SuppressWarnings("checkstyle:magicnumber")
public static Process launchVMWithJar(File jarFile, String... additionalParams) throws IOException {
final String javaBin = getVMBinary();
if (javaBin == null) {
throw new FileNotFoundException("java"); //$NON-NLS-1$
}
final long totalMemory = Runtime.getRuntime()... | java | @SuppressWarnings("checkstyle:magicnumber")
public static Process launchVMWithJar(File jarFile, String... additionalParams) throws IOException {
final String javaBin = getVMBinary();
if (javaBin == null) {
throw new FileNotFoundException("java"); //$NON-NLS-1$
}
final long totalMemory = Runtime.getRuntime()... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:magicnumber\"",
")",
"public",
"static",
"Process",
"launchVMWithJar",
"(",
"File",
"jarFile",
",",
"String",
"...",
"additionalParams",
")",
"throws",
"IOException",
"{",
"final",
"String",
"javaBin",
"=",
"getVMBinary",
... | Run a jar file inside a new VM.
@param jarFile is the jar file to launch.
@param additionalParams is the list of additional parameters
@return the process that is running the new virtual machine, neither <code>null</code>
@throws IOException when a IO error occurs.
@since 6.2 | [
"Run",
"a",
"jar",
"file",
"inside",
"a",
"new",
"VM",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L255-L271 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.getAllCommandLineParameters | @Pure
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"})
public static String[] getAllCommandLineParameters() {
final int osize = commandLineOptions == null ? 0 : commandLineOptions.size();
final int psize = commandLineParameters == null ? 0 : commandLineParameters.length;
fina... | java | @Pure
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"})
public static String[] getAllCommandLineParameters() {
final int osize = commandLineOptions == null ? 0 : commandLineOptions.size();
final int psize = commandLineParameters == null ? 0 : commandLineParameters.length;
fina... | [
"@",
"Pure",
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:cyclomaticcomplexity\"",
",",
"\"checkstyle:npathcomplexity\"",
"}",
")",
"public",
"static",
"String",
"[",
"]",
"getAllCommandLineParameters",
"(",
")",
"{",
"final",
"int",
"osize",
"=",
"commandLineOpti... | Replies the command line including the options and the standard parameters.
@return the command line. | [
"Replies",
"the",
"command",
"line",
"including",
"the",
"options",
"and",
"the",
"standard",
"parameters",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L377-L421 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.shiftCommandLineParameters | public static String shiftCommandLineParameters() {
String removed = null;
if (commandLineParameters != null) {
if (commandLineParameters.length == 0) {
commandLineParameters = null;
} else if (commandLineParameters.length == 1) {
removed = commandLineParameters[0];
commandLineParameters = null;
... | java | public static String shiftCommandLineParameters() {
String removed = null;
if (commandLineParameters != null) {
if (commandLineParameters.length == 0) {
commandLineParameters = null;
} else if (commandLineParameters.length == 1) {
removed = commandLineParameters[0];
commandLineParameters = null;
... | [
"public",
"static",
"String",
"shiftCommandLineParameters",
"(",
")",
"{",
"String",
"removed",
"=",
"null",
";",
"if",
"(",
"commandLineParameters",
"!=",
"null",
")",
"{",
"if",
"(",
"commandLineParameters",
".",
"length",
"==",
"0",
")",
"{",
"commandLinePa... | Shift the command line parameters by one on the left.
The first parameter is removed from the list.
@return the removed element or <code>null</code> | [
"Shift",
"the",
"command",
"line",
"parameters",
"by",
"one",
"on",
"the",
"left",
".",
"The",
"first",
"parameter",
"is",
"removed",
"from",
"the",
"list",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L437-L453 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.getCommandLineOptions | @Pure
public static Map<String, List<Object>> getCommandLineOptions() {
if (commandLineOptions != null) {
return Collections.unmodifiableSortedMap(commandLineOptions);
}
return Collections.emptyMap();
} | java | @Pure
public static Map<String, List<Object>> getCommandLineOptions() {
if (commandLineOptions != null) {
return Collections.unmodifiableSortedMap(commandLineOptions);
}
return Collections.emptyMap();
} | [
"@",
"Pure",
"public",
"static",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"getCommandLineOptions",
"(",
")",
"{",
"if",
"(",
"commandLineOptions",
"!=",
"null",
")",
"{",
"return",
"Collections",
".",
"unmodifiableSortedMap",
"(",
"command... | Replies the command line options.
@return the list of options passed on the command line | [
"Replies",
"the",
"command",
"line",
"options",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L459-L465 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.getCommandLineOption | @Pure
public static List<Object> getCommandLineOption(String name) {
if (commandLineOptions != null && commandLineOptions.containsKey(name)) {
final List<Object> value = commandLineOptions.get(name);
return value == null ? Collections.emptyList() : value;
}
return Collections.emptyList();
} | java | @Pure
public static List<Object> getCommandLineOption(String name) {
if (commandLineOptions != null && commandLineOptions.containsKey(name)) {
final List<Object> value = commandLineOptions.get(name);
return value == null ? Collections.emptyList() : value;
}
return Collections.emptyList();
} | [
"@",
"Pure",
"public",
"static",
"List",
"<",
"Object",
">",
"getCommandLineOption",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"commandLineOptions",
"!=",
"null",
"&&",
"commandLineOptions",
".",
"containsKey",
"(",
"name",
")",
")",
"{",
"final",
"List",
... | Replies one command option.
@param name is the name of the option
@return the option value or <code>null</code> if the option is not on the command line. | [
"Replies",
"one",
"command",
"option",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L472-L479 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.getFirstOptionValue | @Pure
@SuppressWarnings("static-method")
public Object getFirstOptionValue(String optionLabel) {
final List<Object> options = getCommandLineOption(optionLabel);
if (options == null || options.isEmpty()) {
return null;
}
return options.get(0);
} | java | @Pure
@SuppressWarnings("static-method")
public Object getFirstOptionValue(String optionLabel) {
final List<Object> options = getCommandLineOption(optionLabel);
if (options == null || options.isEmpty()) {
return null;
}
return options.get(0);
} | [
"@",
"Pure",
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"public",
"Object",
"getFirstOptionValue",
"(",
"String",
"optionLabel",
")",
"{",
"final",
"List",
"<",
"Object",
">",
"options",
"=",
"getCommandLineOption",
"(",
"optionLabel",
")",
";",
"if... | Replies the first value of the option.
@param optionLabel is the name of the option
@return the option value or <code>null</code> if the option is not present or has no value. | [
"Replies",
"the",
"first",
"value",
"of",
"the",
"option",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L813-L821 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.getOptionValues | @Pure
@SuppressWarnings("static-method")
public List<Object> getOptionValues(String optionLabel) {
final List<Object> options = getCommandLineOption(optionLabel);
if (options == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(options);
} | java | @Pure
@SuppressWarnings("static-method")
public List<Object> getOptionValues(String optionLabel) {
final List<Object> options = getCommandLineOption(optionLabel);
if (options == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(options);
} | [
"@",
"Pure",
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"public",
"List",
"<",
"Object",
">",
"getOptionValues",
"(",
"String",
"optionLabel",
")",
"{",
"final",
"List",
"<",
"Object",
">",
"options",
"=",
"getCommandLineOption",
"(",
"optionLabel",... | Replies the values of the option.
@param optionLabel is the name of the option
@return the option values or <code>null</code> if the option is not present. | [
"Replies",
"the",
"values",
"of",
"the",
"option",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L828-L836 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java | VMCommandLine.isParameterExists | @Pure
@SuppressWarnings("static-method")
public boolean isParameterExists(int index) {
final String[] params = getCommandLineParameters();
return index >= 0 && index < params.length && params[index] != null;
} | java | @Pure
@SuppressWarnings("static-method")
public boolean isParameterExists(int index) {
final String[] params = getCommandLineParameters();
return index >= 0 && index < params.length && params[index] != null;
} | [
"@",
"Pure",
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"public",
"boolean",
"isParameterExists",
"(",
"int",
"index",
")",
"{",
"final",
"String",
"[",
"]",
"params",
"=",
"getCommandLineParameters",
"(",
")",
";",
"return",
"index",
">=",
"0",
... | Replies if the given index corresponds to a command line parameter.
@param index position of the parameter to test.
@return <code>true</code> if the given index corresponds to a parameter,
otherwise <code>false</code>
@throws IndexOutOfBoundsException if the given index is out of bounds. | [
"Replies",
"if",
"the",
"given",
"index",
"corresponds",
"to",
"a",
"command",
"line",
"parameter",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L887-L892 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.firstInGroup | private int firstInGroup(int groupIndex) {
if (this.pointCoordinates == null) {
throw new IndexOutOfBoundsException();
}
final int count = getGroupCount();
if (groupIndex < 0) {
throw new IndexOutOfBoundsException(groupIndex + "<0"); //$NON-NLS-1$
}
if (groupIndex >= count) {
throw new IndexOutOfBo... | java | private int firstInGroup(int groupIndex) {
if (this.pointCoordinates == null) {
throw new IndexOutOfBoundsException();
}
final int count = getGroupCount();
if (groupIndex < 0) {
throw new IndexOutOfBoundsException(groupIndex + "<0"); //$NON-NLS-1$
}
if (groupIndex >= count) {
throw new IndexOutOfBo... | [
"private",
"int",
"firstInGroup",
"(",
"int",
"groupIndex",
")",
"{",
"if",
"(",
"this",
".",
"pointCoordinates",
"==",
"null",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")",
";",
"}",
"final",
"int",
"count",
"=",
"getGroupCount",
"(",
"... | Replies the starting index of a point in a group.
@param groupIndex is the index of the desired group
@return the index of the point in the list of points.
This value is between <code>0</code> and <code>this.pointCoordinates.length()-2</code>
@throws IndexOutOfBoundsException in case of error. | [
"Replies",
"the",
"starting",
"index",
"of",
"a",
"point",
"in",
"a",
"group",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L325-L341 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.lastInGroup | private int lastInGroup(int groupIndex) {
if (this.pointCoordinates == null) {
throw new IndexOutOfBoundsException();
}
final int count = getGroupCount();
if (groupIndex < 0) {
throw new IndexOutOfBoundsException(groupIndex + "<0"); //$NON-NLS-1$
}
if (groupIndex >= count) {
throw new IndexOutOfBou... | java | private int lastInGroup(int groupIndex) {
if (this.pointCoordinates == null) {
throw new IndexOutOfBoundsException();
}
final int count = getGroupCount();
if (groupIndex < 0) {
throw new IndexOutOfBoundsException(groupIndex + "<0"); //$NON-NLS-1$
}
if (groupIndex >= count) {
throw new IndexOutOfBou... | [
"private",
"int",
"lastInGroup",
"(",
"int",
"groupIndex",
")",
"{",
"if",
"(",
"this",
".",
"pointCoordinates",
"==",
"null",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")",
";",
"}",
"final",
"int",
"count",
"=",
"getGroupCount",
"(",
")... | Replies the ending index of a point in a group.
@param groupIndex is the index of the desired group
@return the index of the point in the list of points.
This value is between <code>0</code> and <code>this.pointCoordinates.length()-2</code>
@throws IndexOutOfBoundsException in case of error. | [
"Replies",
"the",
"ending",
"index",
"of",
"a",
"point",
"in",
"a",
"group",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L350-L365 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.groupIndexForPoint | private int groupIndexForPoint(int pointIndex) {
if (this.pointCoordinates == null || pointIndex < 0 || pointIndex >= this.pointCoordinates.length) {
throw new IndexOutOfBoundsException();
}
if (this.partIndexes == null) {
return 0;
}
for (int i = 0; i < this.partIndexes.length; ++i) {
if (pointInd... | java | private int groupIndexForPoint(int pointIndex) {
if (this.pointCoordinates == null || pointIndex < 0 || pointIndex >= this.pointCoordinates.length) {
throw new IndexOutOfBoundsException();
}
if (this.partIndexes == null) {
return 0;
}
for (int i = 0; i < this.partIndexes.length; ++i) {
if (pointInd... | [
"private",
"int",
"groupIndexForPoint",
"(",
"int",
"pointIndex",
")",
"{",
"if",
"(",
"this",
".",
"pointCoordinates",
"==",
"null",
"||",
"pointIndex",
"<",
"0",
"||",
"pointIndex",
">=",
"this",
".",
"pointCoordinates",
".",
"length",
")",
"{",
"throw",
... | Replies the group index inside which the point is located at the specified index.
@param pointIndex is the global index of the point.
@return the index of the group.
This value is between <code>0</code> and <code>this.getGroupCount()</code>
@throws IndexOutOfBoundsException in case of error. | [
"Replies",
"the",
"group",
"index",
"inside",
"which",
"the",
"point",
"is",
"located",
"at",
"the",
"specified",
"index",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L374-L390 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.getPointCountInGroup | @Pure
public int getPointCountInGroup(int groupIndex) {
if (groupIndex == 0 && this.pointCoordinates == null) {
return 0;
}
final int firstInGroup = firstInGroup(groupIndex);
final int lastInGroup = lastInGroup(groupIndex);
return (lastInGroup - firstInGroup) / 2 + 1;
} | java | @Pure
public int getPointCountInGroup(int groupIndex) {
if (groupIndex == 0 && this.pointCoordinates == null) {
return 0;
}
final int firstInGroup = firstInGroup(groupIndex);
final int lastInGroup = lastInGroup(groupIndex);
return (lastInGroup - firstInGroup) / 2 + 1;
} | [
"@",
"Pure",
"public",
"int",
"getPointCountInGroup",
"(",
"int",
"groupIndex",
")",
"{",
"if",
"(",
"groupIndex",
"==",
"0",
"&&",
"this",
".",
"pointCoordinates",
"==",
"null",
")",
"{",
"return",
"0",
";",
"}",
"final",
"int",
"firstInGroup",
"=",
"fi... | Replies the count of points in the specified group.
@param groupIndex the group index.
@return the count of points in the specified group.
@throws IndexOutOfBoundsException in case of error. | [
"Replies",
"the",
"count",
"of",
"points",
"in",
"the",
"specified",
"group",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L398-L406 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.getPointIndex | @Pure
public int getPointIndex(int groupIndex, int position) {
final int groupMemberCount = getPointCountInGroup(groupIndex);
final int pos;
if (position < 0) {
pos = 0;
} else if (position >= groupMemberCount) {
pos = groupMemberCount - 1;
} else {
pos = position;
}
// Move the start/end index... | java | @Pure
public int getPointIndex(int groupIndex, int position) {
final int groupMemberCount = getPointCountInGroup(groupIndex);
final int pos;
if (position < 0) {
pos = 0;
} else if (position >= groupMemberCount) {
pos = groupMemberCount - 1;
} else {
pos = position;
}
// Move the start/end index... | [
"@",
"Pure",
"public",
"int",
"getPointIndex",
"(",
"int",
"groupIndex",
",",
"int",
"position",
")",
"{",
"final",
"int",
"groupMemberCount",
"=",
"getPointCountInGroup",
"(",
"groupIndex",
")",
";",
"final",
"int",
"pos",
";",
"if",
"(",
"position",
"<",
... | Replies the global index of the point that corresponds to
the position in the given group.
@param groupIndex the group index.
@param position is the index of the point in the group
@return the global index of the point
@throws IndexOutOfBoundsException in case of error. | [
"Replies",
"the",
"global",
"index",
"of",
"the",
"point",
"that",
"corresponds",
"to",
"the",
"position",
"in",
"the",
"given",
"group",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L416-L430 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.getPointIndex | @Pure
public int getPointIndex(int groupIndex, Point2D<?, ?> point2d) {
if (!this.containsPoint(point2d, groupIndex)) {
return -1;
}
Point2d cur = null;
int pos = -1;
for (int i = 0; i < getPointCountInGroup(groupIndex); ++i) {
cur = getPointAt(groupIndex, i);
if (cur.epsilonEquals(point2d, MapEleme... | java | @Pure
public int getPointIndex(int groupIndex, Point2D<?, ?> point2d) {
if (!this.containsPoint(point2d, groupIndex)) {
return -1;
}
Point2d cur = null;
int pos = -1;
for (int i = 0; i < getPointCountInGroup(groupIndex); ++i) {
cur = getPointAt(groupIndex, i);
if (cur.epsilonEquals(point2d, MapEleme... | [
"@",
"Pure",
"public",
"int",
"getPointIndex",
"(",
"int",
"groupIndex",
",",
"Point2D",
"<",
"?",
",",
"?",
">",
"point2d",
")",
"{",
"if",
"(",
"!",
"this",
".",
"containsPoint",
"(",
"point2d",
",",
"groupIndex",
")",
")",
"{",
"return",
"-",
"1",... | Replies the global index of the point2d in the given group.
@param groupIndex the group index.
@param point2d is the point in the group
@return the global index of the point or <code>-1</code> if not found | [
"Replies",
"the",
"global",
"index",
"of",
"the",
"point2d",
"in",
"the",
"given",
"group",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L438-L454 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.getGroupAt | @Pure
public PointGroup getGroupAt(int index) {
final int count = getGroupCount();
if (index < 0) {
throw new IndexOutOfBoundsException(index + "<0"); //$NON-NLS-1$
}
if (index >= count) {
throw new IndexOutOfBoundsException(index + ">=" + count); //$NON-NLS-1$
}
return new PointGroup(index);
} | java | @Pure
public PointGroup getGroupAt(int index) {
final int count = getGroupCount();
if (index < 0) {
throw new IndexOutOfBoundsException(index + "<0"); //$NON-NLS-1$
}
if (index >= count) {
throw new IndexOutOfBoundsException(index + ">=" + count); //$NON-NLS-1$
}
return new PointGroup(index);
} | [
"@",
"Pure",
"public",
"PointGroup",
"getGroupAt",
"(",
"int",
"index",
")",
"{",
"final",
"int",
"count",
"=",
"getGroupCount",
"(",
")",
";",
"if",
"(",
"index",
"<",
"0",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"index",
"+",
"\"<0\... | Replies the part at the specified index.
@param index the index.
@return the group
@throws IndexOutOfBoundsException in case of error. | [
"Replies",
"the",
"part",
"at",
"the",
"specified",
"index",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L486-L496 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.groups | @Pure
public Iterable<PointGroup> groups() {
return new Iterable<PointGroup>() {
@Override
public Iterator<PointGroup> iterator() {
return MapComposedElement.this.groupIterator();
}
};
} | java | @Pure
public Iterable<PointGroup> groups() {
return new Iterable<PointGroup>() {
@Override
public Iterator<PointGroup> iterator() {
return MapComposedElement.this.groupIterator();
}
};
} | [
"@",
"Pure",
"public",
"Iterable",
"<",
"PointGroup",
">",
"groups",
"(",
")",
"{",
"return",
"new",
"Iterable",
"<",
"PointGroup",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Iterator",
"<",
"PointGroup",
">",
"iterator",
"(",
")",
"{",
"return",
... | Replies the iterator on the groups.
@return the iterator on the groups. | [
"Replies",
"the",
"iterator",
"on",
"the",
"groups",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L502-L510 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.points | @Pure
public Iterable<Point2d> points() {
return new Iterable<Point2d>() {
@Override
public Iterator<Point2d> iterator() {
return MapComposedElement.this.pointIterator();
}
};
} | java | @Pure
public Iterable<Point2d> points() {
return new Iterable<Point2d>() {
@Override
public Iterator<Point2d> iterator() {
return MapComposedElement.this.pointIterator();
}
};
} | [
"@",
"Pure",
"public",
"Iterable",
"<",
"Point2d",
">",
"points",
"(",
")",
"{",
"return",
"new",
"Iterable",
"<",
"Point2d",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Iterator",
"<",
"Point2d",
">",
"iterator",
"(",
")",
"{",
"return",
"MapCompo... | Replies the iterator on the points.
@return the iterator on the points. | [
"Replies",
"the",
"iterator",
"on",
"the",
"points",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L525-L533 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.addPoint | public int addPoint(double x, double y) {
int pointIndex;
if (this.pointCoordinates == null) {
this.pointCoordinates = new double[] {x, y};
this.partIndexes = null;
pointIndex = 0;
} else {
double[] pts = new double[this.pointCoordinates.length + 2];
System.arraycopy(this.pointCoordinates, 0, pts,... | java | public int addPoint(double x, double y) {
int pointIndex;
if (this.pointCoordinates == null) {
this.pointCoordinates = new double[] {x, y};
this.partIndexes = null;
pointIndex = 0;
} else {
double[] pts = new double[this.pointCoordinates.length + 2];
System.arraycopy(this.pointCoordinates, 0, pts,... | [
"public",
"int",
"addPoint",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"int",
"pointIndex",
";",
"if",
"(",
"this",
".",
"pointCoordinates",
"==",
"null",
")",
"{",
"this",
".",
"pointCoordinates",
"=",
"new",
"double",
"[",
"]",
"{",
"x",
",... | Add the specified point at the end of the last group.
@param x x coordinate
@param y y coordinate
@return the index of the new point in the element. | [
"Add",
"the",
"specified",
"point",
"at",
"the",
"end",
"of",
"the",
"last",
"group",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L559-L582 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.addGroup | public int addGroup(double x, double y) {
int pointIndex;
if (this.pointCoordinates == null) {
this.pointCoordinates = new double[] {x, y};
this.partIndexes = null;
pointIndex = 0;
} else {
double[] pts = new double[this.pointCoordinates.length + 2];
System.arraycopy(this.pointCoordinates, 0, pts, ... | java | public int addGroup(double x, double y) {
int pointIndex;
if (this.pointCoordinates == null) {
this.pointCoordinates = new double[] {x, y};
this.partIndexes = null;
pointIndex = 0;
} else {
double[] pts = new double[this.pointCoordinates.length + 2];
System.arraycopy(this.pointCoordinates, 0, pts, ... | [
"public",
"int",
"addGroup",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"int",
"pointIndex",
";",
"if",
"(",
"this",
".",
"pointCoordinates",
"==",
"null",
")",
"{",
"this",
".",
"pointCoordinates",
"=",
"new",
"double",
"[",
"]",
"{",
"x",
",... | Add the specified point into a newgroup.
@param x x coordinate
@param y y coordinate
@return the index of the new point in this element. | [
"Add",
"the",
"specified",
"point",
"into",
"a",
"newgroup",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L663-L696 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.invertPointsIn | public MapComposedElement invertPointsIn(int groupIndex) {
if (this.pointCoordinates == null) {
throw new IndexOutOfBoundsException();
}
final int grpCount = getGroupCount();
if (groupIndex < 0) {
throw new IndexOutOfBoundsException(groupIndex + "<0"); //$NON-NLS-1$
}
if (groupIndex > grpCount) {
t... | java | public MapComposedElement invertPointsIn(int groupIndex) {
if (this.pointCoordinates == null) {
throw new IndexOutOfBoundsException();
}
final int grpCount = getGroupCount();
if (groupIndex < 0) {
throw new IndexOutOfBoundsException(groupIndex + "<0"); //$NON-NLS-1$
}
if (groupIndex > grpCount) {
t... | [
"public",
"MapComposedElement",
"invertPointsIn",
"(",
"int",
"groupIndex",
")",
"{",
"if",
"(",
"this",
".",
"pointCoordinates",
"==",
"null",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")",
";",
"}",
"final",
"int",
"grpCount",
"=",
"getGrou... | invert the points coordinates of this element on the groupIndex in argument.
<p>This method is reversible:
{@code this.invertPointsIn(sameIndex) == this.invertPointsIn(sameIndex).invertPointsIn(sameIndex)}
<p>NOTE: invert each parts with {@link MapComposedElement#invertPointsIn(int)}
does'nt produce the same result a... | [
"invert",
"the",
"points",
"coordinates",
"of",
"this",
"element",
"on",
"the",
"groupIndex",
"in",
"argument",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L713-L735 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.invert | public MapComposedElement invert() {
if (this.pointCoordinates == null) {
throw new IndexOutOfBoundsException();
}
double[] tmp = new double[this.pointCoordinates.length];
for (int i = 0; i < this.pointCoordinates.length; i += 2) {
tmp[i] = this.pointCoordinates[this.pointCoordinates.length - 1 - (i + 1)]... | java | public MapComposedElement invert() {
if (this.pointCoordinates == null) {
throw new IndexOutOfBoundsException();
}
double[] tmp = new double[this.pointCoordinates.length];
for (int i = 0; i < this.pointCoordinates.length; i += 2) {
tmp[i] = this.pointCoordinates[this.pointCoordinates.length - 1 - (i + 1)]... | [
"public",
"MapComposedElement",
"invert",
"(",
")",
"{",
"if",
"(",
"this",
".",
"pointCoordinates",
"==",
"null",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
")",
";",
"}",
"double",
"[",
"]",
"tmp",
"=",
"new",
"double",
"[",
"this",
".... | Invert the order of points coordinates of this element and reorder the groupIndex too.
<p>NOTE: invert each parts with {@link MapComposedElement#invertPointsIn(int)}
does'nt produce the same result as {@link MapComposedElement#invert()}
<p>This method invert points coordinates AND start index of parts to
keep the log... | [
"Invert",
"the",
"order",
"of",
"points",
"coordinates",
"of",
"this",
"element",
"and",
"reorder",
"the",
"groupIndex",
"too",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L750-L772 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.getPointAt | @Pure
public Point2d getPointAt(int index) {
final int count = getPointCount();
int idx = index;
if (idx < 0) {
idx = count + idx;
}
if (idx < 0) {
throw new IndexOutOfBoundsException(idx + "<0"); //$NON-NLS-1$
}
if (idx >= count) {
throw new IndexOutOfBoundsException(idx + ">=" + count); //$NON... | java | @Pure
public Point2d getPointAt(int index) {
final int count = getPointCount();
int idx = index;
if (idx < 0) {
idx = count + idx;
}
if (idx < 0) {
throw new IndexOutOfBoundsException(idx + "<0"); //$NON-NLS-1$
}
if (idx >= count) {
throw new IndexOutOfBoundsException(idx + ">=" + count); //$NON... | [
"@",
"Pure",
"public",
"Point2d",
"getPointAt",
"(",
"int",
"index",
")",
"{",
"final",
"int",
"count",
"=",
"getPointCount",
"(",
")",
";",
"int",
"idx",
"=",
"index",
";",
"if",
"(",
"idx",
"<",
"0",
")",
"{",
"idx",
"=",
"count",
"+",
"idx",
"... | Replies the specified point at the given index.
<p>If the <var>index</var> is negative, it will corresponds
to an index starting from the end of the list.
@param index is the index of the desired point
@return the point at the given index
@throws IndexOutOfBoundsException in case of error. | [
"Replies",
"the",
"specified",
"point",
"at",
"the",
"given",
"index",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L864-L880 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.getPointAt | @Pure
public Point2d getPointAt(int groupIndex, int indexInGroup) {
final int startIndex = firstInGroup(groupIndex);
// Besure that the member's index is in the group index's range
final int groupMemberCount = getPointCountInGroup(groupIndex);
if (indexInGroup < 0) {
throw new IndexOutOfBoundsException(ind... | java | @Pure
public Point2d getPointAt(int groupIndex, int indexInGroup) {
final int startIndex = firstInGroup(groupIndex);
// Besure that the member's index is in the group index's range
final int groupMemberCount = getPointCountInGroup(groupIndex);
if (indexInGroup < 0) {
throw new IndexOutOfBoundsException(ind... | [
"@",
"Pure",
"public",
"Point2d",
"getPointAt",
"(",
"int",
"groupIndex",
",",
"int",
"indexInGroup",
")",
"{",
"final",
"int",
"startIndex",
"=",
"firstInGroup",
"(",
"groupIndex",
")",
";",
"// Besure that the member's index is in the group index's range",
"final",
... | Replies the specified point at the given index in the specified group.
@param groupIndex is the index of the group
@param indexInGroup is the index of the point in the group (0 for the
first point of the group...).
@return the point
@throws IndexOutOfBoundsException in case of error. | [
"Replies",
"the",
"specified",
"point",
"at",
"the",
"given",
"index",
"in",
"the",
"specified",
"group",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L890-L906 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.removeGroupAt | public boolean removeGroupAt(int groupIndex) {
try {
final int startIndex = firstInGroup(groupIndex);
final int lastIndex = lastInGroup(groupIndex);
final int ptsToRemoveCount = (lastIndex - startIndex + 2) / 2;
int rest = this.pointCoordinates.length / 2 - ptsToRemoveCount;
if (rest > 0) {
// Rem... | java | public boolean removeGroupAt(int groupIndex) {
try {
final int startIndex = firstInGroup(groupIndex);
final int lastIndex = lastInGroup(groupIndex);
final int ptsToRemoveCount = (lastIndex - startIndex + 2) / 2;
int rest = this.pointCoordinates.length / 2 - ptsToRemoveCount;
if (rest > 0) {
// Rem... | [
"public",
"boolean",
"removeGroupAt",
"(",
"int",
"groupIndex",
")",
"{",
"try",
"{",
"final",
"int",
"startIndex",
"=",
"firstInGroup",
"(",
"groupIndex",
")",
";",
"final",
"int",
"lastIndex",
"=",
"lastInGroup",
"(",
"groupIndex",
")",
";",
"final",
"int"... | Remove the specified group.
@param groupIndex the index of the group.
@return <code>true</code> on success, otherwise <code>false</code> | [
"Remove",
"the",
"specified",
"group",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L1090-L1147 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.removePointAt | public Point2d removePointAt(int groupIndex, int indexInGroup) {
final int startIndex = firstInGroup(groupIndex);
final int lastIndex = lastInGroup(groupIndex);
// Translate local point's coordinate into global point's coordinate
final int g = indexInGroup * 2 + startIndex;
// Be sure that the member's inde... | java | public Point2d removePointAt(int groupIndex, int indexInGroup) {
final int startIndex = firstInGroup(groupIndex);
final int lastIndex = lastInGroup(groupIndex);
// Translate local point's coordinate into global point's coordinate
final int g = indexInGroup * 2 + startIndex;
// Be sure that the member's inde... | [
"public",
"Point2d",
"removePointAt",
"(",
"int",
"groupIndex",
",",
"int",
"indexInGroup",
")",
"{",
"final",
"int",
"startIndex",
"=",
"firstInGroup",
"(",
"groupIndex",
")",
";",
"final",
"int",
"lastIndex",
"=",
"lastInGroup",
"(",
"groupIndex",
")",
";",
... | Remove the specified point at the given index in the specified group.
@param groupIndex is the index of the group
@param indexInGroup is the index of the ponit in the group (0 for the
first point of the group...).
@return the removed point
@throws IndexOutOfBoundsException in case of error. | [
"Remove",
"the",
"specified",
"point",
"at",
"the",
"given",
"index",
"in",
"the",
"specified",
"group",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L1157-L1220 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java | MapComposedElement.canonize | private boolean canonize(int index) {
final int count = getPointCount();
int ix = index;
if (ix < 0) {
ix = count + ix;
}
if (ix < 0) {
throw new IndexOutOfBoundsException(ix + "<0"); //$NON-NLS-1$
}
if (ix >= count) {
throw new IndexOutOfBoundsException(ix + ">=" + count); //$NON-NLS-1$
}
... | java | private boolean canonize(int index) {
final int count = getPointCount();
int ix = index;
if (ix < 0) {
ix = count + ix;
}
if (ix < 0) {
throw new IndexOutOfBoundsException(ix + "<0"); //$NON-NLS-1$
}
if (ix >= count) {
throw new IndexOutOfBoundsException(ix + ">=" + count); //$NON-NLS-1$
}
... | [
"private",
"boolean",
"canonize",
"(",
"int",
"index",
")",
"{",
"final",
"int",
"count",
"=",
"getPointCount",
"(",
")",
";",
"int",
"ix",
"=",
"index",
";",
"if",
"(",
"ix",
"<",
"0",
")",
"{",
"ix",
"=",
"count",
"+",
"ix",
";",
"}",
"if",
"... | Remove unnecessary points from the specified index.
@return <code>true</code> if points are removed, otherwise <code>false</code> | [
"Remove",
"unnecessary",
"points",
"from",
"the",
"specified",
"index",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L1234-L1318 | train |
digitalfondue/stampo | src/main/java/ch/digitalfondue/stampo/processor/IncludeAllPaginator.java | IncludeAllPaginator.addOutputInformation | private Optional<IncludeAllPageWithOutput> addOutputInformation(IncludeAllPage pages, FileResource baseResource, Path includeAllBasePath, Locale locale) {
// depth = 0 is the file that has the include-all directive
if (pages.depth == 0) {
return of(new IncludeAllPageWithOutput(pages, pages.files.get(0), ... | java | private Optional<IncludeAllPageWithOutput> addOutputInformation(IncludeAllPage pages, FileResource baseResource, Path includeAllBasePath, Locale locale) {
// depth = 0 is the file that has the include-all directive
if (pages.depth == 0) {
return of(new IncludeAllPageWithOutput(pages, pages.files.get(0), ... | [
"private",
"Optional",
"<",
"IncludeAllPageWithOutput",
">",
"addOutputInformation",
"(",
"IncludeAllPage",
"pages",
",",
"FileResource",
"baseResource",
",",
"Path",
"includeAllBasePath",
",",
"Locale",
"locale",
")",
"{",
"// depth = 0 is the file that has the include-all d... | generate the final output path | [
"generate",
"the",
"final",
"output",
"path"
] | 5a41f20acd9211cf3951c30d0e0825994ae95573 | https://github.com/digitalfondue/stampo/blob/5a41f20acd9211cf3951c30d0e0825994ae95573/src/main/java/ch/digitalfondue/stampo/processor/IncludeAllPaginator.java#L214-L230 | train |
killme2008/hs4j | src/main/java/com/google/code/hs4j/network/nio/impl/SelectorManager.java | SelectorManager.getReactorByIndex | public Reactor getReactorByIndex(int index) {
if (index < 0 || index > reactorSet.length - 1) {
throw new ArrayIndexOutOfBoundsException();
}
return reactorSet[index];
} | java | public Reactor getReactorByIndex(int index) {
if (index < 0 || index > reactorSet.length - 1) {
throw new ArrayIndexOutOfBoundsException();
}
return reactorSet[index];
} | [
"public",
"Reactor",
"getReactorByIndex",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
"<",
"0",
"||",
"index",
">",
"reactorSet",
".",
"length",
"-",
"1",
")",
"{",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
")",
";",
"}",
"return",
"r... | Find reactor by index
@param index
@return | [
"Find",
"reactor",
"by",
"index"
] | 805fe14bfe270d95009514c224d93c5fe3575f11 | https://github.com/killme2008/hs4j/blob/805fe14bfe270d95009514c224d93c5fe3575f11/src/main/java/com/google/code/hs4j/network/nio/impl/SelectorManager.java#L82-L87 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/paint/PainterExtensions.java | PainterExtensions.getCompoundPainter | @SuppressWarnings("rawtypes")
public static CompoundPainter getCompoundPainter(final Color matte, final Color gloss,
final GlossPainter.GlossPosition position, final double angle, final Color pinstripe)
{
final MattePainter mp = new MattePainter(matte);
final GlossPainter gp = new GlossPainter(gloss, posit... | java | @SuppressWarnings("rawtypes")
public static CompoundPainter getCompoundPainter(final Color matte, final Color gloss,
final GlossPainter.GlossPosition position, final double angle, final Color pinstripe)
{
final MattePainter mp = new MattePainter(matte);
final GlossPainter gp = new GlossPainter(gloss, posit... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"static",
"CompoundPainter",
"getCompoundPainter",
"(",
"final",
"Color",
"matte",
",",
"final",
"Color",
"gloss",
",",
"final",
"GlossPainter",
".",
"GlossPosition",
"position",
",",
"final",
"double",
... | Gets a CompoundPainter object.
@param matte
the matte color
@param gloss
the gloss color
@param position
the position
@param angle
the angle
@param pinstripe
the pinstripe painter
@return the CompoundPainter object. | [
"Gets",
"a",
"CompoundPainter",
"object",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/paint/PainterExtensions.java#L56-L66 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/paint/PainterExtensions.java | PainterExtensions.getCompoundPainter | @SuppressWarnings("rawtypes")
public static CompoundPainter getCompoundPainter(final Color color,
final GlossPainter.GlossPosition position, final double angle)
{
final MattePainter mp = new MattePainter(color);
final GlossPainter gp = new GlossPainter(color, position);
final PinstripePainter pp = new P... | java | @SuppressWarnings("rawtypes")
public static CompoundPainter getCompoundPainter(final Color color,
final GlossPainter.GlossPosition position, final double angle)
{
final MattePainter mp = new MattePainter(color);
final GlossPainter gp = new GlossPainter(color, position);
final PinstripePainter pp = new P... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"static",
"CompoundPainter",
"getCompoundPainter",
"(",
"final",
"Color",
"color",
",",
"final",
"GlossPainter",
".",
"GlossPosition",
"position",
",",
"final",
"double",
"angle",
")",
"{",
"final",
"Mat... | Gets the compound painter.
@param color
the color
@param position
the position
@param angle
the angle
@return the compound painter | [
"Gets",
"the",
"compound",
"painter",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/paint/PainterExtensions.java#L79-L89 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/paint/PainterExtensions.java | PainterExtensions.getMattePainter | public static MattePainter getMattePainter(final int width, final int height,
final float[] fractions, final Color... colors)
{
final LinearGradientPaint gradientPaint = new LinearGradientPaint(0.0f, 0.0f, width, height,
fractions, colors);
final MattePainter mattePainter = new MattePainter(gradientPaint... | java | public static MattePainter getMattePainter(final int width, final int height,
final float[] fractions, final Color... colors)
{
final LinearGradientPaint gradientPaint = new LinearGradientPaint(0.0f, 0.0f, width, height,
fractions, colors);
final MattePainter mattePainter = new MattePainter(gradientPaint... | [
"public",
"static",
"MattePainter",
"getMattePainter",
"(",
"final",
"int",
"width",
",",
"final",
"int",
"height",
",",
"final",
"float",
"[",
"]",
"fractions",
",",
"final",
"Color",
"...",
"colors",
")",
"{",
"final",
"LinearGradientPaint",
"gradientPaint",
... | Gets a MattePainter object.
@param width
the width
@param height
the height
@param fractions
the fractions
@param colors
the colors
@return the MattePainter object | [
"Gets",
"a",
"MattePainter",
"object",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/paint/PainterExtensions.java#L104-L112 | train |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/Sphere3f.java | Sphere3f.set | @Override
public void set(Point3D center, double radius1) {
this.cx = center.getX();
this.cy = center.getY();
this.cz = center.getZ();
this.radius = Math.abs(radius1);
} | java | @Override
public void set(Point3D center, double radius1) {
this.cx = center.getX();
this.cy = center.getY();
this.cz = center.getZ();
this.radius = Math.abs(radius1);
} | [
"@",
"Override",
"public",
"void",
"set",
"(",
"Point3D",
"center",
",",
"double",
"radius1",
")",
"{",
"this",
".",
"cx",
"=",
"center",
".",
"getX",
"(",
")",
";",
"this",
".",
"cy",
"=",
"center",
".",
"getY",
"(",
")",
";",
"this",
".",
"cz",... | Change the frame of te sphere.
@param center
@param radius1 | [
"Change",
"the",
"frame",
"of",
"te",
"sphere",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Sphere3f.java#L80-L86 | train |
gallandarakhneorg/afc | advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/MultiShape3dfx.java | MultiShape3dfx.elementsProperty | public ListProperty<T> elementsProperty() {
if (this.elements == null) {
this.elements = new SimpleListProperty<>(this,
MathFXAttributeNames.ELEMENTS, new InternalObservableList<>());
}
return this.elements;
} | java | public ListProperty<T> elementsProperty() {
if (this.elements == null) {
this.elements = new SimpleListProperty<>(this,
MathFXAttributeNames.ELEMENTS, new InternalObservableList<>());
}
return this.elements;
} | [
"public",
"ListProperty",
"<",
"T",
">",
"elementsProperty",
"(",
")",
"{",
"if",
"(",
"this",
".",
"elements",
"==",
"null",
")",
"{",
"this",
".",
"elements",
"=",
"new",
"SimpleListProperty",
"<>",
"(",
"this",
",",
"MathFXAttributeNames",
".",
"ELEMENT... | Replies the property that contains all the shapes in this multishape.
@return the elements property. | [
"Replies",
"the",
"property",
"that",
"contains",
"all",
"the",
"shapes",
"in",
"this",
"multishape",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/MultiShape3dfx.java#L102-L108 | train |
gallandarakhneorg/afc | core/util/src/main/java/org/arakhne/afc/util/InformedArrayList.java | InformedArrayList.extractClassFrom | @SuppressWarnings("unchecked")
protected static <E> Class<? extends E> extractClassFrom(Collection<? extends E> collection) {
Class<? extends E> clazz = null;
for (final E elt : collection) {
clazz = (Class<? extends E>) ReflectionUtil.getCommonType(clazz, elt.getClass());
}
return clazz == null ? (Class<E>... | java | @SuppressWarnings("unchecked")
protected static <E> Class<? extends E> extractClassFrom(Collection<? extends E> collection) {
Class<? extends E> clazz = null;
for (final E elt : collection) {
clazz = (Class<? extends E>) ReflectionUtil.getCommonType(clazz, elt.getClass());
}
return clazz == null ? (Class<E>... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"protected",
"static",
"<",
"E",
">",
"Class",
"<",
"?",
"extends",
"E",
">",
"extractClassFrom",
"(",
"Collection",
"<",
"?",
"extends",
"E",
">",
"collection",
")",
"{",
"Class",
"<",
"?",
"extends",
... | Extract the upper class that contains all the elements of
this array.
@param <E> is the type of the list's elements.
@param collection is the collection to scan
@return the top class of all the elements. | [
"Extract",
"the",
"upper",
"class",
"that",
"contains",
"all",
"the",
"elements",
"of",
"this",
"array",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/InformedArrayList.java#L120-L127 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/base/BaseDesktopMenu.java | BaseDesktopMenu.getHelpSet | public HelpSet getHelpSet()
{
HelpSet hs = null;
final String filename = "simple-hs.xml";
final String path = "help/" + filename;
URL hsURL;
hsURL = ClassExtensions.getResource(path);
try
{
if(hsURL != null) {
hs = new HelpSet(ClassExtensions.getClassLoader(), hsURL);
} else {
hs = new Help... | java | public HelpSet getHelpSet()
{
HelpSet hs = null;
final String filename = "simple-hs.xml";
final String path = "help/" + filename;
URL hsURL;
hsURL = ClassExtensions.getResource(path);
try
{
if(hsURL != null) {
hs = new HelpSet(ClassExtensions.getClassLoader(), hsURL);
} else {
hs = new Help... | [
"public",
"HelpSet",
"getHelpSet",
"(",
")",
"{",
"HelpSet",
"hs",
"=",
"null",
";",
"final",
"String",
"filename",
"=",
"\"simple-hs.xml\"",
";",
"final",
"String",
"path",
"=",
"\"help/\"",
"+",
"filename",
";",
"URL",
"hsURL",
";",
"hsURL",
"=",
"ClassE... | Gets the help set.
@return the help set | [
"Gets",
"the",
"help",
"set",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/base/BaseDesktopMenu.java#L131-L156 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/base/BaseDesktopMenu.java | BaseDesktopMenu.newHelpMenu | protected JMenu newHelpMenu(final ActionListener listener)
{
// Help menu
final JMenu menuHelp = new JMenu(newLabelTextHelp());
menuHelp.setMnemonic('H');
// Help JMenuItems
// Help content
final JMenuItem mihHelpContent = JComponentFactory.newJMenuItem(newLabelTextContent(), 'c',
'H');
menuHelp.add(... | java | protected JMenu newHelpMenu(final ActionListener listener)
{
// Help menu
final JMenu menuHelp = new JMenu(newLabelTextHelp());
menuHelp.setMnemonic('H');
// Help JMenuItems
// Help content
final JMenuItem mihHelpContent = JComponentFactory.newJMenuItem(newLabelTextContent(), 'c',
'H');
menuHelp.add(... | [
"protected",
"JMenu",
"newHelpMenu",
"(",
"final",
"ActionListener",
"listener",
")",
"{",
"// Help menu",
"final",
"JMenu",
"menuHelp",
"=",
"new",
"JMenu",
"(",
"newLabelTextHelp",
"(",
")",
")",
";",
"menuHelp",
".",
"setMnemonic",
"(",
"'",
"'",
")",
";"... | Creates the help menu.
@param listener
the listener
@return the j menu | [
"Creates",
"the",
"help",
"menu",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/base/BaseDesktopMenu.java#L204-L241 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/base/BaseDesktopMenu.java | BaseDesktopMenu.newLookAndFeelMenu | protected JMenu newLookAndFeelMenu(final ActionListener listener)
{
final JMenu menuLookAndFeel = new JMenu("Look and Feel");
menuLookAndFeel.setMnemonic('L');
// Look and Feel JMenuItems
// GTK
JMenuItem jmiPlafGTK;
jmiPlafGTK = new JMenuItem("GTK", 'g'); //$NON-NLS-1$
MenuExtensions.setCtrlAccelerato... | java | protected JMenu newLookAndFeelMenu(final ActionListener listener)
{
final JMenu menuLookAndFeel = new JMenu("Look and Feel");
menuLookAndFeel.setMnemonic('L');
// Look and Feel JMenuItems
// GTK
JMenuItem jmiPlafGTK;
jmiPlafGTK = new JMenuItem("GTK", 'g'); //$NON-NLS-1$
MenuExtensions.setCtrlAccelerato... | [
"protected",
"JMenu",
"newLookAndFeelMenu",
"(",
"final",
"ActionListener",
"listener",
")",
"{",
"final",
"JMenu",
"menuLookAndFeel",
"=",
"new",
"JMenu",
"(",
"\"Look and Feel\"",
")",
";",
"menuLookAndFeel",
".",
"setMnemonic",
"(",
"'",
"'",
")",
";",
"// Lo... | Creates the look and feel menu.
@param listener
the listener
@return the j menu | [
"Creates",
"the",
"look",
"and",
"feel",
"menu",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/base/BaseDesktopMenu.java#L357-L405 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.