public class IntegerRelationMapImpl extends Object implements IntegerRelationMap
Constructor and Description |
---|
IntegerRelationMapImpl()
Constructs an empty map of binary relations.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(int relationId)
Adds an empty binary relation.
|
boolean |
add(int relationId,
int first,
int second)
Adds a pair to a binary relation.
|
boolean |
contains(int relationId)
Tells whether a binary relation belongs to this map.
|
boolean |
contains(int relationId,
int first,
int second)
Tells whether a binary relation contains a give pair.
|
boolean |
equals(Object o) |
IntegerBinaryRelation |
get(int relationId) |
Collection<Integer> |
getByFirst(int relationId,
int first)
Returns the elements connecting from a particular element in the first
component.
|
Collection<Integer> |
getBySecond(int relationId,
int second)
Returns the elements connecting to a particular element in the second
component.
|
long |
getDeepSize()
Returns the number of elements in the internal maps that are referred by
the keys, without counting the keys themselves.
|
Set<Integer> |
getElements() |
Collection<Integer> |
getRelationsByFirst(int first)
Returns the relations which use a particular element in the first
component.
|
Collection<Integer> |
getRelationsBySecond(int second)
Returns the relations which use a particular element in the second
component.
|
int |
hashCode() |
String |
toString() |
public IntegerRelationMapImpl()
public boolean add(int relationId)
relationId
- relation identifiertrue
if and only if the relation identifier was
addedpublic boolean add(int relationId, int first, int second)
relationId
- relation idfirst
- first componentsecond
- second componenttrue
if and only if the pair was addedpublic boolean contains(int relationId)
IntegerRelationMap
contains
in interface IntegerRelationMap
relationId
- relation idtrue
if and only if the binary relation belongs to
this mappublic boolean contains(int relationId, int first, int second)
IntegerRelationMap
contains
in interface IntegerRelationMap
relationId
- relation idfirst
- first componentsecond
- second componenttrue
if and only if the pair belongs to the given
relationpublic IntegerBinaryRelation get(int relationId)
get
in interface IntegerRelationMap
relationId
- relation idpublic Collection<Integer> getByFirst(int relationId, int first)
IntegerRelationMap
getByFirst
in interface IntegerRelationMap
relationId
- relation idfirst
- first componentpublic Collection<Integer> getBySecond(int relationId, int second)
IntegerRelationMap
getBySecond
in interface IntegerRelationMap
relationId
- relation idsecond
- second componentpublic long getDeepSize()
public Set<Integer> getElements()
getElements
in interface IntegerRelationMap
public Collection<Integer> getRelationsByFirst(int first)
IntegerRelationMap
getRelationsByFirst
in interface IntegerRelationMap
first
- first componentpublic Collection<Integer> getRelationsBySecond(int second)
IntegerRelationMap
getRelationsBySecond
in interface IntegerRelationMap
second
- second componentCopyright © 2009–2015 Chair of Automata Theory - TU Dresden. All rights reserved.