Class AbstractLabel

java.lang.Object
it.unimi.dsi.webgraph.labelling.AbstractLabel
All Implemented Interfaces:
it.unimi.dsi.lang.FlyweightPrototype<Label>, Label
Direct Known Subclasses:
AbstractIntLabel, AbstractIntListLabel

public abstract class AbstractLabel extends Object implements Label
An abstract implementation throwing an IllegalArgumentException on all primitive-type methods.
  • Field Summary

    Fields inherited from interface Label

    EMPTY_LABEL_ARRAY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    The value associated to the well-known attribute, provided that the latter has a type that fits a boolean.
    boolean
    The value associated to the attribute with given key, provided that the latter has a type that fits a boolean.
    byte
    The value associated to the well-known attribute, provided that the latter has a type that fits a byte.
    byte
    The value associated to the attribute with given key, provided that the latter has a type that fits a byte.
    char
    The value associated to the well-known attribute, provided that the latter has a type that fits a char.
    char
    The value associated to the attribute with given key, provided that the latter has a type that fits a char.
    double
    The value associated to the well-known attribute, provided that the latter has a type that fits a double.
    double
    The value associated to the attribute with given key, provided that the latter has a type that fits a double.
    float
    The value associated to the well-known attribute, provided that the latter has a type that fits a float.
    float
    The value associated to the attribute with given key, provided that the latter has a type that fits a float.
    int
    The value associated to the well-known attribute, provided that the latter has a type that fits a int.
    int
    The value associated to the attribute with given key, provided that the latter has a type that fits a int.
    long
    The value associated to the well-known attribute, provided that the latter has a type that fits a long.
    long
    The value associated to the attribute with given key, provided that the latter has a type that fits a long.
    short
    The value associated to the well-known attribute, provided that the latter has a type that fits a short.
    short
    The value associated to the attribute with given key, provided that the latter has a type that fits a short.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractLabel

      public AbstractLabel()
  • Method Details

    • getByte

      public byte getByte() throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the well-known attribute, provided that the latter has a type that fits a byte. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getByte in interface Label
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getShort

      public short getShort(String key) throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the attribute with given key, provided that the latter has a type that fits a short. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getShort in interface Label
      Parameters:
      key - the attribute key.
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getInt

      public int getInt(String key) throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the attribute with given key, provided that the latter has a type that fits a int. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getInt in interface Label
      Parameters:
      key - the attribute key.
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getLong

      public long getLong(String key) throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the attribute with given key, provided that the latter has a type that fits a long. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getLong in interface Label
      Parameters:
      key - the attribute key.
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getFloat

      public float getFloat(String key) throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the attribute with given key, provided that the latter has a type that fits a float. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getFloat in interface Label
      Parameters:
      key - the attribute key.
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getDouble

      public double getDouble(String key) throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the attribute with given key, provided that the latter has a type that fits a double. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getDouble in interface Label
      Parameters:
      key - the attribute key.
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getChar

      public char getChar(String key) throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the attribute with given key, provided that the latter has a type that fits a char. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getChar in interface Label
      Parameters:
      key - the attribute key.
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getBoolean

      public boolean getBoolean(String key) throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the attribute with given key, provided that the latter has a type that fits a boolean. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getBoolean in interface Label
      Parameters:
      key - the attribute key.
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getByte

      public byte getByte(String key) throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the attribute with given key, provided that the latter has a type that fits a byte. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getByte in interface Label
      Parameters:
      key - the attribute key.
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getShort

      public short getShort() throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the well-known attribute, provided that the latter has a type that fits a short. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getShort in interface Label
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getInt

      public int getInt() throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the well-known attribute, provided that the latter has a type that fits a int. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getInt in interface Label
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getLong

      public long getLong() throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the well-known attribute, provided that the latter has a type that fits a long. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getLong in interface Label
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getFloat

      public float getFloat() throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the well-known attribute, provided that the latter has a type that fits a float.
      Specified by:
      getFloat in interface Label
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getDouble

      public double getDouble() throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the well-known attribute, provided that the latter has a type that fits a double. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getDouble in interface Label
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getChar

      public char getChar() throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the well-known attribute, provided that the latter has a type that fits a char. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getChar in interface Label
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.
    • getBoolean

      public boolean getBoolean() throws IllegalArgumentException
      Description copied from interface: Label
      The value associated to the well-known attribute, provided that the latter has a type that fits a boolean. Otherwise, an IllegalArgumentException is thrown.
      Specified by:
      getBoolean in interface Label
      Returns:
      the attribute value; if the attribute type is primitive, it is wrapped suitably.
      Throws:
      IllegalArgumentException - if the attribute key is not known, or it has the wrong type.