Create a vector with properties.

@param segment the segment property.
@param x the x property.
@param y the y property.
@return the vector.
767501
@SuppressWarnings("static-method")
	public Vector1dfx newVector(ObjectProperty<WeakReference<Segment1D<?, ?>>> segment, DoubleProperty x, DoubleProperty y) {
		return new Vector1dfx(segment, x, y);
	}
822707
private static void add(Polygon poly, int flag, ArrayList<SegmentString> segments) {
        add(poly.getExteriorRing(), flag, segments);
        for (int j = 0; j < poly.getNumInteriorRing(); j++) {
            add(poly.getInteriorRingN(j), flag, segments);
        }
    }
354365
public static ImmutableVector2 createVector(final double x, final double y) {
		return new ImmutableVector2(new ImmutableData(2, 1) {
			@Override
			public double getQuick(int row, int col) {
				if (row == 0)
					return x;
				else
					return y;
			}
		});
	}
31418
public void set(Segment1D<?, ?> segment, double curviline, double shift) {
		assert segment != null : AssertMessages.notNullParameter(0);
		this.segment = new WeakReference<>(segment);
		this.x = curviline;
		this.y = shift;
	}
404767
public static Vector from (XY from, XY to) {
        return new Vector(to.x() - from.x(), to.y() - from.y());
    }
1074210
public Segment getSegment(SEGMENT_TYPE segmentType){

		if(segmentType == null){
			return null;
		}		

		if(segmentType == SEGMENT_TYPE.LINEAR){
			return new LinearSegment();
		} 
		else if(segmentType == SEGMENT_TYPE.SPATIAL){
			return new SpatialSegment();
		} 
		else if(segmentType == SEGMENT_TYPE.TEMPORAL){
			return new TemporalSegment();
		}
		else if(segmentType == SEGMENT_TYPE.SPATIOTEMPORAL){
			return new SpatioTemporalSegment();
		}
		
		return null;
	}
1200970
public static TransmissionLayout segmentToLayout(int segment)
    {
        TransmissionLayout layout = XMIT_LAYOUT_UNKNOWN;
        switch (segment)
        {
            case 0x00:
                layout = XMIT_LAYOUT_UNKNOWN;
                break;
            case JFapChannelConstants.SEGMENT_HEARTBEAT:
            case JFapChannelConstants.SEGMENT_HEARTBEAT_RESPONSE:
            case JFapChannelConstants.SEGMENT_PHYSICAL_CLOSE:
                layout = XMIT_PRIMARY_ONLY;
                break;
            case JFapChannelConstants.SEGMENT_SEGMENTED_FLOW_START:
                layout = XMIT_SEGMENT_START;
                break;
            case JFapChannelConstants.SEGMENT_SEGMENTED_FLOW_MIDDLE:
                layout = XMIT_SEGMENT_MIDDLE;
                break;
            case JFapChannelConstants.SEGMENT_SEGMENTED_FLOW_END:
                layout = XMIT_SEGMENT_END;
                break;
            default:
                // Assume a conversation layout by default.
                layout = XMIT_CONVERSATION;
                break;
        }
        return layout;
    }
1009811
def _segment(cls, segment):
        
        return property(
            fget=lambda x: cls._get_segment(x, segment),
            fset=lambda x, v: cls._set_segment(x, segment, v),
        )
830411
@Override
	public VectorObject create(GeometryEditService editService, GeometryIndex index)
			throws GeometryIndexNotFoundException {
		if (index == null) {
			return createGeometry(editService, index);
		}
		switch (editService.getIndexService().getType(index)) {
			case TYPE_VERTEX:
				return createVertex(editService, index);
			case TYPE_EDGE:
				return createEdge(editService, index);
			default:
				return createGeometry(editService, index);
		}
	}
667270
private Segment createMappedSegment(SegmentDescriptor descriptor) {
    File segmentFile = SegmentFile.createSegmentFile(name, storage.directory(), descriptor.id(), descriptor.version());
    Buffer buffer = MappedBuffer.allocate(segmentFile, Math.min(DEFAULT_BUFFER_SIZE, descriptor.maxSegmentSize()), Integer.MAX_VALUE);
    descriptor.copyTo(buffer);
    Segment segment = new Segment(new SegmentFile(segmentFile), buffer.slice(), descriptor, createIndex(descriptor), new OffsetPredicate(), serializer.clone(), this);
    LOGGER.debug("Created segment: {}", segment);
    return segment;
  }
292689
def _add_line_segment(self, x, y):
        """"""
        self._drawing_operations.append(_LineSegment.new(self, x, y))
1231437
public static BackgroundElement createElement(String name, int x, int y)
    {
        return new BackgroundElement(x, y, createSprite(Medias.create(name)));
    }
303297
private void addFirstSegment(int x, int y) {
		Point2D_I32 p = queuePoints.grow();
		p.set(x,y);
		EdgeSegment s = new EdgeSegment();
		s.points.add(p);
		s.index = 0;
		s.parent = s.parentPixel = -1;
		e.segments.add(s);
		open.add(s);
	}
1352829
private HashSet<Integer> vector2set(int y[]) {
        HashSet<Integer> Y = new HashSet<Integer>();
        for (int j = 0; j < y.length; j++) {
            if (y[j] > 0) {
                Y.add(j);
            }
        }
        return Y;
    }
1160662
public void set(Segment1D<?, ?> segment, double curviline, double shift) {
		assert segment != null : AssertMessages.notNullParameter(0);
		segmentProperty().set(new WeakReference<>(segment));
		xProperty().set(curviline);
		yProperty().set(shift);
	}
887266
public void connectBeginToBegin(SGraphSegment segment) {
		if (segment.getGraph() != getGraph()) {
			throw new IllegalArgumentException();
		}
		final SGraphPoint point = new SGraphPoint(getGraph());
		setBegin(point);
		segment.setBegin(point);

		final SGraph g = getGraph();
		assert g != null;
		g.updatePointCount(-1);
	}
74156
public static String createPath(String... segments) {

    int length = 0;
    for (String s : segments) {
      if (length > 0) {
        length++;
      }
      length = length + s.length();
    }
    StringBuilder buffer = new StringBuilder(length);
    appendPath(buffer, segments);
    return buffer.toString();
  }