refactoring (class name should start with uppercase letter)

pull/1/head
Michael Peter Christen 10 years ago
parent 14385057c2
commit 2c2b50e65d

@ -129,7 +129,6 @@ public class NetworkHistory {
if (x0 < 0.0f) chart.chartLine(ChartPlotter.DIMENSION_BOTTOM, ChartPlotter.DIMENSION_LEFT, x0, y0, x1, y1);
x0 = x1; y0 = y1;
}
break;
}
return chart;
}

@ -77,7 +77,7 @@ import net.yacy.kelondro.util.MapTools;
import net.yacy.kelondro.util.OS;
import net.yacy.peers.operation.yacyVersion;
import net.yacy.search.Switchboard;
import net.yacy.utils.bitfield;
import net.yacy.utils.Bitfield;
import net.yacy.utils.crypt;
public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
@ -926,7 +926,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
private boolean getFlag(final int flag) {
final String flags = get(Seed.FLAGS, Seed.FLAGSZERO);
return (new bitfield(ASCII.getBytes(flags))).get(flag);
return (new Bitfield(ASCII.getBytes(flags))).get(flag);
}
private void setFlag(final int flag, final boolean value) {
@ -934,7 +934,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
if ( flags.length() != 4 ) {
flags = Seed.FLAGSZERO;
}
final bitfield f = new bitfield(ASCII.getBytes(flags));
final Bitfield f = new Bitfield(ASCII.getBytes(flags));
f.set(flag, value);
this.dna.put(Seed.FLAGS, UTF8.String(f.getBytes()));
}

@ -23,20 +23,20 @@ package net.yacy.utils;
import net.yacy.cora.document.encoding.ASCII;
public class bitfield {
public class Bitfield {
private byte[] bb;
public bitfield() {
public Bitfield() {
this(0);
}
public bitfield(final int bytelength) {
public Bitfield(final int bytelength) {
this.bb= new byte[bytelength];
for (int i = 0 ; i < bytelength; i++) bb[i] = ' ';
}
public bitfield(final byte[] field) {
public Bitfield(final byte[] field) {
bb = field;
}
@ -93,7 +93,7 @@ public class bitfield {
public static void main(final String[] args) {
//final bitfield f = new bitfield(ASCII.getBytes(Seed.FLAGSZERO));
final bitfield f = new bitfield(4);
final Bitfield f = new Bitfield(4);
for (int i = 0; i < 20; i++) {
f.set(i, false);
if (f.get(i)) System.out.println("i = " + i);
@ -102,7 +102,7 @@ public class bitfield {
System.out.println(i + ":" + f.toString());
}
final bitfield test = new bitfield(4);
final Bitfield test = new Bitfield(4);
final int l = test.length();
System.out.println("available: " + l);
System.out.println("before: " + test.toString());
Loading…
Cancel
Save