public class IntegerBinaryRelationImpl extends Object implements IntegerBinaryRelation
Constructor and Description |
---|
IntegerBinaryRelationImpl()
Constructs an empty binary relation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(int elem)
Adds an element to this binary relation.
|
boolean |
add(int first,
int second)
Adds a pair to this binary relation.
|
boolean |
contains(int first,
int second)
Tells whether a pair belongs to this binary relation.
|
boolean |
equals(Object o) |
Collection<Integer> |
getByFirst(int first)
Returns the elements connecting from a particular element in the first
component.
|
Collection<Integer> |
getBySecond(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() |
int |
hashCode() |
String |
toString() |
public IntegerBinaryRelationImpl()
public boolean add(int elem)
elem
- elementtrue
if and only if the element was addedpublic boolean add(int first, int second)
first
- first elementsecond
- second elementtrue
if and only if the pair was addedpublic boolean contains(int first, int second)
IntegerBinaryRelation
contains
in interface IntegerBinaryRelation
first
- first componentsecond
- second componentpublic Collection<Integer> getByFirst(int first)
IntegerBinaryRelation
getByFirst
in interface IntegerBinaryRelation
first
- first componentpublic Collection<Integer> getBySecond(int second)
IntegerBinaryRelation
getBySecond
in interface IntegerBinaryRelation
second
- second componentpublic long getDeepSize()
public Set<Integer> getElements()
getElements
in interface IntegerBinaryRelation
Copyright © 2009–2015 Chair of Automata Theory - TU Dresden. All rights reserved.