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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
BBN-E/bue-common-open | indri-utils/src/main/java/com/bbn/nlp/indri/bin/IndexBuilder.java | IndexBuilder.setupIndexer | private static IndexEnvironment setupIndexer(File outputDirectory, int memory,
boolean storeDocs) throws Exception {
final IndexEnvironment env = new IndexEnvironment();
env.setMemory(memory * ONE_MEGABYTE);
final Specification spec = env.getFileClassSpec("trectext");
env.addFileClass(spec);
e... | java | private static IndexEnvironment setupIndexer(File outputDirectory, int memory,
boolean storeDocs) throws Exception {
final IndexEnvironment env = new IndexEnvironment();
env.setMemory(memory * ONE_MEGABYTE);
final Specification spec = env.getFileClassSpec("trectext");
env.addFileClass(spec);
e... | [
"private",
"static",
"IndexEnvironment",
"setupIndexer",
"(",
"File",
"outputDirectory",
",",
"int",
"memory",
",",
"boolean",
"storeDocs",
")",
"throws",
"Exception",
"{",
"final",
"IndexEnvironment",
"env",
"=",
"new",
"IndexEnvironment",
"(",
")",
";",
"env",
... | because its only reference is in native code, then we will get a crash. | [
"because",
"its",
"only",
"reference",
"is",
"in",
"native",
"code",
"then",
"we",
"will",
"get",
"a",
"crash",
"."
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/indri-utils/src/main/java/com/bbn/nlp/indri/bin/IndexBuilder.java#L138-L150 | train |
BBN-E/bue-common-open | scoring-open/src/main/java/com/bbn/bue/common/evaluation/InspectorTreeNode.java | InspectorTreeNode.registerConsumer | @SuppressWarnings("unchecked")
void registerConsumer(Inspector<? super OutT> subInspector) {
consumers.add((Inspector<OutT>) subInspector);
} | java | @SuppressWarnings("unchecked")
void registerConsumer(Inspector<? super OutT> subInspector) {
consumers.add((Inspector<OutT>) subInspector);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"void",
"registerConsumer",
"(",
"Inspector",
"<",
"?",
"super",
"OutT",
">",
"subInspector",
")",
"{",
"consumers",
".",
"add",
"(",
"(",
"Inspector",
"<",
"OutT",
">",
")",
"subInspector",
")",
";",
"}"... | Inspector is contravariant in its type | [
"Inspector",
"is",
"contravariant",
"in",
"its",
"type"
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/scoring-open/src/main/java/com/bbn/bue/common/evaluation/InspectorTreeNode.java#L32-L35 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java | GISTreeSetUtil.classifies | @Pure
public static int classifies(AbstractGISTreeSetNode<?, ?> node, GeoLocation location) {
if (node.getZone() == IcosepQuadTreeZone.ICOSEP) {
return classifiesIcocep(node.verticalSplit, node.horizontalSplit, location.toBounds2D());
}
return classifiesNonIcocep(node.verticalSplit, node.horizontalSplit, loca... | java | @Pure
public static int classifies(AbstractGISTreeSetNode<?, ?> node, GeoLocation location) {
if (node.getZone() == IcosepQuadTreeZone.ICOSEP) {
return classifiesIcocep(node.verticalSplit, node.horizontalSplit, location.toBounds2D());
}
return classifiesNonIcocep(node.verticalSplit, node.horizontalSplit, loca... | [
"@",
"Pure",
"public",
"static",
"int",
"classifies",
"(",
"AbstractGISTreeSetNode",
"<",
"?",
",",
"?",
">",
"node",
",",
"GeoLocation",
"location",
")",
"{",
"if",
"(",
"node",
".",
"getZone",
"(",
")",
"==",
"IcosepQuadTreeZone",
".",
"ICOSEP",
")",
"... | Replies the classificiation of the specified location.
@param node the classification base.
@param location the point to classify.
@return the classificiation of the specified location inside to the node. | [
"Replies",
"the",
"classificiation",
"of",
"the",
"specified",
"location",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L62-L68 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java | GISTreeSetUtil.contains | @Pure
static boolean contains(int region, double cutX, double cutY, double pointX, double pointY) {
switch (IcosepQuadTreeZone.values()[region]) {
case SOUTH_WEST:
return pointX <= cutX && pointY <= cutY;
case SOUTH_EAST:
return pointX >= cutX && pointY <= cutY;
case NORTH_WEST:
return pointX <= cutX ... | java | @Pure
static boolean contains(int region, double cutX, double cutY, double pointX, double pointY) {
switch (IcosepQuadTreeZone.values()[region]) {
case SOUTH_WEST:
return pointX <= cutX && pointY <= cutY;
case SOUTH_EAST:
return pointX >= cutX && pointY <= cutY;
case NORTH_WEST:
return pointX <= cutX ... | [
"@",
"Pure",
"static",
"boolean",
"contains",
"(",
"int",
"region",
",",
"double",
"cutX",
",",
"double",
"cutY",
",",
"double",
"pointX",
",",
"double",
"pointY",
")",
"{",
"switch",
"(",
"IcosepQuadTreeZone",
".",
"values",
"(",
")",
"[",
"region",
"]"... | Replies if the given region contains the given point.
@param region is the index of the region.
@param cutX is the cut line of the region parent.
@param cutY is the cut line of the region parent.
@param pointX is the coordinate of the point to classify.
@param pointY is the coordinate of the point to classify.
@return... | [
"Replies",
"if",
"the",
"given",
"region",
"contains",
"the",
"given",
"point",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L128-L144 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java | GISTreeSetUtil.isOutsideNodeBuildingBounds | @Pure
private static boolean isOutsideNodeBuildingBounds(AbstractGISTreeSetNode<?, ?> node,
Rectangle2afp<?, ?, ?, ?, ?, ?> location) {
final Rectangle2d b2 = getNormalizedNodeBuildingBounds(node, location);
if (b2 == null) {
return false;
}
return Rectangle2afp.classifiesRectangleRectangle(
b2.getMi... | java | @Pure
private static boolean isOutsideNodeBuildingBounds(AbstractGISTreeSetNode<?, ?> node,
Rectangle2afp<?, ?, ?, ?, ?, ?> location) {
final Rectangle2d b2 = getNormalizedNodeBuildingBounds(node, location);
if (b2 == null) {
return false;
}
return Rectangle2afp.classifiesRectangleRectangle(
b2.getMi... | [
"@",
"Pure",
"private",
"static",
"boolean",
"isOutsideNodeBuildingBounds",
"(",
"AbstractGISTreeSetNode",
"<",
"?",
",",
"?",
">",
"node",
",",
"Rectangle2afp",
"<",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
">",
"location",
")",
"{",
"fi... | Replies if the given geolocation is outside the building bounds of the given node. | [
"Replies",
"if",
"the",
"given",
"geolocation",
"is",
"outside",
"the",
"building",
"bounds",
"of",
"the",
"given",
"node",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L311-L321 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java | GISTreeSetUtil.union | private static Rectangle2d union(AbstractGISTreeSetNode<?, ?> node, Rectangle2afp<?, ?, ?, ?, ?, ?> shape) {
final Rectangle2d b = getNodeBuildingBounds(node);
b.setUnion(shape);
normalize(b, shape);
return b;
} | java | private static Rectangle2d union(AbstractGISTreeSetNode<?, ?> node, Rectangle2afp<?, ?, ?, ?, ?, ?> shape) {
final Rectangle2d b = getNodeBuildingBounds(node);
b.setUnion(shape);
normalize(b, shape);
return b;
} | [
"private",
"static",
"Rectangle2d",
"union",
"(",
"AbstractGISTreeSetNode",
"<",
"?",
",",
"?",
">",
"node",
",",
"Rectangle2afp",
"<",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
">",
"shape",
")",
"{",
"final",
"Rectangle2d",
"b",
"=",
... | Compute the union of the building bounds of the given node and the given geolocation. | [
"Compute",
"the",
"union",
"of",
"the",
"building",
"bounds",
"of",
"the",
"given",
"node",
"and",
"the",
"given",
"geolocation",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L357-L362 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java | GISTreeSetUtil.getNodeBuildingBounds | @Pure
public static Rectangle2d getNodeBuildingBounds(AbstractGISTreeSetNode<?, ?> node) {
assert node != null;
final double w = node.nodeWidth / 2.;
final double h = node.nodeHeight / 2.;
final IcosepQuadTreeZone zone = node.getZone();
final double lx;
final double ly;
if (zone == null) {
// Is root ... | java | @Pure
public static Rectangle2d getNodeBuildingBounds(AbstractGISTreeSetNode<?, ?> node) {
assert node != null;
final double w = node.nodeWidth / 2.;
final double h = node.nodeHeight / 2.;
final IcosepQuadTreeZone zone = node.getZone();
final double lx;
final double ly;
if (zone == null) {
// Is root ... | [
"@",
"Pure",
"public",
"static",
"Rectangle2d",
"getNodeBuildingBounds",
"(",
"AbstractGISTreeSetNode",
"<",
"?",
",",
"?",
">",
"node",
")",
"{",
"assert",
"node",
"!=",
"null",
";",
"final",
"double",
"w",
"=",
"node",
".",
"nodeWidth",
"/",
"2.",
";",
... | Replies the bounds of the area covered by the node.
The replied rectangle is not normalized.
@param node is the node for which the bounds must be extracted and reploed.
@return the not-normalized rectangle. | [
"Replies",
"the",
"bounds",
"of",
"the",
"area",
"covered",
"by",
"the",
"node",
".",
"The",
"replied",
"rectangle",
"is",
"not",
"normalized",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L387-L424 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java | GISTreeSetUtil.createNode | private static <P extends GISPrimitive, N extends AbstractGISTreeSetNode<P, N>>
N createNode(N parent, IcosepQuadTreeZone region, GISTreeSetNodeFactory<P, N> builder) {
Rectangle2d area = parent.getAreaBounds();
if (region == IcosepQuadTreeZone.ICOSEP) {
return builder.newNode(
IcosepQuadTreeZone.ICOSEP... | java | private static <P extends GISPrimitive, N extends AbstractGISTreeSetNode<P, N>>
N createNode(N parent, IcosepQuadTreeZone region, GISTreeSetNodeFactory<P, N> builder) {
Rectangle2d area = parent.getAreaBounds();
if (region == IcosepQuadTreeZone.ICOSEP) {
return builder.newNode(
IcosepQuadTreeZone.ICOSEP... | [
"private",
"static",
"<",
"P",
"extends",
"GISPrimitive",
",",
"N",
"extends",
"AbstractGISTreeSetNode",
"<",
"P",
",",
"N",
">",
">",
"N",
"createNode",
"(",
"N",
"parent",
",",
"IcosepQuadTreeZone",
"region",
",",
"GISTreeSetNodeFactory",
"<",
"P",
",",
"N... | Create a child node that supports the specified region.
@param <P> is the type of the primitives.
@param parent is the node in which the new node will be inserted.
@param region is the region that must be covered by the new node.
@param element is the element to initially put inside the node.
@param builder permits to... | [
"Create",
"a",
"child",
"node",
"that",
"supports",
"the",
"specified",
"region",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L435-L465 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java | GISTreeSetUtil.computeIcosepSubarea | private static Rectangle2d
computeIcosepSubarea(IcosepQuadTreeZone region, Rectangle2d area) {
if (area == null || area.isEmpty()) {
return area;
}
final double demiWidth = area.getWidth() / 2.;
final double demiHeight = area.getHeight() / 2.;
switch (region) {
case ICOSEP:
return area;
case SOUTH... | java | private static Rectangle2d
computeIcosepSubarea(IcosepQuadTreeZone region, Rectangle2d area) {
if (area == null || area.isEmpty()) {
return area;
}
final double demiWidth = area.getWidth() / 2.;
final double demiHeight = area.getHeight() / 2.;
switch (region) {
case ICOSEP:
return area;
case SOUTH... | [
"private",
"static",
"Rectangle2d",
"computeIcosepSubarea",
"(",
"IcosepQuadTreeZone",
"region",
",",
"Rectangle2d",
"area",
")",
"{",
"if",
"(",
"area",
"==",
"null",
"||",
"area",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"area",
";",
"}",
"final",
"... | Computes the area covered by a child node of an icosep-node.
@param region is the id of the region for which the area must be computed
@param area is the parent icosep area.
@return the area covered by the child node. | [
"Computes",
"the",
"area",
"covered",
"by",
"a",
"child",
"node",
"of",
"an",
"icosep",
"-",
"node",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L473-L502 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java | GISTreeSetUtil.computeCutPoint | private static <P extends GISPrimitive, N extends AbstractGISTreeSetNode<P, N>>
Point2d computeCutPoint(IcosepQuadTreeZone region, N parent) {
final double w = parent.nodeWidth / 4.;
final double h = parent.nodeHeight / 4.;
final double x;
final double y;
switch (region) {
case SOUTH_WEST:
x = parent.v... | java | private static <P extends GISPrimitive, N extends AbstractGISTreeSetNode<P, N>>
Point2d computeCutPoint(IcosepQuadTreeZone region, N parent) {
final double w = parent.nodeWidth / 4.;
final double h = parent.nodeHeight / 4.;
final double x;
final double y;
switch (region) {
case SOUTH_WEST:
x = parent.v... | [
"private",
"static",
"<",
"P",
"extends",
"GISPrimitive",
",",
"N",
"extends",
"AbstractGISTreeSetNode",
"<",
"P",
",",
"N",
">",
">",
"Point2d",
"computeCutPoint",
"(",
"IcosepQuadTreeZone",
"region",
",",
"N",
"parent",
")",
"{",
"final",
"double",
"w",
"=... | Computes the cut planes' position of the given region.
@param region is the id of the region for which the cut plane position must be computed
@param parent is the parent node.
@return the cut planes' position of the region, or <code>null</code> if
the cut planes' position could not be computed (because the region is ... | [
"Computes",
"the",
"cut",
"planes",
"position",
"of",
"the",
"given",
"region",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L512-L540 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java | GISTreeSetUtil.rearrangeTree | private static <P extends GISPrimitive, N extends AbstractGISTreeSetNode<P, N>>
N rearrangeTree(AbstractGISTreeSet<P, N> tree, N node, Rectangle2afp<?, ?, ?, ?, ?, ?> desiredBounds,
GISTreeSetNodeFactory<P, N> builder) {
// Search for the node that completely contains the desired area
N topNode = node.getPare... | java | private static <P extends GISPrimitive, N extends AbstractGISTreeSetNode<P, N>>
N rearrangeTree(AbstractGISTreeSet<P, N> tree, N node, Rectangle2afp<?, ?, ?, ?, ?, ?> desiredBounds,
GISTreeSetNodeFactory<P, N> builder) {
// Search for the node that completely contains the desired area
N topNode = node.getPare... | [
"private",
"static",
"<",
"P",
"extends",
"GISPrimitive",
",",
"N",
"extends",
"AbstractGISTreeSetNode",
"<",
"P",
",",
"N",
">",
">",
"N",
"rearrangeTree",
"(",
"AbstractGISTreeSet",
"<",
"P",
",",
"N",
">",
"tree",
",",
"N",
"node",
",",
"Rectangle2afp",... | Try to rearrange the cut planes of the given node. | [
"Try",
"to",
"rearrange",
"the",
"cut",
"planes",
"of",
"the",
"given",
"node",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/GISTreeSetUtil.java#L544-L584 | train |
gallandarakhneorg/afc | core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/i/AbstractShape3i.java | AbstractShape3i.addShapeGeometryChangeListener | protected synchronized void addShapeGeometryChangeListener(ShapeGeometryChangeListener listener) {
assert listener != null : AssertMessages.notNullParameter();
if (this.geometryListeners == null) {
this.geometryListeners = new WeakArrayList<>();
}
this.geometryListeners.add(listener);
} | java | protected synchronized void addShapeGeometryChangeListener(ShapeGeometryChangeListener listener) {
assert listener != null : AssertMessages.notNullParameter();
if (this.geometryListeners == null) {
this.geometryListeners = new WeakArrayList<>();
}
this.geometryListeners.add(listener);
} | [
"protected",
"synchronized",
"void",
"addShapeGeometryChangeListener",
"(",
"ShapeGeometryChangeListener",
"listener",
")",
"{",
"assert",
"listener",
"!=",
"null",
":",
"AssertMessages",
".",
"notNullParameter",
"(",
")",
";",
"if",
"(",
"this",
".",
"geometryListene... | Add listener on geometry changes.
@param listener the listener. | [
"Add",
"listener",
"on",
"geometry",
"changes",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/i/AbstractShape3i.java#L52-L58 | train |
gallandarakhneorg/afc | core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/i/AbstractShape3i.java | AbstractShape3i.removeShapeGeometryChangeListener | protected synchronized void removeShapeGeometryChangeListener(ShapeGeometryChangeListener listener) {
assert listener != null : AssertMessages.notNullParameter();
if (this.geometryListeners != null) {
this.geometryListeners.remove(listener);
if (this.geometryListeners.isEmpty()) {
this.geometryListeners =... | java | protected synchronized void removeShapeGeometryChangeListener(ShapeGeometryChangeListener listener) {
assert listener != null : AssertMessages.notNullParameter();
if (this.geometryListeners != null) {
this.geometryListeners.remove(listener);
if (this.geometryListeners.isEmpty()) {
this.geometryListeners =... | [
"protected",
"synchronized",
"void",
"removeShapeGeometryChangeListener",
"(",
"ShapeGeometryChangeListener",
"listener",
")",
"{",
"assert",
"listener",
"!=",
"null",
":",
"AssertMessages",
".",
"notNullParameter",
"(",
")",
";",
"if",
"(",
"this",
".",
"geometryList... | Remove listener on geometry changes.
@param listener the listener. | [
"Remove",
"listener",
"on",
"geometry",
"changes",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/i/AbstractShape3i.java#L64-L72 | train |
gallandarakhneorg/afc | core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/i/AbstractShape3i.java | AbstractShape3i.fireGeometryChange | protected synchronized void fireGeometryChange() {
if (this.geometryListeners == null) {
return;
}
final ShapeGeometryChangeListener[] array = new ShapeGeometryChangeListener[this.geometryListeners.size()];
this.geometryListeners.toArray(array);
for (final ShapeGeometryChangeListener listener : array) {
... | java | protected synchronized void fireGeometryChange() {
if (this.geometryListeners == null) {
return;
}
final ShapeGeometryChangeListener[] array = new ShapeGeometryChangeListener[this.geometryListeners.size()];
this.geometryListeners.toArray(array);
for (final ShapeGeometryChangeListener listener : array) {
... | [
"protected",
"synchronized",
"void",
"fireGeometryChange",
"(",
")",
"{",
"if",
"(",
"this",
".",
"geometryListeners",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
"ShapeGeometryChangeListener",
"[",
"]",
"array",
"=",
"new",
"ShapeGeometryChangeListener",... | Notify any listener of a geometry change. | [
"Notify",
"any",
"listener",
"of",
"a",
"geometry",
"change",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d3/i/AbstractShape3i.java#L76-L85 | train |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java | ZoomablePane.setupListeners | protected void setupListeners() {
addDrawingListener(new DrawingListener() {
private long time;
@Override
public void onDrawingStart() {
this.time = System.currentTimeMillis();
getCorner().setColor(Color.ORANGERED);
}
@Override
public void onDrawingEnd() {
getCorner().setColor(null);
... | java | protected void setupListeners() {
addDrawingListener(new DrawingListener() {
private long time;
@Override
public void onDrawingStart() {
this.time = System.currentTimeMillis();
getCorner().setColor(Color.ORANGERED);
}
@Override
public void onDrawingEnd() {
getCorner().setColor(null);
... | [
"protected",
"void",
"setupListeners",
"(",
")",
"{",
"addDrawingListener",
"(",
"new",
"DrawingListener",
"(",
")",
"{",
"private",
"long",
"time",
";",
"@",
"Override",
"public",
"void",
"onDrawingStart",
"(",
")",
"{",
"this",
".",
"time",
"=",
"System",
... | Setup the response based on listeners. | [
"Setup",
"the",
"response",
"based",
"on",
"listeners",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L312-L329 | train |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java | ZoomablePane.setupMousing | @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity", "checkstyle:nestedifdepth"})
protected void setupMousing() {
final ZoomableCanvas<T> canvas = getDocumentCanvas();
canvas.addEventHandler(MouseEvent.MOUSE_PRESSED, e -> {
this.pressX = e.getX();
this.pressY = e.getY();
thi... | java | @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity", "checkstyle:nestedifdepth"})
protected void setupMousing() {
final ZoomableCanvas<T> canvas = getDocumentCanvas();
canvas.addEventHandler(MouseEvent.MOUSE_PRESSED, e -> {
this.pressX = e.getX();
this.pressY = e.getY();
thi... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:cyclomaticcomplexity\"",
",",
"\"checkstyle:npathcomplexity\"",
",",
"\"checkstyle:nestedifdepth\"",
"}",
")",
"protected",
"void",
"setupMousing",
"(",
")",
"{",
"final",
"ZoomableCanvas",
"<",
"T",
">",
"canvas",
"=",
... | Setup the response of the pane to mouse events. | [
"Setup",
"the",
"response",
"of",
"the",
"pane",
"to",
"mouse",
"events",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L409-L471 | train |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java | ZoomablePane.setupKeying | protected void setupKeying() {
setOnKeyPressed(event -> {
switch (event.getCode()) {
case LEFT:
moveLeft(event.isShiftDown(), event.isControlDown(), false);
event.consume();
break;
case RIGHT:
moveRight(event.isShiftDown(), event.isControlDown(), false);
event.consume();
break;
cas... | java | protected void setupKeying() {
setOnKeyPressed(event -> {
switch (event.getCode()) {
case LEFT:
moveLeft(event.isShiftDown(), event.isControlDown(), false);
event.consume();
break;
case RIGHT:
moveRight(event.isShiftDown(), event.isControlDown(), false);
event.consume();
break;
cas... | [
"protected",
"void",
"setupKeying",
"(",
")",
"{",
"setOnKeyPressed",
"(",
"event",
"->",
"{",
"switch",
"(",
"event",
".",
"getCode",
"(",
")",
")",
"{",
"case",
"LEFT",
":",
"moveLeft",
"(",
"event",
".",
"isShiftDown",
"(",
")",
",",
"event",
".",
... | Setup the response of the pane to key events. | [
"Setup",
"the",
"response",
"of",
"the",
"pane",
"to",
"key",
"events",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L475-L522 | train |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java | ZoomablePane.moveLeft | public void moveLeft(boolean isUnit, boolean isLarge, boolean isVeryLarge) {
double inc = isUnit ? this.hbar.getUnitIncrement()
: (isLarge ? LARGE_MOVE_FACTOR
: (isVeryLarge ? VERY_LARGE_MOVE_FACTOR : STANDARD_MOVE_FACTOR)) * this.hbar.getBlockIncrement();
if (!isInvertedAxisX()) {
inc = -inc;
}
th... | java | public void moveLeft(boolean isUnit, boolean isLarge, boolean isVeryLarge) {
double inc = isUnit ? this.hbar.getUnitIncrement()
: (isLarge ? LARGE_MOVE_FACTOR
: (isVeryLarge ? VERY_LARGE_MOVE_FACTOR : STANDARD_MOVE_FACTOR)) * this.hbar.getBlockIncrement();
if (!isInvertedAxisX()) {
inc = -inc;
}
th... | [
"public",
"void",
"moveLeft",
"(",
"boolean",
"isUnit",
",",
"boolean",
"isLarge",
",",
"boolean",
"isVeryLarge",
")",
"{",
"double",
"inc",
"=",
"isUnit",
"?",
"this",
".",
"hbar",
".",
"getUnitIncrement",
"(",
")",
":",
"(",
"isLarge",
"?",
"LARGE_MOVE_F... | Move the viewport left.
@param isUnit indicates if the move is a unit move. If {@code true}, this argument has precedence to the other arguments.
@param isLarge indicates if the move is a large move. If {@code true}, this argument has precedence
to the very large argument.
@param isVeryLarge indicates if the move is a... | [
"Move",
"the",
"viewport",
"left",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L531-L539 | train |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java | ZoomablePane.moveUp | public void moveUp(boolean isUnit, boolean isLarge, boolean isVeryLarge) {
double inc = isUnit ? this.vbar.getUnitIncrement()
: (isLarge ? LARGE_MOVE_FACTOR
: (isVeryLarge ? VERY_LARGE_MOVE_FACTOR : STANDARD_MOVE_FACTOR)) * this.vbar.getBlockIncrement();
if (!isInvertedAxisY()) {
inc = -inc;
}
this... | java | public void moveUp(boolean isUnit, boolean isLarge, boolean isVeryLarge) {
double inc = isUnit ? this.vbar.getUnitIncrement()
: (isLarge ? LARGE_MOVE_FACTOR
: (isVeryLarge ? VERY_LARGE_MOVE_FACTOR : STANDARD_MOVE_FACTOR)) * this.vbar.getBlockIncrement();
if (!isInvertedAxisY()) {
inc = -inc;
}
this... | [
"public",
"void",
"moveUp",
"(",
"boolean",
"isUnit",
",",
"boolean",
"isLarge",
",",
"boolean",
"isVeryLarge",
")",
"{",
"double",
"inc",
"=",
"isUnit",
"?",
"this",
".",
"vbar",
".",
"getUnitIncrement",
"(",
")",
":",
"(",
"isLarge",
"?",
"LARGE_MOVE_FAC... | Move the viewport up.
@param isUnit indicates if the move is a unit move. If {@code true}, this argument has precedence to the other arguments.
@param isLarge indicates if the move is a large move. If {@code true}, this argument has precedence
to the very large argument.
@param isVeryLarge indicates if the move is a v... | [
"Move",
"the",
"viewport",
"up",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L565-L573 | train |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java | ZoomablePane.loggerProperty | public ObjectProperty<Logger> loggerProperty() {
if (this.logger == null) {
this.logger = new SimpleObjectProperty<Logger>(this, LOGGER_PROPERTY, Logger.getLogger(getClass().getName())) {
@Override
protected void invalidated() {
final Logger log = get();
if (log == null) {
set(Logger.getLog... | java | public ObjectProperty<Logger> loggerProperty() {
if (this.logger == null) {
this.logger = new SimpleObjectProperty<Logger>(this, LOGGER_PROPERTY, Logger.getLogger(getClass().getName())) {
@Override
protected void invalidated() {
final Logger log = get();
if (log == null) {
set(Logger.getLog... | [
"public",
"ObjectProperty",
"<",
"Logger",
">",
"loggerProperty",
"(",
")",
"{",
"if",
"(",
"this",
".",
"logger",
"==",
"null",
")",
"{",
"this",
".",
"logger",
"=",
"new",
"SimpleObjectProperty",
"<",
"Logger",
">",
"(",
"this",
",",
"LOGGER_PROPERTY",
... | Replies the property that contains the logger.
@return the logger. | [
"Replies",
"the",
"property",
"that",
"contains",
"the",
"logger",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L596-L609 | train |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java | ZoomablePane.panButtonProperty | public ObjectProperty<MouseButton> panButtonProperty() {
if (this.panButton == null) {
this.panButton = new StyleableObjectProperty<MouseButton>(DEFAULT_PAN_BUTTON) {
@SuppressWarnings("synthetic-access")
@Override
protected void invalidated() {
final MouseButton button = get();
if (button ==... | java | public ObjectProperty<MouseButton> panButtonProperty() {
if (this.panButton == null) {
this.panButton = new StyleableObjectProperty<MouseButton>(DEFAULT_PAN_BUTTON) {
@SuppressWarnings("synthetic-access")
@Override
protected void invalidated() {
final MouseButton button = get();
if (button ==... | [
"public",
"ObjectProperty",
"<",
"MouseButton",
">",
"panButtonProperty",
"(",
")",
"{",
"if",
"(",
"this",
".",
"panButton",
"==",
"null",
")",
"{",
"this",
".",
"panButton",
"=",
"new",
"StyleableObjectProperty",
"<",
"MouseButton",
">",
"(",
"DEFAULT_PAN_BU... | Replies the property for the button that serves for starting the mouse scrolling.
@return the property. | [
"Replies",
"the",
"property",
"for",
"the",
"button",
"that",
"serves",
"for",
"starting",
"the",
"mouse",
"scrolling",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L690-L719 | train |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java | ZoomablePane.panSensitivityProperty | public DoubleProperty panSensitivityProperty() {
if (this.panSensitivity == null) {
this.panSensitivity = new StyleableDoubleProperty(DEFAULT_PAN_SENSITIVITY) {
@Override
public void invalidated() {
if (get() <= MIN_PAN_SENSITIVITY) {
set(MIN_PAN_SENSITIVITY);
}
}
@Override
pub... | java | public DoubleProperty panSensitivityProperty() {
if (this.panSensitivity == null) {
this.panSensitivity = new StyleableDoubleProperty(DEFAULT_PAN_SENSITIVITY) {
@Override
public void invalidated() {
if (get() <= MIN_PAN_SENSITIVITY) {
set(MIN_PAN_SENSITIVITY);
}
}
@Override
pub... | [
"public",
"DoubleProperty",
"panSensitivityProperty",
"(",
")",
"{",
"if",
"(",
"this",
".",
"panSensitivity",
"==",
"null",
")",
"{",
"this",
".",
"panSensitivity",
"=",
"new",
"StyleableDoubleProperty",
"(",
"DEFAULT_PAN_SENSITIVITY",
")",
"{",
"@",
"Override",
... | Replies the property that indicates the sensibility of the panning moves.
The sensibility is a strictly positive number that is multiplied to the
distance covered by the mouse motion for obtaining the move to
apply to the document.
The default value is 1.
@return the property. | [
"Replies",
"the",
"property",
"that",
"indicates",
"the",
"sensibility",
"of",
"the",
"panning",
"moves",
".",
"The",
"sensibility",
"is",
"a",
"strictly",
"positive",
"number",
"that",
"is",
"multiplied",
"to",
"the",
"distance",
"covered",
"by",
"the",
"mous... | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L745-L772 | train |
gallandarakhneorg/afc | advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java | ZoomablePane.getPanSensitivity | public double getPanSensitivity(boolean unitSensitivityModifier, boolean hugeSensivityModifier) {
if (unitSensitivityModifier) {
return DEFAULT_PAN_SENSITIVITY;
}
final double sens = getPanSensitivity();
if (hugeSensivityModifier) {
return sens * LARGE_MOVE_FACTOR;
}
return sens;
} | java | public double getPanSensitivity(boolean unitSensitivityModifier, boolean hugeSensivityModifier) {
if (unitSensitivityModifier) {
return DEFAULT_PAN_SENSITIVITY;
}
final double sens = getPanSensitivity();
if (hugeSensivityModifier) {
return sens * LARGE_MOVE_FACTOR;
}
return sens;
} | [
"public",
"double",
"getPanSensitivity",
"(",
"boolean",
"unitSensitivityModifier",
",",
"boolean",
"hugeSensivityModifier",
")",
"{",
"if",
"(",
"unitSensitivityModifier",
")",
"{",
"return",
"DEFAULT_PAN_SENSITIVITY",
";",
"}",
"final",
"double",
"sens",
"=",
"getPa... | Replies the sensibility of the panning moves after applying dynamic user interaction modifiers.
The sensibility is a strictly positive number that is multiplied to the
distance covered by the mouse motion for obtaining the move to
apply to the document.
The default value is 1.
<p>This function is usually used for comp... | [
"Replies",
"the",
"sensibility",
"of",
"the",
"panning",
"moves",
"after",
"applying",
"dynamic",
"user",
"interaction",
"modifiers",
".",
"The",
"sensibility",
"is",
"a",
"strictly",
"positive",
"number",
"that",
"is",
"multiplied",
"to",
"the",
"distance",
"co... | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L816-L825 | train |
gallandarakhneorg/afc | core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/AbstractGeomFactoryBase.java | AbstractGeomFactoryBase.setGlobalSplineApproximationRatio | public static void setGlobalSplineApproximationRatio(Double distance) {
if (distance == null || Double.isNaN(distance.doubleValue())) {
globalSplineApproximation = GeomConstants.SPLINE_APPROXIMATION_RATIO;
} else {
globalSplineApproximation = Math.max(0, distance);
}
} | java | public static void setGlobalSplineApproximationRatio(Double distance) {
if (distance == null || Double.isNaN(distance.doubleValue())) {
globalSplineApproximation = GeomConstants.SPLINE_APPROXIMATION_RATIO;
} else {
globalSplineApproximation = Math.max(0, distance);
}
} | [
"public",
"static",
"void",
"setGlobalSplineApproximationRatio",
"(",
"Double",
"distance",
")",
"{",
"if",
"(",
"distance",
"==",
"null",
"||",
"Double",
".",
"isNaN",
"(",
"distance",
".",
"doubleValue",
"(",
")",
")",
")",
"{",
"globalSplineApproximation",
... | Change the maximum distance that the line segments used to approximate the
curved segments are allowed to deviate from any point on the
original curve.
<p>The replied value is the one shared (and may be overridden) by the
geometry factories.
<p>The default value of the ratio is specified by
{@link GeomConstants#SPLIN... | [
"Change",
"the",
"maximum",
"distance",
"that",
"the",
"line",
"segments",
"used",
"to",
"approximate",
"the",
"curved",
"segments",
"are",
"allowed",
"to",
"deviate",
"from",
"any",
"point",
"on",
"the",
"original",
"curve",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/AbstractGeomFactoryBase.java#L73-L79 | train |
gallandarakhneorg/afc | advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/ESRIBounds.java | ESRIBounds.createUnion | public ESRIBounds createUnion(ESRIBounds bounds) {
final ESRIBounds eb = new ESRIBounds();
eb.minx = (bounds.minx < this.minx) ? bounds.minx : this.minx;
eb.maxx = (bounds.maxx < this.maxx) ? this.maxx : bounds.maxx;
eb.miny = (bounds.miny < this.miny) ? bounds.miny : this.miny;
eb.maxy = (bounds.maxy < this.... | java | public ESRIBounds createUnion(ESRIBounds bounds) {
final ESRIBounds eb = new ESRIBounds();
eb.minx = (bounds.minx < this.minx) ? bounds.minx : this.minx;
eb.maxx = (bounds.maxx < this.maxx) ? this.maxx : bounds.maxx;
eb.miny = (bounds.miny < this.miny) ? bounds.miny : this.miny;
eb.maxy = (bounds.maxy < this.... | [
"public",
"ESRIBounds",
"createUnion",
"(",
"ESRIBounds",
"bounds",
")",
"{",
"final",
"ESRIBounds",
"eb",
"=",
"new",
"ESRIBounds",
"(",
")",
";",
"eb",
".",
"minx",
"=",
"(",
"bounds",
".",
"minx",
"<",
"this",
".",
"minx",
")",
"?",
"bounds",
".",
... | Create and replies an union of this bounds and the given bounds.
@param bounds the bounds to make the union from.
@return the union of this bounds and the given one. | [
"Create",
"and",
"replies",
"an",
"union",
"of",
"this",
"bounds",
"and",
"the",
"given",
"bounds",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/ESRIBounds.java#L158-L169 | train |
gallandarakhneorg/afc | advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/ESRIBounds.java | ESRIBounds.add | public void add(ESRIPoint point) {
if (point.getX() < this.minx) {
this.minx = point.getX();
}
if (point.getX() > this.maxx) {
this.maxx = point.getX();
}
if (point.getY() < this.miny) {
this.miny = point.getY();
}
if (point.getY() > this.maxy) {
this.maxy = point.getY();
}
if (point.getZ(... | java | public void add(ESRIPoint point) {
if (point.getX() < this.minx) {
this.minx = point.getX();
}
if (point.getX() > this.maxx) {
this.maxx = point.getX();
}
if (point.getY() < this.miny) {
this.miny = point.getY();
}
if (point.getY() > this.maxy) {
this.maxy = point.getY();
}
if (point.getZ(... | [
"public",
"void",
"add",
"(",
"ESRIPoint",
"point",
")",
"{",
"if",
"(",
"point",
".",
"getX",
"(",
")",
"<",
"this",
".",
"minx",
")",
"{",
"this",
".",
"minx",
"=",
"point",
".",
"getX",
"(",
")",
";",
"}",
"if",
"(",
"point",
".",
"getX",
... | Add a point to this bounds.
@param point the point to add. | [
"Add",
"a",
"point",
"to",
"this",
"bounds",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/ESRIBounds.java#L175-L200 | train |
gallandarakhneorg/afc | advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/ESRIBounds.java | ESRIBounds.toRectangle2d | @Pure
public Rectangle2d toRectangle2d() {
final Rectangle2d bounds = new Rectangle2d();
bounds.setFromCorners(this.minx, this.miny, this.maxx, this.maxy);
return bounds;
} | java | @Pure
public Rectangle2d toRectangle2d() {
final Rectangle2d bounds = new Rectangle2d();
bounds.setFromCorners(this.minx, this.miny, this.maxx, this.maxy);
return bounds;
} | [
"@",
"Pure",
"public",
"Rectangle2d",
"toRectangle2d",
"(",
")",
"{",
"final",
"Rectangle2d",
"bounds",
"=",
"new",
"Rectangle2d",
"(",
")",
";",
"bounds",
".",
"setFromCorners",
"(",
"this",
".",
"minx",
",",
"this",
".",
"miny",
",",
"this",
".",
"maxx... | Replies the 2D bounds.
@return the 2D bounds | [
"Replies",
"the",
"2D",
"bounds",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/ESRIBounds.java#L376-L381 | train |
gallandarakhneorg/afc | advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/ESRIBounds.java | ESRIBounds.ensureMinMax | public void ensureMinMax() {
double t;
if (this.maxx < this.minx) {
t = this.minx;
this.minx = this.maxx;
this.maxx = t;
}
if (this.maxy < this.miny) {
t = this.miny;
this.miny = this.maxy;
this.maxy = t;
}
if (this.maxz < this.minz) {
t = this.minz;
this.minz = this.maxz;
this.ma... | java | public void ensureMinMax() {
double t;
if (this.maxx < this.minx) {
t = this.minx;
this.minx = this.maxx;
this.maxx = t;
}
if (this.maxy < this.miny) {
t = this.miny;
this.miny = this.maxy;
this.maxy = t;
}
if (this.maxz < this.minz) {
t = this.minz;
this.minz = this.maxz;
this.ma... | [
"public",
"void",
"ensureMinMax",
"(",
")",
"{",
"double",
"t",
";",
"if",
"(",
"this",
".",
"maxx",
"<",
"this",
".",
"minx",
")",
"{",
"t",
"=",
"this",
".",
"minx",
";",
"this",
".",
"minx",
"=",
"this",
".",
"maxx",
";",
"this",
".",
"maxx"... | Ensure that min and max values are correctly ordered. | [
"Ensure",
"that",
"min",
"and",
"max",
"values",
"are",
"correctly",
"ordered",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/ESRIBounds.java#L397-L419 | train |
gallandarakhneorg/afc | advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java | AbstractCommonShapeFileReader.getBoundsFromHeader | public ESRIBounds getBoundsFromHeader() {
try {
readHeader();
} catch (IOException exception) {
return null;
}
return new ESRIBounds(
this.minx, this.maxx,
this.miny, this.maxy,
this.minz, this.maxz,
this.minm, this.maxm);
} | java | public ESRIBounds getBoundsFromHeader() {
try {
readHeader();
} catch (IOException exception) {
return null;
}
return new ESRIBounds(
this.minx, this.maxx,
this.miny, this.maxy,
this.minz, this.maxz,
this.minm, this.maxm);
} | [
"public",
"ESRIBounds",
"getBoundsFromHeader",
"(",
")",
"{",
"try",
"{",
"readHeader",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"exception",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"ESRIBounds",
"(",
"this",
".",
"minx",
",",
"thi... | Replies the bounds read from the shape file header.
@return the bounds or <code>null</code> | [
"Replies",
"the",
"bounds",
"read",
"from",
"the",
"shape",
"file",
"header",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java#L246-L257 | train |
gallandarakhneorg/afc | advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java | AbstractCommonShapeFileReader.read | public E read() throws IOException {
boolean status = false;
try {
// Read header if not already read
readHeader();
// Read the records
E element;
try {
do {
element = readRecord(this.nextExpectedRecordIndex);
if (!postRecordReadingStage(element)) {
element = null;
}
+... | java | public E read() throws IOException {
boolean status = false;
try {
// Read header if not already read
readHeader();
// Read the records
E element;
try {
do {
element = readRecord(this.nextExpectedRecordIndex);
if (!postRecordReadingStage(element)) {
element = null;
}
+... | [
"public",
"E",
"read",
"(",
")",
"throws",
"IOException",
"{",
"boolean",
"status",
"=",
"false",
";",
"try",
"{",
"// Read header if not already read",
"readHeader",
"(",
")",
";",
"// Read the records",
"E",
"element",
";",
"try",
"{",
"do",
"{",
"element",
... | Read the elements for a shape file.
@return the list of the elements read from the Shape file or <code>null</code> on end-of-file.
@throws IOException in case of error. | [
"Read",
"the",
"elements",
"for",
"a",
"shape",
"file",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java#L420-L455 | train |
gallandarakhneorg/afc | advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java | AbstractCommonShapeFileReader.setReadingPosition | protected void setReadingPosition(int recordIndex, int byteIndex) throws IOException {
if (this.seekEnabled) {
this.nextExpectedRecordIndex = recordIndex;
this.buffer.position(byteIndex);
} else {
throw new SeekOperationDisabledException();
}
} | java | protected void setReadingPosition(int recordIndex, int byteIndex) throws IOException {
if (this.seekEnabled) {
this.nextExpectedRecordIndex = recordIndex;
this.buffer.position(byteIndex);
} else {
throw new SeekOperationDisabledException();
}
} | [
"protected",
"void",
"setReadingPosition",
"(",
"int",
"recordIndex",
",",
"int",
"byteIndex",
")",
"throws",
"IOException",
"{",
"if",
"(",
"this",
".",
"seekEnabled",
")",
"{",
"this",
".",
"nextExpectedRecordIndex",
"=",
"recordIndex",
";",
"this",
".",
"bu... | Set the reading position, excluding the header.
@param recordIndex is the index of the next record to read.
@param byteIndex is the index of the next byte to read (excluding the header).
@throws IOException in case of error. | [
"Set",
"the",
"reading",
"position",
"excluding",
"the",
"header",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java#L614-L621 | train |
gallandarakhneorg/afc | advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java | AbstractCommonShapeFileReader.ensureAvailableBytes | protected void ensureAvailableBytes(int amount) throws IOException {
if (!this.seekEnabled && amount > this.buffer.remaining()) {
this.bufferPosition += this.buffer.position();
this.buffer.compact();
int limit = this.buffer.position();
final int read = this.stream.read(this.buffer);
if (read < 0) {
... | java | protected void ensureAvailableBytes(int amount) throws IOException {
if (!this.seekEnabled && amount > this.buffer.remaining()) {
this.bufferPosition += this.buffer.position();
this.buffer.compact();
int limit = this.buffer.position();
final int read = this.stream.read(this.buffer);
if (read < 0) {
... | [
"protected",
"void",
"ensureAvailableBytes",
"(",
"int",
"amount",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"this",
".",
"seekEnabled",
"&&",
"amount",
">",
"this",
".",
"buffer",
".",
"remaining",
"(",
")",
")",
"{",
"this",
".",
"bufferPosition... | Ensure that the reading buffer is containing enoug bytes to read.
@param amount is the count of expected bytes
@throws IOException in case of error. | [
"Ensure",
"that",
"the",
"reading",
"buffer",
"is",
"containing",
"enoug",
"bytes",
"to",
"read",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java#L628-L648 | train |
gallandarakhneorg/afc | advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java | AbstractCommonShapeFileReader.skipBytes | protected void skipBytes(int amount) throws IOException {
ensureAvailableBytes(amount);
this.buffer.position(this.buffer.position() + amount);
} | java | protected void skipBytes(int amount) throws IOException {
ensureAvailableBytes(amount);
this.buffer.position(this.buffer.position() + amount);
} | [
"protected",
"void",
"skipBytes",
"(",
"int",
"amount",
")",
"throws",
"IOException",
"{",
"ensureAvailableBytes",
"(",
"amount",
")",
";",
"this",
".",
"buffer",
".",
"position",
"(",
"this",
".",
"buffer",
".",
"position",
"(",
")",
"+",
"amount",
")",
... | Skip an amount of bytes.
@param amount the amount to skip.
@throws IOException in case of error. | [
"Skip",
"an",
"amount",
"of",
"bytes",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/shapefile/src/main/java/org/arakhne/afc/io/shape/AbstractCommonShapeFileReader.java#L655-L658 | train |
gallandarakhneorg/afc | advanced/agentmotion/src/main/java/org/arakhne/afc/agentmotion/common/AbstractTargetPositionPredictionAlgorithm.java | AbstractTargetPositionPredictionAlgorithm.predictTargetPosition | @Pure
public Point2D<?, ?> predictTargetPosition(Point2D<?, ?> targetPosition, Vector2D<?, ?> targetLinearMotion) {
return new Point2d(
targetPosition.getX() + targetLinearMotion.getX() * this.predictionDuration,
targetPosition.getY() + targetLinearMotion.getY() * this.predictionDuration);
} | java | @Pure
public Point2D<?, ?> predictTargetPosition(Point2D<?, ?> targetPosition, Vector2D<?, ?> targetLinearMotion) {
return new Point2d(
targetPosition.getX() + targetLinearMotion.getX() * this.predictionDuration,
targetPosition.getY() + targetLinearMotion.getY() * this.predictionDuration);
} | [
"@",
"Pure",
"public",
"Point2D",
"<",
"?",
",",
"?",
">",
"predictTargetPosition",
"(",
"Point2D",
"<",
"?",
",",
"?",
">",
"targetPosition",
",",
"Vector2D",
"<",
"?",
",",
"?",
">",
"targetLinearMotion",
")",
"{",
"return",
"new",
"Point2d",
"(",
"t... | Predict the next position of the target.
@param targetPosition is the position of the target.
@param targetLinearMotion is the linear motion of the target.
@return the predicted position. | [
"Predict",
"the",
"next",
"position",
"of",
"the",
"target",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/agentmotion/src/main/java/org/arakhne/afc/agentmotion/common/AbstractTargetPositionPredictionAlgorithm.java#L92-L97 | train |
killme2008/hs4j | src/main/java/com/google/code/hs4j/network/hs/HandlerSocketHandler.java | HandlerSocketHandler.reconnect | protected void reconnect(Session session) {
if (this.hsClient.isStarted()) {
if (log.isDebugEnabled()) {
log.debug("Add reconnectRequest to connector "
+ session.getRemoteSocketAddress());
}
HandlerSocketSession hSession = (HandlerSocketSession) session;
InetSocketAddress addr = hSession.getRemo... | java | protected void reconnect(Session session) {
if (this.hsClient.isStarted()) {
if (log.isDebugEnabled()) {
log.debug("Add reconnectRequest to connector "
+ session.getRemoteSocketAddress());
}
HandlerSocketSession hSession = (HandlerSocketSession) session;
InetSocketAddress addr = hSession.getRemo... | [
"protected",
"void",
"reconnect",
"(",
"Session",
"session",
")",
"{",
"if",
"(",
"this",
".",
"hsClient",
".",
"isStarted",
"(",
")",
")",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"log",
".",
"debug",
"(",
"\"Add reconnectRequ... | Auto reconect request to hs4j server
@param session | [
"Auto",
"reconect",
"request",
"to",
"hs4j",
"server"
] | 805fe14bfe270d95009514c224d93c5fe3575f11 | https://github.com/killme2008/hs4j/blob/805fe14bfe270d95009514c224d93c5fe3575f11/src/main/java/com/google/code/hs4j/network/hs/HandlerSocketHandler.java#L83-L95 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java | AStar.setSegmentReplacer | public AStarSegmentReplacer<ST> setSegmentReplacer(AStarSegmentReplacer<ST> replacer) {
final AStarSegmentReplacer<ST> old = this.segmentReplacer;
this.segmentReplacer = replacer;
return old;
} | java | public AStarSegmentReplacer<ST> setSegmentReplacer(AStarSegmentReplacer<ST> replacer) {
final AStarSegmentReplacer<ST> old = this.segmentReplacer;
this.segmentReplacer = replacer;
return old;
} | [
"public",
"AStarSegmentReplacer",
"<",
"ST",
">",
"setSegmentReplacer",
"(",
"AStarSegmentReplacer",
"<",
"ST",
">",
"replacer",
")",
"{",
"final",
"AStarSegmentReplacer",
"<",
"ST",
">",
"old",
"=",
"this",
".",
"segmentReplacer",
";",
"this",
".",
"segmentRepl... | Set the object to use to replace the segments in the shortest path.
@param replacer is the new replacer.
@return the old replacer | [
"Set",
"the",
"object",
"to",
"use",
"to",
"replace",
"the",
"segments",
"in",
"the",
"shortest",
"path",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L237-L241 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java | AStar.setSegmentOrientationTool | public AStarSegmentOrientation<ST, PT> setSegmentOrientationTool(AStarSegmentOrientation<ST, PT> tool) {
final AStarSegmentOrientation<ST, PT> old = this.segmentOrientation;
this.segmentOrientation = tool;
return old;
} | java | public AStarSegmentOrientation<ST, PT> setSegmentOrientationTool(AStarSegmentOrientation<ST, PT> tool) {
final AStarSegmentOrientation<ST, PT> old = this.segmentOrientation;
this.segmentOrientation = tool;
return old;
} | [
"public",
"AStarSegmentOrientation",
"<",
"ST",
",",
"PT",
">",
"setSegmentOrientationTool",
"(",
"AStarSegmentOrientation",
"<",
"ST",
",",
"PT",
">",
"tool",
")",
"{",
"final",
"AStarSegmentOrientation",
"<",
"ST",
",",
"PT",
">",
"old",
"=",
"this",
".",
... | Set the tool that permits to retreive the orinetation of the segments.
@param tool the tool for retreiving the orientation of the segments.
@return the old tool. | [
"Set",
"the",
"tool",
"that",
"permits",
"to",
"retreive",
"the",
"orinetation",
"of",
"the",
"segments",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L257-L261 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java | AStar.setCostComputer | public AStarCostComputer<? super ST, ? super PT> setCostComputer(AStarCostComputer<? super ST, ? super PT> costComputer) {
final AStarCostComputer<? super ST, ? super PT> old = this.costComputer;
this.costComputer = costComputer;
return old;
} | java | public AStarCostComputer<? super ST, ? super PT> setCostComputer(AStarCostComputer<? super ST, ? super PT> costComputer) {
final AStarCostComputer<? super ST, ? super PT> old = this.costComputer;
this.costComputer = costComputer;
return old;
} | [
"public",
"AStarCostComputer",
"<",
"?",
"super",
"ST",
",",
"?",
"super",
"PT",
">",
"setCostComputer",
"(",
"AStarCostComputer",
"<",
"?",
"super",
"ST",
",",
"?",
"super",
"PT",
">",
"costComputer",
")",
"{",
"final",
"AStarCostComputer",
"<",
"?",
"sup... | Set the tool that permits to compute the costs of the nodes and the edges.
@param costComputer is the object that permits to compute the costs.
@return the old cost computer. | [
"Set",
"the",
"tool",
"that",
"permits",
"to",
"compute",
"the",
"costs",
"of",
"the",
"nodes",
"and",
"the",
"edges",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L277-L281 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java | AStar.estimate | @Pure
protected double estimate(PT p1, PT p2) {
assert p1 != null && p2 != null;
if (this.heuristic == null) {
throw new IllegalStateException(Locale.getString("E1")); //$NON-NLS-1$
}
return this.heuristic.evaluate(p1, p2);
} | java | @Pure
protected double estimate(PT p1, PT p2) {
assert p1 != null && p2 != null;
if (this.heuristic == null) {
throw new IllegalStateException(Locale.getString("E1")); //$NON-NLS-1$
}
return this.heuristic.evaluate(p1, p2);
} | [
"@",
"Pure",
"protected",
"double",
"estimate",
"(",
"PT",
"p1",
",",
"PT",
"p2",
")",
"{",
"assert",
"p1",
"!=",
"null",
"&&",
"p2",
"!=",
"null",
";",
"if",
"(",
"this",
".",
"heuristic",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateExcepti... | Evaluate the distance between two points in the graph.
<p>By default, this function uses the heuristic passed as parameter
of the constructor.
@param p1 the first point.
@param p2 the second point.
@return the evaluated distance between {@code p1} and {@code p2}. | [
"Evaluate",
"the",
"distance",
"between",
"two",
"points",
"in",
"the",
"graph",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L301-L308 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java | AStar.computeCostFor | @Pure
protected double computeCostFor(ST segment) {
if (this.costComputer != null) {
return this.costComputer.computeCostFor(segment);
}
return segment.getLength();
} | java | @Pure
protected double computeCostFor(ST segment) {
if (this.costComputer != null) {
return this.costComputer.computeCostFor(segment);
}
return segment.getLength();
} | [
"@",
"Pure",
"protected",
"double",
"computeCostFor",
"(",
"ST",
"segment",
")",
"{",
"if",
"(",
"this",
".",
"costComputer",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"costComputer",
".",
"computeCostFor",
"(",
"segment",
")",
";",
"}",
"return",
"... | Compute and replies the cost to traverse the given graph segment.
@param segment the segment.
@return the cost to traverse the segment. | [
"Compute",
"and",
"replies",
"the",
"cost",
"to",
"traverse",
"the",
"given",
"graph",
"segment",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L328-L334 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java | AStar.newPath | @SuppressWarnings({ "unchecked", "rawtypes" })
@Pure
protected GP newPath(PT startPoint, ST segment) {
if (this.pathFactory != null) {
return this.pathFactory.newPath(startPoint, segment);
}
try {
return (GP) new GraphPath(segment, startPoint);
} catch (Throwable e) {
throw new IllegalStateException(... | java | @SuppressWarnings({ "unchecked", "rawtypes" })
@Pure
protected GP newPath(PT startPoint, ST segment) {
if (this.pathFactory != null) {
return this.pathFactory.newPath(startPoint, segment);
}
try {
return (GP) new GraphPath(segment, startPoint);
} catch (Throwable e) {
throw new IllegalStateException(... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"rawtypes\"",
"}",
")",
"@",
"Pure",
"protected",
"GP",
"newPath",
"(",
"PT",
"startPoint",
",",
"ST",
"segment",
")",
"{",
"if",
"(",
"this",
".",
"pathFactory",
"!=",
"null",
")",
"{",
"return"... | Create an empty path.
<p>By default this function invokes the path factory
passed as parameter of the constructor.
@param startPoint is the first point in the path.
@param segment is the first connection to follow.
@return the path instance. | [
"Create",
"an",
"empty",
"path",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L368-L379 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java | AStar.addToPath | protected boolean addToPath(GP path, ST segment) {
if (this.pathFactory != null) {
return this.pathFactory.addToPath(path, segment);
}
assert path != null;
assert segment != null;
try {
return path.add(segment);
} catch (Throwable e) {
throw new IllegalStateException(e);
}
} | java | protected boolean addToPath(GP path, ST segment) {
if (this.pathFactory != null) {
return this.pathFactory.addToPath(path, segment);
}
assert path != null;
assert segment != null;
try {
return path.add(segment);
} catch (Throwable e) {
throw new IllegalStateException(e);
}
} | [
"protected",
"boolean",
"addToPath",
"(",
"GP",
"path",
",",
"ST",
"segment",
")",
"{",
"if",
"(",
"this",
".",
"pathFactory",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"pathFactory",
".",
"addToPath",
"(",
"path",
",",
"segment",
")",
";",
"}",
... | Add the given segment into the given path.
<p>By default this function invokes the path factory
passed as parameter of the constructor.
@param path is the path to build.
@param segment is the segment to add.
@return <code>true</code> if the segment was added;
otherwise <code>false</code>. | [
"Add",
"the",
"given",
"segment",
"into",
"the",
"given",
"path",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L391-L402 | train |
gallandarakhneorg/afc | core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java | AStar.replaceSegment | @Pure
protected ST replaceSegment(int index, ST segment) {
ST rep = null;
if (this.segmentReplacer != null) {
rep = this.segmentReplacer.replaceSegment(index, segment);
}
if (rep == null) {
rep = segment;
}
return rep;
} | java | @Pure
protected ST replaceSegment(int index, ST segment) {
ST rep = null;
if (this.segmentReplacer != null) {
rep = this.segmentReplacer.replaceSegment(index, segment);
}
if (rep == null) {
rep = segment;
}
return rep;
} | [
"@",
"Pure",
"protected",
"ST",
"replaceSegment",
"(",
"int",
"index",
",",
"ST",
"segment",
")",
"{",
"ST",
"rep",
"=",
"null",
";",
"if",
"(",
"this",
".",
"segmentReplacer",
"!=",
"null",
")",
"{",
"rep",
"=",
"this",
".",
"segmentReplacer",
".",
... | Invoked to replace a segment before adding it to the shortest path.
<p>* By default, this function invoked the {@link AStarSegmentReplacer}
associated to this AStar algorithm.
@param index is the position of the segment in the path.
@param segment is the segment to replace.
@return the replacement segment or the {@co... | [
"Invoked",
"to",
"replace",
"a",
"segment",
"before",
"adding",
"it",
"to",
"the",
"shortest",
"path",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L676-L686 | train |
gallandarakhneorg/afc | core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/d/Vector2d.java | Vector2d.convert | public static Vector2d convert(Tuple2D<?> tuple) {
if (tuple instanceof Vector2d) {
return (Vector2d) tuple;
}
return new Vector2d(tuple.getX(), tuple.getY());
} | java | public static Vector2d convert(Tuple2D<?> tuple) {
if (tuple instanceof Vector2d) {
return (Vector2d) tuple;
}
return new Vector2d(tuple.getX(), tuple.getY());
} | [
"public",
"static",
"Vector2d",
"convert",
"(",
"Tuple2D",
"<",
"?",
">",
"tuple",
")",
"{",
"if",
"(",
"tuple",
"instanceof",
"Vector2d",
")",
"{",
"return",
"(",
"Vector2d",
")",
"tuple",
";",
"}",
"return",
"new",
"Vector2d",
"(",
"tuple",
".",
"get... | Convert the given tuple to a real Vector2d.
<p>If the given tuple is already a Vector2d, it is replied.
@param tuple the tuple.
@return the Vector2d.
@since 14.0 | [
"Convert",
"the",
"given",
"tuple",
"to",
"a",
"real",
"Vector2d",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/d/Vector2d.java#L113-L118 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.addBusLine | public boolean addBusLine(BusLine busLine) {
if (busLine == null) {
return false;
}
if (this.busLines.indexOf(busLine) != -1) {
return false;
}
if (!this.busLines.add(busLine)) {
return false;
}
final boolean isValidLine = busLine.isValidPrimitive();
busLine.setEventFirable(isEventFirable());
... | java | public boolean addBusLine(BusLine busLine) {
if (busLine == null) {
return false;
}
if (this.busLines.indexOf(busLine) != -1) {
return false;
}
if (!this.busLines.add(busLine)) {
return false;
}
final boolean isValidLine = busLine.isValidPrimitive();
busLine.setEventFirable(isEventFirable());
... | [
"public",
"boolean",
"addBusLine",
"(",
"BusLine",
"busLine",
")",
"{",
"if",
"(",
"busLine",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"this",
".",
"busLines",
".",
"indexOf",
"(",
"busLine",
")",
"!=",
"-",
"1",
")",
"{",
"r... | Add a bus line inside the bus network.
@param busLine is the bus line to insert.
@return <code>true</code> if the bus line was added, otherwise <code>false</code> | [
"Add",
"a",
"bus",
"line",
"inside",
"the",
"bus",
"network",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L451-L479 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeAllBusLines | public void removeAllBusLines() {
for (final BusLine busline : this.busLines) {
busline.setContainer(null);
busline.setEventFirable(true);
}
this.busLines.clear();
fireShapeChanged(new BusChangeEvent(this,
BusChangeEventType.ALL_LINES_REMOVED,
null,
-1,
"shape", //$NON-NLS-1$
null,
... | java | public void removeAllBusLines() {
for (final BusLine busline : this.busLines) {
busline.setContainer(null);
busline.setEventFirable(true);
}
this.busLines.clear();
fireShapeChanged(new BusChangeEvent(this,
BusChangeEventType.ALL_LINES_REMOVED,
null,
-1,
"shape", //$NON-NLS-1$
null,
... | [
"public",
"void",
"removeAllBusLines",
"(",
")",
"{",
"for",
"(",
"final",
"BusLine",
"busline",
":",
"this",
".",
"busLines",
")",
"{",
"busline",
".",
"setContainer",
"(",
"null",
")",
";",
"busline",
".",
"setEventFirable",
"(",
"true",
")",
";",
"}",... | Remove all the bus lines from the current network. | [
"Remove",
"all",
"the",
"bus",
"lines",
"from",
"the",
"current",
"network",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L526-L540 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeBusLine | public boolean removeBusLine(BusLine busLine) {
final int index = this.busLines.indexOf(busLine);
if (index >= 0) {
return removeBusLine(index);
}
return false;
} | java | public boolean removeBusLine(BusLine busLine) {
final int index = this.busLines.indexOf(busLine);
if (index >= 0) {
return removeBusLine(index);
}
return false;
} | [
"public",
"boolean",
"removeBusLine",
"(",
"BusLine",
"busLine",
")",
"{",
"final",
"int",
"index",
"=",
"this",
".",
"busLines",
".",
"indexOf",
"(",
"busLine",
")",
";",
"if",
"(",
"index",
">=",
"0",
")",
"{",
"return",
"removeBusLine",
"(",
"index",
... | Remove a bus line from this network.
All the itineraries and the associated stops will be removed also.
If this bus line removal implies empty hubs, these hubs
will be also removed.
@param busLine is the bus line to remove.
@return <code>true</code> if the bus line was successfully removed, otherwise <code>false</code... | [
"Remove",
"a",
"bus",
"line",
"from",
"this",
"network",
".",
"All",
"the",
"itineraries",
"and",
"the",
"associated",
"stops",
"will",
"be",
"removed",
"also",
".",
"If",
"this",
"bus",
"line",
"removal",
"implies",
"empty",
"hubs",
"these",
"hubs",
"will... | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L551-L557 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeBusLine | public boolean removeBusLine(String name) {
final Iterator<BusLine> iterator = this.busLines.iterator();
BusLine busLine;
int i = 0;
while (iterator.hasNext()) {
busLine = iterator.next();
if (name.equals(busLine.getName())) {
iterator.remove();
busLine.setContainer(null);
busLine.setEventFira... | java | public boolean removeBusLine(String name) {
final Iterator<BusLine> iterator = this.busLines.iterator();
BusLine busLine;
int i = 0;
while (iterator.hasNext()) {
busLine = iterator.next();
if (name.equals(busLine.getName())) {
iterator.remove();
busLine.setContainer(null);
busLine.setEventFira... | [
"public",
"boolean",
"removeBusLine",
"(",
"String",
"name",
")",
"{",
"final",
"Iterator",
"<",
"BusLine",
">",
"iterator",
"=",
"this",
".",
"busLines",
".",
"iterator",
"(",
")",
";",
"BusLine",
"busLine",
";",
"int",
"i",
"=",
"0",
";",
"while",
"(... | Remove the bus line with the given name.
All the itineraries and the associated stops will be removed also.
If this bus line removal implies empty hubs, these hubs
will be also removed.
@param name is the name of the bus line to remove.
@return <code>true</code> if the bus line was successfully removed, otherwise <cod... | [
"Remove",
"the",
"bus",
"line",
"with",
"the",
"given",
"name",
".",
"All",
"the",
"itineraries",
"and",
"the",
"associated",
"stops",
"will",
"be",
"removed",
"also",
".",
"If",
"this",
"bus",
"line",
"removal",
"implies",
"empty",
"hubs",
"these",
"hubs"... | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L568-L591 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeBusLine | public boolean removeBusLine(int index) {
try {
final BusLine busLine = this.busLines.remove(index);
busLine.setContainer(null);
busLine.setEventFirable(true);
fireShapeChanged(new BusChangeEvent(this,
BusChangeEventType.LINE_REMOVED,
busLine,
index,
"shape", //$NON-NLS-1$
null,
... | java | public boolean removeBusLine(int index) {
try {
final BusLine busLine = this.busLines.remove(index);
busLine.setContainer(null);
busLine.setEventFirable(true);
fireShapeChanged(new BusChangeEvent(this,
BusChangeEventType.LINE_REMOVED,
busLine,
index,
"shape", //$NON-NLS-1$
null,
... | [
"public",
"boolean",
"removeBusLine",
"(",
"int",
"index",
")",
"{",
"try",
"{",
"final",
"BusLine",
"busLine",
"=",
"this",
".",
"busLines",
".",
"remove",
"(",
"index",
")",
";",
"busLine",
".",
"setContainer",
"(",
"null",
")",
";",
"busLine",
".",
... | Remove the bus line at the specified index.
All the itineraries and the associated stops will be removed also.
If this bus line removal implies empty hubs, these hubs
will be also removed.
@param index is the index of the bus line to remove.
@return <code>true</code> if the bus line was successfully removed, otherwise... | [
"Remove",
"the",
"bus",
"line",
"at",
"the",
"specified",
"index",
".",
"All",
"the",
"itineraries",
"and",
"the",
"associated",
"stops",
"will",
"be",
"removed",
"also",
".",
"If",
"this",
"bus",
"line",
"removal",
"implies",
"empty",
"hubs",
"these",
"hu... | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L602-L620 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusLine | @Pure
public BusLine getBusLine(UUID uuid) {
if (uuid == null) {
return null;
}
for (final BusLine busLine : this.busLines) {
if (uuid.equals(busLine.getUUID())) {
return busLine;
}
}
return null;
} | java | @Pure
public BusLine getBusLine(UUID uuid) {
if (uuid == null) {
return null;
}
for (final BusLine busLine : this.busLines) {
if (uuid.equals(busLine.getUUID())) {
return busLine;
}
}
return null;
} | [
"@",
"Pure",
"public",
"BusLine",
"getBusLine",
"(",
"UUID",
"uuid",
")",
"{",
"if",
"(",
"uuid",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"final",
"BusLine",
"busLine",
":",
"this",
".",
"busLines",
")",
"{",
"if",
"(",
"uui... | Replies the bus line with the specified uuid.
@param uuid the identifier.
@return BusLine or <code>null</code> | [
"Replies",
"the",
"bus",
"line",
"with",
"the",
"specified",
"uuid",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L678-L689 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusLine | @Pure
public BusLine getBusLine(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusLine busLine : this.busLines) {
if (cmp.compare(name, busLine.ge... | java | @Pure
public BusLine getBusLine(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusLine busLine : this.busLines) {
if (cmp.compare(name, busLine.ge... | [
"@",
"Pure",
"public",
"BusLine",
"getBusLine",
"(",
"String",
"name",
",",
"Comparator",
"<",
"String",
">",
"nameComparator",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Comparator",
"<",
"String",
">",
... | Replies the bus line with the specified name.
@param name is the desired name
@param nameComparator is used to compare the names.
@return BusLine or <code>null</code> | [
"Replies",
"the",
"bus",
"line",
"with",
"the",
"specified",
"name",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L698-L710 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.addBusStop | public boolean addBusStop(BusStop busStop) {
if (busStop == null) {
return false;
}
if (this.validBusStops.contains(busStop)) {
return false;
}
if (ListUtil.contains(this.invalidBusStops, INVALID_STOP_COMPARATOR, busStop)) {
return false;
}
final boolean isValidPrimitive = busStop.isValidPrimiti... | java | public boolean addBusStop(BusStop busStop) {
if (busStop == null) {
return false;
}
if (this.validBusStops.contains(busStop)) {
return false;
}
if (ListUtil.contains(this.invalidBusStops, INVALID_STOP_COMPARATOR, busStop)) {
return false;
}
final boolean isValidPrimitive = busStop.isValidPrimiti... | [
"public",
"boolean",
"addBusStop",
"(",
"BusStop",
"busStop",
")",
"{",
"if",
"(",
"busStop",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"this",
".",
"validBusStops",
".",
"contains",
"(",
"busStop",
")",
")",
"{",
"return",
"false... | Add a bus stop inside the bus network.
@param busStop is the bus stop to insert.
@return <code>true</code> if the bus stop was added, otherwise <code>false</code> | [
"Add",
"a",
"bus",
"stop",
"inside",
"the",
"bus",
"network",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L740-L775 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeAllBusStops | public void removeAllBusStops() {
for (final BusStop busStop : this.validBusStops) {
busStop.setContainer(null);
busStop.setEventFirable(true);
}
for (final BusStop busStop : this.invalidBusStops) {
busStop.setContainer(null);
busStop.setEventFirable(true);
}
this.validBusStops.clear();
this.inv... | java | public void removeAllBusStops() {
for (final BusStop busStop : this.validBusStops) {
busStop.setContainer(null);
busStop.setEventFirable(true);
}
for (final BusStop busStop : this.invalidBusStops) {
busStop.setContainer(null);
busStop.setEventFirable(true);
}
this.validBusStops.clear();
this.inv... | [
"public",
"void",
"removeAllBusStops",
"(",
")",
"{",
"for",
"(",
"final",
"BusStop",
"busStop",
":",
"this",
".",
"validBusStops",
")",
"{",
"busStop",
".",
"setContainer",
"(",
"null",
")",
";",
"busStop",
".",
"setEventFirable",
"(",
"true",
")",
";",
... | Remove all the bus stops from the current network. | [
"Remove",
"all",
"the",
"bus",
"stops",
"from",
"the",
"current",
"network",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L780-L799 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeBusStop | public boolean removeBusStop(BusStop busStop) {
if (this.validBusStops.remove(busStop)) {
busStop.setContainer(null);
busStop.setEventFirable(true);
fireShapeChanged(new BusChangeEvent(this,
BusChangeEventType.STOP_REMOVED,
busStop,
-1,
"shape", //$NON-NLS-1$
null,
null));
ch... | java | public boolean removeBusStop(BusStop busStop) {
if (this.validBusStops.remove(busStop)) {
busStop.setContainer(null);
busStop.setEventFirable(true);
fireShapeChanged(new BusChangeEvent(this,
BusChangeEventType.STOP_REMOVED,
busStop,
-1,
"shape", //$NON-NLS-1$
null,
null));
ch... | [
"public",
"boolean",
"removeBusStop",
"(",
"BusStop",
"busStop",
")",
"{",
"if",
"(",
"this",
".",
"validBusStops",
".",
"remove",
"(",
"busStop",
")",
")",
"{",
"busStop",
".",
"setContainer",
"(",
"null",
")",
";",
"busStop",
".",
"setEventFirable",
"(",... | Remove a bus stop from this network.
If this bus stop removal implies empty hubs, these hubs
will be also removed.
@param busStop is the bus stop to remove.
@return <code>true</code> if the bus stop was successfully removed, otherwise <code>false</code> | [
"Remove",
"a",
"bus",
"stop",
"from",
"this",
"network",
".",
"If",
"this",
"bus",
"stop",
"removal",
"implies",
"empty",
"hubs",
"these",
"hubs",
"will",
"be",
"also",
"removed",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L809-L837 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeBusStop | public boolean removeBusStop(String name) {
Iterator<BusStop> iterator;
BusStop busStop;
iterator = this.validBusStops.iterator();
while (iterator.hasNext()) {
busStop = iterator.next();
if (name.equals(busStop.getName())) {
iterator.remove();
busStop.setContainer(null);
busStop.setEventFirab... | java | public boolean removeBusStop(String name) {
Iterator<BusStop> iterator;
BusStop busStop;
iterator = this.validBusStops.iterator();
while (iterator.hasNext()) {
busStop = iterator.next();
if (name.equals(busStop.getName())) {
iterator.remove();
busStop.setContainer(null);
busStop.setEventFirab... | [
"public",
"boolean",
"removeBusStop",
"(",
"String",
"name",
")",
"{",
"Iterator",
"<",
"BusStop",
">",
"iterator",
";",
"BusStop",
"busStop",
";",
"iterator",
"=",
"this",
".",
"validBusStops",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
"."... | Remove the bus stops with the given name.
If this bus stop removal implies empty hubs, these hubs
will be also removed.
@param name is the name of the bus stop to remove.
@return <code>true</code> if the bus stop was successfully removed, otherwise <code>false</code> | [
"Remove",
"the",
"bus",
"stops",
"with",
"the",
"given",
"name",
".",
"If",
"this",
"bus",
"stop",
"removal",
"implies",
"empty",
"hubs",
"these",
"hubs",
"will",
"be",
"also",
"removed",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L847-L889 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusStop | @Pure
public BusStop getBusStop(UUID id) {
if (id == null) {
return null;
}
for (final BusStop busStop : this.validBusStops) {
final UUID busid = busStop.getUUID();
if (id.equals(busid)) {
return busStop;
}
}
for (final BusStop busStop : this.invalidBusStops) {
final UUID busid = busStop.g... | java | @Pure
public BusStop getBusStop(UUID id) {
if (id == null) {
return null;
}
for (final BusStop busStop : this.validBusStops) {
final UUID busid = busStop.getUUID();
if (id.equals(busid)) {
return busStop;
}
}
for (final BusStop busStop : this.invalidBusStops) {
final UUID busid = busStop.g... | [
"@",
"Pure",
"public",
"BusStop",
"getBusStop",
"(",
"UUID",
"id",
")",
"{",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"final",
"BusStop",
"busStop",
":",
"this",
".",
"validBusStops",
")",
"{",
"final",
"UUID",... | Replies the bus stop with the specified id.
@param id is the desired identifier
@return BusStop or <code>null</code> | [
"Replies",
"the",
"bus",
"stop",
"with",
"the",
"specified",
"id",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L918-L936 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusStop | @Pure
public BusStop getBusStop(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusStop busStop : this.validBusStops) {
if (cmp.compare(name, busSt... | java | @Pure
public BusStop getBusStop(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusStop busStop : this.validBusStops) {
if (cmp.compare(name, busSt... | [
"@",
"Pure",
"public",
"BusStop",
"getBusStop",
"(",
"String",
"name",
",",
"Comparator",
"<",
"String",
">",
"nameComparator",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Comparator",
"<",
"String",
">",
... | Replies the bus stop with the specified name.
@param name is the desired name
@param nameComparator is used to compare the names.
@return BusStop or <code>null</code> | [
"Replies",
"the",
"bus",
"stop",
"with",
"the",
"specified",
"name",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L945-L962 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusStopsIn | @Pure
public Iterator<BusStop> getBusStopsIn(Rectangle2afp<?, ?, ?, ?, ?, ?> clipBounds) {
return Iterators.unmodifiableIterator(
this.validBusStops.iterator(clipBounds));
} | java | @Pure
public Iterator<BusStop> getBusStopsIn(Rectangle2afp<?, ?, ?, ?, ?, ?> clipBounds) {
return Iterators.unmodifiableIterator(
this.validBusStops.iterator(clipBounds));
} | [
"@",
"Pure",
"public",
"Iterator",
"<",
"BusStop",
">",
"getBusStopsIn",
"(",
"Rectangle2afp",
"<",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
">",
"clipBounds",
")",
"{",
"return",
"Iterators",
".",
"unmodifiableIterator",
"(",
"this",
"."... | Replies the set of bus stops that have an intersection with the specified rectangle.
<p>This function replies the bus stops with a broad-first iteration on the elements' tree.
@param clipBounds is the bounds outside which the bus stops will not be replied
@return the bus stops inside the specified bounds. | [
"Replies",
"the",
"set",
"of",
"bus",
"stops",
"that",
"have",
"an",
"intersection",
"with",
"the",
"specified",
"rectangle",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L993-L997 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getNearestBusStop | @Pure
public BusStop getNearestBusStop(double x, double y) {
double distance = Double.POSITIVE_INFINITY;
BusStop bestStop = null;
double dist;
for (final BusStop stop : this.validBusStops) {
dist = stop.distance(x, y);
if (dist < distance) {
distance = dist;
bestStop = stop;
}
}
return b... | java | @Pure
public BusStop getNearestBusStop(double x, double y) {
double distance = Double.POSITIVE_INFINITY;
BusStop bestStop = null;
double dist;
for (final BusStop stop : this.validBusStops) {
dist = stop.distance(x, y);
if (dist < distance) {
distance = dist;
bestStop = stop;
}
}
return b... | [
"@",
"Pure",
"public",
"BusStop",
"getNearestBusStop",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"double",
"distance",
"=",
"Double",
".",
"POSITIVE_INFINITY",
";",
"BusStop",
"bestStop",
"=",
"null",
";",
"double",
"dist",
";",
"for",
"(",
"final"... | Replies the nearest bus stops to the given point.
@param x x coordinate.
@param y y coordinate.
@return the nearest bus stop or <code>null</code> if none was found. | [
"Replies",
"the",
"nearest",
"bus",
"stops",
"to",
"the",
"given",
"point",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1028-L1043 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.addBusHub | private boolean addBusHub(BusHub hub) {
if (hub == null) {
return false;
}
if (this.validBusHubs.contains(hub)) {
return false;
}
if (ListUtil.contains(this.invalidBusHubs, INVALID_HUB_COMPARATOR, hub)) {
return false;
}
final boolean isValidPrimitive = hub.isValidPrimitive();
if (isValidPrim... | java | private boolean addBusHub(BusHub hub) {
if (hub == null) {
return false;
}
if (this.validBusHubs.contains(hub)) {
return false;
}
if (ListUtil.contains(this.invalidBusHubs, INVALID_HUB_COMPARATOR, hub)) {
return false;
}
final boolean isValidPrimitive = hub.isValidPrimitive();
if (isValidPrim... | [
"private",
"boolean",
"addBusHub",
"(",
"BusHub",
"hub",
")",
"{",
"if",
"(",
"hub",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"this",
".",
"validBusHubs",
".",
"contains",
"(",
"hub",
")",
")",
"{",
"return",
"false",
";",
"}... | Add the given bus hub in the network.
@param hub is the new bus hub.
@return <code>true</code> on success, otherwise <code>false</code>. | [
"Add",
"the",
"given",
"bus",
"hub",
"in",
"the",
"network",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1088-L1123 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeAllBusHubs | public void removeAllBusHubs() {
for (final BusHub busHub : this.validBusHubs) {
busHub.setContainer(null);
busHub.setEventFirable(true);
}
for (final BusHub busHub : this.invalidBusHubs) {
busHub.setContainer(null);
busHub.setEventFirable(true);
}
this.validBusHubs.clear();
this.invalidBusHubs.... | java | public void removeAllBusHubs() {
for (final BusHub busHub : this.validBusHubs) {
busHub.setContainer(null);
busHub.setEventFirable(true);
}
for (final BusHub busHub : this.invalidBusHubs) {
busHub.setContainer(null);
busHub.setEventFirable(true);
}
this.validBusHubs.clear();
this.invalidBusHubs.... | [
"public",
"void",
"removeAllBusHubs",
"(",
")",
"{",
"for",
"(",
"final",
"BusHub",
"busHub",
":",
"this",
".",
"validBusHubs",
")",
"{",
"busHub",
".",
"setContainer",
"(",
"null",
")",
";",
"busHub",
".",
"setEventFirable",
"(",
"true",
")",
";",
"}",
... | Remove all the bus hubs from the current network. | [
"Remove",
"all",
"the",
"bus",
"hubs",
"from",
"the",
"current",
"network",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1128-L1147 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeBusHub | public boolean removeBusHub(BusHub busHub) {
if (this.validBusHubs.remove(busHub)) {
busHub.setContainer(null);
busHub.setEventFirable(true);
firePrimitiveChanged(new BusChangeEvent(this,
BusChangeEventType.HUB_REMOVED,
busHub,
-1,
null,
null,
null));
checkPrimitiveValidity()... | java | public boolean removeBusHub(BusHub busHub) {
if (this.validBusHubs.remove(busHub)) {
busHub.setContainer(null);
busHub.setEventFirable(true);
firePrimitiveChanged(new BusChangeEvent(this,
BusChangeEventType.HUB_REMOVED,
busHub,
-1,
null,
null,
null));
checkPrimitiveValidity()... | [
"public",
"boolean",
"removeBusHub",
"(",
"BusHub",
"busHub",
")",
"{",
"if",
"(",
"this",
".",
"validBusHubs",
".",
"remove",
"(",
"busHub",
")",
")",
"{",
"busHub",
".",
"setContainer",
"(",
"null",
")",
";",
"busHub",
".",
"setEventFirable",
"(",
"tru... | Remove a bus hubs from this network.
@param busHub is the bus hub to remove.
@return <code>true</code> if the bus hub was successfully removed, otherwise <code>false</code> | [
"Remove",
"a",
"bus",
"hubs",
"from",
"this",
"network",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1155-L1184 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.removeBusHub | public boolean removeBusHub(String name) {
Iterator<BusHub> iterator;
BusHub busHub;
iterator = this.validBusHubs.iterator();
while (iterator.hasNext()) {
busHub = iterator.next();
if (name.equals(busHub.getName())) {
iterator.remove();
busHub.setContainer(null);
busHub.setEventFirable(true);... | java | public boolean removeBusHub(String name) {
Iterator<BusHub> iterator;
BusHub busHub;
iterator = this.validBusHubs.iterator();
while (iterator.hasNext()) {
busHub = iterator.next();
if (name.equals(busHub.getName())) {
iterator.remove();
busHub.setContainer(null);
busHub.setEventFirable(true);... | [
"public",
"boolean",
"removeBusHub",
"(",
"String",
"name",
")",
"{",
"Iterator",
"<",
"BusHub",
">",
"iterator",
";",
"BusHub",
"busHub",
";",
"iterator",
"=",
"this",
".",
"validBusHubs",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"... | Remove the bus hub with the given name.
@param name is the name of the bus hub to remove.
@return <code>true</code> if the bus hub was successfully removed, otherwise <code>false</code> | [
"Remove",
"the",
"bus",
"hub",
"with",
"the",
"given",
"name",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1192-L1234 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusHub | @Pure
public BusHub getBusHub(UUID uuid) {
if (uuid == null) {
return null;
}
for (final BusHub busHub : this.validBusHubs) {
if (uuid.equals(busHub.getUUID())) {
return busHub;
}
}
for (final BusHub busHub : this.invalidBusHubs) {
if (uuid.equals(busHub.getUUID())) {
return busHub;
}
... | java | @Pure
public BusHub getBusHub(UUID uuid) {
if (uuid == null) {
return null;
}
for (final BusHub busHub : this.validBusHubs) {
if (uuid.equals(busHub.getUUID())) {
return busHub;
}
}
for (final BusHub busHub : this.invalidBusHubs) {
if (uuid.equals(busHub.getUUID())) {
return busHub;
}
... | [
"@",
"Pure",
"public",
"BusHub",
"getBusHub",
"(",
"UUID",
"uuid",
")",
"{",
"if",
"(",
"uuid",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"final",
"BusHub",
"busHub",
":",
"this",
".",
"validBusHubs",
")",
"{",
"if",
"(",
"uui... | Replies the bus hub with the specified uuid.
@param uuid the identifier.
@return a bus hub or <code>null</code> | [
"Replies",
"the",
"bus",
"hub",
"with",
"the",
"specified",
"uuid",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1263-L1279 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusHub | @Pure
public BusHub getBusHub(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusHub busHub : this.validBusHubs) {
if (cmp.compare(name, busHub.get... | java | @Pure
public BusHub getBusHub(String name, Comparator<String> nameComparator) {
if (name == null) {
return null;
}
final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator;
for (final BusHub busHub : this.validBusHubs) {
if (cmp.compare(name, busHub.get... | [
"@",
"Pure",
"public",
"BusHub",
"getBusHub",
"(",
"String",
"name",
",",
"Comparator",
"<",
"String",
">",
"nameComparator",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"Comparator",
"<",
"String",
">",
"c... | Replies the bus hub with the specified name.
@param name is the desired name
@param nameComparator is used to compare the names.
@return a bus hub or <code>null</code> | [
"Replies",
"the",
"bus",
"hub",
"with",
"the",
"specified",
"name",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1288-L1305 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getBusHubsIn | @Pure
public Iterator<BusHub> getBusHubsIn(Rectangle2afp<?, ?, ?, ?, ?, ?> clipBounds) {
return Iterators.unmodifiableIterator(
this.validBusHubs.iterator(clipBounds));
} | java | @Pure
public Iterator<BusHub> getBusHubsIn(Rectangle2afp<?, ?, ?, ?, ?, ?> clipBounds) {
return Iterators.unmodifiableIterator(
this.validBusHubs.iterator(clipBounds));
} | [
"@",
"Pure",
"public",
"Iterator",
"<",
"BusHub",
">",
"getBusHubsIn",
"(",
"Rectangle2afp",
"<",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
",",
"?",
">",
"clipBounds",
")",
"{",
"return",
"Iterators",
".",
"unmodifiableIterator",
"(",
"this",
".",
... | Replies the set of bus hubs that have an intersection with the specified rectangle.
<p>This function replies the bus hubs with a broad-first iteration on the hubs' tree.
@param clipBounds is the bounds outside which the bus hubs will not be replied
@return the bus hubs inside the specified bounds. | [
"Replies",
"the",
"set",
"of",
"bus",
"hubs",
"that",
"have",
"an",
"intersection",
"with",
"the",
"specified",
"rectangle",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1336-L1340 | train |
aerogear/aerogear-android-core | library/src/main/java/org/jboss/aerogear/android/core/reflection/Property.java | Property.setValue | public void setValue(Object instance, Object value) {
try {
setMethod.invoke(instance, value);
} catch (Exception e) {
throw new PropertyNotFoundException(klass, getType(), fieldName);
}
} | java | public void setValue(Object instance, Object value) {
try {
setMethod.invoke(instance, value);
} catch (Exception e) {
throw new PropertyNotFoundException(klass, getType(), fieldName);
}
} | [
"public",
"void",
"setValue",
"(",
"Object",
"instance",
",",
"Object",
"value",
")",
"{",
"try",
"{",
"setMethod",
".",
"invoke",
"(",
"instance",
",",
"value",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"PropertyNotFoundEx... | Set new value
@param instance Instance to set new value
@param value new value | [
"Set",
"new",
"value"
] | 3be24a79dd3d2792804935572bb672ff8714e6aa | https://github.com/aerogear/aerogear-android-core/blob/3be24a79dd3d2792804935572bb672ff8714e6aa/library/src/main/java/org/jboss/aerogear/android/core/reflection/Property.java#L139-L146 | train |
gallandarakhneorg/afc | advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/Vector3dfx.java | Vector3dfx.convert | public static Vector3dfx convert(Tuple3D<?> tuple) {
if (tuple instanceof Vector3dfx) {
return (Vector3dfx) tuple;
}
return new Vector3dfx(tuple.getX(), tuple.getY(), tuple.getZ());
} | java | public static Vector3dfx convert(Tuple3D<?> tuple) {
if (tuple instanceof Vector3dfx) {
return (Vector3dfx) tuple;
}
return new Vector3dfx(tuple.getX(), tuple.getY(), tuple.getZ());
} | [
"public",
"static",
"Vector3dfx",
"convert",
"(",
"Tuple3D",
"<",
"?",
">",
"tuple",
")",
"{",
"if",
"(",
"tuple",
"instanceof",
"Vector3dfx",
")",
"{",
"return",
"(",
"Vector3dfx",
")",
"tuple",
";",
"}",
"return",
"new",
"Vector3dfx",
"(",
"tuple",
"."... | Convert the given tuple to a real Vector3dfx.
<p>If the given tuple is already a Vector3dfx, it is replied.
@param tuple the tuple.
@return the Vector3dfx.
@since 14.0 | [
"Convert",
"the",
"given",
"tuple",
"to",
"a",
"real",
"Vector3dfx",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/Vector3dfx.java#L146-L151 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/table/model/suffle/GenericShuffleTableModel.java | GenericShuffleTableModel.shuffleSelectedRightRowToLeftTableModel | public void shuffleSelectedRightRowToLeftTableModel(final int selectedRow)
{
if (-1 < selectedRow)
{
final T row = rightTableModel.removeAt(selectedRow);
leftTableModel.add(row);
}
} | java | public void shuffleSelectedRightRowToLeftTableModel(final int selectedRow)
{
if (-1 < selectedRow)
{
final T row = rightTableModel.removeAt(selectedRow);
leftTableModel.add(row);
}
} | [
"public",
"void",
"shuffleSelectedRightRowToLeftTableModel",
"(",
"final",
"int",
"selectedRow",
")",
"{",
"if",
"(",
"-",
"1",
"<",
"selectedRow",
")",
"{",
"final",
"T",
"row",
"=",
"rightTableModel",
".",
"removeAt",
"(",
"selectedRow",
")",
";",
"leftTable... | Shuffle selected right row to left table model.
@param selectedRow
the selected row | [
"Shuffle",
"selected",
"right",
"row",
"to",
"left",
"table",
"model",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/table/model/suffle/GenericShuffleTableModel.java#L139-L146 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/strings/LocatedString.java | LocatedString.startReferenceOffsetsForContentOffset | public OffsetGroup startReferenceOffsetsForContentOffset(CharOffset contentOffset) {
return characterRegions().get(regionIndexContainingContentOffset(contentOffset))
.startOffsetGroupForPosition(contentOffset);
} | java | public OffsetGroup startReferenceOffsetsForContentOffset(CharOffset contentOffset) {
return characterRegions().get(regionIndexContainingContentOffset(contentOffset))
.startOffsetGroupForPosition(contentOffset);
} | [
"public",
"OffsetGroup",
"startReferenceOffsetsForContentOffset",
"(",
"CharOffset",
"contentOffset",
")",
"{",
"return",
"characterRegions",
"(",
")",
".",
"get",
"(",
"regionIndexContainingContentOffset",
"(",
"contentOffset",
")",
")",
".",
"startOffsetGroupForPosition",... | Get the earliest reference string offsets corresponding to the given content string offset. | [
"Get",
"the",
"earliest",
"reference",
"string",
"offsets",
"corresponding",
"to",
"the",
"given",
"content",
"string",
"offset",
"."
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/strings/LocatedString.java#L261-L264 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/strings/LocatedString.java | LocatedString.endReferenceOffsetsForContentOffset | public OffsetGroup endReferenceOffsetsForContentOffset(CharOffset contentOffset) {
return characterRegions().get(regionIndexContainingContentOffset(contentOffset))
.endOffsetGroupForPosition(contentOffset);
} | java | public OffsetGroup endReferenceOffsetsForContentOffset(CharOffset contentOffset) {
return characterRegions().get(regionIndexContainingContentOffset(contentOffset))
.endOffsetGroupForPosition(contentOffset);
} | [
"public",
"OffsetGroup",
"endReferenceOffsetsForContentOffset",
"(",
"CharOffset",
"contentOffset",
")",
"{",
"return",
"characterRegions",
"(",
")",
".",
"get",
"(",
"regionIndexContainingContentOffset",
"(",
"contentOffset",
")",
")",
".",
"endOffsetGroupForPosition",
"... | Get the latest reference string offsets corresponding to the given content string offset. | [
"Get",
"the",
"latest",
"reference",
"string",
"offsets",
"corresponding",
"to",
"the",
"given",
"content",
"string",
"offset",
"."
] | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/strings/LocatedString.java#L269-L272 | train |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/strings/LocatedString.java | LocatedString.referenceSubstringByContentOffsets | public final Optional<UnicodeFriendlyString> referenceSubstringByContentOffsets(
final OffsetRange<CharOffset> contentOffsets) {
if (referenceString().isPresent()) {
return Optional.of(referenceString().get().substringByCodePoints(
OffsetGroupRange.from(
startReferenceOffsetsForC... | java | public final Optional<UnicodeFriendlyString> referenceSubstringByContentOffsets(
final OffsetRange<CharOffset> contentOffsets) {
if (referenceString().isPresent()) {
return Optional.of(referenceString().get().substringByCodePoints(
OffsetGroupRange.from(
startReferenceOffsetsForC... | [
"public",
"final",
"Optional",
"<",
"UnicodeFriendlyString",
">",
"referenceSubstringByContentOffsets",
"(",
"final",
"OffsetRange",
"<",
"CharOffset",
">",
"contentOffsets",
")",
"{",
"if",
"(",
"referenceString",
"(",
")",
".",
"isPresent",
"(",
")",
")",
"{",
... | Gets the substring of the reference string corresponding to a range of content string
offsets. This will include intervening characters which may not themselves correspond to
any content string character.
Will return {@link Optional#absent()} if and only if {@link #referenceString()} returns
absent.
Please refer to ... | [
"Gets",
"the",
"substring",
"of",
"the",
"reference",
"string",
"corresponding",
"to",
"a",
"range",
"of",
"content",
"string",
"offsets",
".",
"This",
"will",
"include",
"intervening",
"characters",
"which",
"may",
"not",
"themselves",
"correspond",
"to",
"any"... | d618652674d647867306e2e4b987a21b7c29c015 | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/strings/LocatedString.java#L332-L343 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java | GeodesicPosition.getLatitudeMinute | @SuppressWarnings("checkstyle:localvariablename")
@Pure
public int getLatitudeMinute() {
double p = Math.abs(this.phi);
p = p - (int) p;
return (int) (p * 60.);
} | java | @SuppressWarnings("checkstyle:localvariablename")
@Pure
public int getLatitudeMinute() {
double p = Math.abs(this.phi);
p = p - (int) p;
return (int) (p * 60.);
} | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:localvariablename\"",
")",
"@",
"Pure",
"public",
"int",
"getLatitudeMinute",
"(",
")",
"{",
"double",
"p",
"=",
"Math",
".",
"abs",
"(",
"this",
".",
"phi",
")",
";",
"p",
"=",
"p",
"-",
"(",
"int",
")",
"p"... | Replies the minute of the sexagesimal representation of the latitude phi.
@return the latitude minute in [0;60). | [
"Replies",
"the",
"minute",
"of",
"the",
"sexagesimal",
"representation",
"of",
"the",
"latitude",
"phi",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java#L170-L176 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java | GeodesicPosition.getLatitudeSecond | @SuppressWarnings("checkstyle:localvariablename")
@Pure
public double getLatitudeSecond() {
double p = Math.abs(this.phi);
p = (p - (int) p) * 60.;
p = p - (int) p;
return p * 60.;
} | java | @SuppressWarnings("checkstyle:localvariablename")
@Pure
public double getLatitudeSecond() {
double p = Math.abs(this.phi);
p = (p - (int) p) * 60.;
p = p - (int) p;
return p * 60.;
} | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:localvariablename\"",
")",
"@",
"Pure",
"public",
"double",
"getLatitudeSecond",
"(",
")",
"{",
"double",
"p",
"=",
"Math",
".",
"abs",
"(",
"this",
".",
"phi",
")",
";",
"p",
"=",
"(",
"p",
"-",
"(",
"int",
... | Replies the second of the sexagesimal representation of the latitude phi.
@return the latitude second in [0;60). | [
"Replies",
"the",
"second",
"of",
"the",
"sexagesimal",
"representation",
"of",
"the",
"latitude",
"phi",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java#L182-L189 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java | GeodesicPosition.getLongitudeMinute | @SuppressWarnings("checkstyle:localvariablename")
@Pure
public int getLongitudeMinute() {
double l = Math.abs(this.lambda);
l = l - (int) l;
return (int) (l * 60.);
} | java | @SuppressWarnings("checkstyle:localvariablename")
@Pure
public int getLongitudeMinute() {
double l = Math.abs(this.lambda);
l = l - (int) l;
return (int) (l * 60.);
} | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:localvariablename\"",
")",
"@",
"Pure",
"public",
"int",
"getLongitudeMinute",
"(",
")",
"{",
"double",
"l",
"=",
"Math",
".",
"abs",
"(",
"this",
".",
"lambda",
")",
";",
"l",
"=",
"l",
"-",
"(",
"int",
")",
... | Replies the minute of the sexagesimal representation of the longitude phi.
@return the longitude minute in [0;60). | [
"Replies",
"the",
"minute",
"of",
"the",
"sexagesimal",
"representation",
"of",
"the",
"longitude",
"phi",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java#L222-L228 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java | GeodesicPosition.getLongitudeSecond | @SuppressWarnings("checkstyle:localvariablename")
@Pure
public double getLongitudeSecond() {
double p = Math.abs(this.lambda);
p = (p - (int) p) * 60.;
p = p - (int) p;
return p * 60.;
} | java | @SuppressWarnings("checkstyle:localvariablename")
@Pure
public double getLongitudeSecond() {
double p = Math.abs(this.lambda);
p = (p - (int) p) * 60.;
p = p - (int) p;
return p * 60.;
} | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:localvariablename\"",
")",
"@",
"Pure",
"public",
"double",
"getLongitudeSecond",
"(",
")",
"{",
"double",
"p",
"=",
"Math",
".",
"abs",
"(",
"this",
".",
"lambda",
")",
";",
"p",
"=",
"(",
"p",
"-",
"(",
"int"... | Replies the second of the sexagesimal representation of the longitude phi.
@return the longitude second in [0;60). | [
"Replies",
"the",
"second",
"of",
"the",
"sexagesimal",
"representation",
"of",
"the",
"longitude",
"phi",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java#L234-L241 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java | GeodesicPosition.setPreferredStringRepresentation | public static void setPreferredStringRepresentation(GeodesicPositionStringRepresentation representation,
boolean useSymbolicDirection) {
final Preferences prefs = Preferences.userNodeForPackage(GeodesicPosition.class);
if (prefs != null) {
if (representation == null) {
prefs.remove("STRING_REPRESENTATION"... | java | public static void setPreferredStringRepresentation(GeodesicPositionStringRepresentation representation,
boolean useSymbolicDirection) {
final Preferences prefs = Preferences.userNodeForPackage(GeodesicPosition.class);
if (prefs != null) {
if (representation == null) {
prefs.remove("STRING_REPRESENTATION"... | [
"public",
"static",
"void",
"setPreferredStringRepresentation",
"(",
"GeodesicPositionStringRepresentation",
"representation",
",",
"boolean",
"useSymbolicDirection",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"GeodesicPosit... | Set the preferred format of the string representation
of a geodesic position.
@param representation indicates the preferred string representation, or <code>null</code>
to use the default.
@param useSymbolicDirection indicates if the directions should be output with there
symbols or if there are represented by the sign... | [
"Set",
"the",
"preferred",
"format",
"of",
"the",
"string",
"representation",
"of",
"a",
"geodesic",
"position",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java#L429-L441 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java | GeodesicPosition.getPreferredStringRepresentation | @Pure
public static GeodesicPositionStringRepresentation getPreferredStringRepresentation(boolean allowNullValue) {
final Preferences prefs = Preferences.userNodeForPackage(GeodesicPosition.class);
if (prefs != null) {
final String v = prefs.get("STRING_REPRESENTATION", null); //$NON-NLS-1$
if (v != null && ... | java | @Pure
public static GeodesicPositionStringRepresentation getPreferredStringRepresentation(boolean allowNullValue) {
final Preferences prefs = Preferences.userNodeForPackage(GeodesicPosition.class);
if (prefs != null) {
final String v = prefs.get("STRING_REPRESENTATION", null); //$NON-NLS-1$
if (v != null && ... | [
"@",
"Pure",
"public",
"static",
"GeodesicPositionStringRepresentation",
"getPreferredStringRepresentation",
"(",
"boolean",
"allowNullValue",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"GeodesicPosition",
".",
"class",
... | Replies the preferred format of the string representation
of a geodesic position.
@param allowNullValue indicates if the <code>null</code> value is enable
for output in the replied value.
@return the preferred string representation, or <code>null</code>
to use the default. The <code>null</code> value is replied iff
<v... | [
"Replies",
"the",
"preferred",
"format",
"of",
"the",
"string",
"representation",
"of",
"a",
"geodesic",
"position",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java#L470-L497 | train |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java | GeodesicPosition.getDirectionSymbolInPreferredStringRepresentation | @Pure
public static boolean getDirectionSymbolInPreferredStringRepresentation() {
final Preferences prefs = Preferences.userNodeForPackage(GeodesicPosition.class);
if (prefs != null) {
return prefs.getBoolean("SYMBOL_IN_STRING_REPRESENTATION", DEFAULT_SYMBOL_IN_STRING_REPRESENTATION); //$NON-NLS-1$
}
return... | java | @Pure
public static boolean getDirectionSymbolInPreferredStringRepresentation() {
final Preferences prefs = Preferences.userNodeForPackage(GeodesicPosition.class);
if (prefs != null) {
return prefs.getBoolean("SYMBOL_IN_STRING_REPRESENTATION", DEFAULT_SYMBOL_IN_STRING_REPRESENTATION); //$NON-NLS-1$
}
return... | [
"@",
"Pure",
"public",
"static",
"boolean",
"getDirectionSymbolInPreferredStringRepresentation",
"(",
")",
"{",
"final",
"Preferences",
"prefs",
"=",
"Preferences",
".",
"userNodeForPackage",
"(",
"GeodesicPosition",
".",
"class",
")",
";",
"if",
"(",
"prefs",
"!=",... | Replies if the direction symbol should be
output in the preferred string representation
of a geodesic position.
@return <code>true</code> if the direction symbol should be output,
<code>false</code> if the signs of the coordinates indicate the directions.
@see #setPreferredStringRepresentation(GeodesicPositionStringRe... | [
"Replies",
"if",
"the",
"direction",
"symbol",
"should",
"be",
"output",
"in",
"the",
"preferred",
"string",
"representation",
"of",
"a",
"geodesic",
"position",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GeodesicPosition.java#L509-L516 | train |
gallandarakhneorg/afc | core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/AbstractForest.java | AbstractForest.addForestListener | public synchronized void addForestListener(ForestListener listener) {
if (this.listeners == null) {
this.listeners = new ArrayList<>();
}
this.listeners.add(listener);
} | java | public synchronized void addForestListener(ForestListener listener) {
if (this.listeners == null) {
this.listeners = new ArrayList<>();
}
this.listeners.add(listener);
} | [
"public",
"synchronized",
"void",
"addForestListener",
"(",
"ForestListener",
"listener",
")",
"{",
"if",
"(",
"this",
".",
"listeners",
"==",
"null",
")",
"{",
"this",
".",
"listeners",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"}",
"this",
".",
"li... | Add forest listener.
@param listener the listener. | [
"Add",
"forest",
"listener",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/AbstractForest.java#L327-L332 | train |
gallandarakhneorg/afc | core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/AbstractForest.java | AbstractForest.removeForestListener | public synchronized void removeForestListener(ForestListener listener) {
if (this.listeners != null) {
this.listeners.remove(listener);
if (this.listeners.isEmpty()) {
this.listeners = null;
}
}
} | java | public synchronized void removeForestListener(ForestListener listener) {
if (this.listeners != null) {
this.listeners.remove(listener);
if (this.listeners.isEmpty()) {
this.listeners = null;
}
}
} | [
"public",
"synchronized",
"void",
"removeForestListener",
"(",
"ForestListener",
"listener",
")",
"{",
"if",
"(",
"this",
".",
"listeners",
"!=",
"null",
")",
"{",
"this",
".",
"listeners",
".",
"remove",
"(",
"listener",
")",
";",
"if",
"(",
"this",
".",
... | Remove forest listener.
@param listener the listener. | [
"Remove",
"forest",
"listener",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/AbstractForest.java#L338-L345 | train |
gallandarakhneorg/afc | advanced/bootique/bootique-log4j/src/main/java/org/arakhne/afc/bootique/log4j/modules/Log4jIntegrationModule.java | Log4jIntegrationModule.getLog4jIntegrationConfig | @SuppressWarnings("static-method")
@Provides
@Singleton
public Log4jIntegrationConfig getLog4jIntegrationConfig(ConfigurationFactory configFactory, Injector injector) {
final Log4jIntegrationConfig config = Log4jIntegrationConfig.getConfiguration(configFactory);
injector.injectMembers(config);
return config;
... | java | @SuppressWarnings("static-method")
@Provides
@Singleton
public Log4jIntegrationConfig getLog4jIntegrationConfig(ConfigurationFactory configFactory, Injector injector) {
final Log4jIntegrationConfig config = Log4jIntegrationConfig.getConfiguration(configFactory);
injector.injectMembers(config);
return config;
... | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"@",
"Provides",
"@",
"Singleton",
"public",
"Log4jIntegrationConfig",
"getLog4jIntegrationConfig",
"(",
"ConfigurationFactory",
"configFactory",
",",
"Injector",
"injector",
")",
"{",
"final",
"Log4jIntegrationConfig"... | Replies the instance of the log4j integration configuration..
@param configFactory accessor to the bootique factory.
@param injector the current injector.
@return the configuration accessor. | [
"Replies",
"the",
"instance",
"of",
"the",
"log4j",
"integration",
"configuration",
".."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/bootique/bootique-log4j/src/main/java/org/arakhne/afc/bootique/log4j/modules/Log4jIntegrationModule.java#L74-L81 | train |
gallandarakhneorg/afc | advanced/bootique/bootique-log4j/src/main/java/org/arakhne/afc/bootique/log4j/modules/Log4jIntegrationModule.java | Log4jIntegrationModule.provideRootLogger | @SuppressWarnings("static-method")
@Singleton
@Provides
public Logger provideRootLogger(ConfigurationFactory configFactory, Provider<Log4jIntegrationConfig> config) {
final Logger root = Logger.getRootLogger();
// Reroute JUL
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();
f... | java | @SuppressWarnings("static-method")
@Singleton
@Provides
public Logger provideRootLogger(ConfigurationFactory configFactory, Provider<Log4jIntegrationConfig> config) {
final Logger root = Logger.getRootLogger();
// Reroute JUL
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();
f... | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"@",
"Singleton",
"@",
"Provides",
"public",
"Logger",
"provideRootLogger",
"(",
"ConfigurationFactory",
"configFactory",
",",
"Provider",
"<",
"Log4jIntegrationConfig",
">",
"config",
")",
"{",
"final",
"Logger"... | Provide the root logger.
@param configFactory the factory of configurations.
@param config the logger configuration.
@return the root logger. | [
"Provide",
"the",
"root",
"logger",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/bootique/bootique-log4j/src/main/java/org/arakhne/afc/bootique/log4j/modules/Log4jIntegrationModule.java#L89-L102 | train |
lightblueseas/swing-components | src/main/java/de/alpharogroup/swing/panels/network/NetworkSettingsPanel.java | NetworkSettingsPanel.onInitializeComponents | @Override
protected void onInitializeComponents()
{
lpNoProxy = new JLayeredPane();
lpNoProxy.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
lpHostOrIpaddress = new JLayeredPane();
lpHostOrIpaddress.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
rdbtnManualProxyConfiguration ... | java | @Override
protected void onInitializeComponents()
{
lpNoProxy = new JLayeredPane();
lpNoProxy.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
lpHostOrIpaddress = new JLayeredPane();
lpHostOrIpaddress.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
rdbtnManualProxyConfiguration ... | [
"@",
"Override",
"protected",
"void",
"onInitializeComponents",
"(",
")",
"{",
"lpNoProxy",
"=",
"new",
"JLayeredPane",
"(",
")",
";",
"lpNoProxy",
".",
"setBorder",
"(",
"new",
"EtchedBorder",
"(",
"EtchedBorder",
".",
"RAISED",
",",
"null",
",",
"null",
")... | Initialize components. | [
"Initialize",
"components",
"."
] | 4045e85cabd8f0ce985cbfff134c3c9873930c79 | https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/panels/network/NetworkSettingsPanel.java#L115-L168 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetworkUtilities.java | BusNetworkUtilities.getBusHalts | @Pure
public static Iterator<BusItineraryHalt> getBusHalts(BusLine busLine) {
assert busLine != null;
return new LineHaltIterator(busLine);
} | java | @Pure
public static Iterator<BusItineraryHalt> getBusHalts(BusLine busLine) {
assert busLine != null;
return new LineHaltIterator(busLine);
} | [
"@",
"Pure",
"public",
"static",
"Iterator",
"<",
"BusItineraryHalt",
">",
"getBusHalts",
"(",
"BusLine",
"busLine",
")",
"{",
"assert",
"busLine",
"!=",
"null",
";",
"return",
"new",
"LineHaltIterator",
"(",
"busLine",
")",
";",
"}"
] | Replies all the bus itinerary halts in the given bus line.
@param busLine the bus line.
@return the iterator on bus itinerary halts. | [
"Replies",
"all",
"the",
"bus",
"itinerary",
"halts",
"in",
"the",
"given",
"bus",
"line",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetworkUtilities.java#L71-L75 | train |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetworkUtilities.java | BusNetworkUtilities.getBusHalts | @Pure
public static Iterator<BusItineraryHalt> getBusHalts(BusNetwork busNetwork) {
assert busNetwork != null;
return new NetworkHaltIterator(busNetwork);
} | java | @Pure
public static Iterator<BusItineraryHalt> getBusHalts(BusNetwork busNetwork) {
assert busNetwork != null;
return new NetworkHaltIterator(busNetwork);
} | [
"@",
"Pure",
"public",
"static",
"Iterator",
"<",
"BusItineraryHalt",
">",
"getBusHalts",
"(",
"BusNetwork",
"busNetwork",
")",
"{",
"assert",
"busNetwork",
"!=",
"null",
";",
"return",
"new",
"NetworkHaltIterator",
"(",
"busNetwork",
")",
";",
"}"
] | Replies all the bus itinerary halts in the given bus network.
@param busNetwork the bus network.
@return the iterator on bus itinerary halts. | [
"Replies",
"all",
"the",
"bus",
"itinerary",
"halts",
"in",
"the",
"given",
"bus",
"network",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetworkUtilities.java#L82-L86 | train |
umeshawasthi/jsr303-validator-plugin | src/main/java/com/github/umeshawasthi/struts2/jsr303/validation/interceptor/JSR303ValidationInterceptor.java | JSR303ValidationInterceptor.getActionMethod | protected Method getActionMethod(Class actionClass, String methodName)
throws NoSuchMethodException {
Method method;
try {
method = actionClass.getMethod(methodName, new Class[0]);
} catch (NoSuchMethodException e) {
// hmm -- OK, try doXxx instead
... | java | protected Method getActionMethod(Class actionClass, String methodName)
throws NoSuchMethodException {
Method method;
try {
method = actionClass.getMethod(methodName, new Class[0]);
} catch (NoSuchMethodException e) {
// hmm -- OK, try doXxx instead
... | [
"protected",
"Method",
"getActionMethod",
"(",
"Class",
"actionClass",
",",
"String",
"methodName",
")",
"throws",
"NoSuchMethodException",
"{",
"Method",
"method",
";",
"try",
"{",
"method",
"=",
"actionClass",
".",
"getMethod",
"(",
"methodName",
",",
"new",
"... | This is copied from DefaultActionInvocation | [
"This",
"is",
"copied",
"from",
"DefaultActionInvocation"
] | a3dfeafa1c81f96ea559bde65304c3fdbd8b5378 | https://github.com/umeshawasthi/jsr303-validator-plugin/blob/a3dfeafa1c81f96ea559bde65304c3fdbd8b5378/src/main/java/com/github/umeshawasthi/struts2/jsr303/validation/interceptor/JSR303ValidationInterceptor.java#L201-L220 | train |
agmip/translator-dssat | src/main/java/org/agmip/translators/dssat/DssatAFileOutput.java | DssatAFileOutput.cutYear | private String cutYear(String str) {
if (str.length() > 3) {
return str.substring(str.length() - 3, str.length());
} else {
return str;
}
} | java | private String cutYear(String str) {
if (str.length() > 3) {
return str.substring(str.length() - 3, str.length());
} else {
return str;
}
} | [
"private",
"String",
"cutYear",
"(",
"String",
"str",
")",
"{",
"if",
"(",
"str",
".",
"length",
"(",
")",
">",
"3",
")",
"{",
"return",
"str",
".",
"substring",
"(",
"str",
".",
"length",
"(",
")",
"-",
"3",
",",
"str",
".",
"length",
"(",
")"... | Remove the 2-bit year number from input date string
@param str input date string
@return the days of year | [
"Remove",
"the",
"2",
"-",
"bit",
"year",
"number",
"from",
"input",
"date",
"string"
] | 4be61d998f106eb7234ea8701b63c3746ae688f4 | https://github.com/agmip/translator-dssat/blob/4be61d998f106eb7234ea8701b63c3746ae688f4/src/main/java/org/agmip/translators/dssat/DssatAFileOutput.java#L170-L176 | train |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/Plane4d.java | Plane4d.getPivot | @Override
public Point3d getPivot() {
Point3d pivot = this.cachedPivot == null ? null : this.cachedPivot.get();
if (pivot==null) {
pivot = getProjection(0., 0., 0.);
this.cachedPivot = new WeakReference<>(pivot);
}
return pivot;
} | java | @Override
public Point3d getPivot() {
Point3d pivot = this.cachedPivot == null ? null : this.cachedPivot.get();
if (pivot==null) {
pivot = getProjection(0., 0., 0.);
this.cachedPivot = new WeakReference<>(pivot);
}
return pivot;
} | [
"@",
"Override",
"public",
"Point3d",
"getPivot",
"(",
")",
"{",
"Point3d",
"pivot",
"=",
"this",
".",
"cachedPivot",
"==",
"null",
"?",
"null",
":",
"this",
".",
"cachedPivot",
".",
"get",
"(",
")",
";",
"if",
"(",
"pivot",
"==",
"null",
")",
"{",
... | Replies the pivot point around which the rotation must be done.
@return a reference on the buffered pivot point. | [
"Replies",
"the",
"pivot",
"point",
"around",
"which",
"the",
"rotation",
"must",
"be",
"done",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Plane4d.java#L340-L348 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.decodeHTMLEntities | private static String decodeHTMLEntities(String string) {
if (string == null) {
return null;
}
try {
return URLDecoder.decode(string, Charset.defaultCharset().displayName());
} catch (UnsupportedEncodingException exception) {
return string;
}
} | java | private static String decodeHTMLEntities(String string) {
if (string == null) {
return null;
}
try {
return URLDecoder.decode(string, Charset.defaultCharset().displayName());
} catch (UnsupportedEncodingException exception) {
return string;
}
} | [
"private",
"static",
"String",
"decodeHTMLEntities",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"try",
"{",
"return",
"URLDecoder",
".",
"decode",
"(",
"string",
",",
"Charset",
".",
"defau... | Replace the HTML entities by the current charset characters.
@param string the string to decode.
@return decoded string or {@code s}. | [
"Replace",
"the",
"HTML",
"entities",
"by",
"the",
"current",
"charset",
"characters",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L157-L166 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.encodeHTMLEntities | private static String encodeHTMLEntities(String string) {
if (string == null) {
return null;
}
try {
return URLEncoder.encode(string, Charset.defaultCharset().displayName());
} catch (UnsupportedEncodingException exception) {
return string;
}
} | java | private static String encodeHTMLEntities(String string) {
if (string == null) {
return null;
}
try {
return URLEncoder.encode(string, Charset.defaultCharset().displayName());
} catch (UnsupportedEncodingException exception) {
return string;
}
} | [
"private",
"static",
"String",
"encodeHTMLEntities",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"try",
"{",
"return",
"URLEncoder",
".",
"encode",
"(",
"string",
",",
"Charset",
".",
"defau... | Replace the special characters by HTML entities.
@param string the string to decode.
@return decoded string or {@code s}. | [
"Replace",
"the",
"special",
"characters",
"by",
"HTML",
"entities",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L173-L182 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.isJarURL | @Pure
@Inline(value = "URISchemeType.JAR.isURL($1)", imported = {URISchemeType.class})
public static boolean isJarURL(URL url) {
return URISchemeType.JAR.isURL(url);
} | java | @Pure
@Inline(value = "URISchemeType.JAR.isURL($1)", imported = {URISchemeType.class})
public static boolean isJarURL(URL url) {
return URISchemeType.JAR.isURL(url);
} | [
"@",
"Pure",
"@",
"Inline",
"(",
"value",
"=",
"\"URISchemeType.JAR.isURL($1)\"",
",",
"imported",
"=",
"{",
"URISchemeType",
".",
"class",
"}",
")",
"public",
"static",
"boolean",
"isJarURL",
"(",
"URL",
"url",
")",
"{",
"return",
"URISchemeType",
".",
"JAR... | Replies if the given URL has a jar scheme.
@param url the URL to test.
@return <code>true</code> if the given URL uses a jar scheme. | [
"Replies",
"if",
"the",
"given",
"URL",
"has",
"a",
"jar",
"scheme",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L235-L239 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.getJarURL | @Pure
public static URL getJarURL(URL url) {
if (!isJarURL(url)) {
return null;
}
String path = url.getPath();
final int idx = path.lastIndexOf(JAR_URL_FILE_ROOT);
if (idx >= 0) {
path = path.substring(0, idx);
}
try {
return new URL(path);
} catch (MalformedURLException exception) {
return... | java | @Pure
public static URL getJarURL(URL url) {
if (!isJarURL(url)) {
return null;
}
String path = url.getPath();
final int idx = path.lastIndexOf(JAR_URL_FILE_ROOT);
if (idx >= 0) {
path = path.substring(0, idx);
}
try {
return new URL(path);
} catch (MalformedURLException exception) {
return... | [
"@",
"Pure",
"public",
"static",
"URL",
"getJarURL",
"(",
"URL",
"url",
")",
"{",
"if",
"(",
"!",
"isJarURL",
"(",
"url",
")",
")",
"{",
"return",
"null",
";",
"}",
"String",
"path",
"=",
"url",
".",
"getPath",
"(",
")",
";",
"final",
"int",
"idx... | Replies the jar part of the jar-scheme URL.
<p>If the input URL is {@code jar:file:/path1/archive.jar!/path2/file},
the output of this function is {@code file:/path1/archive.jar}.
@param url the URL to test.
@return the URL of the jar file in the given URL, or <code>null</code>
if the given URL does not use jar schem... | [
"Replies",
"the",
"jar",
"part",
"of",
"the",
"jar",
"-",
"scheme",
"URL",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L250-L265 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.getJarFile | @Pure
public static File getJarFile(URL url) {
if (isJarURL(url)) {
final String path = url.getPath();
final int idx = path.lastIndexOf(JAR_URL_FILE_ROOT);
if (idx >= 0) {
return new File(decodeHTMLEntities(path.substring(idx + 1)));
}
}
return null;
} | java | @Pure
public static File getJarFile(URL url) {
if (isJarURL(url)) {
final String path = url.getPath();
final int idx = path.lastIndexOf(JAR_URL_FILE_ROOT);
if (idx >= 0) {
return new File(decodeHTMLEntities(path.substring(idx + 1)));
}
}
return null;
} | [
"@",
"Pure",
"public",
"static",
"File",
"getJarFile",
"(",
"URL",
"url",
")",
"{",
"if",
"(",
"isJarURL",
"(",
"url",
")",
")",
"{",
"final",
"String",
"path",
"=",
"url",
".",
"getPath",
"(",
")",
";",
"final",
"int",
"idx",
"=",
"path",
".",
"... | Replies the file part of the jar-scheme URL.
<p>If the input URL is {@code jar:file:/path1/archive.jar!/path2/file},
the output of this function is {@code /path2/file}.
@param url the URL to test.
@return the file in the given URL, or <code>null</code>
if the given URL does not use jar scheme. | [
"Replies",
"the",
"file",
"part",
"of",
"the",
"jar",
"-",
"scheme",
"URL",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L276-L286 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.isCaseSensitiveFilenameSystem | @Pure
public static boolean isCaseSensitiveFilenameSystem() {
switch (OperatingSystem.getCurrentOS()) {
case AIX:
case ANDROID:
case BSD:
case FREEBSD:
case NETBSD:
case OPENBSD:
case LINUX:
case SOLARIS:
case HPUX:
return true;
//$CASES-OMITTED$
default:
return false;
}
} | java | @Pure
public static boolean isCaseSensitiveFilenameSystem() {
switch (OperatingSystem.getCurrentOS()) {
case AIX:
case ANDROID:
case BSD:
case FREEBSD:
case NETBSD:
case OPENBSD:
case LINUX:
case SOLARIS:
case HPUX:
return true;
//$CASES-OMITTED$
default:
return false;
}
} | [
"@",
"Pure",
"public",
"static",
"boolean",
"isCaseSensitiveFilenameSystem",
"(",
")",
"{",
"switch",
"(",
"OperatingSystem",
".",
"getCurrentOS",
"(",
")",
")",
"{",
"case",
"AIX",
":",
"case",
"ANDROID",
":",
"case",
"BSD",
":",
"case",
"FREEBSD",
":",
"... | Replies if the current operating system uses case-sensitive filename.
@return <code>true</code> if the filenames on the current file system are case sensitive,
otherwise <code>false</code> | [
"Replies",
"if",
"the",
"current",
"operating",
"system",
"uses",
"case",
"-",
"sensitive",
"filename",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L373-L390 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.extension | @Pure
public static String extension(File filename) {
if (filename == null) {
return null;
}
final String largeBasename = largeBasename(filename);
final int idx = largeBasename.lastIndexOf(getFileExtensionCharacter());
if (idx <= 0) {
return ""; //$NON-NLS-1$
}
return largeBasename.substring(idx);
... | java | @Pure
public static String extension(File filename) {
if (filename == null) {
return null;
}
final String largeBasename = largeBasename(filename);
final int idx = largeBasename.lastIndexOf(getFileExtensionCharacter());
if (idx <= 0) {
return ""; //$NON-NLS-1$
}
return largeBasename.substring(idx);
... | [
"@",
"Pure",
"public",
"static",
"String",
"extension",
"(",
"File",
"filename",
")",
"{",
"if",
"(",
"filename",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"final",
"String",
"largeBasename",
"=",
"largeBasename",
"(",
"filename",
")",
";",
"fi... | Reply the extension of the specified file.
@param filename is the name to parse.
@return the extension of the specified file
@see #shortBasename(File)
@see #largeBasename(File)
@see #basename(File)
@see #dirname(File)
@see #extensions(File) | [
"Reply",
"the",
"extension",
"of",
"the",
"specified",
"file",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L807-L818 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.hasExtension | @Pure
public static boolean hasExtension(File filename, String extension) {
if (filename == null) {
return false;
}
assert extension != null;
String extent = extension;
if (!"".equals(extent) && !extent.startsWith(EXTENSION_SEPARATOR)) { //$NON-NLS-1$
extent = EXTENSION_SEPARATOR + extent;
}
final ... | java | @Pure
public static boolean hasExtension(File filename, String extension) {
if (filename == null) {
return false;
}
assert extension != null;
String extent = extension;
if (!"".equals(extent) && !extent.startsWith(EXTENSION_SEPARATOR)) { //$NON-NLS-1$
extent = EXTENSION_SEPARATOR + extent;
}
final ... | [
"@",
"Pure",
"public",
"static",
"boolean",
"hasExtension",
"(",
"File",
"filename",
",",
"String",
"extension",
")",
"{",
"if",
"(",
"filename",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"assert",
"extension",
"!=",
"null",
";",
"String",
"ex... | Replies if the specified file has the specified extension.
<p>The test is dependent of the case-sensitive attribute of operating system.
@param filename is the filename to parse
@param extension is the extension to test.
@return <code>true</code> if the given filename has the given extension,
otherwise <code>false</c... | [
"Replies",
"if",
"the",
"specified",
"file",
"has",
"the",
"specified",
"extension",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L1137-L1155 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.getSystemConfigurationDirectoryFor | @Pure
public static File getSystemConfigurationDirectoryFor(String software) {
if (software == null || "".equals(software)) { //$NON-NLS-1$
throw new IllegalArgumentException();
}
final OperatingSystem os = OperatingSystem.getCurrentOS();
if (os == OperatingSystem.ANDROID) {
return join(File.listRoots()[... | java | @Pure
public static File getSystemConfigurationDirectoryFor(String software) {
if (software == null || "".equals(software)) { //$NON-NLS-1$
throw new IllegalArgumentException();
}
final OperatingSystem os = OperatingSystem.getCurrentOS();
if (os == OperatingSystem.ANDROID) {
return join(File.listRoots()[... | [
"@",
"Pure",
"public",
"static",
"File",
"getSystemConfigurationDirectoryFor",
"(",
"String",
"software",
")",
"{",
"if",
"(",
"software",
"==",
"null",
"||",
"\"\"",
".",
"equals",
"(",
"software",
")",
")",
"{",
"//$NON-NLS-1$",
"throw",
"new",
"IllegalArgum... | Replies the system configuration directory for the specified software.
<p>On Unix operating systems, the system directory for a
software is by default {@code /etc/software} where {@code software}
is the given parameter (case-sensitive). On Windows® operating systems, the user
directory for a software is by default... | [
"Replies",
"the",
"system",
"configuration",
"directory",
"for",
"the",
"specified",
"software",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L1752-L1774 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.getSystemSharedLibraryDirectoryNameFor | @Pure
public static String getSystemSharedLibraryDirectoryNameFor(String software) {
final File f = getSystemSharedLibraryDirectoryFor(software);
if (f == null) {
return null;
}
return f.getAbsolutePath();
} | java | @Pure
public static String getSystemSharedLibraryDirectoryNameFor(String software) {
final File f = getSystemSharedLibraryDirectoryFor(software);
if (f == null) {
return null;
}
return f.getAbsolutePath();
} | [
"@",
"Pure",
"public",
"static",
"String",
"getSystemSharedLibraryDirectoryNameFor",
"(",
"String",
"software",
")",
"{",
"final",
"File",
"f",
"=",
"getSystemSharedLibraryDirectoryFor",
"(",
"software",
")",
";",
"if",
"(",
"f",
"==",
"null",
")",
"{",
"return"... | Replies the system shared library directory for the specified software.
<p>On Unix operating systems, the system directory for a
software is by default {@code /usr/lib/software} where {@code software}
is the given parameter (case-sensitive). On Windows® operating systems, the user
directory for a software is by de... | [
"Replies",
"the",
"system",
"shared",
"library",
"directory",
"for",
"the",
"specified",
"software",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L1845-L1852 | train |
gallandarakhneorg/afc | core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java | FileSystem.convertStringToFile | @Pure
public static File convertStringToFile(String filename) {
if (filename == null || "".equals(filename)) { //$NON-NLS-1$
return null;
}
if (isWindowsNativeFilename(filename)) {
return normalizeWindowsNativeFilename(filename);
}
// Test for malformed filenames.
return new File(extractLocalPath(fil... | java | @Pure
public static File convertStringToFile(String filename) {
if (filename == null || "".equals(filename)) { //$NON-NLS-1$
return null;
}
if (isWindowsNativeFilename(filename)) {
return normalizeWindowsNativeFilename(filename);
}
// Test for malformed filenames.
return new File(extractLocalPath(fil... | [
"@",
"Pure",
"public",
"static",
"File",
"convertStringToFile",
"(",
"String",
"filename",
")",
"{",
"if",
"(",
"filename",
"==",
"null",
"||",
"\"\"",
".",
"equals",
"(",
"filename",
")",
")",
"{",
"//$NON-NLS-1$",
"return",
"null",
";",
"}",
"if",
"(",... | Convert a string which represents a local file into a File.
<p>This function supports the naming standards coming for the different
operating systems.
@param filename the filename.
@return the file, or <code>null</code> if the given filename is <code>null</code> or empty.
@since 13.0 | [
"Convert",
"a",
"string",
"which",
"represents",
"a",
"local",
"file",
"into",
"a",
"File",
"."
] | 0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L1863-L1875 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.