Package it.unimi.dsi.webgraph.labelling
Class AbstractIntListLabel
java.lang.Object
it.unimi.dsi.webgraph.labelling.AbstractLabel
it.unimi.dsi.webgraph.labelling.AbstractIntListLabel
- Direct Known Subclasses:
FixedWidthIntListLabel
An abstract (single-attribute) list-of-integers label.
This class provides basic methods for a label holding a list of integers. Concrete implementations may impose further requirements on the integer.
Implementing subclasses must provide constructors, Label.copy(),
Label.fromBitStream(it.unimi.dsi.io.InputBitStream, int), Label.toBitStream(it.unimi.dsi.io.OutputBitStream, int)
and possibly override toString().
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringThe key of the attribute represented by this label.int[]The values of the attribute represented by this label.Fields inherited from interface it.unimi.dsi.webgraph.labelling.Label
EMPTY_LABEL_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionAbstractIntListLabel(String key, int[] value) Creates an int label with given key and value. -
Method Summary
Modifier and TypeMethodDescriptionString[]All attribute keys (in arbitrary order).Class<?>[]The types of all attributes in the same order as they are returned byLabel.attributeKeys().booleanget()The value associated to the well-known attribute.The value associated to the attribute with given key.inthashCode()toString()Returns the well-known attribute key.Methods inherited from class it.unimi.dsi.webgraph.labelling.AbstractLabel
getBoolean, getBoolean, getByte, getByte, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShortMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.unimi.dsi.webgraph.labelling.Label
copy, fixedWidth, fromBitStream, getBoolean, getBoolean, getByte, getByte, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, toBitStream, toSpec
-
Field Details
-
key
The key of the attribute represented by this label. -
value
public int[] valueThe values of the attribute represented by this label.
-
-
Constructor Details
-
AbstractIntListLabel
Creates an int label with given key and value.- Parameters:
key- the (only) key of this label.value- the value of this label.
-
-
Method Details
-
wellKnownAttributeKey
Description copied from interface:LabelReturns the well-known attribute key.- Specified by:
wellKnownAttributeKeyin interfaceLabel- Returns:
- the well-known attribute key.
-
attributeKeys
Description copied from interface:LabelAll attribute keys (in arbitrary order).- Specified by:
attributeKeysin interfaceLabel- Returns:
- the keys of all attributes.
-
attributeTypes
Description copied from interface:LabelThe types of all attributes in the same order as they are returned byLabel.attributeKeys().- Specified by:
attributeTypesin interfaceLabel- Returns:
- the type of all attributes.
-
get
Description copied from interface:LabelThe value associated to the attribute with given key. -
get
Description copied from interface:LabelThe value associated to the well-known attribute. -
toString
-
equals
-
hashCode
public int hashCode()
-