public class

PointFPool

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.utils.PointFPool

Class Overview

PointF Pool Pattern to avoid unnecessary memory allocation.

Summary

Constants
int length
Public Constructors
PointFPool()
Public Methods
void clear()
Clears the pool
static PointFPool getInstance()
PointF obtain()
PointF obtain(float x, float y)
void recycle(List<PointF> points)
Recycles points to the pool
void recycle(int count)
Recycles a specified number of points to the pool
void recycle(PointF point)
Recycles a PointF to the pool
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int length

Constant Value: 4096 (0x00001000)

Public Constructors

public PointFPool ()

Public Methods

public void clear ()

Clears the pool

public static PointFPool getInstance ()

public PointF obtain ()

Returns
  • a PointF

public PointF obtain (float x, float y)

Returns
  • a PointF

public void recycle (List<PointF> points)

Recycles points to the pool

Parameters
points A list of points to be recycled

public void recycle (int count)

Recycles a specified number of points to the pool

Parameters
count The number of points to be recycled

public void recycle (PointF point)

Recycles a PointF to the pool

Parameters
point The PointF