Skip to content

Commit

Permalink
wmf: remove RecordStore class deprecated since 2007, clean up `Meta…
Browse files Browse the repository at this point in the history
…Record`
  • Loading branch information
carlosame committed Dec 18, 2024
1 parent 01e6f61 commit 8f457be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 301 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,18 @@
* @author For later modifications, see Git history.
* @version $Id$
*/
public class MetaRecord /* implements Serializable */ {
public class MetaRecord implements java.io.Serializable {

private static final long serialVersionUID = 1L;

public int functionId;
public int numPoints;

private final List<Object> ptVector = new ArrayList<>();
private final List<Integer> ptVector = new ArrayList<>();

public MetaRecord() {
}

public void EnsureCapacity(int cc) {
}

/**
* when you are storing Integer-objects, consider using addElement( int )
* instead.
*
* @param obj
*/
public void AddElement(Object obj) {
ptVector.add(obj);
}

/**
* helper method to add int-values. This way we keep the call to
* Integer.valueOf() in one place, here.
Expand All @@ -70,7 +59,7 @@ public final void addElement(int iValue) {
* <code>int</code>.
*/
public Integer ElementAt(int offset) {
return (Integer) ptVector.get(offset);
return ptVector.get(offset);
}

/**
Expand All @@ -81,21 +70,27 @@ public Integer ElementAt(int offset) {
* @return the intValue of the element at offset
*/
public final int elementAt(int offset) {
return (Integer) ptVector.get(offset);
return ptVector.get(offset);
}

/**
* A record that contain byte arrays elements.
*/
public static class ByteRecord extends MetaRecord {

private static final long serialVersionUID = 1L;

public final byte[] bstr;

public ByteRecord(byte[] bstr) {
this.bstr = bstr;
}
}

public static class StringRecord extends MetaRecord /* implements Serializable */ {
public static class StringRecord extends MetaRecord {

private static final long serialVersionUID = 1L;

public final String text;

public StringRecord(String newText) {
Expand Down

This file was deleted.

0 comments on commit 8f457be

Please sign in to comment.