Key convience constructors from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1958 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -43,7 +43,7 @@ public class Key
|
||||
|
||||
public Key (String index, Comparable value)
|
||||
{
|
||||
this(new ColumnExpression(null, index), value);
|
||||
this(new ColumnExpression(index), value);
|
||||
}
|
||||
|
||||
public Key (ColumnExpression column, Comparable value)
|
||||
@@ -53,11 +53,30 @@ public class Key
|
||||
|
||||
public Key (String index1, Comparable value1, String index2, Comparable value2)
|
||||
{
|
||||
this(new ColumnExpression[] { new ColumnExpression(null, index1),
|
||||
new ColumnExpression(null, index2) },
|
||||
this(new ColumnExpression[] { new ColumnExpression(index1),
|
||||
new ColumnExpression(index2) },
|
||||
new Comparable[] { value1, value2 });
|
||||
}
|
||||
|
||||
public Key (String index1, Comparable value1, String index2, Comparable value2,
|
||||
String index3, Comparable value3)
|
||||
{
|
||||
this(new ColumnExpression[] { new ColumnExpression(index1),
|
||||
new ColumnExpression(index2),
|
||||
new ColumnExpression(index3) },
|
||||
new Comparable[] { value1, value2, value3 });
|
||||
}
|
||||
|
||||
public Key (String[] columns, Comparable[] values)
|
||||
{
|
||||
ColumnExpression[] colExp = new ColumnExpression[columns.length];
|
||||
for (int ii = 0; ii < columns.length; ii ++) {
|
||||
colExp[ii] = new ColumnExpression(columns[ii]);
|
||||
}
|
||||
this.columns = colExp;
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
public Key (ColumnExpression[] columns, Comparable[] values)
|
||||
{
|
||||
this.columns = columns;
|
||||
|
||||
Reference in New Issue
Block a user